diff options
author | Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | 2019-05-09 22:11:58 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2019-05-10 22:48:11 +0200 |
commit | 41b22c0acc957b927d1496dd43e4db0fe8233e90 (patch) | |
tree | 7d0c930e581e100fffbbf8504ad97b2dc3e85b38 | |
parent | 27c3e07bcbddba1bc5f0ac3d58a2d1a1a99de5ea (diff) |
serial: altera_uart: convert to livetree
Convert 'altera_uart_ofdata_to_platdata' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int' and get rid of DECLARE_GLOBAL_DATA_PTR.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
-rw-r--r-- | drivers/serial/altera_uart.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index 67d47199aa..436cf2331d 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -10,8 +10,6 @@ #include <serial.h> #include <asm/io.h> -DECLARE_GLOBAL_DATA_PTR; - /* status register */ #define ALTERA_UART_TMT BIT(5) /* tx empty */ #define ALTERA_UART_TRDY BIT(6) /* tx ready */ @@ -91,8 +89,7 @@ static int altera_uart_ofdata_to_platdata(struct udevice *dev) plat->regs = map_physmem(devfdt_get_addr(dev), sizeof(struct altera_uart_regs), MAP_NOCACHE); - plat->uartclk = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), - "clock-frequency", 0); + plat->uartclk = dev_read_u32_default(dev, "clock-frequency", 0); return 0; } |