Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274812
b: refs/heads/master
c: 0fab028
h: refs/heads/master
v: v3
  • Loading branch information
Lei Wen authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 35ad757 commit 6d022eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: bc27ede371b0931086e9cef72e30a58fdedc4709
refs/heads/master: 0fab028b77d714ad302404b23306cf7adb885223
12 changes: 7 additions & 5 deletions trunk/drivers/mtd/nand/pxa3xx_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ static int pxa3xx_nand_detect_config(struct pxa3xx_nand_info *info)
info->page_size = ndcr & NDCR_PAGE_SZ ? 2048 : 512;
/* set info fields needed to read id */
info->read_id_bytes = (info->page_size == 2048) ? 4 : 2;
info->reg_ndcr = ndcr;
info->reg_ndcr = ndcr & ~NDCR_INT_MASK;
info->cmdset = &default_cmdset;

info->ndtr0cs0 = nand_readl(info, NDTR0CS0);
Expand Down Expand Up @@ -882,7 +882,7 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
struct pxa3xx_nand_info *info = mtd->priv;
struct platform_device *pdev = info->pdev;
struct pxa3xx_nand_platform_data *pdata = pdev->dev.platform_data;
struct nand_flash_dev pxa3xx_flash_ids[2] = { {NULL,}, {NULL,} };
struct nand_flash_dev pxa3xx_flash_ids[2], *def = NULL;
const struct pxa3xx_nand_flash *f = NULL;
struct nand_chip *chip = mtd->priv;
uint32_t id = -1;
Expand Down Expand Up @@ -942,8 +942,10 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
pxa3xx_flash_ids[0].erasesize = f->page_size * f->page_per_block;
if (f->flash_width == 16)
pxa3xx_flash_ids[0].options = NAND_BUSWIDTH_16;
pxa3xx_flash_ids[1].name = NULL;
def = pxa3xx_flash_ids;
KEEP_CONFIG:
if (nand_scan_ident(mtd, 1, pxa3xx_flash_ids))
if (nand_scan_ident(mtd, 1, def))
return -ENODEV;
/* calculate addressing information */
info->col_addr_cycles = (mtd->writesize >= 2048) ? 2 : 1;
Expand All @@ -954,9 +956,9 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
info->row_addr_cycles = 2;
mtd->name = mtd_names[0];
chip->ecc.mode = NAND_ECC_HW;
chip->ecc.size = f->page_size;
chip->ecc.size = info->page_size;

chip->options = (f->flash_width == 16) ? NAND_BUSWIDTH_16 : 0;
chip->options = (info->reg_ndcr & NDCR_DWIDTH_M) ? NAND_BUSWIDTH_16 : 0;
chip->options |= NAND_NO_AUTOINCR;
chip->options |= NAND_NO_READRDY;

Expand Down

0 comments on commit 6d022eb

Please sign in to comment.