summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260_devices.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-09-17 17:11:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-09-20 08:58:52 +0200
commite85c6bb0a7d20e74ec47970647ae696df92d4c24 (patch)
treed306396d46d790426767170e571b7af9d0e0cfff /arch/arm/mach-at91/at91sam9260_devices.c
parent6a0ce693bef3a133c57706222966bccfd79148df (diff)
downloadbarebox-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/arm/mach-at91/at91sam9260_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 398a721bf2..c6ddb13b54 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -26,6 +26,7 @@ static struct memory_platform_data sram_pdata = {
};
static struct device_d sdram_dev = {
+ .id = -1,
.name = "mem",
.map_base = AT91_CHIPSELECT_1,
.platform_data = &sram_pdata,
@@ -40,6 +41,7 @@ void at91_add_device_sdram(u32 size)
#if defined(CONFIG_DRIVER_NET_MACB)
static struct device_d macb_dev = {
+ .id = -1,
.name = "macb",
.map_base = AT91SAM9260_BASE_EMAC,
.size = 0x1000,
@@ -82,6 +84,7 @@ void at91_add_device_eth(struct at91_ether_platform_data *data) {}
#if defined(CONFIG_NAND_ATMEL)
static struct device_d nand_dev = {
+ .id = -1,
.name = "atmel_nand",
.map_base = AT91_CHIPSELECT_3,
.size = 0x10,
@@ -117,6 +120,7 @@ void at91_add_device_nand(struct atmel_nand_data *data) {}
#endif
static struct device_d dbgu_serial_device = {
+ .id = -1,
.name = "atmel_serial",
.map_base = AT91_BASE_SYS + AT91_DBGU,
.size = 4096,
@@ -129,6 +133,7 @@ static inline void configure_dbgu_pins(void)
}
static struct device_d uart0_serial_device = {
+ .id = -1,
.name = "atmel_serial",
.map_base = AT91SAM9260_BASE_US0,
.size = 4096,
@@ -154,6 +159,7 @@ static inline void configure_usart0_pins(unsigned pins)
}
static struct device_d uart1_serial_device = {
+ .id = -1,
.name = "atmel_serial",
.map_base = AT91SAM9260_BASE_US1,
.size = 4096,
@@ -171,6 +177,7 @@ static inline void configure_usart1_pins(unsigned pins)
}
static struct device_d uart2_serial_device = {
+ .id = -1,
.name = "atmel_serial",
.map_base = AT91SAM9260_BASE_US2,
.size = 4096,
@@ -188,6 +195,7 @@ static inline void configure_usart2_pins(unsigned pins)
}
static struct device_d uart3_serial_device = {
+ .id = -1,
.name = "atmel_serial",
.map_base = AT91SAM9260_BASE_US3,
.size = 4096,
@@ -205,6 +213,7 @@ static inline void configure_usart3_pins(unsigned pins)
}
static struct device_d uart4_serial_device = {
+ .id = -1,
.name = "atmel_serial",
.map_base = AT91SAM9260_BASE_US4,
.size = 4096,
@@ -217,6 +226,7 @@ static inline void configure_usart4_pins(void)
}
static struct device_d uart5_serial_device = {
+ .id = -1,
.name = "atmel_serial",
.map_base = AT91SAM9260_BASE_US5,
.size = 4096,