ARM: exynos multiplatform support
Subsystems (28)
cover ARM: exynos multiplatform support
Hi everyone,
I have updated my series for multiplatform support of the ARM exynos platform, based on what is currently queued up in arm-soc.
It would be really nice to still get this merged for 3.10. A lot of the patches are really trivial, but there are some complex ones as well.
To all subsystem maintainers: feel free to directly apply the patches for your subsystem, there should be no dependencies between any of them, aside from the last patch requiring all of the earlier ones to be applied first. Getting an Ack is also fine so we can put the patches into arm-soc.
Arnd
Arnd Bergmann (30):
ARM: exynos: introduce EXYNOS_ATAGS symbol
ARM: exynos: prepare for sparse IRQ
ARM: exynos: move debug-macro.S to include/debug/
ARM: samsung: move mfc device definition to s5p-dev-mfc.c
tty: serial/samsung: prepare for common clock API
tty: serial/samsung: make register definitions global
tty: serial/samsung: fix modular build
i2c: s3c2410: make header file local
mmc: sdhci-s3c: remove platform dependencies
usb: exynos: do not include plat/usb-phy.h [media] exynos: remove unnecessary header inclusions video/exynos: remove unnecessary header inclusions video/s3c: move platform_data out of arch/arm thermal/exynos: remove unnecessary header inclusions
mtd: onenand/samsung: make regs-onenand.h file local
rtc: s3c: make header file local
pwm: samsung: repair the worst MMIO abuses
ASoC: samsung: move plat/ headers to local directory
ASoC: samsung: use irq resource for idma
ASoC: samsung: convert to dmaengine API
ASoC: samsung/i2s: fix module_device_table
ASoC: samsung/idma: export idma_reg_addr_init
clk: exynos: prepare for multiplatform
clocksource: exynos_mct: remove platform header dependency
irqchip: exynos: pass max combiner number to combiner_init
irqchip: exynos: allocate combiner_data dynamically
irqchip: exynos: localize irq lookup for ATAGS
irqchip: exynos: pass irq_base from platform
spi: s3c64xx: move to generic dmaengine API
ARM: exynos: enable multiplatform support
arch/arm/Kconfig | 10 +-
arch/arm/Kconfig.debug | 8 +
arch/arm/configs/exynos4_defconfig | 2 +-
.../mach/debug-macro.S => include/debug/exynos.S} | 12 +-
.../plat/debug-macro.S => include/debug/samsung.S} | 2 +-
arch/arm/mach-exynos/Kconfig | 40 ++-
arch/arm/mach-exynos/Makefile | 5 +-
arch/arm/mach-exynos/common.c | 26 +-
arch/arm/mach-exynos/common.h | 7 +-
arch/arm/mach-exynos/dev-uart.c | 1 +
arch/arm/mach-exynos/include/mach/irqs.h | 5 +-
arch/arm/mach-exynos/mach-armlex4210.c | 2 +
arch/arm/mach-exynos/mach-exynos4-dt.c | 3 +
arch/arm/mach-exynos/mach-exynos5-dt.c | 2 +
arch/arm/mach-exynos/mach-nuri.c | 2 +
arch/arm/mach-exynos/mach-origen.c | 2 +
arch/arm/mach-exynos/mach-smdk4x12.c | 2 +
arch/arm/mach-exynos/mach-smdkv310.c | 3 +
arch/arm/mach-exynos/setup-sdhci-gpio.c | 2 +-
arch/arm/mach-exynos/setup-usb-phy.c | 8 +-
arch/arm/mach-s3c24xx/clock-s3c2440.c | 5 +
arch/arm/mach-s3c24xx/common.c | 5 +
arch/arm/mach-s3c24xx/dma-s3c2410.c | 2 -
arch/arm/mach-s3c24xx/dma-s3c2412.c | 2 -
arch/arm/mach-s3c24xx/dma-s3c2440.c | 2 -
arch/arm/mach-s3c24xx/dma-s3c2443.c | 2 -
arch/arm/mach-s3c24xx/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s3c24xx/mach-rx1950.c | 1 -
arch/arm/mach-s3c64xx/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s3c64xx/setup-usb-phy.c | 4 +-
arch/arm/mach-s5p64x0/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pc100/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 1 -
arch/arm/mach-s5pv210/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 1 -
arch/arm/mach-s5pv210/setup-usb-phy.c | 4 +-
arch/arm/plat-samsung/Kconfig | 7 +-
arch/arm/plat-samsung/Makefile | 8 +-
arch/arm/plat-samsung/devs.c | 62 ++---
arch/arm/plat-samsung/include/plat/fb.h | 50 +---
arch/arm/plat-samsung/include/plat/pm.h | 5 +
arch/arm/plat-samsung/include/plat/regs-serial.h | 282 +--------------------
arch/arm/plat-samsung/include/plat/sdhci.h | 56 +---
arch/arm/plat-samsung/include/plat/usb-phy.h | 5 +-
arch/arm/plat-samsung/irq-vic-timer.c | 1 +
arch/arm/plat-samsung/pm.c | 1 +
arch/arm/plat-samsung/s5p-dev-mfc.c | 42 ++-
arch/arm/plat-samsung/s5p-irq.c | 1 +
drivers/clk/samsung/clk-exynos4.c | 93 +++----
drivers/clk/samsung/clk-exynos5250.c | 1 -
drivers/clk/samsung/clk-exynos5440.c | 1 -
drivers/clk/samsung/clk.h | 2 -
drivers/clocksource/exynos_mct.c | 21 +-
drivers/gpio/Makefile | 2 +-
drivers/i2c/busses/i2c-s3c2410.c | 3 +-
.../regs-iic.h => drivers/i2c/busses/i2c-s3c2410.h | 0
drivers/irqchip/exynos-combiner.c | 116 +++++----
drivers/media/platform/exynos-gsc/gsc-regs.c | 1 -
drivers/media/platform/s5p-tv/sii9234_drv.c | 3 -
drivers/mmc/host/Kconfig | 2 +-
.../mmc/host/sdhci-s3c-regs.h | 0
drivers/mmc/host/sdhci-s3c.c | 5 +-
drivers/mtd/onenand/samsung.c | 4 +-
.../mtd/onenand/samsung.h | 2 -
drivers/pwm/pwm-samsung.c | 60 +++--
drivers/rtc/rtc-s3c.c | 3 +-
.../plat/regs-rtc.h => drivers/rtc/rtc-s3c.h | 3 +-
drivers/spi/spi-s3c64xx.c | 185 ++++++++++----
drivers/thermal/exynos_thermal.c | 2 -
drivers/tty/serial/samsung.c | 17 +-
drivers/tty/serial/samsung.h | 4 +-
drivers/usb/host/ehci-s5p.c | 1 -
drivers/usb/host/ohci-exynos.c | 1 -
drivers/video/exynos/exynos_mipi_dsi.c | 2 -
drivers/video/exynos/exynos_mipi_dsi_common.c | 2 -
drivers/video/exynos/exynos_mipi_dsi_lowlevel.c | 2 -
drivers/video/s3c-fb.c | 3 +-
include/linux/platform_data/mmc-sdhci-s3c.h | 56 ++++
include/linux/platform_data/spi-s3c64xx.h | 3 +
include/linux/platform_data/video_s3c.h | 54 ++++
include/linux/serial_s3c.h | 260 +++++++++++++++++++
sound/soc/samsung/ac97.c | 2 +-
sound/soc/samsung/dma.c | 219 ++++++++++++++++
sound/soc/samsung/dma.h | 15 +-
sound/soc/samsung/h1940_uda1380.c | 2 +-
sound/soc/samsung/i2s.c | 4 +-
sound/soc/samsung/idma.c | 11 +-
sound/soc/samsung/neo1973_wm8753.c | 2 +-
sound/soc/samsung/pcm.c | 1 -
.../include/plat => sound/soc/samsung}/regs-ac97.h | 0
.../include/plat => sound/soc/samsung}/regs-iis.h | 0
sound/soc/samsung/rx1950_uda1380.c | 2 +-
sound/soc/samsung/s3c24xx-i2s.c | 2 +-
sound/soc/samsung/s3c24xx_uda134x.c | 2 +-
sound/soc/samsung/spdif.c | 1 -
95 files changed, 1146 insertions(+), 734 deletions(-)
rename arch/arm/{mach-exynos/include/mach/debug-macro.S => include/debug/exynos.S} (84%)
rename arch/arm/{plat-samsung/include/plat/debug-macro.S => include/debug/samsung.S} (98%)
rename arch/arm/plat-samsung/include/plat/regs-iic.h => drivers/i2c/busses/i2c-s3c2410.h (100%)
rename arch/arm/plat-samsung/include/plat/regs-sdhci.h => drivers/mmc/host/sdhci-s3c-regs.h (100%)
rename arch/arm/plat-samsung/include/plat/regs-onenand.h => drivers/mtd/onenand/samsung.h (98%)
rename arch/arm/plat-samsung/include/plat/regs-rtc.h => drivers/rtc/rtc-s3c.h (97%)
create mode 100644 include/linux/platform_data/mmc-sdhci-s3c.h
create mode 100644 include/linux/platform_data/video_s3c.h
create mode 100644 include/linux/serial_s3c.h
rename {arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-ac97.h (100%)
rename {arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-iis.h (100%)Signature · 32 lines
1.8.1.2 Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] .
PATCH 1/30 ARM: exynos: introduce EXYNOS_ATAGS symbol
As a preparation for multiplatform support, this introduces a new Kconfig symbol to split the ATAGS based EXYNOS platforms from the DT based ones. Turning off CONFIG_EXYNOS_ATAGS disables all platforms that are not yet converted to DT, and we can have code that relies on DT checking for this symbol being disabled.
--- arch/arm/mach-exynos/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/mach-exynos/Kconfig +15 -0
@@ -82,6 +82,19 @@ config SOC_EXYNOS5440 help Enable EXYNOS5440 SoC support +config EXYNOS_ATAGS + bool "ATAGS based boot for EXYNOS (deprecated)" + depends on ARCH_EXYNOS_SINGLE + depends on ATAGS + default y + help + The EXYNOS platform is moving towards being completely probed + through device tree. This enables support for board files using + the traditional ATAGS boot format. + Note that this option is not available for multiplatform builds. + +if EXYNOS_ATAGS + config EXYNOS_DEV_DMA bool help
@@ -386,6 +399,8 @@ config MACH_SMDK4412 Machine support for Samsung SMDK4412 endif +endif + comment "Flattened Device Tree based board for EXYNOS SoCs" config MACH_EXYNOS4_DT
Signature · 1 line
1.8.1.2
PATCH 2/30 ARM: exynos: prepare for sparse IRQ
In reply to Arnd BergmannWhen we enable CONFIG_SPARSE_IRQ, we have to set the value of NR_IRQS in the machine_desc for legacy IRQ domains, and any file referring to the number of interrupts or a specific number must include the mach/irqs.h header file explicitly.
--- arch/arm/mach-exynos/dev-uart.c | 1 + arch/arm/mach-exynos/include/mach/irqs.h | 5 ++++- arch/arm/mach-exynos/mach-armlex4210.c | 2 ++ arch/arm/mach-exynos/mach-exynos4-dt.c | 3 +++ arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++ arch/arm/mach-exynos/mach-nuri.c | 2 ++ arch/arm/mach-exynos/mach-origen.c | 2 ++ arch/arm/mach-exynos/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos/mach-smdkv310.c | 3 +++ arch/arm/plat-samsung/irq-vic-timer.c | 1 + arch/arm/plat-samsung/pm.c | 1 + arch/arm/plat-samsung/s5p-irq.c | 1 + 12 files changed, 24 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/dev-uart.c +1 -0
@@ -20,6 +20,7 @@#include <asm/mach/irq.h> #include <mach/hardware.h> #include <mach/map.h> +#include <mach/irqs.h> #include <plat/devs.h>
arch/arm/mach-exynos/include/mach/irqs.h +4 -1
@@ -467,7 +467,10 @@#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64)/* Set the default NR_IRQS */ +#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) -#define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) +#ifndef CONFIG_SPARSE_IRQ +#define NR_IRQS EXYNOS_NR_IRQS +#endif #endif /* __ASM_ARCH_IRQS_H */
arch/arm/mach-exynos/mach-armlex4210.c +2 -0
@@ -25,6 +25,7 @@#include <plat/regs-srom.h> #include <plat/sdhci.h> +#include <mach/irqs.h> #include <mach/map.h> #include "common.h"
@@ -196,6 +197,7 @@ static void __init armlex4210_machine_init(void)MACHINE_START (ARMLEX4210 ,"ARMLEX4210" )/* Maintainer: Alim Akhtar <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = armlex4210_map_io,
arch/arm/mach-exynos/mach-exynos4-dt.c +3 -0
@@ -20,6 +20,8 @@#include <asm/mach/arch.h> #include <plat/mfc.h> +#include <mach/irqs.h> +#include "common.h"
@@ -54,6 +56,7 @@ static void __init exynos4_reserve(void) }DT_MACHINE_START (EXYNOS4210_DT ,"Samsung Exynos4 (Flattened Device Tree)" )/* Maintainer: Thomas Abraham <[email protected]> */ + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = exynos4_dt_map_io,
arch/arm/mach-exynos/mach-exynos5-dt.c +2 -0
@@ -16,6 +16,7 @@#include <linux/clocksource.h> #include <asm/mach/arch.h> +#include <mach/irqs.h> #include <mach/regs-pmu.h> #include <plat/cpu.h>
@@ -76,6 +77,7 @@ static void __init exynos5_reserve(void)DT_MACHINE_START (EXYNOS5_DT ,"SAMSUNG EXYNOS5 (Flattened Device Tree)" )/* Maintainer: Kukjin Kim <[email protected]> */ + .nr_irqs = EXYNOS_NR_IRQS, .init_irq = exynos5_init_irq, .smp = smp_ops(exynos_smp_ops), .map_io = exynos5_dt_map_io,
arch/arm/mach-exynos/mach-nuri.c +2 -0
@@ -53,6 +53,7 @@#include <plat/fimc-core.h> #include <plat/camport.h> +#include <mach/irqs.h> #include <mach/map.h> #include "common.h"
@@ -1376,6 +1377,7 @@ static void __init nuri_machine_init(void)MACHINE_START (NURI ,"NURI" )/* Maintainer: Kyungmin Park <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = nuri_map_io,
arch/arm/mach-exynos/mach-origen.c +2 -0
@@ -46,6 +46,7 @@#include <plat/hdmi.h> #include <mach/map.h> +#include <mach/irqs.h> #include <drm/exynos_drm.h> #include "common.h"
@@ -811,6 +812,7 @@ static void __init origen_machine_init(void)MACHINE_START (ORIGEN ,"ORIGEN" )/* Maintainer: JeongHyeon Kim <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = origen_map_io,
arch/arm/mach-exynos/mach-smdk4x12.c +2 -0
@@ -39,6 +39,7 @@#include <plat/regs-serial.h> #include <plat/sdhci.h> +#include <mach/irqs.h> #include <mach/map.h> #include <drm/exynos_drm.h>
@@ -384,6 +385,7 @@ MACHINE_START(SMDK4412, "SMDK4412")/* Maintainer: Kukjin Kim <[email protected]> */ /* Maintainer: Changhwan Youn <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = smdk4x12_map_io,
arch/arm/mach-exynos/mach-smdkv310.c +3 -0
@@ -43,6 +43,7 @@#include <plat/clock.h> #include <plat/hdmi.h> +#include <mach/irqs.h> #include <mach/map.h> #include <drm/exynos_drm.h>
@@ -420,6 +421,7 @@ MACHINE_START(SMDKV310, "SMDKV310")/* Maintainer: Kukjin Kim <[email protected]> */ /* Maintainer: Changhwan Youn <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = smdkv310_map_io,
@@ -432,6 +434,7 @@ MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )/* Maintainer: Kukjin Kim <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = smdkv310_map_io,
arch/arm/plat-samsung/irq-vic-timer.c +1 -0
@@ -20,6 +20,7 @@#include <linux/io.h> #include <mach/map.h> +#include <mach/irqs.h> #include <plat/cpu.h> #include <plat/irq-vic-timer.h> #include <plat/regs-timer.h>
arch/arm/plat-samsung/pm.c +1 -0
@@ -27,6 +27,7 @@#include <plat/regs-serial.h> #include <mach/regs-clock.h> #include <mach/regs-irq.h> +#include <mach/irqs.h> #include <asm/irq.h> #include <plat/pm.h>
arch/arm/plat-samsung/s5p-irq.c +1 -0
@@ -15,6 +15,7 @@#include <linux/io.h> #include <linux/irqchip/arm-vic.h> +#include <mach/irqs.h> #include <mach/map.h> #include <plat/regs-timer.h> #include <plat/cpu.h>
Signature · 1 line
1.8.1.2
Re: [PATCH 02/30] ARM: exynos: prepare for sparse IRQ
Quoted 4 lines · Arnd Bergmann
When we enable
CONFIG_SPARSE_IRQ, we have to set the value ofNR_IRQSin themachine_descfor legacy IRQ domains, and any file referring to the number of interrupts or a specific number must include themach/irqs.hheader file explicitly.
It's really wanted feature.
Quoted 2 lines
Signed-off-by Arnd Bergmann <[email protected]>
Quoted 236 lines
--- arch/arm/mach-exynos/dev-uart.c | 1 + arch/arm/mach-exynos/include/mach/irqs.h | 5 ++++- arch/arm/mach-exynos/mach-armlex4210.c | 2 ++ arch/arm/mach-exynos/mach-exynos4-dt.c | 3 +++ arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++ arch/arm/mach-exynos/mach-nuri.c | 2 ++ arch/arm/mach-exynos/mach-origen.c | 2 ++ arch/arm/mach-exynos/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos/mach-smdkv310.c | 3 +++ arch/arm/plat-samsung/irq-vic-timer.c | 1 + arch/arm/plat-samsung/pm.c | 1 + arch/arm/plat-samsung/s5p-irq.c | 1 + 12 files changed, 24 insertions(+), 1 deletion(-)arch/arm/mach-exynos/dev-uart.c +1
-0@@ -20,6 +20,7 @@#include <asm/mach/irq.h> #include <mach/hardware.h> #include <mach/map.h> +#include <mach/irqs.h> #include <plat/devs.h> arch/arm/mach-exynos/include/mach/irqs.h +4
-1@@ -467,7 +467,10 @@#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64)/* Set the default NR_IRQS */ +#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) -#define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) +#ifndef CONFIG_SPARSE_IRQ +#define NR_IRQS EXYNOS_NR_IRQS +#endif #endif /* __ASM_ARCH_IRQS_H */ arch/arm/mach-exynos/mach-armlex4210.c +2
-0@@ -25,6 +25,7 @@#include <plat/regs-srom.h> #include <plat/sdhci.h> +#include <mach/irqs.h> #include <mach/map.h> #include "common.h" @@ -196,6 +197,7 @@ static void __init armlex4210_machine_init(void)MACHINE_START (ARMLEX4210 ,"ARMLEX4210" )/* Maintainer: Alim Akhtar <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = armlex4210_map_io,arch/arm/mach-exynos/mach-exynos4-dt.c +3
-0@@ -20,6 +20,8 @@#include <asm/mach/arch.h> #include <plat/mfc.h> +#include <mach/irqs.h> +#include "common.h" @@ -54,6 +56,7 @@ static void __init exynos4_reserve(void) }DT_MACHINE_START (EXYNOS4210_DT ,"Samsung Exynos4 (Flattened Device Tree)" )/* Maintainer: Thomas Abraham <[email protected]> */ + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = exynos4_dt_map_io,arch/arm/mach-exynos/mach-exynos5-dt.c +2
-0@@ -16,6 +16,7 @@#include <linux/clocksource.h> #include <asm/mach/arch.h> +#include <mach/irqs.h> #include <mach/regs-pmu.h> #include <plat/cpu.h> @@ -76,6 +77,7 @@ static void __init exynos5_reserve(void)DT_MACHINE_START (EXYNOS5_DT ,"SAMSUNG EXYNOS5 (Flattened Device Tree)" )/* Maintainer: Kukjin Kim <[email protected]> */ + .nr_irqs = EXYNOS_NR_IRQS, .init_irq = exynos5_init_irq, .smp = smp_ops(exynos_smp_ops), .map_io = exynos5_dt_map_io,arch/arm/mach-exynos/mach-nuri.c +2
-0@@ -53,6 +53,7 @@#include <plat/fimc-core.h> #include <plat/camport.h> +#include <mach/irqs.h> #include <mach/map.h> #include "common.h" @@ -1376,6 +1377,7 @@ static void __init nuri_machine_init(void)MACHINE_START (NURI ,"NURI" )/* Maintainer: Kyungmin Park <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = nuri_map_io,arch/arm/mach-exynos/mach-origen.c +2
-0@@ -46,6 +46,7 @@#include <plat/hdmi.h> #include <mach/map.h> +#include <mach/irqs.h> #include <drm/exynos_drm.h> #include "common.h" @@ -811,6 +812,7 @@ static void __init origen_machine_init(void)MACHINE_START (ORIGEN ,"ORIGEN" )/* Maintainer: JeongHyeon Kim <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = origen_map_io,arch/arm/mach-exynos/mach-smdk4x12.c +2
-0@@ -39,6 +39,7 @@#include <plat/regs-serial.h> #include <plat/sdhci.h> +#include <mach/irqs.h> #include <mach/map.h> #include <drm/exynos_drm.h> @@ -384,6 +385,7 @@ MACHINE_START(SMDK4412, "SMDK4412")/* Maintainer: Kukjin Kim <[email protected]> */ /* Maintainer: Changhwan Youn <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = smdk4x12_map_io,arch/arm/mach-exynos/mach-smdkv310.c +3
-0@@ -43,6 +43,7 @@#include <plat/clock.h> #include <plat/hdmi.h> +#include <mach/irqs.h> #include <mach/map.h> #include <drm/exynos_drm.h> @@ -420,6 +421,7 @@ MACHINE_START(SMDKV310, "SMDKV310")/* Maintainer: Kukjin Kim <[email protected]> */ /* Maintainer: Changhwan Youn <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = smdkv310_map_io,@@ -432,6 +434,7 @@ MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )/* Maintainer: Kukjin Kim <[email protected]> */ .atag_offset = 0x100, + .nr_irqs = EXYNOS_NR_IRQS, .smp = smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = smdkv310_map_io,arch/arm/plat-samsung/irq-vic-timer.c +1
-0@@ -20,6 +20,7 @@#include <linux/io.h> #include <mach/map.h> +#include <mach/irqs.h> #include <plat/cpu.h> #include <plat/irq-vic-timer.h> #include <plat/regs-timer.h> arch/arm/plat-samsung/pm.c +1
-0@@ -27,6 +27,7 @@#include <plat/regs-serial.h> #include <mach/regs-clock.h> #include <mach/regs-irq.h> +#include <mach/irqs.h> #include <asm/irq.h> #include <plat/pm.h> arch/arm/plat-samsung/s5p-irq.c +1
-1@@ -15,6 +15,7 @@#include <linux/io.h> #include <linux/irqchip/arm-vic.h> +#include <mach/irqs.h> #include <mach/map.h> #include <plat/regs-timer.h> #include <plat/cpu.h> --1.8.1.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 3/30 ARM: exynos: move debug-macro.S to include/debug/
In reply to Arnd BergmannThe move is necessary to support early debug output on exynos with multiplatform configurations. This implies also moving the plat/debug-macro.S file, but we are leaving the remaining users of that file in place, to avoid adding large numbers of extra configuration options to Kconfig.debug
---
arch/arm/Kconfig.debug | 8 ++++++++
.../include/mach/debug-macro.S => include/debug/exynos.S} | 12 ++++++------
.../include/plat/debug-macro.S => include/debug/samsung.S} | 2 +-
arch/arm/mach-s3c24xx/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s3c64xx/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5p64x0/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pc100/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pv210/include/mach/debug-macro.S | 2 +-
8 files changed, 20 insertions(+), 12 deletions(-)
rename arch/arm/{mach-exynos/include/mach/debug-macro.S => include/debug/exynos.S} (84%)
rename arch/arm/{plat-samsung/include/plat/debug-macro.S => include/debug/samsung.S} (98%)arch/arm/Kconfig.debug +8 -0
@@ -348,6 +348,7 @@ choice config DEBUG_S3C_UART0 depends on PLAT_SAMSUNG + select DEBUG_EXYNOS_UART if ARCH_EXYNOS bool "Use S3C UART 0 for low-level debug" help Say Y here if you want the debug print routines to direct
@@ -359,6 +360,7 @@ choice config DEBUG_S3C_UART1 depends on PLAT_SAMSUNG + select DEBUG_EXYNOS_UART if ARCH_EXYNOS bool "Use S3C UART 1 for low-level debug" help Say Y here if you want the debug print routines to direct
@@ -370,6 +372,7 @@ choice config DEBUG_S3C_UART2 depends on PLAT_SAMSUNG + select DEBUG_EXYNOS_UART if ARCH_EXYNOS bool "Use S3C UART 2 for low-level debug" help Say Y here if you want the debug print routines to direct
@@ -381,6 +384,7 @@ choice config DEBUG_S3C_UART3 depends on PLAT_SAMSUNG && ARCH_EXYNOS + select DEBUG_EXYNOS_UART bool "Use S3C UART 3 for low-level debug" help Say Y here if you want the debug print routines to direct
@@ -510,6 +514,9 @@ choice endchoice +config DEBUG_EXYNOS_UART + bool + config DEBUG_IMX_UART_PORT int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ DEBUG_IMX25_UART || \
@@ -607,6 +614,7 @@ config DEBUG_LL_INCLUDE string default "debug/bcm2835.S" if DEBUG_BCM2835 default "debug/cns3xxx.S" if DEBUG_CNS3XXX + default "debug/exynos.S" if DEBUG_EXYNOS_UART default "debug/icedcc.S" if DEBUG_ICEDCC default "debug/imx.S" if DEBUG_IMX1_UART || \ DEBUG_IMX25_UART || \
arch/arm/include/debug/exynos.S renamed from arch/arm/mach-exynos/include/mach/debug-macro.S +6 -6
@@ -1,10 +1,7 @@ -/* linux/arch/arm/mach-exynos4/include/mach/debug-macro.S - * +/* * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. * http://www.samsung.com * - * Based on arch/arm/mach-s3c6400/include/mach/debug-macro.S - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation.
@@ -12,7 +9,10 @@ /* pull in the relevant register and map files. */ -#include <mach/map.h> +#define S3C_ADDR_BASE 0xF6000000 +#define S3C_VA_UART S3C_ADDR_BASE + 0x01000000 +#define EXYNOS4_PA_UART 0x13800000 +#define EXYNOS5_PA_UART 0x12C00000 /* note, for the boot process to work we have to keep the UART * virtual address aligned to an 1MiB boundary for the L1
@@ -36,4 +36,4 @@ #define fifo_full fifo_full_s5pv210 #define fifo_level fifo_level_s5pv210 -#include <plat/debug-macro.S> +#include <debug/samsung.S>
arch/arm/include/debug/samsung.S renamed from arch/arm/plat-samsung/include/plat/debug-macro.S +1 -1
@@ -9,7 +9,7 @@ * published by the Free Software Foundation. */ -#include <plat/regs-serial.h> +#include <linux/serial_s3c.h> /* The S5PV210/S5PC110 implementations are as belows. */
arch/arm/mach-s3c24xx/include/mach/debug-macro.S +1 -1
@@ -98,4 +98,4 @@ /* include the reset of the code which will do the work */ -#include <plat/debug-macro.S> +#include <debug/samsung.S>
arch/arm/mach-s3c64xx/include/mach/debug-macro.S +1 -1
@@ -35,4 +35,4 @@ * will be fine with us. */ -#include <plat/debug-macro.S> +#include <debug/samsung.S>
arch/arm/mach-s5p64x0/include/mach/debug-macro.S +1 -1
@@ -30,4 +30,4 @@ #endif .endm -#include <plat/debug-macro.S> +#include <debug/samsung.S>
arch/arm/mach-s5pc100/include/mach/debug-macro.S +1 -1
@@ -36,4 +36,4 @@ * will be fine with us. */ -#include <plat/debug-macro.S> +#include <debug/samsung.S>
arch/arm/mach-s5pv210/include/mach/debug-macro.S +1 -1
@@ -38,4 +38,4 @@ * will be fine with us. */ -#include <plat/debug-macro.S> +#include <debug/samsung.S>
Signature · 1 line
1.8.1.2
PATCH 4/30 ARM: samsung: move mfc device definition to s5p-dev-mfc.c
In reply to Arnd BergmannFor a DT-only build we don't want to compile devs.c, but we do need the mfc device, which is also referenced by the DT based platforms, so move it all into one place.
--- arch/arm/plat-samsung/devs.c | 45 ------------------------------------- arch/arm/plat-samsung/s5p-dev-mfc.c | 42 +++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 46 deletions(-)
arch/arm/plat-samsung/devs.c +0 -45
@@ -878,51 +878,6 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) }#endif /* CONFIG_PLAT_S3C24XX */ -/* MFC */ - -#ifdef CONFIG_S5P_DEV_MFC -static struct resource s5p_mfc_resource[] = { - [0 ] =DEFINE_RES_MEM (S5P_PA_MFC ,SZ_64K ), - [1 ] =DEFINE_RES_IRQ (IRQ_MFC ), -}; - -struct platform_device s5p_device_mfc = { - .name ="s5p-mfc" , - .id =-1 , - .num_resources =ARRAY_SIZE (s5p_mfc_resource), - .resource = s5p_mfc_resource, -}; - -/* -* MFC hardware has 2 memory interfaces which are modelled as two separate -* platform devices to let dma-mapping distinguish between them. -* -* MFC parent device (s5p_device_mfc) must be registered before memory -* interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r). -*/ - -struct platform_device s5p_device_mfc_l = { - .name ="s5p-mfc-l" , - .id =-1 , - .dev = { - .parent = &s5p_device_mfc.dev, - .dma_mask = &samsung_device_dma_mask, - .coherent_dma_mask =DMA_BIT_MASK (32 ), - }, -}; - -struct platform_device s5p_device_mfc_r = { - .name ="s5p-mfc-r" , - .id =-1 , - .dev = { - .parent = &s5p_device_mfc.dev, - .dma_mask = &samsung_device_dma_mask, - .coherent_dma_mask =DMA_BIT_MASK (32 ), - }, -}; - -#endif /* CONFIG_S5P_DEV_MFC */ -/* MIPI CSIS */ #ifdef CONFIG_S5P_DEV_CSIS0
arch/arm/plat-samsung/s5p-dev-mfc.c +41 -1
51 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 5/30 tty: serial/samsung: prepare for common clock API
In reply to Arnd BergmannWith the common clock interface, there is no way to provide the "clock_source" sysfs attribute for the samsung serial ports. Given that this file was purely informational and had fixed contents, we have reason to believe that no user space programs were relying on it.
The sysfs file is not documented in the ABI docs.
--- drivers/tty/serial/samsung.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/tty/serial/samsung.c +6 -1
@@ -1179,6 +1179,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,return 0 ; } +#ifdef CONFIG_SAMSUNG_CLOCK static ssize_t s3c24xx_serial_show_clksrc (struct device *dev,struct device_attribute *attr,char *buf)
@@ -1194,7 +1195,7 @@ static ssize_t s3c24xx_serial_show_clksrc(struct device *dev, } static DEVICE_ATTR(clock_source, S_IRUGO, s3c24xx_serial_show_clksrc, NULL); - +#endif /* Device driver serial port probe */
@@ -1252,9 +1253,11 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)uart_add_one_port (&s3c24xx_uart_drv, &ourport->port);platform_set_drvdata (pdev, &ourport->port); +#ifdef CONFIG_SAMSUNG_CLOCK ret =device_create_file (&pdev->dev, &dev_attr_clock_source);if (ret <0 )dev_err (&pdev->dev,"failed to add clock source attr.\n" ); +#endif ret =s3c24xx_serial_cpufreq_register (ourport);if (ret <0 )
@@ -1272,7 +1275,9 @@ static int s3c24xx_serial_remove(struct platform_device *dev)if (port) {s3c24xx_serial_cpufreq_deregister (to_ourport (port)); +#ifdef CONFIG_SAMSUNG_CLOCK device_remove_file (&dev->dev, &dev_attr_clock_source); +#endif uart_remove_one_port (&s3c24xx_uart_drv, port); }
Signature · 1 line
1.8.1.2
PATCH 6/30 tty: serial/samsung: make register definitions global
In reply to Arnd BergmannThe registers for the Samsung S3C serial port are currently defined in the platform specific arch/arm/plat-samsung/include/plat/regs-serial.h file, which is not visible to multiplatform capable drivers.
Unfortunately, it is not possible to move the file into a more local place as we should normally try to, because the same registers may be used in one of four places:
* In the driver itself
* In platform-independent ARM code for early debug output
* In platform_data definitions
* In the Samsung platform power management code
I have also found no way to logically split out a platform_data file, other than possibly move everything into include/linux/platform_data, which also felt wrong. The only part of this file that makes sense to keep specific to the s3c24xx platform are the virtual and physical addresses defined here, which are needed in no other location.
--- arch/arm/mach-s3c24xx/clock-s3c2440.c | 5 + arch/arm/mach-s3c24xx/common.c | 5 + arch/arm/plat-samsung/include/plat/regs-serial.h | 282 +---------------------- drivers/tty/serial/samsung.c | 6 +- include/linux/serial_s3c.h | 260 +++++++++++++++++++++ 5 files changed, 274 insertions(+), 284 deletions(-) create mode 100644 include/linux/serial_s3c.h
arch/arm/mach-s3c24xx/clock-s3c2440.c +5 -0
@@ -123,6 +123,11 @@ static struct clk s3c2440_clk_ac97 = { .ctrlbit = S3C2440_CLKCON_AC97, }; +#define S3C24XX_VA_UART0 (S3C_VA_UART) +#define S3C24XX_VA_UART1 (S3C_VA_UART + 0x4000 ) +#define S3C24XX_VA_UART2 (S3C_VA_UART + 0x8000 ) +#define S3C24XX_VA_UART3 (S3C_VA_UART + 0xC000 ) +static unsigned long s3c2440_fclk_n_getrate (struct clk *clk) {unsigned long ucon0, ucon1, ucon2, divisor;
arch/arm/mach-s3c24xx/common.c +5 -0
@@ -236,6 +236,11 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)/* Serial port registrations */ +#define S3C2410_PA_UART0 (S3C24XX_PA_UART) +#define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) +#define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) +#define S3C2443_PA_UART3 (S3C24XX_PA_UART + 0xC000 ) +static struct resource s3c2410_uart0_resource[] = { [0 ] =DEFINE_RES_MEM (S3C2410_PA_UART0 ,SZ_16K ), [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX0, \
arch/arm/plat-samsung/include/plat/regs-serial.h +1 -281
282 lines not on this page · raw message
drivers/tty/serial/samsung.c +3 -3
@@ -39,6 +39,7 @@#include <linux/tty_flip.h> #include <linux/serial_core.h> #include <linux/serial.h> +#include <linux/serial_s3c.h> #include <linux/delay.h> #include <linux/clk.h> #include <linux/cpufreq.h>
@@ -46,10 +47,9 @@#include <asm/irq.h> -#include <mach/hardware.h> - -#include <plat/regs-serial.h> +#ifdef CONFIG_SAMSUNG_CLOCK #include <plat/clock.h> +#endif #include "samsung.h"
include/linux/serial_s3c.h new file +260 -0
260 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 7/30 tty: serial/samsung: fix modular build
In reply to Arnd BergmannThere are a few bugs in the samsung serial driver when built as a loadable module, which makes the console code unavailable, as well as giving no access to the 'printascii' early debug function. This adds the appropriate compile time conditionals.
--- drivers/tty/serial/samsung.c | 4 ++-- drivers/tty/serial/samsung.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/tty/serial/samsung.c +2 -2
@@ -894,7 +894,7 @@ console_initcall(s3c24xx_serial_console_init);#define S3C24XX_SERIAL_CONSOLE NULL#endif -#ifdef CONFIG_CONSOLE_POLL +#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE ) && defined(CONFIG_CONSOLE_POLL )static int s3c24xx_serial_get_poll_char (struct uart_port *port);static void s3c24xx_serial_put_poll_char (struct uart_port *port,unsigned char c);
@@ -918,7 +918,7 @@ static struct uart_ops s3c24xx_serial_ops = { .request_port = s3c24xx_serial_request_port, .config_port = s3c24xx_serial_config_port, .verify_port = s3c24xx_serial_verify_port, -#ifdef CONFIG_CONSOLE_POLL +#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE ) && defined(CONFIG_CONSOLE_POLL ) .poll_get_char = s3c24xx_serial_get_poll_char, .poll_put_char = s3c24xx_serial_put_poll_char,#endif
drivers/tty/serial/samsung.h +3 -1
@@ -76,7 +76,9 @@ struct s3c24xx_uart_port {#define wr_regb (port, reg, val) __raw_writeb(val, portaddr(port, reg))#define wr_regl (port, reg, val) __raw_writel(val, portaddr(port, reg)) -#ifdef CONFIG_SERIAL_SAMSUNG_DEBUG +#if defined(CONFIG_SERIAL_SAMSUNG_DEBUG ) && \ + defined(CONFIG_DEBUG_LL ) && \ + !defined(MODULE )extern void printascii (const char *);
Signature · 1 line
1.8.1.2
PATCH 8/30 i2c: s3c2410: make header file local
In reply to Arnd BergmannNo other file in the kernel besides i2c-s3c2410.c uses the current plat/regs-iic.h, so we can simply move the header file to live in the same directory as the driver, as a preparation to multiplatform builds.
--- arch/arm/mach-s3c24xx/mach-rx1950.c | 1 - arch/arm/plat-samsung/devs.c | 1 - drivers/i2c/busses/i2c-s3c2410.c | 3 ++- .../include/plat/regs-iic.h => drivers/i2c/busses/i2c-s3c2410.h | 0 4 files changed, 2 insertions(+), 3 deletions(-) rename arch/arm/plat-samsung/include/plat/regs-iic.h => drivers/i2c/busses/i2c-s3c2410.h (100%)
arch/arm/mach-s3c24xx/mach-rx1950.c +0 -1
@@ -56,7 +56,6 @@#include <plat/cpu.h> #include <plat/devs.h> #include <plat/pm.h> -#include <plat/regs-iic.h> #include <plat/regs-serial.h> #include <plat/samsung-time.h>
arch/arm/plat-samsung/devs.c +0 -1
@@ -62,7 +62,6 @@#include <linux/platform_data/usb-s3c2410_udc.h> #include <linux/platform_data/usb-ohci-s3c2410.h> #include <plat/usb-phy.h> -#include <plat/regs-iic.h> #include <plat/regs-serial.h> #include <plat/regs-spi.h> #include <linux/platform_data/spi-s3c64xx.h>
drivers/i2c/busses/i2c-s3c2410.c +2 -1
@@ -42,9 +42,10 @@#include <asm/irq.h> -#include <plat/regs-iic.h> #include <linux/platform_data/i2c-s3c2410.h> +#include "i2c-s3c2410.h" +/* Treat S3C2410 as baseline hardware, anything else is supported via quirks */ #define QUIRK_S3C2440 (1 << 0)#define QUIRK_HDMIPHY (1 << 1)
drivers/i2c/busses/i2c-s3c2410.h renamed from arch/arm/plat-samsung/include/plat/regs-iic.h +0 -0
Signature · 1 line
1.8.1.2
Re: [PATCH 08/30] i2c: s3c2410: make header file local
Quoted 3 lines · Arnd Bergmann
No other file in the kernel besides
i2c-s3c2410.cuses the currentplat/regs-iic.h, so we can simply move the header file to live in the same directory as the driver, as a preparation to multiplatform builds.
What about putting the regs in the driver itself?
Re: [PATCH 08/30] i2c: s3c2410: make header file local
Am Sonntag, 14. April 2013, 14:20:35 schrieb Wolfram Sang:
Quoted 6 lines · Arnd Bergmann
Quoted 3 lines
No other file in the kernel besides
i2c-s3c2410.cuses the currentplat/regs-iic.h, so we can simply move the header file to live in the same directory as the driver, as a preparation to multiplatform builds.What about putting the regs in the driver itself?
they already are :-) [0] and Arnd will drop this patch in his next iteration [1].
Heiko
[0]
https://git.kernel.org/cgit/linux/kernel/git/wsa/linux.git/commit/?h=i2c/for-
next&id=e636602ac2613da8c1777cb42443223994be4107
[1] Message-Id: <[email protected]>
PATCH 9/30 mmc: sdhci-s3c: remove platform dependencies
In reply to Arnd Bergmannplat/regs-sdhci.h is not used anywhere but in the sdhci-s3c driver, so it can become a local file there and all other inclusions removed.
plat/sdhci.h is used only to define the platform devices, and with the exception of the platform_data structure not needed by the driver, so we can split out the platform_data definition instead and leave the rest to platform code.
--- arch/arm/mach-exynos/setup-sdhci-gpio.c | 2 +- arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 1 - arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 1 - arch/arm/plat-samsung/include/plat/sdhci.h | 56 +--------------------- drivers/mmc/host/Kconfig | 2 +- .../mmc/host/sdhci-s3c-regs.h | 0 drivers/mmc/host/sdhci-s3c.c | 5 +- include/linux/platform_data/mmc-sdhci-s3c.h | 56 ++++++++++++++++++++++ 8 files changed, 61 insertions(+), 62 deletions(-) rename arch/arm/plat-samsung/include/plat/regs-sdhci.h => drivers/mmc/host/sdhci-s3c-regs.h (100%) create mode 100644 include/linux/platform_data/mmc-sdhci-s3c.h
arch/arm/mach-exynos/setup-sdhci-gpio.c +1 -1
@@ -19,8 +19,8 @@#include <linux/mmc/host.h> #include <linux/mmc/card.h> +#include <mach/gpio.h> #include <plat/gpio-cfg.h> -#include <plat/regs-sdhci.h> #include <plat/sdhci.h> void exynos4_setup_sdhci0_cfg_gpio (struct platform_device *dev,int width)
arch/arm/mach-s5pc100/setup-sdhci-gpio.c +0 -1
@@ -19,7 +19,6 @@#include <linux/mmc/card.h> #include <plat/gpio-cfg.h> -#include <plat/regs-sdhci.h> #include <plat/sdhci.h> void s5pc100_setup_sdhci0_cfg_gpio (struct platform_device *dev,int width)
arch/arm/mach-s5pv210/setup-sdhci-gpio.c +0 -1
@@ -20,7 +20,6 @@#include <linux/mmc/card.h> #include <plat/gpio-cfg.h> -#include <plat/regs-sdhci.h> #include <plat/sdhci.h> void s5pv210_setup_sdhci0_cfg_gpio (struct platform_device *dev,int width)
arch/arm/plat-samsung/include/plat/sdhci.h +1 -55
68 lines not on this page · raw message
drivers/mmc/host/Kconfig +1 -1
@@ -180,7 +180,7 @@ config MMC_SDHCI_TEGRA config MMC_SDHCI_S3C tristate "SDHCI support on Samsung S3C SoC" - depends on MMC_SDHCI && PLAT_SAMSUNG + depends on MMC_SDHCI && PLAT_SAMSUNG_SINGLE help This selects the Secure Digital Host Controller Interface (SDHCI) often referrered to as the HSMMC block in some of the Samsung S3C
drivers/mmc/host/sdhci-s3c-regs.h renamed from arch/arm/plat-samsung/include/plat/regs-sdhci.h +0 -0
drivers/mmc/host/sdhci-s3c.c +2 -3
@@ -15,6 +15,7 @@#include <linux/delay.h> #include <linux/dma-mapping.h> #include <linux/platform_device.h> +#include <linux/platform_data/mmc-sdhci-s3c.h> #include <linux/slab.h> #include <linux/clk.h> #include <linux/io.h>
@@ -28,9 +29,7 @@#include <linux/mmc/host.h> -#include <plat/sdhci.h> -#include <plat/regs-sdhci.h> - +#include "sdhci-s3c-regs.h" #include "sdhci.h" #define MAX_BUS_CLK (4)
include/linux/platform_data/mmc-sdhci-s3c.h new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
1.8.1.2
Re: [PATCH 09/30] mmc: sdhci-s3c: remove platform dependencies
Hi,
Quoted 4 lines · Arnd Bergmann
plat/regs-sdhci.his not used anywhere but in the sdhci-s3c driver, so it can become a local file there and all other inclusions removed.
Quoted 8 lines
plat/sdhci.his used only to define the platform devices, and with the exception of theplatform_datastructure not needed by the driver, so we can split out theplatform_datadefinition instead and leave the rest to platform code.Signed-off-by Arnd Bergmann <[email protected]>Cc linux-mmc at vger.kernel.orgCc Chris Ball <[email protected]>
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
PATCH 10/30 usb: exynos: do not include plat/usb-phy.h
In reply to Arnd BergmannThe definitions have moved to include/linux/usb/samsung-usb-phy.h, and plat/usb-phy.h is unavailable from drivers in a multiplatform configuration.
Also fix up the plat/usb-phy.h header file to use the definitions from the new header instead of providing a separate copy.
--- arch/arm/mach-exynos/setup-usb-phy.c | 8 ++++---- arch/arm/mach-s3c64xx/setup-usb-phy.c | 4 ++-- arch/arm/mach-s5pv210/setup-usb-phy.c | 4 ++-- arch/arm/plat-samsung/include/plat/usb-phy.h | 5 +---- drivers/usb/host/ehci-s5p.c | 1 - drivers/usb/host/ohci-exynos.c | 1 - 6 files changed, 9 insertions(+), 14 deletions(-)
arch/arm/mach-exynos/setup-usb-phy.c +4 -4
@@ -204,9 +204,9 @@ static int exynos4210_usb_phy1_exit(struct platform_device *pdev)int s5p_usb_phy_init (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return exynos4210_usb_phy0_init (pdev); -else if (type ==S5P_USB_PHY_HOST ) +else if (type ==USB_PHY_TYPE_HOST )return exynos4210_usb_phy1_init (pdev);return -EINVAL ;
@@ -214,9 +214,9 @@ int s5p_usb_phy_init(struct platform_device *pdev, int type)int s5p_usb_phy_exit (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return exynos4210_usb_phy0_exit (pdev); -else if (type ==S5P_USB_PHY_HOST ) +else if (type ==USB_PHY_TYPE_HOST )return exynos4210_usb_phy1_exit (pdev);return -EINVAL ;
arch/arm/mach-s3c64xx/setup-usb-phy.c +2 -2
@@ -76,7 +76,7 @@ static int s3c_usb_otgphy_exit(struct platform_device *pdev)int s5p_usb_phy_init (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s3c_usb_otgphy_init (pdev);return -EINVAL ;
@@ -84,7 +84,7 @@ int s5p_usb_phy_init(struct platform_device *pdev, int type)int s5p_usb_phy_exit (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s3c_usb_otgphy_exit (pdev);return -EINVAL ;
arch/arm/mach-s5pv210/setup-usb-phy.c +2 -2
@@ -80,7 +80,7 @@ static int s5pv210_usb_otgphy_exit(struct platform_device *pdev)int s5p_usb_phy_init (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s5pv210_usb_otgphy_init (pdev);return -EINVAL ;
@@ -88,7 +88,7 @@ int s5p_usb_phy_init(struct platform_device *pdev, int type)int s5p_usb_phy_exit (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s5pv210_usb_otgphy_exit (pdev);return -EINVAL ;
arch/arm/plat-samsung/include/plat/usb-phy.h +1 -4
@@ -11,10 +11,7 @@#ifndef __PLAT_SAMSUNG_USB_PHY_H#define __PLAT_SAMSUNG_USB_PHY_H __FILE__ -enum s5p_usb_phy_type { -S5P_USB_PHY_DEVICE , -S5P_USB_PHY_HOST , -}; +#include <linux/usb/samsung_usb_phy.h> extern int s5p_usb_phy_init (struct platform_device *pdev,int type);extern int s5p_usb_phy_exit (struct platform_device *pdev,int type);
drivers/usb/host/ehci-s5p.c +0 -1
@@ -19,7 +19,6 @@#include <linux/platform_data/usb-ehci-s5p.h> #include <linux/usb/phy.h> #include <linux/usb/samsung_usb_phy.h> -#include <plat/usb-phy.h> #define EHCI_INSNREG00 (base) (base + 0x90)#define EHCI_INSNREG00_ENA_INCR16 (0x1 << 25)
drivers/usb/host/ohci-exynos.c +0 -1
@@ -18,7 +18,6 @@#include <linux/usb/phy.h> #include <linux/usb/samsung_usb_phy.h> -#include <plat/usb-phy.h> struct exynos_ohci_hcd {struct device *dev;
Signature · 1 line
1.8.1.2
Greg Kroah-Hartman
maintainerRe: [PATCH 10/30] usb: exynos: do not include plat/usb-phy.h
Quoted 11 lines · Arnd Bergmann
The definitions have moved to
include/linux/usb/samsung-usb-phy.h, andplat/usb-phy.his unavailable from drivers in a multiplatform configuration.Also fix up the
plat/usb-phy.hheader file to use the definitions from the new header instead of providing a separate copy.Signed-off-by Arnd Bergmann <[email protected]>Cc linux-usb at vger.kernel.orgCc Greg Kroah-Hartman <[email protected]>Cc Alan Stern <[email protected]>
Quoted 8 lines
--- arch/arm/mach-exynos/setup-usb-phy.c | 8 ++++---- arch/arm/mach-s3c64xx/setup-usb-phy.c | 4 ++-- arch/arm/mach-s5pv210/setup-usb-phy.c | 4 ++-- arch/arm/plat-samsung/include/plat/usb-phy.h | 5 +---- drivers/usb/host/ehci-s5p.c | 1 - drivers/usb/host/ohci-exynos.c | 1 - 6 files changed, 9 insertions(+), 14 deletions(-)
This patch doesn't apply to my usb-next tree due to the other changes in these files.
Care to refresh it and resend it? I'll be glad to apply it then.
thanks,
greg k-h
PATCH v3 1/1 usb: exynos: do not include plat/usb-phy.h
The definitions have moved to include/linux/usb/samsung-usb-phy.h, and plat/usb-phy.h is unavailable from drivers in a multiplatform configuration.
Also fix up the plat/usb-phy.h header file to use the definitions from the new header instead of providing a separate copy.
---
v3: rebase to usb-next (2871782ae1)
v2: rebase whole series on top of arm-soc for testing
arch/arm/mach-exynos/setup-usb-phy.c +4 -4
@@ -204,9 +204,9 @@ static int exynos4210_usb_phy1_exit(struct platform_device *pdev)int s5p_usb_phy_init (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return exynos4210_usb_phy0_init (pdev); -else if (type ==S5P_USB_PHY_HOST ) +else if (type ==USB_PHY_TYPE_HOST )return exynos4210_usb_phy1_init (pdev);return -EINVAL ;
@@ -214,9 +214,9 @@ int s5p_usb_phy_init(struct platform_device *pdev, int type)int s5p_usb_phy_exit (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return exynos4210_usb_phy0_exit (pdev); -else if (type ==S5P_USB_PHY_HOST ) +else if (type ==USB_PHY_TYPE_HOST )return exynos4210_usb_phy1_exit (pdev);return -EINVAL ;
arch/arm/mach-s3c64xx/setup-usb-phy.c +2 -2
@@ -76,7 +76,7 @@ static int s3c_usb_otgphy_exit(struct platform_device *pdev)int s5p_usb_phy_init (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s3c_usb_otgphy_init (pdev);return -EINVAL ;
@@ -84,7 +84,7 @@ int s5p_usb_phy_init(struct platform_device *pdev, int type)int s5p_usb_phy_exit (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s3c_usb_otgphy_exit (pdev);return -EINVAL ;
arch/arm/mach-s5pv210/setup-usb-phy.c +2 -2
@@ -80,7 +80,7 @@ static int s5pv210_usb_otgphy_exit(struct platform_device *pdev)int s5p_usb_phy_init (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s5pv210_usb_otgphy_init (pdev);return -EINVAL ;
@@ -88,7 +88,7 @@ int s5p_usb_phy_init(struct platform_device *pdev, int type)int s5p_usb_phy_exit (struct platform_device *pdev,int type) { -if (type ==S5P_USB_PHY_DEVICE ) +if (type ==USB_PHY_TYPE_DEVICE )return s5pv210_usb_otgphy_exit (pdev);return -EINVAL ;
arch/arm/plat-samsung/include/plat/usb-phy.h +1 -4
@@ -11,10 +11,7 @@#ifndef __PLAT_SAMSUNG_USB_PHY_H#define __PLAT_SAMSUNG_USB_PHY_H __FILE__ -enum s5p_usb_phy_type { -S5P_USB_PHY_DEVICE , -S5P_USB_PHY_HOST , -}; +#include <linux/usb/samsung_usb_phy.h> extern int s5p_usb_phy_init (struct platform_device *pdev,int type);extern int s5p_usb_phy_exit (struct platform_device *pdev,int type);
drivers/usb/host/ehci-s5p.c +0 -1
@@ -23,7 +23,6 @@#include <linux/platform_data/usb-ehci-s5p.h> #include <linux/usb/phy.h> #include <linux/usb/samsung_usb_phy.h> -#include <plat/usb-phy.h> #include <linux/usb.h> #include <linux/usb/hcd.h> #include <linux/usb/otg.h>
drivers/usb/host/ohci-exynos.c +0 -1
@@ -17,7 +17,6 @@#include <linux/platform_data/usb-exynos.h> #include <linux/usb/phy.h> #include <linux/usb/samsung_usb_phy.h> -#include <plat/usb-phy.h> struct exynos_ohci_hcd {struct device *dev;
PATCH 11/30 exynos: remove unnecessary header inclusions
In reply to Arnd BergmannIn multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
--- drivers/media/platform/exynos-gsc/gsc-regs.c | 1 - drivers/media/platform/s5p-tv/sii9234_drv.c | 3 --- 2 files changed, 4 deletions(-)
drivers/media/platform/exynos-gsc/gsc-regs.c +0 -1
@@ -12,7 +12,6 @@#include <linux/io.h> #include <linux/delay.h> -#include <mach/map.h> #include "gsc-core.h"
drivers/media/platform/s5p-tv/sii9234_drv.c +0 -3
@@ -23,9 +23,6 @@#include <linux/regulator/machine.h> #include <linux/slab.h> -#include <mach/gpio.h> -#include <plat/gpio-cfg.h> -#include <media/sii9234.h> #include <media/v4l2-subdev.h>
Signature · 1 line
1.8.1.2
Re: [PATCH 11/30] [media] exynos: remove unnecessary header inclusions
Em Thu, 11 Apr 2013 02:04:53 +0200
Arnd Bergmann <[email protected]> escreveu:
Quoted 8 lines
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-media at vger.kernel.orgCc Mauro Carvalho Chehab <[email protected]>
Quoted 31 lines
--- drivers/media/platform/exynos-gsc/gsc-regs.c | 1 - drivers/media/platform/s5p-tv/sii9234_drv.c | 3 --- 2 files changed, 4 deletions(-)drivers/media/platform/exynos-gsc/gsc-regs.c +0
-1@@ -12,7 +12,6 @@#include <linux/io.h> #include <linux/delay.h> -#include <mach/map.h> #include "gsc-core.h" drivers/media/platform/s5p-tv/sii9234_drv.c +0
-3@@ -23,9 +23,6 @@#include <linux/regulator/machine.h> #include <linux/slab.h> -#include <mach/gpio.h> -#include <plat/gpio-cfg.h> -#include <media/sii9234.h> #include <media/v4l2-subdev.h>
Signature · 2 lines
Cheers, Mauro
Sylwester Nawrocki
maintainerRe: [PATCH 11/30] [media] exynos: remove unnecessary header inclusions
Quoted 8 lines · Mauro Carvalho Chehab
Em Thu, 11 Apr 2013 02:04:53 +0200
Arnd Bergmann <[email protected]> escreveu:Quoted 5 lines
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
Quoted 5 lines
Quoted 3 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-media at vger.kernel.orgCc Mauro Carvalho Chehab <[email protected]>
This patch is already queued in the media tree for 3.10, and it can be found in -next now.
Thanks,
Sylwester
Re: [PATCH 11/30] [media] exynos: remove unnecessary header inclusions
Quoted 9 lines · Sylwester Nawrocki
Quoted 8 lines · Mauro Carvalho Chehab
Em Thu, 11 Apr 2013 02:04:53 +0200
Arnd Bergmann <[email protected]> escreveu:Quoted 5 lines
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-media at vger.kernel.orgCc Mauro Carvalho Chehab <[email protected]>This patch is already queued in the media tree for 3.10, and it can be found in -next now.
Ok, thanks! I'll drop it from my series then.
Arnd
PATCH 12/30 video/exynos: remove unnecessary header inclusions
In reply to Arnd BergmannIn multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
--- drivers/video/exynos/exynos_mipi_dsi.c | 2 -- drivers/video/exynos/exynos_mipi_dsi_common.c | 2 -- drivers/video/exynos/exynos_mipi_dsi_lowlevel.c | 2 -- 3 files changed, 6 deletions(-)
drivers/video/exynos/exynos_mipi_dsi.c +0 -2
@@ -35,8 +35,6 @@#include <video/exynos_mipi_dsim.h> -#include <plat/fb.h> -#include "exynos_mipi_dsi_common.h" #include "exynos_mipi_dsi_lowlevel.h"
drivers/video/exynos/exynos_mipi_dsi_common.c +0 -2
@@ -31,8 +31,6 @@#include <video/mipi_display.h> #include <video/exynos_mipi_dsim.h> -#include <mach/map.h> -#include "exynos_mipi_dsi_regs.h" #include "exynos_mipi_dsi_lowlevel.h" #include "exynos_mipi_dsi_common.h"
drivers/video/exynos/exynos_mipi_dsi_lowlevel.c +0 -2
@@ -26,8 +26,6 @@#include <video/exynos_mipi_dsim.h> -#include <mach/map.h> -#include "exynos_mipi_dsi_regs.h" void exynos_mipi_dsi_func_reset (struct mipi_dsim_device *dsim)
Signature · 1 line
1.8.1.2
Re: [PATCH 12/30] video/exynos: remove unnecessary header inclusions
Quoted 9 lines · Arnd Bergmann
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-fbdev at vger.kernel.orgCc Jingoo Han <[email protected]>
CC'ed Tomi Valkeinen, Inki Dae, Donghwa Lee, Kyungmin Park
Best regards,
Jingoo Han
Quoted 49 lines
--- drivers/video/exynos/exynos_mipi_dsi.c | 2 -- drivers/video/exynos/exynos_mipi_dsi_common.c | 2 -- drivers/video/exynos/exynos_mipi_dsi_lowlevel.c | 2 -- 3 files changed, 6 deletions(-)drivers/video/exynos/exynos_mipi_dsi.c +0
-2@@ -35,8 +35,6 @@#include <video/exynos_mipi_dsim.h> -#include <plat/fb.h> -#include "exynos_mipi_dsi_common.h" #include "exynos_mipi_dsi_lowlevel.h" drivers/video/exynos/exynos_mipi_dsi_common.c +0
-2@@ -31,8 +31,6 @@#include <video/mipi_display.h> #include <video/exynos_mipi_dsim.h> -#include <mach/map.h> -#include "exynos_mipi_dsi_regs.h" #include "exynos_mipi_dsi_lowlevel.h" #include "exynos_mipi_dsi_common.h" drivers/video/exynos/exynos_mipi_dsi_lowlevel.c +0
-3@@ -26,8 +26,6 @@#include <video/exynos_mipi_dsim.h> -#include <mach/map.h> -#include "exynos_mipi_dsi_regs.h" void exynos_mipi_dsi_func_reset (struct mipi_dsim_device *dsim) --1.8.1.2
Re: [PATCH 12/30] video/exynos: remove unnecessary header inclusions
In reply to Arnd BergmannHi,
Quoted 5 lines · Arnd Bergmann
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
Quoted 8 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-fbdev at vger.kernel.orgCc Jingoo Han <[email protected]>--- drivers/video/exynos/exynos_mipi_dsi.c | 2 -- drivers/video/exynos/exynos_mipi_dsi_common.c | 2 -- drivers/video/exynos/exynos_mipi_dsi_lowlevel.c | 2 -- 3 files changed, 6 deletions(-)
I've applied this and the next patch ([PATCH 13/30] video/s3c: move platform_data out of arch/arm) to fbdev.
I also fixed the extra space mentioned by Jingoo.
Tomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130411/62aa70ae/attachment.sig>
Re: [PATCH 12/30] video/exynos: remove unnecessary header inclusions
Quoted 4 lines · On Thursday 11 April 2013 14:51:55 Tomi Valkeinen wrote:
I've applied this and the next patch ([PATCH 13/30] video/s3c: move
platform_dataout ofarch/arm) to fbdev.I also fixed the extra space mentioned by Jingoo.
Thanks!
Arnd
PATCH 13/30 video/s3c: move platform_data out of arch/arm
In reply to Arnd BergmannThe s3c-fb driver requires header files from the samsung platforms to find its platform_data definition, but this no longer works on multiplatform kernels, so let's move the data into a new header file under include/linux/platform_data.
--- arch/arm/plat-samsung/include/plat/fb.h | 50 +----------------------------- drivers/video/s3c-fb.c | 3 +- include/linux/platform_data/video_s3c.h | 54 +++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 51 deletions(-) create mode 100644 include/linux/platform_data/video_s3c.h
arch/arm/plat-samsung/include/plat/fb.h +1 -49
@@ -15,55 +15,7 @@#ifndef __PLAT_S3C_FB_H#define __PLAT_S3C_FB_H __FILE__ -/* S3C_FB_MAX_WIN -* Set to the maximum number of windows that any of the supported hardware -* can use. Since the platform data uses this for an array size, having it -* set to the maximum of any version of the hardware can do is safe. -*/ -#define S3C_FB_MAX_WIN (5) - -/** -* struct s3c_fb_pd_win - per window setup data -* @xres : The window X size. -* @yres : The window Y size. -* @virtual_x: The virtual X size. -* @virtual_y: The virtual Y size. -*/ -struct s3c_fb_pd_win { -unsigned short default_bpp; -unsigned short max_bpp; -unsigned short xres; -unsigned short yres; -unsigned short virtual_x; -unsigned short virtual_y; -}; - -/** -* struct s3c_fb_platdata - S3C driver platform specific information -* @setup_gpio: Setup the external GPIO pins to the right state to transfer -* the data from the display system to the connected display -* device. -* @vidcon0: The base vidcon0 values to control the panel data format. -* @vidcon1: The base vidcon1 values to control the panel data output. -* @vtiming: Video timing when connected to a RGB type panel. -* @win: The setup data for each hardware window, or NULL for unused. -* @display_mode: The LCD output display mode. -* -* The platform data supplies the video driver with all the information -* it requires to work with the display(s) attached to the machine. It -* controls the initial mode, the number of display windows (0 is always -* the base framebuffer) that are initialised etc. -* -*/ -struct s3c_fb_platdata { -void (*setup_gpio)(void ); - -struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN ]; -struct fb_videomode *vtiming; - -u32 vidcon0; -u32 vidcon1; -}; +#include <linux/platform_data/video_s3c.h> /** * s3c_fb_set_platdata() - Setup the FB device with platform data.
drivers/video/s3c-fb.c +1 -2
@@ -24,10 +24,9 @@#include <linux/uaccess.h> #include <linux/interrupt.h> #include <linux/pm_runtime.h> +#include <linux/platform_data/video_s3c.h> #include <video/samsung_fimd.h> -#include <mach/map.h> -#include <plat/fb.h> /* This driver will export a number of framebuffer interfaces depending * on the configuration passed in via the platform data. Each fb instance
include/linux/platform_data/video_s3c.h new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.8.1.2
Re: [PATCH 13/30] video/s3c: move platform_data out of arch/arm
Quoted 9 lines · Arnd Bergmann
The s3c-fb driver requires header files from the samsung platforms to find its
platform_datadefinition, but this no longer works on multiplatform kernels, so let's move the data into a new header file underinclude/linux/platform_data.Signed-off-by Arnd Bergmann <[email protected]>Cc linux-fbdev at vger.kernel.orgCc Jingoo Han <[email protected]>
CC'ed Tomi Valkeinen.
Hi Arnd,
It looks good. Thank you for your patch. :)
Best regards,
Jingoo Han
Quoted 146 lines
--- arch/arm/plat-samsung/include/plat/fb.h | 50 +----------------------------- drivers/video/s3c-fb.c | 3 +- include/linux/platform_data/video_s3c.h | 54 +++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 51 deletions(-) create mode 100644 include/linux/platform_data/video_s3c.harch/arm/plat-samsung/include/plat/fb.h +1
-49@@ -15,55 +15,7 @@#ifndef __PLAT_S3C_FB_H#define __PLAT_S3C_FB_H __FILE__ -/* S3C_FB_MAX_WIN -* Set to the maximum number of windows that any of the supported hardware -* can use. Since the platform data uses this for an array size, having it -* set to the maximum of any version of the hardware can do is safe. -*/ -#define S3C_FB_MAX_WIN (5) - -/** -* struct s3c_fb_pd_win - per window setup data -* @xres : The window X size. -* @yres : The window Y size. -* @virtual_x: The virtual X size. -* @virtual_y: The virtual Y size. -*/ -struct s3c_fb_pd_win { -unsigned short default_bpp; -unsigned short max_bpp; -unsigned short xres; -unsigned short yres; -unsigned short virtual_x; -unsigned short virtual_y; -}; - -/** -* struct s3c_fb_platdata - S3C driver platform specific information -* @setup_gpio: Setup the external GPIO pins to the right state to transfer -* the data from the display system to the connected display -* device. -* @vidcon0: The base vidcon0 values to control the panel data format. -* @vidcon1: The base vidcon1 values to control the panel data output. -* @vtiming: Video timing when connected to a RGB type panel. -* @win: The setup data for each hardware window, or NULL for unused. -* @display_mode: The LCD output display mode. -* -* The platform data supplies the video driver with all the information -* it requires to work with the display(s) attached to the machine. It -* controls the initial mode, the number of display windows (0 is always -* the base framebuffer) that are initialised etc. -* -*/ -struct s3c_fb_platdata { -void (*setup_gpio)(void ); - -struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN ]; -struct fb_videomode *vtiming; - -u32 vidcon0; -u32 vidcon1; -}; +#include <linux/platform_data/video_s3c.h> /** * s3c_fb_set_platdata() - Setup the FB device with platform data. drivers/video/s3c-fb.c +1
-2@@ -24,10 +24,9 @@#include <linux/uaccess.h> #include <linux/interrupt.h> #include <linux/pm_runtime.h> +#include <linux/platform_data/video_s3c.h> #include <video/samsung_fimd.h> -#include <mach/map.h> -#include <plat/fb.h> /* This driver will export a number of framebuffer interfaces depending * on the configuration passed in via the platform data. Each fb instance include/linux/platform_data/video_s3c.h new file +54
-1@@ -0,0 +1,54 @@ +#ifndef __PLATFORM_DATA_VIDEO_S3C +#define __PLATFORM_DATA_VIDEO_S3C + +/* S3C_FB_MAX_WIN +* Set to the maximum number of windows that any of the supported hardware +* can use. Since the platform data uses this for an array size, having it +* set to the maximum of any version of the hardware can do is safe. +*/ +#define S3C_FB_MAX_WIN (5) + +/** +* struct s3c_fb_pd_win - per window setup data +* @xres : The window X size. +* @yres : The window Y size. +* @virtual_x: The virtual X size. +* @virtual_y: The virtual Y size. +*/ +struct s3c_fb_pd_win { +unsigned short default_bpp; +unsigned short max_bpp; +unsigned short xres; +unsigned short yres; +unsigned short virtual_x; +unsigned short virtual_y; +}; + +/** +* struct s3c_fb_platdata - S3C driver platform specific information +* @setup_gpio: Setup the external GPIO pins to the right state to transfer +* the data from the display system to the connected display +* device. +* @vidcon0: The base vidcon0 values to control the panel data format. +* @vidcon1: The base vidcon1 values to control the panel data output. +* @vtiming: Video timing when connected to a RGB type panel. +* @win: The setup data for each hardware window, or NULL for unused. +* @display_mode: The LCD output display mode. +* +* The platform data supplies the video driver with all the information +* it requires to work with the display(s) attached to the machine. It +* controls the initial mode, the number of display windows (0 is always +* the base framebuffer) that are initialised etc. +* +*/ +struct s3c_fb_platdata { +void (*setup_gpio)(void ); + +struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN ]; +struct fb_videomode *vtiming; + +u32 vidcon0; +u32 vidcon1; +}; + +#endif --1.8.1.2
Re: [PATCH 13/30] video/s3c: move platform_data out of arch/arm
In reply to Arnd BergmannQuoted 16 lines · Arnd Bergmann
The s3c-fb driver requires header files from the samsung platforms to find its
platform_datadefinition, but this no longer works on multiplatform kernels, so let's move the data into a new header file underinclude/linux/platform_data.Signed-off-by Arnd Bergmann <[email protected]>Cc linux-fbdev at vger.kernel.orgCc Jingoo Han <[email protected]>--- arch/arm/plat-samsung/include/plat/fb.h | 50 +----------------------------- drivers/video/s3c-fb.c | 3 +- include/linux/platform_data/video_s3c.h | 54 +++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 51 deletions(-) create mode 100644 include/linux/platform_data/video_s3c.h
[.....]
include/linux/platform_data/video_s3c.h line 53
Quoted 10 lines
include/linux/platform_data/video_s3c.h new file +10
-0+struct s3c_fb_platdata { +void (*setup_gpio)(void ); + +struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN ]; +struct fb_videomode *vtiming; + +u32 vidcon0; +u32 vidcon1; +}; +
There is an unnecessary space.
When the patch is merged, this space should be removed.
Best regards,
Jingoo Han
Quoted 3 lines
+#endif
--
1.8.1.2
PATCH 14/30 thermal/exynos: remove unnecessary header inclusions
In reply to Arnd BergmannIn multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
--- drivers/thermal/exynos_thermal.c | 2 -- 1 file changed, 2 deletions(-)
drivers/thermal/exynos_thermal.c +0 -2
@@ -39,8 +39,6 @@#include <linux/cpu_cooling.h> #include <linux/of.h> -#include <plat/cpu.h> -/* Exynos generic registers */ #define EXYNOS_TMU_REG_TRIMINFO 0x0#define EXYNOS_TMU_REG_CONTROL 0x20
Signature · 1 line
1.8.1.2
Re: [PATCH 14/30] thermal/exynos: remove unnecessary header inclusions
Rui, Arnd,
As agreed in [1], I will be helping on the thermal maintenance.
Quoted 8 lines · Arnd Bergmann
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-pm at vger.kernel.orgCc Zhang Rui <[email protected]>
This patch looks good to me.
You can add my:
Re: [PATCH 14/30] thermal/exynos: remove unnecessary header inclusions
Quoted 10 lines · Eduardo Valentin
Rui, Arnd,
As agreed in [1], I will be helping on the thermal maintenance.
Quoted 5 lines · Arnd Bergmann
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions.
Quoted 9 lines
Quoted 3 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-pm at vger.kernel.orgCc Zhang Rui <[email protected]>This patch looks good to me.
You can add my:
Acked-by Eduardo Valentin <[email protected]>
applied to thermal thermal branch.
thanks,
rui
Quoted 2 lines
PATCH 15/30 mtd: onenand/samsung: make regs-onenand.h file local
In reply to Arnd BergmannNothing uses the NAND register definitions other than the actual driver, so we can move the header file into the same local directory, which lets us build it in a multiplatform configuration.
--- drivers/mtd/onenand/samsung.c | 4 ++-- .../include/plat/regs-onenand.h => drivers/mtd/onenand/samsung.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) rename arch/arm/plat-samsung/include/plat/regs-onenand.h => drivers/mtd/onenand/samsung.h (98%)
drivers/mtd/onenand/samsung.c +2 -2
@@ -23,11 +23,11 @@#include <linux/mtd/partitions.h> #include <linux/dma-mapping.h> #include <linux/interrupt.h> +#include <linux/io.h> #include <asm/mach/flash.h> -#include <plat/regs-onenand.h> -#include <linux/io.h> +#include "samsung.h" enum soc_type {TYPE_S3C6400 ,
drivers/mtd/onenand/samsung.h renamed from arch/arm/plat-samsung/include/plat/regs-onenand.h +0 -2
@@ -11,8 +11,6 @@#ifndef __SAMSUNG_ONENAND_H__#define __SAMSUNG_ONENAND_H__ -#include <mach/hardware.h> -/* * OneNAND Controller */
Signature · 1 line
1.8.1.2
Re: [PATCH 15/30] mtd: onenand/samsung: make regs-onenand.h file local
Thanks Arnd.
Quoted 8 lines · Arnd Bergmann
Nothing uses the NAND register definitions other than the actual driver, so we can move the header file into the same local directory, which lets us build it in a multiplatform configuration.
Signed-off-by Arnd Bergmann <[email protected]>Cc linux-mtd at lists.infradead.orgCc Kyungmin Park <[email protected]>
Quoted 48 lines
Cc David Woodhouse <[email protected]>--- drivers/mtd/onenand/samsung.c | 4 ++-- .../include/plat/regs-onenand.h => drivers/mtd/onenand/samsung.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) rename arch/arm/plat-samsung/include/plat/regs-onenand.h => drivers/mtd/onenand/samsung.h (98%)drivers/mtd/onenand/samsung.c +2
-2@@ -23,11 +23,11 @@#include <linux/mtd/partitions.h> #include <linux/dma-mapping.h> #include <linux/interrupt.h> +#include <linux/io.h> #include <asm/mach/flash.h> -#include <plat/regs-onenand.h> -#include <linux/io.h> +#include "samsung.h" enum soc_type {TYPE_S3C6400 ,drivers/mtd/onenand/samsung.h renamed from arch/arm/plat-samsung/include/plat/regs-onenand.h +0
-3@@ -11,8 +11,6 @@#ifndef __SAMSUNG_ONENAND_H__#define __SAMSUNG_ONENAND_H__ -#include <mach/hardware.h> -/* * OneNAND Controller */ --1.8.1.2
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 16/30 rtc: s3c: make header file local
In reply to Arnd BergmannNothing outside of the rtc driver includes plat/regs-rtc.h, so we can simply move the file into the same directory, which allows us to build the file as platform-independent code.
--- drivers/rtc/rtc-s3c.c | 3 +-- arch/arm/plat-samsung/include/plat/regs-rtc.h => drivers/rtc/rtc-s3c.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) rename arch/arm/plat-samsung/include/plat/regs-rtc.h => drivers/rtc/rtc-s3c.h (97%)
drivers/rtc/rtc-s3c.c +1 -2
@@ -29,9 +29,8 @@#include <linux/uaccess.h> #include <linux/io.h> -#include <mach/hardware.h> #include <asm/irq.h> -#include <plat/regs-rtc.h> +#include "rtc-s3c.h" enum s3c_cpu_type {TYPE_S3C2410 ,
drivers/rtc/rtc-s3c.h renamed from arch/arm/plat-samsung/include/plat/regs-rtc.h +1 -2
@@ -1,5 +1,4 @@ -/* arch/arm/mach-s3c2410/include/mach/regs-rtc.h -* +/* * Copyright (c) 2003 Simtec Electronics <[email protected]> * http://www.simtec.co.uk/products/SWLINUX/ *
Signature · 1 line
1.8.1.2
PATCH 17/30 pwm: samsung: repair the worst MMIO abuses
In reply to Arnd BergmannThe Samsung PWM driver uses "magic" pointers that are mapped at boot time to point its MMIO registers. This fails horribly with a multiplatform kernel, which can not rely on platform specific header files to contain the right values, aside from this being a really bad idea in general.
This changes the driver to at least pass an __iomem token around in the device structure to dereference that. Fixing the platform code is much harder, so we'll leave that until we have a DT binding for pwm-samsung, which may require other changes in this area. Since we are already touching every MMIO accessor in this driver, let's also use the proper readl_relaxed variant rather than __raw_readl.
Tomasz Figa has a set of patches to clean this up in a proper way, but that might be too late for 3.10.
--- drivers/pwm/pwm-samsung.c | 60 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 18 deletions(-)
drivers/pwm/pwm-samsung.c +42 -18
@@ -22,9 +22,25 @@#include <linux/io.h> #include <linux/pwm.h> -#include <mach/map.h> +#ifndef CONFIG_ARCH_MULTIPLATFORM +/* +* This is gross: the platform maps the timer at a fixed +* virtual address and expects us to use that address +* rather than a proper resource. This should get done properly +* when we get a DT binding for this driver. +*/ +#include <plat/map-base.h> +static inline void dummy (void ) +{ +BUILD_BUG_ON (S3C_VA_TIMER !=IOMEM (0xf6300000 )); +} +#else +#define S3C_VA_TIMER IOMEM(0xf6300000); +#endif -#include <plat/regs-timer.h> +#define S3C2410_TCON 8 +#define S3C2410_TCNTB (tmr) (0x0c + (tmr)*0x0c + 0x00) +#define S3C2410_TCMPB (tmr) (0x0c + (tmr)*0x0c + 0x04)struct s3c_chip {struct platform_device *pdev;
@@ -38,6 +54,7 @@ struct s3c_chip {unsigned char tcon_base;unsigned char pwm_id; +void __iomem *base;struct pwm_chip chip; };
@@ -65,9 +82,9 @@ static int s3c_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)local_irq_save (flags); - tcon =__raw_readl (S3C2410_TCON ); + tcon =readl_relaxed (s3c->base +S3C2410_TCON ); tcon |=pwm_tcon_start (s3c); -__raw_writel (tcon,S3C2410_TCON ); +writel_relaxed (tcon, s3c->base +S3C2410_TCON );local_irq_restore (flags);
@@ -82,9 +99,9 @@ static void s3c_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)local_irq_save (flags); - tcon =__raw_readl (S3C2410_TCON ); + tcon =readl_relaxed (s3c->base +S3C2410_TCON ); tcon &= ~pwm_tcon_start (s3c); -__raw_writel (tcon,S3C2410_TCON ); +writel_relaxed (tcon, s3c->base +S3C2410_TCON );local_irq_restore (flags); }
@@ -133,8 +150,8 @@ static int s3c_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,/* The TCMP and TCNT can be read without a lock, they're not * shared between the timers. */ - tcmp =__raw_readl (S3C2410_TCMPB (s3c->pwm_id)); - tcnt =__raw_readl (S3C2410_TCNTB (s3c->pwm_id)); + tcmp =readl_relaxed (s3c->base +S3C2410_TCMPB (s3c->pwm_id)); + tcnt =readl_relaxed (s3c->base +S3C2410_TCNTB (s3c->pwm_id)); period =NS_IN_HZ / period_ns;
@@ -177,16 +194,16 @@ static int s3c_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,local_irq_save (flags); -__raw_writel (tcmp,S3C2410_TCMPB (s3c->pwm_id)); -__raw_writel (tcnt,S3C2410_TCNTB (s3c->pwm_id)); +writel_relaxed (tcmp, s3c->base +S3C2410_TCMPB (s3c->pwm_id)); +writel_relaxed (tcnt, s3c->base +S3C2410_TCNTB (s3c->pwm_id)); - tcon =__raw_readl (S3C2410_TCON ); + tcon =readl_relaxed (s3c->base +S3C2410_TCON ); tcon |=pwm_tcon_manulupdate (s3c); tcon |=pwm_tcon_autoreload (s3c); -__raw_writel (tcon,S3C2410_TCON ); +writel_relaxed (tcon, s3c->base +S3C2410_TCON ); tcon &= ~pwm_tcon_manulupdate (s3c); -__raw_writel (tcon,S3C2410_TCON ); +writel_relaxed (tcon, s3c->base +S3C2410_TCON );local_irq_restore (flags);
@@ -207,6 +224,7 @@ static int s3c_pwm_probe(struct platform_device *pdev)unsigned long flags;unsigned long tcon;unsigned int id = pdev->id; +struct resource *res;int ret;if (id ==4 ) {
@@ -220,6 +238,12 @@ static int s3c_pwm_probe(struct platform_device *pdev)return -ENOMEM ; } +/* try to get a proper base address, fall back to S3C_VA_TIMER */ + s3c->base =S3C_VA_TIMER ; + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (res) + s3c->base =devm_ioremap (dev, res->start,resource_size (res)); +/* calculate base of control bits in TCON */ s3c->tcon_base = id ==0 ?0 : (id *4 ) +4 ; s3c->pwm_id = id;
@@ -245,9 +269,9 @@ static int s3c_pwm_probe(struct platform_device *pdev)local_irq_save (flags); - tcon =__raw_readl (S3C2410_TCON ); + tcon =readl_relaxed (s3c->base +S3C2410_TCON ); tcon |=pwm_tcon_invert (s3c); -__raw_writel (tcon,S3C2410_TCON ); +writel_relaxed (tcon, s3c->base +S3C2410_TCON );local_irq_restore (flags);
@@ -258,7 +282,7 @@ static int s3c_pwm_probe(struct platform_device *pdev) }pwm_dbg (s3c,"config bits %02x\n" , - (__raw_readl (S3C2410_TCON ) >> s3c->tcon_base) &0x0f ); + (readl_relaxed (s3c->base +S3C2410_TCON ) >> s3c->tcon_base) &0x0f ); dev_info(dev, "tin at %lu, tdiv at %lu, tin=%sclk, base %d\n", clk_get_rate(s3c->clk),
@@ -310,9 +334,9 @@ static int s3c_pwm_resume(struct platform_device *pdev)unsigned long tcon;/* Restore invertion */ - tcon =__raw_readl (S3C2410_TCON ); + tcon =readl_relaxed (s3c->base +S3C2410_TCON ); tcon |=pwm_tcon_invert (s3c); -__raw_writel (tcon,S3C2410_TCON ); +writel_relaxed (tcon, s3c->base +S3C2410_TCON );return 0 ; }
Signature · 1 line
1.8.1.2
Re: [PATCH 17/30] pwm: samsung: repair the worst MMIO abuses
Quoted 14 lines · Arnd Bergmann
The Samsung PWM driver uses "magic" pointers that are mapped at boot time to point its MMIO registers. This fails horribly with a multiplatform kernel, which can not rely on platform specific header files to contain the right values, aside from this being a really bad idea in general.
This changes the driver to at least pass an
__iomemtoken around in the device structure to dereference that. Fixing the platform code is much harder, so we'll leave that until we have a DT binding for pwm-samsung, which may require other changes in this area. Since we are already touching every MMIO accessor in this driver, let's also use the properreadl_relaxedvariant rather than__raw_readl.
Quoted 2 lines
Tomasz Figa has a set of patches to clean this up in a proper way, but that might be too late for 3.10.
Joonyoung Shim (Cc'ed) posted a driver for Exynos back in December. I had a few comments on it but never saw an updated version. Is Tomasz' work based on that patch?
Given that this patch solves a real problem and doesn't make things any worse, I think it's okay to use it temporarily until Tomasz has had time to finish up the proper driver, so:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130412/30629483/attachment.sig>
Re: [PATCH 17/30] pwm: samsung: repair the worst MMIO abuses
Quoted 15 lines · On Friday 12 of April 2013 09:06:35 Thierry Reding wrote:
Quoted 14 lines · Arnd Bergmann
The Samsung PWM driver uses "magic" pointers that are mapped at boot time to point its MMIO registers. This fails horribly with a multiplatform kernel, which can not rely on platform specific header files to contain the right values, aside from this being a really bad idea in general.
This changes the driver to at least pass an
__iomemtoken around in the device structure to dereference that. Fixing the platform code is much harder, so we'll leave that until we have a DT binding for pwm-samsung, which may require other changes in this area. Since we are already touching every MMIO accessor in this driver, let's also use the properreadl_relaxedvariant rather than__raw_readl.
Quoted 6 lines
Quoted 2 lines
Tomasz Figa has a set of patches to clean this up in a proper way, but that might be too late for 3.10.
Joonyoung Shim (Cc'ed) posted a driver for Exynos back in December. I had a few comments on it but never saw an updated version. Is Tomasz' work based on that patch?
Is this the patch you are talking about?
https://lkml.org/lkml/2012/12/13/84
If yes, it solves the problems only for Exynos SoCs (excluding Exynos 4210 rev0), which don't need to share the PWM hardware between two drivers.
On older platforms (S3C24xx, S3C64xx, S5P64x0, S5PC100, S5PV210 and Exynos 4210 rev0) the same hardware block is used for two drivers - clocksource driver and PWM driver.
You can get more information from these two threads:
- http://thread.gmane.org/gmane.linux.kernel.samsung-soc/16480/focus=16510
(starting from the linked post)
- http://thread.gmane.org/gmane.linux.kernel.samsung-soc/17464
Quoted 3 lines
Given that this patch solves a real problem and doesn't make things any worse, I think it's okay to use it temporarily until Tomasz has had time to finish up the proper driver, so:
Well, from what I've seen, the PWM might have been already broken on non- DT platforms using channels higher than 0, because the driver registers each channel passing -1 as base, which makes the id being assigned dynamically (usually to 0, since it's the only PWM channel used), while in all platform data, the real (hardware) PWM channel id is used and no PWM lookup is registered.
You can use the following grep to find all platforms with broken PWM:
git grep pwm_id arch/arm/mach-s[35]* | grep -v "= 0"
I have a set of patches to fix everything up in the PWM driver, but they depend on my patches providing the infrastructure to share the PWM hardware, on next version of which I'm currently working.
So, for now, Arnd's patch is fine to me as well.
Best regards,
Tomasz
PATCH 18/30 ASoC: samsung: move plat/ headers to local directory
In reply to Arnd BergmannThe plat/iis.h and plat/ac97.h files in the samsung platform are only needed by the ASoC drivers, so they can be moved into the same directory, as one more step towards a multiplatform build.
---
arch/arm/mach-s3c24xx/dma-s3c2410.c | 2 --
arch/arm/mach-s3c24xx/dma-s3c2412.c | 2 --
arch/arm/mach-s3c24xx/dma-s3c2440.c | 2 --
arch/arm/mach-s3c24xx/dma-s3c2443.c | 2 --
sound/soc/samsung/ac97.c | 2 +-
sound/soc/samsung/h1940_uda1380.c | 2 +-
sound/soc/samsung/neo1973_wm8753.c | 2 +-
{arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-ac97.h | 0
{arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-iis.h | 0
sound/soc/samsung/rx1950_uda1380.c | 2 +-
sound/soc/samsung/s3c24xx-i2s.c | 2 +-
sound/soc/samsung/s3c24xx_uda134x.c | 2 +-
12 files changed, 6 insertions(+), 14 deletions(-)
rename {arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-ac97.h (100%)
rename {arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-iis.h (100%)arch/arm/mach-s3c24xx/dma-s3c2410.c +0 -2
@@ -25,10 +25,8 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = {
arch/arm/mach-s3c24xx/dma-s3c2412.c +0 -2
@@ -25,10 +25,8 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> #define MAP (x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID }
arch/arm/mach-s3c24xx/dma-s3c2440.c +0 -2
@@ -25,10 +25,8 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> static struct s3c24xx_dma_map __initdata s3c2440_dma_mappings[] = {
arch/arm/mach-s3c24xx/dma-s3c2443.c +0 -2
@@ -25,10 +25,8 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> #define MAP (x) { \
sound/soc/samsung/ac97.c +1 -1
@@ -20,7 +20,7 @@#include <sound/soc.h> #include <mach/dma.h> -#include <plat/regs-ac97.h> +#include "regs-ac97.h" #include <linux/platform_data/asoc-s3c.h> #include "dma.h"
sound/soc/samsung/h1940_uda1380.c +1 -1
@@ -20,7 +20,7 @@#include <sound/soc.h> #include <sound/jack.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include <asm/mach-types.h> #include "s3c24xx-i2s.h"
sound/soc/samsung/neo1973_wm8753.c +1 -1
@@ -21,7 +21,7 @@#include <sound/soc.h> #include <asm/mach-types.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include <mach/gta02.h> #include "../codecs/wm8753.h"
sound/soc/samsung/regs-ac97.h renamed from arch/arm/plat-samsung/include/plat/regs-ac97.h +0 -0
sound/soc/samsung/regs-iis.h renamed from arch/arm/plat-samsung/include/plat/regs-iis.h +0 -0
sound/soc/samsung/rx1950_uda1380.c +1 -1
@@ -24,7 +24,7 @@#include <sound/soc.h> #include <sound/jack.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include <asm/mach-types.h> #include "s3c24xx-i2s.h"
sound/soc/samsung/s3c24xx-i2s.c +1 -1
@@ -24,7 +24,7 @@#include <sound/pcm_params.h> #include <mach/dma.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include "dma.h" #include "s3c24xx-i2s.h"
sound/soc/samsung/s3c24xx_uda134x.c +1 -1
@@ -18,7 +18,7 @@#include <sound/soc.h> #include <sound/s3c24xx_uda134x.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include "s3c24xx-i2s.h"
Signature · 1 line
1.8.1.2
Re: [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
Quoted 3 lines · Arnd Bergmann
The
plat/iis.handplat/ac97.hfiles in the samsung platform are only needed by the ASoC drivers, so they can be moved into the same directory, as one more step towards a multiplatform build.
This doesn't apply to my topic/samsung branch, can you please regenerate it against that or let me know what to apply it against?
Re: [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
Quoted 8 lines · Mark Brown
Quoted 3 lines · Arnd Bergmann
The
plat/iis.handplat/ac97.hfiles in the samsung platform are only needed by the ASoC drivers, so they can be moved into the same directory, as one more step towards a multiplatform build.This doesn't apply to my topic/samsung branch, can you please regenerate it against that or let me know what to apply it against?
This one should work. Unfortunately I now found during testing that the s3c24xx sound support has a few build errors at the moment, but this patch should not add any new ones:
/git/arm-soc/sound/soc/samsung/idma.c: In function 'idma_close':
/git/arm-soc/sound/soc/samsung/idma.c:327:11: error: 'IRQ_I2S0' undeclared (first use in this function)
free_irq(IRQ_I2S0, prtd);
^make[5]: *** [sound/soc/samsung/idma.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [sound/soc/samsung/i2s.o] Error 1 /git/arm-soc/sound/soc/samsung/neo1973_wm8753.c:25:24: fatal error: mach/gta02.h: No such file or directory
#include <mach/gta02.h>
^
Arnd8<----
Quoted 1 line
From
91cb290e665b10d094729a42f9e676e2de154996Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Sat, 16 Mar 2013 09:10:15 +0100
Subject: [PATCH] ASoC: samsung: move plat/ headers to local directory
The plat/regs-iis.h and plat/regs-ac97.h files in the samsung platform are only needed by the ASoC drivers, so they can be moved into the same directory, as one more step towards a multiplatform build.
arch/arm/mach-s3c24xx/dma-s3c2410.c +0 -2
@@ -25,11 +25,9 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> #include <mach/regs-sdi.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = {
arch/arm/mach-s3c24xx/dma-s3c2412.c +0 -2
@@ -25,11 +25,9 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> #include <mach/regs-sdi.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> #define MAP (x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID }
arch/arm/mach-s3c24xx/dma-s3c2440.c +0 -2
@@ -25,11 +25,9 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> #include <mach/regs-sdi.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> static struct s3c24xx_dma_map __initdata s3c2440_dma_mappings[] = {
arch/arm/mach-s3c24xx/dma-s3c2443.c +0 -2
@@ -25,11 +25,9 @@#include <plat/regs-serial.h> #include <mach/regs-gpio.h> -#include <plat/regs-ac97.h> #include <plat/regs-dma.h> #include <mach/regs-lcd.h> #include <mach/regs-sdi.h> -#include <plat/regs-iis.h> #include <plat/regs-spi.h> #define MAP (x) { \
sound/soc/samsung/ac97.c +1 -1
@@ -20,7 +20,7 @@#include <sound/soc.h> #include <mach/dma.h> -#include <plat/regs-ac97.h> +#include "regs-ac97.h" #include <linux/platform_data/asoc-s3c.h> #include "dma.h"
sound/soc/samsung/h1940_uda1380.c +1 -1
@@ -20,7 +20,7 @@#include <sound/soc.h> #include <sound/jack.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include <asm/mach-types.h> #include "s3c24xx-i2s.h"
sound/soc/samsung/neo1973_wm8753.c +1 -1
@@ -21,7 +21,7 @@#include <sound/soc.h> #include <asm/mach-types.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include <mach/gta02.h> #include "../codecs/wm8753.h"
sound/soc/samsung/regs-ac97.h renamed from arch/arm/plat-samsung/include/plat/regs-ac97.h +0 -0
sound/soc/samsung/regs-iis.h renamed from arch/arm/plat-samsung/include/plat/regs-iis.h +0 -0
sound/soc/samsung/rx1950_uda1380.c +1 -1
@@ -24,7 +24,7 @@#include <sound/soc.h> #include <sound/jack.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include <asm/mach-types.h> #include "s3c24xx-i2s.h"
sound/soc/samsung/s3c24xx-i2s.c +1 -1
@@ -24,7 +24,7 @@#include <sound/pcm_params.h> #include <mach/dma.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include "dma.h" #include "s3c24xx-i2s.h"
sound/soc/samsung/s3c24xx_uda134x.c +1 -1
@@ -18,7 +18,7 @@#include <sound/soc.h> #include <sound/s3c24xx_uda134x.h> -#include <plat/regs-iis.h> +#include "regs-iis.h" #include "s3c24xx-i2s.h"
Re: [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
Quoted 8 lines · Arnd Bergmann
Quoted 2 lines · Mark Brown
This doesn't apply to my topic/samsung branch, can you please regenerate it against that or let me know what to apply it against?
This one should work. Unfortunately I now found during testing that the s3c24xx sound support has a few build errors at the moment, but this patch should not add any new ones:
Applied (after hand editing the commit message), thanks.
Quoted 3 lines
make[5]: *** [
sound/soc/samsung/i2s.o] Error 1 /git/arm-soc/sound/soc/samsung/neo1973_wm8753.c:25:24: fatal error:mach/gta02.h: No such file or directory
#include <mach/gta02.h>
Hrm, someone killed GTA02 support? That's sad... if that's really the case we could kill the machine driver but not tonight as I'm running late...
PATCH 1/1 ASoC: samsung: fix neo1973-wm8753 compilation
Commit b2ca78717cea (ARM: S3C24XX: make gta02.h local) already replaced the GTA02_GPIO_* constants in neo1973-wm8753.c but forgot to remove the inclusion of mach/gta02.h before moving the file out of mach/.
--- sound/soc/samsung/neo1973_wm8753.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
sound/soc/samsung/neo1973_wm8753.c +0 -1
@@ -22,7 +22,6 @@#include <asm/mach-types.h> #include <plat/regs-iis.h> -#include <mach/gta02.h> #include "../codecs/wm8753.h" #include "s3c24xx-i2s.h"
Signature · 1 line
1.7.2.3
Mark Brown
AppliedRe: [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation
Quoted 3 lines · Heiko Stübner
Commit
b2ca78717cea(ARM: S3C24XX: makegta02.hlocal) already replaced the GTA02_GPIO_* constants inneo1973-wm8753.cbut forgot to remove the inclusion ofmach/gta02.hbefore moving the file out of mach/.
Applied, thanks.
Re: [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
In reply to Mark BrownQuoted 12 lines · Mark Brown
Quoted 8 lines · Arnd Bergmann
Quoted 2 lines · Mark Brown
This doesn't apply to my topic/samsung branch, can you please regenerate it against that or let me know what to apply it against?
This one should work. Unfortunately I now found during testing that the s3c24xx sound support has a few build errors at the moment, but this patch should not add any new ones:
Applied (after hand editing the commit message), thanks.
Quoted 7 lines
Quoted 3 lines
make[5]: *** [
sound/soc/samsung/i2s.o] Error 1 /git/arm-soc/sound/soc/samsung/neo1973_wm8753.c:25:24: fatal error:mach/gta02.h: No such file or directory
#include <mach/gta02.h>Hrm, someone killed GTA02 support? That's sad... if that's really the case we could kill the machine driver but not tonight as I'm running late...
I think the file was moved, we should pull over the audio relevant GPIO definitions into the ASoC board driver.
- Lars
Re: [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
Quoted 8 lines · Lars-Peter Clausen
Quoted 3 lines · Mark Brown
Hrm, someone killed GTA02 support? That's sad... if that's really the case we could kill the machine driver but not tonight as I'm running late...
I think the file was moved, we should pull over the audio relevant GPIO definitions into the ASoC board driver.
Yeah, so I see - Heiko sent a patch fixing this.
PATCH 19/30 ASoC: samsung: use irq resource for idma
In reply to Arnd BergmannWith multiplatform kernels, we cannot use hardwired IRQ numbers in device drivers. This changes the idma driver to use a proper resource, like all other drivers do.
--- arch/arm/plat-samsung/devs.c | 6 ++++++ sound/soc/samsung/idma.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-)
arch/arm/plat-samsung/devs.c +6 -0
@@ -145,14 +145,20 @@ struct platform_device s3c_device_camif = {/* ASOC DMA */ +#ifdef CONFIG_PLAT_S5P +static struct resource samsung_asoc_idma_resource =DEFINE_RES_IRQ (IRQ_I2S0 ); +struct platform_device samsung_asoc_idma = { .name ="samsung-idma" , .id =-1 , + .num_resources =1 , + .resource = &samsung_asoc_idma_resource, .dev = { .dma_mask = &samsung_device_dma_mask, .coherent_dma_mask =DMA_BIT_MASK (32 ), } }; +#endif /* FB */
sound/soc/samsung/idma.c +8 -2
@@ -68,6 +68,8 @@ static struct idma_info {dma_addr_t lp_tx_addr; } idma; +static int idma_irq; +static void idma_getpos (dma_addr_t *src) { *src = idma.lp_tx_addr +
@@ -305,7 +307,7 @@ static int idma_open(struct snd_pcm_substream *substream)if (prtd ==NULL )return -ENOMEM ; - ret =request_irq (IRQ_I2S0 , iis_irq,0 ,"i2s" , prtd); + ret =request_irq (idma_irq, iis_irq,0 ,"i2s" , prtd);if (ret <0 ) {pr_err ("fail to claim i2s irq , ret = %d\n" , ret);kfree (prtd);
@@ -324,7 +326,7 @@ static int idma_close(struct snd_pcm_substream *substream)struct snd_pcm_runtime *runtime = substream->runtime;struct idma_ctrl *prtd = runtime->private_data; -free_irq (IRQ_I2S0 , prtd); +free_irq (idma_irq, prtd);if (!prtd)pr_err ("idma_close called with prtd == NULL\n" );
@@ -418,6 +420,10 @@ static struct snd_soc_platform_driver asoc_idma_platform = {static int asoc_idma_platform_probe (struct platform_device *pdev) { + idma_irq =platform_get_irq (pdev,0 ); +if (idma_irq <0 ) +return idma_irq; +return snd_soc_register_platform (&pdev->dev, &asoc_idma_platform); }
Signature · 1 line
1.8.1.2
Mark Brown
AppliedRe: [PATCH 19/30] ASoC: samsung: use irq resource for idma
Quoted 3 lines · Arnd Bergmann
With multiplatform kernels, we cannot use hardwired IRQ numbers in device drivers. This changes the idma driver to use a proper resource, like all other drivers do.
Applied, thanks.
PATCH 20/30 ASoC: samsung: convert to dmaengine API
In reply to Arnd BergmannIn order to build the exynos kernel with CONFIG_ARCH_MULTIPLATFORM, we must convert all users of the Samsung private DMA interface to the generic dmaengine API. This version of the patch adds the generic dmaengine API as an alternative to the existing samsung specific one. Once all the older platforms provide support for the common dmaengine interfaces, we can remove the old code.
--- sound/soc/samsung/dma.c | 219 ++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/samsung/dma.h | 15 +++- sound/soc/samsung/i2s.c | 2 - sound/soc/samsung/pcm.c | 1 - sound/soc/samsung/spdif.c | 1 - 5 files changed, 232 insertions(+), 6 deletions(-)
sound/soc/samsung/dma.c +219 -0
@@ -22,8 +22,14 @@#include <sound/pcm_params.h> #include <asm/dma.h> + +#ifdef CONFIG_SAMSUNG_DMADEV #include <mach/hardware.h> #include <mach/dma.h> +#else +#include <linux/dmaengine.h> +#include <linux/amba/pl330.h> +#endif #include "dma.h"
@@ -62,11 +68,13 @@ struct runtime_data {static void audio_buffdone (void *data); +#ifdef CONFIG_SAMSUNG_DMADEV /* dma_enqueue * * place a dma buffer onto the queue for the dma system * to handle. */ +static void dma_enqueue (struct snd_pcm_substream *substream) {struct runtime_data *prtd = substream->runtime->private_data;
@@ -265,6 +273,217 @@ static int dma_trigger(struct snd_pcm_substream *substream, int cmd)return ret; } +#else +/* dma_enqueue +* +* place a dma buffer onto the queue for the dma system +* to handle. +*/ + +static void dma_enqueue (struct snd_pcm_substream *substream) +{ +struct runtime_data *prtd = substream->runtime->private_data; +dma_addr_t pos = prtd->dma_pos; +unsigned long period = prtd->dma_period; +unsigned int limit; +enum dma_transfer_direction direction; +struct dma_chan *chan = prtd->params->ch; +struct dma_async_tx_descriptor *desc; + +pr_debug ("Entered %s\n" , __func__); + + limit = (prtd->dma_end - prtd->dma_start) / prtd->dma_period; + +pr_debug ("%s: loaded %d, limit %d\n" , + __func__, prtd->dma_loaded, limit); + + direction = (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK + ?DMA_MEM_TO_DEV :DMA_DEV_TO_MEM ); + +while (prtd->dma_loaded < limit) { +pr_debug ("dma_loaded: %d\n" , prtd->dma_loaded); + +if ((pos + period) > prtd->dma_end) { + period = prtd->dma_end - pos; +pr_debug ("%s: corrected dma len %ld\n" , + __func__, period); + } + + desc =dmaengine_prep_dma_cyclic (chan, pos, + prtd->dma_period*limit, period, direction, +DMA_PREP_INTERRUPT |DMA_CTRL_ACK ); + +if (desc) { + desc->callback = audio_buffdone; + desc->callback_param = substream; +dmaengine_submit (desc); + } + + prtd->dma_loaded++; + pos += period; +if (pos >= prtd->dma_end) + pos = prtd->dma_start; + } + + prtd->dma_pos = pos; +} + +static void audio_buffdone (void *data) +{ +struct snd_pcm_substream *substream = data; +struct runtime_data *prtd = substream->runtime->private_data; + +pr_debug ("Entered %s\n" , __func__); + +if (prtd->state &ST_RUNNING ) { + prtd->dma_pos += prtd->dma_period; +if (prtd->dma_pos >= prtd->dma_end) + prtd->dma_pos = prtd->dma_start; + +if (substream) +snd_pcm_period_elapsed (substream); + } +} + +static int dma_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params) +{ +struct snd_pcm_runtime *runtime = substream->runtime; +struct runtime_data *prtd = runtime->private_data; +struct snd_soc_pcm_runtime *rtd = substream->private_data; +unsigned long totbytes =params_buffer_bytes (params); +struct s3c_dma_params *dma = +snd_soc_dai_get_dma_data (rtd->cpu_dai, substream); + +pr_debug ("Entered %s\n" , __func__); + +/* return if this is a bufferless transfer e.g. +* codec <--> BT codec or GSM modem -- lg FIXME */ +if (!dma) +return 0 ; + +/* this may get called several times by oss emulation +* with different params -HW */ +if (prtd->params ==NULL ) { +struct dma_slave_config config; +dma_cap_mask_t mask; + +/* prepare DMA */ + prtd->params = dma; + +pr_debug ("params %p, channel %d\n" , prtd->params, + prtd->params->channel); + +dma_cap_zero (mask); +dma_cap_set (DMA_CYCLIC , mask); + + prtd->params->ch =dma_request_slave_channel_compat (mask, + pl330_filter, (void *)prtd->params->channel, + rtd->cpu_dai->dev, prtd->params->ch_name); + +memset (&config,0 ,sizeof (struct dma_slave_config )); + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) { + config.direction =DMA_MEM_TO_DEV ; + config.dst_addr = prtd->params->dma_addr; + config.dst_addr_width = prtd->params->dma_size; + config.dst_maxburst =1 ; +dmaengine_slave_config (prtd->params->ch, &config); + }else { + config.direction =DMA_DEV_TO_MEM ; + config.src_addr = prtd->params->dma_addr; + config.src_addr_width = prtd->params->dma_size; + config.src_maxburst =1 ; +dmaengine_slave_config (prtd->params->ch, &config); + } + } + +snd_pcm_set_runtime_buffer (substream, &substream->dma_buffer); + + runtime->dma_bytes = totbytes; + +spin_lock_irq (&prtd->lock); + prtd->dma_loaded =0 ; + prtd->dma_period =params_period_bytes (params); + prtd->dma_start = runtime->dma_addr; + prtd->dma_pos = prtd->dma_start; + prtd->dma_end = prtd->dma_start + totbytes; +spin_unlock_irq (&prtd->lock); + +return 0 ; +} + +static int dma_hw_free (struct snd_pcm_substream *substream) +{ +struct runtime_data *prtd = substream->runtime->private_data; + +pr_debug ("Entered %s\n" , __func__); + +snd_pcm_set_runtime_buffer (substream,NULL ); + +if (prtd->params) { +dmaengine_terminate_all (prtd->params->ch); +dma_release_channel (prtd->params->ch); + prtd->params =NULL ; + } + +return 0 ; +} + +static int dma_prepare (struct snd_pcm_substream *substream) +{ +struct runtime_data *prtd = substream->runtime->private_data; +int ret =0 ; + +pr_debug ("Entered %s\n" , __func__); + +/* return if this is a bufferless transfer e.g. +* codec <--> BT codec or GSM modem -- lg FIXME */ +if (!prtd->params) +return 0 ; + +/* flush the DMA channel */ +dmaengine_terminate_all (prtd->params->ch); + + prtd->dma_loaded =0 ; + prtd->dma_pos = prtd->dma_start; + +/* enqueue dma buffers */ +dma_enqueue (substream); + +return ret; +} + +static int dma_trigger (struct snd_pcm_substream *substream,int cmd) +{ +struct runtime_data *prtd = substream->runtime->private_data; +int ret =0 ; + +pr_debug ("Entered %s\n" , __func__); + +spin_lock (&prtd->lock); + +switch (cmd) { +case SNDRV_PCM_TRIGGER_START : + prtd->state |=ST_RUNNING ; +dma_async_issue_pending (prtd->params->ch); +break ; + +case SNDRV_PCM_TRIGGER_STOP : + prtd->state &= ~ST_RUNNING ; +dmaengine_terminate_all (prtd->params->ch); +break ; + +default : + ret = -EINVAL ; +break ; + } + +spin_unlock (&prtd->lock); + +return ret; +} +#endif static snd_pcm_uframes_t dma_pointer (struct snd_pcm_substream *substream)
sound/soc/samsung/dma.h +13 -2
@@ -12,13 +12,24 @@#ifndef _S3C_AUDIO_H#define _S3C_AUDIO_H +#ifdef CONFIG_SAMSUNG_DMADEV +#include <mach/dma.h> +#endif +struct s3c_dma_params { +#ifdef CONFIG_SAMSUNG_DMADEV struct s3c2410_dma_client *client;/* stream identifier */ +unsigned ch; +struct samsung_dma_ops *ops; +#else +struct s3c2410_dma_client { +char *name;/* unused */ + } *client; +struct dma_chan *ch; +#endif int channel;/* Channel ID */ dma_addr_t dma_addr;int dma_size;/* Size of the DMA transfer */ -unsigned ch; -struct samsung_dma_ops *ops;char *ch_name; };
sound/soc/samsung/i2s.c +0 -2
@@ -22,8 +22,6 @@#include <sound/soc.h> #include <sound/pcm_params.h> -#include <mach/dma.h> -#include <linux/platform_data/asoc-s3c.h> #include "dma.h"
sound/soc/samsung/pcm.c +0 -1
@@ -20,7 +20,6 @@#include <sound/pcm_params.h> #include <linux/platform_data/asoc-s3c.h> -#include <mach/dma.h> #include "dma.h" #include "pcm.h"
sound/soc/samsung/spdif.c +0 -1
@@ -18,7 +18,6 @@#include <sound/pcm_params.h> #include <linux/platform_data/asoc-s3c.h> -#include <mach/dma.h> #include "dma.h" #include "spdif.h"
Signature · 1 line
1.8.1.2
Re: [PATCH 20/30] ASoC: samsung: convert to dmaengine API
Quoted 6 lines · Arnd Bergmann
In order to build the exynos kernel with
CONFIG_ARCH_MULTIPLATFORM, we must convert all users of the Samsung private DMA interface to the generic dmaengine API. This version of the patch adds the generic dmaengine API as an alternative to the existing samsung specific one. Once all the older platforms provide support for the common dmaengine interfaces, we can remove the old code.
There's generic ASoC dmaengine code which should be used instead of open coding this. Lars-Peter Clausen and Lee Jones have been working on making this a totally generic driver, right now it's a library.
Re: [PATCH 20/30] ASoC: samsung: convert to dmaengine API
Quoted 9 lines · Mark Brown
Quoted 6 lines · Arnd Bergmann
In order to build the exynos kernel with
CONFIG_ARCH_MULTIPLATFORM, we must convert all users of the Samsung private DMA interface to the generic dmaengine API. This version of the patch adds the generic dmaengine API as an alternative to the existing samsung specific one. Once all the older platforms provide support for the common dmaengine interfaces, we can remove the old code.
Quoted 3 lines
There's generic ASoC dmaengine code which should be used instead of open coding this. Lars-Peter Clausen and Lee Jones have been working on making this a totally generic driver, right now it's a library.
Ok, I see. I'll drop this patch from my series then and will let someone else handle this driver in 3.11. We can probably live without sound support in 3.10 when running a multiplatform kernel, and it will keep working for exynos-only kernels without the patch.
Can you have a look at the other three ASoC patches in the series? I think it would still be useful to merge them.
Arnd
Re: [PATCH 20/30] ASoC: samsung: convert to dmaengine API
Quoted 2 lines · Arnd Bergmann
Can you have a look at the other three ASoC patches in the series? I think it would still be useful to merge them.
Yeah, they looked fine - just waiting for me to do a patch run. Should get to it shortly.
Re: [alsa-devel] [PATCH 20/30] ASoC: samsung: convert to dmaengine API
In reply to Arnd BergmannQuoted 10 lines · Arnd Bergmann
Quoted 9 lines · Mark Brown
Quoted 6 lines · Arnd Bergmann
In order to build the exynos kernel with
CONFIG_ARCH_MULTIPLATFORM, we must convert all users of the Samsung private DMA interface to the generic dmaengine API. This version of the patch adds the generic dmaengine API as an alternative to the existing samsung specific one. Once all the older platforms provide support for the common dmaengine interfaces, we can remove the old code.
Quoted 8 lines
Quoted 3 lines
There's generic ASoC dmaengine code which should be used instead of open coding this. Lars-Peter Clausen and Lee Jones have been working on making this a totally generic driver, right now it's a library.
Ok, I see. I'll drop this patch from my series then and will let someone else handle this driver in 3.11. We can probably live without sound support in 3.10 when running a multiplatform kernel, and it will keep working for exynos-only kernels without the patch.
I actually had a look at how the Samsung PCM driver a couple of days back, but I didn't fully grasp how things work with the secondary TX channel for the i2s driver and to make it work with the generic dmaengine PCM driver. The code handling this in the i2s driver seems to be rather messy with lots of ifs and elses. Also things would have would be a lot easier if the dt bindings had used two subnodes each with their own 'dmas' property.
- Lars
Mark Brown
maintainerRe: [alsa-devel] [PATCH 20/30] ASoC: samsung: convert to dmaengine API
Quoted 6 lines · Lars-Peter Clausen
I actually had a look at how the Samsung PCM driver a couple of days back, but I didn't fully grasp how things work with the secondary TX channel for the i2s driver and to make it work with the generic dmaengine PCM driver. The code handling this in the i2s driver seems to be rather messy with lots of ifs and elses. Also things would have would be a lot easier if the dt bindings had used two subnodes each with their own 'dmas' property.
Yeah, it's quite messy at the minute as it predates any subsystem support for things like multiple DMA channels going into a single DAI on an AP so it was having to do things it really shouldn't have done. What ought to happen is that the driver gets refactored to use soc-pcm or change to represent the mixer block as a CODEC, I think if that happens then things ought to get easier.
PATCH 21/30 ASoC: samsung/i2s: fix module_device_table
In reply to Arnd BergmannThe second argument to the module_device_table macro must be the name of the device id array. In the samsung i2s driver, there was a small typo, resulting in a build error when building it as a loadable module.
--- sound/soc/samsung/i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/samsung/i2s.c +1 -1
@@ -1289,7 +1289,7 @@ static struct platform_device_id samsung_i2s_driver_ids[] = { }, {}, }; -MODULE_DEVICE_TABLE (platform, samsung-i2s-driver-ids); +MODULE_DEVICE_TABLE (platform, samsung_i2s_driver_ids);#ifdef CONFIG_OF static struct samsung_i2s_dai_data samsung_i2s_dai_data_array[] = {
Signature · 1 line
1.8.1.2
Mark Brown
AppliedRe: [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table
Quoted 4 lines · Arnd Bergmann
The second argument to the
module_device_tablemacro must be the name of the device id array. In the samsung i2s driver, there was a small typo, resulting in a build error when building it as a loadable module.
Applied, thanks.
PATCH 22/30 ASoC: samsung/idma: export idma_reg_addr_init
In reply to Arnd BergmannThe idma_reg_addr_init function is used by the samsung i2s driver, which can be a loadable module, so we have to export this function.
--- sound/soc/samsung/idma.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/samsung/idma.c +1 -0
@@ -411,6 +411,7 @@ void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr) idma.regs = regs; idma.lp_tx_addr = addr; } +EXPORT_SYMBOL_GPL (idma_reg_addr_init);static struct snd_soc_platform_driver asoc_idma_platform = { .ops = &idma_ops,
Signature · 1 line
1.8.1.2
Mark Brown
AppliedRe: [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init
Quoted 2 lines · Arnd Bergmann
The
idma_reg_addr_initfunction is used by the samsung i2s driver, which can be a loadable module, so we have to export this function.
Applied, thanks.
PATCH 23/30 clk: exynos: prepare for multiplatform
In reply to Arnd BergmannThe new common clock drivers for exynos are using compile time constants and soc_is_exynos* macros to provide backwards compatibility for pre-DT systems, which is not possible with multiplatform kernels. This moves all the necessary information back into platform code and removes the mach/* header inclusions.
--- arch/arm/mach-exynos/common.c | 2 +- arch/arm/mach-exynos/common.h | 2 +- drivers/clk/samsung/clk-exynos4.c | 93 ++++++++++++++++-------------------- drivers/clk/samsung/clk-exynos5250.c | 1 - drivers/clk/samsung/clk-exynos5440.c | 1 - drivers/clk/samsung/clk.h | 2 - 6 files changed, 44 insertions(+), 57 deletions(-)
arch/arm/mach-exynos/common.c +1 -1
@@ -445,7 +445,7 @@ void __init exynos_init_time(void) }else {/* todo: remove after migrating legacy E4 platforms to dt */ #ifdef CONFIG_ARCH_EXYNOS4 -exynos4_clk_init (NULL ); +exynos4_clk_init (NULL , !soc_is_exynos4210 (),S5P_VA_CMU ,readl (S5P_VA_CHIPID +8 ) &1 );exynos4_clk_register_fixed_ext (xxti_f, xusbxti_f);#endif mct_init ();
arch/arm/mach-exynos/common.h +1 -1
@@ -27,7 +27,7 @@ void exynos5_restart(char mode, const char *cmd);void exynos_init_late (void );/* ToDo: remove these after migrating legacy exynos4 platforms to dt */ -void exynos4_clk_init (struct device_node *np); +void exynos4_clk_init (struct device_node *np,int is_exynos4210,void __iomem *reg_base,unsigned long xom);void exynos4_clk_register_fixed_ext (unsigned long ,unsigned long );void exynos_firmware_init (void );
drivers/clk/samsung/clk-exynos4.c +42 -51
146 lines not on this page · raw message
drivers/clk/samsung/clk-exynos5250.c +0 -1
@@ -16,7 +16,6 @@#include <linux/of.h> #include <linux/of_address.h> -#include <plat/cpu.h> #include "clk.h" #include "clk-pll.h"
drivers/clk/samsung/clk-exynos5440.c +0 -1
@@ -15,7 +15,6 @@#include <linux/of.h> #include <linux/of_address.h> -#include <plat/cpu.h> #include "clk.h" #include "clk-pll.h"
drivers/clk/samsung/clk.h +0 -2
@@ -20,8 +20,6 @@#include <linux/of.h> #include <linux/of_address.h> -#include <mach/map.h> -/** * struct samsung_clock_alias: information about mux clock * @id: platform specific id of the clock.
Signature · 1 line
1.8.1.2
PATCH 24/30 clocksource: exynos_mct: remove platform header dependency
In reply to Arnd BergmannFor the non-DT case, the mct_init() function requires access to a couple of platform specific constants, but cannot include the header files in case we are building for multiplatform.
This changes the interface to the platform so we pass all the necessary data as arguments to mct_init.
--- arch/arm/mach-exynos/common.c | 2 +- arch/arm/mach-exynos/common.h | 2 +- drivers/clocksource/exynos_mct.c | 21 ++++++--------------- 3 files changed, 8 insertions(+), 17 deletions(-)
arch/arm/mach-exynos/common.c +1 -1
@@ -448,7 +448,7 @@ void __init exynos_init_time(void)exynos4_clk_init (NULL , !soc_is_exynos4210 (),S5P_VA_CMU ,readl (S5P_VA_CHIPID +8 ) &1 );exynos4_clk_register_fixed_ext (xxti_f, xusbxti_f);#endif -mct_init (); +mct_init (S5P_VA_SYSTIMER ,EXYNOS4_IRQ_MCT_G0 ,EXYNOS4_IRQ_MCT_L0 ,EXYNOS4_IRQ_MCT_L1 ); } }
arch/arm/mach-exynos/common.h +1 -1
@@ -14,7 +14,7 @@#include <linux/of.h> -extern void mct_init (void ); +void mct_init (void __iomem *base,int irq_g0,int irq_l0,int irq_l1);void exynos_init_time (void );extern unsigned long xxti_f, xusbxti_f;
drivers/clocksource/exynos_mct.c +6 -15
@@ -26,11 +26,6 @@#include <asm/arch_timer.h> #include <asm/localtimer.h> - -#include <plat/cpu.h> - -#include <mach/map.h> -#include <mach/irqs.h> #include <asm/mach/time.h> #define EXYNOS4_MCTREG (x) (x)
@@ -511,18 +506,14 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem#endif /* CONFIG_LOCAL_TIMERS */ } -void __init mct_init (void ) +void __init mct_init (void __iomem *base,int irq_g0,int irq_l0,int irq_l1) { -if (soc_is_exynos4210 ()) { - mct_irqs[MCT_G0_IRQ ] =EXYNOS4_IRQ_MCT_G0 ; - mct_irqs[MCT_L0_IRQ ] =EXYNOS4_IRQ_MCT_L0 ; - mct_irqs[MCT_L1_IRQ ] =EXYNOS4_IRQ_MCT_L1 ; - mct_int_type =MCT_INT_SPI ; - }else { -panic ("unable to determine mct controller type\n" ); - } + mct_irqs[MCT_G0_IRQ ] = irq_g0; + mct_irqs[MCT_L0_IRQ ] = irq_l0; + mct_irqs[MCT_L1_IRQ ] = irq_l1; + mct_int_type =MCT_INT_SPI ; -exynos4_timer_resources (NULL ,S5P_VA_SYSTIMER ); +exynos4_timer_resources (NULL , base);exynos4_clocksource_init ();exynos4_clockevent_init (); }
Signature · 1 line
1.8.1.2
PATCH 25/30 irqchip: exynos: pass max combiner number to combiner_init
In reply to Arnd BergmannWe can find out the number of combined IRQs from the device tree, but in case of ATAGS boot, the driver currently uses hardcoded values based on the SoC type. We can't do that in general for a multiplatform kernel, so let's instead pass this information from platform code directly in case of ATAGS boot.
--- arch/arm/mach-exynos/common.c | 15 ++++++++++++- arch/arm/mach-exynos/common.h | 3 ++- drivers/irqchip/exynos-combiner.c | 46 ++++++++++++++------------------------- 3 files changed, 32 insertions(+), 32 deletions(-)
arch/arm/mach-exynos/common.c +14 -1
@@ -452,6 +452,19 @@ void __init exynos_init_time(void) } } +static unsigned int max_combiner_nr (void ) +{ +if (soc_is_exynos5250 ()) +return EXYNOS5_MAX_COMBINER_NR ; +else if (soc_is_exynos4412 ()) +return EXYNOS4412_MAX_COMBINER_NR ; +else if (soc_is_exynos4212 ()) +return EXYNOS4212_MAX_COMBINER_NR ; +else +return EXYNOS4210_MAX_COMBINER_NR ; +} + +void __init exynos4_init_irq (void ) {unsigned int gic_bank_offset;
@@ -466,7 +479,7 @@ void __init exynos4_init_irq(void)#endif if (!of_have_populated_dt ()) -combiner_init (S5P_VA_COMBINER_BASE ,NULL ); +combiner_init (S5P_VA_COMBINER_BASE ,NULL ,max_combiner_nr ());/* * The parameters of s5p_init_irq() are for VIC init.
arch/arm/mach-exynos/common.h +2 -1
@@ -71,7 +71,8 @@ void exynos4212_register_clocks(void);#endif struct device_node ; -void combiner_init (void __iomem *combiner_base,struct device_node *np); +void combiner_init (void __iomem *combiner_base,struct device_node *np, +unsigned int max_nr);extern struct smp_operations exynos_smp_ops;
drivers/irqchip/exynos-combiner.c +16 -30
94 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 26/30 irqchip: exynos: allocate combiner_data dynamically
In reply to Arnd BergmannThe number of combiners on a given SoC is a platform specific constant, and we cannot encode this number on a multiplatform kernel since the header file defining it is not available.
Allocating the structure dynamically ends up cleaner anyway since we keep all the data local.
--- drivers/irqchip/exynos-combiner.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-)
drivers/irqchip/exynos-combiner.c +23 -13
@@ -12,6 +12,7 @@#include <linux/export.h> #include <linux/init.h> #include <linux/io.h> +#include <linux/slab.h> #include <linux/irqdomain.h> #include <linux/irqchip/chained_irq.h> #include <linux/of_address.h>
@@ -38,7 +39,6 @@ struct combiner_chip_data { };static struct irq_domain *combiner_irq_domain; -static struct combiner_chip_data combiner_data[MAX_COMBINER_NR ];static inline void __iomem *combiner_base (struct irq_data *data) {
@@ -115,26 +115,26 @@ static struct irq_chip combiner_chip = {#endif }; -static void __init combiner_cascade_irq (unsigned int combiner_nr, +static void __init combiner_cascade_irq (struct combiner_chip_data *combiner_data,unsigned int irq) { -if (irq_set_handler_data (irq, &combiner_data[combiner_nr]) !=0 ) +if (irq_set_handler_data (irq, combiner_data) !=0 )BUG ();irq_set_chained_handler (irq, combiner_handle_cascade_irq); } -static void __init combiner_init_one (unsigned int combiner_nr, +static void __init combiner_init_one (struct combiner_chip_data *combiner_data, +unsigned int combiner_nr,void __iomem *base,unsigned int irq) { - combiner_data[combiner_nr].base = base; - combiner_data[combiner_nr].irq_offset =irq_find_mapping ( + combiner_data->base = base; + combiner_data->irq_offset =irq_find_mapping ( combiner_irq_domain, combiner_nr *IRQ_IN_COMBINER ); - combiner_data[combiner_nr].irq_mask =0xff << ((combiner_nr %4 ) <<3 ); - combiner_data[combiner_nr].parent_irq = irq; + combiner_data->irq_mask =0xff << ((combiner_nr %4 ) <<3 ); + combiner_data->parent_irq = irq;/* Disable all interrupts */ -__raw_writel (combiner_data[combiner_nr].irq_mask, - base +COMBINER_ENABLE_CLEAR ); +__raw_writel (combiner_data->irq_mask, base +COMBINER_ENABLE_CLEAR ); }#ifdef CONFIG_OF
@@ -169,6 +169,8 @@ static int combiner_irq_domain_xlate(struct irq_domain *d,static int combiner_irq_domain_map (struct irq_domain *d,unsigned int irq,irq_hw_number_t hw) { +struct combiner_chip_data *combiner_data = d->host_data; +irq_set_chip_and_handler (irq, &combiner_chip, handle_level_irq);irq_set_chip_data (irq, &combiner_data[hw >>3 ]);set_irq_flags (irq,IRQF_VALID |IRQF_PROBE );
@@ -203,6 +205,7 @@ void __init combiner_init(void __iomem *combiner_base, {int i, irq, irq_base;unsigned int nr_irq; +struct combiner_chip_data *combiner_data; nr_irq = max_nr *IRQ_IN_COMBINER ;
@@ -212,8 +215,14 @@ void __init combiner_init(void __iomem *combiner_base,pr_warning ("%s: irq desc alloc failed. Continuing with %d as linux irq base\n" , __func__, irq_base); } + combiner_data =kcalloc (max_nr,sizeof (*combiner_data),GFP_KERNEL ); +if (!combiner_data) { +pr_warning ("%s: could not allocate combiner data\n" , __func__); +return ; + } + combiner_irq_domain =irq_domain_add_legacy (np, nr_irq, irq_base,0 , - &combiner_irq_domain_ops, &combiner_data); + &combiner_irq_domain_ops, combiner_data);if (WARN_ON (!combiner_irq_domain)) {pr_warning ("%s: irq domain init failed\n" , __func__);return ;
@@ -228,8 +237,9 @@ void __init combiner_init(void __iomem *combiner_base,if (np) irq =irq_of_parse_and_map (np, i);#endif -combiner_init_one (i, combiner_base + (i >>2 ) *0x10 , irq); -combiner_cascade_irq (i, irq); +combiner_init_one (&combiner_data[i], i, + combiner_base + (i >>2 ) *0x10 , irq); +combiner_cascade_irq (&combiner_data[i], irq); } }
Signature · 1 line
1.8.1.2
PATCH 27/30 irqchip: exynos: localize irq lookup for ATAGS
In reply to Arnd BergmannThe IRQ_SPI() macro is not available in the driver when building with sparse IRQs or multiplatform, so let's move all users of this into one function that we can leave out when building DT-only.
--- drivers/irqchip/exynos-combiner.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
drivers/irqchip/exynos-combiner.c +12 -7
@@ -19,7 +19,9 @@#include <linux/of_irq.h> #include <asm/mach/irq.h> +#ifdef CONFIG_EXYNOS_ATAGS #include <plat/cpu.h> +#endif #include "irqchip.h"
@@ -183,8 +185,12 @@ static struct irq_domain_ops combiner_irq_domain_ops = { .map = combiner_irq_domain_map, }; -static unsigned int exynos4x12_combiner_extra_irq (int group) +static unsigned int combiner_lookup_irq (int group) { +#ifdef CONFIG_EXYNOS_ATAGS +if (group <EXYNOS4210_MAX_COMBINER_NR ||soc_is_exynos5250 ()) +return IRQ_SPI (group); +switch (group) {case 16 :return IRQ_SPI (107 );
@@ -194,9 +200,9 @@ static unsigned int exynos4x12_combiner_extra_irq(int group)return IRQ_SPI (48 );case 19 :return IRQ_SPI (42 ); -default : -return 0 ; } +#endif +return 0 ; } void __init combiner_init(void __iomem *combiner_base,
@@ -229,14 +235,13 @@ void __init combiner_init(void __iomem *combiner_base, }for (i =0 ; i < max_nr; i++) { -if (i <EXYNOS4210_MAX_COMBINER_NR ||soc_is_exynos5250 ()) - irq =IRQ_SPI (i); -else - irq =exynos4x12_combiner_extra_irq (i);#ifdef CONFIG_OF if (np) irq =irq_of_parse_and_map (np, i); + else#endif + irq =combiner_lookup_irq (i); +combiner_init_one (&combiner_data[i], i, combiner_base + (i >>2 ) *0x10 , irq);combiner_cascade_irq (&combiner_data[i], irq);
Signature · 1 line
1.8.1.2
PATCH 28/30 irqchip: exynos: pass irq_base from platform
In reply to Arnd BergmannThe platform code knows the IRQ base, while the irqchip driver should really not. This is a littly hacky because we still hardwire the IRQ base to 160 for the combiner in the DT case, when we should really use -1. Removing that line will cause a linear IRQ domain to be use, as we should.
--- arch/arm/mach-exynos/common.c | 3 ++- arch/arm/mach-exynos/common.h | 2 +- drivers/irqchip/exynos-combiner.c | 23 +++++++++++++---------- 3 files changed, 16 insertions(+), 12 deletions(-)
arch/arm/mach-exynos/common.c +2 -1
@@ -479,7 +479,8 @@ void __init exynos4_init_irq(void)#endif if (!of_have_populated_dt ()) -combiner_init (S5P_VA_COMBINER_BASE ,NULL ,max_combiner_nr ()); +combiner_init (S5P_VA_COMBINER_BASE ,NULL , +max_combiner_nr (),COMBINER_IRQ (0 ,0 ));/* * The parameters of s5p_init_irq() are for VIC init.
arch/arm/mach-exynos/common.h +1 -1
@@ -72,7 +72,7 @@ void exynos4212_register_clocks(void);struct device_node ;void combiner_init (void __iomem *combiner_base,struct device_node *np, -unsigned int max_nr); +unsigned int max_nr,int irq_base);extern struct smp_operations exynos_smp_ops;
drivers/irqchip/exynos-combiner.c +13 -10
@@ -207,27 +207,22 @@ static unsigned int combiner_lookup_irq(int group)void __init combiner_init (void __iomem *combiner_base,struct device_node *np, -unsigned int max_nr) +unsigned int max_nr, +int irq_base) { -int i, irq, irq_base; +int i, irq;unsigned int nr_irq;struct combiner_chip_data *combiner_data; nr_irq = max_nr *IRQ_IN_COMBINER ; - irq_base =irq_alloc_descs (COMBINER_IRQ (0 ,0 ),1 , nr_irq,0 ); -if (IS_ERR_VALUE (irq_base)) { - irq_base =COMBINER_IRQ (0 ,0 ); -pr_warning ("%s: irq desc alloc failed. Continuing with %d as linux irq base\n" , __func__, irq_base); - } - combiner_data =kcalloc (max_nr,sizeof (*combiner_data),GFP_KERNEL );if (!combiner_data) {pr_warning ("%s: could not allocate combiner data\n" , __func__);return ; } - combiner_irq_domain =irq_domain_add_legacy (np, nr_irq, irq_base,0 , + combiner_irq_domain =irq_domain_add_simple (np, nr_irq, irq_base, &combiner_irq_domain_ops, combiner_data);if (WARN_ON (!combiner_irq_domain)) {pr_warning ("%s: irq domain init failed\n" , __func__);
@@ -254,6 +249,7 @@ static int __init combiner_of_init(struct device_node *np, {void __iomem *combiner_base;unsigned int max_nr; +int irq_base =-1 ; combiner_base =of_iomap (np,0 );if (!combiner_base) {
@@ -267,7 +263,14 @@ static int __init combiner_of_init(struct device_node *np, __func__, max_nr); } -combiner_init (combiner_base, np, max_nr); +/* +* FIXME: This is a hardwired COMBINER_IRQ(0,0). Once all devices +* get their IRQ from DT, remove this in order to get dynamic +* allocation. +*/ + irq_base =160 ; + +combiner_init (combiner_base, np, max_nr, irq_base);return 0 ; }
Signature · 1 line
1.8.1.2
PATCH 29/30 spi: s3c64xx: move to generic dmaengine API
In reply to Arnd BergmannThe spi-s3c64xx uses a Samsung proprietary interface for talking to the DMA engine, which does not work with multiplatform kernels.
This version of the patch leaves the old code in place, behind an #ifdef. This can be removed in the future, after the s3c64xx platform start supporting the regular dmaengine interface. An earlier version of this patch was tested successfully on exynos5250 by Padma Venkat.
The conversion was rather mechanical, since the samsung interface is just a shallow wrapper around the dmaengine interface.
--- arch/arm/plat-samsung/devs.c | 10 ++ drivers/spi/spi-s3c64xx.c | 185 +++++++++++++++++++++++------- include/linux/platform_data/spi-s3c64xx.h | 3 + 3 files changed, 154 insertions(+), 44 deletions(-)
arch/arm/plat-samsung/devs.c +10 -0
@@ -10,6 +10,7 @@* published by the Free Software Foundation. */ +#include <linux/amba/pl330.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/interrupt.h>
@@ -1512,6 +1513,9 @@ void __init s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, pd.num_cs = num_cs; pd.src_clk_nr = src_clk_nr; pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi0_cfg_gpio; +#ifdef CONFIG_PL330_DMA + pd.filter = pl330_filter; +#endif s3c_set_platdata (&pd,sizeof (pd), &s3c64xx_device_spi0); }
@@ -1550,6 +1554,9 @@ void __init s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, pd.num_cs = num_cs; pd.src_clk_nr = src_clk_nr; pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi1_cfg_gpio; +#ifdef CONFIG_PL330_DMA + pd.filter = pl330_filter; +#endif s3c_set_platdata (&pd,sizeof (pd), &s3c64xx_device_spi1); }
@@ -1588,6 +1595,9 @@ void __init s3c64xx_spi2_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, pd.num_cs = num_cs; pd.src_clk_nr = src_clk_nr; pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi2_cfg_gpio; +#ifdef CONFIG_PL330_DMA + pd.filter = pl330_filter; +#endif s3c_set_platdata (&pd,sizeof (pd), &s3c64xx_device_spi2); }
drivers/spi/spi-s3c64xx.c +141 -44
272 lines not on this page · raw message
include/linux/platform_data/spi-s3c64xx.h +3 -0
@@ -11,6 +11,8 @@#ifndef __S3C64XX_PLAT_SPI_H#define __S3C64XX_PLAT_SPI_H +#include <linux/dmaengine.h> +struct platform_device ;/**
@@ -38,6 +40,7 @@ struct s3c64xx_spi_info {int src_clk_nr;int num_cs;int (*cfg_gpio)(void ); +dma_filter_fn filter; };/**
Signature · 1 line
1.8.1.2
Re: [PATCH 29/30] spi: s3c64xx: move to generic dmaengine API
Quoted 3 lines · Arnd Bergmann
The spi-s3c64xx uses a Samsung proprietary interface for talking to the DMA engine, which does not work with multiplatform kernels.
This doesn't apply against my spi-next, can you please check and resend?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130411/992e6ac6/attachment.sig>
PATCH v2 1/1 spi: s3c64xx: move to generic dmaengine API
The spi-s3c64xx uses a Samsung proprietary interface for talking to the DMA engine, which does not work with multiplatform kernels.
This version of the patch leaves the old code in place, behind an #ifdef. This can be removed in the future, after the s3c64xx platform start supporting the regular dmaengine interface. An earlier version of this patch was tested successfully on exynos5250 by Padma Venkat.
The conversion was rather mechanical, since the samsung interface is just a shallow wrapper around the dmaengine interface.
----
v2: rebased to git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git spi-next
arch/arm/plat-samsung/devs.c +10 -0
@@ -10,6 +10,7 @@* published by the Free Software Foundation. */ +#include <linux/amba/pl330.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/interrupt.h>
@@ -1552,6 +1553,9 @@ void __init s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, pd.num_cs = num_cs; pd.src_clk_nr = src_clk_nr; pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi0_cfg_gpio; +#ifdef CONFIG_PL330_DMA + pd.filter = pl330_filter; +#endif s3c_set_platdata (&pd,sizeof (pd), &s3c64xx_device_spi0); }
@@ -1590,6 +1594,9 @@ void __init s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, pd.num_cs = num_cs; pd.src_clk_nr = src_clk_nr; pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi1_cfg_gpio; +#ifdef CONFIG_PL330_DMA + pd.filter = pl330_filter; +#endif s3c_set_platdata (&pd,sizeof (pd), &s3c64xx_device_spi1); }
@@ -1628,6 +1635,9 @@ void __init s3c64xx_spi2_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, pd.num_cs = num_cs; pd.src_clk_nr = src_clk_nr; pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi2_cfg_gpio; +#ifdef CONFIG_PL330_DMA + pd.filter = pl330_filter; +#endif s3c_set_platdata (&pd,sizeof (pd), &s3c64xx_device_spi2); }
drivers/spi/spi-s3c64xx.c +141 -44
272 lines not on this page · raw message
include/linux/platform_data/spi-s3c64xx.h +3 -0
@@ -11,6 +11,8 @@#ifndef __S3C64XX_PLAT_SPI_H#define __S3C64XX_PLAT_SPI_H +#include <linux/dmaengine.h> +struct platform_device ;/**
@@ -38,6 +40,7 @@ struct s3c64xx_spi_info {int src_clk_nr;int num_cs;int (*cfg_gpio)(void ); +dma_filter_fn filter; };/**
Mark Brown
maintainerRe: [PATCH v2] spi: s3c64xx: move to generic dmaengine API
Quoted 3 lines · Arnd Bergmann
The spi-s3c64xx uses a Samsung proprietary interface for talking to the DMA engine, which does not work with multiplatform kernels.
Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130412/88450ddb/attachment.sig>
Mark Brown
maintainerRe: [PATCH v2] spi: s3c64xx: move to generic dmaengine API
In reply to Arnd BergmannQuoted 3 lines · Arnd Bergmann
The spi-s3c64xx uses a Samsung proprietary interface for talking to the DMA engine, which does not work with multiplatform kernels.
Actually it seems that this patch is causing issues for bulk SPI
transfers on s3c64xx, especially when they're driven quickly one after
another. I've only just found the problem so I've not been able to
debug yet but a revert fixes it...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130417/c9f3d942/attachment.sig>
Re: [PATCH 29/30] spi: s3c64xx: move to generic dmaengine API
In reply to Arnd Bergmanndrivers/spi/spi-s3c64xx.c static int s3c64xx_spi_transfer_one_message(struct spi_master *master, · line 844
Quoted 13 lines · Arnd Bergmann
drivers/spi/spi-s3c64xx.c +3
-3@@ -713,9 +836,9 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master, }/* Polling method for xfers not bigger than FIFO capacity */ -if (xfer->len <= ((FIFO_LVL_MASK (sdd) >>1 ) +1 )) - use_dma =0 ; -else + use_dma =0 ; +if (sdd->rx_dma.ch && sdd->tx_dma.ch && + (xfer->len > ((FIFO_LVL_MASK (sdd) >>1 ) +1 ))) use_dma =1 ;spin_lock_irqsave (&sdd->lock, flags);
Can you try just reverting this hunk? It's actually not required and comes from an earlier version of the patch. I assumed it was harmless, but it's the only think I see that should actually make a difference in my patch for the case of !CONFIG_SAMSUNG_DMADEV.
Arnd
Mark Brown
maintainerRe: [PATCH 29/30] spi: s3c64xx: move to generic dmaengine API
Quoted 11 lines · Arnd Bergmann
drivers/spi/spi-s3c64xx.c static int s3c64xx_spi_transfer_one_message(struct spi_master *master, · line 842
Quoted 4 lines · Arnd Bergmann
drivers/spi/spi-s3c64xx.c +3
-0+ use_dma =0 ; +if (sdd->rx_dma.ch && sdd->tx_dma.ch && + (xfer->len > ((FIFO_LVL_MASK (sdd) >>1 ) +1 ))) use_dma =1 ;Can you try just reverting this hunk? It's actually not required and comes from an earlier version of the patch. I assumed it was harmless, but it's the only think I see that should actually make a difference in my patch for the case of !CONFIG_SAMSUNG_DMADEV.
That's not it, the checks are now needed - otherwise we get a null
pointer dereference in prepare_dma() instead. What's actually gone
wrong is that your ifdefs are for SAMSUNG_DMADEV instead of S3C_DMA
so s3c64xx is trying to use dmaengine. The driver doesn't actually
check to see if it failed to get the channels so it then tries to do the
transfer with a missing channel which unsurprisingly fails.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130418/2458eed6/attachment-0001.sig>
PATCH 30/30 ARM: exynos: enable multiplatform support
In reply to Arnd BergmannThis makes it possible to enable the exynos platform as part of a multiplatform kernel, in addition to keeping the single-platform exynos support.
The multiplatform variant has a number of limitations at the moment:
* It only supports DT-enabled machines. This is not a problem in the long run, as non-DT machines for exynos are going away. The main problem here is that the gpio code and the exynos_eint irqchip are not multiplatform capable but still required for ATAGS based boot.
* The watchdog driver is still missing a conversion.
* sparsemem and memory_holes are currently not supported in multiplatform.
--- arch/arm/Kconfig | 10 +--------- arch/arm/configs/exynos4_defconfig | 2 +- arch/arm/mach-exynos/Kconfig | 25 +++++++++++++++++++++---- arch/arm/mach-exynos/Makefile | 5 +++-- arch/arm/mach-exynos/common.c | 6 ++++++ arch/arm/plat-samsung/Kconfig | 7 ++++++- arch/arm/plat-samsung/Makefile | 8 ++++++-- arch/arm/plat-samsung/include/plat/pm.h | 5 +++++ drivers/gpio/Makefile | 2 +- 9 files changed, 50 insertions(+), 20 deletions(-)
arch/arm/Kconfig +1 -9
@@ -775,19 +775,11 @@ config ARCH_S5PV210 help Samsung S5PV210/S5PC110 series based systems -config ARCH_EXYNOS +config ARCH_EXYNOS_SINGLE bool "Samsung EXYNOS" - select ARCH_HAS_CPUFREQ select ARCH_HAS_HOLES_MEMORYMODEL select ARCH_SPARSEMEM_ENABLE - select CLKDEV_LOOKUP - select COMMON_CLK - select CPU_V7 - select GENERIC_CLOCKEVENTS - select HAVE_CLK - select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG - select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H select NEED_MACH_MEMORY_H help
arch/arm/configs/exynos4_defconfig +1 -1
@@ -4,7 +4,7 @@ CONFIG_KALLSYMS_ALL=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_EXYNOS=y +CONFIG_ARCH_EXYNOS_SINGLE=y CONFIG_S3C_LOWLEVEL_UART_PORT=1 CONFIG_MACH_SMDKC210=y CONFIG_MACH_ARMLEX4210=y
arch/arm/mach-exynos/Kconfig +21 -4
@@ -7,6 +7,20 @@ # Configuration options for the EXYNOS4 +config ARCH_EXYNOS + bool "Samsung EXYNOS" if ARCH_MULTI_V7 + default ARCH_EXYNOS_SINGLE + select ARCH_HAS_CPUFREQ + select CLKDEV_LOOKUP + select COMMON_CLK + select CPU_V7 + select GENERIC_CLOCKEVENTS + select HAVE_CLK + select HAVE_S3C2410_I2C if I2C + select HAVE_S3C_RTC if RTC_CLASS + help + Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) + if ARCH_EXYNOS menu "SAMSUNG EXYNOS SoCs Support"
@@ -20,6 +34,9 @@ config ARCH_EXYNOS4 help Samsung EXYNOS4 SoCs based systems +config ARCH_EXYNOS4_SINGLE + def_bool ARCH_EXYNOS4 && ARCH_EXYNOS_SINGLE + config ARCH_EXYNOS5 bool "SAMSUNG EXYNOS5" select HAVE_ARM_SCU if SMP
@@ -37,7 +54,7 @@ config CPU_EXYNOS4210 select PM_GENERIC_DOMAINS select S5P_PM if PM select S5P_SLEEP if PM - select SAMSUNG_DMADEV + select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE help Enable EXYNOS4210 CPU support
@@ -47,7 +64,7 @@ config SOC_EXYNOS4212 depends on ARCH_EXYNOS4 select S5P_PM if PM select S5P_SLEEP if PM - select SAMSUNG_DMADEV + select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE help Enable EXYNOS4212 SoC support
@@ -55,7 +72,7 @@ config SOC_EXYNOS4412 bool "SAMSUNG EXYNOS4412" default y depends on ARCH_EXYNOS4 - select SAMSUNG_DMADEV + select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE help Enable EXYNOS4412 SoC support
@@ -67,7 +84,7 @@ config SOC_EXYNOS5250 select S5P_PM if PM select S5P_SLEEP if PM select S5P_DEV_MFC - select SAMSUNG_DMADEV + select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE help Enable EXYNOS5250 SoC support
arch/arm/mach-exynos/Makefile +3 -2
@@ -4,6 +4,7 @@ # http://www.samsung.com/ # # Licensed under GPLv2 +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include obj-y := obj-m :=
@@ -48,12 +49,12 @@ obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o # device support obj-y += dev-uart.o -obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o +obj-$(CONFIG_ARCH_EXYNOS4_SINGLE) += dev-audio.o obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o -obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o +obj-$(CONFIG_ARCH_EXYNOS_SINGLE) += setup-i2c0.o obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o
arch/arm/mach-exynos/common.c +6 -0
@@ -393,6 +393,9 @@ static void __init exynos4_map_io(void)if (soc_is_exynos4212 () ||soc_is_exynos4412 ())iotable_init (exynos4x12_iodesc,ARRAY_SIZE (exynos4x12_iodesc)); +if (!IS_ENABLED (CONFIG_EXYNOS_ATAGS )) +return +/* initialize device information early */ exynos4_default_sdhci0 ();exynos4_default_sdhci1 ();
@@ -597,6 +600,8 @@ static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)s3c24xx_init_uartdevs ("exynos4210-uart" , exynos4_uart_resources, cfg, no); } + +#ifdef CONFIG_EXYNOS_ATAGS static void __iomem *exynos_eint_base;static DEFINE_SPINLOCK (eint_lock);
@@ -903,6 +908,7 @@ static int __init exynos_init_irq_eint(void)return 0 ; }arch_initcall (exynos_init_irq_eint); +#endif static struct resource exynos4_pmu_resource[] = {DEFINE_RES_IRQ (EXYNOS4_IRQ_PMU ),
arch/arm/plat-samsung/Kconfig +6 -1
@@ -13,6 +13,10 @@ config PLAT_SAMSUNG help Base platform code for all Samsung SoC based systems +config PLAT_SAMSUNG_SINGLE + def_bool PLAT_SAMSUNG && !ARCH_MULTIPLATFORM + + config PLAT_S5P bool depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS)
@@ -23,7 +27,7 @@ config PLAT_S5P select GIC_NON_BANKED if ARCH_EXYNOS4 select NO_IOPORT select PLAT_SAMSUNG - select S3C_GPIO_TRACK + select S3C_GPIO_TRACK if PLAT_SAMSUNG_SINGLE select S5P_GPIO_DRVSTR select SAMSUNG_CLKSRC if !COMMON_CLK select SAMSUNG_GPIOLIB_4BIT
@@ -164,6 +168,7 @@ config S5P_DEV_UART config S3C_ADC bool "ADC common driver support" + depends on PLAT_SAMSUNG_SINGLE help Core support for the ADC block found in the Samsung SoC systems for drivers such as the touchscreen and hwmon to use to share
arch/arm/plat-samsung/Makefile +6 -2
@@ -4,6 +4,9 @@ # # Licensed under GPLv2 +ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include +ccflags-$(CONFIG_ARCH_EXYNOS) += -I$(srctree)/arch/arm/mach-exynos/include + obj-y := obj-m := obj-n := dummy.o
@@ -33,7 +36,7 @@ obj-$(CONFIG_S3C_ADC) += adc.o obj-y += platformdata.o -obj-y += devs.o +obj-$(CONFIG_PLAT_SAMSUNG_SINGLE) += devs.o obj-y += dev-uart.o obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
@@ -50,9 +53,10 @@ obj-$(CONFIG_S3C_DMA) += dma.o s3c-dma-ops.o obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o # PM support - obj-$(CONFIG_PM) += pm.o +ifdef CONFIG_PLAT_SAMSUNG_SINGLE obj-$(CONFIG_PM) += pm-gpio.o +endif obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
arch/arm/plat-samsung/include/plat/pm.h +5 -0
@@ -166,6 +166,7 @@ extern void s3c_pm_check_store(void);*/ extern void s3c_pm_configure_extint (void ); +#ifdef CONFIG_PLAT_SAMSUNG_SINGLE /** * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. *
@@ -181,6 +182,10 @@ extern void samsung_pm_restore_gpios(void);* Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). */ extern void samsung_pm_save_gpios (void ); +#else +#define samsung_pm_restore_gpios () do { } while(0) +#define samsung_pm_save_gpios () do { } while(0) +#endif extern void s3c_pm_save_core (void );extern void s3c_pm_restore_core (void );
drivers/gpio/Makefile +1 -1
@@ -58,7 +58,7 @@ obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o -obj-$(CONFIG_PLAT_SAMSUNG) += gpio-samsung.o +obj-$(CONFIG_PLAT_SAMSUNG_SINGLE) += gpio-samsung.o obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o obj-$(CONFIG_GPIO_SCH) += gpio-sch.o obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o
Signature · 1 line
1.8.1.2