summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-23 06:57:31 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-29 14:05:24 +0800
commit715b4e7ae39f2b8d70b53a68fcdbcdb39c1a1a7e (patch)
tree45c81de62f1c23f903863820196e987d57d81d0c /arch/arm
parentee80cbcd61fdad8b6b75be23b8417dc1dc188d59 (diff)
downloadbarebox-715b4e7ae39f2b8d70b53a68fcdbcdb39c1a1a7e.tar.gz
barebox-715b4e7ae39f2b8d70b53a68fcdbcdb39c1a1a7e.tar.xz
omap: switch to add_generic_device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boards/omap/board-beagle.c19
-rw-r--r--arch/arm/boards/omap/board-sdp343x.c1
-rw-r--r--arch/arm/boards/panda/board.c10
-rw-r--r--arch/arm/boards/pcm049/board.c20
-rw-r--r--arch/arm/mach-omap/devices-gpmc-nand.c15
5 files changed, 15 insertions, 50 deletions
diff --git a/arch/arm/boards/omap/board-beagle.c b/arch/arm/boards/omap/board-beagle.c
index dcf2d72a90..899c34b3ef 100644
--- a/arch/arm/boards/omap/board-beagle.c
+++ b/arch/arm/boards/omap/board-beagle.c
@@ -274,25 +274,12 @@ static struct ehci_platform_data ehci_pdata = {
};
#endif /* CONFIG_USB_EHCI_OMAP */
-static struct device_d i2c_dev = {
- .id = -1,
- .name = "i2c-omap",
- .map_base = OMAP_I2C1_BASE,
-};
-
static struct i2c_board_info i2c_devices[] = {
{
I2C_BOARD_INFO("twl4030", 0x48),
},
};
-static struct device_d hsmmc_dev = {
- .id = -1,
- .name = "omap-hsmmc",
- .map_base = 0x4809C000,
- .size = SZ_4K,
-};
-
static int beagle_devices_init(void)
{
struct device_d *sdram_dev;
@@ -304,7 +291,8 @@ static int beagle_devices_init(void)
armlinux_add_dram(sdram_dev);
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
- register_device(&i2c_dev);
+ add_generic_device("i2c-omap", -1, NULL, 0x4809C000, SZ_4K,
+ IORESOURCE_MEM, NULL);
#ifdef CONFIG_USB_EHCI_OMAP
if (ehci_omap_init(&omap_ehci_pdata) >= 0)
@@ -317,7 +305,8 @@ static int beagle_devices_init(void)
#endif
gpmc_generic_nand_devices_init(0, 16, OMAP_ECC_HAMMING_CODE_HW_ROMCODE);
- register_device(&hsmmc_dev);
+ add_generic_device("omap-hsmmc", -1, NULL, OMAP_I2C1_BASE, 0,
+ IORESOURCE_MEM, NULL);
armlinux_set_bootparams((void *)0x80000100);
armlinux_set_architecture(MACH_TYPE_OMAP3_BEAGLE);
diff --git a/arch/arm/boards/omap/board-sdp343x.c b/arch/arm/boards/omap/board-sdp343x.c
index 8e8d952ec7..010fbd71f2 100644
--- a/arch/arm/boards/omap/board-sdp343x.c
+++ b/arch/arm/boards/omap/board-sdp343x.c
@@ -641,7 +641,6 @@ static int sdp3430_flash_init(void)
static int sdp3430_devices_init(void)
{
struct device_d *sdram_dev;
- int ret;
sdram_dev = add_mem_device("ram0", 0x80000000, 128 * 1024 * 1024,
IORESOURCE_MEM_WRITEABLE);
diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index de43ca5b8b..4c9d8ee114 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -113,13 +113,6 @@ static void __init panda_boardrev_init(void)
pr_info("PandaBoard Revision: %03d\n", board_revision);
}
-static struct device_d hsmmc_dev = {
- .id = -1,
- .name = "omap-hsmmc",
- .map_base = 0x4809C100,
- .size = SZ_4K,
-};
-
static int panda_devices_init(void)
{
struct device_d *sdram_dev;
@@ -153,7 +146,8 @@ static int panda_devices_init(void)
sdram_dev = add_mem_device("ram0", 0x80000000, SZ_1G,
IORESOURCE_MEM_WRITEABLE);
armlinux_add_dram(sdram_dev);
- register_device(&hsmmc_dev);
+ add_generic_device("omap-hsmmc", -1, NULL, 0x4809C100, SZ_4K,
+ IORESOURCE_MEM, NULL);
panda_ehci_init();
armlinux_set_bootparams((void *)0x80000100);
diff --git a/arch/arm/boards/pcm049/board.c b/arch/arm/boards/pcm049/board.c
index 7eae2cf4f0..ec0d0b8ea5 100644
--- a/arch/arm/boards/pcm049/board.c
+++ b/arch/arm/boards/pcm049/board.c
@@ -73,20 +73,6 @@ static int pcm049_mmu_init(void)
device_initcall(pcm049_mmu_init);
#endif
-static struct device_d hsmmc_dev = {
- .id = -1,
- .name = "omap-hsmmc",
- .map_base = 0x4809C100,
- .size = SZ_4K,
-};
-
-static struct device_d smc911x_dev = {
- .id = -1,
- .name = "smc911x",
- .map_base = 0x2C000000,
- .size = 0x4000,
-};
-
static struct gpmc_config net_cfg = {
.cfg = {
0x00001000, /* CONF1 */
@@ -104,7 +90,8 @@ static void pcm049_network_init(void)
{
gpmc_cs_config(5, &net_cfg);
- register_device(&smc911x_dev);
+ add_generic_device("smc911x", -1, NULL, 0x2C000000, 0x4000,
+ IORESOURCE_MEM, NULL);
}
static int pcm049_devices_init(void)
@@ -116,7 +103,8 @@ static int pcm049_devices_init(void)
armlinux_add_dram(sdram_dev);
add_mem_device("ram0", 0x40300000, 48 * 1024,
IORESOURCE_MEM_WRITEABLE);
- register_device(&hsmmc_dev);
+ add_generic_device("omap-hsmmc", -1, NULL, 0x4809C100, SZ_4K,
+ IORESOURCE_MEM, NULL);
gpmc_generic_init(0x10);
diff --git a/arch/arm/mach-omap/devices-gpmc-nand.c b/arch/arm/mach-omap/devices-gpmc-nand.c
index c2a2b0d1b5..76ceb20024 100644
--- a/arch/arm/mach-omap/devices-gpmc-nand.c
+++ b/arch/arm/mach-omap/devices-gpmc-nand.c
@@ -70,15 +70,6 @@ static struct gpmc_nand_platform_data nand_plat = {
.priv = (void *)&nand_cfg,
};
-/** NAND device definition */
-static struct device_d gpmc_generic_nand_nand_device = {
- .id = -1,
- .name = "gpmc_nand",
- .map_base = OMAP_GPMC_BASE,
- .size = 1024 * 4, /* GPMC size */
- .platform_data = (void *)&nand_plat,
-};
-
/**
* @brief gpmc_generic_nand_devices_init - init generic nand device
*
@@ -99,5 +90,9 @@ int gpmc_generic_nand_devices_init(int cs, int width,
/* Configure GPMC CS before register */
gpmc_cs_config(nand_plat.cs, &nand_cfg);
- return register_device(&gpmc_generic_nand_nand_device);
+
+ add_generic_device("gpmc_nand", -1, NULL, OMAP_GPMC_BASE, 1024 * 4,
+ IORESOURCE_MEM, &nand_plat);
+
+ return 0;
}