[U-Boot] [RFC PATCH 2/3] at91sam9263ek: remove ATMEL_LEGACY
Andreas Bießmann
andreas.devel at googlemail.com
Tue Oct 29 13:53:10 CET 2013
Signed-off-by: Andreas Bießmann <andreas.devel at googlemail.com>
---
board/atmel/at91sam9263ek/led.c | 12 ++++--------
include/configs/at91sam9263ek.h | 13 ++++++-------
2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/board/atmel/at91sam9263ek/led.c b/board/atmel/at91sam9263ek/led.c
index e317d99..8ed8de2 100644
--- a/board/atmel/at91sam9263ek/led.c
+++ b/board/atmel/at91sam9263ek/led.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <asm/io.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
#include <asm/arch/at91_pmc.h>
#include <asm/arch/at91sam9263.h>
@@ -20,11 +20,7 @@ void coloured_LED_init(void)
writel(1 << ATMEL_ID_PIOB | 1 << ATMEL_ID_PIOCDE,
&pmc->pcer);
- at91_set_gpio_output(CONFIG_RED_LED, 1);
- at91_set_gpio_output(CONFIG_GREEN_LED, 1);
- at91_set_gpio_output(CONFIG_YELLOW_LED, 1);
-
- at91_set_gpio_value(CONFIG_RED_LED, 0);
- at91_set_gpio_value(CONFIG_GREEN_LED, 1);
- at91_set_gpio_value(CONFIG_YELLOW_LED, 1);
+ gpio_direction_output(CONFIG_RED_LED, 0);
+ gpio_direction_output(CONFIG_GREEN_LED, 1);
+ gpio_direction_output(CONFIG_YELLOW_LED, 1);
}
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 40e167c..3a80e7d 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -52,8 +52,7 @@
/*
* Hardware drivers
*/
-#define CONFIG_ATMEL_LEGACY
-#define CONFIG_AT91_GPIO 1
+#define CONFIG_AT91_GPIO
#define CONFIG_AT91_GPIO_PULLUP 1
/* serial console */
@@ -76,9 +75,9 @@
/* LED */
#define CONFIG_AT91_LED
-#define CONFIG_RED_LED AT91_PIN_PB7 /* the power led */
-#define CONFIG_GREEN_LED AT91_PIN_PB8 /* the user1 led */
-#define CONFIG_YELLOW_LED AT91_PIN_PC29 /* the user2 led */
+#define CONFIG_RED_LED GPIO_PIN_PA(7) /* the power led */
+#define CONFIG_GREEN_LED GPIO_PIN_PB(8) /* the user1 led */
+#define CONFIG_YELLOW_LED GPIO_PIN_PC(29) /* the user2 led */
#define CONFIG_BOOTDELAY 3
@@ -267,8 +266,8 @@
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
/* our CLE is AD22 */
#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
-#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD15
-#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PA22
+#define CONFIG_SYS_NAND_ENABLE_PIN GPIO_PIN_PD(15)
+#define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PA(22)
#endif
/* Ethernet */
--
1.7.10.4
More information about the U-Boot
mailing list