From: Mike Frysinger Date: Tue, 21 Feb 2012 10:47:52 -0500 Subject: [U-Boot] [PATCH] WIP: fdt: Add serial port controlled by device tree In-Reply-To: <1329806481-12628-1-git-send-email-sjg@chromium.org> References: <1329806481-12628-1-git-send-email-sjg@chromium.org> Message-ID: <201202211047.53287.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 21 February 2012 01:41:21 Simon Glass wrote: > --- /dev/null > +++ b/common/fdt_decode.c > > +static struct fdt_compat compat_types[] = { const > +void fdt_decode_uart_calc_divisor(struct fdt_uart *uart) > +{ > + if (uart->multiplier && uart->baudrate) > + uart->divisor = (uart->clock_freq + > + (uart->baudrate * (uart->multiplier / 2))) / > + (uart->multiplier * uart->baudrate); > +} does the multiplier really need to be part of device tree ? > +int fdt_decode_get_spi_switch(const void *blob, struct fdt_spi_uart > *config) +{ > + int node, uart_node; > + const u32 *gpio; > + > + node = fdt_node_offset_by_compatible(blob, 0, > + "nvidia,spi-uart-switch"); what's with the hardcoded SoC names in common code ? > --- /dev/null > +++ b/drivers/serial/serial_fdt.c > > +void uart_calc_divisor(struct fdt_uart *uart) > +{ > + if (uart->multiplier && uart->baudrate) > + uart->divisor = (uart->clock_freq + > + (uart->baudrate * (uart->multiplier / 2))) / > + (uart->multiplier * uart->baudrate); > +} isn't this exactly the same as fdt_decode_uart_calc_divisor ? -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: