From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 17/19] ARM pcm038: use add_mem_device helper
Date: Tue, 19 Jul 2011 10:40:01 +0200 [thread overview]
Message-ID: <1311064803-6305-18-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1311064803-6305-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/pcm038/pcm038.c | 34 +++++-----------------------------
1 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 3ca6650..6cb96f1 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -34,6 +34,7 @@
#include <fcntl.h>
#include <nand.h>
#include <command.h>
+#include <sizes.h>
#include <spi/spi.h>
#include <asm/io.h>
#include <mach/imx-nand.h>
@@ -54,32 +55,6 @@ static struct device_d cfi_dev = {
.size = 32 * 1024 * 1024,
};
-static struct memory_platform_data ram_pdata = {
- .name = "ram0",
- .flags = DEVFS_RDWR,
-};
-
-static struct device_d sdram_dev = {
- .id = -1,
- .name = "mem",
- .map_base = 0xa0000000,
- .size = 128 * 1024 * 1024,
- .platform_data = &ram_pdata,
-};
-
-static struct memory_platform_data sram_pdata = {
- .name = "sram0",
- .flags = DEVFS_RDWR,
-};
-
-static struct device_d sram_dev = {
- .id = -1,
- .name = "mem",
- .map_base = 0xc8000000,
- .size = 512 * 1024, /* Can be up to 2MiB */
- .platform_data = &sram_pdata,
-};
-
static struct fec_platform_data fec_info = {
.xcv_type = MII100,
.phy_addr = 1,
@@ -191,6 +166,7 @@ static int pcm038_devices_init(void)
{
int i;
char *envdev;
+ struct device_d *sdramdev;
unsigned int mode[] = {
PD0_AIN_FEC_TXD0,
@@ -294,8 +270,8 @@ static int pcm038_devices_init(void)
register_device(&cfi_dev);
imx27_add_nand(&nand_info);
- register_device(&sdram_dev);
- register_device(&sram_dev);
+ sdramdev = add_mem_device("ram0", 0xa0000000, SZ_128M, DEVFS_RDWR);
+ add_mem_device("sram0", 0xc8000000, SZ_512K, DEVFS_RDWR);
imx27_add_fb(&pcm038_fb_data);
#ifdef CONFIG_USB
@@ -330,7 +306,7 @@ static int pcm038_devices_init(void)
printf("Using environment in %s Flash\n", envdev);
- armlinux_add_dram(&sdram_dev);
+ armlinux_add_dram(sdramdev);
armlinux_set_bootparams((void *)0xa0000100);
armlinux_set_architecture(MACH_TYPE_PCM038);
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-07-19 8:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 8:39 [PATCH] resources work Sascha Hauer
2011-07-19 8:39 ` [PATCH 01/19] register_device: Add IORESOURCE_MEM flag Sascha Hauer
2011-07-19 8:39 ` [PATCH 02/19] device: Add a dev_request_mem_region function Sascha Hauer
2011-07-19 10:11 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 10:58 ` Sascha Hauer
2011-07-19 8:39 ` [PATCH 03/19] add a add_mem_device function Sascha Hauer
2011-07-19 10:13 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 11:00 ` Sascha Hauer
2011-07-19 13:06 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 8:39 ` [PATCH 04/19] generic memmap: use resources Sascha Hauer
2011-07-19 8:39 ` [PATCH 05/19] mem_read/write: " Sascha Hauer
2011-07-19 10:14 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 8:39 ` [PATCH 06/19] nand i.MX: convert to struct resource Sascha Hauer
2011-07-19 8:39 ` [PATCH 07/19] video " Sascha Hauer
2011-07-19 8:39 ` [PATCH 08/19] serial " Sascha Hauer
2011-07-19 8:39 ` [PATCH 09/19] i2c " Sascha Hauer
2011-07-19 8:39 ` [PATCH 10/19] mci " Sascha Hauer
2011-07-19 8:39 ` [PATCH 11/19] net i.MX fec: " Sascha Hauer
2011-07-19 8:39 ` [PATCH 12/19] mci i.MX esdhc: " Sascha Hauer
2011-07-19 8:39 ` [PATCH 13/19] spi i.MX: " Sascha Hauer
2011-07-19 8:39 ` [PATCH 14/19] video i.MX ipu: " Sascha Hauer
2011-07-19 8:39 ` [PATCH 15/19] i.MX devices: " Sascha Hauer
2011-07-19 8:40 ` [PATCH 16/19] cfi: " Sascha Hauer
2011-07-19 8:40 ` Sascha Hauer [this message]
2011-07-19 8:40 ` [PATCH 18/19] ARM pcm037: use add_mem_device helper Sascha Hauer
2011-07-19 8:40 ` [PATCH 19/19] ARM i.MX51 babbage: " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311064803-6305-18-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox