Commit 5219343f authored by David Daney's avatar David Daney Committed by Ralf Baechle

MIPS: OCTEON: Set proper UART clock in internal device trees.

Following patch to use generic 8250 drivers will need proper clock
information.  So when using the internal device tree, populate the
"clock-frequency" property with the correct value.
Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: Jamie Iles <jamie@jamieiles.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5515/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 450acb0b
...@@ -490,8 +490,15 @@ int __init octeon_prune_device_tree(void) ...@@ -490,8 +490,15 @@ int __init octeon_prune_device_tree(void)
if (alias_prop) { if (alias_prop) {
uart = fdt_path_offset(initial_boot_params, alias_prop); uart = fdt_path_offset(initial_boot_params, alias_prop);
if (uart_mask & (1 << i)) if (uart_mask & (1 << i)) {
__be32 f;
f = cpu_to_be32(octeon_get_io_clock_rate());
fdt_setprop_inplace(initial_boot_params,
uart, "clock-frequency",
&f, sizeof(f));
continue; continue;
}
pr_debug("Deleting uart%d\n", i); pr_debug("Deleting uart%d\n", i);
fdt_nop_node(initial_boot_params, uart); fdt_nop_node(initial_boot_params, uart);
fdt_nop_property(initial_boot_params, aliases, fdt_nop_property(initial_boot_params, aliases,
......
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