2 * Copyright (c) 2014 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
13 DECLARE_GLOBAL_DATA_PTR;
15 static const struct udevice_id x86_serial_ids[] = {
16 { .compatible = "x86-uart" },
20 static int x86_serial_ofdata_to_platdata(struct udevice *dev)
22 struct ns16550_platdata *plat = dev_get_platdata(dev);
25 ret = ns16550_serial_ofdata_to_platdata(dev);
29 plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
30 "clock-frequency", 1843200);
35 U_BOOT_DRIVER(serial_ns16550) = {
38 .of_match = x86_serial_ids,
39 .ofdata_to_platdata = x86_serial_ofdata_to_platdata,
40 .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
41 .priv_auto_alloc_size = sizeof(struct NS16550),
42 .probe = ns16550_serial_probe,
43 .ops = &ns16550_serial_ops,