summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-09 09:29:45 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-09 09:29:45 +0000
commit017387d91db40bde0bea4cdab6e621b280784f9e (patch)
tree2dfb5f3d6eaf83d9b02c17fae52eb1b0075a63ae
parentcac44c30020f1cd3c63d8b3e3c297dd7f8eeddc2 (diff)
ar71xx: use gpio_*_cansleep calls in the rb4xx NAND driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24944 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
index 185bef04d..d6c684309 100644
--- a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
+++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
@@ -1,7 +1,7 @@
/*
* NAND flash driver for the MikroTik RouterBoard 4xx series
*
- * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
* This file was based on the driver for Linux 2.6.22 published by
@@ -71,7 +71,7 @@ static struct mtd_partition rb4xx_nand_partitions[] = {
static int rb4xx_nand_dev_ready(struct mtd_info *mtd)
{
- return gpio_get_value(RB4XX_NAND_GPIO_READY);
+ return gpio_get_value_cansleep(RB4XX_NAND_GPIO_READY);
}
static void rb4xx_nand_write_cmd(unsigned char cmd)
@@ -88,9 +88,12 @@ static void rb4xx_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
unsigned int ctrl)
{
if (ctrl & NAND_CTRL_CHANGE) {
- gpio_set_value(RB4XX_NAND_GPIO_CLE, (ctrl & NAND_CLE) ? 1 : 0);
- gpio_set_value(RB4XX_NAND_GPIO_ALE, (ctrl & NAND_ALE) ? 1 : 0);
- gpio_set_value(RB4XX_NAND_GPIO_NCE, (ctrl & NAND_NCE) ? 0 : 1);
+ gpio_set_value_cansleep(RB4XX_NAND_GPIO_CLE,
+ (ctrl & NAND_CLE) ? 1 : 0);
+ gpio_set_value_cansleep(RB4XX_NAND_GPIO_ALE,
+ (ctrl & NAND_ALE) ? 1 : 0);
+ gpio_set_value_cansleep(RB4XX_NAND_GPIO_NCE,
+ (ctrl & NAND_NCE) ? 0 : 1);
}
if (cmd != NAND_CMD_NONE)