ARM: OMAP1: Make plat/mux.h omap1 only
authorTony Lindgren <tony@atomide.com>
Wed, 19 Sep 2012 17:46:56 +0000 (10:46 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 20 Sep 2012 21:54:57 +0000 (14:54 -0700)
We are moving omap2+ to use the device tree based pinctrl-single.c
and will be removing the old mux framework. This will remove the
omap1 specific parts from plat-omap.

Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-usb@vger.kernel.org
Cc: linux-pcmcia@lists.infradead.org
Cc: spi-devel-general@lists.sourceforge.net
Signed-off-by: Tony Lindgren <tony@atomide.com>
39 files changed:
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-generic.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/i2c.c
arch/arm/mach-omap1/include/mach/mux.h [new file with mode: 0644]
arch/arm/mach-omap1/io.c
arch/arm/mach-omap1/leds.c
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap1/mux.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/serial.c
arch/arm/mach-omap1/usb.c
arch/arm/mach-omap2/common.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/plat-omap/Makefile
arch/arm/plat-omap/i2c.c
arch/arm/plat-omap/include/plat/mux.h [deleted file]
arch/arm/plat-omap/include/plat/omap-serial.h
arch/arm/plat-omap/mux.c [deleted file]
drivers/mmc/host/omap.c
drivers/pcmcia/omap_cf.c
drivers/spi/spi-omap-uwire.c
drivers/usb/host/ohci-omap.c
drivers/usb/musb/tusb6010_omap.c
drivers/usb/otg/isp1301_omap.c
drivers/video/backlight/omap1_bl.c
drivers/video/omap/lcd_osk.c

index 56446d2b2844abfc22f729a14cc3c8eff50eb20c..275d7e50ae101a6df06073e66d9f42fb3c556b3d 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <plat/board-ams-delta.h>
 #include <linux/platform_data/keypad-omap.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #include <mach/hardware.h>
 #include <mach/ams-delta-fiq.h>
index ad5ba9f00efeedfee2aece781ab59bc952c54df0..63aa634ce29ff17ec34f88a09c2376680a424ffd 100644 (file)
@@ -28,7 +28,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/tc.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/flash.h>
 #include <plat/fpga.h>
 #include <linux/platform_data/keypad-omap.h>
index 04b5fdaff8318d50822e9d6da639ca4d25fc4a45..4ec579fdd366e15c034c07d186eeb3c16dacf4cb 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #include <mach/usb.h>
 
index 519d827570bbb752fb00ac8d0a91a00044c5121b..093297e50ec7655fc316ef6494143dd1fcbb830c 100644 (file)
@@ -37,7 +37,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/dma.h>
 #include <plat/tc.h>
 #include <plat/irda.h>
index 4733eb510bad4955dcb216854b6c965b3b1ccd01..adc0373299eca5462299491b98ea5394dd965c3b 100644 (file)
@@ -39,7 +39,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/tc.h>
 #include <linux/platform_data/keypad-omap.h>
 #include <plat/dma.h>
index 083afa79dfb14e6340488a10eb3b8e2c3b260edf..04a67230cc944ad9e3492dd7da708b77f1f62189 100644 (file)
@@ -31,7 +31,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/flash.h>
 #include <plat/fpga.h>
 #include <plat/tc.h>
index 7b9fc99e705ed45b28581c9ff7c8919c4185fec9..7d5c06d6a52a4428cf9243d44f4239ee92616c98 100644 (file)
@@ -28,7 +28,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/mmc.h>
 #include <plat/clock.h>
 
index c780a1b80c2a81fff7d422b8dd36f7718b9e1e67..3ef0bba65b61489971d374521532c2d23d7678d7 100644 (file)
@@ -47,7 +47,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/flash.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/tc.h>
 
 #include <mach/hardware.h>
index e46f5c2ea63ff7e05502d47c295a741b6b4d5258..b633b386240ea640162d29fa3d767896d010a66b 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/flash.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/tc.h>
 #include <plat/dma.h>
 #include <plat/irda.h>
index e1c842be749ef14d25852c237e340e4398df24c1..518b94dbeae140f85fe8595114fd62df34a9ff3f 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <plat/led.h>
 #include <plat/flash.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/dma.h>
 #include <plat/tc.h>
 #include <plat/irda.h>
index a71b7f59b7c3f860269cb44754d460cb1e80392c..f4a615d61f695ad6f4ee764f96d710b953c6eb45 100644 (file)
@@ -37,7 +37,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/flash.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/dma.h>
 #include <plat/tc.h>
 #include <plat/irda.h>
index 87797025d6bb8722cf79e75c0fb12591c11a87f5..cc38e36b3764540890b76ac58fa9f3c2df6dfb6c 100644 (file)
@@ -29,7 +29,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/tc.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/fpga.h>
 #include <plat/flash.h>
 
index a6a1ab638292afbfe7b35565b15542da227fd165..2fddf6f0b39a561704b09a1f8e63b689cd91205d 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/flash.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/dma.h>
 #include <plat/irda.h>
 #include <plat/tc.h>
index 1668af3017de73316d81df71fd6aec7287f01cc9..bd7b3fc18a49b5f1f555650a29684ed23b69602c 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <plat/board-voiceblue.h>
 #include <plat/flash.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/tc.h>
 
 #include <mach/hardware.h>
index 05fdbd992c778eb044c6ec50911badcde887b35a..0cc54dd553e36fa7c56d9a56b46adba881fdc2f8 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/tc.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/dma.h>
 #include <plat/mmc.h>
 
index 5446c9912641fa502416ba6e9ce01f8215a67bee..a0551a6d7451efe3b851e0abb961c74be6038c35 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <plat/i2c.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/cpu.h>
 
 void __init omap1_i2c_mux_pins(int bus_id)
diff --git a/arch/arm/mach-omap1/include/mach/mux.h b/arch/arm/mach-omap1/include/mach/mux.h
new file mode 100644 (file)
index 0000000..3239489
--- /dev/null
@@ -0,0 +1,454 @@
+/*
+ * arch/arm/plat-omap/include/mach/mux.h
+ *
+ * Table of the Omap register configurations for the FUNC_MUX and
+ * PULL_DWN combinations.
+ *
+ * Copyright (C) 2004 - 2008 Texas Instruments Inc.
+ * Copyright (C) 2003 - 2008 Nokia Corporation
+ *
+ * Written by Tony Lindgren
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * NOTE: Please use the following naming style for new pin entries.
+ *      For example, W8_1610_MMC2_DAT0, where:
+ *      - W8        = ball
+ *      - 1610      = 1510 or 1610, none if common for both 1510 and 1610
+ *      - MMC2_DAT0 = function
+ */
+
+#ifndef __ASM_ARCH_MUX_H
+#define __ASM_ARCH_MUX_H
+
+#define PU_PD_SEL_NA           0       /* No pu_pd reg available */
+#define PULL_DWN_CTRL_NA       0       /* No pull-down control needed */
+
+#ifdef CONFIG_OMAP_MUX_DEBUG
+#define MUX_REG(reg, mode_offset, mode) .mux_reg_name = "FUNC_MUX_CTRL_"#reg, \
+                                       .mux_reg = FUNC_MUX_CTRL_##reg, \
+                                       .mask_offset = mode_offset, \
+                                       .mask = mode,
+
+#define PULL_REG(reg, bit, status)     .pull_name = "PULL_DWN_CTRL_"#reg, \
+                                       .pull_reg = PULL_DWN_CTRL_##reg, \
+                                       .pull_bit = bit, \
+                                       .pull_val = status,
+
+#define PU_PD_REG(reg, status)         .pu_pd_name = "PU_PD_SEL_"#reg, \
+                                       .pu_pd_reg = PU_PD_SEL_##reg, \
+                                       .pu_pd_val = status,
+
+#define MUX_REG_7XX(reg, mode_offset, mode) .mux_reg_name = "OMAP7XX_IO_CONF_"#reg, \
+                                       .mux_reg = OMAP7XX_IO_CONF_##reg, \
+                                       .mask_offset = mode_offset, \
+                                       .mask = mode,
+
+#define PULL_REG_7XX(reg, bit, status) .pull_name = "OMAP7XX_IO_CONF_"#reg, \
+                                       .pull_reg = OMAP7XX_IO_CONF_##reg, \
+                                       .pull_bit = bit, \
+                                       .pull_val = status,
+
+#else
+
+#define MUX_REG(reg, mode_offset, mode) .mux_reg = FUNC_MUX_CTRL_##reg, \
+                                       .mask_offset = mode_offset, \
+                                       .mask = mode,
+
+#define PULL_REG(reg, bit, status)     .pull_reg = PULL_DWN_CTRL_##reg, \
+                                       .pull_bit = bit, \
+                                       .pull_val = status,
+
+#define PU_PD_REG(reg, status)         .pu_pd_reg = PU_PD_SEL_##reg, \
+                                       .pu_pd_val = status,
+
+#define MUX_REG_7XX(reg, mode_offset, mode) \
+                                       .mux_reg = OMAP7XX_IO_CONF_##reg, \
+                                       .mask_offset = mode_offset, \
+                                       .mask = mode,
+
+#define PULL_REG_7XX(reg, bit, status) .pull_reg = OMAP7XX_IO_CONF_##reg, \
+                                       .pull_bit = bit, \
+                                       .pull_val = status,
+
+#endif /* CONFIG_OMAP_MUX_DEBUG */
+
+#define MUX_CFG(desc, mux_reg, mode_offset, mode,      \
+               pull_reg, pull_bit, pull_status,        \
+               pu_pd_reg, pu_pd_status, debug_status)  \
+{                                                      \
+       .name =  desc,                                  \
+       .debug = debug_status,                          \
+       MUX_REG(mux_reg, mode_offset, mode)             \
+       PULL_REG(pull_reg, pull_bit, pull_status)       \
+       PU_PD_REG(pu_pd_reg, pu_pd_status)              \
+},
+
+
+/*
+ * OMAP730/850 has a slightly different config for the pin mux.
+ * - config regs are the OMAP7XX_IO_CONF_x regs (see omap7xx.h) regs and
+ *   not the FUNC_MUX_CTRL_x regs from hardware.h
+ * - for pull-up/down, only has one enable bit which is is in the same register
+ *   as mux config
+ */
+#define MUX_CFG_7XX(desc, mux_reg, mode_offset, mode,  \
+                  pull_bit, pull_status, debug_status)\
+{                                                      \
+       .name =  desc,                                  \
+       .debug = debug_status,                          \
+       MUX_REG_7XX(mux_reg, mode_offset, mode)         \
+       PULL_REG_7XX(mux_reg, pull_bit, pull_status)    \
+       PU_PD_REG(NA, 0)                \
+},
+
+struct pin_config {
+       char                    *name;
+       const unsigned int      mux_reg;
+       unsigned char           debug;
+
+       const unsigned char mask_offset;
+       const unsigned char mask;
+
+       const char *pull_name;
+       const unsigned int pull_reg;
+       const unsigned char pull_val;
+       const unsigned char pull_bit;
+
+       const char *pu_pd_name;
+       const unsigned int pu_pd_reg;
+       const unsigned char pu_pd_val;
+
+#if    defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
+       const char *mux_reg_name;
+#endif
+
+};
+
+enum omap7xx_index {
+       /* OMAP 730 keyboard */
+       E2_7XX_KBR0,
+       J7_7XX_KBR1,
+       E1_7XX_KBR2,
+       F3_7XX_KBR3,
+       D2_7XX_KBR4,
+       C2_7XX_KBC0,
+       D3_7XX_KBC1,
+       E4_7XX_KBC2,
+       F4_7XX_KBC3,
+       E3_7XX_KBC4,
+
+       /* USB */
+       AA17_7XX_USB_DM,
+       W16_7XX_USB_PU_EN,
+       W17_7XX_USB_VBUSI,
+       W18_7XX_USB_DMCK_OUT,
+       W19_7XX_USB_DCRST,
+
+       /* MMC */
+       MMC_7XX_CMD,
+       MMC_7XX_CLK,
+       MMC_7XX_DAT0,
+
+       /* I2C */
+       I2C_7XX_SCL,
+       I2C_7XX_SDA,
+
+       /* SPI */
+       SPI_7XX_1,
+       SPI_7XX_2,
+       SPI_7XX_3,
+       SPI_7XX_4,
+       SPI_7XX_5,
+       SPI_7XX_6,
+
+       /* UART */
+       UART_7XX_1,
+       UART_7XX_2,
+};
+
+enum omap1xxx_index {
+       /* UART1 (BT_UART_GATING)*/
+       UART1_TX = 0,
+       UART1_RTS,
+
+       /* UART2 (COM_UART_GATING)*/
+       UART2_TX,
+       UART2_RX,
+       UART2_CTS,
+       UART2_RTS,
+
+       /* UART3 (GIGA_UART_GATING) */
+       UART3_TX,
+       UART3_RX,
+       UART3_CTS,
+       UART3_RTS,
+       UART3_CLKREQ,
+       UART3_BCLK,     /* 12MHz clock out */
+       Y15_1610_UART3_RTS,
+
+       /* PWT & PWL */
+       PWT,
+       PWL,
+
+       /* USB master generic */
+       R18_USB_VBUS,
+       R18_1510_USB_GPIO0,
+       W4_USB_PUEN,
+       W4_USB_CLKO,
+       W4_USB_HIGHZ,
+       W4_GPIO58,
+
+       /* USB1 master */
+       USB1_SUSP,
+       USB1_SEO,
+       W13_1610_USB1_SE0,
+       USB1_TXEN,
+       USB1_TXD,
+       USB1_VP,
+       USB1_VM,
+       USB1_RCV,
+       USB1_SPEED,
+       R13_1610_USB1_SPEED,
+       R13_1710_USB1_SE0,
+
+       /* USB2 master */
+       USB2_SUSP,
+       USB2_VP,
+       USB2_TXEN,
+       USB2_VM,
+       USB2_RCV,
+       USB2_SEO,
+       USB2_TXD,
+
+       /* OMAP-1510 GPIO */
+       R18_1510_GPIO0,
+       R19_1510_GPIO1,
+       M14_1510_GPIO2,
+
+       /* OMAP1610 GPIO */
+       P18_1610_GPIO3,
+       Y15_1610_GPIO17,
+
+       /* OMAP-1710 GPIO */
+       R18_1710_GPIO0,
+       V2_1710_GPIO10,
+       N21_1710_GPIO14,
+       W15_1710_GPIO40,
+
+       /* MPUIO */
+       MPUIO2,
+       N15_1610_MPUIO2,
+       MPUIO4,
+       MPUIO5,
+       T20_1610_MPUIO5,
+       W11_1610_MPUIO6,
+       V10_1610_MPUIO7,
+       W11_1610_MPUIO9,
+       V10_1610_MPUIO10,
+       W10_1610_MPUIO11,
+       E20_1610_MPUIO13,
+       U20_1610_MPUIO14,
+       E19_1610_MPUIO15,
+
+       /* MCBSP2 */
+       MCBSP2_CLKR,
+       MCBSP2_CLKX,
+       MCBSP2_DR,
+       MCBSP2_DX,
+       MCBSP2_FSR,
+       MCBSP2_FSX,
+
+       /* MCBSP3 */
+       MCBSP3_CLKX,
+
+       /* Misc ballouts */
+       BALLOUT_V8_ARMIO3,
+       N20_HDQ,
+
+       /* OMAP-1610 MMC2 */
+       W8_1610_MMC2_DAT0,
+       V8_1610_MMC2_DAT1,
+       W15_1610_MMC2_DAT2,
+       R10_1610_MMC2_DAT3,
+       Y10_1610_MMC2_CLK,
+       Y8_1610_MMC2_CMD,
+       V9_1610_MMC2_CMDDIR,
+       V5_1610_MMC2_DATDIR0,
+       W19_1610_MMC2_DATDIR1,
+       R18_1610_MMC2_CLKIN,
+
+       /* OMAP-1610 External Trace Interface */
+       M19_1610_ETM_PSTAT0,
+       L15_1610_ETM_PSTAT1,
+       L18_1610_ETM_PSTAT2,
+       L19_1610_ETM_D0,
+       J19_1610_ETM_D6,
+       J18_1610_ETM_D7,
+
+       /* OMAP16XX GPIO */
+       P20_1610_GPIO4,
+       V9_1610_GPIO7,
+       W8_1610_GPIO9,
+       N20_1610_GPIO11,
+       N19_1610_GPIO13,
+       P10_1610_GPIO22,
+       V5_1610_GPIO24,
+       AA20_1610_GPIO_41,
+       W19_1610_GPIO48,
+       M7_1610_GPIO62,
+       V14_16XX_GPIO37,
+       R9_16XX_GPIO18,
+       L14_16XX_GPIO49,
+
+       /* OMAP-1610 uWire */
+       V19_1610_UWIRE_SCLK,
+       U18_1610_UWIRE_SDI,
+       W21_1610_UWIRE_SDO,
+       N14_1610_UWIRE_CS0,
+       P15_1610_UWIRE_CS3,
+       N15_1610_UWIRE_CS1,
+
+       /* OMAP-1610 SPI */
+       U19_1610_SPIF_SCK,
+       U18_1610_SPIF_DIN,
+       P20_1610_SPIF_DIN,
+       W21_1610_SPIF_DOUT,
+       R18_1610_SPIF_DOUT,
+       N14_1610_SPIF_CS0,
+       N15_1610_SPIF_CS1,
+       T19_1610_SPIF_CS2,
+       P15_1610_SPIF_CS3,
+
+       /* OMAP-1610 Flash */
+       L3_1610_FLASH_CS2B_OE,
+       M8_1610_FLASH_CS2B_WE,
+
+       /* First MMC */
+       MMC_CMD,
+       MMC_DAT1,
+       MMC_DAT2,
+       MMC_DAT0,
+       MMC_CLK,
+       MMC_DAT3,
+
+       /* OMAP-1710 MMC CMDDIR and DATDIR0 */
+       M15_1710_MMC_CLKI,
+       P19_1710_MMC_CMDDIR,
+       P20_1710_MMC_DATDIR0,
+
+       /* OMAP-1610 USB0 alternate pin configuration */
+       W9_USB0_TXEN,
+       AA9_USB0_VP,
+       Y5_USB0_RCV,
+       R9_USB0_VM,
+       V6_USB0_TXD,
+       W5_USB0_SE0,
+       V9_USB0_SPEED,
+       V9_USB0_SUSP,
+
+       /* USB2 */
+       W9_USB2_TXEN,
+       AA9_USB2_VP,
+       Y5_USB2_RCV,
+       R9_USB2_VM,
+       V6_USB2_TXD,
+       W5_USB2_SE0,
+
+       /* 16XX UART */
+       R13_1610_UART1_TX,
+       V14_16XX_UART1_RX,
+       R14_1610_UART1_CTS,
+       AA15_1610_UART1_RTS,
+       R9_16XX_UART2_RX,
+       L14_16XX_UART3_RX,
+
+       /* I2C OMAP-1610 */
+       I2C_SCL,
+       I2C_SDA,
+
+       /* Keypad */
+       F18_1610_KBC0,
+       D20_1610_KBC1,
+       D19_1610_KBC2,
+       E18_1610_KBC3,
+       C21_1610_KBC4,
+       G18_1610_KBR0,
+       F19_1610_KBR1,
+       H14_1610_KBR2,
+       E20_1610_KBR3,
+       E19_1610_KBR4,
+       N19_1610_KBR5,
+
+       /* Power management */
+       T20_1610_LOW_PWR,
+
+       /* MCLK Settings */
+       V5_1710_MCLK_ON,
+       V5_1710_MCLK_OFF,
+       R10_1610_MCLK_ON,
+       R10_1610_MCLK_OFF,
+
+       /* CompactFlash controller */
+       P11_1610_CF_CD2,
+       R11_1610_CF_IOIS16,
+       V10_1610_CF_IREQ,
+       W10_1610_CF_RESET,
+       W11_1610_CF_CD1,
+
+       /* parallel camera */
+       J15_1610_CAM_LCLK,
+       J18_1610_CAM_D7,
+       J19_1610_CAM_D6,
+       J14_1610_CAM_D5,
+       K18_1610_CAM_D4,
+       K19_1610_CAM_D3,
+       K15_1610_CAM_D2,
+       K14_1610_CAM_D1,
+       L19_1610_CAM_D0,
+       L18_1610_CAM_VS,
+       L15_1610_CAM_HS,
+       M19_1610_CAM_RSTZ,
+       Y15_1610_CAM_OUTCLK,
+
+       /* serial camera */
+       H19_1610_CAM_EXCLK,
+       Y12_1610_CCP_CLKP,
+       W13_1610_CCP_CLKM,
+       W14_1610_CCP_DATAP,
+       Y14_1610_CCP_DATAM,
+
+};
+
+struct omap_mux_cfg {
+       struct pin_config       *pins;
+       unsigned long           size;
+       int                     (*cfg_reg)(const struct pin_config *cfg);
+};
+
+#ifdef CONFIG_OMAP_MUX
+/* setup pin muxing in Linux */
+extern int omap1_mux_init(void);
+extern int omap_mux_register(struct omap_mux_cfg *);
+extern int omap_cfg_reg(unsigned long reg_cfg);
+#else
+/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */
+static inline int omap1_mux_init(void) { return 0; }
+static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; }
+#endif
+
+extern int omap2_mux_init(void);
+
+#endif
index 6c95a59f0f1648275f2b75db41b11493096ce2d0..6a5baab1f4cb690a46eb2086a97af7ca9babeaa1 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/tlb.h>
 #include <asm/mach/map.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/tc.h>
 #include <plat/dma.h>
 
index 7b1a3833165de05a7de5929cf2b96ad58c7c8e93..4071479f7106aaec5949178aaa3384f8e8616eb4 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/leds.h>
 #include <asm/mach-types.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #include "leds.h"
 
index cf2ed9ef1351a56c1184da416b4f82e3190fe4bc..bdc2e7541adb869fe27d20d2116225c74d2470a6 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/slab.h>
 
 #include <plat/dma.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/cpu.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 
index e9cc52d4cb2869964b933b8a4a74ee844bb003d8..667ce5027f6332cffd81a47435cbce6945f1b2b9 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <mach/hardware.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #ifdef CONFIG_OMAP_MUX
 
@@ -451,6 +451,56 @@ static int __init_or_module omap1_cfg_reg(const struct pin_config *cfg)
 #endif
 }
 
+static struct omap_mux_cfg *mux_cfg;
+
+int __init omap_mux_register(struct omap_mux_cfg *arch_mux_cfg)
+{
+       if (!arch_mux_cfg || !arch_mux_cfg->pins || arch_mux_cfg->size == 0
+                       || !arch_mux_cfg->cfg_reg) {
+               printk(KERN_ERR "Invalid pin table\n");
+               return -EINVAL;
+       }
+
+       mux_cfg = arch_mux_cfg;
+
+       return 0;
+}
+
+/*
+ * Sets the Omap MUX and PULL_DWN registers based on the table
+ */
+int __init_or_module omap_cfg_reg(const unsigned long index)
+{
+       struct pin_config *reg;
+
+       if (!cpu_class_is_omap1()) {
+               printk(KERN_ERR "mux: Broken omap_cfg_reg(%lu) entry\n",
+                               index);
+               WARN_ON(1);
+               return -EINVAL;
+       }
+
+       if (mux_cfg == NULL) {
+               printk(KERN_ERR "Pin mux table not initialized\n");
+               return -ENODEV;
+       }
+
+       if (index >= mux_cfg->size) {
+               printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n",
+                      index, mux_cfg->size);
+               dump_stack();
+               return -ENODEV;
+       }
+
+       reg = &mux_cfg->pins[index];
+
+       if (!mux_cfg->cfg_reg)
+               return -ENODEV;
+
+       return mux_cfg->cfg_reg(reg);
+}
+EXPORT_SYMBOL(omap_cfg_reg);
+
 int __init omap1_mux_init(void)
 {
        if (cpu_is_omap7xx()) {
@@ -468,4 +518,8 @@ int __init omap1_mux_init(void)
        return omap_mux_register(&arch_mux_cfg);
 }
 
-#endif
+#else
+#define omap_mux_init() do {} while(0)
+#define omap_cfg_reg(x)        do {} while(0)
+#endif /* CONFIG_OMAP_MUX */
+
index b2560d32b3a01d455079d43d937124e278c599f8..47ec16155483b057bce3f8c375430923e0d09db6 100644 (file)
@@ -53,7 +53,7 @@
 #include <plat/clock.h>
 #include <plat/sram.h>
 #include <plat/tc.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/dma.h>
 #include <plat/dmtimer.h>
 
index 0d1709b1a6fe10fa1de0a8f62c05ea4007a92f4e..b9d6834af835f27d4f41753dd7cf0aabb6a6ce37 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <asm/mach-types.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/fpga.h>
 
 #include "pm.h"
index 65f88176fba87288a154e708979b6c0c9f98196c..84267edd9421754135290582383a3f372bdd8fac 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <asm/irq.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #include <mach/usb.h>
 
index 8e43c4d885d55e8963a7810c61fd53d668b9e4bf..17950c6e130b12250fa0eb60aac4ae14686e5c85 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <plat/mux.h>
 #include <plat/clock.h>
 
 #include "soc.h"
index 80399d7409526b3680c6e044d527deef05845fb8..03ebf47cfa9a493e1e7ac83cf0a2311110c8c04c 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <plat/mmc.h>
 #include <plat/omap-pm.h>
-#include <plat/mux.h>
 #include <plat/omap_device.h>
 
 #include "mux.h"
index a017e994e00613f4d98bc153516f7f7c8e74bd2d..dacaee009a4efd21bdbcfd11ad0a820828316ef8 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := common.o sram.o clock.o dma.o mux.o fb.o counter_32k.o
+obj-y := common.o sram.o clock.o dma.o fb.o counter_32k.o
 obj-m :=
 obj-n :=
 obj-  :=
index 40bc06a7ac43685a5ae91b253fe649d7444993f1..6013831a043e320fafd5e718a558d422fa67a624 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/clk.h>
 
 #include <mach/irqs.h>
-#include <plat/mux.h>
 #include <plat/i2c.h>
 #include <plat/omap-pm.h>
 #include <plat/omap_device.h>
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h
deleted file mode 100644 (file)
index 3239489..0000000
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/mux.h
- *
- * Table of the Omap register configurations for the FUNC_MUX and
- * PULL_DWN combinations.
- *
- * Copyright (C) 2004 - 2008 Texas Instruments Inc.
- * Copyright (C) 2003 - 2008 Nokia Corporation
- *
- * Written by Tony Lindgren
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * NOTE: Please use the following naming style for new pin entries.
- *      For example, W8_1610_MMC2_DAT0, where:
- *      - W8        = ball
- *      - 1610      = 1510 or 1610, none if common for both 1510 and 1610
- *      - MMC2_DAT0 = function
- */
-
-#ifndef __ASM_ARCH_MUX_H
-#define __ASM_ARCH_MUX_H
-
-#define PU_PD_SEL_NA           0       /* No pu_pd reg available */
-#define PULL_DWN_CTRL_NA       0       /* No pull-down control needed */
-
-#ifdef CONFIG_OMAP_MUX_DEBUG
-#define MUX_REG(reg, mode_offset, mode) .mux_reg_name = "FUNC_MUX_CTRL_"#reg, \
-                                       .mux_reg = FUNC_MUX_CTRL_##reg, \
-                                       .mask_offset = mode_offset, \
-                                       .mask = mode,
-
-#define PULL_REG(reg, bit, status)     .pull_name = "PULL_DWN_CTRL_"#reg, \
-                                       .pull_reg = PULL_DWN_CTRL_##reg, \
-                                       .pull_bit = bit, \
-                                       .pull_val = status,
-
-#define PU_PD_REG(reg, status)         .pu_pd_name = "PU_PD_SEL_"#reg, \
-                                       .pu_pd_reg = PU_PD_SEL_##reg, \
-                                       .pu_pd_val = status,
-
-#define MUX_REG_7XX(reg, mode_offset, mode) .mux_reg_name = "OMAP7XX_IO_CONF_"#reg, \
-                                       .mux_reg = OMAP7XX_IO_CONF_##reg, \
-                                       .mask_offset = mode_offset, \
-                                       .mask = mode,
-
-#define PULL_REG_7XX(reg, bit, status) .pull_name = "OMAP7XX_IO_CONF_"#reg, \
-                                       .pull_reg = OMAP7XX_IO_CONF_##reg, \
-                                       .pull_bit = bit, \
-                                       .pull_val = status,
-
-#else
-
-#define MUX_REG(reg, mode_offset, mode) .mux_reg = FUNC_MUX_CTRL_##reg, \
-                                       .mask_offset = mode_offset, \
-                                       .mask = mode,
-
-#define PULL_REG(reg, bit, status)     .pull_reg = PULL_DWN_CTRL_##reg, \
-                                       .pull_bit = bit, \
-                                       .pull_val = status,
-
-#define PU_PD_REG(reg, status)         .pu_pd_reg = PU_PD_SEL_##reg, \
-                                       .pu_pd_val = status,
-
-#define MUX_REG_7XX(reg, mode_offset, mode) \
-                                       .mux_reg = OMAP7XX_IO_CONF_##reg, \
-                                       .mask_offset = mode_offset, \
-                                       .mask = mode,
-
-#define PULL_REG_7XX(reg, bit, status) .pull_reg = OMAP7XX_IO_CONF_##reg, \
-                                       .pull_bit = bit, \
-                                       .pull_val = status,
-
-#endif /* CONFIG_OMAP_MUX_DEBUG */
-
-#define MUX_CFG(desc, mux_reg, mode_offset, mode,      \
-               pull_reg, pull_bit, pull_status,        \
-               pu_pd_reg, pu_pd_status, debug_status)  \
-{                                                      \
-       .name =  desc,                                  \
-       .debug = debug_status,                          \
-       MUX_REG(mux_reg, mode_offset, mode)             \
-       PULL_REG(pull_reg, pull_bit, pull_status)       \
-       PU_PD_REG(pu_pd_reg, pu_pd_status)              \
-},
-
-
-/*
- * OMAP730/850 has a slightly different config for the pin mux.
- * - config regs are the OMAP7XX_IO_CONF_x regs (see omap7xx.h) regs and
- *   not the FUNC_MUX_CTRL_x regs from hardware.h
- * - for pull-up/down, only has one enable bit which is is in the same register
- *   as mux config
- */
-#define MUX_CFG_7XX(desc, mux_reg, mode_offset, mode,  \
-                  pull_bit, pull_status, debug_status)\
-{                                                      \
-       .name =  desc,                                  \
-       .debug = debug_status,                          \
-       MUX_REG_7XX(mux_reg, mode_offset, mode)         \
-       PULL_REG_7XX(mux_reg, pull_bit, pull_status)    \
-       PU_PD_REG(NA, 0)                \
-},
-
-struct pin_config {
-       char                    *name;
-       const unsigned int      mux_reg;
-       unsigned char           debug;
-
-       const unsigned char mask_offset;
-       const unsigned char mask;
-
-       const char *pull_name;
-       const unsigned int pull_reg;
-       const unsigned char pull_val;
-       const unsigned char pull_bit;
-
-       const char *pu_pd_name;
-       const unsigned int pu_pd_reg;
-       const unsigned char pu_pd_val;
-
-#if    defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
-       const char *mux_reg_name;
-#endif
-
-};
-
-enum omap7xx_index {
-       /* OMAP 730 keyboard */
-       E2_7XX_KBR0,
-       J7_7XX_KBR1,
-       E1_7XX_KBR2,
-       F3_7XX_KBR3,
-       D2_7XX_KBR4,
-       C2_7XX_KBC0,
-       D3_7XX_KBC1,
-       E4_7XX_KBC2,
-       F4_7XX_KBC3,
-       E3_7XX_KBC4,
-
-       /* USB */
-       AA17_7XX_USB_DM,
-       W16_7XX_USB_PU_EN,
-       W17_7XX_USB_VBUSI,
-       W18_7XX_USB_DMCK_OUT,
-       W19_7XX_USB_DCRST,
-
-       /* MMC */
-       MMC_7XX_CMD,
-       MMC_7XX_CLK,
-       MMC_7XX_DAT0,
-
-       /* I2C */
-       I2C_7XX_SCL,
-       I2C_7XX_SDA,
-
-       /* SPI */
-       SPI_7XX_1,
-       SPI_7XX_2,
-       SPI_7XX_3,
-       SPI_7XX_4,
-       SPI_7XX_5,
-       SPI_7XX_6,
-
-       /* UART */
-       UART_7XX_1,
-       UART_7XX_2,
-};
-
-enum omap1xxx_index {
-       /* UART1 (BT_UART_GATING)*/
-       UART1_TX = 0,
-       UART1_RTS,
-
-       /* UART2 (COM_UART_GATING)*/
-       UART2_TX,
-       UART2_RX,
-       UART2_CTS,
-       UART2_RTS,
-
-       /* UART3 (GIGA_UART_GATING) */
-       UART3_TX,
-       UART3_RX,
-       UART3_CTS,
-       UART3_RTS,
-       UART3_CLKREQ,
-       UART3_BCLK,     /* 12MHz clock out */
-       Y15_1610_UART3_RTS,
-
-       /* PWT & PWL */
-       PWT,
-       PWL,
-
-       /* USB master generic */
-       R18_USB_VBUS,
-       R18_1510_USB_GPIO0,
-       W4_USB_PUEN,
-       W4_USB_CLKO,
-       W4_USB_HIGHZ,
-       W4_GPIO58,
-
-       /* USB1 master */
-       USB1_SUSP,
-       USB1_SEO,
-       W13_1610_USB1_SE0,
-       USB1_TXEN,
-       USB1_TXD,
-       USB1_VP,
-       USB1_VM,
-       USB1_RCV,
-       USB1_SPEED,
-       R13_1610_USB1_SPEED,
-       R13_1710_USB1_SE0,
-
-       /* USB2 master */
-       USB2_SUSP,
-       USB2_VP,
-       USB2_TXEN,
-       USB2_VM,
-       USB2_RCV,
-       USB2_SEO,
-       USB2_TXD,
-
-       /* OMAP-1510 GPIO */
-       R18_1510_GPIO0,
-       R19_1510_GPIO1,
-       M14_1510_GPIO2,
-
-       /* OMAP1610 GPIO */
-       P18_1610_GPIO3,
-       Y15_1610_GPIO17,
-
-       /* OMAP-1710 GPIO */
-       R18_1710_GPIO0,
-       V2_1710_GPIO10,
-       N21_1710_GPIO14,
-       W15_1710_GPIO40,
-
-       /* MPUIO */
-       MPUIO2,
-       N15_1610_MPUIO2,
-       MPUIO4,
-       MPUIO5,
-       T20_1610_MPUIO5,
-       W11_1610_MPUIO6,
-       V10_1610_MPUIO7,
-       W11_1610_MPUIO9,
-       V10_1610_MPUIO10,
-       W10_1610_MPUIO11,
-       E20_1610_MPUIO13,
-       U20_1610_MPUIO14,
-       E19_1610_MPUIO15,
-
-       /* MCBSP2 */
-       MCBSP2_CLKR,
-       MCBSP2_CLKX,
-       MCBSP2_DR,
-       MCBSP2_DX,
-       MCBSP2_FSR,
-       MCBSP2_FSX,
-
-       /* MCBSP3 */
-       MCBSP3_CLKX,
-
-       /* Misc ballouts */
-       BALLOUT_V8_ARMIO3,
-       N20_HDQ,
-
-       /* OMAP-1610 MMC2 */
-       W8_1610_MMC2_DAT0,
-       V8_1610_MMC2_DAT1,
-       W15_1610_MMC2_DAT2,
-       R10_1610_MMC2_DAT3,
-       Y10_1610_MMC2_CLK,
-       Y8_1610_MMC2_CMD,
-       V9_1610_MMC2_CMDDIR,
-       V5_1610_MMC2_DATDIR0,
-       W19_1610_MMC2_DATDIR1,
-       R18_1610_MMC2_CLKIN,
-
-       /* OMAP-1610 External Trace Interface */
-       M19_1610_ETM_PSTAT0,
-       L15_1610_ETM_PSTAT1,
-       L18_1610_ETM_PSTAT2,
-       L19_1610_ETM_D0,
-       J19_1610_ETM_D6,
-       J18_1610_ETM_D7,
-
-       /* OMAP16XX GPIO */
-       P20_1610_GPIO4,
-       V9_1610_GPIO7,
-       W8_1610_GPIO9,
-       N20_1610_GPIO11,
-       N19_1610_GPIO13,
-       P10_1610_GPIO22,
-       V5_1610_GPIO24,
-       AA20_1610_GPIO_41,
-       W19_1610_GPIO48,
-       M7_1610_GPIO62,
-       V14_16XX_GPIO37,
-       R9_16XX_GPIO18,
-       L14_16XX_GPIO49,
-
-       /* OMAP-1610 uWire */
-       V19_1610_UWIRE_SCLK,
-       U18_1610_UWIRE_SDI,
-       W21_1610_UWIRE_SDO,
-       N14_1610_UWIRE_CS0,
-       P15_1610_UWIRE_CS3,
-       N15_1610_UWIRE_CS1,
-
-       /* OMAP-1610 SPI */
-       U19_1610_SPIF_SCK,
-       U18_1610_SPIF_DIN,
-       P20_1610_SPIF_DIN,
-       W21_1610_SPIF_DOUT,
-       R18_1610_SPIF_DOUT,
-       N14_1610_SPIF_CS0,
-       N15_1610_SPIF_CS1,
-       T19_1610_SPIF_CS2,
-       P15_1610_SPIF_CS3,
-
-       /* OMAP-1610 Flash */
-       L3_1610_FLASH_CS2B_OE,
-       M8_1610_FLASH_CS2B_WE,
-
-       /* First MMC */
-       MMC_CMD,
-       MMC_DAT1,
-       MMC_DAT2,
-       MMC_DAT0,
-       MMC_CLK,
-       MMC_DAT3,
-
-       /* OMAP-1710 MMC CMDDIR and DATDIR0 */
-       M15_1710_MMC_CLKI,
-       P19_1710_MMC_CMDDIR,
-       P20_1710_MMC_DATDIR0,
-
-       /* OMAP-1610 USB0 alternate pin configuration */
-       W9_USB0_TXEN,
-       AA9_USB0_VP,
-       Y5_USB0_RCV,
-       R9_USB0_VM,
-       V6_USB0_TXD,
-       W5_USB0_SE0,
-       V9_USB0_SPEED,
-       V9_USB0_SUSP,
-
-       /* USB2 */
-       W9_USB2_TXEN,
-       AA9_USB2_VP,
-       Y5_USB2_RCV,
-       R9_USB2_VM,
-       V6_USB2_TXD,
-       W5_USB2_SE0,
-
-       /* 16XX UART */
-       R13_1610_UART1_TX,
-       V14_16XX_UART1_RX,
-       R14_1610_UART1_CTS,
-       AA15_1610_UART1_RTS,
-       R9_16XX_UART2_RX,
-       L14_16XX_UART3_RX,
-
-       /* I2C OMAP-1610 */
-       I2C_SCL,
-       I2C_SDA,
-
-       /* Keypad */
-       F18_1610_KBC0,
-       D20_1610_KBC1,
-       D19_1610_KBC2,
-       E18_1610_KBC3,
-       C21_1610_KBC4,
-       G18_1610_KBR0,
-       F19_1610_KBR1,
-       H14_1610_KBR2,
-       E20_1610_KBR3,
-       E19_1610_KBR4,
-       N19_1610_KBR5,
-
-       /* Power management */
-       T20_1610_LOW_PWR,
-
-       /* MCLK Settings */
-       V5_1710_MCLK_ON,
-       V5_1710_MCLK_OFF,
-       R10_1610_MCLK_ON,
-       R10_1610_MCLK_OFF,
-
-       /* CompactFlash controller */
-       P11_1610_CF_CD2,
-       R11_1610_CF_IOIS16,
-       V10_1610_CF_IREQ,
-       W10_1610_CF_RESET,
-       W11_1610_CF_CD1,
-
-       /* parallel camera */
-       J15_1610_CAM_LCLK,
-       J18_1610_CAM_D7,
-       J19_1610_CAM_D6,
-       J14_1610_CAM_D5,
-       K18_1610_CAM_D4,
-       K19_1610_CAM_D3,
-       K15_1610_CAM_D2,
-       K14_1610_CAM_D1,
-       L19_1610_CAM_D0,
-       L18_1610_CAM_VS,
-       L15_1610_CAM_HS,
-       M19_1610_CAM_RSTZ,
-       Y15_1610_CAM_OUTCLK,
-
-       /* serial camera */
-       H19_1610_CAM_EXCLK,
-       Y12_1610_CCP_CLKP,
-       W13_1610_CCP_CLKM,
-       W14_1610_CCP_DATAP,
-       Y14_1610_CCP_DATAM,
-
-};
-
-struct omap_mux_cfg {
-       struct pin_config       *pins;
-       unsigned long           size;
-       int                     (*cfg_reg)(const struct pin_config *cfg);
-};
-
-#ifdef CONFIG_OMAP_MUX
-/* setup pin muxing in Linux */
-extern int omap1_mux_init(void);
-extern int omap_mux_register(struct omap_mux_cfg *);
-extern int omap_cfg_reg(unsigned long reg_cfg);
-#else
-/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */
-static inline int omap1_mux_init(void) { return 0; }
-static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; }
-#endif
-
-extern int omap2_mux_init(void);
-
-#endif
index a531149823bbef3ff608606f45b544c5f633726e..b2eac60b6904fe457b13c75aafb44dd93fa260d5 100644 (file)
@@ -21,8 +21,6 @@
 #include <linux/device.h>
 #include <linux/pm_qos.h>
 
-#include <plat/mux.h>
-
 #define DRIVER_NAME    "omap_uart"
 
 /*
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
deleted file mode 100644 (file)
index fd0d3aa..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * linux/arch/arm/plat-omap/mux.c
- *
- * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h
- *
- * Copyright (C) 2003 - 2008 Nokia Corporation
- *
- * Written by Tony Lindgren
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/io.h>
-#include <linux/spinlock.h>
-
-#include <asm/system.h>
-
-#include <plat/cpu.h>
-#include <plat/mux.h>
-
-#ifdef CONFIG_OMAP_MUX
-
-static struct omap_mux_cfg *mux_cfg;
-
-int __init omap_mux_register(struct omap_mux_cfg *arch_mux_cfg)
-{
-       if (!arch_mux_cfg || !arch_mux_cfg->pins || arch_mux_cfg->size == 0
-                       || !arch_mux_cfg->cfg_reg) {
-               printk(KERN_ERR "Invalid pin table\n");
-               return -EINVAL;
-       }
-
-       mux_cfg = arch_mux_cfg;
-
-       return 0;
-}
-
-/*
- * Sets the Omap MUX and PULL_DWN registers based on the table
- */
-int __init_or_module omap_cfg_reg(const unsigned long index)
-{
-       struct pin_config *reg;
-
-       if (!cpu_class_is_omap1()) {
-               printk(KERN_ERR "mux: Broken omap_cfg_reg(%lu) entry\n",
-                               index);
-               WARN_ON(1);
-               return -EINVAL;
-       }
-
-       if (mux_cfg == NULL) {
-               printk(KERN_ERR "Pin mux table not initialized\n");
-               return -ENODEV;
-       }
-
-       if (index >= mux_cfg->size) {
-               printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n",
-                      index, mux_cfg->size);
-               dump_stack();
-               return -ENODEV;
-       }
-
-       reg = &mux_cfg->pins[index];
-
-       if (!mux_cfg->cfg_reg)
-               return -ENODEV;
-
-       return mux_cfg->cfg_reg(reg);
-}
-EXPORT_SYMBOL(omap_cfg_reg);
-#else
-#define omap_mux_init() do {} while(0)
-#define omap_cfg_reg(x)        do {} while(0)
-#endif /* CONFIG_OMAP_MUX */
index 87c0293a1eef9370f822c348c7131f24f791bfc0..c6259a8295441a8a6cc81fb8bd828dd052398570 100644 (file)
@@ -36,7 +36,6 @@
 #include <plat/mmc.h>
 #include <asm/gpio.h>
 #include <plat/dma.h>
-#include <plat/mux.h>
 #include <plat/fpga.h>
 
 #define        OMAP_MMC_REG_CMD        0x00
index 0ad06a3bd562fa22300a81740ff3ecca9763462e..fa74efe82206bb0e24addf015ddddc8e379cd087 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/io.h>
 #include <asm/sizes.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/tc.h>
 
 
index a3996a1c63459a67d66e0d4d2fb63f6b14f0ad13..0a94d9dc9c31e8983c987c4f21e49853d265a5c3 100644 (file)
@@ -52,7 +52,7 @@
 #include <asm/io.h>
 #include <asm/mach-types.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #include <mach/omap7xx.h>      /* OMAP7XX_IO_CONF registers */
 
index f8b2d91851f7cbfd509aa35b98119acdc544e948..4531d03503c32371f4b1c5cd505ac38243dafe13 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/io.h>
 #include <asm/mach-types.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include <plat/fpga.h>
 
 #include <mach/hardware.h>
index b67b4bc596c18953b5c9abf997fb3f25605be1fe..89f0709f8935e518d9873e3dcb4cb39316f9bb48 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/dma-mapping.h>
 #include <linux/slab.h>
 #include <plat/dma.h>
-#include <plat/mux.h>
 
 #include "musb_core.h"
 #include "tusb6010.h"
index 7a88667742b663dc64f627560dfc5d34af32d0a7..81f1f9a0be8f160d55b6dd3decce5cf00a448b1a 100644 (file)
@@ -36,7 +36,7 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #include <mach/usb.h>
 
index 92257ef194036c2344b30c581cb5d534d9a49ce0..9a046a4c98f5db8865699f2304c2b50fa83e57e7 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/platform_data/omap1_bl.h>
 
 #include <mach/hardware.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 
 #define OMAPBL_MAX_INTENSITY           0xff
 
index 5914220dfa9cbf46e0dfe81dc9ed34f8817a7af2..3aa62da89195949d89e7dd3bb4d44cc60342c7d4 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/platform_device.h>
 
 #include <asm/gpio.h>
-#include <plat/mux.h>
+#include <mach/mux.h>
 #include "omapfb.h"
 
 static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)