Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9f5f1e4 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP2+: Remove legacy mux code



All the boards booting with device tree use
drivers/pinctrl-single.c instead.

Note that mach-omap1 is still using the legacy mux,
so let's move the related Kconfig options from plat-omap
to mach-omap1.

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent b4281455
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -31,6 +31,32 @@ config ARCH_OMAP16XX
	select ARCH_OMAP_OTG
	select CPU_ARM926T

config OMAP_MUX
	bool "OMAP multiplexing support"
	depends on ARCH_OMAP
	default y
	help
	  Pin multiplexing support for OMAP boards. If your bootloader
	  sets the multiplexing correctly, say N. Otherwise, or if unsure,
	  say Y.

config OMAP_MUX_DEBUG
	bool "Multiplexing debug output"
	depends on OMAP_MUX
	help
	  Makes the multiplexing functions print out a lot of debug info.
	  This is useful if you want to find out the correct values of the
	  multiplexing registers.

config OMAP_MUX_WARNINGS
	bool "Warn about pins the bootloader didn't set up"
	depends on OMAP_MUX
	default y
	help
	  Choose Y here to warn whenever driver initialization logic needs
	  to change the pin multiplexing setup.	 When there are no warnings
	  printed, it's safe to deselect OMAP_MUX for your product.

comment "OMAP Board Type"
	depends on ARCH_OMAP1

+1 −4
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ ccflags-y := -I$(srctree)/$(src)/include \
	-I$(srctree)/arch/arm/plat-omap/include

# Common support
obj-y := id.o io.o control.o mux.o devices.o fb.o timer.o pm.o \
obj-y := id.o io.o control.o devices.o fb.o timer.o pm.o \
	 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
	 omap_device.o omap-headsmp.o sram.o drm.o

@@ -63,9 +63,6 @@ obj-$(CONFIG_ARCH_OMAP4) += omap4-restart.o
obj-$(CONFIG_SOC_OMAP5)			+= omap4-restart.o
obj-$(CONFIG_SOC_DRA7XX)		+= omap4-restart.o

# Pin multiplexing
obj-$(CONFIG_ARCH_OMAP3)		+= mux34xx.o

# SMS/SDRC
obj-$(CONFIG_ARCH_OMAP2)		+= sdrc2xxx.o
# obj-$(CONFIG_ARCH_OMAP3)		+= sdrc3xxx.o
+0 −9
Original line number Diff line number Diff line
@@ -77,15 +77,6 @@ static inline int omap4_pm_init_early(void)
}
#endif

#ifdef CONFIG_OMAP_MUX
int omap_mux_late_init(void);
#else
static inline int omap_mux_late_init(void)
{
	return 0;
}
#endif

extern void omap2_init_common_infrastructure(void);

extern void omap_init_time(void);
+0 −1
Original line number Diff line number Diff line
@@ -32,6 +32,5 @@

#include "soc.h"
#include "dss-common.h"
#include "mux.h"
#include "display.h"
+0 −88
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include "omap_device.h"
#include "omap-pm.h"

#include "mux.h"
#include "hsmmc.h"
#include "control.h"

@@ -147,91 +146,6 @@ static int nop_mmc_set_power(struct device *dev, int power_on, int vdd)
	return 0;
}

static inline void omap_hsmmc_mux(struct omap_hsmmc_platform_data
				  *mmc_controller, int controller_nr)
{
	if (gpio_is_valid(mmc_controller->gpio_cd) &&
	    (mmc_controller->gpio_cd < OMAP_MAX_GPIO_LINES))
		omap_mux_init_gpio(mmc_controller->gpio_cd,
				   OMAP_PIN_INPUT_PULLUP);
	if (gpio_is_valid(mmc_controller->gpio_cod) &&
	    (mmc_controller->gpio_cod < OMAP_MAX_GPIO_LINES))
		omap_mux_init_gpio(mmc_controller->gpio_cod,
				   OMAP_PIN_INPUT_PULLUP);
	if (gpio_is_valid(mmc_controller->gpio_wp) &&
	    (mmc_controller->gpio_wp < OMAP_MAX_GPIO_LINES))
		omap_mux_init_gpio(mmc_controller->gpio_wp,
				   OMAP_PIN_INPUT_PULLUP);
	if (cpu_is_omap34xx()) {
		if (controller_nr == 0) {
			omap_mux_init_signal("sdmmc1_clk",
				OMAP_PIN_INPUT_PULLUP);
			omap_mux_init_signal("sdmmc1_cmd",
				OMAP_PIN_INPUT_PULLUP);
			omap_mux_init_signal("sdmmc1_dat0",
				OMAP_PIN_INPUT_PULLUP);
			if (mmc_controller->caps &
				(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
				omap_mux_init_signal("sdmmc1_dat1",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc1_dat2",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc1_dat3",
					OMAP_PIN_INPUT_PULLUP);
			}
			if (mmc_controller->caps &
						MMC_CAP_8_BIT_DATA) {
				omap_mux_init_signal("sdmmc1_dat4",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc1_dat5",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc1_dat6",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc1_dat7",
					OMAP_PIN_INPUT_PULLUP);
			}
		}
		if (controller_nr == 1) {
			/* MMC2 */
			omap_mux_init_signal("sdmmc2_clk",
				OMAP_PIN_INPUT_PULLUP);
			omap_mux_init_signal("sdmmc2_cmd",
				OMAP_PIN_INPUT_PULLUP);
			omap_mux_init_signal("sdmmc2_dat0",
				OMAP_PIN_INPUT_PULLUP);

			/*
			 * For 8 wire configurations, Lines DAT4, 5, 6 and 7
			 * need to be muxed in the board-*.c files
			 */
			if (mmc_controller->caps &
				(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
				omap_mux_init_signal("sdmmc2_dat1",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc2_dat2",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc2_dat3",
					OMAP_PIN_INPUT_PULLUP);
			}
			if (mmc_controller->caps &
							MMC_CAP_8_BIT_DATA) {
				omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
					OMAP_PIN_INPUT_PULLUP);
				omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
					OMAP_PIN_INPUT_PULLUP);
			}
		}

		/*
		 * For MMC3 the pins need to be muxed in the board-*.c files
		 */
	}
}

static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
					struct omap_hsmmc_platform_data *mmc)
{
@@ -410,8 +324,6 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
	if (res < 0)
		goto free_mmc;

	omap_hsmmc_mux(mmc_data, (ctrl_nr - 1));

	name = "omap_hsmmc";
	res = snprintf(oh_name, MAX_OMAP_MMC_HWMOD_NAME_LEN,
		     "mmc%d", ctrl_nr);
Loading