[U-Boot] [PATCH 3/3] x86: coreboot: Wrap cros_ec initialization

Bin Meng bmeng.cn at gmail.com
Sun Jan 4 04:12:26 CET 2015


Hi Simon,

On Sun, Jan 4, 2015 at 11:01 AM, Simon Glass <sjg at chromium.org> wrote:
> Hi Bin,
>
> On 3 January 2015 at 19:58, Bin Meng <bmeng.cn at gmail.com> wrote:
>> Hi Simon,
>>
>> On Sun, Jan 4, 2015 at 10:33 AM, Simon Glass <sjg at chromium.org> wrote:
>>> Hi Bin,
>>>
>>> On 3 January 2015 at 07:40, Bin Meng <bmeng.cn at gmail.com> wrote:
>>>> cros_ec_board_init() should be called only when CONFIG_CROS_EC is
>>>> enabled. Also undef CONFIG_CROS_EC in the coreboot configuration.
>>>>
>>>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>>>>
>>>> ---
>>>>
>>>>  board/coreboot/coreboot/coreboot.c | 2 ++
>>>>  include/configs/coreboot.h         | 4 +++-
>>>>  2 files changed, 5 insertions(+), 1 deletion(-)
>>>
>>> Can we just remove the node in the device tree? The current 'coreboot'
>>> config is designed to run on link (Chromebook Pixel) so it does have
>>> an EC. Maybe we should have a separate device tree file for the qemu
>>> version?
>>>
>>
>> Looks that removing ec node from dts should work with current code
>> logic in cros_ec_init(). Yes, we can have a separate device tree file
>> for maybe a generic board (not naming it as qemu.dts), and make this
>> generic board dts file as the default dts for coreboot board? How
>> about the defines in coreboot.h? Should we make it undefined like I
>> did in this patch?
>
> That sounds good, but I would prefer to use the same board config file
> if possible, perhaps just changing the CONFIG_DEFAULT_DEVICE_TREE?

Yes, just changing the CONFIG_DEFAULT_DEVICE_TREE to the same board
dts file, say for example, I can change CONFIG_DEFAULT_DEVICE_TREE to
use crownbay.dts to build a U-Boot to be loaded by coreboot. The two
question remain: which board dts file should be used as the default
one in coreboot-x86_defconfig file? And how about those CROS_EX
defines in coreboot.h? Right now we have SYS_CONFIG_NAME but it is not
a visible Kconfig option so we cannot change it. Ideally we should
just change CONFIG_DEFAULT_DEVICE_TREE and SYS_CONFIG_NAME to allow
the U-Boot for coreboot to run on different boards.

Regards,
Bin


More information about the U-Boot mailing list