mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 08/10] nomadik: switch to all resource declaration to "struct resource"
Date: Mon, 18 Jul 2011 14:54:36 +0200	[thread overview]
Message-ID: <1310993678-7563-8-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1310993678-7563-1-git-send-email-plagnioj@jcrosoft.com>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/nhk8815/setup.c |   11 +++++++++--
 arch/arm/mach-nomadik/8815.c    |   33 +++++++++++++++++++++++++++------
 2 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boards/nhk8815/setup.c b/arch/arm/boards/nhk8815/setup.c
index 9cb0fd0..3d08516 100644
--- a/arch/arm/boards/nhk8815/setup.c
+++ b/arch/arm/boards/nhk8815/setup.c
@@ -33,11 +33,18 @@
 #include <mach/nand.h>
 #include <mach/fsmc.h>
 
+static struct resource nhk8815_network_resources[] = {
+	[0] = {
+		.start	= 0x34000300,
+		.size	= 16,
+	},
+};
+
 static struct device_d nhk8815_network_dev = {
 	.id = -1,
 	.name = "smc91c111",
-	.map_base = 0x34000300,
-	.size = 16,
+	.num_resources	= ARRAY_SIZE(nhk8815_network_resources),
+	.resource	= nhk8815_network_resources,
 };
 
 static int nhk8815_nand_init(void)
diff --git a/arch/arm/mach-nomadik/8815.c b/arch/arm/mach-nomadik/8815.c
index 5844c68..3969193 100644
--- a/arch/arm/mach-nomadik/8815.c
+++ b/arch/arm/mach-nomadik/8815.c
@@ -36,32 +36,53 @@ static struct memory_platform_data ram_pdata = {
 	.flags = DEVFS_RDWR,
 };
 
+static struct resource sdram_dev_resources[] = {
+	[0] = {
+		.start	= 0x00000000,
+	},
+};
+
 static struct device_d sdram_dev = {
 	.id = -1,
 	.name = "mem",
-	.map_base = 0x00000000,
+	.num_resources	= ARRAY_SIZE(sdram_dev_resources),
+	.resource	= sdram_dev_resources,
 	.platform_data = &ram_pdata,
 };
 
 void st8815_add_device_sdram(u32 size)
 {
-	sdram_dev.size = size;
+	sdram_dev_resources[0].size = size;
 	register_device(&sdram_dev);
 	armlinux_add_dram(&sdram_dev);
 }
 
+static struct resource uart0_serial_resources[] = {
+	[0] = {
+		.start	= NOMADIK_UART0_BASE,
+		.size	= 4096,
+	},
+};
+
 static struct device_d uart0_serial_device = {
 	.id = 0,
 	.name = "uart-pl011",
-	.map_base = NOMADIK_UART0_BASE,
-	.size = 4096,
+	.num_resources	= ARRAY_SIZE(uart0_serial_resources),
+	.resource	= uart0_serial_resources,
+};
+
+static struct resource uart1_serial_resources[] = {
+	[0] = {
+		.start	= NOMADIK_UART1_BASE,
+		.size	= 4096,
+	},
 };
 
 static struct device_d uart1_serial_device = {
 	.id = 1,
 	.name = "uart-pl011",
-	.map_base = NOMADIK_UART1_BASE,
-	.size = 4096,
+	.num_resources	= ARRAY_SIZE(uart1_serial_resources),
+	.resource	= uart1_serial_resources,
 };
 
 void st8815_register_uart(unsigned id)
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2011-07-18 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 12:54 [PATCH 01/10 v2] device: introduce resource structure to simplify resource declaration Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` [PATCH 02/10] at91: switch to all resource declaration to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` [PATCH 03/10] at91/serial: switch " Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` [PATCH 04/10] macb: " Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` [PATCH 05/10] atmel_mci: " Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` [PATCH 06/10] atmel_nand: " Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` [PATCH 07/10 v2] dm9200: use "struct resource" instead of platform_data Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-07-18 12:54 ` [PATCH 09/10] nomadik_nand: " Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 12:54 ` [PATCH 10/10] amba-pl011: switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 20:48 ` [PATCH 01/10 v2] device: introduce resource structure to simplify resource declaration 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=1310993678-7563-8-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --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