Exemplo n.º 1
0
/*
 * Start transmitter
 */
static void cpm_uart_start_tx(struct uart_port *port)
{
	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
	volatile smc_t *smcp = pinfo->smcp;
	volatile scc_t *sccp = pinfo->sccp;

	pr_debug("CPM uart[%d]:start tx\n", port->line);

	if (IS_SMC(pinfo)) {
		if (smcp->smc_smcm & SMCM_TX)
			return;
	} else {
		if (sccp->scc_sccm & UART_SCCM_TX)
			return;
	}

	if (cpm_uart_tx_pump(port) != 0) {
		if (IS_SMC(pinfo)) {
			smcp->smc_smcm |= SMCM_TX;
			smcp->smc_smcmr |= SMCMR_TEN;
		} else {
			sccp->scc_sccm |= UART_SCCM_TX;
			pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT;
		}
	}
}
Exemplo n.º 2
0
/*
 * Start transmitter
 */
static void cpm_uart_start_tx(struct uart_port *port, unsigned int tty_start)
{
    struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
    volatile smc_t *smcp = pinfo->smcp;
    volatile scc_t *sccp = pinfo->sccp;

    pr_debug("CPM uart[%d]:start tx\n", port->line);

    if (IS_SMC(pinfo)) {
        if (smcp->smc_smcm & SMCM_TX)
            return;
    } else {
        if (sccp->scc_sccm & UART_SCCM_TX)
            return;
    }

    if (cpm_uart_tx_pump(port) != 0) {
        if (IS_SMC(pinfo))
            smcp->smc_smcm |= SMCM_TX;
        else
            sccp->scc_sccm |= UART_SCCM_TX;
    }
}
Exemplo n.º 3
0
/*
 * Start transmitter
 */
static void cpm_uart_start_tx(struct uart_port *port)
{
	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
	smc_t __iomem *smcp = pinfo->smcp;
	scc_t __iomem *sccp = pinfo->sccp;

	pr_debug("CPM uart[%d]:start tx\n", port->line);

	if (IS_SMC(pinfo)) {
		if (in_8(&smcp->smc_smcm) & SMCM_TX)
			return;
	} else {
		if (in_be16(&sccp->scc_sccm) & UART_SCCM_TX)
			return;
	}

	if (cpm_uart_tx_pump(port) != 0) {
		if (IS_SMC(pinfo)) {
			setbits8(&smcp->smc_smcm, SMCM_TX);
		} else {
			setbits16(&sccp->scc_sccm, UART_SCCM_TX);
		}
	}
}
Exemplo n.º 4
0
/*
 * Transmit characters, refill buffer descriptor, if possible
 */
static void cpm_uart_int_tx(struct uart_port *port)
{
	pr_debug("CPM uart[%d]:TX INT\n", port->line);

	cpm_uart_tx_pump(port);
}