From 8226dbbf1d85be662ab6d427ca80c305cf0b719d Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Sun, 22 Dec 2013 21:30:21 -0500 Subject: cpu/allwinner/a10: Refactor and document pinmux API Include a function to multiplex more than one pin at a time. This is useful for peripherals that have the same function number for all their pins. Since we now have two functions for muxing pins, also document them. Change-Id: I53997cc3a2586e3cf749cd672f69fb427659c67f Signed-off-by: Alexandru Gagniuc Reviewed-on: http://review.coreboot.org/4565 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/cubietech/cubieboard/bootblock.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/cubietech/cubieboard/bootblock.c b/src/mainboard/cubietech/cubieboard/bootblock.c index 6e8b751c73..a91391c7a0 100644 --- a/src/mainboard/cubietech/cubieboard/bootblock.c +++ b/src/mainboard/cubietech/cubieboard/bootblock.c @@ -18,8 +18,8 @@ | AHB_DIV_1 \ | AXI_DIV_1 -#define GPB22_UART0_TX_FUNC 2 -#define GPB23_UART0_RX_FUNC 2 +#define GPB_UART0_FUNC 2 +#define GPB_UART0_PINS ((1 << 22) | (1 << 23)) static void cubieboard_set_sys_clock(void) { @@ -57,8 +57,7 @@ static void cubieboard_setup_clocks(void) static void cubieboard_setup_gpios(void) { /* Mux UART pins */ - gpio_set_func(GPB, 22, GPB22_UART0_TX_FUNC); - gpio_set_func(GPB, 23, GPB23_UART0_RX_FUNC); + gpio_set_multipin_func(GPB, GPB_UART0_PINS, GPB_UART0_FUNC); } static void cubieboard_enable_uart(void) -- cgit v1.2.3