Commit 673085f4 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Krzysztof Kozlowski
Browse files

ARM: s3c24xx: move iis pinctrl config into boards



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.

This means the pin configuration is only run once at early boot, rather
than each time the driver binds, but the effect should be the same.

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: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-28-krzk@kernel.org


Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 35ee36c7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -538,6 +538,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(&gta02_audio_gpio_table);
	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
	pm_power_off = gta02_poweroff;
+3 −0
Original line number Diff line number Diff line
@@ -707,6 +707,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);
+5 −0
Original line number Diff line number Diff line
@@ -714,6 +714,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;

+5 −0
Original line number Diff line number Diff line
@@ -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>
@@ -599,6 +600,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. */
+5 −0
Original line number Diff line number Diff line
@@ -143,6 +143,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));
};

Loading