From ac45bb1646e866b463405fade65bac4d877d4209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Fri, 29 Nov 2013 12:13:45 +0100 Subject: at91: nand: switch atmel_nand to generic GPIO API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Bießmann Acked-by: Jens Scharsig (BuS Elektronik) Tested-by: Jens Scharsig (BuS Elektronik) Acked-by: Scott Wood --- board/ronetix/pm9261/pm9261.c | 5 +++-- board/ronetix/pm9263/pm9263.c | 5 +++-- board/ronetix/pm9g45/pm9g45.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'board/ronetix') 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 #include #include +#include #include #include #include @@ -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 #include #include +#include #include #include #include @@ -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 #include #include +#include #include #include #include @@ -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 -- cgit v1.1 From bcf9fe37f5342aeebbf98a9e3800f578387b4fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Fri, 29 Nov 2013 12:13:46 +0100 Subject: at91: switch coloured LED to gpio API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Bießmann --- board/ronetix/pm9261/led.c | 14 +++++++------- board/ronetix/pm9263/led.c | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'board/ronetix') diff --git a/board/ronetix/pm9261/led.c b/board/ronetix/pm9261/led.c index 223a516..cc4c2a0 100644 --- a/board/ronetix/pm9261/led.c +++ b/board/ronetix/pm9261/led.c @@ -8,9 +8,9 @@ */ #include +#include #include #include -#include void coloured_LED_init(void) { @@ -19,11 +19,11 @@ void coloured_LED_init(void) /* Enable clock */ writel(1 << ATMEL_ID_PIOC, &pmc->pcer); - at91_set_pio_output(CONFIG_RED_LED, 1); - at91_set_pio_output(CONFIG_GREEN_LED, 1); - at91_set_pio_output(CONFIG_YELLOW_LED, 1); + gpio_direction_output(CONFIG_RED_LED, 1); + gpio_direction_output(CONFIG_GREEN_LED, 1); + gpio_direction_output(CONFIG_YELLOW_LED, 1); - at91_set_pio_value(CONFIG_RED_LED, 0); - at91_set_pio_value(CONFIG_GREEN_LED, 1); - at91_set_pio_value(CONFIG_YELLOW_LED, 1); + gpio_set_value(CONFIG_RED_LED, 0); + gpio_set_value(CONFIG_GREEN_LED, 1); + gpio_set_value(CONFIG_YELLOW_LED, 1); } diff --git a/board/ronetix/pm9263/led.c b/board/ronetix/pm9263/led.c index 44e3430..bfc2310 100644 --- a/board/ronetix/pm9263/led.c +++ b/board/ronetix/pm9263/led.c @@ -8,9 +8,9 @@ */ #include +#include #include #include -#include void coloured_LED_init(void) { @@ -19,9 +19,9 @@ void coloured_LED_init(void) /* Enable clock */ writel(1 << ATMEL_ID_PIOB, &pmc->pcer); - at91_set_pio_output(CONFIG_RED_LED, 1); - at91_set_pio_output(CONFIG_GREEN_LED, 1); + gpio_direction_output(CONFIG_RED_LED, 1); + gpio_direction_output(CONFIG_GREEN_LED, 1); - at91_set_pio_value(CONFIG_RED_LED, 0); - at91_set_pio_value(CONFIG_GREEN_LED, 1); + gpio_set_value(CONFIG_RED_LED, 0); + gpio_set_value(CONFIG_GREEN_LED, 1); } -- cgit v1.1