aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/rb532
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2008-10-31 14:24:29 +0100
committerRalf Baechle <ralf@linux-mips.org>2008-11-20 19:42:32 +0000
commit1b432840d0a4740020e29ae7a00717ef8f44954b (patch)
tree64374760eb188224bba02321bba49b99eeff4dc6 /arch/mips/rb532
parent9e86786a4b17ad186f456dc6ac0508a17556731b (diff)
MIPS: RB532: GPIO register offsets are relative to GPIOBASE
This patch fixes the wrong use of GPIO register offsets in devices.c. To avoid further problems, use gpio_get_value to return the NAND status instead of our own expanded code. Also define the zero offset of the alternate function register to allow consistent access. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Phil Sutter <n0-1@freewrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/rb532')
-rw-r--r--arch/mips/rb532/devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c
index 2f22d714d5b..c1c29181bd4 100644
--- a/arch/mips/rb532/devices.c
+++ b/arch/mips/rb532/devices.c
@@ -118,7 +118,7 @@ static struct platform_device cf_slot0 = {
/* Resources and device for NAND */
static int rb532_dev_ready(struct mtd_info *mtd)
{
- return readl(IDT434_REG_BASE + GPIOD) & GPIO_RDY;
+ return gpio_get_value(GPIO_RDY);
}
static void rb532_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)