* [PATCH 0/3] omap4: pandaboard: machine cleanups
@ 2010-10-07 19:36 David Anders
2010-10-07 19:36 ` [PATCH 1/3] omap4: pandaboard: remove unused hsmmc definition David Anders
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: David Anders @ 2010-10-07 19:36 UTC (permalink / raw)
To: linux-arm-kernel
PandaBoard machine file related cleanups.
David Anders (3):
omap4: pandaboard: remove unused hsmmc definition
omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
omap4: pandaboard: enable the ehci port on pandaboard
arch/arm/mach-omap2/board-omap4panda.c | 69 +++++++++++++++++++++++++++++---
1 files changed, 63 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] omap4: pandaboard: remove unused hsmmc definition
2010-10-07 19:36 [PATCH 0/3] omap4: pandaboard: machine cleanups David Anders
@ 2010-10-07 19:36 ` David Anders
2010-10-07 19:36 ` [PATCH 2/3] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set David Anders
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Anders @ 2010-10-07 19:36 UTC (permalink / raw)
To: linux-arm-kernel
remove the second hsmmc definition as it is only used on the
expansion header of the PandaBoard and can be mux for other
functions.
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
arch/arm/mach-omap2/board-omap4panda.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 992a03e..dc16884 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -98,10 +98,6 @@ static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
.supply = "vmmc",
.dev_name = "mmci-omap-hs.0",
},
- {
- .supply = "vmmc",
- .dev_name = "mmci-omap-hs.1",
- },
};
static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -187,7 +183,7 @@ static struct regulator_init_data omap4_panda_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
- .num_consumer_supplies = 2,
+ .num_consumer_supplies = 1,
.consumer_supplies = omap4_panda_vmmc_supply,
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
2010-10-07 19:36 [PATCH 0/3] omap4: pandaboard: machine cleanups David Anders
2010-10-07 19:36 ` [PATCH 1/3] omap4: pandaboard: remove unused hsmmc definition David Anders
@ 2010-10-07 19:36 ` David Anders
2010-10-07 19:36 ` [PATCH 3/3] omap4: pandaboard: enable the ehci port on pandaboard David Anders
2010-10-08 18:08 ` [PATCH 0/3] omap4: pandaboard: machine cleanups Tony Lindgren
3 siblings, 0 replies; 5+ messages in thread
From: David Anders @ 2010-10-07 19:36 UTC (permalink / raw)
To: linux-arm-kernel
Avoid possible crash if CONFIG_MMC_OMAP_HS is not set.
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
arch/arm/mach-omap2/board-omap4panda.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index dc16884..9327ad4 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -116,7 +116,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
{
- struct omap_mmc_platform_data *pdata = dev->platform_data;
+ struct omap_mmc_platform_data *pdata;
+
+ /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
+ if (!dev) {
+ pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n");
+ return;
+ }
+ pdata = dev->platform_data;
pdata->init = omap4_twl6030_hsmmc_late_init;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] omap4: pandaboard: enable the ehci port on pandaboard
2010-10-07 19:36 [PATCH 0/3] omap4: pandaboard: machine cleanups David Anders
2010-10-07 19:36 ` [PATCH 1/3] omap4: pandaboard: remove unused hsmmc definition David Anders
2010-10-07 19:36 ` [PATCH 2/3] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set David Anders
@ 2010-10-07 19:36 ` David Anders
2010-10-08 18:08 ` [PATCH 0/3] omap4: pandaboard: machine cleanups Tony Lindgren
3 siblings, 0 replies; 5+ messages in thread
From: David Anders @ 2010-10-07 19:36 UTC (permalink / raw)
To: linux-arm-kernel
The OMAP4 PandaBoard has EHCI port1 hooked up to an external
SMSC3320 transciever. GPIO 1 is used to power on the transceiver
and GPIO 62 for reset on the transceiver.
Signed-off-by: David Anders <x0132446@ti.com>
---
arch/arm/mach-omap2/board-omap4panda.c | 54 ++++++++++++++++++++++++++++++++
1 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 9327ad4..a9d8a19 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -41,6 +41,9 @@
#include "hsmmc.h"
#include "control.h"
+#define GPIO_HUB_POWER 1
+#define GPIO_HUB_NRESET 62
+
static struct gpio_led gpio_leds[] = {
{
.name = "pandaboard::status1",
@@ -78,6 +81,56 @@ static void __init omap4_panda_init_irq(void)
omap_gpio_init();
}
+static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+ .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+ .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+ .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+ .phy_reset = false,
+ .reset_gpio_port[0] = -EINVAL,
+ .reset_gpio_port[1] = -EINVAL,
+ .reset_gpio_port[2] = -EINVAL
+};
+
+static void __init omap4_ehci_init(void)
+{
+ int ret;
+
+
+ /* disable the power to the usb hub prior to init */
+ ret = gpio_request(GPIO_HUB_POWER, "hub_power");
+ if (ret) {
+ pr_err("Cannot request GPIO %d\n", GPIO_HUB_POWER);
+ goto error1;
+ }
+ gpio_export(GPIO_HUB_POWER, 0);
+ gpio_direction_output(GPIO_HUB_POWER, 0);
+ gpio_set_value(GPIO_HUB_POWER, 0);
+
+ /* reset phy+hub */
+ ret = gpio_request(GPIO_HUB_NRESET, "hub_nreset");
+ if (ret) {
+ pr_err("Cannot request GPIO %d\n", GPIO_HUB_NRESET);
+ goto error2;
+ }
+ gpio_export(GPIO_HUB_NRESET, 0);
+ gpio_direction_output(GPIO_HUB_NRESET, 0);
+ gpio_set_value(GPIO_HUB_NRESET, 0);
+ gpio_set_value(GPIO_HUB_NRESET, 1);
+
+ usb_ehci_init(&ehci_pdata);
+
+ /* enable power to hub */
+ gpio_set_value(GPIO_HUB_POWER, 1);
+ return;
+
+error2:
+ gpio_free(GPIO_HUB_POWER);
+error1:
+ pr_err("Unable to initialize EHCI power/reset\n");
+ return;
+
+}
+
static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_UTMI,
.mode = MUSB_PERIPHERAL,
@@ -314,6 +367,7 @@ static void __init omap4_panda_init(void)
omap4_twl6030_hsmmc_init(mmc);
/* OMAP4 Panda uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
+ omap4_ehci_init();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
if (!cpu_is_omap44xx())
usb_musb_init(&musb_board_data);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 0/3] omap4: pandaboard: machine cleanups
2010-10-07 19:36 [PATCH 0/3] omap4: pandaboard: machine cleanups David Anders
` (2 preceding siblings ...)
2010-10-07 19:36 ` [PATCH 3/3] omap4: pandaboard: enable the ehci port on pandaboard David Anders
@ 2010-10-08 18:08 ` Tony Lindgren
3 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2010-10-08 18:08 UTC (permalink / raw)
To: linux-arm-kernel
* David Anders <x0132446@ti.com> [101007 12:28]:
> PandaBoard machine file related cleanups.
>
> David Anders (3):
> omap4: pandaboard: remove unused hsmmc definition
> omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
> omap4: pandaboard: enable the ehci port on pandaboard
Thanks, adding these into omap-for-linus.
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-08 18:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 19:36 [PATCH 0/3] omap4: pandaboard: machine cleanups David Anders
2010-10-07 19:36 ` [PATCH 1/3] omap4: pandaboard: remove unused hsmmc definition David Anders
2010-10-07 19:36 ` [PATCH 2/3] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set David Anders
2010-10-07 19:36 ` [PATCH 3/3] omap4: pandaboard: enable the ehci port on pandaboard David Anders
2010-10-08 18:08 ` [PATCH 0/3] omap4: pandaboard: machine cleanups Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).