]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: pl01x: expose skip_init platdata option in DT
authorFabian Vogt <fvogt@suse.com>
Mon, 26 Sep 2016 12:26:45 +0000 (14:26 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 29 Nov 2016 01:09:47 +0000 (20:09 -0500)
To be able to represent the skip-init platdata element with OF_CONTROL,
it needs to be read from the device tree as well and put into the platform data.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
doc/device-tree-bindings/serial/pl01x.txt
drivers/serial/serial_pl01x.c

index 61c27d121b70bbedb6a5c5595641c21d21928703..017b1e235572dc93d70ba617e1ee0b25d6e064ba 100644 (file)
@@ -5,3 +5,6 @@ Required properties:
 - reg: exactly one register range with length 0x1000
 - clock: input clock frequency for the UART (used to calculate the baud
   rate divisor)
+
+Optional properties:
+- skip-init: if present, the baud rate divisor is not changed
index 6f83835fa8cd2a3748149c45bd6c5abb113a952f..a8d3d675d577c9776fd9d61d2a87906ad5b9809e 100644 (file)
@@ -356,6 +356,8 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
        plat->base = addr;
        plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1);
        plat->type = dev_get_driver_data(dev);
+       plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev->of_offset,
+                                         "skip-init");
        return 0;
 }
 #endif