diff options
author | Richard Zhu <r65037@freescale.com> | 2010-03-17 15:57:27 +0800 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-25 11:17:22 +0200 |
commit | 0721e5759a9714c87b0ecb6a793f933a928ed96a (patch) | |
tree | 9b23d9791e60c6559f1350e0ce63f9a4ef4b5f93 /arch/arm/mach-mx28/pinctrl.c | |
parent | 5c9c48987d899e6e3862314d2959a72784d5aa98 (diff) |
ENGR00121661 [MX28] Fix the CD isn't functional issue on SSP ports
There are IOMUX conflictions between SSP1 and GPMI device,
when the GPMI is enabled, and the SSP1 device is not
enabled properly. The Card Detect func would be failed.
Solution: Just register the functional device into system
can solve this problem
Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/mach-mx28/pinctrl.c')
-rw-r--r-- | arch/arm/mach-mx28/pinctrl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-mx28/pinctrl.c b/arch/arm/mach-mx28/pinctrl.c index 32c6e1f6177f..296f4036395d 100644 --- a/arch/arm/mach-mx28/pinctrl.c +++ b/arch/arm/mach-mx28/pinctrl.c @@ -96,6 +96,19 @@ static void mx28_set_type(struct pin_bank *bank, __raw_writel(cfg << id, addr + SET_REGISTER); } +static int mx28_get_type(struct pin_bank *bank, + unsigned int id) +{ + void __iomem *addr; + int ret; + addr = PINCTRL_BASE_ADDR + HW_PINCTRL_MUXSEL0; + addr += 0x20 * bank->id + 0x10 * (id >> 4); + id &= 0xF; + id *= 2; + ret = (__raw_readl(addr) >> id) & 0x3; + return ret; +} + static struct pin_bank mx28_pin_banks[6] = { [0] = { .id = 0, @@ -132,6 +145,7 @@ static struct pinctrl_chip mx28_pinctrl = { .set_voltage = mx28_set_voltage, .set_pullup = mx28_set_pullup, .set_type = mx28_set_type, + .get_type = mx28_get_type, }; int __init mx28_pinctrl_init(void) |