9
0
Fork 0

ARM i.MX pcm037: use device registration helpers

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-07-28 09:26:07 +02:00
parent 5714eb6a84
commit ddf349e011
1 changed files with 8 additions and 13 deletions

View File

@ -39,18 +39,6 @@
#include <mach/imx-nand.h>
#include <mach/devices-imx31.h>
/*
* SMSC 9217 network controller
* connected to CS line 1 and interrupt line
* GPIO3, data width is 16 bit
*/
static struct device_d network_dev = {
.id = -1,
.name = "smc911x",
.map_base = IMX_CS1_BASE,
.size = IMX_CS1_RANGE, /* area size */
};
#if defined CONFIG_PCM037_SDRAM_BANK0_128MB
#define SDRAM0 128
#elif defined CONFIG_PCM037_SDRAM_BANK0_256MB
@ -238,7 +226,14 @@ static int imx31_devices_init(void)
add_mem_device("sram0", IMX_CS4_BASE, IMX_CS4_RANGE, /* area size */
IORESOURCE_MEM_WRITEABLE);
imx31_add_nand(&nand_info);
register_device(&network_dev);
/*
* SMSC 9217 network controller
* connected to CS line 1 and interrupt line
* GPIO3, data width is 16 bit
*/
add_generic_device("smc911x", -1, NULL, IMX_CS1_BASE, IMX_CS1_RANGE,
IORESOURCE_MEM, NULL);
sdram_dev = add_mem_device("ram0", IMX_SDRAM_CS1, SDRAM0 * 1024 * 1024,
IORESOURCE_MEM_WRITEABLE);