2 * Copyright (c) 2014 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
12 static const struct udevice_id dw_serial_ids[] = {
13 { .compatible = "snps,dw-apb-uart" },
17 static int dw_serial_ofdata_to_platdata(struct udevice *dev)
19 struct ns16550_platdata *plat = dev_get_platdata(dev);
22 ret = ns16550_serial_ofdata_to_platdata(dev);
25 plat->clock = CONFIG_SYS_NS16550_CLK;
30 U_BOOT_DRIVER(serial_ns16550) = {
33 .of_match = dw_serial_ids,
34 .ofdata_to_platdata = dw_serial_ofdata_to_platdata,
35 .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
36 .priv_auto_alloc_size = sizeof(struct NS16550),
37 .probe = ns16550_serial_probe,
38 .ops = &ns16550_serial_ops,