summaryrefslogtreecommitdiff
path: root/cpu/arm_cortexa8/mx6/iomux-v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/arm_cortexa8/mx6/iomux-v3.c')
-rw-r--r--cpu/arm_cortexa8/mx6/iomux-v3.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cpu/arm_cortexa8/mx6/iomux-v3.c b/cpu/arm_cortexa8/mx6/iomux-v3.c
index 4f31567..fbd738f 100644
--- a/cpu/arm_cortexa8/mx6/iomux-v3.c
+++ b/cpu/arm_cortexa8/mx6/iomux-v3.c
@@ -69,6 +69,20 @@ int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count)
return 0;
}
+void mxc_iomux_set_gpr_register(int group, int start_bit, int num_bits, int value)
+{
+ int i = 0;
+ u32 reg;
+ reg = readl(base + group * 4);
+ while (num_bits) {
+ reg &= ~(1<<(start_bit + i));
+ i++;
+ num_bits--;
+ }
+ reg |= (value << start_bit);
+ writel(reg, base + group * 4);
+}
+
void mxc_iomux_v3_init(void *iomux_v3_base)
{
base = iomux_v3_base;