2 * Copyright (c) 2015 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/arch/clock.h>
13 static const struct udevice_id rockchip_serial_ids[] = {
14 { .compatible = "rockchip,rk3288-uart" },
18 static int rockchip_serial_ofdata_to_platdata(struct udevice *dev)
20 struct ns16550_platdata *plat = dev_get_platdata(dev);
23 ret = ns16550_serial_ofdata_to_platdata(dev);
27 /* Do all Rockchip parts use 24MHz? */
28 plat->clock = 24 * 1000000;
33 U_BOOT_DRIVER(serial_ns16550) = {
34 .name = "serial_rockchip",
36 .of_match = rockchip_serial_ids,
37 .ofdata_to_platdata = rockchip_serial_ofdata_to_platdata,
38 .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
39 .priv_auto_alloc_size = sizeof(struct NS16550),
40 .probe = ns16550_serial_probe,
41 .ops = &ns16550_serial_ops,
42 .flags = DM_FLAG_PRE_RELOC,