Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Hi all, 2010/10/10 Mike Rapoport m...@compulab.co.il: Hi Madhu, Madhusudhan wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Thursday, October 07, 2010 8:57 AM To: Mike Rapoport Cc: Madhusudhan Chikkature; David Vrabel; Chris Ball; linux- m...@vger.kernel.org; linux-omap@vger.kernel.org; Adrian Hunter Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) I can confirm exactly the same behavior on my hardware with this version of the patch. Steve, Okay. Did the version you had in your tree worked? I just want to check if I messed up something in my patch. The patch works if applied before commit b417577d3b9bbb06a4ddc9aa955af9bd503f7242 (omap_hsmmc: improve interrupt synchronisation). Apparently, changes in interrupt handling require major rework of the SDIO interrupt handling... On my hardware with this version of the patch and with commit b417577d3b9bbb06a4ddc9aa955af9bd503f7242 previously applied still not working, I'm missing something else ? Cheers, Enric Regards, Madhu Steve -- Sincerely yours, Mike. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Hi Madhu, Madhusudhan wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Thursday, October 07, 2010 8:57 AM To: Mike Rapoport Cc: Madhusudhan Chikkature; David Vrabel; Chris Ball; linux- m...@vger.kernel.org; linux-omap@vger.kernel.org; Adrian Hunter Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) I can confirm exactly the same behavior on my hardware with this version of the patch. Steve, Okay. Did the version you had in your tree worked? I just want to check if I messed up something in my patch. The patch works if applied before commit b417577d3b9bbb06a4ddc9aa955af9bd503f7242 (omap_hsmmc: improve interrupt synchronisation). Apparently, changes in interrupt handling require major rework of the SDIO interrupt handling... Regards, Madhu Steve -- Sincerely yours, Mike. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Hi Madhu, Madhusudhan Chikkature wrote: snip You are correct! The version of the patch in the repo indeed has 'out' in the wrong place and generates a compile error. Could you post the patch you are using and I will try to reproduce what you are seeing on my hardware? Best we all work from exactly the same patch! Steve Yes. I think that check breaking the compilation is not needed. How about the below version? It just removes that check. This version should apply fine on the latest kernel. I did a sanity test of MMC/SD cards on OMAP4 SDP. Steve or Mike can check if SDIO interrupts are working. With you patch I get the same: libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman libertas: command 0x0003 timed out libertas: Timeout submitting command 0x0003 libertas: PREP_CMD: command 0x0003 failed: -110 libertas_sdio: probe of mmc1:0001:1 failed with error -110 The libertas driver is expecting and interrupt from the card that signals completion of the firmware initialization. But the SDIO interrupts are disabled because every request from host to card has been completed. Moreover, if there were SDIO interrupts they would be ignored by the omap_hsmmc_do_irq handler because it returns immediately is there is not request in process. I've tried to move the check for the SDIO interrupt to the very beginning of the ISR but to no avail Regards, Madhu From 08b77fd388f19f5df3758a2c59dcdec280f373c8 Mon Sep 17 00:00:00 2001 From: David Vrabel david.vra...@csr.com Date: Wed, 6 Oct 2010 12:39:18 -0500 Subject: [PATCH 1/2] mmc: omap_hsmmc: enable SDIO card interrupts Enable the use of SDIO card interrupts. FCLK must be enabled while SDIO interrupts are enabled or the MMC module won't wake-up (even though ENAWAKEUP in SYSCONFIG and IWE in HTCL have been set). Enabling the MMC module to wake-up would require configuring the MMC module (and the mmci_dat[1] GPIO when the CORE power domain is OFF) as wake-up sources in the PRCM. The writes to STAT and ISE when starting a command are unnecessary and have been removed. Signed-off-by: David Vrabel david.vra...@csr.com --- drivers/mmc/host/omap_hsmmc.c | 72 + 1 files changed, 65 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4693e62..948dd9a 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -66,6 +66,7 @@ #define SDVS_MASK 0x0E00 #define SDVSCLR0xF1FF #define SDVSDET0x0400 +#define ENAWAKEUP (1 2) #define AUTOIDLE 0x1 #define SDBP (1 8) #define DTO0xe @@ -76,9 +77,12 @@ #define CLKD_SHIFT 6 #define DTO_MASK 0x000F #define DTO_SHIFT 16 +#define CIRQ_ENABLE(1 8) #define INT_EN_MASK0x307F0033 #define BWR_ENABLE (1 4) #define BRR_ENABLE (1 5) +#define CTPL (1 11) +#define CLKEXTFREE (1 16) #define DTO_ENABLE (1 20) #define INIT_STREAM(1 1) #define DP_SELECT (1 21) @@ -87,10 +91,12 @@ #define MSBS (1 5) #define BCE(1 1) #define FOUR_BIT (1 1) +#define IWE(1 24) #define DW8(1 5) #define CC 0x1 #define TC 0x02 #define OD 0x1 +#define CIRQ (1 8) #define ERR(1 15) #define CMD_TIMEOUT(1 16) #define DATA_TIMEOUT (1 20) @@ -184,6 +190,7 @@ struct omap_hsmmc_host { int reqs_blocked; int use_reg; int req_in_progress; + int sdio_int; struct omap_mmc_platform_data *pdata; }; @@ -551,6 +558,9 @@ static void omap_hsmmc_enable_irq(struct omap_hsmmc_host *host, if (cmd-opcode == MMC_ERASE) irq_mask = ~DTO_ENABLE; + if (host-sdio_int) + irq_mask |= CIRQ; + OMAP_HSMMC_WRITE(host-base, STAT, STAT_CLEAR); OMAP_HSMMC_WRITE(host-base, ISE, irq_mask); OMAP_HSMMC_WRITE(host-base, IE, irq_mask); @@ -603,7 +613,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) ; OMAP_HSMMC_WRITE(host-base, SYSCONFIG, - OMAP_HSMMC_READ(host-base, SYSCONFIG) | AUTOIDLE); + OMAP_HSMMC_READ(host-base, SYSCONFIG) | AUTOIDLE | ENAWAKEUP); if (host-id == OMAP_MMC1_DEVID) { if (host-power_mode != MMC_POWER_OFF @@ -618,7 +628,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) } OMAP_HSMMC_WRITE(host-base, HCTL, - OMAP_HSMMC_READ(host-base,
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Thu, Oct 7, 2010 at 12:15 AM, Mike Rapoport m...@compulab.co.il wrote: Hi Madhu, Madhusudhan Chikkature wrote: snip You are correct! The version of the patch in the repo indeed has 'out' in the wrong place and generates a compile error. Could you post the patch you are using and I will try to reproduce what you are seeing on my hardware? Best we all work from exactly the same patch! Steve Yes. I think that check breaking the compilation is not needed. How about the below version? It just removes that check. This version should apply fine on the latest kernel. I did a sanity test of MMC/SD cards on OMAP4 SDP. Steve or Mike can check if SDIO interrupts are working. With you patch I get the same: libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman libertas: command 0x0003 timed out libertas: Timeout submitting command 0x0003 libertas: PREP_CMD: command 0x0003 failed: -110 libertas_sdio: probe of mmc1:0001:1 failed with error -110 I can confirm exactly the same behavior on my hardware with this version of the patch. Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
-Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Thursday, October 07, 2010 8:57 AM To: Mike Rapoport Cc: Madhusudhan Chikkature; David Vrabel; Chris Ball; linux- m...@vger.kernel.org; linux-omap@vger.kernel.org; Adrian Hunter Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Thu, Oct 7, 2010 at 12:15 AM, Mike Rapoport m...@compulab.co.il wrote: Hi Madhu, Madhusudhan Chikkature wrote: snip You are correct! The version of the patch in the repo indeed has 'out' in the wrong place and generates a compile error. Could you post the patch you are using and I will try to reproduce what you are seeing on my hardware? Best we all work from exactly the same patch! Steve Yes. I think that check breaking the compilation is not needed. How about the below version? It just removes that check. This version should apply fine on the latest kernel. I did a sanity test of MMC/SD cards on OMAP4 SDP. Steve or Mike can check if SDIO interrupts are working. With you patch I get the same: libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman libertas: command 0x0003 timed out libertas: Timeout submitting command 0x0003 libertas: PREP_CMD: command 0x0003 failed: -110 libertas_sdio: probe of mmc1:0001:1 failed with error -110 I can confirm exactly the same behavior on my hardware with this version of the patch. Steve, Okay. Did the version you had in your tree worked? I just want to check if I messed up something in my patch. Regards, Madhu Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Thu, Oct 7, 2010 at 9:52 AM, Madhusudhan madhu...@ti.com wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Thursday, October 07, 2010 8:57 AM To: Mike Rapoport Cc: Madhusudhan Chikkature; David Vrabel; Chris Ball; linux- m...@vger.kernel.org; linux-omap@vger.kernel.org; Adrian Hunter Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Thu, Oct 7, 2010 at 12:15 AM, Mike Rapoport m...@compulab.co.il wrote: Hi Madhu, Madhusudhan Chikkature wrote: snip You are correct! The version of the patch in the repo indeed has 'out' in the wrong place and generates a compile error. Could you post the patch you are using and I will try to reproduce what you are seeing on my hardware? Best we all work from exactly the same patch! Steve Yes. I think that check breaking the compilation is not needed. How about the below version? It just removes that check. This version should apply fine on the latest kernel. I did a sanity test of MMC/SD cards on OMAP4 SDP. Steve or Mike can check if SDIO interrupts are working. With you patch I get the same: libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman libertas: command 0x0003 timed out libertas: Timeout submitting command 0x0003 libertas: PREP_CMD: command 0x0003 failed: -110 libertas_sdio: probe of mmc1:0001:1 failed with error -110 I can confirm exactly the same behavior on my hardware with this version of the patch. Steve, Okay. Did the version you had in your tree worked? I just want to check if I messed up something in my patch. No, it didn't. Operator error -- I was testing a version without the patch applied :-) When applied it acts the same as your version. Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Steve Sakoman wrote: On Mon, Oct 4, 2010 at 10:33 AM, Madhusudhan madhu...@ti.com wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:57 AM To: Madhusudhan Cc: Mike Rapoport; David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux-omap@vger.kernel.org Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Mon, Oct 4, 2010 at 9:45 AM, Madhusudhan madhu...@ti.com wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:32 AM To: Mike Rapoport Cc: David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux- o...@vger.kernel.org; madhu...@ti.com Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Wed, Sep 1, 2010 at 11:02 PM, Mike Rapoport m...@compulab.co.il wrote: David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update the patches in the next few days. Any update on the status of these patches? I'm happy to help test! Steve, I have not been able to test SDIO card interrupts. If you could help test that it's great. Where can I grab the most recent patches? The original set don't apply cleanly. Yes. They may not apply. I can rebase them and send it to you for testing. Are you using the two patches posted by David Vrabel? Yes, I've been using the original patches on 2.6.33 and 2.6.34. The SDIO interrupt patch doesn't apply on 2.6.35 or 36. If you send a revised patch for either I would be happy to test as soon as I get it. I've tried to update the patches on top of 2.6.36-rc3 and I've got stuck. The changes Adrian has made to the interrupt synchronization affect the way the SDIO irq should be implemented and I haven't found a way to resolve it :-( Steve -- Sincerely yours, Mike. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Tue, Oct 5, 2010 at 11:17 PM, Mike Rapoport m...@compulab.co.il wrote: I've tried to update the patches on top of 2.6.36-rc3 and I've got stuck. The changes Adrian has made to the interrupt synchronization affect the way the SDIO irq should be implemented and I haven't found a way to resolve it :-( I tried my hand at making the patch apply on 2.6.35: http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=51b802d73191c306618cddefbd63379c839589f5 It seems to work, but I'm pretty sure I must have messed something up because I get error messages every once in a while: libertas: tx watch dog timeout I don't recall seeing these with the original version of the patch :-( Suggestions as to where I went wrong are welcome! Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Hi Steve, Steve Sakoman wrote: On Tue, Oct 5, 2010 at 11:17 PM, Mike Rapoport m...@compulab.co.il wrote: I've tried to update the patches on top of 2.6.36-rc3 and I've got stuck. The changes Adrian has made to the interrupt synchronization affect the way the SDIO irq should be implemented and I haven't found a way to resolve it :-( I tried my hand at making the patch apply on 2.6.35: http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=51b802d73191c306618cddefbd63379c839589f5 This one fails to build: CC drivers/mmc/host/omap_hsmmc.o drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_start_command': drivers/mmc/host/omap_hsmmc.c:791: warning: unused variable 'int_en_mask' drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_do_irq': drivers/mmc/host/omap_hsmmc.c:1023: error: label 'out' used but not defined drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_irq': drivers/mmc/host/omap_hsmmc.c:1101: warning: label 'out' defined but not used drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_suspend': drivers/mmc/host/omap_hsmmc.c:2346: warning: unused variable 'state' make[4]: *** [drivers/mmc/host/omap_hsmmc.o] Error 1 Moving the 'out' label where I believe it should live I get: libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman libertas: command 0x0003 timed out libertas: Timeout submitting command 0x0003 libertas: PREP_CMD: command 0x0003 failed: -110 libertas_sdio: probe of mmc1:0001:1 failed with error -110 It seems to work, but I'm pretty sure I must have messed something up because I get error messages every once in a while: libertas: tx watch dog timeout I don't recall seeing these with the original version of the patch :-( Suggestions as to where I went wrong are welcome! I've applied the patch almost the same way you did and I was not able to get any further than the point above (command 0x0003 timed out). As far as I understand, what we have now is that omap_hsmmc_request_done() calls omap_hsmmc_disable_irq() and the interrupts that come from the 8686 _between_ requests are simply missed. Whatever I've tried to keep the SDIO interrupts on didn't help... :( Steve -- Sincerely yours, Mike. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Wed, Oct 6, 2010 at 6:45 AM, Mike Rapoport m...@compulab.co.il wrote: Hi Steve, Steve Sakoman wrote: On Tue, Oct 5, 2010 at 11:17 PM, Mike Rapoport m...@compulab.co.il wrote: I've tried to update the patches on top of 2.6.36-rc3 and I've got stuck. The changes Adrian has made to the interrupt synchronization affect the way the SDIO irq should be implemented and I haven't found a way to resolve it :-( I tried my hand at making the patch apply on 2.6.35: http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=51b802d73191c306618cddefbd63379c839589f5 This one fails to build: CC drivers/mmc/host/omap_hsmmc.o drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_start_command': drivers/mmc/host/omap_hsmmc.c:791: warning: unused variable 'int_en_mask' drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_do_irq': drivers/mmc/host/omap_hsmmc.c:1023: error: label 'out' used but not defined drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_irq': drivers/mmc/host/omap_hsmmc.c:1101: warning: label 'out' defined but not used drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_suspend': drivers/mmc/host/omap_hsmmc.c:2346: warning: unused variable 'state' make[4]: *** [drivers/mmc/host/omap_hsmmc.o] Error 1 Moving the 'out' label where I believe it should live I get: libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman libertas: command 0x0003 timed out libertas: Timeout submitting command 0x0003 libertas: PREP_CMD: command 0x0003 failed: -110 libertas_sdio: probe of mmc1:0001:1 failed with error -110 It seems to work, but I'm pretty sure I must have messed something up because I get error messages every once in a while: libertas: tx watch dog timeout I don't recall seeing these with the original version of the patch :-( Suggestions as to where I went wrong are welcome! I've applied the patch almost the same way you did and I was not able to get any further than the point above (command 0x0003 timed out). As far as I understand, what we have now is that omap_hsmmc_request_done() calls omap_hsmmc_disable_irq() and the interrupts that come from the 8686 _between_ requests are simply missed. Whatever I've tried to keep the SDIO interrupts on didn't help... :( You are correct! The version of the patch in the repo indeed has 'out' in the wrong place and generates a compile error. Could you post the patch you are using and I will try to reproduce what you are seeing on my hardware? Best we all work from exactly the same patch! Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
snip You are correct! The version of the patch in the repo indeed has 'out' in the wrong place and generates a compile error. Could you post the patch you are using and I will try to reproduce what you are seeing on my hardware? Best we all work from exactly the same patch! Steve Yes. I think that check breaking the compilation is not needed. How about the below version? It just removes that check. This version should apply fine on the latest kernel. I did a sanity test of MMC/SD cards on OMAP4 SDP. Steve or Mike can check if SDIO interrupts are working. Regards, Madhu From 08b77fd388f19f5df3758a2c59dcdec280f373c8 Mon Sep 17 00:00:00 2001 From: David Vrabel david.vra...@csr.com Date: Wed, 6 Oct 2010 12:39:18 -0500 Subject: [PATCH 1/2] mmc: omap_hsmmc: enable SDIO card interrupts Enable the use of SDIO card interrupts. FCLK must be enabled while SDIO interrupts are enabled or the MMC module won't wake-up (even though ENAWAKEUP in SYSCONFIG and IWE in HTCL have been set). Enabling the MMC module to wake-up would require configuring the MMC module (and the mmci_dat[1] GPIO when the CORE power domain is OFF) as wake-up sources in the PRCM. The writes to STAT and ISE when starting a command are unnecessary and have been removed. Signed-off-by: David Vrabel david.vra...@csr.com --- drivers/mmc/host/omap_hsmmc.c | 72 + 1 files changed, 65 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4693e62..948dd9a 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -66,6 +66,7 @@ #define SDVS_MASK 0x0E00 #define SDVSCLR0xF1FF #define SDVSDET0x0400 +#define ENAWAKEUP (1 2) #define AUTOIDLE 0x1 #define SDBP (1 8) #define DTO0xe @@ -76,9 +77,12 @@ #define CLKD_SHIFT 6 #define DTO_MASK 0x000F #define DTO_SHIFT 16 +#define CIRQ_ENABLE(1 8) #define INT_EN_MASK0x307F0033 #define BWR_ENABLE (1 4) #define BRR_ENABLE (1 5) +#define CTPL (1 11) +#define CLKEXTFREE (1 16) #define DTO_ENABLE (1 20) #define INIT_STREAM(1 1) #define DP_SELECT (1 21) @@ -87,10 +91,12 @@ #define MSBS (1 5) #define BCE(1 1) #define FOUR_BIT (1 1) +#define IWE(1 24) #define DW8(1 5) #define CC 0x1 #define TC 0x02 #define OD 0x1 +#define CIRQ (1 8) #define ERR(1 15) #define CMD_TIMEOUT(1 16) #define DATA_TIMEOUT (1 20) @@ -184,6 +190,7 @@ struct omap_hsmmc_host { int reqs_blocked; int use_reg; int req_in_progress; + int sdio_int; struct omap_mmc_platform_data *pdata; }; @@ -551,6 +558,9 @@ static void omap_hsmmc_enable_irq(struct omap_hsmmc_host *host, if (cmd-opcode == MMC_ERASE) irq_mask = ~DTO_ENABLE; + if (host-sdio_int) + irq_mask |= CIRQ; + OMAP_HSMMC_WRITE(host-base, STAT, STAT_CLEAR); OMAP_HSMMC_WRITE(host-base, ISE, irq_mask); OMAP_HSMMC_WRITE(host-base, IE, irq_mask); @@ -603,7 +613,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) ; OMAP_HSMMC_WRITE(host-base, SYSCONFIG, - OMAP_HSMMC_READ(host-base, SYSCONFIG) | AUTOIDLE); + OMAP_HSMMC_READ(host-base, SYSCONFIG) | AUTOIDLE | ENAWAKEUP); if (host-id == OMAP_MMC1_DEVID) { if (host-power_mode != MMC_POWER_OFF @@ -618,7 +628,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) } OMAP_HSMMC_WRITE(host-base, HCTL, - OMAP_HSMMC_READ(host-base, HCTL) | hctl); + OMAP_HSMMC_READ(host-base, HCTL) | hctl | IWE); OMAP_HSMMC_WRITE(host-base, CAPA, OMAP_HSMMC_READ(host-base, CAPA) | capa); @@ -1019,6 +1029,7 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) { struct mmc_data *data; int end_cmd = 0, end_trans = 0; + bool card_irq = false; if (!host-req_in_progress) { do { @@ -1032,6 +1043,9 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) data = host-data; dev_dbg(mmc_dev(host-mmc), IRQ Status is %x\n, status); + if (status CIRQ) + card_irq = true; + if (status ERR) { #ifdef CONFIG_MMC_DEBUG omap_hsmmc_report_irq(host, status); @@ -1087,6 +1101,9 @@
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Madhusudhan Chikkature wrote: This version should apply fine on the latest kernel. I did a sanity test of MMC/SD cards on OMAP4 SDP. This /looks/ okay to me, but I can't test it. From 08b77fd388f19f5df3758a2c59dcdec280f373c8 Mon Sep 17 00:00:00 2001 From: David Vrabel david.vra...@csr.com Date: Wed, 6 Oct 2010 12:39:18 -0500 Subject: [PATCH 1/2] mmc: omap_hsmmc: enable SDIO card interrupts [...] The writes to STAT and ISE when starting a command are unnecessary and have been removed. Remove this last paragraph from the description as it isn't applicable any more. David -- David Vrabel, Senior Software Engineer, Drivers CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562 Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/ Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
-Original Message- From: David Vrabel [mailto:david.vra...@csr.com] Sent: Wednesday, October 06, 2010 2:02 PM To: Madhusudhan Chikkature Cc: Steve Sakoman; Mike Rapoport; Chris Ball; linux-...@vger.kernel.org; linux-omap@vger.kernel.org; Adrian Hunter Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) Madhusudhan Chikkature wrote: This version should apply fine on the latest kernel. I did a sanity test of MMC/SD cards on OMAP4 SDP. This /looks/ okay to me, but I can't test it. From 08b77fd388f19f5df3758a2c59dcdec280f373c8 Mon Sep 17 00:00:00 2001 From: David Vrabel david.vra...@csr.com Date: Wed, 6 Oct 2010 12:39:18 -0500 Subject: [PATCH 1/2] mmc: omap_hsmmc: enable SDIO card interrupts [...] The writes to STAT and ISE when starting a command are unnecessary and have been removed. Remove this last paragraph from the description as it isn't applicable any more. Sure. Regards, Madhu David -- David Vrabel, Senior Software Engineer, Drivers CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562 Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/ Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Wed, Sep 1, 2010 at 11:02 PM, Mike Rapoport m...@compulab.co.il wrote: David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update the patches in the next few days. Any update on the status of these patches? I'm happy to help test! Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
-Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:32 AM To: Mike Rapoport Cc: David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux- o...@vger.kernel.org; madhu...@ti.com Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Wed, Sep 1, 2010 at 11:02 PM, Mike Rapoport m...@compulab.co.il wrote: David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update the patches in the next few days. Any update on the status of these patches? I'm happy to help test! Steve, I have not been able to test SDIO card interrupts. If you could help test that it's great. Regards, Madhu Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Mon, Oct 4, 2010 at 9:45 AM, Madhusudhan madhu...@ti.com wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:32 AM To: Mike Rapoport Cc: David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux- o...@vger.kernel.org; madhu...@ti.com Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Wed, Sep 1, 2010 at 11:02 PM, Mike Rapoport m...@compulab.co.il wrote: David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update the patches in the next few days. Any update on the status of these patches? I'm happy to help test! Steve, I have not been able to test SDIO card interrupts. If you could help test that it's great. Where can I grab the most recent patches? The original set don't apply cleanly. Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
-Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:57 AM To: Madhusudhan Cc: Mike Rapoport; David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux-omap@vger.kernel.org Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Mon, Oct 4, 2010 at 9:45 AM, Madhusudhan madhu...@ti.com wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:32 AM To: Mike Rapoport Cc: David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux- o...@vger.kernel.org; madhu...@ti.com Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Wed, Sep 1, 2010 at 11:02 PM, Mike Rapoport m...@compulab.co.il wrote: David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update the patches in the next few days. Any update on the status of these patches? I'm happy to help test! Steve, I have not been able to test SDIO card interrupts. If you could help test that it's great. Where can I grab the most recent patches? The original set don't apply cleanly. Yes. They may not apply. I can rebase them and send it to you for testing. Are you using the two patches posted by David Vrabel? Regards, Madhu Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Mon, Oct 4, 2010 at 10:33 AM, Madhusudhan madhu...@ti.com wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:57 AM To: Madhusudhan Cc: Mike Rapoport; David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux-omap@vger.kernel.org Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Mon, Oct 4, 2010 at 9:45 AM, Madhusudhan madhu...@ti.com wrote: -Original Message- From: Steve Sakoman [mailto:sako...@gmail.com] Sent: Monday, October 04, 2010 11:32 AM To: Mike Rapoport Cc: David Vrabel; Chris Ball; linux-...@vger.kernel.org; linux- o...@vger.kernel.org; madhu...@ti.com Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) On Wed, Sep 1, 2010 at 11:02 PM, Mike Rapoport m...@compulab.co.il wrote: David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update the patches in the next few days. Any update on the status of these patches? I'm happy to help test! Steve, I have not been able to test SDIO card interrupts. If you could help test that it's great. Where can I grab the most recent patches? The original set don't apply cleanly. Yes. They may not apply. I can rebase them and send it to you for testing. Are you using the two patches posted by David Vrabel? Yes, I've been using the original patches on 2.6.33 and 2.6.34. The SDIO interrupt patch doesn't apply on 2.6.35 or 36. If you send a revised patch for either I would be happy to test as soon as I get it. Steve -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update the patches in the next few days. David -- Sincerely yours, Mike. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Tue, Aug 31, 2010 at 09:59:44AM +0100, David Vrabel wrote: On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. I'll try to update it to the recent kernel in the next few days. David -- Sincerely yours, Mike -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On 27/08/2010 20:22, Chris Ball wrote: Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? I thought Madhu had picked this up and was going to submit it. Regardless of whether that is the case, I think it needs to be submitted by someone who can run mainline kernels (I can't) and ideally someone who can test it with SDIO cards. David -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Hi David, On Mon, Feb 22, 2010 at 02:24:17PM +, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts Looks like this patchset wasn't merged. Mike Rapoport replied with a fix for libertas. Would you like to resubmit it? -- Chris Ball c...@laptop.org http://printf.net/ One Laptop Per Child -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Hi David, David Vrabel wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've tested your patches with libertas_sdio and after several small additions I've made it work. drivers/mmc/host/omap_hsmmc.c | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 53fa85d..6ed71b7 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -82,6 +82,7 @@ #define BWR_ENABLE (1 4) #define BRR_ENABLE (1 5) #define CTPL (1 11) +#define CLKEXTFREE (1 16) #define INIT_STREAM(1 1) #define DP_SELECT (1 21) #define DDIR (1 4) @@ -189,6 +190,7 @@ struct omap_hsmmc_host { int protect_card; int reqs_blocked; int use_reg; + int sdio_int; struct omap_mmc_platform_data *pdata; }; @@ -763,16 +765,19 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, struct mmc_data *data) { int cmdreg = 0, resptype = 0, cmdtype = 0; + int int_en_mask = INT_EN_MASK; dev_dbg(mmc_dev(host-mmc), %s: CMD%d, argument 0x%08x\n, mmc_hostname(host-mmc), cmd-opcode, cmd-arg); host-cmd = cmd; if (host-use_dma) - OMAP_HSMMC_WRITE(host-base, IE, -INT_EN_MASK ~(BRR_ENABLE | BWR_ENABLE)); - else - OMAP_HSMMC_WRITE(host-base, IE, INT_EN_MASK); + int_en_mask = ~(BRR_ENABLE | BWR_ENABLE); + + if (host-sdio_int) + int_en_mask |= CIRQ; + + OMAP_HSMMC_WRITE(host-base, IE, int_en_mask); host-response_busy = 0; if (cmd-flags MMC_RSP_PRESENT) { @@ -1619,10 +1624,12 @@ static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable) if (enable) { clk_enable(host-fclk); ie |= CIRQ_ENABLE; - con |= CTPL; + con |= CTPL | CLKEXTFREE; + host-sdio_int = 1; } else { ie = ~CIRQ_ENABLE; - con = ~CTPL; + con = ~(CTPL | CLKEXTFREE); + host-sdio_int = 0; } OMAP_HSMMC_WRITE(host-base, CON, con); OMAP_HSMMC_WRITE(host-base, IE, ie); -- 1.6.4.4 I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts drivers/mmc/host/omap_hsmmc.c | 114 - 1 files changed, 79 insertions(+), 35 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Sincerely yours, Mike. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Changes since v1: - (hopefully) get all cards working again by removing a second call to read MMCi_STAT in the interrupt handler. - flush posted writes after enabling/disabling SDIO interrupts. - tweak the FIXME commit on disabling FCLK to better match what really going on (at least I think so anyway). David Vrabel (2): mmc: omap_hsmmc: don't turn SDIO cards off when idle mmc: omap_hsmmc: enable SDIO card interrupts drivers/mmc/host/omap_hsmmc.c | 114 - 1 files changed, 79 insertions(+), 35 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Mon, Feb 22, 2010 at 4:24 PM, David Vrabel david.vra...@csr.com wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Can't you get the source code with 'apt-get source' in Maemo SDK? It's a tarball but at least it's something. -- Felipe Contreras -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
Felipe Contreras wrote: On Mon, Feb 22, 2010 at 4:24 PM, David Vrabel david.vra...@csr.com wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Can't you get the source code with 'apt-get source' in Maemo SDK? It's a tarball but at least it's something. I have SDIO cards tested and working on the N900 with the Fremantle kernel but that's a modified 2.6.28 kernel. These patches are for mainline and there are differences between mainline and the fremantle kernel that means they need different patches. David -- David Vrabel, Senior Software Engineer, Drivers CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562 Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/ Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2)
On Mon, Feb 22, 2010 at 5:11 PM, David Vrabel david.vra...@csr.com wrote: Felipe Contreras wrote: On Mon, Feb 22, 2010 at 4:24 PM, David Vrabel david.vra...@csr.com wrote: These patches add support for SDIO cards to the omap_hsmmc driver. Power management changes to prevent SDIO cards from being turned off and losing all state, and card interrupts. I've been unable to test these exact patches as I only have an N900 for testing and the N900 support in mainline is incomplete. Can't you get the source code with 'apt-get source' in Maemo SDK? It's a tarball but at least it's something. I have SDIO cards tested and working on the N900 with the Fremantle kernel but that's a modified 2.6.28 kernel. These patches are for mainline and there are differences between mainline and the fremantle kernel that means they need different patches. Ah, got it. I was wondering how exactly did you test the patches. -- Felipe Contreras -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html