Carl-Daniel Hailfinger wrote:
- printk(BIOS_INFO, "Mainboard MAHOGANY Enable. dev=0x%p\n", dev);
- printk(BIOS_INFO, "Mainboard Kino Enable. dev=0x%p\n", dev);
..
struct chip_operations mainboard_ops = {
- CHIP_NAME("AMD MAHOGANY Mainboard")
- .enable_dev = mahogany_enable,
- CHIP_NAME("IEI Kino-780AM2 Mainboard")
- .enable_dev = kino_enable,
};
Could the mainboard enable function reuse the CHIP_NAME somehow, or maybe both should just use CONFIG_MAINBOARD_PART_NUMBER ?
I once had such a patch, but I think it was rejected for two reasons:
- grepping is more difficult because you have to match in two stages
Maybe make more use of __func__ then.
- building multi-mainboard images means CONFIG_MAINBOARD_PART_NUMBER
is not really meaningful.
Maybe it should be set by the build system per mainboard?
I think we still some time left before multiboard images, but I also think that the current coreboot infrastructure is a really great starting point for it.
I guess it will use the same scheme as fallback at least initially, with some method added for determining the current board, that means building one image per board anyway.
//Peter