* [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-09-21 21:24 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
@ 2010-09-21 21:24 ` David Anders
2010-09-22 7:28 ` Bryan Wu
0 siblings, 1 reply; 14+ messages in thread
From: David Anders @ 2010-09-21 21:24 UTC (permalink / raw)
To: jayabharath, gadiyar, vpasam, tony, linux-omap; +Cc: David Anders
Adding card detect callback function and card detect configuration
function for MMC1 Controller.
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
patch depends on https://patchwork.kernel.org/patch/189952/
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 697c0bd..94e819c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct omap_mmc_platform_data *pdata = dev->platform_data;
/* Setting MMC1 Card detect Irq */
- if (pdev->id == 0)
+ if (pdev->id == 0) {
+ ret = twl6030_mmc_card_detect_config();
+ if (ret)
+ pr_err("Failed configuring MMC1 card detect\n");
pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
+ pdata->slots[0].card_detect = twl6030_mmc_card_detect;
+ }
return ret;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-09-21 21:24 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
@ 2010-09-22 7:28 ` Bryan Wu
2010-09-22 8:43 ` Gadiyar, Anand
0 siblings, 1 reply; 14+ messages in thread
From: Bryan Wu @ 2010-09-22 7:28 UTC (permalink / raw)
To: David Anders; +Cc: jayabharath, gadiyar, vpasam, tony, linux-omap
On Wed, Sep 22, 2010 at 5:24 AM, David Anders <x0132446@ti.com> wrote:
> Adding card detect callback function and card detect configuration
> function for MMC1 Controller.
>
> Signed-off-by: David Anders <x0132446@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> ---
>
> patch depends on https://patchwork.kernel.org/patch/189952/
>
> arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index 697c0bd..94e819c 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
> struct omap_mmc_platform_data *pdata = dev->platform_data;
>
> /* Setting MMC1 Card detect Irq */
> - if (pdev->id == 0)
> + if (pdev->id == 0) {
> + ret = twl6030_mmc_card_detect_config();
It looks like we need this function from twl6030 driver, otherwise we
will get this compiling error:
----
In file included from arch/arm/mach-omap2/board-omap4panda.c:38:
arch/arm/plat-omap/include/plat/usb.h:109: warning: return type
defaults to 'int'
arch/arm/mach-omap2/board-omap4panda.c: In function
'omap4_twl6030_hsmmc_late_init':
arch/arm/mach-omap2/board-omap4panda.c:81: error: implicit declaration
of function 'twl6030_mmc_card_detect_config'
arch/arm/mach-omap2/board-omap4panda.c:86: error:
'twl6030_mmc_card_detect' undeclared (first use in this function)
arch/arm/mach-omap2/board-omap4panda.c:86: error: (Each undeclared
identifier is reported only once
arch/arm/mach-omap2/board-omap4panda.c:86: error: for each function it
appears in.)
arch/arm/mach-omap2/board-omap4panda.c: In function 'omap4_panda_init':
arch/arm/mach-omap2/board-omap4panda.c:285: warning: unused variable 'status'
----
Thanks,
-Bryan
> + if (ret)
> + pr_err("Failed configuring MMC1 card detect\n");
> pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
> MMCDETECT_INTR_OFFSET;
> + pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> + }
> return ret;
> }
>
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-09-22 7:28 ` Bryan Wu
@ 2010-09-22 8:43 ` Gadiyar, Anand
2010-09-22 14:40 ` David Anders
0 siblings, 1 reply; 14+ messages in thread
From: Gadiyar, Anand @ 2010-09-22 8:43 UTC (permalink / raw)
To: Bryan Wu; +Cc: David Anders, jayabharath, vpasam, tony, linux-omap
On Wed, Sep 22, 2010 at 12:58 PM, Bryan Wu <bryan.wu@canonical.com> wrote:
> On Wed, Sep 22, 2010 at 5:24 AM, David Anders <x0132446@ti.com> wrote:
>> Adding card detect callback function and card detect configuration
>> function for MMC1 Controller.
>>
>> Signed-off-by: David Anders <x0132446@ti.com>
>> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
>> ---
>>
>> patch depends on https://patchwork.kernel.org/patch/189952/
>>
>> arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
>> 1 files changed, 6 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
>> index 697c0bd..94e819c 100644
>> --- a/arch/arm/mach-omap2/board-omap4panda.c
>> +++ b/arch/arm/mach-omap2/board-omap4panda.c
>> @@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
>> struct omap_mmc_platform_data *pdata = dev->platform_data;
>>
>> /* Setting MMC1 Card detect Irq */
>> - if (pdev->id == 0)
>> + if (pdev->id == 0) {
>> + ret = twl6030_mmc_card_detect_config();
>
> It looks like we need this function from twl6030 driver, otherwise we
> will get this compiling error:
>
> ----
> In file included from arch/arm/mach-omap2/board-omap4panda.c:38:
> arch/arm/plat-omap/include/plat/usb.h:109: warning: return type
> defaults to 'int'
> arch/arm/mach-omap2/board-omap4panda.c: In function
> 'omap4_twl6030_hsmmc_late_init':
> arch/arm/mach-omap2/board-omap4panda.c:81: error: implicit declaration
> of function 'twl6030_mmc_card_detect_config'
> arch/arm/mach-omap2/board-omap4panda.c:86: error:
> 'twl6030_mmc_card_detect' undeclared (first use in this function)
> arch/arm/mach-omap2/board-omap4panda.c:86: error: (Each undeclared
> identifier is reported only once
> arch/arm/mach-omap2/board-omap4panda.c:86: error: for each function it
> appears in.)
> arch/arm/mach-omap2/board-omap4panda.c: In function 'omap4_panda_init':
> arch/arm/mach-omap2/board-omap4panda.c:285: warning: unused variable 'status'
> ----
>
> Thanks,
> -Bryan
I thought the dependent patch [1] took care of this in the header file?
(Haven't actually tried this out - will take a look in a bit)
[1] https://patchwork.kernel.org/patch/189952/
>
>
>> + if (ret)
>> + pr_err("Failed configuring MMC1 card detect\n");
>> pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
>> MMCDETECT_INTR_OFFSET;
>> + pdata->slots[0].card_detect = twl6030_mmc_card_detect;
>> + }
>> return ret;
>> }
>>
\
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-09-22 8:43 ` Gadiyar, Anand
@ 2010-09-22 14:40 ` David Anders
0 siblings, 0 replies; 14+ messages in thread
From: David Anders @ 2010-09-22 14:40 UTC (permalink / raw)
To: Gadiyar, Anand
Cc: Bryan Wu, Goluguri, Jayabharath, Pasam, Vijay, tony@atomide.com,
linux-omap@vger.kernel.org
On 09/22/2010 03:43 AM, Gadiyar, Anand wrote:
> On Wed, Sep 22, 2010 at 12:58 PM, Bryan Wu<bryan.wu@canonical.com> wrote:
>
>> On Wed, Sep 22, 2010 at 5:24 AM, David Anders<x0132446@ti.com> wrote:
>>
>>> Adding card detect callback function and card detect configuration
>>> function for MMC1 Controller.
>>>
>>> Signed-off-by: David Anders<x0132446@ti.com>
>>> Signed-off-by: Anand Gadiyar<gadiyar@ti.com>
>>> ---
>>>
>>> patch depends on https://patchwork.kernel.org/patch/189952/
>>>
>>> arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
>>> 1 files changed, 6 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
>>> index 697c0bd..94e819c 100644
>>> --- a/arch/arm/mach-omap2/board-omap4panda.c
>>> +++ b/arch/arm/mach-omap2/board-omap4panda.c
>>> @@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
>>> struct omap_mmc_platform_data *pdata = dev->platform_data;
>>>
>>> /* Setting MMC1 Card detect Irq */
>>> - if (pdev->id == 0)
>>> + if (pdev->id == 0) {
>>> + ret = twl6030_mmc_card_detect_config();
>>>
>> It looks like we need this function from twl6030 driver, otherwise we
>> will get this compiling error:
>>
>> ----
>> In file included from arch/arm/mach-omap2/board-omap4panda.c:38:
>> arch/arm/plat-omap/include/plat/usb.h:109: warning: return type
>> defaults to 'int'
>> arch/arm/mach-omap2/board-omap4panda.c: In function
>> 'omap4_twl6030_hsmmc_late_init':
>> arch/arm/mach-omap2/board-omap4panda.c:81: error: implicit declaration
>> of function 'twl6030_mmc_card_detect_config'
>> arch/arm/mach-omap2/board-omap4panda.c:86: error:
>> 'twl6030_mmc_card_detect' undeclared (first use in this function)
>> arch/arm/mach-omap2/board-omap4panda.c:86: error: (Each undeclared
>> identifier is reported only once
>> arch/arm/mach-omap2/board-omap4panda.c:86: error: for each function it
>> appears in.)
>> arch/arm/mach-omap2/board-omap4panda.c: In function 'omap4_panda_init':
>> arch/arm/mach-omap2/board-omap4panda.c:285: warning: unused variable 'status'
>> ----
>>
>> Thanks,
>> -Bryan
>>
> I thought the dependent patch [1] took care of this in the header file?
> (Haven't actually tried this out - will take a look in a bit)
>
> [1] https://patchwork.kernel.org/patch/189952/
>
correct! this patch depends on the reference patch being applied.
>
>>
>>
>>> + if (ret)
>>> + pr_err("Failed configuring MMC1 card detect\n");
>>> pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
>>> MMCDETECT_INTR_OFFSET;
>>> + pdata->slots[0].card_detect = twl6030_mmc_card_detect;
>>> + }
>>> return ret;
>>> }
>>>
>>>
> \
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-10-06 21:12 David Anders
@ 2010-10-06 21:12 ` David Anders
0 siblings, 0 replies; 14+ messages in thread
From: David Anders @ 2010-10-06 21:12 UTC (permalink / raw)
To: linux-omap, tony, linux-arm-kernel, jayabharath
Cc: David Anders, Anand Gadiyar
Adding card detect callback function and card detect configuration
function for MMC1 Controller.
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
patch depends on https://patchwork.kernel.org/patch/189952/
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 697c0bd..94e819c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct omap_mmc_platform_data *pdata = dev->platform_data;
/* Setting MMC1 Card detect Irq */
- if (pdev->id == 0)
+ if (pdev->id == 0) {
+ ret = twl6030_mmc_card_detect_config();
+ if (ret)
+ pr_err("Failed configuring MMC1 card detect\n");
pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
+ pdata->slots[0].card_detect = twl6030_mmc_card_detect;
+ }
return ret;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 0/4] omap4: pandaboard: machine cleanups
@ 2010-10-06 21:14 David Anders
2010-10-06 21:14 ` [PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition David Anders
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: David Anders @ 2010-10-06 21:14 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: David Anders
PandaBoard machine file related cleanups.
David Anders (4):
omap4: pandaboard: remove unused hsmmc definition
omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
omap4: pandaboard: Adding card detect support for MMC1
omap4: pandaboard: enable the ehci port on pandaboard
arch/arm/mach-omap2/board-omap4panda.c | 76 +++++++++++++++++++++++++++++---
1 files changed, 69 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition
2010-10-06 21:14 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
@ 2010-10-06 21:14 ` David Anders
2010-10-06 21:14 ` [PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set David Anders
` (3 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: David Anders @ 2010-10-06 21:14 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: David Anders, Anand Gadiyar
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 96f5bbb..093d13b 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -67,10 +67,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)
@@ -156,7 +152,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] 14+ messages in thread
* [PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
2010-10-06 21:14 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
2010-10-06 21:14 ` [PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition David Anders
@ 2010-10-06 21:14 ` David Anders
2010-10-06 21:14 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
` (2 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: David Anders @ 2010-10-06 21:14 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: David Anders, Anand Gadiyar
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 093d13b..697c0bd 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -85,7 +85,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] 14+ messages in thread
* [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-10-06 21:14 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
2010-10-06 21:14 ` [PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition David Anders
2010-10-06 21:14 ` [PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set David Anders
@ 2010-10-06 21:14 ` David Anders
2010-10-06 21:57 ` Kevin Hilman
2010-10-06 21:59 ` Tony Lindgren
2010-10-06 21:14 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
2010-10-06 22:12 ` [PATCH 0/4] omap4: pandaboard: machine cleanups Kevin Hilman
4 siblings, 2 replies; 14+ messages in thread
From: David Anders @ 2010-10-06 21:14 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: David Anders, Anand Gadiyar
Adding card detect callback function and card detect configuration
function for MMC1 Controller.
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
patch depends on https://patchwork.kernel.org/patch/189952/
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 697c0bd..94e819c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct omap_mmc_platform_data *pdata = dev->platform_data;
/* Setting MMC1 Card detect Irq */
- if (pdev->id == 0)
+ if (pdev->id == 0) {
+ ret = twl6030_mmc_card_detect_config();
+ if (ret)
+ pr_err("Failed configuring MMC1 card detect\n");
pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
+ pdata->slots[0].card_detect = twl6030_mmc_card_detect;
+ }
return ret;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard
2010-10-06 21:14 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
` (2 preceding siblings ...)
2010-10-06 21:14 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
@ 2010-10-06 21:14 ` David Anders
2010-10-06 21:58 ` Kevin Hilman
2010-10-06 22:12 ` [PATCH 0/4] omap4: pandaboard: machine cleanups Kevin Hilman
4 siblings, 1 reply; 14+ messages in thread
From: David Anders @ 2010-10-06 21:14 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel; +Cc: David Anders, Anand Gadiyar
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>
Signed-off-by: Anand Gadiyar <gadiyar@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 94e819c..6163a59 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -39,6 +39,8 @@
#include <plat/mmc.h>
#include "hsmmc.h"
+#define GPIO_HUB_POWER 1
+#define GPIO_HUB_NRESET 62
static void __init omap4_panda_init_irq(void)
{
@@ -280,6 +282,57 @@ static int __init omap4_panda_i2c_init(void)
omap_register_i2c_bus(4, 400, NULL, 0);
return 0;
}
+
+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 void __init omap4_panda_init(void)
{
omap4_panda_i2c_init();
@@ -287,6 +340,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] 14+ messages in thread
* Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-10-06 21:14 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
@ 2010-10-06 21:57 ` Kevin Hilman
2010-10-06 21:59 ` Tony Lindgren
1 sibling, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2010-10-06 21:57 UTC (permalink / raw)
To: David Anders; +Cc: linux-omap, linux-arm-kernel, Anand Gadiyar
David Anders <x0132446@ti.com> writes:
> Adding card detect callback function and card detect configuration
> function for MMC1 Controller.
>
> Signed-off-by: David Anders <x0132446@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> ---
>
> patch depends on https://patchwork.kernel.org/patch/189952/
This link is for v2 of that patch, and the latest was v4. Has this been
tested with v4?
Kevin
> arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index 697c0bd..94e819c 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
> struct omap_mmc_platform_data *pdata = dev->platform_data;
>
> /* Setting MMC1 Card detect Irq */
> - if (pdev->id == 0)
> + if (pdev->id == 0) {
> + ret = twl6030_mmc_card_detect_config();
> + if (ret)
> + pr_err("Failed configuring MMC1 card detect\n");
> pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
> MMCDETECT_INTR_OFFSET;
> + pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> + }
> return ret;
> }
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard
2010-10-06 21:14 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
@ 2010-10-06 21:58 ` Kevin Hilman
0 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2010-10-06 21:58 UTC (permalink / raw)
To: David Anders; +Cc: linux-omap, linux-arm-kernel, Anand Gadiyar
David Anders <x0132446@ti.com> writes:
> 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>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
This one fails to apply to current l-o master.
Kevin
> ---
> 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 94e819c..6163a59 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -39,6 +39,8 @@
> #include <plat/mmc.h>
> #include "hsmmc.h"
>
> +#define GPIO_HUB_POWER 1
> +#define GPIO_HUB_NRESET 62
>
> static void __init omap4_panda_init_irq(void)
> {
> @@ -280,6 +282,57 @@ static int __init omap4_panda_i2c_init(void)
> omap_register_i2c_bus(4, 400, NULL, 0);
> return 0;
> }
> +
> +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 void __init omap4_panda_init(void)
> {
> omap4_panda_i2c_init();
> @@ -287,6 +340,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);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
2010-10-06 21:14 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
2010-10-06 21:57 ` Kevin Hilman
@ 2010-10-06 21:59 ` Tony Lindgren
1 sibling, 0 replies; 14+ messages in thread
From: Tony Lindgren @ 2010-10-06 21:59 UTC (permalink / raw)
To: David Anders, kishore kadiyala
Cc: linux-omap, linux-arm-kernel, Anand Gadiyar
* David Anders <x0132446@ti.com> [101006 14:06]:
> Adding card detect callback function and card detect configuration
> function for MMC1 Controller.
This one would be best merged into this patch from Kishore:
https://patchwork.kernel.org/patch/189952/
Kishore, care to update your patch with this one and then send
the updated version to Samuel? I think there may have been some
other pending comments too.
The other three look OK to me to queue.
Regards,
Tony
>
> Signed-off-by: David Anders <x0132446@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> ---
>
> patch depends on https://patchwork.kernel.org/patch/189952/
>
> arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index 697c0bd..94e819c 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
> struct omap_mmc_platform_data *pdata = dev->platform_data;
>
> /* Setting MMC1 Card detect Irq */
> - if (pdev->id == 0)
> + if (pdev->id == 0) {
> + ret = twl6030_mmc_card_detect_config();
> + if (ret)
> + pr_err("Failed configuring MMC1 card detect\n");
> pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
> MMCDETECT_INTR_OFFSET;
> + pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> + }
> return ret;
> }
>
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] omap4: pandaboard: machine cleanups
2010-10-06 21:14 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
` (3 preceding siblings ...)
2010-10-06 21:14 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
@ 2010-10-06 22:12 ` Kevin Hilman
4 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2010-10-06 22:12 UTC (permalink / raw)
To: David Anders; +Cc: linux-omap
David Anders <x0132446@ti.com> writes:
> PandaBoard machine file related cleanups.
>
> David Anders (4):
> omap4: pandaboard: remove unused hsmmc definition
> omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
> omap4: pandaboard: Adding card detect support for MMC1
> omap4: pandaboard: enable the ehci port on pandaboard
Hi David,
Thanks for updating.
Note that the LAKML mailing-list address has changed. Correct address
is
linux-arm-kernel@lists.infradead.org
Please fixup patch 4 to apply against current l-o master, and drop patch
3 for now so that Kishore can fold it into his, then re-post including
LAKML.
FWIW, I tested patches 1, 2 and 4 (after manual fixup) on my es2.0 panda
and MMC is working, so feel free to add
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
to patches 1, 2 and 4. At least MMC boot will work, and we'll have to
wait for Kishore to get the card detect merged.
Kevin
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-10-06 22:12 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 21:14 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
2010-10-06 21:14 ` [PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition David Anders
2010-10-06 21:14 ` [PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set David Anders
2010-10-06 21:14 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
2010-10-06 21:57 ` Kevin Hilman
2010-10-06 21:59 ` Tony Lindgren
2010-10-06 21:14 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
2010-10-06 21:58 ` Kevin Hilman
2010-10-06 22:12 ` [PATCH 0/4] omap4: pandaboard: machine cleanups Kevin Hilman
-- strict thread matches above, loose matches on Subject: below --
2010-10-06 21:12 David Anders
2010-10-06 21:12 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
2010-09-21 21:24 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
2010-09-21 21:24 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
2010-09-22 7:28 ` Bryan Wu
2010-09-22 8:43 ` Gadiyar, Anand
2010-09-22 14:40 ` David Anders
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).