aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx3/mm.c2
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-v3.h5
-rw-r--r--arch/arm/plat-mxc/iomux-v3.c15
3 files changed, 17 insertions, 5 deletions
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c
index c327172159c0..ad5a1122d765 100644
--- a/arch/arm/mach-mx3/mm.c
+++ b/arch/arm/mach-mx3/mm.c
@@ -30,6 +30,7 @@
30 30
31#include <mach/common.h> 31#include <mach/common.h>
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <mach/iomux-v3.h>
33 34
34/*! 35/*!
35 * @file mm.c 36 * @file mm.c
@@ -83,6 +84,7 @@ void __init mx31_map_io(void)
83void __init mx35_map_io(void) 84void __init mx35_map_io(void)
84{ 85{
85 mxc_set_cpu_type(MXC_CPU_MX35); 86 mxc_set_cpu_type(MXC_CPU_MX35);
87 mxc_iomux_v3_init(IO_ADDRESS(IOMUXC_BASE_ADDR));
86 mxc_arch_reset_init(IO_ADDRESS(WDOG_BASE_ADDR)); 88 mxc_arch_reset_init(IO_ADDRESS(WDOG_BASE_ADDR));
87 89
88 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); 90 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h
index cd06df9370cb..a0fa40265468 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h
@@ -113,5 +113,10 @@ void mxc_iomux_v3_release_pad(struct pad_desc *pad);
113 */ 113 */
114void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count); 114void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count);
115 115
116/*
117 * Initialise the iomux controller
118 */
119void mxc_iomux_v3_init(void __iomem *iomux_v3_base);
120
116#endif /* __MACH_IOMUX_V3_H__*/ 121#endif /* __MACH_IOMUX_V3_H__*/
117 122
diff --git a/arch/arm/plat-mxc/iomux-v3.c b/arch/arm/plat-mxc/iomux-v3.c
index 77a078f9513f..851ca99bf1b1 100644
--- a/arch/arm/plat-mxc/iomux-v3.c
+++ b/arch/arm/plat-mxc/iomux-v3.c
@@ -29,7 +29,7 @@
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30#include <mach/iomux-v3.h> 30#include <mach/iomux-v3.h>
31 31
32#define IOMUX_BASE IO_ADDRESS(IOMUXC_BASE_ADDR) 32static void __iomem *base;
33 33
34static unsigned long iomux_v3_pad_alloc_map[0x200 / BITS_PER_LONG]; 34static unsigned long iomux_v3_pad_alloc_map[0x200 / BITS_PER_LONG];
35 35
@@ -45,14 +45,14 @@ int mxc_iomux_v3_setup_pad(struct pad_desc *pad)
45 if (test_and_set_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map)) 45 if (test_and_set_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map))
46 return -EBUSY; 46 return -EBUSY;
47 if (pad->mux_ctrl_ofs) 47 if (pad->mux_ctrl_ofs)
48 __raw_writel(pad->mux_mode, IOMUX_BASE + pad->mux_ctrl_ofs); 48 __raw_writel(pad->mux_mode, base + pad->mux_ctrl_ofs);
49 49
50 if (pad->select_input_ofs) 50 if (pad->select_input_ofs)
51 __raw_writel(pad->select_input, 51 __raw_writel(pad->select_input,
52 IOMUX_BASE + pad->select_input_ofs); 52 base + pad->select_input_ofs);
53 53
54 if (!(pad->pad_ctrl & NO_PAD_CTRL)) 54 if (!(pad->pad_ctrl & NO_PAD_CTRL) && pad->pad_ctrl_ofs)
55 __raw_writel(pad->pad_ctrl, IOMUX_BASE + pad->pad_ctrl_ofs); 55 __raw_writel(pad->pad_ctrl, base + pad->pad_ctrl_ofs);
56 return 0; 56 return 0;
57} 57}
58EXPORT_SYMBOL(mxc_iomux_v3_setup_pad); 58EXPORT_SYMBOL(mxc_iomux_v3_setup_pad);
@@ -96,3 +96,8 @@ void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count)
96 } 96 }
97} 97}
98EXPORT_SYMBOL(mxc_iomux_v3_release_multiple_pads); 98EXPORT_SYMBOL(mxc_iomux_v3_release_multiple_pads);
99
100void mxc_iomux_v3_init(void __iomem *iomux_v3_base)
101{
102 base = iomux_v3_base;
103}