summaryrefslogtreecommitdiff
path: root/board/ronetix
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas.devel@googlemail.com>2013-11-29 12:13:45 +0100
committerAndreas Bießmann <andreas.devel@googlemail.com>2013-12-09 13:21:45 +0100
commitac45bb1646e866b463405fade65bac4d877d4209 (patch)
tree0d990e984cf01e48a1e95cfc7f6cf3eaf6a661a2 /board/ronetix
parent934e3b5240ab655782b0844989db928265e6f5df (diff)
downloadu-boot-imx-ac45bb1646e866b463405fade65bac4d877d4209.zip
u-boot-imx-ac45bb1646e866b463405fade65bac4d877d4209.tar.gz
u-boot-imx-ac45bb1646e866b463405fade65bac4d877d4209.tar.bz2
at91: nand: switch atmel_nand to generic GPIO API
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Jens Scharsig (BuS Elektronik)<esw@bus-elektronik.de> Tested-by: Jens Scharsig (BuS Elektronik)<esw@bus-elektronik.de> Acked-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'board/ronetix')
-rw-r--r--board/ronetix/pm9261/pm9261.c5
-rw-r--r--board/ronetix/pm9263/pm9263.c5
-rw-r--r--board/ronetix/pm9g45/pm9g45.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c
index a2a569b..a634383 100644
--- a/board/ronetix/pm9261/pm9261.c
+++ b/board/ronetix/pm9261/pm9261.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <asm/sizes.h>
#include <asm/io.h>
+#include <asm/gpio.h>
#include <asm/arch/at91sam9_smc.h>
#include <asm/arch/at91_common.h>
#include <asm/arch/at91_pmc.h>
@@ -73,10 +74,10 @@ static void pm9261_nand_hw_init(void)
&pmc->pcer);
/* Configure RDY/BSY */
- at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1);
+ gpio_direction_input(CONFIG_SYS_NAND_READY_PIN);
/* Enable NandFlash */
- at91_set_pio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
+ gpio_direction_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
at91_set_a_periph(AT91_PIO_PORTC, 0, 0); /* NANDOE */
at91_set_a_periph(AT91_PIO_PORTC, 1, 0); /* NANDWE */
diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
index 48eba99..3cedeef 100644
--- a/board/ronetix/pm9263/pm9263.c
+++ b/board/ronetix/pm9263/pm9263.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <asm/sizes.h>
#include <asm/io.h>
+#include <asm/gpio.h>
#include <asm/arch/at91sam9_smc.h>
#include <asm/arch/at91_common.h>
#include <asm/arch/at91_pmc.h>
@@ -67,10 +68,10 @@ static void pm9263_nand_hw_init(void)
&smc->cs[3].mode);
/* Configure RDY/BSY */
- at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1);
+ gpio_direction_input(CONFIG_SYS_NAND_READY_PIN);
/* Enable NandFlash */
- at91_set_pio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
+ gpio_direction_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
}
#endif
diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c
index 5bb5a3c..c9f2747 100644
--- a/board/ronetix/pm9g45/pm9g45.c
+++ b/board/ronetix/pm9g45/pm9g45.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <asm/sizes.h>
#include <asm/io.h>
+#include <asm/gpio.h>
#include <asm/arch/at91sam9_smc.h>
#include <asm/arch/at91_common.h>
#include <asm/arch/at91_pmc.h>
@@ -66,11 +67,11 @@ static void pm9g45_nand_hw_init(void)
#ifdef CONFIG_SYS_NAND_READY_PIN
/* Configure RDY/BSY */
- at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1);
+ gpio_direction_input(CONFIG_SYS_NAND_READY_PIN);
#endif
/* Enable NandFlash */
- at91_set_pio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
+ gpio_direction_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
}
#endif