From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 7/8] ARM i.MX pcm037: use device registration helpers
Date: Thu, 28 Jul 2011 10:01:01 +0200 [thread overview]
Message-ID: <1311840062-11446-8-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1311840062-11446-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/pcm037/pcm037.c | 21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boards/pcm037/pcm037.c b/arch/arm/boards/pcm037/pcm037.c
index af4ad8b..839138d 100644
--- a/arch/arm/boards/pcm037/pcm037.c
+++ b/arch/arm/boards/pcm037/pcm037.c
@@ -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
@@ -224,7 +212,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);
--
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-28 8:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 8:00 switch more devices to use resources Sascha Hauer
2011-07-28 8:00 ` [PATCH 1/8] ARM i.MX: add helper for usb device registration Sascha Hauer
2011-07-28 8:00 ` [PATCH 2/8] ARM i.MX cupid: use device registration helpers Sascha Hauer
2011-07-28 8:00 ` [PATCH 3/8] ARM i.MX pca100: " Sascha Hauer
2011-07-28 8:00 ` [PATCH 4/8] ARM i.MX scb9328: create uart registration helpers and use them Sascha Hauer
2011-07-28 8:00 ` [PATCH 5/8] ARM i.MX35 3stack: use device registration helpers Sascha Hauer
2011-07-28 8:01 ` [PATCH 6/8] ARM i.MX21ads : " Sascha Hauer
2011-07-28 8:01 ` Sascha Hauer [this message]
2011-07-28 8:01 ` [PATCH 8/8] add a ns16550 registration helper and use it Sascha Hauer
2011-07-28 8:28 ` 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=1311840062-11446-8-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