diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:51:39 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:51:39 -0500 |
| commit | d01e4afdbb65e030fd6f1f96c30a558e2eb0f279 (patch) | |
| tree | 02ef82b2740cf93a98199eded5ef765fa6e03052 /drivers | |
| parent | 8287361abca36504da813638310d2547469283eb (diff) | |
| parent | 794b175fc0c0c4844dbb7b137a73bbfd01f6c608 (diff) | |
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups on various subarchitectures from Olof Johansson:
"Cleanup patches for various ARM platforms and some of their associated
drivers. There's also a branch in here that enables Freescale i.MX to
be part of the multiplatform support -- the first "big" SoC that is
moved over (more multiplatform work comes in a separate branch later
during the merge window)."
Conflicts fixed as per Olof, including a silent semantic one in
arch/arm/mach-omap2/board-generic.c (omap_prcm_restart() was renamed to
omap3xxx_restart(), and a new user of the old name was added).
* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (189 commits)
ARM: omap: fix typo on timer cleanup
ARM: EXYNOS: Remove unused regs-mem.h file
ARM: EXYNOS: Remove unused non-dt support for dwmci controller
ARM: Kirkwood: Use hw_pci.ops instead of hw_pci.scan
ARM: OMAP3: cm-t3517: use GPTIMER for system clock
ARM: OMAP2+: timer: remove CONFIG_OMAP_32K_TIMER
ARM: SAMSUNG: use devm_ functions for ADC driver
ARM: EXYNOS: no duplicate mask/unmask in eint0_15
ARM: S3C24XX: SPI clock channel setup is fixed for S3C2443
ARM: EXYNOS: Remove i2c0 resource information and setting of device names
ARM: Kirkwood: checkpatch cleanups
ARM: Kirkwood: Fix sparse warnings.
ARM: Kirkwood: Remove unused includes
ARM: kirkwood: cleanup lsxl board includes
ARM: integrator: use BUG_ON where possible
ARM: integrator: push down SC dependencies
ARM: integrator: delete static UART1 mapping
ARM: integrator: delete SC mapping on the CP
ARM: integrator: remove static CP syscon mapping
ARM: integrator: remove static AP syscon mapping
...
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/amba/tegra-ahb.c | 1 | ||||
| -rw-r--r-- | drivers/clk/clk-bcm2835.c | 2 | ||||
| -rw-r--r-- | drivers/crypto/tegra-aes.c | 2 | ||||
| -rw-r--r-- | drivers/dma/imx-dma.c | 137 | ||||
| -rw-r--r-- | drivers/dma/imx-sdma.c | 1 | ||||
| -rw-r--r-- | drivers/dma/ipu/ipu_idmac.c | 3 | ||||
| -rw-r--r-- | drivers/dma/ipu/ipu_irq.c | 3 | ||||
| -rw-r--r-- | drivers/gpio/gpio-pxa.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 40 | ||||
| -rw-r--r-- | drivers/iommu/tegra-smmu.c | 4 | ||||
| -rw-r--r-- | drivers/media/platform/soc_camera/mx2_camera.c | 95 | ||||
| -rw-r--r-- | drivers/media/platform/soc_camera/mx3_camera.c | 2 | ||||
| -rw-r--r-- | drivers/mmc/host/mxcmmc.c | 31 | ||||
| -rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 96 | ||||
| -rw-r--r-- | drivers/rtc/rtc-mxc.c | 34 | ||||
| -rw-r--r-- | drivers/staging/nvec/nvec.c | 1 | ||||
| -rw-r--r-- | drivers/staging/tidspbridge/core/ue_deh.c | 1 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-mxc.c | 1 | ||||
| -rw-r--r-- | drivers/video/imxfb.c | 38 | ||||
| -rw-r--r-- | drivers/video/mx3fb.c | 3 | ||||
| -rw-r--r-- | drivers/watchdog/imx2_wdt.c | 1 | ||||
| -rw-r--r-- | drivers/watchdog/omap_wdt.c | 26 |
22 files changed, 358 insertions, 166 deletions
diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c index 0b6f0b28a487..bd5de08ad6fd 100644 --- a/drivers/amba/tegra-ahb.c +++ b/drivers/amba/tegra-ahb.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
| 25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
| 26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
| 27 | #include <linux/tegra-ahb.h> | ||
| 27 | 28 | ||
| 28 | #define DRV_NAME "tegra-ahb" | 29 | #define DRV_NAME "tegra-ahb" |
| 29 | 30 | ||
diff --git a/drivers/clk/clk-bcm2835.c b/drivers/clk/clk-bcm2835.c index b61ee2c5af84..e69991aab43a 100644 --- a/drivers/clk/clk-bcm2835.c +++ b/drivers/clk/clk-bcm2835.c | |||
| @@ -55,5 +55,5 @@ void __init bcm2835_init_clocks(void) | |||
| 55 | pr_err("uart1_pclk not registered\n"); | 55 | pr_err("uart1_pclk not registered\n"); |
| 56 | ret = clk_register_clkdev(clk, NULL, "20215000.uart"); | 56 | ret = clk_register_clkdev(clk, NULL, "20215000.uart"); |
| 57 | if (ret) | 57 | if (ret) |
| 58 | pr_err("uart0_pclk alias not registered\n"); | 58 | pr_err("uart1_pclk alias not registered\n"); |
| 59 | } | 59 | } |
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 37185e6630cd..e69f3bc473be 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c | |||
| @@ -41,8 +41,6 @@ | |||
| 41 | #include <linux/completion.h> | 41 | #include <linux/completion.h> |
| 42 | #include <linux/workqueue.h> | 42 | #include <linux/workqueue.h> |
| 43 | 43 | ||
| 44 | #include <mach/clk.h> | ||
| 45 | |||
| 46 | #include <crypto/scatterwalk.h> | 44 | #include <crypto/scatterwalk.h> |
| 47 | #include <crypto/aes.h> | 45 | #include <crypto/aes.h> |
| 48 | #include <crypto/internal/rng.h> | 46 | #include <crypto/internal/rng.h> |
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 7d9554cc4976..dbf0e6f8de8a 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c | |||
| @@ -29,7 +29,6 @@ | |||
| 29 | 29 | ||
| 30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
| 31 | #include <linux/platform_data/dma-imx.h> | 31 | #include <linux/platform_data/dma-imx.h> |
| 32 | #include <mach/hardware.h> | ||
| 33 | 32 | ||
| 34 | #include "dmaengine.h" | 33 | #include "dmaengine.h" |
| 35 | #define IMXDMA_MAX_CHAN_DESCRIPTORS 16 | 34 | #define IMXDMA_MAX_CHAN_DESCRIPTORS 16 |
| @@ -167,6 +166,12 @@ struct imxdma_channel { | |||
| 167 | int slot_2d; | 166 | int slot_2d; |
| 168 | }; | 167 | }; |
| 169 | 168 | ||
| 169 | enum imx_dma_type { | ||
| 170 | IMX1_DMA, | ||
| 171 | IMX21_DMA, | ||
| 172 | IMX27_DMA, | ||
| 173 | }; | ||
| 174 | |||
| 170 | struct imxdma_engine { | 175 | struct imxdma_engine { |
| 171 | struct device *dev; | 176 | struct device *dev; |
| 172 | struct device_dma_parameters dma_parms; | 177 | struct device_dma_parameters dma_parms; |
| @@ -177,7 +182,39 @@ struct imxdma_engine { | |||
| 177 | spinlock_t lock; | 182 | spinlock_t lock; |
| 178 | struct imx_dma_2d_config slots_2d[IMX_DMA_2D_SLOTS]; | 183 | struct imx_dma_2d_config slots_2d[IMX_DMA_2D_SLOTS]; |
| 179 | struct imxdma_channel channel[IMX_DMA_CHANNELS]; | 184 | struct imxdma_channel channel[IMX_DMA_CHANNELS]; |
| 185 | enum imx_dma_type devtype; | ||
| 186 | }; | ||
| 187 | |||
| 188 | static struct platform_device_id imx_dma_devtype[] = { | ||
| 189 | { | ||
| 190 | .name = "imx1-dma", | ||
| 191 | .driver_data = IMX1_DMA, | ||
| 192 | }, { | ||
| 193 | .name = "imx21-dma", | ||
| 194 | .driver_data = IMX21_DMA, | ||
| 195 | }, { | ||
| 196 | .name = "imx27-dma", | ||
| 197 | .driver_data = IMX27_DMA, | ||
| 198 | }, { | ||
| 199 | /* sentinel */ | ||
| 200 | } | ||
| 180 | }; | 201 | }; |
| 202 | MODULE_DEVICE_TABLE(platform, imx_dma_devtype); | ||
| 203 | |||
| 204 | static inline int is_imx1_dma(struct imxdma_engine *imxdma) | ||
| 205 | { | ||
| 206 | return imxdma->devtype == IMX1_DMA; | ||
| 207 | } | ||
| 208 | |||
| 209 | static inline int is_imx21_dma(struct imxdma_engine *imxdma) | ||
| 210 | { | ||
| 211 | return imxdma->devtype == IMX21_DMA; | ||
| 212 | } | ||
| 213 | |||
| 214 | static inline int is_imx27_dma(struct imxdma_engine *imxdma) | ||
| 215 | { | ||
| 216 | return imxdma->devtype == IMX27_DMA; | ||
| 217 | } | ||
| 181 | 218 | ||
| 182 | static struct imxdma_channel *to_imxdma_chan(struct dma_chan *chan) | 219 | static struct imxdma_channel *to_imxdma_chan(struct dma_chan *chan) |
| 183 | { | 220 | { |
| @@ -212,7 +249,9 @@ static unsigned imx_dmav1_readl(struct imxdma_engine *imxdma, unsigned offset) | |||
| 212 | 249 | ||
| 213 | static int imxdma_hw_chain(struct imxdma_channel *imxdmac) | 250 | static int imxdma_hw_chain(struct imxdma_channel *imxdmac) |
| 214 | { | 251 | { |
| 215 | if (cpu_is_mx27()) | 252 | struct imxdma_engine *imxdma = imxdmac->imxdma; |
| 253 | |||
| 254 | if (is_imx27_dma(imxdma)) | ||
| 216 | return imxdmac->hw_chaining; | 255 | return imxdmac->hw_chaining; |
| 217 | else | 256 | else |
| 218 | return 0; | 257 | return 0; |
| @@ -267,7 +306,7 @@ static void imxdma_enable_hw(struct imxdma_desc *d) | |||
| 267 | imx_dmav1_writel(imxdma, imx_dmav1_readl(imxdma, DMA_CCR(channel)) | | 306 | imx_dmav1_writel(imxdma, imx_dmav1_readl(imxdma, DMA_CCR(channel)) | |
| 268 | CCR_CEN | CCR_ACRPT, DMA_CCR(channel)); | 307 | CCR_CEN | CCR_ACRPT, DMA_CCR(channel)); |
| 269 | 308 | ||
| 270 | if ((cpu_is_mx21() || cpu_is_mx27()) && | 309 | if (!is_imx1_dma(imxdma) && |
| 271 | d->sg && imxdma_hw_chain(imxdmac)) { | 310 | d->sg && imxdma_hw_chain(imxdmac)) { |
| 272 | d->sg = sg_next(d->sg); | 311 | d->sg = sg_next(d->sg); |
| 273 | if (d->sg) { | 312 | if (d->sg) { |
| @@ -436,7 +475,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id) | |||
| 436 | struct imxdma_engine *imxdma = dev_id; | 475 | struct imxdma_engine *imxdma = dev_id; |
| 437 | int i, disr; | 476 | int i, disr; |
| 438 | 477 | ||
| 439 | if (cpu_is_mx21() || cpu_is_mx27()) | 478 | if (!is_imx1_dma(imxdma)) |
| 440 | imxdma_err_handler(irq, dev_id); | 479 | imxdma_err_handler(irq, dev_id); |
| 441 | 480 | ||
| 442 | disr = imx_dmav1_readl(imxdma, DMA_DISR); | 481 | disr = imx_dmav1_readl(imxdma, DMA_DISR); |
| @@ -961,35 +1000,32 @@ static void imxdma_issue_pending(struct dma_chan *chan) | |||
| 961 | static int __init imxdma_probe(struct platform_device *pdev) | 1000 | static int __init imxdma_probe(struct platform_device *pdev) |
| 962 | { | 1001 | { |
| 963 | struct imxdma_engine *imxdma; | 1002 | struct imxdma_engine *imxdma; |
| 1003 | struct resource *res; | ||
| 964 | int ret, i; | 1004 | int ret, i; |
| 1005 | int irq, irq_err; | ||
| 965 | 1006 | ||
| 966 | 1007 | imxdma = devm_kzalloc(&pdev->dev, sizeof(*imxdma), GFP_KERNEL); | |
| 967 | imxdma = kzalloc(sizeof(*imxdma), GFP_KERNEL); | ||
| 968 | if (!imxdma) | 1008 | if (!imxdma) |
| 969 | return -ENOMEM; | 1009 | return -ENOMEM; |
| 970 | 1010 | ||
| 971 | if (cpu_is_mx1()) { | 1011 | imxdma->devtype = pdev->id_entry->driver_data; |
| 972 | imxdma->base = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); | 1012 | |
| 973 | } else if (cpu_is_mx21()) { | 1013 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 974 | imxdma->base = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); | 1014 | imxdma->base = devm_request_and_ioremap(&pdev->dev, res); |
| 975 | } else if (cpu_is_mx27()) { | 1015 | if (!imxdma->base) |
| 976 | imxdma->base = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); | 1016 | return -EADDRNOTAVAIL; |
| 977 | } else { | 1017 | |
| 978 | kfree(imxdma); | 1018 | irq = platform_get_irq(pdev, 0); |
| 979 | return 0; | 1019 | if (irq < 0) |
| 980 | } | 1020 | return irq; |
| 981 | 1021 | ||
| 982 | imxdma->dma_ipg = devm_clk_get(&pdev->dev, "ipg"); | 1022 | imxdma->dma_ipg = devm_clk_get(&pdev->dev, "ipg"); |
| 983 | if (IS_ERR(imxdma->dma_ipg)) { | 1023 | if (IS_ERR(imxdma->dma_ipg)) |
| 984 | ret = PTR_ERR(imxdma->dma_ipg); | 1024 | return PTR_ERR(imxdma->dma_ipg); |
| 985 | goto err_clk; | ||
| 986 | } | ||
| 987 | 1025 | ||
| 988 | imxdma->dma_ahb = devm_clk_get(&pdev->dev, "ahb"); | 1026 | imxdma->dma_ahb = devm_clk_get(&pdev->dev, "ahb"); |
| 989 | if (IS_ERR(imxdma->dma_ahb)) { | 1027 | if (IS_ERR(imxdma->dma_ahb)) |
| 990 | ret = PTR_ERR(imxdma->dma_ahb); | 1028 | return PTR_ERR(imxdma->dma_ahb); |
| 991 | goto err_clk; | ||
| 992 | } | ||
| 993 | 1029 | ||
| 994 | clk_prepare_enable(imxdma->dma_ipg); | 1030 | clk_prepare_enable(imxdma->dma_ipg); |
| 995 | clk_prepare_enable(imxdma->dma_ahb); | 1031 | clk_prepare_enable(imxdma->dma_ahb); |
| @@ -997,18 +1033,25 @@ static int __init imxdma_probe(struct platform_device *pdev) | |||
| 997 | /* reset DMA module */ | 1033 | /* reset DMA module */ |
| 998 | imx_dmav1_writel(imxdma, DCR_DRST, DMA_DCR); | 1034 | imx_dmav1_writel(imxdma, DCR_DRST, DMA_DCR); |
| 999 | 1035 | ||
| 1000 | if (cpu_is_mx1()) { | 1036 | if (is_imx1_dma(imxdma)) { |
| 1001 | ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", imxdma); | 1037 | ret = devm_request_irq(&pdev->dev, irq, |
| 1038 | dma_irq_handler, 0, "DMA", imxdma); | ||
| 1002 | if (ret) { | 1039 | if (ret) { |
| 1003 | dev_warn(imxdma->dev, "Can't register IRQ for DMA\n"); | 1040 | dev_warn(imxdma->dev, "Can't register IRQ for DMA\n"); |
| 1004 | goto err_enable; | 1041 | goto err; |
| 1042 | } | ||
| 1043 | |||
| 1044 | irq_err = platform_get_irq(pdev, 1); | ||
| 1045 | if (irq_err < 0) { | ||
| 1046 | ret = irq_err; | ||
| 1047 | goto err; | ||
| 1005 | } | 1048 | } |
| 1006 | 1049 | ||
| 1007 | ret = request_irq(MX1_DMA_ERR, imxdma_err_handler, 0, "DMA", imxdma); | 1050 | ret = devm_request_irq(&pdev->dev, irq_err, |
| 1051 | imxdma_err_handler, 0, "DMA", imxdma); | ||
| 1008 | if (ret) { | 1052 | if (ret) { |
| 1009 | dev_warn(imxdma->dev, "Can't register ERRIRQ for DMA\n"); | 1053 | dev_warn(imxdma->dev, "Can't register ERRIRQ for DMA\n"); |
| 1010 | free_irq(MX1_DMA_INT, NULL); | 1054 | goto err; |
| 1011 | goto err_enable; | ||
| 1012 | } | 1055 | } |
| 1013 | } | 1056 | } |
| 1014 | 1057 | ||
| @@ -1038,14 +1081,14 @@ static int __init imxdma_probe(struct platform_device *pdev) | |||
| 1038 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { | 1081 | for (i = 0; i < IMX_DMA_CHANNELS; i++) { |
| 1039 | struct imxdma_channel *imxdmac = &imxdma->channel[i]; | 1082 | struct imxdma_channel *imxdmac = &imxdma->channel[i]; |
| 1040 | 1083 | ||
| 1041 | if (cpu_is_mx21() || cpu_is_mx27()) { | 1084 | if (!is_imx1_dma(imxdma)) { |
| 1042 | ret = request_irq(MX2x_INT_DMACH0 + i, | 1085 | ret = devm_request_irq(&pdev->dev, irq + i, |
| 1043 | dma_irq_handler, 0, "DMA", imxdma); | 1086 | dma_irq_handler, 0, "DMA", imxdma); |
| 1044 | if (ret) { | 1087 | if (ret) { |
| 1045 | dev_warn(imxdma->dev, "Can't register IRQ %d " | 1088 | dev_warn(imxdma->dev, "Can't register IRQ %d " |
| 1046 | "for DMA channel %d\n", | 1089 | "for DMA channel %d\n", |
| 1047 | MX2x_INT_DMACH0 + i, i); | 1090 | irq + i, i); |
| 1048 | goto err_init; | 1091 | goto err; |
| 1049 | } | 1092 | } |
| 1050 | init_timer(&imxdmac->watchdog); | 1093 | init_timer(&imxdmac->watchdog); |
| 1051 | imxdmac->watchdog.function = &imxdma_watchdog; | 1094 | imxdmac->watchdog.function = &imxdma_watchdog; |
| @@ -1091,46 +1134,25 @@ static int __init imxdma_probe(struct platform_device *pdev) | |||
| 1091 | ret = dma_async_device_register(&imxdma->dma_device); | 1134 | ret = dma_async_device_register(&imxdma->dma_device); |
| 1092 | if (ret) { | 1135 | if (ret) { |
| 1093 | dev_err(&pdev->dev, "unable to register\n"); | 1136 | dev_err(&pdev->dev, "unable to register\n"); |
| 1094 | goto err_init; | 1137 | goto err; |
| 1095 | } | 1138 | } |
| 1096 | 1139 | ||
| 1097 | return 0; | 1140 | return 0; |
| 1098 | 1141 | ||
| 1099 | err_init: | 1142 | err: |
| 1100 | |||
| 1101 | if (cpu_is_mx21() || cpu_is_mx27()) { | ||
| 1102 | while (--i >= 0) | ||
| 1103 | free_irq(MX2x_INT_DMACH0 + i, NULL); | ||
| 1104 | } else if cpu_is_mx1() { | ||
| 1105 | free_irq(MX1_DMA_INT, NULL); | ||
| 1106 | free_irq(MX1_DMA_ERR, NULL); | ||
| 1107 | } | ||
| 1108 | err_enable: | ||
| 1109 | clk_disable_unprepare(imxdma->dma_ipg); | 1143 | clk_disable_unprepare(imxdma->dma_ipg); |
| 1110 | clk_disable_unprepare(imxdma->dma_ahb); | 1144 | clk_disable_unprepare(imxdma->dma_ahb); |
| 1111 | err_clk: | ||
| 1112 | kfree(imxdma); | ||
| 1113 | return ret; | 1145 | return ret; |
| 1114 | } | 1146 | } |
| 1115 | 1147 | ||
| 1116 | static int __exit imxdma_remove(struct platform_device *pdev) | 1148 | static int __exit imxdma_remove(struct platform_device *pdev) |
| 1117 | { | 1149 | { |
| 1118 | struct imxdma_engine *imxdma = platform_get_drvdata(pdev); | 1150 | struct imxdma_engine *imxdma = platform_get_drvdata(pdev); |
| 1119 | int i; | ||
| 1120 | 1151 | ||
| 1121 | dma_async_device_unregister(&imxdma->dma_device); | 1152 | dma_async_device_unregister(&imxdma->dma_device); |
| 1122 | 1153 | ||
| 1123 | if (cpu_is_mx21() || cpu_is_mx27()) { | ||
| 1124 | for (i = 0; i < IMX_DMA_CHANNELS; i++) | ||
| 1125 | free_irq(MX2x_INT_DMACH0 + i, NULL); | ||
| 1126 | } else if cpu_is_mx1() { | ||
| 1127 | free_irq(MX1_DMA_INT, NULL); | ||
| 1128 | free_irq(MX1_DMA_ERR, NULL); | ||
| 1129 | } | ||
| 1130 | |||
| 1131 | clk_disable_unprepare(imxdma->dma_ipg); | 1154 | clk_disable_unprepare(imxdma->dma_ipg); |
| 1132 | clk_disable_unprepare(imxdma->dma_ahb); | 1155 | clk_disable_unprepare(imxdma->dma_ahb); |
| 1133 | kfree(imxdma); | ||
| 1134 | 1156 | ||
| 1135 | return 0; | 1157 | return 0; |
| 1136 | } | 1158 | } |
| @@ -1139,6 +1161,7 @@ static struct platform_driver imxdma_driver = { | |||
| 1139 | .driver = { | 1161 | .driver = { |
| 1140 | .name = "imx-dma", | 1162 | .name = "imx-dma", |
| 1141 | }, | 1163 | }, |
| 1164 | .id_table = imx_dma_devtype, | ||
| 1142 | .remove = __exit_p(imxdma_remove), | 1165 | .remove = __exit_p(imxdma_remove), |
| 1143 | }; | 1166 | }; |
| 1144 | 1167 | ||
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index c099ca0846f4..f082aa3a918c 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
| @@ -40,7 +40,6 @@ | |||
| 40 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
| 41 | #include <linux/platform_data/dma-imx-sdma.h> | 41 | #include <linux/platform_data/dma-imx-sdma.h> |
| 42 | #include <linux/platform_data/dma-imx.h> | 42 | #include <linux/platform_data/dma-imx.h> |
| 43 | #include <mach/hardware.h> | ||
| 44 | 43 | ||
| 45 | #include "dmaengine.h" | 44 | #include "dmaengine.h" |
| 46 | 45 | ||
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index c7573e50aa14..65855373cee6 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c | |||
| @@ -22,8 +22,7 @@ | |||
| 22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
| 25 | 25 | #include <linux/dma/ipu-dma.h> | |
| 26 | #include <mach/ipu.h> | ||
| 27 | 26 | ||
| 28 | #include "../dmaengine.h" | 27 | #include "../dmaengine.h" |
| 29 | #include "ipu_intern.h" | 28 | #include "ipu_intern.h" |
diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c index fa95bcc3de1f..a5ee37d5320f 100644 --- a/drivers/dma/ipu/ipu_irq.c +++ b/drivers/dma/ipu/ipu_irq.c | |||
| @@ -15,8 +15,7 @@ | |||
| 15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
| 16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | 18 | #include <linux/dma/ipu-dma.h> | |
| 19 | #include <mach/ipu.h> | ||
| 20 | 19 | ||
| 21 | #include "ipu_intern.h" | 20 | #include "ipu_intern.h" |
| 22 | 21 | ||
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 3e35243c136f..8325f580c0f1 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c | |||
| @@ -448,7 +448,7 @@ static int pxa_gpio_nums(void) | |||
| 448 | } else if (cpu_is_pxa27x()) { | 448 | } else if (cpu_is_pxa27x()) { |
| 449 | count = 120; | 449 | count = 120; |
| 450 | gpio_type = PXA27X_GPIO; | 450 | gpio_type = PXA27X_GPIO; |
| 451 | } else if (cpu_is_pxa93x() || cpu_is_pxa95x()) { | 451 | } else if (cpu_is_pxa93x()) { |
| 452 | count = 191; | 452 | count = 191; |
| 453 | gpio_type = PXA93X_GPIO; | 453 | gpio_type = PXA93X_GPIO; |
| 454 | } else if (cpu_is_pxa3xx()) { | 454 | } else if (cpu_is_pxa3xx()) { |
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 2ef162d148cb..b9734747d610 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
| @@ -52,8 +52,6 @@ | |||
| 52 | #include <linux/of_device.h> | 52 | #include <linux/of_device.h> |
| 53 | #include <linux/of_i2c.h> | 53 | #include <linux/of_i2c.h> |
| 54 | #include <linux/pinctrl/consumer.h> | 54 | #include <linux/pinctrl/consumer.h> |
| 55 | |||
| 56 | #include <mach/hardware.h> | ||
| 57 | #include <linux/platform_data/i2c-imx.h> | 55 | #include <linux/platform_data/i2c-imx.h> |
| 58 | 56 | ||
| 59 | /** Defines ******************************************************************** | 57 | /** Defines ******************************************************************** |
| @@ -115,6 +113,11 @@ static u16 __initdata i2c_clk_div[50][2] = { | |||
| 115 | { 3072, 0x1E }, { 3840, 0x1F } | 113 | { 3072, 0x1E }, { 3840, 0x1F } |
| 116 | }; | 114 | }; |
| 117 | 115 | ||
| 116 | enum imx_i2c_type { | ||
| 117 | IMX1_I2C, | ||
| 118 | IMX21_I2C, | ||
| 119 | }; | ||
| 120 | |||
| 118 | struct imx_i2c_struct { | 121 | struct imx_i2c_struct { |
| 119 | struct i2c_adapter adapter; | 122 | struct i2c_adapter adapter; |
| 120 | struct clk *clk; | 123 | struct clk *clk; |
| @@ -124,13 +127,33 @@ struct imx_i2c_struct { | |||
| 124 | unsigned int disable_delay; | 127 | unsigned int disable_delay; |
| 125 | int stopped; | 128 | int stopped; |
| 126 | unsigned int ifdr; /* IMX_I2C_IFDR */ | 129 | unsigned int ifdr; /* IMX_I2C_IFDR */ |
| 130 | enum imx_i2c_type devtype; | ||
| 131 | }; | ||
| 132 | |||
| 133 | static struct platform_device_id imx_i2c_devtype[] = { | ||
| 134 | { | ||
| 135 | .name = "imx1-i2c", | ||
| 136 | .driver_data = IMX1_I2C, | ||
| 137 | }, { | ||
| 138 | .name = "imx21-i2c", | ||
| 139 | .driver_data = IMX21_I2C, | ||
| 140 | }, { | ||
| 141 | /* sentinel */ | ||
| 142 | } | ||
| 127 | }; | 143 | }; |
| 144 | MODULE_DEVICE_TABLE(platform, imx_i2c_devtype); | ||
| 128 | 145 | ||
| 129 | static const struct of_device_id i2c_imx_dt_ids[] = { | 146 | static const struct of_device_id i2c_imx_dt_ids[] = { |
| 130 | { .compatible = "fsl,imx1-i2c", }, | 147 | { .compatible = "fsl,imx1-i2c", .data = &imx_i2c_devtype[IMX1_I2C], }, |
| 148 | { .compatible = "fsl,imx21-i2c", .data = &imx_i2c_devtype[IMX21_I2C], }, | ||
| 131 | { /* sentinel */ } | 149 | { /* sentinel */ } |
| 132 | }; | 150 | }; |
| 133 | 151 | ||
| 152 | static inline int is_imx1_i2c(struct imx_i2c_struct *i2c_imx) | ||
| 153 | { | ||
| 154 | return i2c_imx->devtype == IMX1_I2C; | ||
| 155 | } | ||
| 156 | |||
| 134 | /** Functions for IMX I2C adapter driver *************************************** | 157 | /** Functions for IMX I2C adapter driver *************************************** |
| 135 | *******************************************************************************/ | 158 | *******************************************************************************/ |
| 136 | 159 | ||
| @@ -223,7 +246,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx) | |||
| 223 | temp &= ~(I2CR_MSTA | I2CR_MTX); | 246 | temp &= ~(I2CR_MSTA | I2CR_MTX); |
| 224 | writeb(temp, i2c_imx->base + IMX_I2C_I2CR); | 247 | writeb(temp, i2c_imx->base + IMX_I2C_I2CR); |
| 225 | } | 248 | } |
| 226 | if (cpu_is_mx1()) { | 249 | if (is_imx1_i2c(i2c_imx)) { |
| 227 | /* | 250 | /* |
| 228 | * This delay caused by an i.MXL hardware bug. | 251 | * This delay caused by an i.MXL hardware bug. |
| 229 | * If no (or too short) delay, no "STOP" bit will be generated. | 252 | * If no (or too short) delay, no "STOP" bit will be generated. |
| @@ -465,6 +488,8 @@ static struct i2c_algorithm i2c_imx_algo = { | |||
| 465 | 488 | ||
| 466 | static int __init i2c_imx_probe(struct platform_device *pdev) | 489 | static int __init i2c_imx_probe(struct platform_device *pdev) |
| 467 | { | 490 | { |
| 491 | const struct of_device_id *of_id = of_match_device(i2c_imx_dt_ids, | ||
| 492 | &pdev->dev); | ||
| 468 | struct imx_i2c_struct *i2c_imx; | 493 | struct imx_i2c_struct *i2c_imx; |
| 469 | struct resource *res; | 494 | struct resource *res; |
| 470 | struct imxi2c_platform_data *pdata = pdev->dev.platform_data; | 495 | struct imxi2c_platform_data *pdata = pdev->dev.platform_data; |
| @@ -497,6 +522,10 @@ static int __init i2c_imx_probe(struct platform_device *pdev) | |||
| 497 | return -ENOMEM; | 522 | return -ENOMEM; |
| 498 | } | 523 | } |
| 499 | 524 | ||
| 525 | if (of_id) | ||
| 526 | pdev->id_entry = of_id->data; | ||
| 527 | i2c_imx->devtype = pdev->id_entry->driver_data; | ||
| 528 | |||
| 500 | /* Setup i2c_imx driver structure */ | 529 | /* Setup i2c_imx driver structure */ |
| 501 | strlcpy(i2c_imx->adapter.name, pdev->name, sizeof(i2c_imx->adapter.name)); | 530 | strlcpy(i2c_imx->adapter.name, pdev->name, sizeof(i2c_imx->adapter.name)); |
| 502 | i2c_imx->adapter.owner = THIS_MODULE; | 531 | i2c_imx->adapter.owner = THIS_MODULE; |
| @@ -593,7 +622,8 @@ static struct platform_driver i2c_imx_driver = { | |||
| 593 | .name = DRIVER_NAME, | 622 | .name = DRIVER_NAME, |
| 594 | .owner = THIS_MODULE, | 623 | .owner = THIS_MODULE, |
| 595 | .of_match_table = i2c_imx_dt_ids, | 624 | .of_match_table = i2c_imx_dt_ids, |
| 596 | } | 625 | }, |
| 626 | .id_table = imx_i2c_devtype, | ||
| 597 | }; | 627 | }; |
| 598 | 628 | ||
| 599 | static int __init i2c_adap_imx_init(void) | 629 | static int __init i2c_adap_imx_init(void) |
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index c0f7a4266263..4252d743963d 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c | |||
| @@ -34,13 +34,11 @@ | |||
| 34 | #include <linux/of_iommu.h> | 34 | #include <linux/of_iommu.h> |
| 35 | #include <linux/debugfs.h> | 35 | #include <linux/debugfs.h> |
| 36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
| 37 | #include <linux/tegra-ahb.h> | ||
| 37 | 38 | ||
| 38 | #include <asm/page.h> | 39 | #include <asm/page.h> |
| 39 | #include <asm/cacheflush.h> | 40 | #include <asm/cacheflush.h> |
| 40 | 41 | ||
| 41 | #include <mach/iomap.h> | ||
| 42 | #include <mach/tegra-ahb.h> | ||
| 43 | |||
| 44 | enum smmu_hwgrp { | 42 | enum smmu_hwgrp { |
| 45 | HWGRP_AFI, | 43 | HWGRP_AFI, |
| 46 | HWGRP_AVPC, | 44 | HWGRP_AVPC, |
diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index 9a55f4c4c7f4..8ac9b72b5ec7 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | #include <linux/videodev2.h> | 41 | #include <linux/videodev2.h> |
| 42 | 42 | ||
| 43 | #include <linux/platform_data/camera-mx2.h> | 43 | #include <linux/platform_data/camera-mx2.h> |
| 44 | #include <mach/hardware.h> | ||
| 45 | 44 | ||
| 46 | #include <asm/dma.h> | 45 | #include <asm/dma.h> |
| 47 | 46 | ||
| @@ -121,11 +120,13 @@ | |||
| 121 | 120 | ||
| 122 | #define CSICR1 0x00 | 121 | #define CSICR1 0x00 |
| 123 | #define CSICR2 0x04 | 122 | #define CSICR2 0x04 |
| 124 | #define CSISR (cpu_is_mx27() ? 0x08 : 0x18) | 123 | #define CSISR_IMX25 0x18 |
| 124 | #define CSISR_IMX27 0x08 | ||
| 125 | #define CSISTATFIFO 0x0c | 125 | #define CSISTATFIFO 0x0c |
| 126 | #define CSIRFIFO 0x10 | 126 | #define CSIRFIFO 0x10 |
| 127 | #define CSIRXCNT 0x14 | 127 | #define CSIRXCNT 0x14 |
| 128 | #define CSICR3 (cpu_is_mx27() ? 0x1C : 0x08) | 128 | #define CSICR3_IMX25 0x08 |
| 129 | #define CSICR3_IMX27 0x1c | ||
| 129 | #define CSIDMASA_STATFIFO 0x20 | 130 | #define CSIDMASA_STATFIFO 0x20 |
| 130 | #define CSIDMATA_STATFIFO 0x24 | 131 | #define CSIDMATA_STATFIFO 0x24 |
| 131 | #define CSIDMASA_FB1 0x28 | 132 | #define CSIDMASA_FB1 0x28 |
| @@ -268,6 +269,11 @@ struct mx2_buffer { | |||
| 268 | struct mx2_buf_internal internal; | 269 | struct mx2_buf_internal internal; |
| 269 | }; | 270 | }; |
| 270 | 271 | ||
| 272 | enum mx2_camera_type { | ||
| 273 | IMX25_CAMERA, | ||
| 274 | IMX27_CAMERA, | ||
| 275 | }; | ||
| 276 | |||
| 271 | struct mx2_camera_dev { | 277 | struct mx2_camera_dev { |
| 272 | struct device *dev; | 278 | struct device *dev; |
| 273 | struct soc_camera_host soc_host; | 279 | struct soc_camera_host soc_host; |
| @@ -291,6 +297,9 @@ struct mx2_camera_dev { | |||
| 291 | struct mx2_buffer *fb2_active; | 297 | struct mx2_buffer *fb2_active; |
| 292 | 298 | ||
| 293 | u32 csicr1; | 299 | u32 csicr1; |
| 300 | u32 reg_csisr; | ||
| 301 | u32 reg_csicr3; | ||
| 302 | enum mx2_camera_type devtype; | ||
| 294 | 303 | ||
| 295 | struct mx2_buf_internal buf_discard[2]; | 304 | struct mx2_buf_internal buf_discard[2]; |
| 296 | void *discard_buffer; | 305 | void *discard_buffer; |
| @@ -303,6 +312,29 @@ struct mx2_camera_dev { | |||
| 303 | struct vb2_alloc_ctx *alloc_ctx; | 312 | struct vb2_alloc_ctx *alloc_ctx; |
| 304 | }; | 313 | }; |
| 305 | 314 | ||
| 315 | static struct platform_device_id mx2_camera_devtype[] = { | ||
| 316 | { | ||
| 317 | .name = "imx25-camera", | ||
| 318 | .driver_data = IMX25_CAMERA, | ||
| 319 | }, { | ||
| 320 | .name = "imx27-camera", | ||
| 321 | .driver_data = IMX27_CAMERA, | ||
| 322 | }, { | ||
| 323 | /* sentinel */ | ||
| 324 | } | ||
| 325 | }; | ||
| 326 | MODULE_DEVICE_TABLE(platform, mx2_camera_devtype); | ||
| 327 | |||
| 328 | static inline int is_imx25_camera(struct mx2_camera_dev *pcdev) | ||
| 329 | { | ||
| 330 | return pcdev->devtype == IMX25_CAMERA; | ||
| 331 | } | ||
| 332 | |||
| 333 | static inline int is_imx27_camera(struct mx2_camera_dev *pcdev) | ||
| 334 | { | ||
| 335 | return pcdev->devtype == IMX27_CAMERA; | ||
| 336 | } | ||
| 337 | |||
| 306 | static struct mx2_buffer *mx2_ibuf_to_buf(struct mx2_buf_internal *int_buf) | 338 | static struct mx2_buffer *mx2_ibuf_to_buf(struct mx2_buf_internal *int_buf) |
| 307 | { | 339 | { |
| 308 | return container_of(int_buf, struct mx2_buffer, internal); | 340 | return container_of(int_buf, struct mx2_buffer, internal); |
| @@ -434,9 +466,9 @@ static void mx2_camera_deactivate(struct mx2_camera_dev *pcdev) | |||
| 434 | 466 | ||
| 435 | clk_disable_unprepare(pcdev->clk_csi); | 467 | clk_disable_unprepare(pcdev->clk_csi); |
| 436 | writel(0, pcdev->base_csi + CSICR1); | 468 | writel(0, pcdev->base_csi + CSICR1); |
| 437 | if (cpu_is_mx27()) { | 469 | if (is_imx27_camera(pcdev)) { |
| 438 | writel(0, pcdev->base_emma + PRP_CNTL); | 470 | writel(0, pcdev->base_emma + PRP_CNTL); |
| 439 | } else if (cpu_is_mx25()) { | 471 | } else if (is_imx25_camera(pcdev)) { |
| 440 | spin_lock_irqsave(&pcdev->lock, flags); | 472 | spin_lock_irqsave(&pcdev->lock, flags); |
| 441 | pcdev->fb1_active = NULL; | 473 | pcdev->fb1_active = NULL; |
| 442 | pcdev->fb2_active = NULL; | 474 | pcdev->fb2_active = NULL; |
| @@ -466,7 +498,7 @@ static int mx2_camera_add_device(struct soc_camera_device *icd) | |||
| 466 | 498 | ||
| 467 | csicr1 = CSICR1_MCLKEN; | 499 | csicr1 = CSICR1_MCLKEN; |
| 468 | 500 | ||
| 469 | if (cpu_is_mx27()) | 501 | if (is_imx27_camera(pcdev)) |
| 470 | csicr1 |= CSICR1_PRP_IF_EN | CSICR1_FCC | | 502 | csicr1 |= CSICR1_PRP_IF_EN | CSICR1_FCC | |
| 471 | CSICR1_RXFF_LEVEL(0); | 503 | CSICR1_RXFF_LEVEL(0); |
| 472 | 504 | ||
| @@ -542,7 +574,7 @@ out: | |||
| 542 | static irqreturn_t mx25_camera_irq(int irq_csi, void *data) | 574 | static irqreturn_t mx25_camera_irq(int irq_csi, void *data) |
| 543 | { | 575 | { |
| 544 | struct mx2_camera_dev *pcdev = data; | 576 | struct mx2_camera_dev *pcdev = data; |
| 545 | u32 status = readl(pcdev->base_csi + CSISR); | 577 | u32 status = readl(pcdev->base_csi + pcdev->reg_csisr); |
| 546 | 578 | ||
| 547 | if (status & CSISR_DMA_TSF_FB1_INT) | 579 | if (status & CSISR_DMA_TSF_FB1_INT) |
| 548 | mx25_camera_frame_done(pcdev, 1, MX2_STATE_DONE); | 580 | mx25_camera_frame_done(pcdev, 1, MX2_STATE_DONE); |
| @@ -551,7 +583,7 @@ static irqreturn_t mx25_camera_irq(int irq_csi, void *data) | |||
| 551 | 583 | ||
| 552 | /* FIXME: handle CSISR_RFF_OR_INT */ | 584 | /* FIXME: handle CSISR_RFF_OR_INT */ |
| 553 | 585 | ||
| 554 | writel(status, pcdev->base_csi + CSISR); | 586 | writel(status, pcdev->base_csi + pcdev->reg_csisr); |
| 555 | 587 | ||
| 556 | return IRQ_HANDLED; | 588 | return IRQ_HANDLED; |
| 557 | } | 589 | } |
| @@ -636,7 +668,7 @@ static void mx2_videobuf_queue(struct vb2_buffer *vb) | |||
| 636 | buf->state = MX2_STATE_QUEUED; | 668 | buf->state = MX2_STATE_QUEUED; |
| 637 | list_add_tail(&buf->internal.queue, &pcdev->capture); | 669 | list_add_tail(&buf->internal.queue, &pcdev->capture); |
| 638 | 670 | ||
| 639 | if (cpu_is_mx25()) { | 671 | if (is_imx25_camera(pcdev)) { |
| 640 | u32 csicr3, dma_inten = 0; | 672 | u32 csicr3, dma_inten = 0; |
| 641 | 673 | ||
| 642 | if (pcdev->fb1_active == NULL) { | 674 | if (pcdev->fb1_active == NULL) { |
| @@ -655,20 +687,20 @@ static void mx2_videobuf_queue(struct vb2_buffer *vb) | |||
| 655 | list_del(&buf->internal.queue); | 687 | list_del(&buf->internal.queue); |
| 656 | buf->state = MX2_STATE_ACTIVE; | 688 | buf->state = MX2_STATE_ACTIVE; |
| 657 | 689 | ||
| 658 | csicr3 = readl(pcdev->base_csi + CSICR3); | 690 | csicr3 = readl(pcdev->base_csi + pcdev->reg_csicr3); |
| 659 | 691 | ||
| 660 | /* Reflash DMA */ | 692 | /* Reflash DMA */ |
| 661 | writel(csicr3 | CSICR3_DMA_REFLASH_RFF, | 693 | writel(csicr3 | CSICR3_DMA_REFLASH_RFF, |
| 662 | pcdev->base_csi + CSICR3); | 694 | pcdev->base_csi + pcdev->reg_csicr3); |
| 663 | 695 | ||
| 664 | /* clear & enable interrupts */ | 696 | /* clear & enable interrupts */ |
| 665 | writel(dma_inten, pcdev->base_csi + CSISR); | 697 | writel(dma_inten, pcdev->base_csi + pcdev->reg_csisr); |
| 666 | pcdev->csicr1 |= dma_inten; | 698 | pcdev->csicr1 |= dma_inten; |
| 667 | writel(pcdev->csicr1, pcdev->base_csi + CSICR1); | 699 | writel(pcdev->csicr1, pcdev->base_csi + CSICR1); |
| 668 | 700 | ||
| 669 | /* enable DMA */ | 701 | /* enable DMA */ |
| 670 | csicr3 |= CSICR3_DMA_REQ_EN_RFF | CSICR3_RXFF_LEVEL(1); | 702 | csicr3 |= CSICR3_DMA_REQ_EN_RFF | CSICR3_RXFF_LEVEL(1); |
| 671 | writel(csicr3, pcdev->base_csi + CSICR3); | 703 | writel(csicr3, pcdev->base_csi + pcdev->reg_csicr3); |
| 672 | } | 704 | } |
| 673 | } | 705 | } |
| 674 | 706 | ||
| @@ -712,7 +744,7 @@ static void mx2_videobuf_release(struct vb2_buffer *vb) | |||
| 712 | */ | 744 | */ |
| 713 | 745 | ||
| 714 | spin_lock_irqsave(&pcdev->lock, flags); | 746 | spin_lock_irqsave(&pcdev->lock, flags); |
| 715 | if (cpu_is_mx25() && buf->state == MX2_STATE_ACTIVE) { | 747 | if (is_imx25_camera(pcdev) && buf->state == MX2_STATE_ACTIVE) { |
| 716 | if (pcdev->fb1_active == buf) { | 748 | if (pcdev->fb1_active == buf) { |
| 717 | pcdev->csicr1 &= ~CSICR1_FB1_DMA_INTEN; | 749 | pcdev->csicr1 &= ~CSICR1_FB1_DMA_INTEN; |
| 718 | writel(0, pcdev->base_csi + CSIDMASA_FB1); | 750 | writel(0, pcdev->base_csi + CSIDMASA_FB1); |
| @@ -835,7 +867,7 @@ static int mx2_start_streaming(struct vb2_queue *q, unsigned int count) | |||
| 835 | unsigned long phys; | 867 | unsigned long phys; |
| 836 | int bytesperline; | 868 | int bytesperline; |
| 837 | 869 | ||
| 838 | if (cpu_is_mx27()) { | 870 | if (is_imx27_camera(pcdev)) { |
| 839 | unsigned long flags; | 871 | unsigned long flags; |
| 840 | if (count < 2) | 872 | if (count < 2) |
| 841 | return -EINVAL; | 873 | return -EINVAL; |
| @@ -934,7 +966,7 @@ static int mx2_stop_streaming(struct vb2_queue *q) | |||
| 934 | void *b; | 966 | void *b; |
| 935 | u32 cntl; | 967 | u32 cntl; |
| 936 | 968 | ||
| 937 | if (cpu_is_mx27()) { | 969 | if (is_imx27_camera(pcdev)) { |
| 938 | spin_lock_irqsave(&pcdev->lock, flags); | 970 | spin_lock_irqsave(&pcdev->lock, flags); |
| 939 | 971 | ||
| 940 | cntl = readl(pcdev->base_emma + PRP_CNTL); | 972 | cntl = readl(pcdev->base_emma + PRP_CNTL); |
| @@ -1086,11 +1118,11 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd) | |||
| 1086 | if (bytesperline < 0) | 1118 | if (bytesperline < 0) |
| 1087 | return bytesperline; | 1119 | return bytesperline; |
| 1088 | 1120 | ||
| 1089 | if (cpu_is_mx27()) { | 1121 | if (is_imx27_camera(pcdev)) { |
| 1090 | ret = mx27_camera_emma_prp_reset(pcdev); | 1122 | ret = mx27_camera_emma_prp_reset(pcdev); |
| 1091 | if (ret) | 1123 | if (ret) |
| 1092 | return ret; | 1124 | return ret; |
| 1093 | } else if (cpu_is_mx25()) { | 1125 | } else if (is_imx25_camera(pcdev)) { |
| 1094 | writel((bytesperline * icd->user_height) >> 2, | 1126 | writel((bytesperline * icd->user_height) >> 2, |
| 1095 | pcdev->base_csi + CSIRXCNT); | 1127 | pcdev->base_csi + CSIRXCNT); |
| 1096 | writel((bytesperline << 16) | icd->user_height, | 1128 | writel((bytesperline << 16) | icd->user_height, |
| @@ -1397,7 +1429,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, | |||
| 1397 | /* FIXME: implement MX27 limits */ | 1429 | /* FIXME: implement MX27 limits */ |
| 1398 | 1430 | ||
| 1399 | /* limit to MX25 hardware capabilities */ | 1431 | /* limit to MX25 hardware capabilities */ |
| 1400 | if (cpu_is_mx25()) { | 1432 | if (is_imx25_camera(pcdev)) { |
| 1401 | if (xlate->host_fmt->bits_per_sample <= 8) | 1433 | if (xlate->host_fmt->bits_per_sample <= 8) |
| 1402 | width_limit = 0xffff * 4; | 1434 | width_limit = 0xffff * 4; |
| 1403 | else | 1435 | else |
| @@ -1731,6 +1763,20 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
| 1731 | goto exit; | 1763 | goto exit; |
| 1732 | } | 1764 | } |
| 1733 | 1765 | ||
| 1766 | pcdev->devtype = pdev->id_entry->driver_data; | ||
| 1767 | switch (pcdev->devtype) { | ||
| 1768 | case IMX25_CAMERA: | ||
| 1769 | pcdev->reg_csisr = CSISR_IMX25; | ||
| 1770 | pcdev->reg_csicr3 = CSICR3_IMX25; | ||
| 1771 | break; | ||
| 1772 | case IMX27_CAMERA: | ||
| 1773 | pcdev->reg_csisr = CSISR_IMX27; | ||
| 1774 | pcdev->reg_csicr3 = CSICR3_IMX27; | ||
| 1775 | break; | ||
| 1776 | default: | ||
| 1777 | break; | ||
| 1778 | } | ||
| 1779 | |||
| 1734 | pcdev->clk_csi = devm_clk_get(&pdev->dev, "ahb"); | 1780 | pcdev->clk_csi = devm_clk_get(&pdev->dev, "ahb"); |
| 1735 | if (IS_ERR(pcdev->clk_csi)) { | 1781 | if (IS_ERR(pcdev->clk_csi)) { |
| 1736 | dev_err(&pdev->dev, "Could not get csi clock\n"); | 1782 | dev_err(&pdev->dev, "Could not get csi clock\n"); |
| @@ -1768,7 +1814,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
| 1768 | pcdev->dev = &pdev->dev; | 1814 | pcdev->dev = &pdev->dev; |
| 1769 | platform_set_drvdata(pdev, pcdev); | 1815 | platform_set_drvdata(pdev, pcdev); |
| 1770 | 1816 | ||
| 1771 | if (cpu_is_mx25()) { | 1817 | if (is_imx25_camera(pcdev)) { |
| 1772 | err = devm_request_irq(&pdev->dev, irq_csi, mx25_camera_irq, 0, | 1818 | err = devm_request_irq(&pdev->dev, irq_csi, mx25_camera_irq, 0, |
| 1773 | MX2_CAM_DRV_NAME, pcdev); | 1819 | MX2_CAM_DRV_NAME, pcdev); |
| 1774 | if (err) { | 1820 | if (err) { |
| @@ -1777,7 +1823,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
| 1777 | } | 1823 | } |
| 1778 | } | 1824 | } |
| 1779 | 1825 | ||
| 1780 | if (cpu_is_mx27()) { | 1826 | if (is_imx27_camera(pcdev)) { |
| 1781 | err = mx27_camera_emma_init(pdev); | 1827 | err = mx27_camera_emma_init(pdev); |
| 1782 | if (err) | 1828 | if (err) |
| 1783 | goto exit; | 1829 | goto exit; |
| @@ -1794,7 +1840,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
| 1794 | pcdev->soc_host.priv = pcdev; | 1840 | pcdev->soc_host.priv = pcdev; |
| 1795 | pcdev->soc_host.v4l2_dev.dev = &pdev->dev; | 1841 | pcdev->soc_host.v4l2_dev.dev = &pdev->dev; |
| 1796 | pcdev->soc_host.nr = pdev->id; | 1842 | pcdev->soc_host.nr = pdev->id; |
| 1797 | if (cpu_is_mx25()) | 1843 | if (is_imx25_camera(pcdev)) |
| 1798 | pcdev->soc_host.capabilities = SOCAM_HOST_CAP_STRIDE; | 1844 | pcdev->soc_host.capabilities = SOCAM_HOST_CAP_STRIDE; |
| 1799 | 1845 | ||
| 1800 | pcdev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev); | 1846 | pcdev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev); |
| @@ -1814,7 +1860,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) | |||
| 1814 | exit_free_emma: | 1860 | exit_free_emma: |
| 1815 | vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx); | 1861 | vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx); |
| 1816 | eallocctx: | 1862 | eallocctx: |
| 1817 | if (cpu_is_mx27()) { | 1863 | if (is_imx27_camera(pcdev)) { |
| 1818 | clk_disable_unprepare(pcdev->clk_emma_ipg); | 1864 | clk_disable_unprepare(pcdev->clk_emma_ipg); |
| 1819 | clk_disable_unprepare(pcdev->clk_emma_ahb); | 1865 | clk_disable_unprepare(pcdev->clk_emma_ahb); |
| 1820 | } | 1866 | } |
| @@ -1832,7 +1878,7 @@ static int __devexit mx2_camera_remove(struct platform_device *pdev) | |||
| 1832 | 1878 | ||
| 1833 | vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx); | 1879 | vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx); |
| 1834 | 1880 | ||
| 1835 | if (cpu_is_mx27()) { | 1881 | if (is_imx27_camera(pcdev)) { |
| 1836 | clk_disable_unprepare(pcdev->clk_emma_ipg); | 1882 | clk_disable_unprepare(pcdev->clk_emma_ipg); |
| 1837 | clk_disable_unprepare(pcdev->clk_emma_ahb); | 1883 | clk_disable_unprepare(pcdev->clk_emma_ahb); |
| 1838 | } | 1884 | } |
| @@ -1846,6 +1892,7 @@ static struct platform_driver mx2_camera_driver = { | |||
| 1846 | .driver = { | 1892 | .driver = { |
| 1847 | .name = MX2_CAM_DRV_NAME, | 1893 | .name = MX2_CAM_DRV_NAME, |
| 1848 | }, | 1894 | }, |
| 1895 | .id_table = mx2_camera_devtype, | ||
| 1849 | .remove = __devexit_p(mx2_camera_remove), | 1896 | .remove = __devexit_p(mx2_camera_remove), |
| 1850 | }; | 1897 | }; |
| 1851 | 1898 | ||
diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 261f6e9e1b17..06d16de76377 100644 --- a/drivers/media/platform/soc_camera/mx3_camera.c +++ b/drivers/media/platform/soc_camera/mx3_camera.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
| 18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
| 19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
| 20 | #include <linux/dma/ipu-dma.h> | ||
| 20 | 21 | ||
| 21 | #include <media/v4l2-common.h> | 22 | #include <media/v4l2-common.h> |
| 22 | #include <media/v4l2-dev.h> | 23 | #include <media/v4l2-dev.h> |
| @@ -24,7 +25,6 @@ | |||
| 24 | #include <media/soc_camera.h> | 25 | #include <media/soc_camera.h> |
| 25 | #include <media/soc_mediabus.h> | 26 | #include <media/soc_mediabus.h> |
| 26 | 27 | ||
| 27 | #include <mach/ipu.h> | ||
| 28 | #include <linux/platform_data/camera-mx3.h> | 28 | #include <linux/platform_data/camera-mx3.h> |
| 29 | #include <linux/platform_data/dma-imx.h> | 29 | #include <linux/platform_data/dma-imx.h> |
| 30 | 30 | ||
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 29e680f193a0..a72936eea6fa 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | #include <linux/platform_data/mmc-mxcmmc.h> | 41 | #include <linux/platform_data/mmc-mxcmmc.h> |
| 42 | 42 | ||
| 43 | #include <linux/platform_data/dma-imx.h> | 43 | #include <linux/platform_data/dma-imx.h> |
| 44 | #include <mach/hardware.h> | ||
| 45 | 44 | ||
| 46 | #define DRIVER_NAME "mxc-mmc" | 45 | #define DRIVER_NAME "mxc-mmc" |
| 47 | #define MXCMCI_TIMEOUT_MS 10000 | 46 | #define MXCMCI_TIMEOUT_MS 10000 |
| @@ -113,6 +112,11 @@ | |||
| 113 | #define INT_WRITE_OP_DONE_EN (1 << 1) | 112 | #define INT_WRITE_OP_DONE_EN (1 << 1) |
| 114 | #define INT_READ_OP_EN (1 << 0) | 113 | #define INT_READ_OP_EN (1 << 0) |
| 115 | 114 | ||
| 115 | enum mxcmci_type { | ||
| 116 | IMX21_MMC, | ||
| 117 | IMX31_MMC, | ||
| 118 | }; | ||
| 119 | |||
| 116 | struct mxcmci_host { | 120 | struct mxcmci_host { |
| 117 | struct mmc_host *mmc; | 121 | struct mmc_host *mmc; |
| 118 | struct resource *res; | 122 | struct resource *res; |
| @@ -153,7 +157,26 @@ struct mxcmci_host { | |||
| 153 | struct imx_dma_data dma_data; | 157 | struct imx_dma_data dma_data; |
| 154 | 158 | ||
| 155 | struct timer_list watchdog; | 159 | struct timer_list watchdog; |
| 160 | enum mxcmci_type devtype; | ||
| 161 | }; | ||
| 162 | |||
| 163 | static struct platform_device_id mxcmci_devtype[] = { | ||
| 164 | { | ||
| 165 | .name = "imx21-mmc", | ||
| 166 | .driver_data = IMX21_MMC, | ||
| 167 | }, { | ||
| 168 | .name = "imx31-mmc", | ||
| 169 | .driver_data = IMX31_MMC, | ||
| 170 | }, { | ||
| 171 | /* sentinel */ | ||
| 172 | } | ||
| 156 | }; | 173 | }; |
| 174 | MODULE_DEVICE_TABLE(platform, mxcmci_devtype); | ||
| 175 | |||
| 176 | static inline int is_imx31_mmc(struct mxcmci_host *host) | ||
| 177 | { | ||
| 178 | return host->devtype == IMX31_MMC; | ||
| 179 | } | ||
| 157 | 180 | ||
| 158 | static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios); | 181 | static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios); |
| 159 | 182 | ||
| @@ -843,6 +866,8 @@ static void mxcmci_enable_sdio_irq(struct mmc_host *mmc, int enable) | |||
| 843 | 866 | ||
| 844 | static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card) | 867 | static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card) |
| 845 | { | 868 | { |
| 869 | struct mxcmci_host *mxcmci = mmc_priv(host); | ||
| 870 | |||
| 846 | /* | 871 | /* |
| 847 | * MX3 SoCs have a silicon bug which corrupts CRC calculation of | 872 | * MX3 SoCs have a silicon bug which corrupts CRC calculation of |
| 848 | * multi-block transfers when connected SDIO peripheral doesn't | 873 | * multi-block transfers when connected SDIO peripheral doesn't |
| @@ -850,7 +875,7 @@ static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card) | |||
| 850 | * One way to prevent this is to only allow 1-bit transfers. | 875 | * One way to prevent this is to only allow 1-bit transfers. |
| 851 | */ | 876 | */ |
| 852 | 877 | ||
| 853 | if (cpu_is_mx3() && card->type == MMC_TYPE_SDIO) | 878 | if (is_imx31_mmc(mxcmci) && card->type == MMC_TYPE_SDIO) |
| 854 | host->caps &= ~MMC_CAP_4_BIT_DATA; | 879 | host->caps &= ~MMC_CAP_4_BIT_DATA; |
| 855 | else | 880 | else |
| 856 | host->caps |= MMC_CAP_4_BIT_DATA; | 881 | host->caps |= MMC_CAP_4_BIT_DATA; |
| @@ -948,6 +973,7 @@ static int mxcmci_probe(struct platform_device *pdev) | |||
| 948 | 973 | ||
| 949 | host->mmc = mmc; | 974 | host->mmc = mmc; |
| 950 | host->pdata = pdev->dev.platform_data; | 975 | host->pdata = pdev->dev.platform_data; |
| 976 | host->devtype = pdev->id_entry->driver_data; | ||
| 951 | spin_lock_init(&host->lock); | 977 | spin_lock_init(&host->lock); |
| 952 | 978 | ||
| 953 | mxcmci_init_ocr(host); | 979 | mxcmci_init_ocr(host); |
| @@ -1120,6 +1146,7 @@ static const struct dev_pm_ops mxcmci_pm_ops = { | |||
| 1120 | static struct platform_driver mxcmci_driver = { | 1146 | static struct platform_driver mxcmci_driver = { |
| 1121 | .probe = mxcmci_probe, | 1147 | .probe = mxcmci_probe, |
| 1122 | .remove = mxcmci_remove, | 1148 | .remove = mxcmci_remove, |
| 1149 | .id_table = mxcmci_devtype, | ||
| 1123 | .driver = { | 1150 | .driver = { |
| 1124 | .name = DRIVER_NAME, | 1151 | .name = DRIVER_NAME, |
| 1125 | .owner = THIS_MODULE, | 1152 | .owner = THIS_MODULE, |
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 72e31d86030d..022dcdc256fb 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
| @@ -37,15 +37,9 @@ | |||
| 37 | 37 | ||
| 38 | #include <asm/mach/flash.h> | 38 | #include <asm/mach/flash.h> |
| 39 | #include <linux/platform_data/mtd-mxc_nand.h> | 39 | #include <linux/platform_data/mtd-mxc_nand.h> |
| 40 | #include <mach/hardware.h> | ||
| 41 | 40 | ||
| 42 | #define DRIVER_NAME "mxc_nand" | 41 | #define DRIVER_NAME "mxc_nand" |
| 43 | 42 | ||
| 44 | #define nfc_is_v21() (cpu_is_mx25() || cpu_is_mx35()) | ||
| 45 | #define nfc_is_v1() (cpu_is_mx31() || cpu_is_mx27() || cpu_is_mx21()) | ||
| 46 | #define nfc_is_v3_2a() cpu_is_mx51() | ||
| 47 | #define nfc_is_v3_2b() cpu_is_mx53() | ||
| 48 | |||
| 49 | /* Addresses for NFC registers */ | 43 | /* Addresses for NFC registers */ |
| 50 | #define NFC_V1_V2_BUF_SIZE (host->regs + 0x00) | 44 | #define NFC_V1_V2_BUF_SIZE (host->regs + 0x00) |
| 51 | #define NFC_V1_V2_BUF_ADDR (host->regs + 0x04) | 45 | #define NFC_V1_V2_BUF_ADDR (host->regs + 0x04) |
| @@ -1283,6 +1277,53 @@ static const struct mxc_nand_devtype_data imx53_nand_devtype_data = { | |||
| 1283 | .ppb_shift = 8, | 1277 | .ppb_shift = 8, |
| 1284 | }; | 1278 | }; |
| 1285 | 1279 | ||
| 1280 | static inline int is_imx21_nfc(struct mxc_nand_host *host) | ||
| 1281 | { | ||
| 1282 | return host->devtype_data == &imx21_nand_devtype_data; | ||
| 1283 | } | ||
| 1284 | |||
| 1285 | static inline int is_imx27_nfc(struct mxc_nand_host *host) | ||
| 1286 | { | ||
| 1287 | return host->devtype_data == &imx27_nand_devtype_data; | ||
| 1288 | } | ||
| 1289 | |||
| 1290 | static inline int is_imx25_nfc(struct mxc_nand_host *host) | ||
| 1291 | { | ||
| 1292 | return host->devtype_data == &imx25_nand_devtype_data; | ||
| 1293 | } | ||
| 1294 | |||
| 1295 | static inline int is_imx51_nfc(struct mxc_nand_host *host) | ||
| 1296 | { | ||
| 1297 | return host->devtype_data == &imx51_nand_devtype_data; | ||
| 1298 | } | ||
| 1299 | |||
| 1300 | static inline int is_imx53_nfc(struct mxc_nand_host *host) | ||
| 1301 | { | ||
| 1302 | return host->devtype_data == &imx53_nand_devtype_data; | ||
| 1303 | } | ||
| 1304 | |||
| 1305 | static struct platform_device_id mxcnd_devtype[] = { | ||
| 1306 | { | ||
| 1307 | .name = "imx21-nand", | ||
| 1308 | .driver_data = (kernel_ulong_t) &imx21_nand_devtype_data, | ||
| 1309 | }, { | ||
| 1310 | .name = "imx27-nand", | ||
| 1311 | .driver_data = (kernel_ulong_t) &imx27_nand_devtype_data, | ||
| 1312 | }, { | ||
| 1313 | .name = "imx25-nand", | ||
| 1314 | .driver_data = (kernel_ulong_t) &imx25_nand_devtype_data, | ||
| 1315 | }, { | ||
| 1316 | .name = "imx51-nand", | ||
| 1317 | .driver_data = (kernel_ulong_t) &imx51_nand_devtype_data, | ||
| 1318 | }, { | ||
| 1319 | .name = "imx53-nand", | ||
| 1320 | .driver_data = (kernel_ulong_t) &imx53_nand_devtype_data, | ||
| 1321 | }, { | ||
| 1322 | /* sentinel */ | ||
| 1323 | } | ||
| 1324 | }; | ||
| 1325 | MODULE_DEVICE_TABLE(platform, mxcnd_devtype); | ||
| 1326 | |||
| 1286 | #ifdef CONFIG_OF_MTD | 1327 | #ifdef CONFIG_OF_MTD |
| 1287 | static const struct of_device_id mxcnd_dt_ids[] = { | 1328 | static const struct of_device_id mxcnd_dt_ids[] = { |
| 1288 | { | 1329 | { |
| @@ -1337,32 +1378,6 @@ static int __init mxcnd_probe_dt(struct mxc_nand_host *host) | |||
| 1337 | } | 1378 | } |
| 1338 | #endif | 1379 | #endif |
| 1339 | 1380 | ||
| 1340 | static int __init mxcnd_probe_pdata(struct mxc_nand_host *host) | ||
| 1341 | { | ||
| 1342 | struct mxc_nand_platform_data *pdata = host->dev->platform_data; | ||
| 1343 | |||
| 1344 | if (!pdata) | ||
| 1345 | return -ENODEV; | ||
| 1346 | |||
| 1347 | host->pdata = *pdata; | ||
| 1348 | |||
| 1349 | if (nfc_is_v1()) { | ||
| 1350 | if (cpu_is_mx21()) | ||
| 1351 | host->devtype_data = &imx21_nand_devtype_data; | ||
| 1352 | else | ||
| 1353 | host->devtype_data = &imx27_nand_devtype_data; | ||
| 1354 | } else if (nfc_is_v21()) { | ||
| 1355 | host->devtype_data = &imx25_nand_devtype_data; | ||
| 1356 | } else if (nfc_is_v3_2a()) { | ||
| 1357 | host->devtype_data = &imx51_nand_devtype_data; | ||
| 1358 | } else if (nfc_is_v3_2b()) { | ||
| 1359 | host->devtype_data = &imx53_nand_devtype_data; | ||
| 1360 | } else | ||
| 1361 | BUG(); | ||
| 1362 | |||
| 1363 | return 0; | ||
| 1364 | } | ||
| 1365 | |||
| 1366 | static int __devinit mxcnd_probe(struct platform_device *pdev) | 1381 | static int __devinit mxcnd_probe(struct platform_device *pdev) |
| 1367 | { | 1382 | { |
| 1368 | struct nand_chip *this; | 1383 | struct nand_chip *this; |
| @@ -1404,8 +1419,16 @@ static int __devinit mxcnd_probe(struct platform_device *pdev) | |||
| 1404 | return PTR_ERR(host->clk); | 1419 | return PTR_ERR(host->clk); |
| 1405 | 1420 | ||
| 1406 | err = mxcnd_probe_dt(host); | 1421 | err = mxcnd_probe_dt(host); |
| 1407 | if (err > 0) | 1422 | if (err > 0) { |
| 1408 | err = mxcnd_probe_pdata(host); | 1423 | struct mxc_nand_platform_data *pdata = pdev->dev.platform_data; |
| 1424 | if (pdata) { | ||
| 1425 | host->pdata = *pdata; | ||
| 1426 | host->devtype_data = (struct mxc_nand_devtype_data *) | ||
| 1427 | pdev->id_entry->driver_data; | ||
| 1428 | } else { | ||
| 1429 | err = -ENODEV; | ||
| 1430 | } | ||
| 1431 | } | ||
| 1409 | if (err < 0) | 1432 | if (err < 0) |
| 1410 | return err; | 1433 | return err; |
| 1411 | 1434 | ||
| @@ -1494,7 +1517,7 @@ static int __devinit mxcnd_probe(struct platform_device *pdev) | |||
| 1494 | } | 1517 | } |
| 1495 | 1518 | ||
| 1496 | /* first scan to find the device and get the page size */ | 1519 | /* first scan to find the device and get the page size */ |
| 1497 | if (nand_scan_ident(mtd, nfc_is_v21() ? 4 : 1, NULL)) { | 1520 | if (nand_scan_ident(mtd, is_imx25_nfc(host) ? 4 : 1, NULL)) { |
| 1498 | err = -ENXIO; | 1521 | err = -ENXIO; |
| 1499 | goto escan; | 1522 | goto escan; |
| 1500 | } | 1523 | } |
| @@ -1508,7 +1531,7 @@ static int __devinit mxcnd_probe(struct platform_device *pdev) | |||
| 1508 | this->ecc.layout = host->devtype_data->ecclayout_4k; | 1531 | this->ecc.layout = host->devtype_data->ecclayout_4k; |
| 1509 | 1532 | ||
| 1510 | if (this->ecc.mode == NAND_ECC_HW) { | 1533 | if (this->ecc.mode == NAND_ECC_HW) { |
| 1511 | if (nfc_is_v1()) | 1534 | if (is_imx21_nfc(host) || is_imx27_nfc(host)) |
| 1512 | this->ecc.strength = 1; | 1535 | this->ecc.strength = 1; |
| 1513 | else | 1536 | else |
| 1514 | this->ecc.strength = (host->eccsize == 4) ? 4 : 8; | 1537 | this->ecc.strength = (host->eccsize == 4) ? 4 : 8; |
| @@ -1555,6 +1578,7 @@ static struct platform_driver mxcnd_driver = { | |||
| 1555 | .owner = THIS_MODULE, | 1578 | .owner = THIS_MODULE, |
| 1556 | .of_match_table = of_match_ptr(mxcnd_dt_ids), | 1579 | .of_match_table = of_match_ptr(mxcnd_dt_ids), |
| 1557 | }, | 1580 | }, |
| 1581 | .id_table = mxcnd_devtype, | ||
| 1558 | .probe = mxcnd_probe, | 1582 | .probe = mxcnd_probe, |
| 1559 | .remove = __devexit_p(mxcnd_remove), | 1583 | .remove = __devexit_p(mxcnd_remove), |
| 1560 | }; | 1584 | }; |
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index cd0106293a49..7304139934aa 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c | |||
| @@ -17,8 +17,6 @@ | |||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
| 19 | 19 | ||
| 20 | #include <mach/hardware.h> | ||
| 21 | |||
| 22 | #define RTC_INPUT_CLK_32768HZ (0x00 << 5) | 20 | #define RTC_INPUT_CLK_32768HZ (0x00 << 5) |
| 23 | #define RTC_INPUT_CLK_32000HZ (0x01 << 5) | 21 | #define RTC_INPUT_CLK_32000HZ (0x01 << 5) |
| 24 | #define RTC_INPUT_CLK_38400HZ (0x02 << 5) | 22 | #define RTC_INPUT_CLK_38400HZ (0x02 << 5) |
| @@ -72,14 +70,38 @@ static const u32 PIE_BIT_DEF[MAX_PIE_NUM][2] = { | |||
| 72 | #define RTC_TEST2 0x2C /* 32bit rtc test reg 2 */ | 70 | #define RTC_TEST2 0x2C /* 32bit rtc test reg 2 */ |
| 73 | #define RTC_TEST3 0x30 /* 32bit rtc test reg 3 */ | 71 | #define RTC_TEST3 0x30 /* 32bit rtc test reg 3 */ |
| 74 | 72 | ||
| 73 | enum imx_rtc_type { | ||
| 74 | IMX1_RTC, | ||
| 75 | IMX21_RTC, | ||
| 76 | }; | ||
| 77 | |||
| 75 | struct rtc_plat_data { | 78 | struct rtc_plat_data { |
| 76 | struct rtc_device *rtc; | 79 | struct rtc_device *rtc; |
| 77 | void __iomem *ioaddr; | 80 | void __iomem *ioaddr; |
| 78 | int irq; | 81 | int irq; |
| 79 | struct clk *clk; | 82 | struct clk *clk; |
| 80 | struct rtc_time g_rtc_alarm; | 83 | struct rtc_time g_rtc_alarm; |
| 84 | enum imx_rtc_type devtype; | ||
| 81 | }; | 85 | }; |
| 82 | 86 | ||
| 87 | static struct platform_device_id imx_rtc_devtype[] = { | ||
| 88 | { | ||
| 89 | .name = "imx1-rtc", | ||
| 90 | .driver_data = IMX1_RTC, | ||
| 91 | }, { | ||
| 92 | .name = "imx21-rtc", | ||
| 93 | .driver_data = IMX21_RTC, | ||
| 94 | }, { | ||
| 95 | /* sentinel */ | ||
| 96 | } | ||
| 97 | }; | ||
| 98 | MODULE_DEVICE_TABLE(platform, imx_rtc_devtype); | ||
| 99 | |||
| 100 | static inline int is_imx1_rtc(struct rtc_plat_data *data) | ||
| 101 | { | ||
| 102 | return data->devtype == IMX1_RTC; | ||
| 103 | } | ||
| 104 | |||
| 83 | /* | 105 | /* |
| 84 | * This function is used to obtain the RTC time or the alarm value in | 106 | * This function is used to obtain the RTC time or the alarm value in |
| 85 | * second. | 107 | * second. |
| @@ -278,10 +300,13 @@ static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
| 278 | */ | 300 | */ |
| 279 | static int mxc_rtc_set_mmss(struct device *dev, unsigned long time) | 301 | static int mxc_rtc_set_mmss(struct device *dev, unsigned long time) |
| 280 | { | 302 | { |
| 303 | struct platform_device *pdev = to_platform_device(dev); | ||
| 304 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | ||
| 305 | |||
| 281 | /* | 306 | /* |
| 282 | * TTC_DAYR register is 9-bit in MX1 SoC, save time and day of year only | 307 | * TTC_DAYR register is 9-bit in MX1 SoC, save time and day of year only |
| 283 | */ | 308 | */ |
| 284 | if (cpu_is_mx1()) { | 309 | if (is_imx1_rtc(pdata)) { |
| 285 | struct rtc_time tm; | 310 | struct rtc_time tm; |
| 286 | 311 | ||
| 287 | rtc_time_to_tm(time, &tm); | 312 | rtc_time_to_tm(time, &tm); |
| @@ -360,6 +385,8 @@ static int __devinit mxc_rtc_probe(struct platform_device *pdev) | |||
| 360 | if (!pdata) | 385 | if (!pdata) |
| 361 | return -ENOMEM; | 386 | return -ENOMEM; |
| 362 | 387 | ||
| 388 | pdata->devtype = pdev->id_entry->driver_data; | ||
| 389 | |||
| 363 | if (!devm_request_mem_region(&pdev->dev, res->start, | 390 | if (!devm_request_mem_region(&pdev->dev, res->start, |
| 364 | resource_size(res), pdev->name)) | 391 | resource_size(res), pdev->name)) |
| 365 | return -EBUSY; | 392 | return -EBUSY; |
| @@ -480,6 +507,7 @@ static struct platform_driver mxc_rtc_driver = { | |||
| 480 | #endif | 507 | #endif |
| 481 | .owner = THIS_MODULE, | 508 | .owner = THIS_MODULE, |
| 482 | }, | 509 | }, |
| 510 | .id_table = imx_rtc_devtype, | ||
| 483 | .probe = mxc_rtc_probe, | 511 | .probe = mxc_rtc_probe, |
| 484 | .remove = __devexit_p(mxc_rtc_remove), | 512 | .remove = __devexit_p(mxc_rtc_remove), |
| 485 | }; | 513 | }; |
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index c59b7b299d37..2830946860d1 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c | |||
| @@ -39,7 +39,6 @@ | |||
| 39 | #include <linux/workqueue.h> | 39 | #include <linux/workqueue.h> |
| 40 | 40 | ||
| 41 | #include <mach/clk.h> | 41 | #include <mach/clk.h> |
| 42 | #include <mach/iomap.h> | ||
| 43 | 42 | ||
| 44 | #include "nvec.h" | 43 | #include "nvec.h" |
| 45 | 44 | ||
diff --git a/drivers/staging/tidspbridge/core/ue_deh.c b/drivers/staging/tidspbridge/core/ue_deh.c index 3d28b2345fbd..6aea6f1b4982 100644 --- a/drivers/staging/tidspbridge/core/ue_deh.c +++ b/drivers/staging/tidspbridge/core/ue_deh.c | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | 19 | ||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
| 22 | #include <plat/dmtimer.h> | ||
| 23 | 22 | ||
| 24 | #include <dspbridge/dbdefs.h> | 23 | #include <dspbridge/dbdefs.h> |
| 25 | #include <dspbridge/dspdeh.h> | 24 | #include <dspbridge/dspdeh.h> |
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 8804f74689d7..ec7f5d2c90de 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <linux/usb/ulpi.h> | 24 | #include <linux/usb/ulpi.h> |
| 25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
| 26 | 26 | ||
| 27 | #include <mach/hardware.h> | ||
| 28 | #include <linux/platform_data/usb-ehci-mxc.h> | 27 | #include <linux/platform_data/usb-ehci-mxc.h> |
| 29 | 28 | ||
| 30 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index cf2688de0832..e501dbc966b3 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
| @@ -33,7 +33,6 @@ | |||
| 33 | #include <linux/math64.h> | 33 | #include <linux/math64.h> |
| 34 | 34 | ||
| 35 | #include <linux/platform_data/video-imxfb.h> | 35 | #include <linux/platform_data/video-imxfb.h> |
| 36 | #include <mach/hardware.h> | ||
| 37 | 36 | ||
| 38 | /* | 37 | /* |
| 39 | * Complain if VAR is out of range. | 38 | * Complain if VAR is out of range. |
| @@ -53,8 +52,8 @@ | |||
| 53 | #define LCDC_SIZE 0x04 | 52 | #define LCDC_SIZE 0x04 |
| 54 | #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20) | 53 | #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20) |
| 55 | 54 | ||
| 56 | #define YMAX_MASK (cpu_is_mx1() ? 0x1ff : 0x3ff) | 55 | #define YMAX_MASK_IMX1 0x1ff |
| 57 | #define SIZE_YMAX(y) ((y) & YMAX_MASK) | 56 | #define YMAX_MASK_IMX21 0x3ff |
| 58 | 57 | ||
| 59 | #define LCDC_VPW 0x08 | 58 | #define LCDC_VPW 0x08 |
| 60 | #define VPW_VPW(x) ((x) & 0x3ff) | 59 | #define VPW_VPW(x) ((x) & 0x3ff) |
| @@ -128,12 +127,18 @@ struct imxfb_rgb { | |||
| 128 | struct fb_bitfield transp; | 127 | struct fb_bitfield transp; |
| 129 | }; | 128 | }; |
| 130 | 129 | ||
| 130 | enum imxfb_type { | ||
| 131 | IMX1_FB, | ||
| 132 | IMX21_FB, | ||
| 133 | }; | ||
| 134 | |||
| 131 | struct imxfb_info { | 135 | struct imxfb_info { |
| 132 | struct platform_device *pdev; | 136 | struct platform_device *pdev; |
| 133 | void __iomem *regs; | 137 | void __iomem *regs; |
| 134 | struct clk *clk_ipg; | 138 | struct clk *clk_ipg; |
| 135 | struct clk *clk_ahb; | 139 | struct clk *clk_ahb; |
| 136 | struct clk *clk_per; | 140 | struct clk *clk_per; |
| 141 | enum imxfb_type devtype; | ||
| 137 | 142 | ||
| 138 | /* | 143 | /* |
| 139 | * These are the addresses we mapped | 144 | * These are the addresses we mapped |
| @@ -168,6 +173,24 @@ struct imxfb_info { | |||
| 168 | void (*backlight_power)(int); | 173 | void (*backlight_power)(int); |
| 169 | }; | 174 | }; |
| 170 | 175 | ||
| 176 | static struct platform_device_id imxfb_devtype[] = { | ||
| 177 | { | ||
| 178 | .name = "imx1-fb", | ||
| 179 | .driver_data = IMX1_FB, | ||
| 180 | }, { | ||
| 181 | .name = "imx21-fb", | ||
| 182 | .driver_data = IMX21_FB, | ||
| 183 | }, { | ||
| 184 | /* sentinel */ | ||
| 185 | } | ||
| 186 | }; | ||
| 187 | MODULE_DEVICE_TABLE(platform, imxfb_devtype); | ||
| 188 | |||
| 189 | static inline int is_imx1_fb(struct imxfb_info *fbi) | ||
| 190 | { | ||
| 191 | return fbi->devtype == IMX1_FB; | ||
| 192 | } | ||
| 193 | |||
| 171 | #define IMX_NAME "IMX" | 194 | #define IMX_NAME "IMX" |
| 172 | 195 | ||
| 173 | /* | 196 | /* |
| @@ -366,7 +389,7 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
| 366 | break; | 389 | break; |
| 367 | case 16: | 390 | case 16: |
| 368 | default: | 391 | default: |
| 369 | if (cpu_is_mx1()) | 392 | if (is_imx1_fb(fbi)) |
| 370 | pcr |= PCR_BPIX_12; | 393 | pcr |= PCR_BPIX_12; |
| 371 | else | 394 | else |
| 372 | pcr |= PCR_BPIX_16; | 395 | pcr |= PCR_BPIX_16; |
| @@ -596,6 +619,7 @@ static struct fb_ops imxfb_ops = { | |||
| 596 | static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info) | 619 | static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info) |
| 597 | { | 620 | { |
| 598 | struct imxfb_info *fbi = info->par; | 621 | struct imxfb_info *fbi = info->par; |
| 622 | u32 ymax_mask = is_imx1_fb(fbi) ? YMAX_MASK_IMX1 : YMAX_MASK_IMX21; | ||
| 599 | 623 | ||
| 600 | pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n", | 624 | pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n", |
| 601 | var->xres, var->hsync_len, | 625 | var->xres, var->hsync_len, |
| @@ -617,7 +641,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf | |||
| 617 | if (var->right_margin > 255) | 641 | if (var->right_margin > 255) |
| 618 | printk(KERN_ERR "%s: invalid right_margin %d\n", | 642 | printk(KERN_ERR "%s: invalid right_margin %d\n", |
| 619 | info->fix.id, var->right_margin); | 643 | info->fix.id, var->right_margin); |
| 620 | if (var->yres < 1 || var->yres > YMAX_MASK) | 644 | if (var->yres < 1 || var->yres > ymax_mask) |
| 621 | printk(KERN_ERR "%s: invalid yres %d\n", | 645 | printk(KERN_ERR "%s: invalid yres %d\n", |
| 622 | info->fix.id, var->yres); | 646 | info->fix.id, var->yres); |
| 623 | if (var->vsync_len > 100) | 647 | if (var->vsync_len > 100) |
| @@ -645,7 +669,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf | |||
| 645 | VCR_V_WAIT_2(var->upper_margin), | 669 | VCR_V_WAIT_2(var->upper_margin), |
| 646 | fbi->regs + LCDC_VCR); | 670 | fbi->regs + LCDC_VCR); |
| 647 | 671 | ||
| 648 | writel(SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres), | 672 | writel(SIZE_XMAX(var->xres) | (var->yres & ymax_mask), |
| 649 | fbi->regs + LCDC_SIZE); | 673 | fbi->regs + LCDC_SIZE); |
| 650 | 674 | ||
| 651 | writel(fbi->pcr, fbi->regs + LCDC_PCR); | 675 | writel(fbi->pcr, fbi->regs + LCDC_PCR); |
| @@ -765,6 +789,7 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
| 765 | return -ENOMEM; | 789 | return -ENOMEM; |
| 766 | 790 | ||
| 767 | fbi = info->par; | 791 | fbi = info->par; |
| 792 | fbi->devtype = pdev->id_entry->driver_data; | ||
| 768 | 793 | ||
| 769 | if (!fb_mode) | 794 | if (!fb_mode) |
| 770 | fb_mode = pdata->mode[0].mode.name; | 795 | fb_mode = pdata->mode[0].mode.name; |
| @@ -939,6 +964,7 @@ static struct platform_driver imxfb_driver = { | |||
| 939 | .driver = { | 964 | .driver = { |
| 940 | .name = DRIVER_NAME, | 965 | .name = DRIVER_NAME, |
| 941 | }, | 966 | }, |
| 967 | .id_table = imxfb_devtype, | ||
| 942 | }; | 968 | }; |
| 943 | 969 | ||
| 944 | static int imxfb_setup(void) | 970 | static int imxfb_setup(void) |
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index ce1d452464ed..736887208574 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c | |||
| @@ -26,10 +26,9 @@ | |||
| 26 | #include <linux/console.h> | 26 | #include <linux/console.h> |
| 27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
| 28 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
| 29 | #include <linux/dma/ipu-dma.h> | ||
| 29 | 30 | ||
| 30 | #include <linux/platform_data/dma-imx.h> | 31 | #include <linux/platform_data/dma-imx.h> |
| 31 | #include <mach/hardware.h> | ||
| 32 | #include <mach/ipu.h> | ||
| 33 | #include <linux/platform_data/video-mx3fb.h> | 32 | #include <linux/platform_data/video-mx3fb.h> |
| 34 | 33 | ||
| 35 | #include <asm/io.h> | 34 | #include <asm/io.h> |
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index bcfab2b00ad2..9a45d0294cf4 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c | |||
| @@ -33,7 +33,6 @@ | |||
| 33 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
| 34 | #include <linux/timer.h> | 34 | #include <linux/timer.h> |
| 35 | #include <linux/jiffies.h> | 35 | #include <linux/jiffies.h> |
| 36 | #include <mach/hardware.h> | ||
| 37 | 36 | ||
| 38 | #define DRIVER_NAME "imx2-wdt" | 37 | #define DRIVER_NAME "imx2-wdt" |
| 39 | 38 | ||
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index d8da5162f0dd..43cc1a1e25d4 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c | |||
| @@ -46,8 +46,8 @@ | |||
| 46 | #include <linux/slab.h> | 46 | #include <linux/slab.h> |
| 47 | #include <linux/pm_runtime.h> | 47 | #include <linux/pm_runtime.h> |
| 48 | #include <mach/hardware.h> | 48 | #include <mach/hardware.h> |
| 49 | #include <plat/cpu.h> | 49 | |
| 50 | #include <plat/prcm.h> | 50 | #include <linux/platform_data/omap-wd-timer.h> |
| 51 | 51 | ||
| 52 | #include "omap_wdt.h" | 52 | #include "omap_wdt.h" |
| 53 | 53 | ||
| @@ -202,8 +202,10 @@ static ssize_t omap_wdt_write(struct file *file, const char __user *data, | |||
| 202 | static long omap_wdt_ioctl(struct file *file, unsigned int cmd, | 202 | static long omap_wdt_ioctl(struct file *file, unsigned int cmd, |
| 203 | unsigned long arg) | 203 | unsigned long arg) |
| 204 | { | 204 | { |
| 205 | struct omap_wd_timer_platform_data *pdata; | ||
| 205 | struct omap_wdt_dev *wdev; | 206 | struct omap_wdt_dev *wdev; |
| 206 | int new_margin; | 207 | u32 rs; |
| 208 | int new_margin, bs; | ||
| 207 | static const struct watchdog_info ident = { | 209 | static const struct watchdog_info ident = { |
| 208 | .identity = "OMAP Watchdog", | 210 | .identity = "OMAP Watchdog", |
| 209 | .options = WDIOF_SETTIMEOUT, | 211 | .options = WDIOF_SETTIMEOUT, |
| @@ -211,6 +213,7 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd, | |||
| 211 | }; | 213 | }; |
| 212 | 214 | ||
| 213 | wdev = file->private_data; | 215 | wdev = file->private_data; |
| 216 | pdata = wdev->dev->platform_data; | ||
| 214 | 217 | ||
| 215 | switch (cmd) { | 218 | switch (cmd) { |
| 216 | case WDIOC_GETSUPPORT: | 219 | case WDIOC_GETSUPPORT: |
| @@ -219,17 +222,12 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd, | |||
| 219 | case WDIOC_GETSTATUS: | 222 | case WDIOC_GETSTATUS: |
| 220 | return put_user(0, (int __user *)arg); | 223 | return put_user(0, (int __user *)arg); |
| 221 | case WDIOC_GETBOOTSTATUS: | 224 | case WDIOC_GETBOOTSTATUS: |
| 222 | #ifdef CONFIG_ARCH_OMAP1 | 225 | if (!pdata || !pdata->read_reset_sources) |
| 223 | if (cpu_is_omap16xx()) | 226 | return put_user(0, (int __user *)arg); |
| 224 | return put_user(__raw_readw(ARM_SYSST), | 227 | rs = pdata->read_reset_sources(); |
| 225 | (int __user *)arg); | 228 | bs = (rs & (1 << OMAP_MPU_WD_RST_SRC_ID_SHIFT)) ? |
| 226 | #endif | 229 | WDIOF_CARDRESET : 0; |
| 227 | #ifdef CONFIG_ARCH_OMAP2PLUS | 230 | return put_user(bs, (int __user *)arg); |
| 228 | if (cpu_is_omap24xx()) | ||
| 229 | return put_user(omap_prcm_get_reset_sources(), | ||
| 230 | (int __user *)arg); | ||
| 231 | #endif | ||
| 232 | return put_user(0, (int __user *)arg); | ||
| 233 | case WDIOC_KEEPALIVE: | 231 | case WDIOC_KEEPALIVE: |
| 234 | spin_lock(&wdt_lock); | 232 | spin_lock(&wdt_lock); |
| 235 | omap_wdt_ping(wdev); | 233 | omap_wdt_ping(wdev); |
