summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/balloon3.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-10-19 17:06:49 +0200
committerEric Miao <eric.y.miao@gmail.com>2010-12-20 23:14:09 +0800
commit59bdd133561a432c4655146e283caf85fa64c2fb (patch)
tree62e4514eff33958ab3bc7dabdea9fbd0cf3ee9d0 /arch/arm/mach-pxa/balloon3.c
parent1b9169d8a0fe2b41fbbb8d152c8108190865f3cf (diff)
downloadlinux-stable-59bdd133561a432c4655146e283caf85fa64c2fb.tar.gz
linux-stable-59bdd133561a432c4655146e283caf85fa64c2fb.tar.bz2
linux-stable-59bdd133561a432c4655146e283caf85fa64c2fb.zip
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/balloon3.c')
-rw-r--r--arch/arm/mach-pxa/balloon3.c8
1 files changed, 6 insertions, 2 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)
BALLOON3_NAND_CONTROL_REG);
}
+static int balloon3_nand_dev_ready(struct mtd_info *mtd)
+{
+ return __raw_readl(BALLOON3_NAND_STAT_REG) & BALLOON3_NAND_STAT_RNB;
+}
+
static int balloon3_nand_probe(struct platform_device *pdev)
{
- void __iomem *temp_map;
uint16_t ver;
int ret;
@@ -684,7 +688,7 @@ struct platform_nand_data balloon3_nand_pdata = {
},
.ctrl = {
.hwcontrol = 0,
- .dev_ready = 0,
+ .dev_ready = balloon3_nand_dev_ready,
.select_chip = balloon3_nand_select_chip,
.cmd_ctrl = balloon3_nand_cmd_ctl,
.probe = balloon3_nand_probe,