serial.c (d0f53fafc016b3f4f20f63ecf52f6df8774bcb3c) serial.c (85498ae87c7d789de613b7e21bd539577142c3cb)
1/*
2 * Generic serial console support
3 *
4 * Author: Mark A. Greer <mgreer@mvista.com>
5 *
6 * Code in serial_edit_cmdline() copied from <file:arch/ppc/boot/simple/misc.c>
7 * and was written by Matt Porter <mporter@kernel.crashing.org>.
8 *

--- 112 unchanged lines hidden (view full) ---

121 rc = ns16550_console_init(devp, &serial_cd);
122 else if (dt_is_compatible(devp, "marvell,mpsc"))
123 rc = mpsc_console_init(devp, &serial_cd);
124 else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") ||
125 dt_is_compatible(devp, "fsl,cpm1-smc-uart") ||
126 dt_is_compatible(devp, "fsl,cpm2-scc-uart") ||
127 dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
128 rc = cpm_console_init(devp, &serial_cd);
1/*
2 * Generic serial console support
3 *
4 * Author: Mark A. Greer <mgreer@mvista.com>
5 *
6 * Code in serial_edit_cmdline() copied from <file:arch/ppc/boot/simple/misc.c>
7 * and was written by Matt Porter <mporter@kernel.crashing.org>.
8 *

--- 112 unchanged lines hidden (view full) ---

121 rc = ns16550_console_init(devp, &serial_cd);
122 else if (dt_is_compatible(devp, "marvell,mpsc"))
123 rc = mpsc_console_init(devp, &serial_cd);
124 else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") ||
125 dt_is_compatible(devp, "fsl,cpm1-smc-uart") ||
126 dt_is_compatible(devp, "fsl,cpm2-scc-uart") ||
127 dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
128 rc = cpm_console_init(devp, &serial_cd);
129 else if (dt_is_compatible(devp, "mpc5200-psc-uart"))
130 rc = mpc5200_psc_console_init(devp, &serial_cd);
129
130 /* Add other serial console driver calls here */
131
132 if (!rc) {
133 console_ops.open = serial_open;
134 console_ops.write = serial_write;
135 console_ops.close = serial_close;
136 console_ops.data = &serial_cd;
137
138 if (serial_cd.getc)
139 console_ops.edit_cmdline = serial_edit_cmdline;
140
141 return 0;
142 }
143err_out:
144 return -1;
145}
131
132 /* Add other serial console driver calls here */
133
134 if (!rc) {
135 console_ops.open = serial_open;
136 console_ops.write = serial_write;
137 console_ops.close = serial_close;
138 console_ops.data = &serial_cd;
139
140 if (serial_cd.getc)
141 console_ops.edit_cmdline = serial_edit_cmdline;
142
143 return 0;
144 }
145err_out:
146 return -1;
147}