Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226438
b: refs/heads/master
c: 235228b
h: refs/heads/master
v: v3
  • Loading branch information
Enric Balletbo i Serra authored and Tony Lindgren committed Nov 30, 2010
1 parent 0e12725 commit 9f3e62c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 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: ae3e033362430f2684bb3519456c88d14e182f01
refs/heads/master: 235228ba21e34ba732b413c12259bac386f83283
23 changes: 11 additions & 12 deletions trunk/arch/arm/mach-omap2/board-igep0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,35 +152,34 @@ static struct platform_device igep2_onenand_device = {

static void __init igep2_flash_init(void)
{
u8 cs = 0;
u8 onenandcs = GPMC_CS_NUM + 1;
u8 cs = 0;
u8 onenandcs = GPMC_CS_NUM + 1;

while (cs < GPMC_CS_NUM) {
u32 ret = 0;
for (cs = 0; cs < GPMC_CS_NUM; cs++) {
u32 ret;
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);

/* Check if NAND/oneNAND is configured */
if ((ret & 0xC00) == 0x800)
/* NAND found */
pr_err("IGEP v2: Unsupported NAND found\n");
pr_err("IGEP2: Unsupported NAND found\n");
else {
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
if ((ret & 0x3F) == (ONENAND_MAP >> 24))
/* ONENAND found */
onenandcs = cs;
}
cs++;
}

if (onenandcs > GPMC_CS_NUM) {
pr_err("IGEP v2: Unable to find configuration in GPMC\n");
pr_err("IGEP2: Unable to find configuration in GPMC\n");
return;
}

if (onenandcs < GPMC_CS_NUM) {
igep2_onenand_data.cs = onenandcs;
if (platform_device_register(&igep2_onenand_device) < 0)
pr_err("IGEP v2: Unable to register OneNAND device\n");
}
igep2_onenand_data.cs = onenandcs;

if (platform_device_register(&igep2_onenand_device) < 0)
pr_err("IGEP2: Unable to register OneNAND device\n");
}

#else
Expand Down

0 comments on commit 9f3e62c

Please sign in to comment.