[U-Boot] [PATCH] WIP: fdt: Add serial port controlled by device tree
Mike Frysinger
vapier at gentoo.org
Tue Feb 21 16:47:52 CET 2012
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: <http://lists.denx.de/pipermail/u-boot/attachments/20120221/c3fec348/attachment.pgp>
More information about the U-Boot
mailing list