[Maverick] [PATCH] UBUNTU - ARM: Using gpmc function to init nand flash

Mathieu Poirier mathieu.poirier at canonical.com
Thu Aug 12 17:41:07 UTC 2010


>From e33a4759b6afe2ce66445c66abadd89cf772fa96 Mon Sep 17 00:00:00 2001
From: Mathieu J. Poirier <mathieu.poirier at canonical.com>
Date: Thu, 12 Aug 2010 13:12:27 -0400
Subject: [PATCH] UBUNTU - ARM: Using gpmc function to init nand flash.

The General Purpose Memory Controller (gpmc) initialization was
decoupled from flash init but the changes were not reflected
in omap3beagle_flash_init.

This is the board specific portion of patch:
f450d86790ebf72ac93c7ea5addd6fa278aae64c

This patch is supposed to be part of 2.6.36 but only a subset is
used to avoid dealing with the substantial amount of gpmc changes
that will go in.  These changes should be brought in when we
rebase to 2.6.36.

BugLink: https://bugs.launchpad.net/bugs/608266

Signed-off-by: Mathieu Poirier <mathieu.poirier at canonical.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   16 +---------------
 1 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7a1b351..c3e8849 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -93,20 +93,6 @@ static struct omap_nand_platform_data omap3beagle_nand_data = {
 	.dev_ready	= NULL,
 };
 
-static struct resource omap3beagle_nand_resource = {
-	.flags		= IORESOURCE_MEM,
-};
-
-static struct platform_device omap3beagle_nand_device = {
-	.name		= "omap2-nand",
-	.id		= -1,
-	.dev		= {
-		.platform_data	= &omap3beagle_nand_data,
-	},
-	.num_resources	= 1,
-	.resource	= &omap3beagle_nand_resource,
-};
-
 /* DSS */
 
 static int beagle_enable_dvi(struct omap_dss_device *dssdev)
@@ -468,7 +454,7 @@ static void __init omap3beagle_flash_init(void)
 		omap3beagle_nand_data.gpmc_baseaddr = (void *) (gpmc_base_add);
 
 		printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
-		if (platform_device_register(&omap3beagle_nand_device) < 0)
+		if (gpmc_nand_init(&omap3beagle_nand_data) < 0)
 			printk(KERN_ERR "Unable to register NAND device\n");
 	}
 }
-- 
1.7.0.4







More information about the kernel-team mailing list