diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 12:48:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 12:48:31 -0400 |
commit | c87985a3ce723995fc7b25e598238d67154108a1 (patch) | |
tree | e60def1b77c25c1d74180f62e8a5603f9826f209 /drivers/tty | |
parent | d155255a344c417acad74156654295a2964e6b81 (diff) | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) |
Merge tty-next into 3.6-rc1
This handles the merge issue in:
arch/um/drivers/line.c
arch/um/drivers/line.h
And resolves the duplicate patches that were in both trees do to the
tty-next branch not getting merged into 3.6-rc1.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/hvc/hvc_xen.c | 15 | ||||
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/imx.c | 6 | ||||
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 42 | ||||
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 13 | ||||
-rw-r--r-- | drivers/tty/serial/uartlite.c | 3 |
6 files changed, 56 insertions, 25 deletions
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 944eaeb8e0cf..1e456dca4f60 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c | |||
@@ -209,11 +209,10 @@ static int xen_hvm_console_init(void) | |||
209 | info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO); | 209 | info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO); |
210 | if (!info) | 210 | if (!info) |
211 | return -ENOMEM; | 211 | return -ENOMEM; |
212 | } | 212 | } else if (info->intf != NULL) { |
213 | 213 | /* already configured */ | |
214 | /* already configured */ | ||
215 | if (info->intf != NULL) | ||
216 | return 0; | 214 | return 0; |
215 | } | ||
217 | /* | 216 | /* |
218 | * If the toolstack (or the hypervisor) hasn't set these values, the | 217 | * If the toolstack (or the hypervisor) hasn't set these values, the |
219 | * default value is 0. Even though mfn = 0 and evtchn = 0 are | 218 | * default value is 0. Even though mfn = 0 and evtchn = 0 are |
@@ -259,12 +258,10 @@ static int xen_pv_console_init(void) | |||
259 | info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO); | 258 | info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO); |
260 | if (!info) | 259 | if (!info) |
261 | return -ENOMEM; | 260 | return -ENOMEM; |
262 | } | 261 | } else if (info->intf != NULL) { |
263 | 262 | /* already configured */ | |
264 | /* already configured */ | ||
265 | if (info->intf != NULL) | ||
266 | return 0; | 263 | return 0; |
267 | 264 | } | |
268 | info->evtchn = xen_start_info->console.domU.evtchn; | 265 | info->evtchn = xen_start_info->console.domU.evtchn; |
269 | info->intf = mfn_to_virt(xen_start_info->console.domU.mfn); | 266 | info->intf = mfn_to_virt(xen_start_info->console.domU.mfn); |
270 | info->vtermno = HVC_COOKIE; | 267 | info->vtermno = HVC_COOKIE; |
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index b81cc31f2657..92b1ac8db63d 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
@@ -53,9 +53,9 @@ | |||
53 | #include <linux/delay.h> | 53 | #include <linux/delay.h> |
54 | #include <linux/types.h> | 54 | #include <linux/types.h> |
55 | #include <linux/pinctrl/consumer.h> | 55 | #include <linux/pinctrl/consumer.h> |
56 | #include <linux/sizes.h> | ||
56 | 57 | ||
57 | #include <asm/io.h> | 58 | #include <asm/io.h> |
58 | #include <asm/sizes.h> | ||
59 | 59 | ||
60 | #define UART_NR 14 | 60 | #define UART_NR 14 |
61 | 61 | ||
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 0af4eec8c7b1..20e911724027 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -169,7 +169,6 @@ | |||
169 | #define SERIAL_IMX_MAJOR 207 | 169 | #define SERIAL_IMX_MAJOR 207 |
170 | #define MINOR_START 16 | 170 | #define MINOR_START 16 |
171 | #define DEV_NAME "ttymxc" | 171 | #define DEV_NAME "ttymxc" |
172 | #define MAX_INTERNAL_IRQ MXC_INTERNAL_IRQS | ||
173 | 172 | ||
174 | /* | 173 | /* |
175 | * This determines how often we check the modem status signals | 174 | * This determines how often we check the modem status signals |
@@ -741,10 +740,7 @@ static int imx_startup(struct uart_port *port) | |||
741 | 740 | ||
742 | /* do not use RTS IRQ on IrDA */ | 741 | /* do not use RTS IRQ on IrDA */ |
743 | if (!USE_IRDA(sport)) { | 742 | if (!USE_IRDA(sport)) { |
744 | retval = request_irq(sport->rtsirq, imx_rtsint, | 743 | retval = request_irq(sport->rtsirq, imx_rtsint, 0, |
745 | (sport->rtsirq < MAX_INTERNAL_IRQ) ? 0 : | ||
746 | IRQF_TRIGGER_FALLING | | ||
747 | IRQF_TRIGGER_RISING, | ||
748 | DRIVER_NAME, sport); | 744 | DRIVER_NAME, sport); |
749 | if (retval) | 745 | if (retval) |
750 | goto error_out3; | 746 | goto error_out3; |
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index ec56d8397aae..2e341b81ff89 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/pinctrl/consumer.h> | 35 | #include <linux/pinctrl/consumer.h> |
36 | #include <linux/of_device.h> | ||
36 | 37 | ||
37 | #include <asm/cacheflush.h> | 38 | #include <asm/cacheflush.h> |
38 | 39 | ||
@@ -675,6 +676,30 @@ static struct uart_driver auart_driver = { | |||
675 | #endif | 676 | #endif |
676 | }; | 677 | }; |
677 | 678 | ||
679 | /* | ||
680 | * This function returns 1 if pdev isn't a device instatiated by dt, 0 if it | ||
681 | * could successfully get all information from dt or a negative errno. | ||
682 | */ | ||
683 | static int serial_mxs_probe_dt(struct mxs_auart_port *s, | ||
684 | struct platform_device *pdev) | ||
685 | { | ||
686 | struct device_node *np = pdev->dev.of_node; | ||
687 | int ret; | ||
688 | |||
689 | if (!np) | ||
690 | /* no device tree device */ | ||
691 | return 1; | ||
692 | |||
693 | ret = of_alias_get_id(np, "serial"); | ||
694 | if (ret < 0) { | ||
695 | dev_err(&pdev->dev, "failed to get alias id: %d\n", ret); | ||
696 | return ret; | ||
697 | } | ||
698 | s->port.line = ret; | ||
699 | |||
700 | return 0; | ||
701 | } | ||
702 | |||
678 | static int __devinit mxs_auart_probe(struct platform_device *pdev) | 703 | static int __devinit mxs_auart_probe(struct platform_device *pdev) |
679 | { | 704 | { |
680 | struct mxs_auart_port *s; | 705 | struct mxs_auart_port *s; |
@@ -689,6 +714,12 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev) | |||
689 | goto out; | 714 | goto out; |
690 | } | 715 | } |
691 | 716 | ||
717 | ret = serial_mxs_probe_dt(s, pdev); | ||
718 | if (ret > 0) | ||
719 | s->port.line = pdev->id < 0 ? 0 : pdev->id; | ||
720 | else if (ret < 0) | ||
721 | goto out_free; | ||
722 | |||
692 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | 723 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); |
693 | if (IS_ERR(pinctrl)) { | 724 | if (IS_ERR(pinctrl)) { |
694 | ret = PTR_ERR(pinctrl); | 725 | ret = PTR_ERR(pinctrl); |
@@ -711,7 +742,6 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev) | |||
711 | s->port.membase = ioremap(r->start, resource_size(r)); | 742 | s->port.membase = ioremap(r->start, resource_size(r)); |
712 | s->port.ops = &mxs_auart_ops; | 743 | s->port.ops = &mxs_auart_ops; |
713 | s->port.iotype = UPIO_MEM; | 744 | s->port.iotype = UPIO_MEM; |
714 | s->port.line = pdev->id < 0 ? 0 : pdev->id; | ||
715 | s->port.fifosize = 16; | 745 | s->port.fifosize = 16; |
716 | s->port.uartclk = clk_get_rate(s->clk); | 746 | s->port.uartclk = clk_get_rate(s->clk); |
717 | s->port.type = PORT_IMX; | 747 | s->port.type = PORT_IMX; |
@@ -728,7 +758,7 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev) | |||
728 | 758 | ||
729 | platform_set_drvdata(pdev, s); | 759 | platform_set_drvdata(pdev, s); |
730 | 760 | ||
731 | auart_port[pdev->id] = s; | 761 | auart_port[s->port.line] = s; |
732 | 762 | ||
733 | mxs_auart_reset(&s->port); | 763 | mxs_auart_reset(&s->port); |
734 | 764 | ||
@@ -769,12 +799,19 @@ static int __devexit mxs_auart_remove(struct platform_device *pdev) | |||
769 | return 0; | 799 | return 0; |
770 | } | 800 | } |
771 | 801 | ||
802 | static struct of_device_id mxs_auart_dt_ids[] = { | ||
803 | { .compatible = "fsl,imx23-auart", }, | ||
804 | { /* sentinel */ } | ||
805 | }; | ||
806 | MODULE_DEVICE_TABLE(of, mxs_auart_dt_ids); | ||
807 | |||
772 | static struct platform_driver mxs_auart_driver = { | 808 | static struct platform_driver mxs_auart_driver = { |
773 | .probe = mxs_auart_probe, | 809 | .probe = mxs_auart_probe, |
774 | .remove = __devexit_p(mxs_auart_remove), | 810 | .remove = __devexit_p(mxs_auart_remove), |
775 | .driver = { | 811 | .driver = { |
776 | .name = "mxs-auart", | 812 | .name = "mxs-auart", |
777 | .owner = THIS_MODULE, | 813 | .owner = THIS_MODULE, |
814 | .of_match_table = mxs_auart_dt_ids, | ||
778 | }, | 815 | }, |
779 | }; | 816 | }; |
780 | 817 | ||
@@ -807,3 +844,4 @@ module_init(mxs_auart_init); | |||
807 | module_exit(mxs_auart_exit); | 844 | module_exit(mxs_auart_exit); |
808 | MODULE_LICENSE("GPL"); | 845 | MODULE_LICENSE("GPL"); |
809 | MODULE_DESCRIPTION("Freescale MXS application uart driver"); | 846 | MODULE_DESCRIPTION("Freescale MXS application uart driver"); |
847 | MODULE_ALIAS("platform:mxs-auart"); | ||
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 1bd9163bc118..9be296cf7295 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/sh_dma.h> | ||
28 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
29 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
30 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
@@ -1410,8 +1411,8 @@ static void work_fn_rx(struct work_struct *work) | |||
1410 | /* Handle incomplete DMA receive */ | 1411 | /* Handle incomplete DMA receive */ |
1411 | struct tty_struct *tty = port->state->port.tty; | 1412 | struct tty_struct *tty = port->state->port.tty; |
1412 | struct dma_chan *chan = s->chan_rx; | 1413 | struct dma_chan *chan = s->chan_rx; |
1413 | struct sh_desc *sh_desc = container_of(desc, struct sh_desc, | 1414 | struct shdma_desc *sh_desc = container_of(desc, |
1414 | async_tx); | 1415 | struct shdma_desc, async_tx); |
1415 | unsigned long flags; | 1416 | unsigned long flags; |
1416 | int count; | 1417 | int count; |
1417 | 1418 | ||
@@ -1615,9 +1616,9 @@ static bool filter(struct dma_chan *chan, void *slave) | |||
1615 | struct sh_dmae_slave *param = slave; | 1616 | struct sh_dmae_slave *param = slave; |
1616 | 1617 | ||
1617 | dev_dbg(chan->device->dev, "%s: slave ID %d\n", __func__, | 1618 | dev_dbg(chan->device->dev, "%s: slave ID %d\n", __func__, |
1618 | param->slave_id); | 1619 | param->shdma_slave.slave_id); |
1619 | 1620 | ||
1620 | chan->private = param; | 1621 | chan->private = ¶m->shdma_slave; |
1621 | return true; | 1622 | return true; |
1622 | } | 1623 | } |
1623 | 1624 | ||
@@ -1656,7 +1657,7 @@ static void sci_request_dma(struct uart_port *port) | |||
1656 | param = &s->param_tx; | 1657 | param = &s->param_tx; |
1657 | 1658 | ||
1658 | /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_TX */ | 1659 | /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_TX */ |
1659 | param->slave_id = s->cfg->dma_slave_tx; | 1660 | param->shdma_slave.slave_id = s->cfg->dma_slave_tx; |
1660 | 1661 | ||
1661 | s->cookie_tx = -EINVAL; | 1662 | s->cookie_tx = -EINVAL; |
1662 | chan = dma_request_channel(mask, filter, param); | 1663 | chan = dma_request_channel(mask, filter, param); |
@@ -1684,7 +1685,7 @@ static void sci_request_dma(struct uart_port *port) | |||
1684 | param = &s->param_rx; | 1685 | param = &s->param_rx; |
1685 | 1686 | ||
1686 | /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_RX */ | 1687 | /* Slave ID, e.g., SHDMA_SLAVE_SCIF0_RX */ |
1687 | param->slave_id = s->cfg->dma_slave_rx; | 1688 | param->shdma_slave.slave_id = s->cfg->dma_slave_rx; |
1688 | 1689 | ||
1689 | chan = dma_request_channel(mask, filter, param); | 1690 | chan = dma_request_channel(mask, filter, param); |
1690 | dev_dbg(port->dev, "%s: RX: got channel %p\n", __func__, chan); | 1691 | dev_dbg(port->dev, "%s: RX: got channel %p\n", __func__, chan); |
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index 6cd414341d5e..6579ffdd8e9b 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c | |||
@@ -216,8 +216,7 @@ static int ulite_startup(struct uart_port *port) | |||
216 | { | 216 | { |
217 | int ret; | 217 | int ret; |
218 | 218 | ||
219 | ret = request_irq(port->irq, ulite_isr, | 219 | ret = request_irq(port->irq, ulite_isr, IRQF_SHARED, "uartlite", port); |
220 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "uartlite", port); | ||
221 | if (ret) | 220 | if (ret) |
222 | return ret; | 221 | return ret; |
223 | 222 | ||