omap4: pandaboard: machine cleanups
Subsystems (3)
cover omap4: pandaboard: machine cleanups
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(-)
PATCH 1/4 omap4: pandaboard: remove unused hsmmc definition
remove the second hsmmc definition as it is only used on the expansion header of the PandaBoard and can be mux for other functions.
--- arch/arm/mach-omap2/board-omap4panda.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +1 -5
@@ -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, };
Signature · 1 line
1.7.0.4
PATCH 2/4 omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
In reply to David AndersAvoid possible crash if CONFIG_MMC_OMAP_HS is not set.
--- arch/arm/mach-omap2/board-omap4panda.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +8 -1
@@ -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; }
Signature · 1 line
1.7.0.4
PATCH 3/4 omap4: pandaboard: Adding card detect support for MMC1
In reply to David AndersAdding card detect callback function and card detect configuration function for MMC1 Controller.
---
patch depends on https://patchwork.kernel.org/patch/189952/
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +6 -1
@@ -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; }
Signature · 1 line
1.7.0.4
Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
Quoted 17 lines · David Anders
Adding card detect callback function and card detect configuration function for MMC1 Controller.
Signed-off-by David Anders <[email protected]>Signed-off-by Anand Gadiyar <[email protected]>---
patch depends on https://patchwork.kernel.org/patch/189952/
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +0
-0
arch/arm/mach-omap2/board-omap4panda.c static int omap4_twl6030_hsmmc_late_init(struct device *dev) · line 81
Quoted 6 lines
arch/arm/mach-omap2/board-omap4panda.c +2
-1@@ -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
Quoted 9 lines
arch/arm/mach-omap2/board-omap4panda.c +2
-0+ 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;
}
Quoted 8 lines
--
1.7.0.4--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
Quoted 46 lines · Bryan Wu
Quoted 17 lines · David Anders
Adding card detect callback function and card detect configuration function for MMC1 Controller.
Signed-off-by David Anders <[email protected]>Signed-off-by Anand Gadiyar <[email protected]>---
patch depends on https://patchwork.kernel.org/patch/189952/
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +0
-0arch/arm/mach-omap2/board-omap4panda.c static int omap4_twl6030_hsmmc_late_init(struct device *dev) · line 81
Quoted 6 lines
arch/arm/mach-omap2/board-omap4panda.c +2
-1@@ -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 fromarch/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 oncearch/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'
----
Quoted 2 lines
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/
Quoted 11 lines
Quoted 11 lines
arch/arm/mach-omap2/board-omap4panda.c +2
-0+ 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1
Quoted 49 lines · Anand
Quoted 47 lines · Bryan Wu
Quoted 17 lines · David Anders
Adding card detect callback function and card detect configuration function for MMC1 Controller.
Signed-off-by David Anders<[email protected]>Signed-off-by Anand Gadiyar<[email protected]>---
patch depends on https://patchwork.kernel.org/patch/189952/
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +0
-0arch/arm/mach-omap2/board-omap4panda.c static int omap4_twl6030_hsmmc_late_init(struct device *dev) · line 82
Quoted 7 lines
arch/arm/mach-omap2/board-omap4panda.c +2
-1@@ -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 fromarch/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 oncearch/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'
----
Quoted 8 lines
Quoted 3 lines
Thanks,
-BryanI 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)
correct! this patch depends on the reference patch being applied.
Quoted 15 lines
Quoted 13 lines
arch/arm/mach-omap2/board-omap4panda.c static int omap4_twl6030_hsmmc_late_init(struct device *dev) · line 89
Quoted 13 lines
arch/arm/mach-omap2/board-omap4panda.c +4
-0+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; }\
PATCH 4/4 omap4: pandaboard: enable the ehci port on pandaboard
In reply to David AndersThe 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.
--- arch/arm/mach-omap2/board-omap4panda.c | 54 ++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +54 -0
@@ -39,6 +39,8 @@#include <plat/mmc.h> #include "hsmmc.h" +#define GPIO_HUB_POWER 1 +#define GPIO_HUB_NRESET 62static 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);
Signature · 1 line
1.7.0.4
Quoted 10 lines · David Anders
PandaBoard machine file related cleanups.
David Anders (4):
omap4: pandaboard: remove unused hsmmc definition
omap4: pandaboard: Fix the init ifCONFIG_MMC_OMAP_HSis not set
omap4: pandaboard: Adding card detect support for MMC1
omap4: pandaboard: enable the ehci port on pandaboardarch/arm/mach-omap2/board-omap4panda.c | 76 +++++++++++++++++++++++++++++--- 1 files changed, 69 insertions(+), 7 deletions(-)
on an es2.0 panda using MMC rootfs.
Tony Lindgren
maintainerQuoted 10 lines · David Anders
PandaBoard machine file related cleanups.
David Anders (4):
omap4: pandaboard: remove unused hsmmc definition
omap4: pandaboard: Fix the init ifCONFIG_MMC_OMAP_HSis not set
omap4: pandaboard: Adding card detect support for MMC1
omap4: pandaboard: enable the ehci port on pandaboardarch/arm/mach-omap2/board-omap4panda.c | 76 +++++++++++++++++++++++++++++--- 1 files changed, 69 insertions(+), 7 deletions(-)
David, please repost this series one more time with linux-arm-kernel list also Cc'd in addition to the linux-omap list.
Regards,
Tony
Tony Lindgren
maintainerQuoted 9 lines · Tony Lindgren
Quoted 8 lines · David Anders
PandaBoard machine file related cleanups.
David Anders (4):
omap4: pandaboard: remove unused hsmmc definition
omap4: pandaboard: Fix the init ifCONFIG_MMC_OMAP_HSis not set
omap4: pandaboard: Adding card detect support for MMC1
omap4: pandaboard: enable the ehci port on pandaboard
Quoted 5 lines
Quoted 2 lines
arch/arm/mach-omap2/board-omap4panda.c | 76 +++++++++++++++++++++++++++++--- 1 files changed, 69 insertions(+), 7 deletions(-)David, please repost this series one more time with linux-arm-kernel list also Cc'd in addition to the linux-omap list.
Ping, we're starting to run out of time!
Tony
Tony,
must have missed this request, i'll repost now
thanks
Dave
Quoted 22 lines · Tony Lindgren
Quoted 10 lines · Tony Lindgren
Quoted 8 lines · David Anders
PandaBoard machine file related cleanups.
David Anders (4):
omap4: pandaboard: remove unused hsmmc definition
omap4: pandaboard: Fix the init ifCONFIG_MMC_OMAP_HSis not set
omap4: pandaboard: Adding card detect support for MMC1
omap4: pandaboard: enable the ehci port on pandaboardQuoted 6 lines
Quoted 3 lines
arch/arm/mach-omap2/board-omap4panda.c | 76 +++++++++++++++++++++++++++++--- 1 files changed, 69 insertions(+), 7 deletions(-)David, please repost this series one more time with linux-arm-kernel list also Cc'd in addition to the linux-omap list.
Ping, we're starting to run out of time!
Tony