* MMC broken on beagleboard with current git @ 2008-09-25 8:41 Koen Kooi 2008-09-25 8:51 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Koen Kooi @ 2008-09-25 8:41 UTC (permalink / raw) To: linux-omap@vger.kernel.org List; +Cc: beagleboard Board [-- Attachment #1: Type: text/plain, Size: 390 bytes --] Hi, I just built a kernel from current git[1] and the mmc controller doesn't get detected on boot on my beagleboards. The omap mmc system has seen a lot of changes lately, does anyone have a hint where to start looking before attemping a bisect? regards, Koen [1] http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-25 8:41 MMC broken on beagleboard with current git Koen Kooi @ 2008-09-25 8:51 ` Tony Lindgren 2008-09-25 9:23 ` Koen Kooi 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2008-09-25 8:51 UTC (permalink / raw) To: Koen Kooi; +Cc: linux-omap@vger.kernel.org List, beagleboard Board * Koen Kooi <k.kooi@student.utwente.nl> [080925 11:42]: > Hi, > > I just built a kernel from current git[1] and the mmc controller doesn't > get detected on boot on my beagleboards. The omap mmc system has seen a > lot of changes lately, does anyone have a hint where to start looking > before attemping a bisect? Sounds like the recent mmc init changes we've done: 535e1808d1c77a580815f7d7daacc6c030e29cb1 8e6e06c71b9d21d85a3ae652868e2802c054a08a c434c15d28c82d92e55897bd265c423e9ab69362 I've verified that it works on omap3430sdp. But mach-omap2/hsmmc.c needs some more work done to support other mmc controllers besides the first one. I don't think other controllers ever worked before these patches either though.. Let me know if you can narrow it down to some commit and I may be able to help further from there. Tony > [1] http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-25 8:51 ` Tony Lindgren @ 2008-09-25 9:23 ` Koen Kooi 2008-09-25 9:47 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Koen Kooi @ 2008-09-25 9:23 UTC (permalink / raw) To: Tony Lindgren; +Cc: linux-omap@vger.kernel.org List, beagleboard Board [-- Attachment #1: Type: text/plain, Size: 1346 bytes --] Op 25 sep 2008, om 10:51 heeft Tony Lindgren het volgende geschreven: > * Koen Kooi <k.kooi@student.utwente.nl> [080925 11:42]: >> Hi, >> >> I just built a kernel from current git[1] and the mmc controller >> doesn't >> get detected on boot on my beagleboards. The omap mmc system has >> seen a >> lot of changes lately, does anyone have a hint where to start looking >> before attemping a bisect? > > Sounds like the recent mmc init changes we've done: > > 535e1808d1c77a580815f7d7daacc6c030e29cb1 - 12 september 2008 > 8e6e06c71b9d21d85a3ae652868e2802c054a08a - 12 september 2008 > c434c15d28c82d92e55897bd265c423e9ab69362 - 24 september 2008 > I've verified that it works on omap3430sdp. But mach-omap2/hsmmc.c > needs > some more work done to support other mmc controllers besides the > first one. > I don't think other controllers ever worked before these patches > either though.. > > Let me know if you can narrow it down to some commit and I may be able > to help further from there. The previous working version I built was based of de1121fdb899f762b9e717f44eaf3fae7c00cd3e which was commited at 13 september 2008, so 535e18.. and 8e6e06c.. don't break it. regards, Koen > > > Tony > > >> [1] http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 > > > [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-25 9:23 ` Koen Kooi @ 2008-09-25 9:47 ` Tony Lindgren 2008-09-25 10:24 ` Koen Kooi 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2008-09-25 9:47 UTC (permalink / raw) To: Koen Kooi; +Cc: linux-omap@vger.kernel.org List, beagleboard Board * Koen Kooi <k.kooi@student.utwente.nl> [080925 12:23]: > > Op 25 sep 2008, om 10:51 heeft Tony Lindgren het volgende geschreven: > >> * Koen Kooi <k.kooi@student.utwente.nl> [080925 11:42]: >>> Hi, >>> >>> I just built a kernel from current git[1] and the mmc controller >>> doesn't >>> get detected on boot on my beagleboards. The omap mmc system has >>> seen a >>> lot of changes lately, does anyone have a hint where to start looking >>> before attemping a bisect? >> >> Sounds like the recent mmc init changes we've done: >> >> 535e1808d1c77a580815f7d7daacc6c030e29cb1 - 12 september 2008 > >> 8e6e06c71b9d21d85a3ae652868e2802c054a08a - 12 september 2008 > >> c434c15d28c82d92e55897bd265c423e9ab69362 - 24 september 2008 > > >> I've verified that it works on omap3430sdp. But mach-omap2/hsmmc.c >> needs >> some more work done to support other mmc controllers besides the first >> one. >> I don't think other controllers ever worked before these patches >> either though.. >> >> Let me know if you can narrow it down to some commit and I may be able >> to help further from there. > > The previous working version I built was based of > de1121fdb899f762b9e717f44eaf3fae7c00cd3e which was commited at 13 > september 2008, so 535e18.. and 8e6e06c.. don't break it. OK, good to know. Can you try to git-bisect it? Tony >> >>> [1] http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 >> >> >> > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-25 9:47 ` Tony Lindgren @ 2008-09-25 10:24 ` Koen Kooi 2008-09-25 10:39 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Koen Kooi @ 2008-09-25 10:24 UTC (permalink / raw) To: linux-omap@vger.kernel.org List; +Cc: Tony Lindgren [-- Attachment #1: Type: text/plain, Size: 1925 bytes --] Op 25 sep 2008, om 11:47 heeft Tony Lindgren het volgende geschreven: > * Koen Kooi <k.kooi@student.utwente.nl> [080925 12:23]: >> >> Op 25 sep 2008, om 10:51 heeft Tony Lindgren het volgende geschreven: >> >>> * Koen Kooi <k.kooi@student.utwente.nl> [080925 11:42]: >>>> Hi, >>>> >>>> I just built a kernel from current git[1] and the mmc controller >>>> doesn't >>>> get detected on boot on my beagleboards. The omap mmc system has >>>> seen a >>>> lot of changes lately, does anyone have a hint where to start >>>> looking >>>> before attemping a bisect? >>> >>> Sounds like the recent mmc init changes we've done: >>> >>> 535e1808d1c77a580815f7d7daacc6c030e29cb1 - 12 september 2008 >> >>> 8e6e06c71b9d21d85a3ae652868e2802c054a08a - 12 september 2008 >> >>> c434c15d28c82d92e55897bd265c423e9ab69362 - 24 september 2008 >> >> >>> I've verified that it works on omap3430sdp. But mach-omap2/hsmmc.c >>> needs >>> some more work done to support other mmc controllers besides the >>> first >>> one. >>> I don't think other controllers ever worked before these patches >>> either though.. >>> >>> Let me know if you can narrow it down to some commit and I may be >>> able >>> to help further from there. >> >> The previous working version I built was based of >> de1121fdb899f762b9e717f44eaf3fae7c00cd3e which was commited at 13 >> september 2008, so 535e18.. and 8e6e06c.. don't break it. > > OK, good to know. Can you try to git-bisect it? That proved to be a lot less work than expected :) Last good: 9d1dff8638c9e96a401e1885f9948662e9ff9636 First bad: c434c15d28c82d92e55897bd265c423e9ab69362 So http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 breaks MMC on beagle. regards, Koen > > > Tony > >>> >>>> [1] http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 >>> >>> >>> >> > > > [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-25 10:24 ` Koen Kooi @ 2008-09-25 10:39 ` Tony Lindgren 2008-09-25 15:24 ` Steve Sakoman 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2008-09-25 10:39 UTC (permalink / raw) To: Koen Kooi; +Cc: linux-omap@vger.kernel.org List * Koen Kooi <k.kooi@student.utwente.nl> [080925 13:25]: > > Op 25 sep 2008, om 11:47 heeft Tony Lindgren het volgende geschreven: > >> * Koen Kooi <k.kooi@student.utwente.nl> [080925 12:23]: >>> >>> Op 25 sep 2008, om 10:51 heeft Tony Lindgren het volgende geschreven: >>> >>>> * Koen Kooi <k.kooi@student.utwente.nl> [080925 11:42]: >>>>> Hi, >>>>> >>>>> I just built a kernel from current git[1] and the mmc controller >>>>> doesn't >>>>> get detected on boot on my beagleboards. The omap mmc system has >>>>> seen a >>>>> lot of changes lately, does anyone have a hint where to start >>>>> looking >>>>> before attemping a bisect? >>>> >>>> Sounds like the recent mmc init changes we've done: >>>> >>>> 535e1808d1c77a580815f7d7daacc6c030e29cb1 - 12 september 2008 >>> >>>> 8e6e06c71b9d21d85a3ae652868e2802c054a08a - 12 september 2008 >>> >>>> c434c15d28c82d92e55897bd265c423e9ab69362 - 24 september 2008 >>> >>> >>>> I've verified that it works on omap3430sdp. But mach-omap2/hsmmc.c >>>> needs >>>> some more work done to support other mmc controllers besides the >>>> first >>>> one. >>>> I don't think other controllers ever worked before these patches >>>> either though.. >>>> >>>> Let me know if you can narrow it down to some commit and I may be >>>> able >>>> to help further from there. >>> >>> The previous working version I built was based of >>> de1121fdb899f762b9e717f44eaf3fae7c00cd3e which was commited at 13 >>> september 2008, so 535e18.. and 8e6e06c.. don't break it. >> >> OK, good to know. Can you try to git-bisect it? > > That proved to be a lot less work than expected :) > > Last good: 9d1dff8638c9e96a401e1885f9948662e9ff9636 > First bad: c434c15d28c82d92e55897bd265c423e9ab69362 > > So > http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 > breaks MMC on beagle. Hmm, I don't understand how it could work on 3430sdp... Looks like board-omap3beagle.c calls hsmmc_init() just like board-3430sdp.c. Maybe timings have changed and you need a longer delay somewhere during the init? Maybe sprinkle some printks to hsmmc.c and see if that makes it to work? Also make sure omap_hsmmc.c probe finishes OK. Tony >>>>> [1] http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commit;h=c434c15d28c82d92e55897bd265c423e9ab69362 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-25 10:39 ` Tony Lindgren @ 2008-09-25 15:24 ` Steve Sakoman 2008-09-26 7:42 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Steve Sakoman @ 2008-09-25 15:24 UTC (permalink / raw) To: Tony Lindgren; +Cc: Koen Kooi, linux-omap@vger.kernel.org List On Thu, Sep 25, 2008 at 3:39 AM, Tony Lindgren <tony@atomide.com> wrote: > Hmm, I don't understand how it could work on 3430sdp... > > Looks like board-omap3beagle.c calls hsmmc_init() just like > board-3430sdp.c. Maybe timings have changed and you need > a longer delay somewhere during the init? I can confirm that mmc is also broken on Overo. I'll spend some time today investigating. Steve ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-25 15:24 ` Steve Sakoman @ 2008-09-26 7:42 ` Tony Lindgren 2008-09-26 11:13 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2008-09-26 7:42 UTC (permalink / raw) To: Steve Sakoman; +Cc: Koen Kooi, linux-omap@vger.kernel.org List * Steve Sakoman <sakoman@gmail.com> [080925 18:24]: > On Thu, Sep 25, 2008 at 3:39 AM, Tony Lindgren <tony@atomide.com> wrote: > > > Hmm, I don't understand how it could work on 3430sdp... > > > > Looks like board-omap3beagle.c calls hsmmc_init() just like > > board-3430sdp.c. Maybe timings have changed and you need > > a longer delay somewhere during the init? > > I can confirm that mmc is also broken on Overo. I'll spend some time > today investigating. I'll double check on omap3430sdp. Tony ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-26 7:42 ` Tony Lindgren @ 2008-09-26 11:13 ` Tony Lindgren 2008-09-28 12:46 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2008-09-26 11:13 UTC (permalink / raw) To: Steve Sakoman; +Cc: Koen Kooi, linux-omap@vger.kernel.org List * Tony Lindgren <tony@atomide.com> [080926 10:40]: > * Steve Sakoman <sakoman@gmail.com> [080925 18:24]: > > On Thu, Sep 25, 2008 at 3:39 AM, Tony Lindgren <tony@atomide.com> wrote: > > > > > Hmm, I don't understand how it could work on 3430sdp... > > > > > > Looks like board-omap3beagle.c calls hsmmc_init() just like > > > board-3430sdp.c. Maybe timings have changed and you need > > > a longer delay somewhere during the init? > > > > I can confirm that mmc is also broken on Overo. I'll spend some time > > today investigating. > > I'll double check on omap3430sdp. Hmm, MMC does not seem to work any longer on 3430sdp either. I guess I have broken it, sorry. I've also confirmed that undoing c434c15d28c82d92e55897bd265c423e9ab69362 makes it work again. I swear it was working when I last tested it.. I'll try to debug it further, but I may not get to it for real until on Monday. I still suspect some timing change caused by the init changes.. Tony ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-26 11:13 ` Tony Lindgren @ 2008-09-28 12:46 ` Tony Lindgren 2008-09-30 12:58 ` Tony Lindgren 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2008-09-28 12:46 UTC (permalink / raw) To: Steve Sakoman; +Cc: Koen Kooi, linux-omap@vger.kernel.org List * Tony Lindgren <tony@atomide.com> [080926 14:11]: > * Tony Lindgren <tony@atomide.com> [080926 10:40]: > > * Steve Sakoman <sakoman@gmail.com> [080925 18:24]: > > > On Thu, Sep 25, 2008 at 3:39 AM, Tony Lindgren <tony@atomide.com> wrote: > > > > > > > Hmm, I don't understand how it could work on 3430sdp... > > > > > > > > Looks like board-omap3beagle.c calls hsmmc_init() just like > > > > board-3430sdp.c. Maybe timings have changed and you need > > > > a longer delay somewhere during the init? > > > > > > I can confirm that mmc is also broken on Overo. I'll spend some time > > > today investigating. > > > > I'll double check on omap3430sdp. > > Hmm, MMC does not seem to work any longer on 3430sdp either. I guess I > have broken it, sorry. > > I've also confirmed that undoing c434c15d28c82d92e55897bd265c423e9ab69362 > makes it work again. > > I swear it was working when I last tested it.. I'll try to debug it > further, but I may not get to it for real until on Monday. > > I still suspect some timing change caused by the init changes.. I've reverted c434c15d28c82d92e55897bd265c423e9ab69362 as I may not be able to debug it until Wednesday. Tony ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-28 12:46 ` Tony Lindgren @ 2008-09-30 12:58 ` Tony Lindgren 2008-09-30 13:22 ` Felipe Balbi 2008-09-30 13:24 ` Felipe Contreras 0 siblings, 2 replies; 15+ messages in thread From: Tony Lindgren @ 2008-09-30 12:58 UTC (permalink / raw) To: Steve Sakoman; +Cc: Koen Kooi, linux-omap@vger.kernel.org List [-- Attachment #1: Type: text/plain, Size: 1451 bytes --] * Tony Lindgren <tony@atomide.com> [080928 15:44]: > * Tony Lindgren <tony@atomide.com> [080926 14:11]: > > * Tony Lindgren <tony@atomide.com> [080926 10:40]: > > > * Steve Sakoman <sakoman@gmail.com> [080925 18:24]: > > > > On Thu, Sep 25, 2008 at 3:39 AM, Tony Lindgren <tony@atomide.com> wrote: > > > > > > > > > Hmm, I don't understand how it could work on 3430sdp... > > > > > > > > > > Looks like board-omap3beagle.c calls hsmmc_init() just like > > > > > board-3430sdp.c. Maybe timings have changed and you need > > > > > a longer delay somewhere during the init? > > > > > > > > I can confirm that mmc is also broken on Overo. I'll spend some time > > > > today investigating. > > > > > > I'll double check on omap3430sdp. > > > > Hmm, MMC does not seem to work any longer on 3430sdp either. I guess I > > have broken it, sorry. > > > > I've also confirmed that undoing c434c15d28c82d92e55897bd265c423e9ab69362 > > makes it work again. > > > > I swear it was working when I last tested it.. I'll try to debug it > > further, but I may not get to it for real until on Monday. > > > > I still suspect some timing change caused by the init changes.. > > I've reverted c434c15d28c82d92e55897bd265c423e9ab69362 as I may not be > able to debug it until Wednesday. OK, found the problem, here's a diff on top of the currently reverted patch. I've pushed the MMC changes with this fix merged in, can you guys try it out now? Regards, Tony [-- Attachment #2: fix-mmc-init.patch --] [-- Type: text/x-diff, Size: 4994 bytes --] >From c5e72c31fe23a139aabab1ab6c63c2c3a3aad46f Mon Sep 17 00:00:00 2001 From: Tony Lindgren <tony@atomide.com> Date: Tue, 30 Sep 2008 12:03:42 +0300 Subject: [PATCH] Fix new MMC init code for hsmmc, and for 2430 The reason the new MMC init code did not work on 34xx was the _DEVID defines in omap_hsmmc.c. Fix these for now and add a comment about doing that with platform_data and controller and slot specific functions. Fix device id's for omap1, and add a late init function for the tps interrupt. Looks like omap1 MMC still does not work though. Change omap2430 mmchs clock id's to start from 0, as the first MMC instance is now 0. Also add a comment to clarify the difference between a slot and a controller. Signed-off-by: Tony Lindgren <tony@atomide.com> diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c index 4fbe367..4cc2d4f 100644 --- a/arch/arm/mach-omap1/board-h2-mmc.c +++ b/arch/arm/mach-omap1/board-h2-mmc.c @@ -33,6 +33,24 @@ static int mmc_set_power(struct device *dev, int slot, int power_on, return 0; } +static int mmc_late_init(struct device *dev) +{ + int ret; + + ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power"); + if (ret < 0) + return ret; + + gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 0); + + return ret; +} + +static void mmc_shutdown(struct device *dev) +{ + gpio_free(H2_TPS_GPIO_MMC_PWR_EN); +} + /* * H2 could use the following functions tested: * - mmc_get_cover_state that uses OMAP_MPUIO(1) @@ -40,6 +58,8 @@ static int mmc_set_power(struct device *dev, int slot, int power_on, */ static struct omap_mmc_platform_data mmc1_data = { .nr_slots = 1, + .init = mmc_late_init, + .shutdown = mmc_shutdown, .dma_mask = 0xffffffff, .slots[0] = { .set_power = mmc_set_power, @@ -53,13 +73,6 @@ static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC]; void __init h2_mmc_init(void) { - int ret; - - ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power"); - if (ret < 0) - return; - gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 0); - mmc_data[0] = &mmc1_data; omap1_init_mmc(mmc_data, OMAP16XX_NR_MMC); } diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h index 2900a4a..8bf70cf 100644 --- a/arch/arm/mach-omap2/clock24xx.h +++ b/arch/arm/mach-omap2/clock24xx.h @@ -2727,7 +2727,6 @@ static struct clk usbhs_ick = { static struct clk mmchs1_ick = { .name = "mmchs_ick", - .id = 1, .parent = &l4_ck, .prcm_mod = CORE_MOD, .flags = CLOCK_IN_OMAP243X | WAIT_READY, @@ -2740,7 +2739,6 @@ static struct clk mmchs1_ick = { static struct clk mmchs1_fck = { .name = "mmchs_fck", - .id = 1, .parent = &func_96m_ck, .prcm_mod = CORE_MOD, .flags = CLOCK_IN_OMAP243X, @@ -2752,7 +2750,7 @@ static struct clk mmchs1_fck = { static struct clk mmchs2_ick = { .name = "mmchs_ick", - .id = 2, + .id = 1, .parent = &l4_ck, .prcm_mod = CORE_MOD, .flags = CLOCK_IN_OMAP243X | WAIT_READY, @@ -2765,7 +2763,7 @@ static struct clk mmchs2_ick = { static struct clk mmchs2_fck = { .name = "mmchs_fck", - .id = 2, + .id = 1, .parent = &func_96m_ck, .prcm_mod = CORE_MOD, .flags = CLOCK_IN_OMAP243X, diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 086e6de..c6544d2 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1015,7 +1015,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data } if (is_read) { - if (host->id == 1) { + if (host->id == 0) { sync_dev = OMAP_DMA_MMC_RX; dma_dev_name = "MMC1 read"; } else { @@ -1023,7 +1023,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data dma_dev_name = "MMC2 read"; } } else { - if (host->id == 1) { + if (host->id == 0) { sync_dev = OMAP_DMA_MMC_TX; dma_dev_name = "MMC1 write"; } else { diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index cf3cb36..9a007ca 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -87,17 +87,25 @@ #define SRC (1 << 25) #define SRD (1 << 26) -#define OMAP_MMC1_DEVID 1 -#define OMAP_MMC2_DEVID 2 +/* + * FIXME: Most likely all the data using these _DEVID defines should come + * from the platform_data, or implemented in controller and slot specific + * functions. + */ +#define OMAP_MMC1_DEVID 0 +#define OMAP_MMC2_DEVID 1 + #define OMAP_MMC_DATADIR_NONE 0 #define OMAP_MMC_DATADIR_READ 1 #define OMAP_MMC_DATADIR_WRITE 2 #define MMC_TIMEOUT_MS 20 #define OMAP_MMC_MASTER_CLOCK 96000000 #define DRIVER_NAME "mmci-omap" + /* - * slot_id is device id - 1, device id is a static value - * of 1 to represent device 1 etc.. + * One controller can have multiple slots, like on some omap boards using + * omap.c controller driver. Luckily this is not currently done on any known + * omap_hsmmc.c device. */ #define mmc_slot(host) (host->pdata->slots[host->slot_id]) ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-30 12:58 ` Tony Lindgren @ 2008-09-30 13:22 ` Felipe Balbi 2008-09-30 13:35 ` Tony Lindgren 2008-09-30 13:24 ` Felipe Contreras 1 sibling, 1 reply; 15+ messages in thread From: Felipe Balbi @ 2008-09-30 13:22 UTC (permalink / raw) To: ext Tony Lindgren Cc: Steve Sakoman, Koen Kooi, linux-omap@vger.kernel.org List On Tue, Sep 30, 2008 at 03:58:39PM +0300, Tony Lindgren wrote: > + * One controller can have multiple slots, like on some omap boards using > + * omap.c controller driver. Luckily this is not currently done on any known > + * omap_hsmmc.c device. this is only true for omap1 afaict. -- balbi ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-30 13:22 ` Felipe Balbi @ 2008-09-30 13:35 ` Tony Lindgren 2008-09-30 13:43 ` Felipe Balbi 0 siblings, 1 reply; 15+ messages in thread From: Tony Lindgren @ 2008-09-30 13:35 UTC (permalink / raw) To: Felipe Balbi; +Cc: Steve Sakoman, Koen Kooi, linux-omap@vger.kernel.org List * Felipe Balbi <felipe.balbi@nokia.com> [080930 16:22]: > On Tue, Sep 30, 2008 at 03:58:39PM +0300, Tony Lindgren wrote: > > + * One controller can have multiple slots, like on some omap boards using > > + * omap.c controller driver. Luckily this is not currently done on any known > > + * omap_hsmmc.c device. > > this is only true for omap1 afaict. Do you mean omap.c but not on omap_hsmmc.c? If for sure we'll never have multiple slots on omap_hsmmc.c, we could simplify the code and assume the slot is always 0. Tony ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-30 13:35 ` Tony Lindgren @ 2008-09-30 13:43 ` Felipe Balbi 0 siblings, 0 replies; 15+ messages in thread From: Felipe Balbi @ 2008-09-30 13:43 UTC (permalink / raw) To: ext Tony Lindgren Cc: Felipe Balbi, Steve Sakoman, Koen Kooi, linux-omap@vger.kernel.org List On Tue, Sep 30, 2008 at 04:35:51PM +0300, Tony Lindgren wrote: > * Felipe Balbi <felipe.balbi@nokia.com> [080930 16:22]: > > On Tue, Sep 30, 2008 at 03:58:39PM +0300, Tony Lindgren wrote: > > > + * One controller can have multiple slots, like on some omap boards using > > > + * omap.c controller driver. Luckily this is not currently done on any known > > > + * omap_hsmmc.c device. > > > > this is only true for omap1 afaict. > > Do you mean omap.c but not on omap_hsmmc.c? > > If for sure we'll never have multiple slots on omap_hsmmc.c, we could simplify > the code and assume the slot is always 0. Yeah, looks like multislot is only useful for 2420 (h4 and n8x0). -- balbi ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: MMC broken on beagleboard with current git 2008-09-30 12:58 ` Tony Lindgren 2008-09-30 13:22 ` Felipe Balbi @ 2008-09-30 13:24 ` Felipe Contreras 1 sibling, 0 replies; 15+ messages in thread From: Felipe Contreras @ 2008-09-30 13:24 UTC (permalink / raw) To: Tony Lindgren; +Cc: Steve Sakoman, Koen Kooi, linux-omap@vger.kernel.org List On Tue, Sep 30, 2008 at 3:58 PM, Tony Lindgren <tony@atomide.com> wrote: > * Tony Lindgren <tony@atomide.com> [080928 15:44]: >> * Tony Lindgren <tony@atomide.com> [080926 14:11]: >> > * Tony Lindgren <tony@atomide.com> [080926 10:40]: >> > > * Steve Sakoman <sakoman@gmail.com> [080925 18:24]: >> > > > On Thu, Sep 25, 2008 at 3:39 AM, Tony Lindgren <tony@atomide.com> wrote: >> > > > >> > > > > Hmm, I don't understand how it could work on 3430sdp... >> > > > > >> > > > > Looks like board-omap3beagle.c calls hsmmc_init() just like >> > > > > board-3430sdp.c. Maybe timings have changed and you need >> > > > > a longer delay somewhere during the init? >> > > > >> > > > I can confirm that mmc is also broken on Overo. I'll spend some time >> > > > today investigating. >> > > >> > > I'll double check on omap3430sdp. >> > >> > Hmm, MMC does not seem to work any longer on 3430sdp either. I guess I >> > have broken it, sorry. >> > >> > I've also confirmed that undoing c434c15d28c82d92e55897bd265c423e9ab69362 >> > makes it work again. >> > >> > I swear it was working when I last tested it.. I'll try to debug it >> > further, but I may not get to it for real until on Monday. >> > >> > I still suspect some timing change caused by the init changes.. >> >> I've reverted c434c15d28c82d92e55897bd265c423e9ab69362 as I may not be >> able to debug it until Wednesday. > > OK, found the problem, here's a diff on top of the currently reverted > patch. I've pushed the MMC changes with this fix merged in, can you > guys try it out now? Seems to work fine for me on the beagleboard. -- Felipe Contreras ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-09-30 13:44 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-09-25 8:41 MMC broken on beagleboard with current git Koen Kooi 2008-09-25 8:51 ` Tony Lindgren 2008-09-25 9:23 ` Koen Kooi 2008-09-25 9:47 ` Tony Lindgren 2008-09-25 10:24 ` Koen Kooi 2008-09-25 10:39 ` Tony Lindgren 2008-09-25 15:24 ` Steve Sakoman 2008-09-26 7:42 ` Tony Lindgren 2008-09-26 11:13 ` Tony Lindgren 2008-09-28 12:46 ` Tony Lindgren 2008-09-30 12:58 ` Tony Lindgren 2008-09-30 13:22 ` Felipe Balbi 2008-09-30 13:35 ` Tony Lindgren 2008-09-30 13:43 ` Felipe Balbi 2008-09-30 13:24 ` Felipe Contreras
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox