On Thu, Sep 24, 2009 at 12:52 AM, Stefan Reinauer <[email protected]>wrote:
Myles Watson wrote:
> Are there other differences?  Should I2C devices use objects, since
> you can't scan for them?

Some structures defined in the code are put in an extra section in the
binary for enumeration. Those are:

#define __console    __attribute__((used,
__section__(".rodata.console_drivers")))
#define __cpu_driver __attribute__((used,__section__(".rodata.cpu_driver")))
#define __pci_driver __attribute__((used,__section__(".rodata.pci_driver")))

All others don't need to be "drivers"

Stefan

---------------
Based on that, here's a patch that changes drivers that aren't console, pci,
or cpu, to obj.

The most common one was mainboard.c as a driver.

Boot tested with Tyan s2895.

Signed-off-by: Myles Watson <[email protected]>

Thanks,
Myles

PS.  It looks like the rtl8168 driver ought to go somewhere more general in
the tree.
Index: svn/src/mainboard/Makefile.romccboard.inc
===================================================================
--- svn.orig/src/mainboard/Makefile.romccboard.inc
+++ svn/src/mainboard/Makefile.romccboard.inc
@@ -37,7 +37,7 @@ ldscript-y += ../../../../src/cpu/x86/16
 ldscript-y += ../../../../src/arch/i386/lib/id.lds
 ldscript-y += ../../../../src/arch/i386/lib/failover.lds
 
-driver-y += mainboard.o
+obj-y += mainboard.o
 
 obj-$(CONFIG_HAVE_MP_TABLE) += mptable.o
 obj-$(CONFIG_HAVE_PIRQ_TABLE) += irq_tables.o
Index: svn/src/mainboard/amd/serengeti_cheetah/Makefile.inc
===================================================================
--- svn.orig/src/mainboard/amd/serengeti_cheetah/Makefile.inc
+++ svn/src/mainboard/amd/serengeti_cheetah/Makefile.inc
@@ -19,7 +19,7 @@
 ## MA 02110-1301 USA
 ##
 
-driver-y += mainboard.o
+obj-y += mainboard.o
 
 # Needed by irq_tables and mptable and acpi_tables.
 obj-y += get_bus_conf.o
@@ -33,7 +33,7 @@ obj-$(CONFIG_HAVE_ACPI_TABLES) += fadt.o
 obj-$(CONFIG_ACPI_SSDTX_NUM) += ssdt2.o
 obj-$(CONFIG_ACPI_SSDTX_NUM) += ssdt3.o
 obj-$(CONFIG_ACPI_SSDTX_NUM) += ssdt4.o
-driver-y += ../../../drivers/i2c/i2cmux/i2cmux.o
+obj-y += ../../../drivers/i2c/i2cmux/i2cmux.o
 
 # This is part of the conversion to init-obj and away from included code.
 
Index: svn/src/mainboard/kontron/986lcd-m/Makefile.inc
===================================================================
--- svn.orig/src/mainboard/kontron/986lcd-m/Makefile.inc
+++ svn/src/mainboard/kontron/986lcd-m/Makefile.inc
@@ -23,7 +23,7 @@
 ## This mainboard requires DCACHE_AS_RAM enabled. It won't work without.
 ##
 
-driver-y += mainboard.o
+obj-y += mainboard.o
 driver-y += rtl8168.o
 
 #obj-y += ../../../southbridge/intel/i82801gx/i82801gx_reset.c
Index: svn/src/mainboard/tyan/Makefile.s289x.inc
===================================================================
--- svn.orig/src/mainboard/tyan/Makefile.s289x.inc
+++ svn/src/mainboard/tyan/Makefile.s289x.inc
@@ -23,7 +23,7 @@
 ## This mainboard requires DCACHE_AS_RAM enabled. It won't work without.
 ##
 
-driver-y +=  mainboard.o
+obj-y +=  mainboard.o
 
 #needed by irq_tables and mptable and acpi_tables
 obj-y += get_bus_conf.o
@@ -32,8 +32,6 @@ obj-$(CONFIG_HAVE_PIRQ_TABLE) += irq_tab
 obj-$(CONFIG_HAVE_ACPI_TABLES) +=  dsdt.o
 obj-$(CONFIG_HAVE_ACPI_TABLES) +=  acpi_tables.o
 
-#driver-y += ../../../drivers/i2c/i2cmux/i2cmux.o
-
 # This is part of the conversion to init-obj and away from included code.
 
 initobj-y += crt0.o
Index: svn/src/mainboard/tyan/s2881/Makefile.inc
===================================================================
--- svn.orig/src/mainboard/tyan/s2881/Makefile.inc
+++ svn/src/mainboard/tyan/s2881/Makefile.inc
@@ -1,2 +1,2 @@
 include $(src)/mainboard/tyan/Makefile.s289x.inc
-driver-$(CONFIG_BOARD_TYAN_S2881) += ../../../drivers/i2c/adm1027/adm1027.o
+obj-$(CONFIG_BOARD_TYAN_S2881) += ../../../drivers/i2c/adm1027/adm1027.o
Index: svn/src/mainboard/tyan/s2892/Makefile.inc
===================================================================
--- svn.orig/src/mainboard/tyan/s2892/Makefile.inc
+++ svn/src/mainboard/tyan/s2892/Makefile.inc
@@ -1,3 +1,3 @@
 include $(src)/mainboard/tyan/Makefile.s289x.inc
 
-driver-y += ../../../drivers/i2c/adm1027/adm1027.o
+obj-y += ../../../drivers/i2c/adm1027/adm1027.o
Index: svn/src/mainboard/via/vt8454c/Makefile.inc
===================================================================
--- svn.orig/src/mainboard/via/vt8454c/Makefile.inc
+++ svn/src/mainboard/via/vt8454c/Makefile.inc
@@ -17,7 +17,7 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 ##
 
-driver-y += mainboard.o
+obj-y += mainboard.o
 
 obj-$(CONFIG_HAVE_MP_TABLE) += mptable.o
 obj-$(CONFIG_HAVE_PIRQ_TABLE) += irq_tables.o
Index: svn/src/mainboard/asus/m2v-mx_se/Makefile.inc
===================================================================
--- svn.orig/src/mainboard/asus/m2v-mx_se/Makefile.inc
+++ svn/src/mainboard/asus/m2v-mx_se/Makefile.inc
@@ -20,7 +20,7 @@
 ## MA 02110-1301 USA
 ##
 
-driver-y +=  mainboard.o
+obj-y +=  mainboard.o
 
 #needed by irq_tables and mptable and acpi_tables
 obj-$(CONFIG_HAVE_ACPI_TABLES) +=  dsdt.o
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to