1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-12-25 18:09:11 +01:00
Files
u-boot-megous/drivers/serial
Paul Burton 50fce1d5d8 serial: ns16550: Support clocks via phandle
Previously ns16550 compatible UARTs probed via device tree have needed
their device tree nodes to contain a clock-frequency property. An
alternative to this commonly used with Linux is to reference a clock via
a phandle. This patch allows U-Boot to support that, retrieving the
clock frequency by probing the appropriate clock device.

For example, a system might choose to provide the UART base clock as a
reference to a clock common to multiple devices:

  sys_clk: clock {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <10000000>;
  };

  uart0: uart@10000000 {
    compatible = "ns16550a";
    reg = <0x10000000 0x1000>;
    clocks = <&sys_clk>;
  };

  uart1: uart@10000000 {
    compatible = "ns16550a";
    reg = <0x10001000 0x1000>;
    clocks = <&sys_clk>;
  };

This removes the need for the frequency information to be duplicated in
multiple nodes and allows the device tree to be more descriptive of the
system.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-09-21 15:04:32 +02:00
..
2016-02-25 19:06:37 -05:00
2016-05-17 09:54:43 -06:00
2016-04-11 10:20:30 -07:00
2016-02-06 12:00:59 +01:00
2015-12-05 18:22:23 -05:00
2014-08-09 11:17:04 -04:00