summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2008-05-20 16:29:13 -0400
committerJustin Waters <justin.waters@timesys.com>2008-05-20 16:34:54 -0400
commit8063d396638e4dad0d713bd7abbc1dd7ad190e1a (patch)
tree712097e8fc66044478fb7a24189867c4e00cd436
parent304d61558ceff4813567507e8c18a476f0c11594 (diff)
MX27LITE_GPIO: Fix GPIO conflicts between USB Host 2 and SPI 1
USB Host 2 and SPI 1 only conflict with one pin. If the SPI bus is not using the slave select 2 (SS2) pin (which the Atlas chip does not), then you can use both the SPI 1 and USB Host 2 interfaces simultaneously. This patch disables the MSB of the slave select if Host 2 is enabled. This will limit SPI1 to only 4 slaves instead of 8. Signed-off-by: Justin Waters <justin.waters@timesys.com>
-rw-r--r--arch/arm/mach-mx27/mx27lite_gpio.c14
-rw-r--r--drivers/usb/host/Kconfig2
2 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/mach-mx27/mx27lite_gpio.c b/arch/arm/mach-mx27/mx27lite_gpio.c
index 45b1e68fb791..395517e1f55a 100644
--- a/arch/arm/mach-mx27/mx27lite_gpio.c
+++ b/arch/arm/mach-mx27/mx27lite_gpio.c
@@ -407,7 +407,11 @@ void gpio_spi_active(int cspi_mod)
gpio_request_mux(MX27_PIN_CSPI1_RDY, GPIO_MUX_PRIMARY);
gpio_request_mux(MX27_PIN_CSPI1_SS0, GPIO_MUX_PRIMARY);
gpio_request_mux(MX27_PIN_CSPI1_SS1, GPIO_MUX_PRIMARY);
+
+/* This pin conflicts with the USB Host 2 Interface. */
+#if !defined(CONFIG_USB_EHCI_ARC_H2)
gpio_request_mux(MX27_PIN_CSPI1_SS2, GPIO_MUX_PRIMARY);
+#endif
break;
case 1:
/*SPI2 */
@@ -420,10 +424,10 @@ void gpio_spi_active(int cspi_mod)
break;
case 2:
/*SPI3 */
- gpio_request_mux(MX27_PIN_SD1_D0, GPIO_MUX_ALT);
- gpio_request_mux(MX27_PIN_SD1_CMD, GPIO_MUX_ALT);
- gpio_request_mux(MX27_PIN_SD1_CLK, GPIO_MUX_ALT);
- gpio_request_mux(MX27_PIN_SD1_D3, GPIO_MUX_ALT);
+ gpio_request_mux(MX27_PIN_SD1_D0, GPIO_MUX_ALT); /* MISO */
+ gpio_request_mux(MX27_PIN_SD1_CMD, GPIO_MUX_ALT); /* MOSI */
+ gpio_request_mux(MX27_PIN_SD1_CLK, GPIO_MUX_ALT); /* SCLK */
+ gpio_request_mux(MX27_PIN_SD1_D3, GPIO_MUX_ALT); /* SS */
break;
default:
@@ -447,7 +451,9 @@ void gpio_spi_inactive(int cspi_mod)
gpio_free_mux(MX27_PIN_CSPI1_RDY);
gpio_free_mux(MX27_PIN_CSPI1_SS0);
gpio_free_mux(MX27_PIN_CSPI1_SS1);
+#if !defined(CONFIG_USB_EHCI_ARC_H2)
gpio_free_mux(MX27_PIN_CSPI1_SS2);
+#endif
break;
case 1:
/*SPI2 */
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index cc7e2449a934..fce00f72d362 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -48,7 +48,7 @@ config USB_EHCI_ARC_H1
config USB_EHCI_ARC_H2
bool "Support for Host2 port on Freescale controller"
depends on USB_EHCI_ARC && \
- ((ARCH_MX27 && !SPI_MXC_SELECT1 && !SPI_MXC_SELECT2) || \
+ ((ARCH_MX27 && !SPI_MXC_SELECT2) || \
ARCH_MX3)
---help---
Enable support for the USB Host2 port.