aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 22:11:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 22:11:38 -0400
commit9cd11c0c47b8690b47e7573311ce5c483cb344ed (patch)
tree59f51c2bb3f73b21005105095d7321d35616ca9d /drivers/net/irda
parentb9541d94bcd2f23a069dbe84830fef1bbcd643f0 (diff)
parent1ec9c26ad0890003f2b8a4ab97164f66d5de3f6d (diff)
Merge tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc multiplatform enablement from Olof Johansson: "This is a pretty significant branch. It's the introduction of the first multiplatform support on ARM, and with this (and the later branch) merged, it is now possible to build one kernel that contains support for highbank, vexpress, mvebu, socfpga, and picoxcell. More platforms will be convered over in the next few releases. Two critical last things had to be done for this to be practical and possible: * Today each platform has its own include directory under mach-<mach>/include/mach/*, and traditionally that is where a lot of driver/platform shared definitions have gone, such as platform data structures. They now need to move out to a common location instead, and this branch moves a large number of those out to include/linux/platform_data. * Each platform used to list the device trees to compile for its boards in mach-<mach>/Makefile.boot. Both of the above changes will mean that there are some merge conflicts to come (and some to resolve here). It's a one-time move and once it settles in, we should be good for quite a while. Sorry for the overhead." Fix conflicts as per Olof. * tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (51 commits) ARM: add v7 multi-platform defconfig ARM: msm: Move core.h contents into common.h ARM: highbank: call highbank_pm_init from .init_machine ARM: dtb: move all dtb targets to common Makefile ARM: spear: move platform_data definitions ARM: samsung: move platform_data definitions ARM: orion: move platform_data definitions ARM: vexpress: convert to multi-platform ARM: initial multiplatform support ARM: mvebu: move armada-370-xp.h in mach dir ARM: vexpress: remove dependency on mach/* headers ARM: picoxcell: remove dependency on mach/* headers ARM: move all dtb targets out of Makefile.boot ARM: picoxcell: move debug macros to include/debug ARM: socfpga: move debug macros to include/debug ARM: mvebu: move debug macros to include/debug ARM: vexpress: move debug macros to include/debug ARM: highbank: move debug macros to include/debug ARM: move debug macros to common location ARM: make mach/gpio.h headers optional ...
Diffstat (limited to 'drivers/net/irda')
-rw-r--r--drivers/net/irda/pxaficp_ir.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index 8d547670791..002a442bf73 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -28,9 +28,9 @@
28#include <net/irda/irda_device.h> 28#include <net/irda/irda_device.h>
29 29
30#include <mach/dma.h> 30#include <mach/dma.h>
31#include <mach/irda.h> 31#include <linux/platform_data/irda-pxaficp.h>
32#include <mach/regs-uart.h>
33#include <mach/regs-ost.h> 32#include <mach/regs-ost.h>
33#include <mach/regs-uart.h>
34 34
35#define FICP __REG(0x40800000) /* Start of FICP area */ 35#define FICP __REG(0x40800000) /* Start of FICP area */
36#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */ 36#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
@@ -112,6 +112,9 @@ struct pxa_irda {
112 int txdma; 112 int txdma;
113 int rxdma; 113 int rxdma;
114 114
115 int uart_irq;
116 int icp_irq;
117
115 struct irlap_cb *irlap; 118 struct irlap_cb *irlap;
116 struct qos_info qos; 119 struct qos_info qos;
117 120
@@ -672,19 +675,19 @@ static int pxa_irda_start(struct net_device *dev)
672 675
673 si->speed = 9600; 676 si->speed = 9600;
674 677
675 err = request_irq(IRQ_STUART, pxa_irda_sir_irq, 0, dev->name, dev); 678 err = request_irq(si->uart_irq, pxa_irda_sir_irq, 0, dev->name, dev);
676 if (err) 679 if (err)
677 goto err_irq1; 680 goto err_irq1;
678 681
679 err = request_irq(IRQ_ICP, pxa_irda_fir_irq, 0, dev->name, dev); 682 err = request_irq(si->icp_irq, pxa_irda_fir_irq, 0, dev->name, dev);
680 if (err) 683 if (err)
681 goto err_irq2; 684 goto err_irq2;
682 685
683 /* 686 /*
684 * The interrupt must remain disabled for now. 687 * The interrupt must remain disabled for now.
685 */ 688 */
686 disable_irq(IRQ_STUART); 689 disable_irq(si->uart_irq);
687 disable_irq(IRQ_ICP); 690 disable_irq(si->icp_irq);
688 691
689 err = -EBUSY; 692 err = -EBUSY;
690 si->rxdma = pxa_request_dma("FICP_RX",DMA_PRIO_LOW, pxa_irda_fir_dma_rx_irq, dev); 693 si->rxdma = pxa_request_dma("FICP_RX",DMA_PRIO_LOW, pxa_irda_fir_dma_rx_irq, dev);
@@ -720,8 +723,8 @@ static int pxa_irda_start(struct net_device *dev)
720 /* 723 /*
721 * Now enable the interrupt and start the queue 724 * Now enable the interrupt and start the queue
722 */ 725 */
723 enable_irq(IRQ_STUART); 726 enable_irq(si->uart_irq);
724 enable_irq(IRQ_ICP); 727 enable_irq(si->icp_irq);
725 netif_start_queue(dev); 728 netif_start_queue(dev);
726 729
727 printk(KERN_DEBUG "pxa_ir: irda driver opened\n"); 730 printk(KERN_DEBUG "pxa_ir: irda driver opened\n");
@@ -738,9 +741,9 @@ err_dma_rx_buff:
738err_tx_dma: 741err_tx_dma:
739 pxa_free_dma(si->rxdma); 742 pxa_free_dma(si->rxdma);
740err_rx_dma: 743err_rx_dma:
741 free_irq(IRQ_ICP, dev); 744 free_irq(si->icp_irq, dev);
742err_irq2: 745err_irq2:
743 free_irq(IRQ_STUART, dev); 746 free_irq(si->uart_irq, dev);
744err_irq1: 747err_irq1:
745 748
746 return err; 749 return err;
@@ -760,8 +763,8 @@ static int pxa_irda_stop(struct net_device *dev)
760 si->irlap = NULL; 763 si->irlap = NULL;
761 } 764 }
762 765
763 free_irq(IRQ_STUART, dev); 766 free_irq(si->uart_irq, dev);
764 free_irq(IRQ_ICP, dev); 767 free_irq(si->icp_irq, dev);
765 768
766 pxa_free_dma(si->rxdma); 769 pxa_free_dma(si->rxdma);
767 pxa_free_dma(si->txdma); 770 pxa_free_dma(si->txdma);
@@ -851,6 +854,9 @@ static int pxa_irda_probe(struct platform_device *pdev)
851 si->dev = &pdev->dev; 854 si->dev = &pdev->dev;
852 si->pdata = pdev->dev.platform_data; 855 si->pdata = pdev->dev.platform_data;
853 856
857 si->uart_irq = platform_get_irq(pdev, 0);
858 si->icp_irq = platform_get_irq(pdev, 1);
859
854 si->sir_clk = clk_get(&pdev->dev, "UARTCLK"); 860 si->sir_clk = clk_get(&pdev->dev, "UARTCLK");
855 si->fir_clk = clk_get(&pdev->dev, "FICPCLK"); 861 si->fir_clk = clk_get(&pdev->dev, "FICPCLK");
856 if (IS_ERR(si->sir_clk) || IS_ERR(si->fir_clk)) { 862 if (IS_ERR(si->sir_clk) || IS_ERR(si->fir_clk)) {