public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
@ 2007-08-17 19:01 Carlos Aguiar
  2007-08-17 21:45 ` David Brownell
  0 siblings, 1 reply; 9+ messages in thread
From: Carlos Aguiar @ 2007-08-17 19:01 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: omap-linux

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

From: Juha Yrjola <juha.yrjola@solidboot.com>

Introduces new structures for MMC multislot support.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>

[-- Attachment #2: 0001-MMC-OMAP-Introduce-new-structs-for-mmc-multislot-support.diff --]
[-- Type: text/plain, Size: 1628 bytes --]

Introduces new structures for MMC multislot support.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>

Index: linux-omap/drivers/mmc/host/omap.c
===================================================================
--- linux-omap.orig/drivers/mmc/host/omap.c	2007-08-16 12:26:58.000000000 -0400
+++ linux-omap/drivers/mmc/host/omap.c	2007-08-16 12:27:46.000000000 -0400
@@ -32,6 +32,7 @@
 #include <asm/mach-types.h>
 
 #include <asm/arch/board.h>
+#include <asm/arch/mmc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/dma.h>
 #include <asm/arch/mux.h>
@@ -99,6 +100,26 @@
 
 static int mmc_omap_enable_poll = 1;
 
+struct mmc_omap_host;
+
+struct mmc_omap_slot {
+	int			id;
+	unsigned int		vdd;
+	u16			saved_con;
+	u16			bus_mode;
+	unsigned int		fclk_freq;
+	unsigned		powered:1;
+
+	struct work_struct	switch_work;
+	struct timer_list	switch_timer;
+	unsigned		cover_open;
+
+	struct mmc_request *	mrq;
+	struct mmc_omap_host *  host;
+	struct mmc_host *	mmc;
+	struct omap_mmc_slot_data *pdata;
+};
+
 struct mmc_omap_host {
 	int			initialized;
 	int			suspended;
@@ -132,13 +153,13 @@ struct mmc_omap_host {
 	struct timer_list	dma_timer;
 	unsigned		dma_len;
 
-	short			power_pin;
-	short			wp_pin;
+	struct mmc_omap_slot *	slots[OMAP_MMC_MAX_SLOTS];
+	struct mmc_omap_slot *	current_slot;
+	spinlock_t		slot_lock;
+	wait_queue_head_t	slot_wq;
+	int			nr_slots;
 
-	int			switch_pin;
-	struct work_struct	switch_work;
-	struct timer_list	switch_timer;
-	int			switch_last_state;
+	struct omap_mmc_platform_data *pdata;
 };
 
 static inline int

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-08-17 19:01 [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support Carlos Aguiar
@ 2007-08-17 21:45 ` David Brownell
  2007-08-17 21:55   ` David Brownell
  0 siblings, 1 reply; 9+ messages in thread
From: David Brownell @ 2007-08-17 21:45 UTC (permalink / raw)
  To: linux-omap-open-source

On Friday 17 August 2007, Carlos Aguiar wrote:
> Introduces new structures for MMC multislot support.

Seems like #1 and #2 should be a single patch, since
after #1 it won't compile ...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-08-17 21:45 ` David Brownell
@ 2007-08-17 21:55   ` David Brownell
  2007-09-03 13:55     ` Carlos Aguiar
  0 siblings, 1 reply; 9+ messages in thread
From: David Brownell @ 2007-08-17 21:55 UTC (permalink / raw)
  To: linux-omap-open-source

On Friday 17 August 2007, David Brownell wrote:
> On Friday 17 August 2007, Carlos Aguiar wrote:
> > Introduces new structures for MMC multislot support.
> 
> Seems like #1 and #2 should be a single patch, since
> after #1 it won't compile ...

... and maybe #3, and ... ?

Also, this doesn't look to me primarily like "multislot"
support.  It's also "stop relying on GPIOs" for various
things that newer boards handle with external chips
(like CD and WP switches), and "move board-specific code
out of the MMC driver"...

- Dave

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-08-17 21:55   ` David Brownell
@ 2007-09-03 13:55     ` Carlos Aguiar
  2007-09-03 15:45       ` Tony Lindgren
  2007-09-04  8:32       ` Madhusudhan Chikkature Rajashekar
  0 siblings, 2 replies; 9+ messages in thread
From: Carlos Aguiar @ 2007-09-03 13:55 UTC (permalink / raw)
  To: ext David Brownell; +Cc: linux-omap-open-source

ext David Brownell wrote:
> On Friday 17 August 2007, David Brownell wrote:
>   
>> On Friday 17 August 2007, Carlos Aguiar wrote:
>>     
>>> Introduces new structures for MMC multislot support.
>>>       
>> Seems like #1 and #2 should be a single patch, since
>> after #1 it won't compile ...
>>     
>
>   
Hi Dave,
> ... and maybe #3, and ... ?
>   
You're right! But this 'level of granularity' of the patches was
requested by Tony.
> Also, this doesn't look to me primarily like "multislot"
> support.  It's also "stop relying on GPIOs" for various
> things that newer boards handle with external chips
> (like CD and WP switches), and "move board-specific code
> out of the MMC driver"...
>   
The concept of multislot applied here is to provide a code (and needed
modifications) that runs OMAP platforms with a single and/or two MMC slots.

BR,

Carlos.
> - Dave
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
>   


-- 
Carlos Eduardo Aguiar
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC - Manaus
Core Team
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-09-03 13:55     ` Carlos Aguiar
@ 2007-09-03 15:45       ` Tony Lindgren
  2007-09-03 17:38         ` Carlos Aguiar
  2007-09-04  8:32       ` Madhusudhan Chikkature Rajashekar
  1 sibling, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2007-09-03 15:45 UTC (permalink / raw)
  To: Carlos Aguiar; +Cc: linux-omap-open-source

* Carlos Aguiar <carlos.aguiar@indt.org.br> [070903 07:00]:
> ext David Brownell wrote:
> > On Friday 17 August 2007, David Brownell wrote:
> >   
> >> On Friday 17 August 2007, Carlos Aguiar wrote:
> >>     
> >>> Introduces new structures for MMC multislot support.
> >>>       
> >> Seems like #1 and #2 should be a single patch, since
> >> after #1 it won't compile ...
> >>     
> >
> >   
> Hi Dave,
> > ... and maybe #3, and ... ?
> >   
> You're right! But this 'level of granularity' of the patches was
> requested by Tony.

Huh? Naturally the patch series should compile and work after each
step no matter what "level of granularity".

> > Also, this doesn't look to me primarily like "multislot"
> > support.  It's also "stop relying on GPIOs" for various
> > things that newer boards handle with external chips
> > (like CD and WP switches), and "move board-specific code
> > out of the MMC driver"...
> >   
> The concept of multislot applied here is to provide a code (and needed
> modifications) that runs OMAP platforms with a single and/or two MMC slots.

Carlos, what Dave is saying above is that the patches don't do what you have
in the patch description. You should try to do a series of independent
easy to read patches that match the patch description.

Regards,

Tony

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-09-03 15:45       ` Tony Lindgren
@ 2007-09-03 17:38         ` Carlos Aguiar
  0 siblings, 0 replies; 9+ messages in thread
From: Carlos Aguiar @ 2007-09-03 17:38 UTC (permalink / raw)
  To: ext Tony Lindgren; +Cc: linux-omap-open-source

ext Tony Lindgren wrote:
> * Carlos Aguiar <carlos.aguiar@indt.org.br> [070903 07:00]:
>   
>> ext David Brownell wrote:
>>     
>>> On Friday 17 August 2007, David Brownell wrote:
>>>   
>>>       
>>>> On Friday 17 August 2007, Carlos Aguiar wrote:
>>>>     
>>>>         
>>>>> Introduces new structures for MMC multislot support.
>>>>>       
>>>>>           
>>>> Seems like #1 and #2 should be a single patch, since
>>>> after #1 it won't compile ...
>>>>     
>>>>         
>>>   
>>>       
>> Hi Dave,
>>     
>>> ... and maybe #3, and ... ?
>>>   
>>>       
>> You're right! But this 'level of granularity' of the patches was
>> requested by Tony.
>>     
>
> Huh? Naturally the patch series should compile and work after each
> step no matter what "level of granularity".
>
>   
>>> Also, this doesn't look to me primarily like "multislot"
>>> support.  It's also "stop relying on GPIOs" for various
>>> things that newer boards handle with external chips
>>> (like CD and WP switches), and "move board-specific code
>>> out of the MMC driver"...
>>>   
>>>       
>> The concept of multislot applied here is to provide a code (and needed
>> modifications) that runs OMAP platforms with a single and/or two MMC slots.
>>     
>
> Carlos, what Dave is saying above is that the patches don't do what you have
> in the patch description. You should try to do a series of independent
> easy to read patches that match the patch description.
>
> Regards,
>
> Tony
>
>   
Ok Tony,

I'll re-work on the series in order to have the code compiling and
working after each patch applied and each patch having a description
that matches what is doing.

BR,

Carlos.

-- 
Carlos Eduardo Aguiar
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC - Manaus
Core Team
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-09-03 13:55     ` Carlos Aguiar
  2007-09-03 15:45       ` Tony Lindgren
@ 2007-09-04  8:32       ` Madhusudhan Chikkature Rajashekar
  2007-09-04 14:48         ` Carlos Aguiar
  1 sibling, 1 reply; 9+ messages in thread
From: Madhusudhan Chikkature Rajashekar @ 2007-09-04  8:32 UTC (permalink / raw)
  To: 'Carlos Aguiar', 'ext David Brownell'
  Cc: linux-omap-open-source

Hi Carlos,

>The concept of multislot applied here is to provide a code (and needed
>modifications) that runs OMAP platforms with a single and/or two MMC slots.
Does this mean that supporting one or more MMC memory cards sharing the same
bus?

Regards,
Madhu
 
-----Original Message-----
From: linux-omap-open-source-bounces@linux.omap.com
[mailto:linux-omap-open-source-bounces@linux.omap.com] On Behalf Of Carlos
Aguiar
Sent: Monday, September 03, 2007 7:26 PM
To: ext David Brownell
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC
multislot support.

ext David Brownell wrote:
> On Friday 17 August 2007, David Brownell wrote:
>   
>> On Friday 17 August 2007, Carlos Aguiar wrote:
>>     
>>> Introduces new structures for MMC multislot support.
>>>       
>> Seems like #1 and #2 should be a single patch, since
>> after #1 it won't compile ...
>>     
>
>   
Hi Dave,
> ... and maybe #3, and ... ?
>   
You're right! But this 'level of granularity' of the patches was
requested by Tony.
> Also, this doesn't look to me primarily like "multislot"
> support.  It's also "stop relying on GPIOs" for various
> things that newer boards handle with external chips
> (like CD and WP switches), and "move board-specific code
> out of the MMC driver"...
>   
The concept of multislot applied here is to provide a code (and needed
modifications) that runs OMAP platforms with a single and/or two MMC slots.

BR,

Carlos.
> - Dave
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
>   


-- 
Carlos Eduardo Aguiar
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC - Manaus
Core Team
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br

_______________________________________________
Linux-omap-open-source mailing list
Linux-omap-open-source@linux.omap.com
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-09-04  8:32       ` Madhusudhan Chikkature Rajashekar
@ 2007-09-04 14:48         ` Carlos Aguiar
  2007-09-04 14:59           ` Madhusudhan Chikkature Rajashekar
  0 siblings, 1 reply; 9+ messages in thread
From: Carlos Aguiar @ 2007-09-04 14:48 UTC (permalink / raw)
  To: ext Madhusudhan Chikkature Rajashekar; +Cc: linux-omap-open-source

ext Madhusudhan Chikkature Rajashekar wrote:
> Hi Carlos,
>   
Hi Madhu,
>   
>> The concept of multislot applied here is to provide a code (and needed
>> modifications) that runs OMAP platforms with a single and/or two MMC slots.
>>     
> Does this mean that supporting one or more MMC memory cards sharing the same
> bus?
>   
Could you please re-work your question? I couldn't get it nicely... But
even though, if I got it right you're asking if this code controls the
concurrency between both slots sharing the same bus. Is that right? If
so, yes. This code does it.

BR,

Carlos.
> Regards,
> Madhu
>  
> -----Original Message-----
> From: linux-omap-open-source-bounces@linux.omap.com
> [mailto:linux-omap-open-source-bounces@linux.omap.com] On Behalf Of Carlos
> Aguiar
> Sent: Monday, September 03, 2007 7:26 PM
> To: ext David Brownell
> Cc: linux-omap-open-source@linux.omap.com
> Subject: Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC
> multislot support.
>
> ext David Brownell wrote:
>   
>> On Friday 17 August 2007, David Brownell wrote:
>>   
>>     
>>> On Friday 17 August 2007, Carlos Aguiar wrote:
>>>     
>>>       
>>>> Introduces new structures for MMC multislot support.
>>>>       
>>>>         
>>> Seems like #1 and #2 should be a single patch, since
>>> after #1 it won't compile ...
>>>     
>>>       
>>   
>>     
> Hi Dave,
>   
>> ... and maybe #3, and ... ?
>>   
>>     
> You're right! But this 'level of granularity' of the patches was
> requested by Tony.
>   
>> Also, this doesn't look to me primarily like "multislot"
>> support.  It's also "stop relying on GPIOs" for various
>> things that newer boards handle with external chips
>> (like CD and WP switches), and "move board-specific code
>> out of the MMC driver"...
>>   
>>     
> The concept of multislot applied here is to provide a code (and needed
> modifications) that runs OMAP platforms with a single and/or two MMC slots.
>
> BR,
>
> Carlos.
>   
>> - Dave
>>
>> _______________________________________________
>> Linux-omap-open-source mailing list
>> Linux-omap-open-source@linux.omap.com
>> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>>
>>   
>>     
>
>
>   


-- 
Carlos Eduardo Aguiar
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC - Manaus
Core Team
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support.
  2007-09-04 14:48         ` Carlos Aguiar
@ 2007-09-04 14:59           ` Madhusudhan Chikkature Rajashekar
  0 siblings, 0 replies; 9+ messages in thread
From: Madhusudhan Chikkature Rajashekar @ 2007-09-04 14:59 UTC (permalink / raw)
  To: 'Carlos Aguiar'; +Cc: linux-omap-open-source

Hi,

>If I got it right you're asking if this code controls the
>concurrency between both slots sharing the same bus. Is that right? If
>so, yes. This code does it.
 Yes. That is what I meant. 

Thanks for the clarification.

Regards,
Madhu

 
-----Original Message-----
From: Carlos Aguiar [mailto:carlos.aguiar@indt.org.br] 
Sent: Tuesday, September 04, 2007 8:19 PM
To: ext Madhusudhan Chikkature Rajashekar
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC
multislot support.

ext Madhusudhan Chikkature Rajashekar wrote:
> Hi Carlos,
>   
Hi Madhu,
>   
>> The concept of multislot applied here is to provide a code (and needed
>> modifications) that runs OMAP platforms with a single and/or two MMC
slots.
>>     
> Does this mean that supporting one or more MMC memory cards sharing the
same
> bus?
>   
Could you please re-work your question? I couldn't get it nicely... But
even though, if I got it right you're asking if this code controls the
concurrency between both slots sharing the same bus. Is that right? If
so, yes. This code does it.

BR,

Carlos.
> Regards,
> Madhu
>  
> -----Original Message-----
> From: linux-omap-open-source-bounces@linux.omap.com
> [mailto:linux-omap-open-source-bounces@linux.omap.com] On Behalf Of Carlos
> Aguiar
> Sent: Monday, September 03, 2007 7:26 PM
> To: ext David Brownell
> Cc: linux-omap-open-source@linux.omap.com
> Subject: Re: [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC
> multislot support.
>
> ext David Brownell wrote:
>   
>> On Friday 17 August 2007, David Brownell wrote:
>>   
>>     
>>> On Friday 17 August 2007, Carlos Aguiar wrote:
>>>     
>>>       
>>>> Introduces new structures for MMC multislot support.
>>>>       
>>>>         
>>> Seems like #1 and #2 should be a single patch, since
>>> after #1 it won't compile ...
>>>     
>>>       
>>   
>>     
> Hi Dave,
>   
>> ... and maybe #3, and ... ?
>>   
>>     
> You're right! But this 'level of granularity' of the patches was
> requested by Tony.
>   
>> Also, this doesn't look to me primarily like "multislot"
>> support.  It's also "stop relying on GPIOs" for various
>> things that newer boards handle with external chips
>> (like CD and WP switches), and "move board-specific code
>> out of the MMC driver"...
>>   
>>     
> The concept of multislot applied here is to provide a code (and needed
> modifications) that runs OMAP platforms with a single and/or two MMC
slots.
>
> BR,
>
> Carlos.
>   
>> - Dave
>>
>> _______________________________________________
>> Linux-omap-open-source mailing list
>> Linux-omap-open-source@linux.omap.com
>> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>>
>>   
>>     
>
>
>   


-- 
Carlos Eduardo Aguiar
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC - Manaus
Core Team
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-09-04 14:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 19:01 [01/17 PATCH] MMC: OMAP: Introduces new structures for MMC multislot support Carlos Aguiar
2007-08-17 21:45 ` David Brownell
2007-08-17 21:55   ` David Brownell
2007-09-03 13:55     ` Carlos Aguiar
2007-09-03 15:45       ` Tony Lindgren
2007-09-03 17:38         ` Carlos Aguiar
2007-09-04  8:32       ` Madhusudhan Chikkature Rajashekar
2007-09-04 14:48         ` Carlos Aguiar
2007-09-04 14:59           ` Madhusudhan Chikkature Rajashekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox