Commit 165316e3 authored by Fabian Vogt's avatar Fabian Vogt Committed by Tom Rini

serial: pl01x: expose skip_init platdata option in DT

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: 's avatarFabian Vogt <fvogt@suse.com>
Reviewed-by: 's avatarSimon Glass <sjg@chromium.org>
parent 9f755f5d
...@@ -5,3 +5,6 @@ Required properties: ...@@ -5,3 +5,6 @@ Required properties:
- reg: exactly one register range with length 0x1000 - reg: exactly one register range with length 0x1000
- clock: input clock frequency for the UART (used to calculate the baud - clock: input clock frequency for the UART (used to calculate the baud
rate divisor) rate divisor)
Optional properties:
- skip-init: if present, the baud rate divisor is not changed
...@@ -356,6 +356,8 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev) ...@@ -356,6 +356,8 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
plat->base = addr; plat->base = addr;
plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1); plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1);
plat->type = dev_get_driver_data(dev); plat->type = dev_get_driver_data(dev);
plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev->of_offset,
"skip-init");
return 0; return 0;
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment