#define TX_FIFO_FULL (1 << 24)
/* Information about a serial port */
-struct s5p_serial_platdata {
+struct s5p_serial_plat {
struct s5p_uart *reg; /* address of registers in physical memory */
u8 port_id; /* uart port number */
};
#ifndef CONFIG_SPL_BUILD
int s5p_serial_setbrg(struct udevice *dev, int baudrate)
{
- struct s5p_serial_platdata *plat = dev->plat;
+ struct s5p_serial_plat *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
u32 uclk;
static int s5p_serial_probe(struct udevice *dev)
{
- struct s5p_serial_platdata *plat = dev->plat;
+ struct s5p_serial_plat *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
s5p_serial_init(uart);
static int s5p_serial_getc(struct udevice *dev)
{
- struct s5p_serial_platdata *plat = dev->plat;
+ struct s5p_serial_plat *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
if (!(readl(&uart->ufstat) & RX_FIFO_COUNT_MASK))
static int s5p_serial_putc(struct udevice *dev, const char ch)
{
- struct s5p_serial_platdata *plat = dev->plat;
+ struct s5p_serial_plat *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
if (readl(&uart->ufstat) & TX_FIFO_FULL)
static int s5p_serial_pending(struct udevice *dev, bool input)
{
- struct s5p_serial_platdata *plat = dev->plat;
+ struct s5p_serial_plat *plat = dev->plat;
struct s5p_uart *const uart = plat->reg;
uint32_t ufstat = readl(&uart->ufstat);
static int s5p_serial_of_to_plat(struct udevice *dev)
{
- struct s5p_serial_platdata *plat = dev->plat;
+ struct s5p_serial_plat *plat = dev->plat;
fdt_addr_t addr;
addr = dev_read_addr(dev);
.id = UCLASS_SERIAL,
.of_match = s5p_serial_ids,
.of_to_plat = s5p_serial_of_to_plat,
- .plat_auto = sizeof(struct s5p_serial_platdata),
+ .plat_auto = sizeof(struct s5p_serial_plat),
.probe = s5p_serial_probe,
.ops = &s5p_serial_ops,
};