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>
This commit is contained in:
Marek Vasut 2010-10-19 17:06:49 +02:00 committed by Eric Miao
parent 1b9169d8a0
commit 59bdd13356
2 changed files with 7 additions and 3 deletions

View File

@ -612,9 +612,13 @@ static void balloon3_nand_select_chip(struct mtd_info *mtd, int chip)
BALLOON3_NAND_CONTROL_REG); 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) static int balloon3_nand_probe(struct platform_device *pdev)
{ {
void __iomem *temp_map;
uint16_t ver; uint16_t ver;
int ret; int ret;
@ -684,7 +688,7 @@ struct platform_nand_data balloon3_nand_pdata = {
}, },
.ctrl = { .ctrl = {
.hwcontrol = 0, .hwcontrol = 0,
.dev_ready = 0, .dev_ready = balloon3_nand_dev_ready,
.select_chip = balloon3_nand_select_chip, .select_chip = balloon3_nand_select_chip,
.cmd_ctrl = balloon3_nand_cmd_ctl, .cmd_ctrl = balloon3_nand_cmd_ctl,
.probe = balloon3_nand_probe, .probe = balloon3_nand_probe,

View File

@ -37,7 +37,7 @@ enum balloon3_features {
#define BALLOON3_NAND_BASE (PXA_CS4_PHYS + 0x00e00000) #define BALLOON3_NAND_BASE (PXA_CS4_PHYS + 0x00e00000)
#define BALLOON3_NAND_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000) #define BALLOON3_NAND_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000)
#define BALLOON3_NAND_CONTROL2_REG (BALLOON3_FPGA_VIRT + 0x00e00010) #define BALLOON3_NAND_CONTROL2_REG (BALLOON3_FPGA_VIRT + 0x00e00010)
#define BALLOON3_NAND_STAT_REG (BALLOON3_FPGA_VIRT + 0x00e00010) #define BALLOON3_NAND_STAT_REG (BALLOON3_FPGA_VIRT + 0x00e00014)
#define BALLOON3_NAND_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e00014) #define BALLOON3_NAND_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e00014)
/* fpga/cpld interrupt control register */ /* fpga/cpld interrupt control register */