X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fserial%2Fserial_pxa.c;h=d5140045bfbb54ee0d790418fe07b7cbb4655343;hb=ef48f6dd305e9b8ab8873599acfe26df0e625606;hp=bd3b3cf7c48465fe2e44be3a92efc7ceaef72a38;hpb=4808f106d2af3682f3ee8ad7c6a36d73cfb7a80e;p=oweals%2Fu-boot.git diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c index bd3b3cf7c4..d5140045bf 100644 --- a/drivers/serial/serial_pxa.c +++ b/drivers/serial/serial_pxa.c @@ -14,20 +14,7 @@ * * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -73,20 +60,6 @@ DECLARE_GLOBAL_DATA_PTR; #define HWUART_INDEX 0xff #endif -#ifndef CONFIG_SERIAL_MULTI -#if defined(CONFIG_FFUART) -#define UART_INDEX FFUART_INDEX -#elif defined(CONFIG_BTUART) -#define UART_INDEX BTUART_INDEX -#elif defined(CONFIG_STUART) -#define UART_INDEX STUART_INDEX -#elif defined(CONFIG_HWUART) -#define UART_INDEX HWUART_INDEX -#else -#error "Please select CONFIG_(FF|BT|ST|HW)UART in board config file." -#endif -#endif - static uint32_t pxa_uart_get_baud_divider(void) { if (gd->baudrate == 1200) @@ -297,9 +270,6 @@ void pxa_puts_dev(unsigned int uart_index, const char *s) pxa_uart_multi(btuart, BTUART) #endif -#ifndef CONFIG_SERIAL_MULTI - pxa_uart(serial, UART) -#else __weak struct serial_device *default_serial_console(void) { #if CONFIG_CONS_INDEX == 1 @@ -314,4 +284,16 @@ __weak struct serial_device *default_serial_console(void) #error "Bad CONFIG_CONS_INDEX." #endif } + +void pxa_serial_initialize(void) +{ +#if defined(CONFIG_FFUART) + serial_register(&serial_ffuart_device); +#endif +#if defined(CONFIG_BTUART) + serial_register(&serial_btuart_device); +#endif +#if defined(CONFIG_STUART) + serial_register(&serial_stuart_device); #endif +}