of: earlycon: Move address translation to of_setup_earlycon()
Cleanup the early DT/earlycon separation; remove the 'addr' parameter
from of_setup_earlycon() and get the uart phys addr directly with a
new wrapper function, of_flat_dt_translate_addr(). Limit
fdt_translate_address() to file scope.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index e8fd54a..918809e 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -827,19 +827,13 @@
return -ENODEV;
for (match = __earlycon_table; match < __earlycon_table_end; match++) {
- u64 addr;
-
if (!match->compatible[0])
continue;
if (fdt_node_check_compatible(fdt, offset, match->compatible))
continue;
- addr = fdt_translate_address(fdt, offset);
- if (addr == OF_BAD_ADDR)
- return -ENXIO;
-
- of_setup_earlycon(addr, match, offset, options);
+ of_setup_earlycon(match, offset, options);
return 0;
}
return -ENODEV;