From c2610a4a186c6e5a05f6518c2c7a734fde8f6cfd Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Mon, 24 Feb 2014 20:51:30 +0200 Subject: uart: Prepare to support multiple base addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prepare low-level register access to take UART base address as a parameter. This is done to support a list of base addresses defined in the platform. Change-Id: Ie630e55f2562f099b0ba9eb94b08c92d26dfdf2e Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/5309 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc --- src/include/console/uart.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/console') diff --git a/src/include/console/uart.h b/src/include/console/uart.h index f0371a2a98..6a1251e5d0 100644 --- a/src/include/console/uart.h +++ b/src/include/console/uart.h @@ -48,6 +48,13 @@ int uart_can_rx_byte(void); unsigned int uart_platform_base(int idx); uint32_t uartmem_getbaseaddr(void); +#if !defined(__ROMCC__) +static inline void *uart_platform_baseptr(int idx) +{ + return (void *)uart_platform_base(idx); +} +#endif + void oxford_init(void); void oxford_remap(unsigned int new_base); -- cgit v1.2.3