@@ -540,6 +540,10 @@ static void __init gta02_machine_init(void)
i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
+
gpiod_add_lookup_table(>a02_audio_gpio_table);
platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
pm_power_off = gta02_poweroff;
@@ -709,6 +709,9 @@ static void __init h1940_init(void)
s3c24xx_fb_set_platdata(&h1940_fb_info);
gpiod_add_lookup_table(&h1940_mmc_gpio_table);
gpiod_add_lookup_table(&h1940_audio_gpio_table);
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
s3c24xx_mci_set_platdata(&h1940_mmc_cfg);
s3c24xx_udc_set_platdata(&h1940_udc_cfg);
s3c24xx_ts_set_platdata(&h1940_ts_cfg);
@@ -685,6 +685,11 @@ static void __init mini2440_init(void)
s3c_gpio_setpull(mini2440_buttons[i].gpio, S3C_GPIO_PULL_UP);
s3c_gpio_cfgpin(mini2440_buttons[i].gpio, S3C2410_GPIO_INPUT);
}
+
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
+
if (features.lcd_index != -1) {
int li;
@@ -36,6 +36,7 @@
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
#include <asm/mach/arch.h>
#include <asm/mach/irq.h>
@@ -570,6 +571,10 @@ static void __init n30_init(void)
S3C2410_MISCCR_USBSUSPND0 |
S3C2410_MISCCR_USBSUSPND1, 0x0);
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
+
if (machine_is_n30()) {
/* Turn off suspend on both USB ports, and switch the
* selectable USB port to USB device mode. */
@@ -145,6 +145,11 @@ static void __init nexcoder_init_time(void)
static void __init nexcoder_init(void)
{
s3c_i2c0_set_platdata(NULL);
+
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
+
platform_add_devices(nexcoder_devices, ARRAY_SIZE(nexcoder_devices));
};
@@ -24,6 +24,8 @@
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
#include <plat/cpu.h>
#include <plat/devs.h>
@@ -107,6 +109,10 @@ static void __init otom11_init_time(void)
static void __init otom11_init(void)
{
s3c_i2c0_set_platdata(NULL);
+
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
}
@@ -337,6 +337,9 @@ static void __init qt2410_machine_init(void)
s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
s3c_i2c0_set_platdata(NULL);
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
s3c_pm_init();
@@ -825,6 +825,9 @@ static void __init rx1950_init_machine(void)
pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
gpiod_add_lookup_table(&rx1950_audio_gpio_table);
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
i2c_register_board_info(0, rx1950_i2c_devices,
@@ -39,6 +39,7 @@
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
#include <plat/cpu.h>
#include <plat/devs.h>
@@ -199,6 +200,9 @@ static void __init rx3715_init_machine(void)
s3c_nand_set_platdata(&rx3715_nand_info);
s3c24xx_fb_set_platdata(&rx3715_fb_info);
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices));
}
@@ -19,6 +19,8 @@
#include <linux/serial_s3c.h>
#include <linux/platform_device.h>
#include <linux/io.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -94,6 +96,9 @@ static void __init smdk2410_init(void)
{
s3c_i2c0_set_platdata(NULL);
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
smdk_machine_init();
}
@@ -37,6 +37,7 @@
#include <linux/platform_data/i2c-s3c2410.h>
#include <mach/gpio-samsung.h>
#include <mach/fb.h>
+#include <plat/gpio-cfg.h>
#include <plat/devs.h>
#include <plat/cpu.h>
@@ -119,6 +120,9 @@ static void __init smdk2413_machine_init(void)
s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
s3c_i2c0_set_platdata(NULL);
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices));
smdk_machine_init();
@@ -29,6 +29,8 @@
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
#include <mach/fb.h>
#include <linux/platform_data/i2c-s3c2410.h>
@@ -167,7 +169,9 @@ static void __init smdk2440_machine_init(void)
{
s3c24xx_fb_set_platdata(&smdk2440_fb_info);
s3c_i2c0_set_platdata(NULL);
-
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices));
smdk_machine_init();
}
@@ -31,6 +31,8 @@
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
#include <mach/fb.h>
@@ -149,7 +151,9 @@ static void __init vstms_init(void)
{
s3c_i2c0_set_platdata(NULL);
s3c_nand_set_platdata(&vstms_nand_info);
-
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
}
@@ -14,6 +14,8 @@
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
#include <linux/platform_data/asoc-s3c24xx_simtec.h>
#include <plat/devs.h>
@@ -65,6 +67,10 @@ int __init simtec_audio_add(const char *name, bool has_lr_routing,
if (has_lr_routing)
simtec_audio_platdata.startup = simtec_audio_startup_lrroute;
+ /* Configure the I2S pins (GPE0...GPE4) in correct mode */
+ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+ S3C_GPIO_PULL_NONE);
+
platform_device_register(&s3c_device_iis);
platform_device_register(&simtec_audio_dev);
return 0;
@@ -19,9 +19,6 @@
#include <sound/soc.h>
#include <sound/pcm_params.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
#include "dma.h"
#include "regs-i2s-v2.h"
#include "s3c2412-i2s.h"
@@ -70,10 +67,6 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)
if (ret)
goto err;
- /* Configure the I2S pins (GPE0...GPE4) in correct mode */
- s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
- S3C_GPIO_PULL_NONE);
-
return 0;
err:
@@ -18,10 +18,7 @@
#include <sound/soc.h>
#include <sound/pcm_params.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
#include "regs-iis.h"
-
#include "dma.h"
#include "s3c24xx-i2s.h"
@@ -348,10 +345,6 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
if (ret)
return ret;
- /* Configure the I2S pins (GPE0...GPE4) in correct mode */
- s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
- S3C_GPIO_PULL_NONE);
-
writel(S3C2410_IISCON_IISEN, s3c24xx_i2s.regs + S3C2410_IISCON);
s3c24xx_snd_txctrl(0);
The s3c_gpio_cfgall_range() function is an internal interface of the samsung gpio driver and should not be called directly by drivers, so move the iis pin initialization into the boards. Note that the s3c2412-i2s driver has no boards using it in mainline linux, the driver gets selected for the jive machine but is never instantiated. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/arm/mach-s3c24xx/mach-gta02.c | 4 ++++ arch/arm/mach-s3c24xx/mach-h1940.c | 3 +++ arch/arm/mach-s3c24xx/mach-mini2440.c | 5 +++++ arch/arm/mach-s3c24xx/mach-n30.c | 5 +++++ arch/arm/mach-s3c24xx/mach-nexcoder.c | 5 +++++ arch/arm/mach-s3c24xx/mach-otom.c | 6 ++++++ arch/arm/mach-s3c24xx/mach-qt2410.c | 3 +++ arch/arm/mach-s3c24xx/mach-rx1950.c | 3 +++ arch/arm/mach-s3c24xx/mach-rx3715.c | 4 ++++ arch/arm/mach-s3c24xx/mach-smdk2410.c | 5 +++++ arch/arm/mach-s3c24xx/mach-smdk2413.c | 4 ++++ arch/arm/mach-s3c24xx/mach-smdk2440.c | 6 +++++- arch/arm/mach-s3c24xx/mach-vstms.c | 6 +++++- arch/arm/mach-s3c24xx/simtec-audio.c | 6 ++++++ sound/soc/samsung/s3c2412-i2s.c | 7 ------- sound/soc/samsung/s3c24xx-i2s.c | 7 ------- 16 files changed, 63 insertions(+), 16 deletions(-) -- 2.20.0