13 #include <linux/module.h>
14 #include <linux/slab.h>
16 #include <linux/serial_core.h>
30 #ifdef CONFIG_ARCH_TEGRA
31 void tegra_serial_handle_break(
struct uart_port *
p)
33 unsigned int status, tmout = 10000;
61 memset(port, 0,
sizeof *port);
62 if (of_property_read_u32(np,
"clock-frequency", &clk)) {
63 dev_warn(&ofdev->
dev,
"no clock-frequency property set\n");
67 if (of_property_read_u32(np,
"current-speed", &spd) == 0)
80 if (of_property_read_u32(np,
"reg-offset", &prop) == 0)
84 if (of_property_read_u32(np,
"reg-shift", &prop) == 0)
89 if (of_property_read_u32(np,
"reg-io-width", &prop) == 0) {
98 dev_warn(&ofdev->
dev,
"unsupported reg-io-width (%d)\n",
143 port_type = (
unsigned long)match->
data;
144 ret = of_platform_serial_setup(ofdev, port_type, &port);
149 #ifdef CONFIG_SERIAL_8250
155 memset(&port8250, 0,
sizeof(port8250));
156 port8250.port =
port;
161 #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
169 dev_info(&ofdev->
dev,
"Unknown serial port found, ignored\n");
192 switch (info->
type) {
193 #ifdef CONFIG_SERIAL_8250
198 #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
215 { .compatible =
"ns8250", .data = (
void *)
PORT_8250, },
216 { .compatible =
"ns16450", .data = (
void *)
PORT_16450, },
217 { .compatible =
"ns16550a", .data = (
void *)
PORT_16550A, },
218 { .compatible =
"ns16550", .data = (
void *)
PORT_16550, },
219 { .compatible =
"ns16750", .data = (
void *)
PORT_16750, },
220 { .compatible =
"ns16850", .data = (
void *)
PORT_16850, },
221 { .compatible =
"nvidia,tegra20-uart", .data = (
void *)
PORT_TEGRA, },
222 { .compatible =
"nxp,lpc3220-uart", .data = (
void *)
PORT_LPC3220, },
223 #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
224 { .compatible =
"ibm,qpace-nwp-serial",
235 .of_match_table = of_platform_serial_table,
237 .probe = of_platform_serial_probe,
238 .remove = of_platform_serial_remove,