summaryrefslogtreecommitdiff
path: root/arch/arm/imx-common/iomux-v3.c
diff options
context:
space:
mode:
authorNitin Garg <nitin.garg@freescale.com>2014-05-27 12:11:43 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-05-27 22:17:02 -0500
commitd0912be964679ada052bcd07a03d4689e84dce2e (patch)
tree65c87cd94547001c93d6d2a591b9eb6b7437d828 /arch/arm/imx-common/iomux-v3.c
parent748eac71fde78aa0c2e8cb3a3bab94bd994c06f5 (diff)
downloadu-boot-imx-d0912be964679ada052bcd07a03d4689e84dce2e.zip
u-boot-imx-d0912be964679ada052bcd07a03d4689e84dce2e.tar.gz
u-boot-imx-d0912be964679ada052bcd07a03d4689e84dce2e.tar.bz2
ENGR00315499-6 ARM:imx6: Add USB gadget driver imx_udc to support Android fastboot
Android fastboot leans on the USB gadget driver to communicate with host. Porting the imx_udc driver from v2009.08 with two changes: adding resource/memory release APIs and replacing the uncached memory with cache flush&invalidate operations. Pins and Clocks initialization are added to support boards: mx6qdlsabresd, mx6qdlsabreauto, mx6slevk Signed-off-by: Ye.Li <B37916@freescale.com> Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Diffstat (limited to 'arch/arm/imx-common/iomux-v3.c')
-rw-r--r--arch/arm/imx-common/iomux-v3.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c
index b59b802..11cfc33 100644
--- a/arch/arm/imx-common/iomux-v3.c
+++ b/arch/arm/imx-common/iomux-v3.c
@@ -55,3 +55,18 @@ void imx_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t const *pad_list,
for (i = 0; i < count; i++)
imx_iomux_v3_setup_pad(*p++);
}
+
+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);
+}