aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/Kconfig2
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c13
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm2.c11
-rw-r--r--drivers/serial/pmac_zilog.c6
4 files changed, 22 insertions, 10 deletions
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 74b80f7c062d..e39818a34a07 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -308,7 +308,7 @@ config SERIAL_S3C2410_CONSOLE
308 308
309config SERIAL_DZ 309config SERIAL_DZ
310 bool "DECstation DZ serial driver" 310 bool "DECstation DZ serial driver"
311 depends on MACH_DECSTATION && MIPS32 311 depends on MACH_DECSTATION && 32BIT
312 select SERIAL_CORE 312 select SERIAL_CORE
313 help 313 help
314 DZ11-family serial controllers for VAXstations, including the 314 DZ11-family serial controllers for VAXstations, including the
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 282b32351d8e..25825f2aba22 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -403,10 +403,8 @@ static int cpm_uart_startup(struct uart_port *port)
403 403
404inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo) 404inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo)
405{ 405{
406 unsigned long target_jiffies = jiffies + pinfo->wait_closing; 406 set_current_state(TASK_UNINTERRUPTIBLE);
407 407 schedule_timeout(pinfo->wait_closing);
408 while (!time_after(jiffies, target_jiffies))
409 schedule();
410} 408}
411 409
412/* 410/*
@@ -425,9 +423,12 @@ static void cpm_uart_shutdown(struct uart_port *port)
425 /* If the port is not the console, disable Rx and Tx. */ 423 /* If the port is not the console, disable Rx and Tx. */
426 if (!(pinfo->flags & FLAG_CONSOLE)) { 424 if (!(pinfo->flags & FLAG_CONSOLE)) {
427 /* Wait for all the BDs marked sent */ 425 /* Wait for all the BDs marked sent */
428 while(!cpm_uart_tx_empty(port)) 426 while(!cpm_uart_tx_empty(port)) {
427 set_current_state(TASK_UNINTERRUPTIBLE);
429 schedule_timeout(2); 428 schedule_timeout(2);
430 if(pinfo->wait_closing) 429 }
430
431 if (pinfo->wait_closing)
431 cpm_uart_wait_until_send(pinfo); 432 cpm_uart_wait_until_send(pinfo);
432 433
433 /* Stop uarts */ 434 /* Stop uarts */
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
index c4c8f4b44f53..15ad58d94889 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -142,6 +142,14 @@ void scc2_lineif(struct uart_cpm_port *pinfo)
142 * be supported in a sane fashion. 142 * be supported in a sane fashion.
143 */ 143 */
144#ifndef CONFIG_STX_GP3 144#ifndef CONFIG_STX_GP3
145#ifdef CONFIG_MPC8560_ADS
146 volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
147 io->iop_ppard |= 0x00000018;
148 io->iop_psord &= ~0x00000008; /* Rx */
149 io->iop_psord &= ~0x00000010; /* Tx */
150 io->iop_pdird &= ~0x00000008; /* Rx */
151 io->iop_pdird |= 0x00000010; /* Tx */
152#else
145 volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; 153 volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
146 io->iop_pparb |= 0x008b0000; 154 io->iop_pparb |= 0x008b0000;
147 io->iop_pdirb |= 0x00880000; 155 io->iop_pdirb |= 0x00880000;
@@ -149,6 +157,7 @@ void scc2_lineif(struct uart_cpm_port *pinfo)
149 io->iop_pdirb &= ~0x00030000; 157 io->iop_pdirb &= ~0x00030000;
150 io->iop_psorb &= ~0x00030000; 158 io->iop_psorb &= ~0x00030000;
151#endif 159#endif
160#endif
152 cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff; 161 cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff;
153 cpm2_immr->im_cpmux.cmx_scr |= 0x00090000; 162 cpm2_immr->im_cpmux.cmx_scr |= 0x00090000;
154 pinfo->brg = 2; 163 pinfo->brg = 2;
@@ -257,6 +266,7 @@ int cpm_uart_init_portdesc(void)
257 cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0]; 266 cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0];
258 cpm_uart_ports[UART_SMC1].smcup = 267 cpm_uart_ports[UART_SMC1].smcup =
259 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1]; 268 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1];
269 *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC1_BASE]) = PROFF_SMC1;
260 cpm_uart_ports[UART_SMC1].port.mapbase = 270 cpm_uart_ports[UART_SMC1].port.mapbase =
261 (unsigned long)&cpm2_immr->im_smc[0]; 271 (unsigned long)&cpm2_immr->im_smc[0];
262 cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); 272 cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
@@ -269,6 +279,7 @@ int cpm_uart_init_portdesc(void)
269 cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1]; 279 cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1];
270 cpm_uart_ports[UART_SMC2].smcup = 280 cpm_uart_ports[UART_SMC2].smcup =
271 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2]; 281 (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2];
282 *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC2_BASE]) = PROFF_SMC2;
272 cpm_uart_ports[UART_SMC2].port.mapbase = 283 cpm_uart_ports[UART_SMC2].port.mapbase =
273 (unsigned long)&cpm2_immr->im_smc[1]; 284 (unsigned long)&cpm2_immr->im_smc[1];
274 cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); 285 cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX);
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 5bfde99e245e..5ddd8ab1f108 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1600,7 +1600,7 @@ static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state)
1600 return 0; 1600 return 0;
1601 } 1601 }
1602 1602
1603 if (pm_state == mdev->ofdev.dev.power.power_state || pm_state < 2) 1603 if (pm_state.event == mdev->ofdev.dev.power.power_state.event)
1604 return 0; 1604 return 0;
1605 1605
1606 pmz_debug("suspend, switching to state %d\n", pm_state); 1606 pmz_debug("suspend, switching to state %d\n", pm_state);
@@ -1660,7 +1660,7 @@ static int pmz_resume(struct macio_dev *mdev)
1660 if (uap == NULL) 1660 if (uap == NULL)
1661 return 0; 1661 return 0;
1662 1662
1663 if (mdev->ofdev.dev.power.power_state == 0) 1663 if (mdev->ofdev.dev.power.power_state.event == PM_EVENT_ON)
1664 return 0; 1664 return 0;
1665 1665
1666 pmz_debug("resume, switching to state 0\n"); 1666 pmz_debug("resume, switching to state 0\n");
@@ -1713,7 +1713,7 @@ static int pmz_resume(struct macio_dev *mdev)
1713 1713
1714 pmz_debug("resume, switching complete\n"); 1714 pmz_debug("resume, switching complete\n");
1715 1715
1716 mdev->ofdev.dev.power.power_state = 0; 1716 mdev->ofdev.dev.power.power_state.event = PM_EVENT_ON;
1717 1717
1718 return 0; 1718 return 0;
1719} 1719}