From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Tue, 29 Oct 2013 13:53:10 +0100 Subject: [U-Boot] [RFC PATCH 2/3] at91sam9263ek: remove ATMEL_LEGACY In-Reply-To: <1383051191-29363-1-git-send-email-andreas.devel@googlemail.com> References: <1383051191-29363-1-git-send-email-andreas.devel@googlemail.com> Message-ID: <1383051191-29363-3-git-send-email-andreas.devel@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Andreas Bie?mann --- 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 #include -#include +#include #include #include @@ -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