9
0
Fork 0

nand: convert to struct resource

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2011-07-19 03:28:33 +08:00
parent 39b599cb6b
commit d4d8705636
2 changed files with 7 additions and 7 deletions

View File

@ -14,8 +14,8 @@
* static struct device_d my_nand_device = {
* .name = "gpmc_nand",
* .id = some identifier you need to show.. e.g. "gpmc_nand0"
* .map_base = GPMC base address
* .size = GPMC address map size.
* .resource[0].start = GPMC base address
* .resource[0].size = GPMC address map size.
* .platform_data = platform data - required - explained below
* };
* platform data required:
@ -97,7 +97,7 @@ struct gpmc_nand_info {
void *gpmc_command;
void *gpmc_address;
void *gpmc_data;
unsigned long gpmc_base;
void __iomem *gpmc_base;
unsigned char wait_mon_mask;
uint64_t timeout;
unsigned inuse:1;
@ -672,7 +672,7 @@ static int gpmc_nand_probe(struct device_d *pdev)
struct gpmc_nand_platform_data *pdata;
struct nand_chip *nand;
struct mtd_info *minfo;
unsigned long cs_base;
void __iomem *cs_base;
int err;
struct nand_ecclayout *layout, *lsp, *llp;
@ -703,7 +703,7 @@ static int gpmc_nand_probe(struct device_d *pdev)
}
/* Setup register specific data */
oinfo->gpmc_cs = pdata->cs;
oinfo->gpmc_base = pdev->map_base;
oinfo->gpmc_base = dev_request_mem_region(pdev, 0);
cs_base = oinfo->gpmc_base + GPMC_CONFIG1_0 +
(pdata->cs * GPMC_CONFIG_CS_SIZE);
oinfo->gpmc_command = (void *)(cs_base + GPMC_CS_NAND_COMMAND);

View File

@ -422,7 +422,7 @@ static int s3c24x0_nand_probe(struct device_d *dev)
return -ENOMEM;
host->dev = dev;
host->base = IOMEM(dev->map_base);
host->base = dev_request_mem_region(dev, 0);
/* structures must be linked */
chip = &host->nand;
@ -435,7 +435,7 @@ static int s3c24x0_nand_probe(struct device_d *dev)
chip->chip_delay = 50;
chip->priv = host;
chip->IO_ADDR_R = chip->IO_ADDR_W = IOMEM(dev->map_base + NFDATA);
chip->IO_ADDR_R = chip->IO_ADDR_W = host->base + NFDATA;
#ifdef CONFIG_CPU_S3C2440
chip->read_buf = s3c2440_nand_read_buf;