mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/8] ARM i.MX cupid: use device registration helpers
Date: Thu, 28 Jul 2011 10:00:56 +0200	[thread overview]
Message-ID: <1311840062-11446-3-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/guf-cupid/board.c |   46 +++++-------------------------------
 1 files changed, 7 insertions(+), 39 deletions(-)

diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c
index 313e280..6906f0a 100644
--- a/arch/arm/boards/guf-cupid/board.c
+++ b/arch/arm/boards/guf-cupid/board.c
@@ -43,31 +43,18 @@
 #include <mach/imx-ipu-fb.h>
 #include <mach/imx-pll.h>
 #include <mach/iomux-mx35.h>
+#include <mach/devices-imx35.h>
 
 static struct fec_platform_data fec_info = {
 	.xcv_type = MII100,
 };
 
-static struct device_d fec_dev = {
-	.id	  = -1,
-	.name     = "fec_imx",
-	.map_base = IMX_FEC_BASE,
-	.platform_data	= &fec_info,
-};
-
 struct imx_nand_platform_data nand_info = {
 	.width	= 1,
 	.hw_ecc	= 1,
 	.flash_bbt = 1,
 };
 
-static struct device_d nand_dev = {
-	.id	  = -1,
-	.name     = "imx_nand",
-	.map_base = IMX_NFC_BASE,
-	.platform_data	= &nand_info,
-};
-
 static struct fb_videomode guf_cupid_fb_mode = {
 	/* 800x480 @ 70 Hz */
 	.name		= "CPT CLAA070LC0JCT",
@@ -109,19 +96,6 @@ static struct imx_ipu_fb_platform_data ipu_fb_data = {
 	.enable		= cupid_fb_enable,
 };
 
-static struct device_d imx_ipu_fb_dev = {
-	.id		= -1,
-	.name		= "imx-ipu-fb",
-	.map_base	= 0x53fc0000,
-	.size		= 0x1000,
-	.platform_data	= &ipu_fb_data,
-};
-
-static struct device_d esdhc_dev = {
-	.name		= "imx-esdhc",
-	.map_base	= IMX_SDHC1_BASE,
-};
-
 #ifdef CONFIG_MMU
 static int cupid_mmu_init(void)
 {
@@ -157,8 +131,8 @@ static int cupid_devices_init(void)
 	else
 		nand_info.width = 1;    /* 8 bit */
 
-	register_device(&fec_dev);
-	register_device(&nand_dev);
+	imx35_add_fec(&fec_info);
+	imx35_add_nand(&nand_info);
 
 	devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
@@ -168,8 +142,8 @@ static int cupid_devices_init(void)
 	sdram_dev = add_mem_device("ram0", IMX_SDRAM_CS0, 128 * 1024 * 1024,
 				   IORESOURCE_MEM_WRITEABLE);
 	armlinux_add_dram(sdram_dev);
-	register_device(&imx_ipu_fb_dev);
-	register_device(&esdhc_dev);
+	imx35_add_fb(&ipu_fb_data);
+	imx35_add_mmc0(NULL);
 
 	armlinux_set_bootparams((void *)0x80000100);
 	armlinux_set_architecture(MACH_TYPE_GUF_CUPID);
@@ -179,13 +153,6 @@ static int cupid_devices_init(void)
 
 device_initcall(cupid_devices_init);
 
-static struct device_d cupid_serial_device = {
-	.id	  = -1,
-	.name     = "imx_serial",
-	.map_base = IMX_UART1_BASE,
-	.size     = 16 * 1024,
-};
-
 static struct pad_desc cupid_pads[] = {
 	/* UART1 */
 	MX35_PAD_CTS1__UART1_CTS,
@@ -278,7 +245,8 @@ static int cupid_console_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(cupid_pads, ARRAY_SIZE(cupid_pads));
 
-	register_device(&cupid_serial_device);
+	imx35_add_uart0();
+
 	return 0;
 }
 
-- 
1.7.5.4


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

  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 ` Sascha Hauer [this message]
2011-07-28  8:00 ` [PATCH 3/8] ARM i.MX pca100: use device registration helpers 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 ` [PATCH 7/8] ARM i.MX pcm037: " Sascha Hauer
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-3-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