diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2010-09-17 17:11:57 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-09-20 08:58:52 +0200 |
commit | e85c6bb0a7d20e74ec47970647ae696df92d4c24 (patch) | |
tree | d306396d46d790426767170e571b7af9d0e0cfff /arch/m68k | |
parent | 6a0ce693bef3a133c57706222966bccfd79148df (diff) | |
download | barebox-e85c6bb0a7d20e74ec47970647ae696df92d4c24.tar.gz barebox-e85c6bb0a7d20e74ec47970647ae696df92d4c24.tar.xz |
driver: use id as -1 for auto assigned id
before if you specify id = 0 the next available id will be taken
otherwise fail if already registered now as in linux we use -1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/boards/kp_ukd_r1_num/kp_ukd_r1_num.c | 7 | ||||
-rw-r--r-- | arch/m68k/boards/phycore_mcf54xx/phyCore_MCF54xx.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/m68k/boards/kp_ukd_r1_num/kp_ukd_r1_num.c b/arch/m68k/boards/kp_ukd_r1_num/kp_ukd_r1_num.c index 9bf1713cc4..7475ab326b 100644 --- a/arch/m68k/boards/kp_ukd_r1_num/kp_ukd_r1_num.c +++ b/arch/m68k/boards/kp_ukd_r1_num/kp_ukd_r1_num.c @@ -42,6 +42,7 @@ ulong mcfv4e_get_bus_clk(void) * CS line 0, data width is 32 bit */ static struct device_d cfi_dev = { + .id = -1, .name = "cfi_flash", .map_base = CFG_FLASH_ADDRESS, .size = CFG_FLASH_SIZE, @@ -52,6 +53,7 @@ static struct device_d cfi_dev = { * to CS4, data width is 16 bit */ //static struct device_d sram_dev = { +// .id = -1, // .name = "sram", //FIXME .map_base = IMX_CS4_BASE, //FIXME .size = IMX_CS4_RANGE, /* area size */ @@ -61,6 +63,7 @@ static struct device_d cfi_dev = { * ?MiB NAND type flash, data width 8 bit */ //static struct device_d nand_dev = { +// .id = -1, // .name = "cfi_flash_nand", // .map_base = 0xfc000000, /* FIXME */ // .size = 32 * 1024 * 1024, /* FIXME */ @@ -75,12 +78,14 @@ static struct fec_platform_data fec_info = { }; static struct device_d network_dev0 = { + .id = -1, .name = "fec_mcf54xx", .map_base = MCF_FEC_ADDR(0), .size = MCF_FEC_SIZE(0), /* area size */ .platform_data = &fec_info, }; static struct device_d network_dev1 = { + .id = -1, .name = "fec_mcf54xx", .map_base = MCF_FEC_ADDR(1), .size = MCF_FEC_SIZE(1), /* area size */ @@ -96,6 +101,7 @@ static struct memory_platform_data ram_pdata = { }; static struct device_d sdram_dev = { + .id = -1, .name = "mem", .map_base = CFG_SDRAM_ADDRESS, .size = CFG_SDRAM_SIZE, @@ -134,6 +140,7 @@ static int mcfv4e_devices_init(void) device_initcall(mcfv4e_devices_init); static struct device_d mcfv4e_serial_device = { + .id = -1, .name = "mcfv4e_serial", .map_base = 1+CFG_EARLY_UART_PORT, .size = 16 * 1024, diff --git a/arch/m68k/boards/phycore_mcf54xx/phyCore_MCF54xx.c b/arch/m68k/boards/phycore_mcf54xx/phyCore_MCF54xx.c index 3bc2d12a42..3744950699 100644 --- a/arch/m68k/boards/phycore_mcf54xx/phyCore_MCF54xx.c +++ b/arch/m68k/boards/phycore_mcf54xx/phyCore_MCF54xx.c @@ -46,6 +46,7 @@ ulong mcfv4e_get_bus_clk(void) */ static struct device_d cfi_dev = { + .id = -1, .name = "cfi_flash", .map_base = CFG_FLASH_ADDRESS, .size = CFG_FLASH_SIZE, @@ -61,6 +62,7 @@ static struct fec_platform_data fec_info = static struct device_d network_dev0 = { + .id = -1, .name = "fec_mcf54xx", .map_base = MCF_FEC_ADDR(0), .size = MCF_FEC_SIZE(0), /* area size */ @@ -68,6 +70,7 @@ static struct device_d network_dev0 = }; static struct device_d network_dev1 = { + .id = -1, .name = "fec_mcf54xx", .map_base = MCF_FEC_ADDR(1), .size = MCF_FEC_SIZE(1), /* area size */ @@ -84,6 +87,7 @@ static struct memory_platform_data ram_pdata = { static struct device_d sdram_dev = { + .id = -1, .name = "mem", .map_base = CFG_SDRAM_ADDRESS, .size = CFG_SDRAM_SIZE, @@ -116,6 +120,7 @@ device_initcall(mcfv4e_devices_init); static struct device_d mcfv4e_serial_device = { + .id = -1, .name = "mcfv4e_serial", .map_base = 1 + CFG_EARLY_UART_PORT, .size = 16 * 1024, |