* [PATCH 2/7] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file
@ 2010-04-21 18:19 kishore kadiyala
2010-04-21 18:47 ` Tony Lindgren
2010-04-22 6:35 ` Russell King
0 siblings, 2 replies; 4+ messages in thread
From: kishore kadiyala @ 2010-04-21 18:19 UTC (permalink / raw)
To: linux-mmc, linux-omap
Cc: madhu.cr, jarkko.lavinen, tony, rmk+lkml, santosh.shilimkar
This patch adds MMC1 and MMC2 Controller support for OMAP4430 Board
file.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
---
arch/arm/mach-omap2/Makefile | 3 +-
arch/arm/mach-omap2/board-4430sdp.c | 39 +++++++++++++++++++++++++++-------
2 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4b9fc57..40b291a 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -140,7 +140,8 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
hsmmc.o
obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
hsmmc.o
-obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
+obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
+ hsmmc.o
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 32cbd72..eae7c80 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -33,6 +33,7 @@
#include <plat/usb.h>
#include <asm/hardware/gic.h>
#include <asm/hardware/cache-l2x0.h>
+#include "hsmmc.h"
static struct platform_device sdp4430_lcd_device = {
.name = "sdp4430_lcd",
@@ -80,17 +81,27 @@ static int __init omap_l2_cache_init(void)
early_initcall(omap_l2_cache_init);
#endif
-
-static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
- {
- .supply = "vmmc",
- },
+static struct omap2_hsmmc_info mmc[] = {
{
- .supply = "vmmc",
+ .mmc = 1,
+ .wires = 8,
+ /* "mmc0_cd" is not a gpio interrupt
+ * but is a phoenix interrupt
+ */
+ .gpio_cd = 384,
+ .gpio_wp = -EINVAL,
},
{
- .supply = "vmmc",
+ .mmc = 2,
+ .wires = 8,
+ .gpio_cd = -EINVAL,
+ .gpio_wp = -EINVAL,
+ .nonremovable = true,
},
+ {} /* Terminator */
+};
+
+static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
{
.supply = "vmmc",
},
@@ -99,6 +110,17 @@ static struct regulator_consumer_supply sdp4430_vmmc_supply[]
},
};
+static int __init sdp4430_mmc_init(void)
+{
+ omap2_hsmmc_init(mmc);
+
+ /* link regulators to MMC adapters ... we "know" the
+ * regulators will be set up only *after* we return.
+ */
+ sdp4430_vmmc_supply[0].dev = mmc[0].dev;
+ sdp4430_vmmc_supply[1].dev = mmc[1].dev;
+ return 0;
+}
static void __init gic_init_irq(void)
{
void __iomem *base;
@@ -183,7 +205,7 @@ static struct regulator_init_data sdp4430_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
- .num_consumer_supplies = 5,
+ .num_consumer_supplies = 2,
.consumer_supplies = sdp4430_vmmc_supply,
};
@@ -302,6 +324,7 @@ static void __init omap_4430sdp_init(void)
omap4_i2c_init();
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
omap_serial_init();
+ sdp4430_mmc_init();
/* OMAP4 SDP uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/7] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file
2010-04-21 18:19 [PATCH 2/7] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file kishore kadiyala
@ 2010-04-21 18:47 ` Tony Lindgren
2010-05-04 6:01 ` kishore kadiyala
2010-04-22 6:35 ` Russell King
1 sibling, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2010-04-21 18:47 UTC (permalink / raw)
To: kishore kadiyala
Cc: linux-mmc, linux-omap, madhu.cr, jarkko.lavinen, rmk+lkml,
santosh.shilimkar
* kishore kadiyala <kishore.kadiyala@ti.com> [100421 11:15]:
> This patch adds MMC1 and MMC2 Controller support for OMAP4430 Board
> file.
>
> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> ---
> arch/arm/mach-omap2/Makefile | 3 +-
> arch/arm/mach-omap2/board-4430sdp.c | 39 +++++++++++++++++++++++++++-------
> 2 files changed, 33 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 4b9fc57..40b291a 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -140,7 +140,8 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
> hsmmc.o
> obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
> hsmmc.o
> -obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
> +obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
> + hsmmc.o
>
> obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
>
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> index 32cbd72..eae7c80 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -33,6 +33,7 @@
> #include <plat/usb.h>
> #include <asm/hardware/gic.h>
> #include <asm/hardware/cache-l2x0.h>
> +#include "hsmmc.h"
>
> static struct platform_device sdp4430_lcd_device = {
> .name = "sdp4430_lcd",
> @@ -80,17 +81,27 @@ static int __init omap_l2_cache_init(void)
> early_initcall(omap_l2_cache_init);
> #endif
>
> -
> -static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
> - {
> - .supply = "vmmc",
> - },
> +static struct omap2_hsmmc_info mmc[] = {
> {
> - .supply = "vmmc",
> + .mmc = 1,
> + .wires = 8,
> + /* "mmc0_cd" is not a gpio interrupt
> + * but is a phoenix interrupt
> + */
> + .gpio_cd = 384,
You can't use hardcoded irq numbers for twl interrupts. They can change.
See sdp3430_twl_gpio_setup() for example.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/7] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file
2010-04-21 18:47 ` Tony Lindgren
@ 2010-05-04 6:01 ` kishore kadiyala
0 siblings, 0 replies; 4+ messages in thread
From: kishore kadiyala @ 2010-05-04 6:01 UTC (permalink / raw)
To: Tony Lindgren
Cc: kishore kadiyala, linux-mmc, linux-omap, madhu.cr, jarkko.lavinen,
rmk+lkml, santosh.shilimkar
On Thu, Apr 22, 2010 at 12:17 AM, Tony Lindgren <tony@atomide.com> wrote:
> * kishore kadiyala <kishore.kadiyala@ti.com> [100421 11:15]:
>> This patch adds MMC1 and MMC2 Controller support for OMAP4430 Board
>> file.
>>
>> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
>> ---
>> arch/arm/mach-omap2/Makefile | 3 +-
>> arch/arm/mach-omap2/board-4430sdp.c | 39 +++++++++++++++++++++++++++-------
>> 2 files changed, 33 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
>> index 4b9fc57..40b291a 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -140,7 +140,8 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
>> hsmmc.o
>> obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
>> hsmmc.o
>> -obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
>> +obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
>> + hsmmc.o
>>
>> obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
>>
>> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
>> index 32cbd72..eae7c80 100644
>> --- a/arch/arm/mach-omap2/board-4430sdp.c
>> +++ b/arch/arm/mach-omap2/board-4430sdp.c
>> @@ -33,6 +33,7 @@
>> #include <plat/usb.h>
>> #include <asm/hardware/gic.h>
>> #include <asm/hardware/cache-l2x0.h>
>> +#include "hsmmc.h"
>>
>> static struct platform_device sdp4430_lcd_device = {
>> .name = "sdp4430_lcd",
>> @@ -80,17 +81,27 @@ static int __init omap_l2_cache_init(void)
>> early_initcall(omap_l2_cache_init);
>> #endif
>>
>> -
>> -static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
>> - {
>> - .supply = "vmmc",
>> - },
>> +static struct omap2_hsmmc_info mmc[] = {
>> {
>> - .supply = "vmmc",
>> + .mmc = 1,
>> + .wires = 8,
>> + /* "mmc0_cd" is not a gpio interrupt
>> + * but is a phoenix interrupt
>> + */
>> + .gpio_cd = 384,
>
> You can't use hardcoded irq numbers for twl interrupts. They can change.
> See sdp3430_twl_gpio_setup() for example.
I am working on it and will avoid hard coding .
Regards,
Kishore
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/7] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file
2010-04-21 18:19 [PATCH 2/7] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file kishore kadiyala
2010-04-21 18:47 ` Tony Lindgren
@ 2010-04-22 6:35 ` Russell King
1 sibling, 0 replies; 4+ messages in thread
From: Russell King @ 2010-04-22 6:35 UTC (permalink / raw)
To: kishore kadiyala
Cc: linux-mmc, linux-omap, madhu.cr, jarkko.lavinen, tony,
santosh.shilimkar
On Wed, Apr 21, 2010 at 11:49:55PM +0530, kishore kadiyala wrote:
> @@ -99,6 +110,17 @@ static struct regulator_consumer_supply sdp4430_vmmc_supply[]
> },
> };
>
> +static int __init sdp4430_mmc_init(void)
> +{
> + omap2_hsmmc_init(mmc);
> +
> + /* link regulators to MMC adapters ... we "know" the
> + * regulators will be set up only *after* we return.
> + */
> + sdp4430_vmmc_supply[0].dev = mmc[0].dev;
> + sdp4430_vmmc_supply[1].dev = mmc[1].dev;
> + return 0;
> +}
There should be a blank line between functions.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-04 6:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21 18:19 [PATCH 2/7] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file kishore kadiyala
2010-04-21 18:47 ` Tony Lindgren
2010-05-04 6:01 ` kishore kadiyala
2010-04-22 6:35 ` Russell King
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).