diff options
Diffstat (limited to 'arch/arm/mach-tegra/init_common.c')
-rw-r--r-- | arch/arm/mach-tegra/init_common.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/arch/arm/mach-tegra/init_common.c b/arch/arm/mach-tegra/init_common.c index 677d17eb8388..0d572830c3f8 100644 --- a/arch/arm/mach-tegra/init_common.c +++ b/arch/arm/mach-tegra/init_common.c @@ -304,70 +304,6 @@ fail: #if !defined(CONFIG_I2C_TEGRA) #define tegra_register_i2c() do { } while (0) #else -static int __init tegra_map_i2c_odm_to_bus(NvOdmIoModule Module, - NvU32 Instance, NvU32 PinMuxConfig) -{ - NvOdmIoModule SearchModule; - NvU32 SearchInstance; - int cnt = 0; - - const NvU32 *pPinMuxes; - NvU32 NumPinMuxes; - - // FIXME: Pinmux multiplexing is an ugly hack.. we instantiate - // "N" buses (hard-coded to the maximum number of I2C instance 2 - // configurations), and assign peripherals to the bus ID which - // matches the requested pin mux. Too much chip-specific stuff - // here, but pin-muxing has always been ugly... - if (PinMuxConfig && (Module!=NvOdmIoModule_I2c || Instance!= 2 || - PinMuxConfig > NvOdmI2cPinMap_Config4)) - return -1; - - for (SearchModule = NvOdmIoModule_I2c_Pmu; - SearchModule >= NvOdmIoModule_I2c; - SearchModule--) - { - NvOdmQueryPinMux(SearchModule, &pPinMuxes, &NumPinMuxes); - for (SearchInstance = 0; SearchInstance < NumPinMuxes; - SearchInstance++) - { - if (!pPinMuxes[SearchInstance]) - continue; - -#ifdef CONFIG_NVEC - /* nvec uses instance 0 as I2C slave */ - if (SearchModule == NvOdmIoModule_I2c && - SearchInstance == 0) - { - continue; - } -#endif - if (SearchModule==Module && SearchInstance==Instance) - { - if (PinMuxConfig && - pPinMuxes[Instance]!=NvOdmI2cPinMap_Multiplexed) - return -1; - - if (pPinMuxes[Instance]==NvOdmI2cPinMap_Multiplexed && - !PinMuxConfig) - return -1; - - if (PinMuxConfig) - return cnt + (PinMuxConfig - NvOdmI2cPinMap_Config1); - - return cnt; - } - - if (pPinMuxes[SearchInstance]==NvOdmI2cPinMap_Multiplexed) - cnt += (int)NvOdmI2cPinMap_Config4; - else - cnt++; - } - - } - return -1; -} - static void __init tegra_register_i2c(void) { NvU32 Num, Cnt; |