omap3 nand: fix issue in board file to detect nand
Board file modified for not to provide gpmc phys_base address to nand driver. The gpmc_nand_init funciton is now used to detect the nand and required to adopt _prob function as in nand/omap2.c Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
committed by
Tony Lindgren
parent
2c01946c6b
commit
f450d86790
@@ -59,9 +59,6 @@
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
|
||||
#define GPMC_CS0_BASE 0x60
|
||||
#define GPMC_CS_SIZE 0x30
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
|
||||
#define OMAP_DM9000_GPIO_IRQ 25
|
||||
@@ -105,20 +102,6 @@ static struct omap_nand_platform_data devkit8000_nand_data = {
|
||||
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
|
||||
};
|
||||
|
||||
static struct resource devkit8000_nand_resource = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device devkit8000_nand_device = {
|
||||
.name = "omap2-nand",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &devkit8000_nand_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &devkit8000_nand_resource,
|
||||
};
|
||||
|
||||
static struct omap2_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
@@ -591,8 +574,6 @@ static void __init devkit8000_flash_init(void)
|
||||
u8 cs = 0;
|
||||
u8 nandcs = GPMC_CS_NUM + 1;
|
||||
|
||||
u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
|
||||
|
||||
/* find out the chip-select on which NAND exists */
|
||||
while (cs < GPMC_CS_NUM) {
|
||||
u32 ret = 0;
|
||||
@@ -614,13 +595,9 @@ static void __init devkit8000_flash_init(void)
|
||||
|
||||
if (nandcs < GPMC_CS_NUM) {
|
||||
devkit8000_nand_data.cs = nandcs;
|
||||
devkit8000_nand_data.gpmc_cs_baseaddr = (void *)
|
||||
(gpmc_base_add + GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE);
|
||||
devkit8000_nand_data.gpmc_baseaddr = (void *)
|
||||
(gpmc_base_add);
|
||||
|
||||
printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
|
||||
if (platform_device_register(&devkit8000_nand_device) < 0)
|
||||
if (gpmc_nand_init(&devkit8000_nand_data) < 0)
|
||||
printk(KERN_ERR "Unable to register NAND device\n");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user