diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2010-10-19 11:06:49 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-12-20 10:14:09 -0500 |
commit | 59bdd133561a432c4655146e283caf85fa64c2fb (patch) | |
tree | 62e4514eff33958ab3bc7dabdea9fbd0cf3ee9d0 /arch/arm/mach-pxa | |
parent | 1b9169d8a0fe2b41fbbb8d152c8108190865f3cf (diff) |
ARM: pxa: Add Balloon3 NAND ready check
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/balloon3.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/balloon3.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index d4649c0e23f6..ccb2d0cebcc3 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -612,9 +612,13 @@ static void balloon3_nand_select_chip(struct mtd_info *mtd, int chip) | |||
612 | BALLOON3_NAND_CONTROL_REG); | 612 | BALLOON3_NAND_CONTROL_REG); |
613 | } | 613 | } |
614 | 614 | ||
615 | static int balloon3_nand_dev_ready(struct mtd_info *mtd) | ||
616 | { | ||
617 | return __raw_readl(BALLOON3_NAND_STAT_REG) & BALLOON3_NAND_STAT_RNB; | ||
618 | } | ||
619 | |||
615 | static int balloon3_nand_probe(struct platform_device *pdev) | 620 | static int balloon3_nand_probe(struct platform_device *pdev) |
616 | { | 621 | { |
617 | void __iomem *temp_map; | ||
618 | uint16_t ver; | 622 | uint16_t ver; |
619 | int ret; | 623 | int ret; |
620 | 624 | ||
@@ -684,7 +688,7 @@ struct platform_nand_data balloon3_nand_pdata = { | |||
684 | }, | 688 | }, |
685 | .ctrl = { | 689 | .ctrl = { |
686 | .hwcontrol = 0, | 690 | .hwcontrol = 0, |
687 | .dev_ready = 0, | 691 | .dev_ready = balloon3_nand_dev_ready, |
688 | .select_chip = balloon3_nand_select_chip, | 692 | .select_chip = balloon3_nand_select_chip, |
689 | .cmd_ctrl = balloon3_nand_cmd_ctl, | 693 | .cmd_ctrl = balloon3_nand_cmd_ctl, |
690 | .probe = balloon3_nand_probe, | 694 | .probe = balloon3_nand_probe, |
diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h index f6c81ea51487..7074e76146c9 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/include/mach/balloon3.h | |||
@@ -37,7 +37,7 @@ enum balloon3_features { | |||
37 | #define BALLOON3_NAND_BASE (PXA_CS4_PHYS + 0x00e00000) | 37 | #define BALLOON3_NAND_BASE (PXA_CS4_PHYS + 0x00e00000) |
38 | #define BALLOON3_NAND_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000) | 38 | #define BALLOON3_NAND_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000) |
39 | #define BALLOON3_NAND_CONTROL2_REG (BALLOON3_FPGA_VIRT + 0x00e00010) | 39 | #define BALLOON3_NAND_CONTROL2_REG (BALLOON3_FPGA_VIRT + 0x00e00010) |
40 | #define BALLOON3_NAND_STAT_REG (BALLOON3_FPGA_VIRT + 0x00e00010) | 40 | #define BALLOON3_NAND_STAT_REG (BALLOON3_FPGA_VIRT + 0x00e00014) |
41 | #define BALLOON3_NAND_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e00014) | 41 | #define BALLOON3_NAND_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e00014) |
42 | 42 | ||
43 | /* fpga/cpld interrupt control register */ | 43 | /* fpga/cpld interrupt control register */ |