diff options
author | David Daney <david.daney@cavium.com> | 2013-06-19 16:37:26 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-07-01 09:10:54 -0400 |
commit | 5219343f83a033fe5dfcbb0274b5a78e8b2d0fee (patch) | |
tree | 5250f00d2a000e2ebd21e724f1daf56a9acc0737 /arch/mips/cavium-octeon/octeon-platform.c | |
parent | 450acb0b120ebcdc7d2ea6888b5302a6a5a12420 (diff) |
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: David 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: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/cavium-octeon/octeon-platform.c')
-rw-r--r-- | arch/mips/cavium-octeon/octeon-platform.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c index 389512e2abd6..7b746e7bf7a1 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c | |||
@@ -490,8 +490,15 @@ int __init octeon_prune_device_tree(void) | |||
490 | 490 | ||
491 | if (alias_prop) { | 491 | if (alias_prop) { |
492 | uart = fdt_path_offset(initial_boot_params, alias_prop); | 492 | uart = fdt_path_offset(initial_boot_params, alias_prop); |
493 | if (uart_mask & (1 << i)) | 493 | if (uart_mask & (1 << i)) { |
494 | __be32 f; | ||
495 | |||
496 | f = cpu_to_be32(octeon_get_io_clock_rate()); | ||
497 | fdt_setprop_inplace(initial_boot_params, | ||
498 | uart, "clock-frequency", | ||
499 | &f, sizeof(f)); | ||
494 | continue; | 500 | continue; |
501 | } | ||
495 | pr_debug("Deleting uart%d\n", i); | 502 | pr_debug("Deleting uart%d\n", i); |
496 | fdt_nop_node(initial_boot_params, uart); | 503 | fdt_nop_node(initial_boot_params, uart); |
497 | fdt_nop_property(initial_boot_params, aliases, | 504 | fdt_nop_property(initial_boot_params, aliases, |