static int rockchip_serial_probe(struct udevice *dev) { struct rockchip_uart_platdata *plat = dev_get_platdata(dev); /* Create some new platform data for the standard driver */ plat->plat.base = plat->dtplat.reg[0]; plat->plat.reg_shift = plat->dtplat.reg_shift; plat->plat.clock = plat->dtplat.clock_frequency; dev->platdata = &plat->plat; return ns16550_serial_probe(dev); }
static int mid_serial_probe(struct udevice *dev) { struct ns16550_platdata *plat = dev_get_platdata(dev); /* * Initialize fractional divider correctly for Intel Edison * platform. * * For backward compatibility we have to set initial DLAB value * to 16 and speed to 115200 baud, where initial frequency is * 29491200Hz, and XTAL frequency is 38.4MHz. */ mid_writel(plat, UART_MUL, 96); mid_writel(plat, UART_DIV, 125); mid_writel(plat, UART_PS, 16); return ns16550_serial_probe(dev); }