From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 27 Nov 2016 10:02:59 -0700 Subject: [U-Boot] [PATCH 04/14] serial: 16550: Add getfcr accessor In-Reply-To: <20161125223235.3434-4-marex@denx.de> References: <20161125223235.3434-1-marex@denx.de> <20161125223235.3434-4-marex@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 25 November 2016 at 15:32, Marek Vasut wrote: > Add function which allows fetching the default FCR register setting > from platform data for DM , while retaining old behavior for non-DM > by returning UART_FCRVAL. > > Signed-off-by: Marek Vasut > Cc: Tom Rini > Cc: Simon Glass > --- > V2: If CONFIG_DM_SERIAL and DEBUG_UART are enabled, the ns16550_getfcr() > can be invoked with NULL plat data . Check for this case and return > the default UART_FCRVAL then. > V3: It turns out that if DEBUG_UART is defined, $port points directly to > hardware registers. Add additional ifdef to handle the case where > debug uart is enabled with DM_SERIAL correctly. > V4: Use UART_FCRVAL in _debug_uart_init() directly > --- > drivers/serial/ns16550.c | 18 ++++++++++++++++-- > include/ns16550.h | 1 + > 2 files changed, 17 insertions(+), 2 deletions(-) Reviewed-by: Simon Glass