Deleted Added
full compact
uart_dev_rt305x.c (220297) uart_dev_rt305x.c (248965)
1/* $NetBSD: uart.c,v 1.2 2007/03/23 20:05:47 dogcow Exp $ */
2
3/*-
4 * Copyright (c) 2010 Aleksandr Rybalko.
5 * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
6 * Copyright (c) 2007 Oleksandr Tymoshenko.
7 * All rights reserved.
8 *

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

26 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
28 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30 * OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/* $NetBSD: uart.c,v 1.2 2007/03/23 20:05:47 dogcow Exp $ */
2
3/*-
4 * Copyright (c) 2010 Aleksandr Rybalko.
5 * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
6 * Copyright (c) 2007 Oleksandr Tymoshenko.
7 * All rights reserved.
8 *

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

26 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
28 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30 * OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/mips/rt305x/uart_dev_rt305x.c 220297 2011-04-03 14:39:55Z adrian $");
34__FBSDID("$FreeBSD: head/sys/mips/rt305x/uart_dev_rt305x.c 248965 2013-04-01 00:44:20Z ian $");
35
36#include "opt_ddb.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/bus.h>
41#include <sys/conf.h>
42#include <sys/kdb.h>

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

267 if (sc->sc_sysdev != NULL) {
268 di = sc->sc_sysdev;
269 rt305x_uart_init(bas, di->baudrate, di->databits, di->stopbits,
270 di->parity);
271 } else {
272 rt305x_uart_init(bas, 115200, 8, 1, 0);
273 }
274
35
36#include "opt_ddb.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/bus.h>
41#include <sys/conf.h>
42#include <sys/kdb.h>

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

267 if (sc->sc_sysdev != NULL) {
268 di = sc->sc_sysdev;
269 rt305x_uart_init(bas, di->baudrate, di->databits, di->stopbits,
270 di->parity);
271 } else {
272 rt305x_uart_init(bas, 115200, 8, 1, 0);
273 }
274
275 sc->sc_rxfifosz = 16;
276 sc->sc_txfifosz = 16;
277
278 (void)rt305x_uart_bus_getsig(sc);
279
280 /* Enable FIFO */
281 uart_setreg(bas, UART_FCR_REG,
282 uart_getreg(bas, UART_FCR_REG) |
283 UART_FCR_FIFOEN | UART_FCR_TXTGR_1 | UART_FCR_RXTGR_1);
284 uart_barrier(bas);
285 /* Enable interrupts */

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

433{
434 char buf[80];
435 int error;
436
437 error = rt305x_uart_probe(&sc->sc_bas);
438 if (error)
439 return (error);
440
275 (void)rt305x_uart_bus_getsig(sc);
276
277 /* Enable FIFO */
278 uart_setreg(bas, UART_FCR_REG,
279 uart_getreg(bas, UART_FCR_REG) |
280 UART_FCR_FIFOEN | UART_FCR_TXTGR_1 | UART_FCR_RXTGR_1);
281 uart_barrier(bas);
282 /* Enable interrupts */

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

430{
431 char buf[80];
432 int error;
433
434 error = rt305x_uart_probe(&sc->sc_bas);
435 if (error)
436 return (error);
437
438 sc->sc_rxfifosz = 16;
439 sc->sc_txfifosz = 16;
440
441 snprintf(buf, sizeof(buf), "rt305x_uart");
442 device_set_desc_copy(sc->sc_dev, buf);
443
444 return (0);
445}
446
447static int
448rt305x_uart_bus_receive(struct uart_softc *sc)

--- 59 unchanged lines hidden ---
441 snprintf(buf, sizeof(buf), "rt305x_uart");
442 device_set_desc_copy(sc->sc_dev, buf);
443
444 return (0);
445}
446
447static int
448rt305x_uart_bus_receive(struct uart_softc *sc)

--- 59 unchanged lines hidden ---