mirror of
https://xff.cz/git/u-boot/
synced 2025-09-04 10:12:14 +02:00
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>
This commit is contained in:
committed by
Marek Vasut
parent
27c3e07bcb
commit
41b22c0acc
@@ -10,8 +10,6 @@
|
|||||||
#include <serial.h>
|
#include <serial.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
|
||||||
|
|
||||||
/* status register */
|
/* status register */
|
||||||
#define ALTERA_UART_TMT BIT(5) /* tx empty */
|
#define ALTERA_UART_TMT BIT(5) /* tx empty */
|
||||||
#define ALTERA_UART_TRDY BIT(6) /* tx ready */
|
#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),
|
plat->regs = map_physmem(devfdt_get_addr(dev),
|
||||||
sizeof(struct altera_uart_regs),
|
sizeof(struct altera_uart_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
plat->uartclk = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
|
plat->uartclk = dev_read_u32_default(dev, "clock-frequency", 0);
|
||||||
"clock-frequency", 0);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user