Deleted Added
full compact
uart_dev_imx.c (248557) uart_dev_imx.c (248965)
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Oleksandr Rybalko under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Oleksandr Rybalko under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_imx.c 248557 2013-03-20 15:39:27Z ray $");
31__FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_imx.c 248965 2013-04-01 00:44:20Z ian $");
32
33#include "opt_ddb.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/bus.h>
38#include <sys/conf.h>
39#include <sys/kdb.h>

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

182 if (sc->sc_sysdev != NULL) {
183 di = sc->sc_sysdev;
184 imx_uart_init(bas, di->baudrate, di->databits, di->stopbits,
185 di->parity);
186 } else {
187 imx_uart_init(bas, 115200, 8, 1, 0);
188 }
189
32
33#include "opt_ddb.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/bus.h>
38#include <sys/conf.h>
39#include <sys/kdb.h>

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

182 if (sc->sc_sysdev != NULL) {
183 di = sc->sc_sysdev;
184 imx_uart_init(bas, di->baudrate, di->databits, di->stopbits,
185 di->parity);
186 } else {
187 imx_uart_init(bas, 115200, 8, 1, 0);
188 }
189
190 sc->sc_rxfifosz = 1;
191 sc->sc_txfifosz = 1;
192
193 (void)imx_uart_bus_getsig(sc);
194
195 /* XXX workaround to have working console on manut prompt */
196 if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE){
197 DIS(bas, UCR4, DREN);
198 } else {
199 ENA(bas, UCR4, DREN);
200 }

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

348imx_uart_bus_probe(struct uart_softc *sc)
349{
350 int error;
351
352 error = imx_uart_probe(&sc->sc_bas);
353 if (error)
354 return (error);
355
190 (void)imx_uart_bus_getsig(sc);
191
192 /* XXX workaround to have working console on manut prompt */
193 if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE){
194 DIS(bas, UCR4, DREN);
195 } else {
196 ENA(bas, UCR4, DREN);
197 }

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

345imx_uart_bus_probe(struct uart_softc *sc)
346{
347 int error;
348
349 error = imx_uart_probe(&sc->sc_bas);
350 if (error)
351 return (error);
352
353 sc->sc_rxfifosz = 1;
354 sc->sc_txfifosz = 1;
355
356 device_set_desc(sc->sc_dev, "imx_uart");
357 return (0);
358}
359
360static int
361imx_uart_bus_receive(struct uart_softc *sc)
362{
363 struct uart_bas *bas;

--- 73 unchanged lines hidden ---
356 device_set_desc(sc->sc_dev, "imx_uart");
357 return (0);
358}
359
360static int
361imx_uart_bus_receive(struct uart_softc *sc)
362{
363 struct uart_bas *bas;

--- 73 unchanged lines hidden ---