qe_port           214 drivers/tty/serial/ucc_uart.c static inline dma_addr_t cpu2qe_addr(void *addr, struct uart_qe_port *qe_port)
qe_port           216 drivers/tty/serial/ucc_uart.c 	if (likely((addr >= qe_port->bd_virt)) &&
qe_port           217 drivers/tty/serial/ucc_uart.c 	    (addr < (qe_port->bd_virt + qe_port->bd_size)))
qe_port           218 drivers/tty/serial/ucc_uart.c 		return qe_port->bd_dma_addr + (addr - qe_port->bd_virt);
qe_port           232 drivers/tty/serial/ucc_uart.c static inline void *qe2cpu_addr(dma_addr_t addr, struct uart_qe_port *qe_port)
qe_port           235 drivers/tty/serial/ucc_uart.c 	if (likely((addr >= qe_port->bd_dma_addr) &&
qe_port           236 drivers/tty/serial/ucc_uart.c 		   (addr < (qe_port->bd_dma_addr + qe_port->bd_size))))
qe_port           237 drivers/tty/serial/ucc_uart.c 		return qe_port->bd_virt + (addr - qe_port->bd_dma_addr);
qe_port           255 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           257 drivers/tty/serial/ucc_uart.c 	struct qe_bd *bdp = qe_port->tx_bd_base;
qe_port           307 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           310 drivers/tty/serial/ucc_uart.c 	clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_TX);
qe_port           327 drivers/tty/serial/ucc_uart.c static int qe_uart_tx_pump(struct uart_qe_port *qe_port)
qe_port           332 drivers/tty/serial/ucc_uart.c 	struct uart_port *port = &qe_port->port;
qe_port           335 drivers/tty/serial/ucc_uart.c 	bdp = qe_port->rx_cur;
qe_port           340 drivers/tty/serial/ucc_uart.c 		bdp = qe_port->tx_cur;
qe_port           342 drivers/tty/serial/ucc_uart.c 		p = qe2cpu_addr(bdp->buf, qe_port);
qe_port           349 drivers/tty/serial/ucc_uart.c 			bdp = qe_port->tx_bd_base;
qe_port           352 drivers/tty/serial/ucc_uart.c 		qe_port->tx_cur = bdp;
qe_port           365 drivers/tty/serial/ucc_uart.c 	bdp = qe_port->tx_cur;
qe_port           370 drivers/tty/serial/ucc_uart.c 		p = qe2cpu_addr(bdp->buf, qe_port);
qe_port           371 drivers/tty/serial/ucc_uart.c 		while (count < qe_port->tx_fifosize) {
qe_port           385 drivers/tty/serial/ucc_uart.c 			bdp = qe_port->tx_bd_base;
qe_port           389 drivers/tty/serial/ucc_uart.c 	qe_port->tx_cur = bdp;
qe_port           413 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           417 drivers/tty/serial/ucc_uart.c 	if (in_be16(&qe_port->uccp->uccm) & UCC_UART_UCCE_TX)
qe_port           421 drivers/tty/serial/ucc_uart.c 	if (qe_uart_tx_pump(qe_port))
qe_port           422 drivers/tty/serial/ucc_uart.c 		setbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_TX);
qe_port           430 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           433 drivers/tty/serial/ucc_uart.c 	clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_RX);
qe_port           444 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           448 drivers/tty/serial/ucc_uart.c 		ucc_slow_stop_tx(qe_port->us_private);
qe_port           450 drivers/tty/serial/ucc_uart.c 		ucc_slow_restart_tx(qe_port->us_private);
qe_port           457 drivers/tty/serial/ucc_uart.c static void qe_uart_int_rx(struct uart_qe_port *qe_port)
qe_port           461 drivers/tty/serial/ucc_uart.c 	struct uart_port *port = &qe_port->port;
qe_port           470 drivers/tty/serial/ucc_uart.c 	bdp = qe_port->rx_cur;
qe_port           490 drivers/tty/serial/ucc_uart.c 		cp = qe2cpu_addr(bdp->buf, qe_port);
qe_port           513 drivers/tty/serial/ucc_uart.c 			bdp = qe_port->rx_bd_base;
qe_port           520 drivers/tty/serial/ucc_uart.c 	qe_port->rx_cur = bdp;
qe_port           566 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port = (struct uart_qe_port *) data;
qe_port           567 drivers/tty/serial/ucc_uart.c 	struct ucc_slow __iomem *uccp = qe_port->uccp;
qe_port           575 drivers/tty/serial/ucc_uart.c 		uart_handle_break(&qe_port->port);
qe_port           578 drivers/tty/serial/ucc_uart.c 		qe_uart_int_rx(qe_port);
qe_port           581 drivers/tty/serial/ucc_uart.c 		qe_uart_tx_pump(qe_port);
qe_port           590 drivers/tty/serial/ucc_uart.c static void qe_uart_initbd(struct uart_qe_port *qe_port)
qe_port           599 drivers/tty/serial/ucc_uart.c 	bd_virt = qe_port->bd_virt;
qe_port           600 drivers/tty/serial/ucc_uart.c 	bdp = qe_port->rx_bd_base;
qe_port           601 drivers/tty/serial/ucc_uart.c 	qe_port->rx_cur = qe_port->rx_bd_base;
qe_port           602 drivers/tty/serial/ucc_uart.c 	for (i = 0; i < (qe_port->rx_nrfifos - 1); i++) {
qe_port           604 drivers/tty/serial/ucc_uart.c 		out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
qe_port           606 drivers/tty/serial/ucc_uart.c 		bd_virt += qe_port->rx_fifosize;
qe_port           612 drivers/tty/serial/ucc_uart.c 	out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
qe_port           619 drivers/tty/serial/ucc_uart.c 	bd_virt = qe_port->bd_virt +
qe_port           620 drivers/tty/serial/ucc_uart.c 		L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize);
qe_port           621 drivers/tty/serial/ucc_uart.c 	qe_port->tx_cur = qe_port->tx_bd_base;
qe_port           622 drivers/tty/serial/ucc_uart.c 	bdp = qe_port->tx_bd_base;
qe_port           623 drivers/tty/serial/ucc_uart.c 	for (i = 0; i < (qe_port->tx_nrfifos - 1); i++) {
qe_port           625 drivers/tty/serial/ucc_uart.c 		out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
qe_port           627 drivers/tty/serial/ucc_uart.c 		bd_virt += qe_port->tx_fifosize;
qe_port           633 drivers/tty/serial/ucc_uart.c 	setbits16(&qe_port->tx_cur->status, BD_SC_P);
qe_port           637 drivers/tty/serial/ucc_uart.c 	out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
qe_port           648 drivers/tty/serial/ucc_uart.c static void qe_uart_init_ucc(struct uart_qe_port *qe_port)
qe_port           651 drivers/tty/serial/ucc_uart.c 	struct ucc_slow __iomem *uccp = qe_port->uccp;
qe_port           652 drivers/tty/serial/ucc_uart.c 	struct ucc_uart_pram *uccup = qe_port->uccup;
qe_port           657 drivers/tty/serial/ucc_uart.c 	ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX);
qe_port           662 drivers/tty/serial/ucc_uart.c 	out_be16(&uccup->common.mrblr, qe_port->rx_fifosize);
qe_port           763 drivers/tty/serial/ucc_uart.c 		cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num);
qe_port           767 drivers/tty/serial/ucc_uart.c 		cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num);
qe_port           778 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           791 drivers/tty/serial/ucc_uart.c 	qe_uart_initbd(qe_port);
qe_port           792 drivers/tty/serial/ucc_uart.c 	qe_uart_init_ucc(qe_port);
qe_port           796 drivers/tty/serial/ucc_uart.c 		qe_port);
qe_port           803 drivers/tty/serial/ucc_uart.c 	setbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_RX);
qe_port           804 drivers/tty/serial/ucc_uart.c 	ucc_slow_enable(qe_port->us_private, COMM_DIR_RX_AND_TX);
qe_port           814 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           816 drivers/tty/serial/ucc_uart.c 	struct ucc_slow __iomem *uccp = qe_port->uccp;
qe_port           831 drivers/tty/serial/ucc_uart.c 	if (qe_port->wait_closing) {
qe_port           834 drivers/tty/serial/ucc_uart.c 		schedule_timeout(qe_port->wait_closing);
qe_port           838 drivers/tty/serial/ucc_uart.c 	ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX);
qe_port           842 drivers/tty/serial/ucc_uart.c 	ucc_slow_graceful_stop_tx(qe_port->us_private);
qe_port           843 drivers/tty/serial/ucc_uart.c 	qe_uart_initbd(qe_port);
qe_port           845 drivers/tty/serial/ucc_uart.c 	free_irq(port->irq, qe_port);
qe_port           854 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           856 drivers/tty/serial/ucc_uart.c 	struct ucc_slow __iomem *uccp = qe_port->uccp;
qe_port           860 drivers/tty/serial/ucc_uart.c 	struct ucc_uart_pram __iomem *uccup = qe_port->uccup;
qe_port           965 drivers/tty/serial/ucc_uart.c 		qe_setbrg(qe_port->us_info.rx_clock, baud, 16);
qe_port           966 drivers/tty/serial/ucc_uart.c 		qe_setbrg(qe_port->us_info.tx_clock, baud, 1);
qe_port           968 drivers/tty/serial/ucc_uart.c 		qe_setbrg(qe_port->us_info.rx_clock, baud, 16);
qe_port           969 drivers/tty/serial/ucc_uart.c 		qe_setbrg(qe_port->us_info.tx_clock, baud, 16);
qe_port           989 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port           991 drivers/tty/serial/ucc_uart.c 	struct ucc_slow_info *us_info = &qe_port->us_info;
qe_port          1000 drivers/tty/serial/ucc_uart.c 		       qe_port->ucc_num);
qe_port          1004 drivers/tty/serial/ucc_uart.c 	qe_port->us_private = uccs;
qe_port          1005 drivers/tty/serial/ucc_uart.c 	qe_port->uccp = uccs->us_regs;
qe_port          1006 drivers/tty/serial/ucc_uart.c 	qe_port->uccup = (struct ucc_uart_pram *) uccs->us_pram;
qe_port          1007 drivers/tty/serial/ucc_uart.c 	qe_port->rx_bd_base = uccs->rx_bd;
qe_port          1008 drivers/tty/serial/ucc_uart.c 	qe_port->tx_bd_base = uccs->tx_bd;
qe_port          1014 drivers/tty/serial/ucc_uart.c 	rx_size = L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize);
qe_port          1015 drivers/tty/serial/ucc_uart.c 	tx_size = L1_CACHE_ALIGN(qe_port->tx_nrfifos * qe_port->tx_fifosize);
qe_port          1024 drivers/tty/serial/ucc_uart.c 	qe_port->bd_virt = bd_virt;
qe_port          1025 drivers/tty/serial/ucc_uart.c 	qe_port->bd_dma_addr = bd_dma_addr;
qe_port          1026 drivers/tty/serial/ucc_uart.c 	qe_port->bd_size = rx_size + tx_size;
qe_port          1028 drivers/tty/serial/ucc_uart.c 	qe_port->rx_buf = bd_virt;
qe_port          1029 drivers/tty/serial/ucc_uart.c 	qe_port->tx_buf = qe_port->rx_buf + rx_size;
qe_port          1055 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port =
qe_port          1057 drivers/tty/serial/ucc_uart.c 	struct ucc_slow_private *uccs = qe_port->us_private;
qe_port          1059 drivers/tty/serial/ucc_uart.c 	dma_free_coherent(port->dev, qe_port->bd_size, qe_port->bd_virt,
qe_port          1060 drivers/tty/serial/ucc_uart.c 			  qe_port->bd_dma_addr);
qe_port          1196 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port = NULL;
qe_port          1256 drivers/tty/serial/ucc_uart.c 	qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
qe_port          1257 drivers/tty/serial/ucc_uart.c 	if (!qe_port) {
qe_port          1273 drivers/tty/serial/ucc_uart.c 	qe_port->port.mapbase = res.start;
qe_port          1293 drivers/tty/serial/ucc_uart.c 	qe_port->ucc_num = *iprop - 1;
qe_port          1309 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.rx_clock = qe_clock_source(sprop);
qe_port          1310 drivers/tty/serial/ucc_uart.c 	if ((qe_port->us_info.rx_clock < QE_BRG1) ||
qe_port          1311 drivers/tty/serial/ucc_uart.c 	    (qe_port->us_info.rx_clock > QE_BRG16)) {
qe_port          1319 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.tx_clock = qe_port->us_info.rx_clock;
qe_port          1327 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.tx_clock = qe_clock_source(sprop);
qe_port          1329 drivers/tty/serial/ucc_uart.c 	if ((qe_port->us_info.tx_clock < QE_BRG1) ||
qe_port          1330 drivers/tty/serial/ucc_uart.c 	    (qe_port->us_info.tx_clock > QE_BRG16)) {
qe_port          1343 drivers/tty/serial/ucc_uart.c 	qe_port->port.line = *iprop;
qe_port          1344 drivers/tty/serial/ucc_uart.c 	if (qe_port->port.line >= UCC_MAX_UART) {
qe_port          1351 drivers/tty/serial/ucc_uart.c 	qe_port->port.irq = irq_of_parse_and_map(np, 0);
qe_port          1352 drivers/tty/serial/ucc_uart.c 	if (qe_port->port.irq == 0) {
qe_port          1354 drivers/tty/serial/ucc_uart.c 		       qe_port->ucc_num + 1);
qe_port          1382 drivers/tty/serial/ucc_uart.c 		qe_port->port.uartclk = *iprop;
qe_port          1397 drivers/tty/serial/ucc_uart.c 			qe_port->port.uartclk = *iprop / 2;
qe_port          1406 drivers/tty/serial/ucc_uart.c 	spin_lock_init(&qe_port->port.lock);
qe_port          1407 drivers/tty/serial/ucc_uart.c 	qe_port->np = np;
qe_port          1408 drivers/tty/serial/ucc_uart.c 	qe_port->port.dev = &ofdev->dev;
qe_port          1409 drivers/tty/serial/ucc_uart.c 	qe_port->port.ops = &qe_uart_pops;
qe_port          1410 drivers/tty/serial/ucc_uart.c 	qe_port->port.iotype = UPIO_MEM;
qe_port          1412 drivers/tty/serial/ucc_uart.c 	qe_port->tx_nrfifos = TX_NUM_FIFO;
qe_port          1413 drivers/tty/serial/ucc_uart.c 	qe_port->tx_fifosize = TX_BUF_SIZE;
qe_port          1414 drivers/tty/serial/ucc_uart.c 	qe_port->rx_nrfifos = RX_NUM_FIFO;
qe_port          1415 drivers/tty/serial/ucc_uart.c 	qe_port->rx_fifosize = RX_BUF_SIZE;
qe_port          1417 drivers/tty/serial/ucc_uart.c 	qe_port->wait_closing = UCC_WAIT_CLOSING;
qe_port          1418 drivers/tty/serial/ucc_uart.c 	qe_port->port.fifosize = 512;
qe_port          1419 drivers/tty/serial/ucc_uart.c 	qe_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP;
qe_port          1421 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.ucc_num = qe_port->ucc_num;
qe_port          1422 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.regs = (phys_addr_t) res.start;
qe_port          1423 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.irq = qe_port->port.irq;
qe_port          1425 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.rx_bd_ring_len = qe_port->rx_nrfifos;
qe_port          1426 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.tx_bd_ring_len = qe_port->tx_nrfifos;
qe_port          1429 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.init_tx = 1;
qe_port          1430 drivers/tty/serial/ucc_uart.c 	qe_port->us_info.init_rx = 1;
qe_port          1436 drivers/tty/serial/ucc_uart.c 	ret = uart_add_one_port(&ucc_uart_driver, &qe_port->port);
qe_port          1439 drivers/tty/serial/ucc_uart.c 		       qe_port->port.line);
qe_port          1443 drivers/tty/serial/ucc_uart.c 	platform_set_drvdata(ofdev, qe_port);
qe_port          1446 drivers/tty/serial/ucc_uart.c 		qe_port->ucc_num + 1, qe_port->port.line);
qe_port          1450 drivers/tty/serial/ucc_uart.c 	       qe_port->port.line, SERIAL_QE_MAJOR,
qe_port          1451 drivers/tty/serial/ucc_uart.c 	       SERIAL_QE_MINOR + qe_port->port.line);
qe_port          1457 drivers/tty/serial/ucc_uart.c 	kfree(qe_port);
qe_port          1463 drivers/tty/serial/ucc_uart.c 	struct uart_qe_port *qe_port = platform_get_drvdata(ofdev);
qe_port          1465 drivers/tty/serial/ucc_uart.c 	dev_info(&ofdev->dev, "removing /dev/ttyQE%u\n", qe_port->port.line);
qe_port          1467 drivers/tty/serial/ucc_uart.c 	uart_remove_one_port(&ucc_uart_driver, &qe_port->port);
qe_port          1469 drivers/tty/serial/ucc_uart.c 	kfree(qe_port);