From b70ff8779a3c2777778e3ee9abb6bde661f8b531 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 10 Nov 2016 16:17:55 +0100 Subject: ARM: s3c64xx: Drop initialization of unused struct s3c_audio_pdata fields Remove initialization of dma_{filter, playback, capture, capture_mic} fields where it is not used any more. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c64xx/dev-audio.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index b57783371d525..a3f39dd114f94 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c @@ -58,9 +58,6 @@ static struct resource s3c64xx_iis0_resource[] = { static struct s3c_audio_pdata i2s0_pdata = { .cfg_gpio = s3c64xx_i2s_cfg_gpio, - .dma_filter = pl08x_filter_id, - .dma_playback = DMACH_I2S0_OUT, - .dma_capture = DMACH_I2S0_IN, }; struct platform_device s3c64xx_device_iis0 = { @@ -80,9 +77,6 @@ static struct resource s3c64xx_iis1_resource[] = { static struct s3c_audio_pdata i2s1_pdata = { .cfg_gpio = s3c64xx_i2s_cfg_gpio, - .dma_filter = pl08x_filter_id, - .dma_playback = DMACH_I2S1_OUT, - .dma_capture = DMACH_I2S1_IN, }; struct platform_device s3c64xx_device_iis1 = { @@ -102,9 +96,6 @@ static struct resource s3c64xx_iisv4_resource[] = { static struct s3c_audio_pdata i2sv4_pdata = { .cfg_gpio = s3c64xx_i2s_cfg_gpio, - .dma_filter = pl08x_filter_id, - .dma_playback = DMACH_HSI_I2SV40_TX, - .dma_capture = DMACH_HSI_I2SV40_RX, .type = { .i2s = { .quirks = QUIRK_PRI_6CHAN, @@ -153,9 +144,6 @@ static struct resource s3c64xx_pcm0_resource[] = { static struct s3c_audio_pdata s3c_pcm0_pdata = { .cfg_gpio = s3c64xx_pcm_cfg_gpio, - .dma_filter = pl08x_filter_id, - .dma_capture = DMACH_PCM0_RX, - .dma_playback = DMACH_PCM0_TX, }; struct platform_device s3c64xx_device_pcm0 = { @@ -175,9 +163,6 @@ static struct resource s3c64xx_pcm1_resource[] = { static struct s3c_audio_pdata s3c_pcm1_pdata = { .cfg_gpio = s3c64xx_pcm_cfg_gpio, - .dma_filter = pl08x_filter_id, - .dma_playback = DMACH_PCM1_TX, - .dma_capture = DMACH_PCM1_RX, }; struct platform_device s3c64xx_device_pcm1 = { @@ -209,10 +194,6 @@ static struct resource s3c64xx_ac97_resource[] = { }; static struct s3c_audio_pdata s3c_ac97_pdata = { - .dma_playback = DMACH_AC97_PCMOUT, - .dma_filter = pl08x_filter_id, - .dma_capture = DMACH_AC97_PCMIN, - .dma_capture_mic = DMACH_AC97_MICIN, }; static u64 s3c64xx_ac97_dmamask = DMA_BIT_MASK(32); -- cgit v1.2.3 From 6bfebd863b2b831dc5b098fd6e04732f8dc22935 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 10 Nov 2016 16:17:56 +0100 Subject: ARM: s3c24xx: Drop unused struct s3c_audio_pdata entries The s3c24xx-iis driver is now converted to use the dma_slave_map API and the samsung-ac97 driver got removed from the tree so remove the unused platform data structure instances. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski --- arch/arm/plat-samsung/devs.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index cf7b95fddbb38..03fac123676db 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -77,15 +77,6 @@ static struct resource s3c_ac97_resource[] = { [1] = DEFINE_RES_IRQ(IRQ_S3C244X_AC97), }; -static struct s3c_audio_pdata s3c_ac97_pdata = { -#ifdef CONFIG_S3C24XX_DMAC - .dma_filter = s3c24xx_dma_filter, -#endif - .dma_playback = (void *)DMACH_PCM_OUT, - .dma_capture = (void *)DMACH_PCM_IN, - .dma_capture_mic = (void *)DMACH_MIC_IN, -}; - struct platform_device s3c_device_ac97 = { .name = "samsung-ac97", .id = -1, @@ -94,7 +85,6 @@ struct platform_device s3c_device_ac97 = { .dev = { .dma_mask = &samsung_device_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), - .platform_data = &s3c_ac97_pdata, } }; #endif /* CONFIG_CPU_S3C2440 */ @@ -574,14 +564,6 @@ static struct resource s3c_iis_resource[] = { [0] = DEFINE_RES_MEM(S3C24XX_PA_IIS, S3C24XX_SZ_IIS), }; -static struct s3c_audio_pdata s3c_iis_platdata = { -#ifdef CONFIG_S3C24XX_DMAC - .dma_filter = s3c24xx_dma_filter, -#endif - .dma_playback = (void *)DMACH_I2S_OUT, - .dma_capture = (void *)DMACH_I2S_IN, -}; - struct platform_device s3c_device_iis = { .name = "s3c24xx-iis", .id = -1, @@ -590,7 +572,6 @@ struct platform_device s3c_device_iis = { .dev = { .dma_mask = &samsung_device_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), - .platform_data = &s3c_iis_platdata, } }; #endif /* CONFIG_PLAT_S3C24XX */ -- cgit v1.2.3 From b4765037fc8c392027e604cf05771f0ac2790303 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Dec 2016 15:47:32 +0200 Subject: ARM: EXYNOS: Constify list of retention registers The list of retention registers (release_ret_regs field of struct exynos_pm_data and arrays with values) are not modified and can be made const to improve the const safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/suspend.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 06332f6265652..be29f06d04f1c 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -57,7 +57,7 @@ struct exynos_wkup_irq { struct exynos_pm_data { const struct exynos_wkup_irq *wkup_irq; unsigned int wake_disable_mask; - unsigned int *release_ret_regs; + const unsigned int *release_ret_regs; void (*pm_prepare)(void); void (*pm_resume_prepare)(void); @@ -95,7 +95,7 @@ static const struct exynos_wkup_irq exynos5250_wkup_irq[] = { { /* sentinel */ }, }; -static unsigned int exynos_release_ret_regs[] = { +static const unsigned int exynos_release_ret_regs[] = { S5P_PAD_RET_MAUDIO_OPTION, S5P_PAD_RET_GPIO_OPTION, S5P_PAD_RET_UART_OPTION, @@ -106,7 +106,7 @@ static unsigned int exynos_release_ret_regs[] = { REG_TABLE_END, }; -static unsigned int exynos3250_release_ret_regs[] = { +static const unsigned int exynos3250_release_ret_regs[] = { S5P_PAD_RET_MAUDIO_OPTION, S5P_PAD_RET_GPIO_OPTION, S5P_PAD_RET_UART_OPTION, @@ -119,7 +119,7 @@ static unsigned int exynos3250_release_ret_regs[] = { REG_TABLE_END, }; -static unsigned int exynos5420_release_ret_regs[] = { +static const unsigned int exynos5420_release_ret_regs[] = { EXYNOS_PAD_RET_DRAM_OPTION, EXYNOS_PAD_RET_MAUDIO_OPTION, EXYNOS_PAD_RET_JTAG_OPTION, -- cgit v1.2.3 From 731d97c236833c2179ce6fe7a5eb32c46f71df27 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Dec 2016 15:47:33 +0200 Subject: ARM: EXYNOS: Annotate iomem and pm_data pointers __ro_after_init The pointers to __iomem sysram and exynos_pm_data are set only during initcalls. Later the pointers itself are used only in read-only way so we can mark them __ro_after_init to increase code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/exynos.c | 4 ++-- arch/arm/mach-exynos/mcpm-exynos.c | 2 +- arch/arm/mach-exynos/suspend.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 757fc11de30d8..35b832f4bc7ec 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -45,8 +45,8 @@ static struct platform_device exynos_cpuidle = { .id = -1, }; -void __iomem *sysram_base_addr; -void __iomem *sysram_ns_base_addr; +void __iomem *sysram_base_addr __ro_after_init; +void __iomem *sysram_ns_base_addr __ro_after_init; void __init exynos_sysram_init(void) { diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c index f086bf615b297..038fd8c993d0e 100644 --- a/arch/arm/mach-exynos/mcpm-exynos.c +++ b/arch/arm/mach-exynos/mcpm-exynos.c @@ -32,7 +32,7 @@ #define EXYNOS5420_USE_ARM_CORE_DOWN_STATE BIT(29) #define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30) -static void __iomem *ns_sram_base_addr; +static void __iomem *ns_sram_base_addr __ro_after_init; /* * The common v7_exit_coherency_flush API could not be used because of the diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index be29f06d04f1c..5184202410621 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -66,7 +66,7 @@ struct exynos_pm_data { int (*cpu_suspend)(unsigned long); }; -static const struct exynos_pm_data *pm_data; +static const struct exynos_pm_data *pm_data __ro_after_init; static int exynos5420_cpu_state; static unsigned int exynos_pmu_spare3; -- cgit v1.2.3 From f3c7bfd738803915787bc8a6db663faa599e29f8 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Dec 2016 15:47:34 +0200 Subject: ARM: s3c24xx: Constify few integer tables These arrays are not modified so they can be made const. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-s3c24xx/bast-irq.c | 4 ++-- arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c index 2bb08961e934c..ad8f4cd7c3279 100644 --- a/arch/arm/mach-s3c24xx/bast-irq.c +++ b/arch/arm/mach-s3c24xx/bast-irq.c @@ -44,7 +44,7 @@ /* table of ISA irq nos to the relevant mask... zero means * the irq is not implemented */ -static unsigned char bast_pc104_irqmasks[] = { +static const unsigned char bast_pc104_irqmasks[] = { 0, /* 0 */ 0, /* 1 */ 0, /* 2 */ @@ -63,7 +63,7 @@ static unsigned char bast_pc104_irqmasks[] = { 0, /* 15 */ }; -static unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 }; +static const unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 }; static void bast_pc104_mask(struct irq_data *data) diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c index 65e5f9cb650fa..b7970f1fa3d5f 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c @@ -249,7 +249,7 @@ static int s3c2410_calc_bank(struct s3c_cpufreq_config *cfg, return 0; } -static unsigned int tacc_tab[] = { +static const unsigned int tacc_tab[] = { [0] = 1, [1] = 2, [2] = 3, -- cgit v1.2.3 From 552146b0c20d8265f7c570251c86fc4ec44959ee Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Dec 2016 15:47:35 +0200 Subject: ARM: s3c64xx: Annotate external clock frequencies __ro_after_init The xtal_f and xusbxti_f static variables are modified only through __init accessors (like s3c64xx_set_xtal_freq()). Later these variables are used only in read-only way so we can mark them __ro_after_init to increase code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-s3c64xx/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 7c66ce1a6bb69..9843eb4dd04ee 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -56,7 +56,8 @@ #include "watchdog-reset.h" /* External clock frequency */ -static unsigned long xtal_f = 12000000, xusbxti_f = 48000000; +static unsigned long xtal_f __ro_after_init = 12000000; +static unsigned long xusbxti_f __ro_after_init = 48000000; void __init s3c64xx_set_xtal_freq(unsigned long freq) { -- cgit v1.2.3 From 9060a4172f7562498802f6dc60869515cda34c76 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Dec 2016 15:47:36 +0200 Subject: ARM: SAMSUNG: Constify array of wake irqs passed to samsung_sync_wakemask The samsung_sync_wakemask() iterates over passed array of wake irqs but does not modify it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/plat-samsung/include/plat/wakeup-mask.h | 2 +- arch/arm/plat-samsung/wakeup-mask.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-samsung/include/plat/wakeup-mask.h b/arch/arm/plat-samsung/include/plat/wakeup-mask.h index 43e4acd2e1c63..bbfa84b0505a0 100644 --- a/arch/arm/plat-samsung/include/plat/wakeup-mask.h +++ b/arch/arm/plat-samsung/include/plat/wakeup-mask.h @@ -38,7 +38,7 @@ struct samsung_wakeup_mask { * required to be correct before we enter sleep. */ extern void samsung_sync_wakemask(void __iomem *reg, - struct samsung_wakeup_mask *masks, + const struct samsung_wakeup_mask *masks, int nr_masks); #endif /* __PLAT_WAKEUP_MASK_H */ diff --git a/arch/arm/plat-samsung/wakeup-mask.c b/arch/arm/plat-samsung/wakeup-mask.c index 20c3d9117cc25..b9de6b5433306 100644 --- a/arch/arm/plat-samsung/wakeup-mask.c +++ b/arch/arm/plat-samsung/wakeup-mask.c @@ -20,7 +20,7 @@ #include void samsung_sync_wakemask(void __iomem *reg, - struct samsung_wakeup_mask *mask, int nr_mask) + const struct samsung_wakeup_mask *mask, int nr_mask) { struct irq_data *data; u32 val; -- cgit v1.2.3 From 7264ebd92e20194ed26424a72cda6ab1e9bee655 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Dec 2016 15:47:37 +0200 Subject: ARM: s3c24xx: Constify wake_irqs samsung_sync_wakemask() accepts pointer to const data so wake_irqs can be made const to increase safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-s3c24xx/pm-s3c2412.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c index d75f95e487ee6..0ae4d47a4663a 100644 --- a/arch/arm/mach-s3c24xx/pm-s3c2412.c +++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c @@ -53,7 +53,7 @@ static int s3c2412_cpu_suspend(unsigned long arg) } /* mapping of interrupts to parts of the wakeup mask */ -static struct samsung_wakeup_mask wake_irqs[] = { +static const struct samsung_wakeup_mask wake_irqs[] = { { .irq = IRQ_RTC, .bit = S3C2412_PWRCFG_RTC_MASKIRQ, }, }; -- cgit v1.2.3 From cda1a52dab50340728e46601e6c9da9fc4beaf1f Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Dec 2016 15:47:38 +0200 Subject: ARM: s3c64xx: Constify wake_irqs samsung_sync_wakemask() accepts pointer to const data so wake_irqs can be made const to increase safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-s3c64xx/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 59d91b83b03d7..b0be382ff6bb7 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c @@ -285,7 +285,7 @@ static int s3c64xx_cpu_suspend(unsigned long arg) } /* mapping of interrupts to parts of the wakeup mask */ -static struct samsung_wakeup_mask wake_irqs[] = { +static const struct samsung_wakeup_mask wake_irqs[] = { { .irq = IRQ_RTC_ALARM, .bit = S3C64XX_PWRCFG_RTC_ALARM_DISABLE, }, { .irq = IRQ_RTC_TIC, .bit = S3C64XX_PWRCFG_RTC_TICK_DISABLE, }, { .irq = IRQ_PENDN, .bit = S3C64XX_PWRCFG_TS_DISABLE, }, -- cgit v1.2.3 From 9690e915a65528b146444f2eb2aa0181f940591c Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 16 Dec 2016 10:05:08 +0100 Subject: ARM: imx: remove unused device definitions I stumbled over these during build testing, they are evidently not referenced anywhere any more. Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo --- arch/arm/mach-imx/devices/platform-flexcan.c | 9 --------- arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/arch/arm/mach-imx/devices/platform-flexcan.c b/arch/arm/mach-imx/devices/platform-flexcan.c index 55d61eaf63c6e..8a1a2fc4ce102 100644 --- a/arch/arm/mach-imx/devices/platform-flexcan.c +++ b/arch/arm/mach-imx/devices/platform-flexcan.c @@ -19,15 +19,6 @@ #define imx_flexcan_data_entry(soc, _id, _hwid, _size) \ [_id] = imx_flexcan_data_entry_single(soc, _id, _hwid, _size) -#ifdef CONFIG_SOC_IMX25 -const struct imx_flexcan_data imx25_flexcan_data[] __initconst = { -#define imx25_flexcan_data_entry(_id, _hwid) \ - imx_flexcan_data_entry(MX25, _id, _hwid, SZ_16K) - imx25_flexcan_data_entry(0, 1), - imx25_flexcan_data_entry(1, 2), -}; -#endif /* ifdef CONFIG_SOC_IMX25 */ - #ifdef CONFIG_SOC_IMX35 const struct imx_flexcan_data imx35_flexcan_data[] __initconst = { #define imx35_flexcan_data_entry(_id, _hwid) \ diff --git a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c index 3d039ef021e0f..466c9ccc66752 100644 --- a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c +++ b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c @@ -22,16 +22,6 @@ #define imx_sdhci_esdhc_imx_data_entry(soc, devid, id, hwid) \ [id] = imx_sdhci_esdhc_imx_data_entry_single(soc, devid, id, hwid) -#ifdef CONFIG_SOC_IMX25 -const struct imx_sdhci_esdhc_imx_data -imx25_sdhci_esdhc_imx_data[] __initconst = { -#define imx25_sdhci_esdhc_imx_data_entry(_id, _hwid) \ - imx_sdhci_esdhc_imx_data_entry(MX25, "sdhci-esdhc-imx25", _id, _hwid) - imx25_sdhci_esdhc_imx_data_entry(0, 1), - imx25_sdhci_esdhc_imx_data_entry(1, 2), -}; -#endif /* ifdef CONFIG_SOC_IMX25 */ - #ifdef CONFIG_SOC_IMX35 const struct imx_sdhci_esdhc_imx_data imx35_sdhci_esdhc_imx_data[] __initconst = { -- cgit v1.2.3 From 16fa9629c4eac40083899d904057df993a2eb06e Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Fri, 2 Dec 2016 23:05:12 +0800 Subject: ARM: sunxi: add support for H2+ SoC Allwinner H2+ is a quad-core Cortex-A7 SoC. It is very like H3, that they share the same SoC ID (0x1680), and H3 memory maps as well as drivers works well on the SoC. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard --- Documentation/arm/sunxi/README | 4 ++++ Documentation/devicetree/bindings/arm/sunxi.txt | 1 + arch/arm/mach-sunxi/sunxi.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README index cd0243302bc1c..1fe4d99cb43e2 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi/README @@ -63,6 +63,10 @@ SunXi family + User Manual http://dl.linux-sunxi.org/A33/A33%20user%20manual%20release%201.1.pdf + - Allwinner H2+ (sun8i) + + No document available now, but is known to be working properly with + H3 drivers and memory map. + - Allwinner H3 (sun8i) + Datasheet http://dl.linux-sunxi.org/H3/Allwinner_H3_Datasheet_V1.0.pdf diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt index 4d6467cc2aa25..d2c46449b4eb3 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.txt +++ b/Documentation/devicetree/bindings/arm/sunxi.txt @@ -12,6 +12,7 @@ using one of the following compatible strings: allwinner,sun8i-a23 allwinner,sun8i-a33 allwinner,sun8i-a83t + allwinner,sun8i-h2-plus allwinner,sun8i-h3 allwinner,sun9i-a80 allwinner,sun50i-a64 diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index 2e2bde271205e..320d2afdbc780 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c @@ -63,6 +63,7 @@ static const char * const sun8i_board_dt_compat[] = { "allwinner,sun8i-a23", "allwinner,sun8i-a33", "allwinner,sun8i-a83t", + "allwinner,sun8i-h2-plus", "allwinner,sun8i-h3", NULL, }; -- cgit v1.2.3 From 7b239307db60011afe9e9799fd420b58584defb1 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 30 Dec 2016 09:33:28 -0200 Subject: ARM: mach-mx31_3ds: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Tested-by: Magnus Lilja Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-mx31_3ds.c | 160 -------------------------------------- 1 file changed, 160 deletions(-) diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 12b8a52c9cb44..558e5f8589cba 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c @@ -26,16 +26,12 @@ #include #include #include -#include - -#include #include #include #include #include #include -#include #include "3ds_debugboard.h" #include "common.h" @@ -137,23 +133,6 @@ static int mx31_3ds_pins[] = { MX31_PIN_HSYNC__HSYNC, MX31_PIN_FPSHIFT__FPSHIFT, MX31_PIN_CONTRAST__CONTRAST, - /* CSI */ - MX31_PIN_CSI_D6__CSI_D6, - MX31_PIN_CSI_D7__CSI_D7, - MX31_PIN_CSI_D8__CSI_D8, - MX31_PIN_CSI_D9__CSI_D9, - MX31_PIN_CSI_D10__CSI_D10, - MX31_PIN_CSI_D11__CSI_D11, - MX31_PIN_CSI_D12__CSI_D12, - MX31_PIN_CSI_D13__CSI_D13, - MX31_PIN_CSI_D14__CSI_D14, - MX31_PIN_CSI_D15__CSI_D15, - MX31_PIN_CSI_HSYNC__CSI_HSYNC, - MX31_PIN_CSI_MCLK__CSI_MCLK, - MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, - MX31_PIN_CSI_VSYNC__CSI_VSYNC, - MX31_PIN_CSI_D5__GPIO3_5, /* CMOS PWDN */ - IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_GPIO), /* CMOS reset */ /* SSI */ MX31_PIN_STXD4__STXD4, MX31_PIN_SRXD4__SRXD4, @@ -161,98 +140,6 @@ static int mx31_3ds_pins[] = { MX31_PIN_SFS4__SFS4, }; -/* - * Camera support - */ -static phys_addr_t mx3_camera_base __initdata; -#define MX31_3DS_CAMERA_BUF_SIZE SZ_8M - -#define MX31_3DS_GPIO_CAMERA_PW IOMUX_TO_GPIO(MX31_PIN_CSI_D5) -#define MX31_3DS_GPIO_CAMERA_RST IOMUX_TO_GPIO(MX31_PIN_RI_DTE1) - -static struct gpio mx31_3ds_camera_gpios[] = { - { MX31_3DS_GPIO_CAMERA_PW, GPIOF_OUT_INIT_HIGH, "camera-power" }, - { MX31_3DS_GPIO_CAMERA_RST, GPIOF_OUT_INIT_HIGH, "camera-reset" }, -}; - -static const struct mx3_camera_pdata mx31_3ds_camera_pdata __initconst = { - .flags = MX3_CAMERA_DATAWIDTH_10, - .mclk_10khz = 2600, -}; - -static int __init mx31_3ds_init_camera(void) -{ - int dma, ret = -ENOMEM; - struct platform_device *pdev = - imx31_alloc_mx3_camera(&mx31_3ds_camera_pdata); - - if (IS_ERR(pdev)) - return PTR_ERR(pdev); - - if (!mx3_camera_base) - goto err; - - dma = dma_declare_coherent_memory(&pdev->dev, - mx3_camera_base, mx3_camera_base, - MX31_3DS_CAMERA_BUF_SIZE, - DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); - - if (!(dma & DMA_MEMORY_MAP)) - goto err; - - ret = platform_device_add(pdev); - if (ret) -err: - platform_device_put(pdev); - - return ret; -} - -static int mx31_3ds_camera_power(struct device *dev, int on) -{ - /* enable or disable the camera */ - pr_debug("%s: %s the camera\n", __func__, on ? "ENABLE" : "DISABLE"); - gpio_set_value(MX31_3DS_GPIO_CAMERA_PW, on ? 0 : 1); - - if (!on) - goto out; - - /* If enabled, give a reset impulse */ - gpio_set_value(MX31_3DS_GPIO_CAMERA_RST, 0); - msleep(20); - gpio_set_value(MX31_3DS_GPIO_CAMERA_RST, 1); - msleep(100); - -out: - return 0; -} - -static struct i2c_board_info mx31_3ds_i2c_camera = { - I2C_BOARD_INFO("ov2640", 0x30), -}; - -static struct regulator_bulk_data mx31_3ds_camera_regs[] = { - { .supply = "cmos_vcore" }, - { .supply = "cmos_2v8" }, -}; - -static struct soc_camera_link iclink_ov2640 = { - .bus_id = 0, - .board_info = &mx31_3ds_i2c_camera, - .i2c_adapter_id = 0, - .power = mx31_3ds_camera_power, - .regulators = mx31_3ds_camera_regs, - .num_regulators = ARRAY_SIZE(mx31_3ds_camera_regs), -}; - -static struct platform_device mx31_3ds_ov2640 = { - .name = "soc-camera-pdrv", - .id = 0, - .dev = { - .platform_data = &iclink_ov2640, - }, -}; - /* * FB support */ @@ -410,7 +297,6 @@ static struct regulator_init_data vmmc2_init = { static struct regulator_consumer_supply vmmc1_consumers[] = { REGULATOR_SUPPLY("vcore", "spi0.0"), - REGULATOR_SUPPLY("cmos_2v8", "soc-camera-pdrv.0"), }; static struct regulator_init_data vmmc1_init = { @@ -441,22 +327,6 @@ static struct regulator_init_data vgen_init = { .consumer_supplies = vgen_consumers, }; -static struct regulator_consumer_supply vvib_consumers[] = { - REGULATOR_SUPPLY("cmos_vcore", "soc-camera-pdrv.0"), -}; - -static struct regulator_init_data vvib_init = { - .constraints = { - .min_uV = 1300000, - .max_uV = 1300000, - .apply_uV = 1, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | - REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = ARRAY_SIZE(vvib_consumers), - .consumer_supplies = vvib_consumers, -}; - static struct mc13xxx_regulator_init_data mx31_3ds_regulators[] = { { .id = MC13783_REG_PWGT1SPI, /* Power Gate for ARM core. */ @@ -480,9 +350,6 @@ static struct mc13xxx_regulator_init_data mx31_3ds_regulators[] = { }, { .id = MC13783_REG_VGEN, /* Power LCD */ .init_data = &vgen_init, - }, { - .id = MC13783_REG_VVIB, /* Power CMOS */ - .init_data = &vvib_init, }, }; @@ -688,10 +555,6 @@ static const struct imxi2c_platform_data mx31_3ds_i2c0_data __initconst = { .bitrate = 100000, }; -static struct platform_device *devices[] __initdata = { - &mx31_3ds_ov2640, -}; - static void __init mx31_3ds_init(void) { imx31_soc_init(); @@ -723,14 +586,10 @@ static void __init mx31_3ds_init(void) static void __init mx31_3ds_late(void) { - int ret; - mx31_3ds_spi_devs[0].irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); spi_register_board_info(mx31_3ds_spi_devs, ARRAY_SIZE(mx31_3ds_spi_devs)); - platform_add_devices(devices, ARRAY_SIZE(devices)); - mx31_3ds_usbotg_init(); if (otg_mode_host) { otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | @@ -751,17 +610,6 @@ static void __init mx31_3ds_late(void) "devices on the debug board are unusable.\n"); imx31_add_mxc_mmc(0, &sdhc1_pdata); - - /* CSI */ - /* Camera power: default - off */ - ret = gpio_request_array(mx31_3ds_camera_gpios, - ARRAY_SIZE(mx31_3ds_camera_gpios)); - if (ret) { - pr_err("Failed to request camera gpios"); - iclink_ov2640.power = NULL; - } - - mx31_3ds_init_camera(); } static void __init mx31_3ds_timer_init(void) @@ -769,13 +617,6 @@ static void __init mx31_3ds_timer_init(void) mx31_clocks_init(26000000); } -static void __init mx31_3ds_reserve(void) -{ - /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ - mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE, - MX31_3DS_CAMERA_BUF_SIZE); -} - MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") /* Maintainer: Freescale Semiconductor, Inc. */ .atag_offset = 0x100, @@ -785,6 +626,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") .init_time = mx31_3ds_timer_init, .init_machine = mx31_3ds_init, .init_late = mx31_3ds_late, - .reserve = mx31_3ds_reserve, .restart = mxc_restart, MACHINE_END -- cgit v1.2.3 From a20bb25fa2dcbb53ca2956b3cd78366f350af8ae Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 30 Dec 2016 09:33:29 -0200 Subject: ARM: mx31moboard-marxbot: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mx31moboard-marxbot.c | 92 --------------------------------- 1 file changed, 92 deletions(-) diff --git a/arch/arm/mach-imx/mx31moboard-marxbot.c b/arch/arm/mach-imx/mx31moboard-marxbot.c index 2e895a82a6eb3..922d49175cb45 100644 --- a/arch/arm/mach-imx/mx31moboard-marxbot.c +++ b/arch/arm/mach-imx/mx31moboard-marxbot.c @@ -24,8 +24,6 @@ #include -#include - #include "common.h" #include "devices-imx31.h" #include "ehci.h" @@ -39,17 +37,6 @@ static unsigned int marxbot_pins[] = { MX31_PIN_PC_READY__SD2_DATA1, MX31_PIN_PC_WAIT_B__SD2_DATA0, MX31_PIN_PC_CD2_B__SD2_CLK, MX31_PIN_PC_CD1_B__SD2_CMD, MX31_PIN_ATA_DIOR__GPIO3_28, MX31_PIN_ATA_DIOW__GPIO3_29, - /* CSI */ - MX31_PIN_CSI_D6__CSI_D6, MX31_PIN_CSI_D7__CSI_D7, - MX31_PIN_CSI_D8__CSI_D8, MX31_PIN_CSI_D9__CSI_D9, - MX31_PIN_CSI_D10__CSI_D10, MX31_PIN_CSI_D11__CSI_D11, - MX31_PIN_CSI_D12__CSI_D12, MX31_PIN_CSI_D13__CSI_D13, - MX31_PIN_CSI_D14__CSI_D14, MX31_PIN_CSI_D15__CSI_D15, - MX31_PIN_CSI_HSYNC__CSI_HSYNC, MX31_PIN_CSI_MCLK__CSI_MCLK, - MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, MX31_PIN_CSI_VSYNC__CSI_VSYNC, - MX31_PIN_CSI_D4__GPIO3_4, MX31_PIN_CSI_D5__GPIO3_5, - MX31_PIN_GPIO3_0__GPIO3_0, MX31_PIN_GPIO3_1__GPIO3_1, - MX31_PIN_TXD2__GPIO1_28, /* dsPIC resets */ MX31_PIN_STXD5__GPIO1_21, MX31_PIN_SRXD5__GPIO1_22, /*battery detection */ @@ -143,82 +130,6 @@ static struct spi_board_info marxbot_spi_board_info[] __initdata = { }, }; -#define TURRETCAM_POWER IOMUX_TO_GPIO(MX31_PIN_GPIO3_1) -#define BASECAM_POWER IOMUX_TO_GPIO(MX31_PIN_CSI_D5) -#define TURRETCAM_RST_B IOMUX_TO_GPIO(MX31_PIN_GPIO3_0) -#define BASECAM_RST_B IOMUX_TO_GPIO(MX31_PIN_CSI_D4) -#define CAM_CHOICE IOMUX_TO_GPIO(MX31_PIN_TXD2) - -static int marxbot_basecam_power(struct device *dev, int on) -{ - gpio_set_value(BASECAM_POWER, !on); - return 0; -} - -static int marxbot_basecam_reset(struct device *dev) -{ - gpio_set_value(BASECAM_RST_B, 0); - udelay(100); - gpio_set_value(BASECAM_RST_B, 1); - return 0; -} - -static struct i2c_board_info marxbot_i2c_devices[] = { - { - I2C_BOARD_INFO("mt9t031", 0x5d), - }, -}; - -static struct soc_camera_link base_iclink = { - .bus_id = 0, /* Must match with the camera ID */ - .power = marxbot_basecam_power, - .reset = marxbot_basecam_reset, - .board_info = &marxbot_i2c_devices[0], - .i2c_adapter_id = 0, -}; - -static struct platform_device marxbot_camera[] = { - { - .name = "soc-camera-pdrv", - .id = 0, - .dev = { - .platform_data = &base_iclink, - }, - }, -}; - -static struct platform_device *marxbot_cameras[] __initdata = { - &marxbot_camera[0], -}; - -static int __init marxbot_cam_init(void) -{ - int ret = gpio_request(CAM_CHOICE, "cam-choice"); - if (ret) - return ret; - gpio_direction_output(CAM_CHOICE, 0); - - ret = gpio_request(BASECAM_RST_B, "basecam-reset"); - if (ret) - return ret; - gpio_direction_output(BASECAM_RST_B, 1); - ret = gpio_request(BASECAM_POWER, "basecam-standby"); - if (ret) - return ret; - gpio_direction_output(BASECAM_POWER, 0); - - ret = gpio_request(TURRETCAM_RST_B, "turretcam-reset"); - if (ret) - return ret; - gpio_direction_output(TURRETCAM_RST_B, 1); - ret = gpio_request(TURRETCAM_POWER, "turretcam-standby"); - if (ret) - return ret; - gpio_direction_output(TURRETCAM_POWER, 0); - - return 0; -} - #define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) #define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) #define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) @@ -356,9 +267,6 @@ void __init mx31moboard_marxbot_init(void) spi_register_board_info(marxbot_spi_board_info, ARRAY_SIZE(marxbot_spi_board_info)); - marxbot_cam_init(); - platform_add_devices(marxbot_cameras, ARRAY_SIZE(marxbot_cameras)); - /* battery present pin */ gpio_request(IOMUX_TO_GPIO(MX31_PIN_LCS0), "bat-present"); gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0)); -- cgit v1.2.3 From 9eba4b8e595496f2fb429d7c045fdbcff43511f0 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 30 Dec 2016 09:33:30 -0200 Subject: ARM: mx31moboard-smartbot: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mx31moboard-smartbot.c | 74 -------------------------------- 1 file changed, 74 deletions(-) diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c index 89fc35a644486..5cdd7abce5152 100644 --- a/arch/arm/mach-imx/mx31moboard-smartbot.c +++ b/arch/arm/mach-imx/mx31moboard-smartbot.c @@ -23,8 +23,6 @@ #include #include -#include - #include "board-mx31moboard.h" #include "common.h" #include "devices-imx31.h" @@ -37,16 +35,6 @@ static unsigned int smartbot_pins[] = { /* UART1 */ MX31_PIN_CTS2__CTS2, MX31_PIN_RTS2__RTS2, MX31_PIN_TXD2__TXD2, MX31_PIN_RXD2__RXD2, - /* CSI */ - MX31_PIN_CSI_D4__CSI_D4, MX31_PIN_CSI_D5__CSI_D5, - MX31_PIN_CSI_D6__CSI_D6, MX31_PIN_CSI_D7__CSI_D7, - MX31_PIN_CSI_D8__CSI_D8, MX31_PIN_CSI_D9__CSI_D9, - MX31_PIN_CSI_D10__CSI_D10, MX31_PIN_CSI_D11__CSI_D11, - MX31_PIN_CSI_D12__CSI_D12, MX31_PIN_CSI_D13__CSI_D13, - MX31_PIN_CSI_D14__CSI_D14, MX31_PIN_CSI_D15__CSI_D15, - MX31_PIN_CSI_HSYNC__CSI_HSYNC, MX31_PIN_CSI_MCLK__CSI_MCLK, - MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, MX31_PIN_CSI_VSYNC__CSI_VSYNC, - MX31_PIN_GPIO3_0__GPIO3_0, MX31_PIN_GPIO3_1__GPIO3_1, /* ENABLES */ MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9, MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, @@ -56,65 +44,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = { .flags = IMXUART_HAVE_RTSCTS, }; -#define CAM_POWER IOMUX_TO_GPIO(MX31_PIN_GPIO3_1) -#define CAM_RST_B IOMUX_TO_GPIO(MX31_PIN_GPIO3_0) - -static int smartbot_cam_power(struct device *dev, int on) -{ - gpio_set_value(CAM_POWER, !on); - return 0; -} - -static int smartbot_cam_reset(struct device *dev) -{ - gpio_set_value(CAM_RST_B, 0); - udelay(100); - gpio_set_value(CAM_RST_B, 1); - return 0; -} - -static struct i2c_board_info smartbot_i2c_devices[] = { - { - I2C_BOARD_INFO("mt9t031", 0x5d), - }, -}; - -static struct soc_camera_link base_iclink = { - .bus_id = 0, /* Must match with the camera ID */ - .power = smartbot_cam_power, - .reset = smartbot_cam_reset, - .board_info = &smartbot_i2c_devices[0], - .i2c_adapter_id = 0, -}; - -static struct platform_device smartbot_camera[] = { - { - .name = "soc-camera-pdrv", - .id = 0, - .dev = { - .platform_data = &base_iclink, - }, - }, -}; - -static struct platform_device *smartbot_cameras[] __initdata = { - &smartbot_camera[0], -}; - -static int __init smartbot_cam_init(void) -{ - int ret = gpio_request(CAM_RST_B, "cam-reset"); - if (ret) - return ret; - gpio_direction_output(CAM_RST_B, 1); - ret = gpio_request(CAM_POWER, "cam-standby"); - if (ret) - return ret; - gpio_direction_output(CAM_POWER, 0); - - return 0; -} - static const struct fsl_usb2_platform_data usb_pdata __initconst = { .operating_mode = FSL_USB2_DR_DEVICE, .phy_mode = FSL_USB2_PHY_ULPI, @@ -201,7 +130,4 @@ void __init mx31moboard_smartbot_init(int board) } smartbot_resets_init(); - - smartbot_cam_init(); - platform_add_devices(smartbot_cameras, ARRAY_SIZE(smartbot_cameras)); } -- cgit v1.2.3 From cc7969a189b1b975ca5ce914cf8bb9925b6a838d Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 30 Dec 2016 09:33:31 -0200 Subject: ARM: mach-mx35_3ds: Remove camera support Since commit c93cc61475ebbe6e66 ("[media] staging/media: remove deprecated mx3 driver") the mx3 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-mx35_3ds.c | 103 -------------------------------------- 1 file changed, 103 deletions(-) diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index c8c2e09560487..1c33a6ce326c6 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c @@ -41,12 +41,9 @@ #include #include #include -#include #include