Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207772
b: refs/heads/master
c: 7b0507e
h: refs/heads/master
v: v3
  • Loading branch information
Kyungmin Park authored and David Woodhouse committed Aug 4, 2010
1 parent bbadc8a commit 71162be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad0d363b8fb7559a410483635349e22de6727988
refs/heads/master: 7b0507eb697ea157533b9a7e0a955f64a00b1b1d
21 changes: 8 additions & 13 deletions trunk/drivers/mtd/onenand/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,12 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
return 0;
}

static int s5pc110_chip_probe(struct mtd_info *mtd)
{
/* Now just return 0 */
return 0;
}

static int s3c_onenand_bbt_wait(struct mtd_info *mtd, int state)
{
unsigned int flags = INT_ACT | LOAD_CMP;
Expand Down Expand Up @@ -757,6 +763,7 @@ static void s3c_onenand_setup(struct mtd_info *mtd)
/* Use generic onenand functions */
onenand->cmd_map = s5pc1xx_cmd_map;
this->read_bufferram = s5pc110_read_bufferram;
this->chip_probe = s5pc110_chip_probe;
return;
} else {
BUG();
Expand All @@ -781,7 +788,6 @@ static int s3c_onenand_probe(struct platform_device *pdev)
struct mtd_info *mtd;
struct resource *r;
int size, err;
unsigned long onenand_ctrl_cfg = 0;

pdata = pdev->dev.platform_data;
/* No need to check pdata. the platform data is optional */
Expand Down Expand Up @@ -900,25 +906,14 @@ static int s3c_onenand_probe(struct platform_device *pdev)
}

onenand->phys_base = onenand->base_res->start;

onenand_ctrl_cfg = readl(onenand->dma_addr + 0x100);
if ((onenand_ctrl_cfg & ONENAND_SYS_CFG1_SYNC_WRITE) &&
onenand->dma_addr)
writel(onenand_ctrl_cfg & ~ONENAND_SYS_CFG1_SYNC_WRITE,
onenand->dma_addr + 0x100);
else
onenand_ctrl_cfg = 0;
}

if (onenand_scan(mtd, 1)) {
err = -EFAULT;
goto scan_failed;
}

if (onenand->type == TYPE_S5PC110) {
if (onenand_ctrl_cfg && onenand->dma_addr)
writel(onenand_ctrl_cfg, onenand->dma_addr + 0x100);
} else {
if (onenand->type != TYPE_S5PC110) {
/* S3C doesn't handle subpage write */
mtd->subpage_sft = 0;
this->subpagesize = mtd->writesize;
Expand Down

0 comments on commit 71162be

Please sign in to comment.