diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-19 09:58:32 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-18 20:32:45 +0800 |
commit | f928efa818adfe56a08350569a9b0f3c2fb791d2 (patch) | |
tree | 4fc754655afbd235d466a5c9d7a63ce89faed24b /arch/blackfin | |
parent | 88618eb5f12c27be7bb4400eb13768e4c2822ae7 (diff) | |
download | barebox-f928efa818adfe56a08350569a9b0f3c2fb791d2.tar.gz barebox-f928efa818adfe56a08350569a9b0f3c2fb791d2.tar.xz |
add a add_mem_device function
Add a helper function for boards to register their memory
devices. This makes the board code smaller and also helps
getting rid of map_base and struct memory_platform_data.
And switch all of the memory to it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/boards/ipe337/ipe337.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/blackfin/boards/ipe337/ipe337.c b/arch/blackfin/boards/ipe337/ipe337.c index 6953d08cd3..81a6a6fa09 100644 --- a/arch/blackfin/boards/ipe337/ipe337.c +++ b/arch/blackfin/boards/ipe337/ipe337.c @@ -12,19 +12,6 @@ static struct device_d cfi_dev = { .size = 32 * 1024 * 1024, }; -static struct memory_platform_data ram_pdata = { - .name = "ram0", - .flags = IORESOURCE_MEM_WRITEABLE, -}; - -static struct device_d sdram_dev = { - .id = -1, - .name = "mem", - .map_base = 0x0, - .size = 128 * 1024 * 1024, - .platform_data = &ram_pdata, -}; - static struct device_d smc911x_dev = { .id = -1, .name = "smc911x", @@ -34,7 +21,8 @@ static struct device_d smc911x_dev = { static int ipe337_devices_init(void) { register_device(&cfi_dev); - register_device(&sdram_dev); + add_mem_device("ram0", 0x0, 128 * 1024 * 1024, + IORESOURCE_MEM_WRITEABLE); /* Reset smc911x */ *pFIO0_DIR = (1<<12); |