diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 56446d2b2844abfc22f729a14cc3c8eff50eb20c..275d7e50ae101a6df06073e66d9f42fb3c556b3d 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index ad5ba9f00efeedfee2aece781ab59bc952c54df0..63aa634ce29ff17ec34f88a09c2376680a424ffd 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index 04b5fdaff8318d50822e9d6da639ca4d25fc4a45..4ec579fdd366e15c034c07d186eeb3c16dacf4cb 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 519d827570bbb752fb00ac8d0a91a00044c5121b..093297e50ec7655fc316ef6494143dd1fcbb830c 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4733eb510bad4955dcb216854b6c965b3b1ccd01..adc0373299eca5462299491b98ea5394dd965c3b 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 083afa79dfb14e6340488a10eb3b8e2c3b260edf..04a67230cc944ad9e3492dd7da708b77f1f62189 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 7b9fc99e705ed45b28581c9ff7c8919c4185fec9..7d5c06d6a52a4428cf9243d44f4239ee92616c98 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index c780a1b80c2a81fff7d422b8dd36f7718b9e1e67..3ef0bba65b61489971d374521532c2d23d7678d7 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index e46f5c2ea63ff7e05502d47c295a741b6b4d5258..b633b386240ea640162d29fa3d767896d010a66b 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index e1c842be749ef14d25852c237e340e4398df24c1..518b94dbeae140f85fe8595114fd62df34a9ff3f 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index a71b7f59b7c3f860269cb44754d460cb1e80392c..f4a615d61f695ad6f4ee764f96d710b953c6eb45 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 87797025d6bb8722cf79e75c0fb12591c11a87f5..cc38e36b3764540890b76ac58fa9f3c2df6dfb6c 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index a6a1ab638292afbfe7b35565b15542da227fd165..2fddf6f0b39a561704b09a1f8e63b689cd91205d 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 1668af3017de73316d81df71fd6aec7287f01cc9..bd7b3fc18a49b5f1f555650a29684ed23b69602c 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 05fdbd992c778eb044c6ec50911badcde887b35a..0cc54dd553e36fa7c56d9a56b46adba881fdc2f8 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index 5446c9912641fa502416ba6e9ce01f8215a67bee..a0551a6d7451efe3b851e0abb961c74be6038c35 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c @@ -20,7 +20,7 @@ */ #include -#include +#include #include void __init omap1_i2c_mux_pins(int bus_id) diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/mach-omap1/include/mach/mux.h similarity index 100% rename from arch/arm/plat-omap/include/plat/mux.h rename to arch/arm/mach-omap1/include/mach/mux.h diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 6c95a59f0f1648275f2b75db41b11493096ce2d0..6a5baab1f4cb690a46eb2086a97af7ca9babeaa1 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c index 7b1a3833165de05a7de5929cf2b96ad58c7c8e93..4071479f7106aaec5949178aaa3384f8e8616eb4 100644 --- a/arch/arm/mach-omap1/leds.c +++ b/arch/arm/mach-omap1/leds.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include "leds.h" diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index cf2ed9ef1351a56c1184da416b4f82e3190fe4bc..bdc2e7541adb869fe27d20d2116225c74d2470a6 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index e9cc52d4cb2869964b933b8a4a74ee844bb003d8..667ce5027f6332cffd81a47435cbce6945f1b2b9 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c @@ -29,7 +29,7 @@ #include -#include +#include #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 */ + diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index b2560d32b3a01d455079d43d937124e278c599f8..47ec16155483b057bce3f8c375430923e0d09db6 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 0d1709b1a6fe10fa1de0a8f62c05ea4007a92f4e..b9d6834af835f27d4f41753dd7cf0aabb6a6ce37 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -22,7 +22,7 @@ #include -#include +#include #include #include "pm.h" diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 65f88176fba87288a154e708979b6c0c9f98196c..84267edd9421754135290582383a3f372bdd8fac 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -26,7 +26,7 @@ #include -#include +#include #include diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c index 8e43c4d885d55e8963a7810c61fd53d668b9e4bf..17950c6e130b12250fa0eb60aac4ae14686e5c85 100644 --- a/arch/arm/mach-omap2/common.c +++ b/arch/arm/mach-omap2/common.c @@ -17,7 +17,6 @@ #include #include -#include #include #include "soc.h" diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 80399d7409526b3680c6e044d527deef05845fb8..03ebf47cfa9a493e1e7ac83cf0a2311110c8c04c 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -19,7 +19,6 @@ #include #include -#include #include #include "mux.h" diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index a017e994e00613f4d98bc153516f7f7c8e74bd2d..dacaee009a4efd21bdbcfd11ad0a820828316ef8 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -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- := diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 40bc06a7ac43685a5ae91b253fe649d7444993f1..6013831a043e320fafd5e718a558d422fa67a624 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index a531149823bbef3ff608606f45b544c5f633726e..b2eac60b6904fe457b13c75aafb44dd93fa260d5 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h @@ -21,8 +21,6 @@ #include #include -#include - #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 index fd0d3aad00ef7990432dc8c2b24e82bf55498a11..0000000000000000000000000000000000000000 --- a/arch/arm/plat-omap/mux.c +++ /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 -#include -#include -#include -#include - -#include - -#include -#include - -#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 */ diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 87c0293a1eef9370f822c348c7131f24f791bfc0..c6259a8295441a8a6cc81fb8bd828dd052398570 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #define OMAP_MMC_REG_CMD 0x00 diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 0ad06a3bd562fa22300a81740ff3ecca9763462e..fa74efe82206bb0e24addf015ddddc8e379cd087 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index a3996a1c63459a67d66e0d4d2fb63f6b14f0ad13..0a94d9dc9c31e8983c987c4f21e49853d265a5c3 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include /* OMAP7XX_IO_CONF registers */ diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index f8b2d91851f7cbfd509aa35b98119acdc544e948..4531d03503c32371f4b1c5cd505ac38243dafe13 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index b67b4bc596c18953b5c9abf997fb3f25605be1fe..89f0709f8935e518d9873e3dcb4cb39316f9bb48 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -17,7 +17,6 @@ #include #include #include -#include #include "musb_core.h" #include "tusb6010.h" diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index 7a88667742b663dc64f627560dfc5d34af32d0a7..81f1f9a0be8f160d55b6dd3decce5cf00a448b1a 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c index 92257ef194036c2344b30c581cb5d534d9a49ce0..9a046a4c98f5db8865699f2304c2b50fa83e57e7 100644 --- a/drivers/video/backlight/omap1_bl.c +++ b/drivers/video/backlight/omap1_bl.c @@ -30,7 +30,7 @@ #include #include -#include +#include #define OMAPBL_MAX_INTENSITY 0xff diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c index 5914220dfa9cbf46e0dfe81dc9ed34f8817a7af2..3aa62da89195949d89e7dd3bb4d44cc60342c7d4 100644 --- a/drivers/video/omap/lcd_osk.c +++ b/drivers/video/omap/lcd_osk.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include "omapfb.h" static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)