public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/10] omap_hsmmc changes V2
@ 2010-01-17  1:28 Adrian Hunter
  0 siblings, 0 replies; 8+ messages in thread
From: Adrian Hunter @ 2010-01-17  1:28 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Adrian Hunter, Madhusudhan Chikkature, Paul Walmsley,
	linux-omap Mailing List, linux-mmc Mailing List, Andrew Morton

Hi

Here are some changes we need for omap_hsmmc.  They are dependent on OMAP
board files so it would be simplest if the patches all went via the OMAP
tree.

This is version 2 of this patch set.  Thank you Tony, Paul and Madhu for
your comments.

Changes from version 1:
	- amended patch 'omap_hsmmc: Move gpio and regulator control from
	board file' so that system control functions remain in the board
	file
	- for clarity, split patch 'omap: Rename mmc-twl4030 to hsmmc' into
	'omap: Rename mmc-twl4030 files to hsmmc' and
	'omap: Rename hsmmc symbols to reflect independence from twl4030'
	- removed patch 'omap_hsmmc: set DVFS/PM constraints'
	- added patch 'omap: Add functions for dynamic remuxing of pins'
	- renamed and reworked patch 'omap: RX51: Remux to pull eMMC lines
	down when powering off' (was 'omap_hsmmc: RX51: set padconfs to pull
	down when powering off eMMC')
	- added patch 'omap_hsmmc: Ensure regulator enable / disable are
	paired'
	- fixed mistakes in patch 'omap_hsmmc: Allow for a shared VccQ'


Adrian Hunter (9):
      omap_hsmmc: Move gpio and regulator control from board file
      omap: Rename mmc-twl4030 files to hsmmc
      omap: Rename hsmmc symbols to reflect independence from twl4030
      omap: Reconnect hsmmc context loss count
      omap: RX51: Remux to pull eMMC lines down when powering off
      omap_hsmmc: Allow for power saving without going off
      omap_hsmmc: Fix disable timeouts
      omap_hsmmc: Ensure regulator enable / disable are paired
      omap_hsmmc: Allow for a shared VccQ

Tony Lindgren (1):
      omap: Add functions for dynamic remuxing of pins

 arch/arm/configs/rx51_defconfig                |    4 +-
 arch/arm/mach-omap2/Makefile                   |   28 +-
 arch/arm/mach-omap2/board-2430sdp.c            |    6 +-
 arch/arm/mach-omap2/board-3430sdp.c            |    6 +-
 arch/arm/mach-omap2/board-cm-t35.c             |    6 +-
 arch/arm/mach-omap2/board-igep0020.c           |    6 +-
 arch/arm/mach-omap2/board-ldp.c                |    6 +-
 arch/arm/mach-omap2/board-omap3beagle.c        |    6 +-
 arch/arm/mach-omap2/board-omap3evm.c           |    6 +-
 arch/arm/mach-omap2/board-omap3pandora.c       |    6 +-
 arch/arm/mach-omap2/board-omap3touchbook.c     |    6 +-
 arch/arm/mach-omap2/board-overo.c              |    6 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c   |   63 +++-
 arch/arm/mach-omap2/board-zoom-peripherals.c   |    6 +-
 arch/arm/mach-omap2/hsmmc.c                    |  261 ++++++++++++
 arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} |   14 +-
 arch/arm/mach-omap2/mmc-twl4030.c              |  537 ------------------------
 arch/arm/mach-omap2/mux.c                      |   22 +-
 arch/arm/mach-omap2/mux.h                      |   24 +
 arch/arm/plat-omap/include/plat/mmc.h          |   35 ++-
 drivers/mmc/host/omap_hsmmc.c                  |  375 ++++++++++++++++-
 21 files changed, 788 insertions(+), 641 deletions(-)
 create mode 100644 arch/arm/mach-omap2/hsmmc.c
 rename arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} (63%)
 delete mode 100644 arch/arm/mach-omap2/mmc-twl4030.c


 
Regards
Adrian


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

* [PATCH V2 0/10] omap_hsmmc changes V2
@ 2010-01-17  1:32 Adrian Hunter
  2010-01-21 17:29 ` Madhusudhan
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Hunter @ 2010-01-17  1:32 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Adrian Hunter, Madhusudhan Chikkature, Paul Walmsley,
	linux-omap Mailing List, linux-mmc Mailing List, Andrew Morton

Hi

Here are some changes we need for omap_hsmmc.  They are dependent on OMAP
board files so it would be simplest if the patches all went via the OMAP
tree.

This is version 2 of this patch set.  Thank you Tony, Paul and Madhu for
your comments.

Changes from version 1:
	- amended patch 'omap_hsmmc: Move gpio and regulator control from
	board file' so that system control functions remain in the board
	file
	- for clarity, split patch 'omap: Rename mmc-twl4030 to hsmmc' into
	'omap: Rename mmc-twl4030 files to hsmmc' and
	'omap: Rename hsmmc symbols to reflect independence from twl4030'
	- removed patch 'omap_hsmmc: set DVFS/PM constraints'
	- added patch 'omap: Add functions for dynamic remuxing of pins'
	- renamed and reworked patch 'omap: RX51: Remux to pull eMMC lines
	down when powering off' (was 'omap_hsmmc: RX51: set padconfs to pull
	down when powering off eMMC')
	- added patch 'omap_hsmmc: Ensure regulator enable / disable are
	paired'
	- fixed mistakes in patch 'omap_hsmmc: Allow for a shared VccQ'


Adrian Hunter (9):
      omap_hsmmc: Move gpio and regulator control from board file
      omap: Rename mmc-twl4030 files to hsmmc
      omap: Rename hsmmc symbols to reflect independence from twl4030
      omap: Reconnect hsmmc context loss count
      omap: RX51: Remux to pull eMMC lines down when powering off
      omap_hsmmc: Allow for power saving without going off
      omap_hsmmc: Fix disable timeouts
      omap_hsmmc: Ensure regulator enable / disable are paired
      omap_hsmmc: Allow for a shared VccQ

Tony Lindgren (1):
      omap: Add functions for dynamic remuxing of pins

 arch/arm/configs/rx51_defconfig                |    4 +-
 arch/arm/mach-omap2/Makefile                   |   28 +-
 arch/arm/mach-omap2/board-2430sdp.c            |    6 +-
 arch/arm/mach-omap2/board-3430sdp.c            |    6 +-
 arch/arm/mach-omap2/board-cm-t35.c             |    6 +-
 arch/arm/mach-omap2/board-igep0020.c           |    6 +-
 arch/arm/mach-omap2/board-ldp.c                |    6 +-
 arch/arm/mach-omap2/board-omap3beagle.c        |    6 +-
 arch/arm/mach-omap2/board-omap3evm.c           |    6 +-
 arch/arm/mach-omap2/board-omap3pandora.c       |    6 +-
 arch/arm/mach-omap2/board-omap3touchbook.c     |    6 +-
 arch/arm/mach-omap2/board-overo.c              |    6 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c   |   63 +++-
 arch/arm/mach-omap2/board-zoom-peripherals.c   |    6 +-
 arch/arm/mach-omap2/hsmmc.c                    |  261 ++++++++++++
 arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} |   14 +-
 arch/arm/mach-omap2/mmc-twl4030.c              |  537 ------------------------
 arch/arm/mach-omap2/mux.c                      |   22 +-
 arch/arm/mach-omap2/mux.h                      |   24 +
 arch/arm/plat-omap/include/plat/mmc.h          |   35 ++-
 drivers/mmc/host/omap_hsmmc.c                  |  375 ++++++++++++++++-
 21 files changed, 788 insertions(+), 641 deletions(-)
 create mode 100644 arch/arm/mach-omap2/hsmmc.c
 rename arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} (63%)
 delete mode 100644 arch/arm/mach-omap2/mmc-twl4030.c


 
Regards
Adrian


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

* RE: [PATCH V2 0/10] omap_hsmmc changes V2
  2010-01-17  1:32 Adrian Hunter
@ 2010-01-21 17:29 ` Madhusudhan
  2010-01-22  8:41   ` Adrian Hunter
  0 siblings, 1 reply; 8+ messages in thread
From: Madhusudhan @ 2010-01-21 17:29 UTC (permalink / raw)
  To: 'Adrian Hunter', 'Tony Lindgren'
  Cc: 'Paul Walmsley', 'linux-omap Mailing List',
	'linux-mmc Mailing List', 'Andrew Morton'



> -----Original Message-----
> From: Adrian Hunter [mailto:adrian.hunter@nokia.com]
> Sent: Saturday, January 16, 2010 7:33 PM
> To: Tony Lindgren
> Cc: Adrian Hunter; Madhusudhan Chikkature; Paul Walmsley; linux-omap
> Mailing List; linux-mmc Mailing List; Andrew Morton
> Subject: [PATCH V2 0/10] omap_hsmmc changes V2
> 
> Hi
> 
> Here are some changes we need for omap_hsmmc.  They are dependent on OMAP
> board files so it would be simplest if the patches all went via the OMAP
> tree.
> 
> This is version 2 of this patch set.  Thank you Tony, Paul and Madhu for
> your comments.
> 
> Changes from version 1:
> 	- amended patch 'omap_hsmmc: Move gpio and regulator control from
> 	board file' so that system control functions remain in the board
> 	file
> 	- for clarity, split patch 'omap: Rename mmc-twl4030 to hsmmc' into
> 	'omap: Rename mmc-twl4030 files to hsmmc' and
> 	'omap: Rename hsmmc symbols to reflect independence from twl4030'
> 	- removed patch 'omap_hsmmc: set DVFS/PM constraints'
> 	- added patch 'omap: Add functions for dynamic remuxing of pins'
> 	- renamed and reworked patch 'omap: RX51: Remux to pull eMMC lines
> 	down when powering off' (was 'omap_hsmmc: RX51: set padconfs to pull
> 	down when powering off eMMC')
> 	- added patch 'omap_hsmmc: Ensure regulator enable / disable are
> 	paired'
> 	- fixed mistakes in patch 'omap_hsmmc: Allow for a shared VccQ'
> 
Reviewed the omap_hsmmc changes and did a sanity test on Zoom2.
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>

Regards,
Madhu
> 
> Adrian Hunter (9):
>       omap_hsmmc: Move gpio and regulator control from board file
>       omap: Rename mmc-twl4030 files to hsmmc
>       omap: Rename hsmmc symbols to reflect independence from twl4030
>       omap: Reconnect hsmmc context loss count
>       omap: RX51: Remux to pull eMMC lines down when powering off
>       omap_hsmmc: Allow for power saving without going off
>       omap_hsmmc: Fix disable timeouts
>       omap_hsmmc: Ensure regulator enable / disable are paired
>       omap_hsmmc: Allow for a shared VccQ
> 
> Tony Lindgren (1):
>       omap: Add functions for dynamic remuxing of pins
> 
>  arch/arm/configs/rx51_defconfig                |    4 +-
>  arch/arm/mach-omap2/Makefile                   |   28 +-
>  arch/arm/mach-omap2/board-2430sdp.c            |    6 +-
>  arch/arm/mach-omap2/board-3430sdp.c            |    6 +-
>  arch/arm/mach-omap2/board-cm-t35.c             |    6 +-
>  arch/arm/mach-omap2/board-igep0020.c           |    6 +-
>  arch/arm/mach-omap2/board-ldp.c                |    6 +-
>  arch/arm/mach-omap2/board-omap3beagle.c        |    6 +-
>  arch/arm/mach-omap2/board-omap3evm.c           |    6 +-
>  arch/arm/mach-omap2/board-omap3pandora.c       |    6 +-
>  arch/arm/mach-omap2/board-omap3touchbook.c     |    6 +-
>  arch/arm/mach-omap2/board-overo.c              |    6 +-
>  arch/arm/mach-omap2/board-rx51-peripherals.c   |   63 +++-
>  arch/arm/mach-omap2/board-zoom-peripherals.c   |    6 +-
>  arch/arm/mach-omap2/hsmmc.c                    |  261 ++++++++++++
>  arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} |   14 +-
>  arch/arm/mach-omap2/mmc-twl4030.c              |  537 -------------------
> -----
>  arch/arm/mach-omap2/mux.c                      |   22 +-
>  arch/arm/mach-omap2/mux.h                      |   24 +
>  arch/arm/plat-omap/include/plat/mmc.h          |   35 ++-
>  drivers/mmc/host/omap_hsmmc.c                  |  375 ++++++++++++++++-
>  21 files changed, 788 insertions(+), 641 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/hsmmc.c
>  rename arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} (63%)
>  delete mode 100644 arch/arm/mach-omap2/mmc-twl4030.c
> 
> 
> 
> Regards
> Adrian



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

* Re: [PATCH V2 0/10] omap_hsmmc changes V2
  2010-01-21 17:29 ` Madhusudhan
@ 2010-01-22  8:41   ` Adrian Hunter
  0 siblings, 0 replies; 8+ messages in thread
From: Adrian Hunter @ 2010-01-22  8:41 UTC (permalink / raw)
  To: Madhusudhan
  Cc: 'Tony Lindgren', 'Paul Walmsley',
	'linux-omap Mailing List',
	'linux-mmc Mailing List', 'Andrew Morton'

Madhusudhan wrote:
> 
>> -----Original Message-----
>> From: Adrian Hunter [mailto:adrian.hunter@nokia.com]
>> Sent: Saturday, January 16, 2010 7:33 PM
>> To: Tony Lindgren
>> Cc: Adrian Hunter; Madhusudhan Chikkature; Paul Walmsley; linux-omap
>> Mailing List; linux-mmc Mailing List; Andrew Morton
>> Subject: [PATCH V2 0/10] omap_hsmmc changes V2
>>
>> Hi
>>
>> Here are some changes we need for omap_hsmmc.  They are dependent on OMAP
>> board files so it would be simplest if the patches all went via the OMAP
>> tree.
>>
>> This is version 2 of this patch set.  Thank you Tony, Paul and Madhu for
>> your comments.
>>
>> Changes from version 1:
>> 	- amended patch 'omap_hsmmc: Move gpio and regulator control from
>> 	board file' so that system control functions remain in the board
>> 	file
>> 	- for clarity, split patch 'omap: Rename mmc-twl4030 to hsmmc' into
>> 	'omap: Rename mmc-twl4030 files to hsmmc' and
>> 	'omap: Rename hsmmc symbols to reflect independence from twl4030'
>> 	- removed patch 'omap_hsmmc: set DVFS/PM constraints'
>> 	- added patch 'omap: Add functions for dynamic remuxing of pins'
>> 	- renamed and reworked patch 'omap: RX51: Remux to pull eMMC lines
>> 	down when powering off' (was 'omap_hsmmc: RX51: set padconfs to pull
>> 	down when powering off eMMC')
>> 	- added patch 'omap_hsmmc: Ensure regulator enable / disable are
>> 	paired'
>> 	- fixed mistakes in patch 'omap_hsmmc: Allow for a shared VccQ'
>>
> Reviewed the omap_hsmmc changes and did a sanity test on Zoom2.
> Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
> 
> Regards,
> Madhu

Thanks Madhu.  Tony, are you ok taking these patches into your tree?

>> Adrian Hunter (9):
>>       omap_hsmmc: Move gpio and regulator control from board file
>>       omap: Rename mmc-twl4030 files to hsmmc
>>       omap: Rename hsmmc symbols to reflect independence from twl4030
>>       omap: Reconnect hsmmc context loss count
>>       omap: RX51: Remux to pull eMMC lines down when powering off
>>       omap_hsmmc: Allow for power saving without going off
>>       omap_hsmmc: Fix disable timeouts
>>       omap_hsmmc: Ensure regulator enable / disable are paired
>>       omap_hsmmc: Allow for a shared VccQ
>>
>> Tony Lindgren (1):
>>       omap: Add functions for dynamic remuxing of pins
>>
>>  arch/arm/configs/rx51_defconfig                |    4 +-
>>  arch/arm/mach-omap2/Makefile                   |   28 +-
>>  arch/arm/mach-omap2/board-2430sdp.c            |    6 +-
>>  arch/arm/mach-omap2/board-3430sdp.c            |    6 +-
>>  arch/arm/mach-omap2/board-cm-t35.c             |    6 +-
>>  arch/arm/mach-omap2/board-igep0020.c           |    6 +-
>>  arch/arm/mach-omap2/board-ldp.c                |    6 +-
>>  arch/arm/mach-omap2/board-omap3beagle.c        |    6 +-
>>  arch/arm/mach-omap2/board-omap3evm.c           |    6 +-
>>  arch/arm/mach-omap2/board-omap3pandora.c       |    6 +-
>>  arch/arm/mach-omap2/board-omap3touchbook.c     |    6 +-
>>  arch/arm/mach-omap2/board-overo.c              |    6 +-
>>  arch/arm/mach-omap2/board-rx51-peripherals.c   |   63 +++-
>>  arch/arm/mach-omap2/board-zoom-peripherals.c   |    6 +-
>>  arch/arm/mach-omap2/hsmmc.c                    |  261 ++++++++++++
>>  arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} |   14 +-
>>  arch/arm/mach-omap2/mmc-twl4030.c              |  537 -------------------
>> -----
>>  arch/arm/mach-omap2/mux.c                      |   22 +-
>>  arch/arm/mach-omap2/mux.h                      |   24 +
>>  arch/arm/plat-omap/include/plat/mmc.h          |   35 ++-
>>  drivers/mmc/host/omap_hsmmc.c                  |  375 ++++++++++++++++-
>>  21 files changed, 788 insertions(+), 641 deletions(-)
>>  create mode 100644 arch/arm/mach-omap2/hsmmc.c
>>  rename arch/arm/mach-omap2/{mmc-twl4030.h => hsmmc.h} (63%)
>>  delete mode 100644 arch/arm/mach-omap2/mmc-twl4030.c
>>
>>
>>
>> Regards
>> Adrian
> 
> 
> 


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

* Re: [PATCH V2 0/10] omap_hsmmc changes V2
       [not found] <1264149200.1920.11.camel@Nokia-N900-51-1>
@ 2010-01-22 17:14 ` Tony Lindgren
  2010-02-02  3:12   ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2010-01-22 17:14 UTC (permalink / raw)
  To: adrian.hunter; +Cc: madhu.cr, paul, linux-omap, linux-mmc, akpm

* adrian.hunter@nokia.com <adrian.hunter@nokia.com> [100122 00:31]:
> Madhu wrote
> >
> >
> > > -----Original Message-----
> > > From: Adrian Hunter [mailto:adrian.hunter@nokia.com]
> > > Sent: Saturday, January 16, 2010 7:33 PM
> > > To: Tony Lindgren
> > > Cc: Adrian Hunter; Madhusudhan Chikkature; Paul Walmsley; linux-omap
> > > Mailing List; linux-mmc Mailing List; Andrew Morton
> > > Subject: [PATCH V2 0/10] omap_hsmmc changes V2
> > >
> > > Hi
> > >
> > > Here are some changes we need for omap_hsmmc.  They are dependent on
> > OMAP
> > > board files so it would be simplest if the patches all went via the
> > OMAP
> > > tree.
> > >
> > > This is version 2 of this patch set.  Thank you Tony, Paul and Madhu
> > for
> > > your comments.
> > >
> > > Changes from version 1:
> > >              - amended patch 'omap_hsmmc: Move gpio and regulator control
> > from
> > >              board file' so that system control functions remain in the
> > board
> > >              file
> > >              - for clarity, split patch 'omap: Rename mmc-twl4030 to hsmmc'
> > into
> > >              'omap: Rename mmc-twl4030 files to hsmmc' and
> > >              'omap: Rename hsmmc symbols to reflect independence from
> > twl4030'
> > >              - removed patch 'omap_hsmmc: set DVFS/PM constraints'
> > >              - added patch 'omap: Add functions for dynamic remuxing of
> > pins'
> > >              - renamed and reworked patch 'omap: RX51: Remux to pull eMMC
> > lines
> > >              down when powering off' (was 'omap_hsmmc: RX51: set padconfs to
> > pull
> > >              down when powering off eMMC')
> > >              - added patch 'omap_hsmmc: Ensure regulator enable / disable
> > are
> > >              paired'
> > >              - fixed mistakes in patch 'omap_hsmmc: Allow for a shared VccQ'
> > >
> > Reviewed the omap_hsmmc changes and did a sanity test on Zoom2.
> > Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com<mailto:madhu.cr@ti.com>>
> >
> > Regards,
> > Madhu
> 
> Thanks Madhu. Tony, are you ok taking these patches into your tree?

Looks good to me, will queue them into omap for-next.

Regards,

Tony

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

* Re: [PATCH V2 0/10] omap_hsmmc changes V2
  2010-01-22 17:14 ` [PATCH V2 0/10] omap_hsmmc changes V2 Tony Lindgren
@ 2010-02-02  3:12   ` Tony Lindgren
  2010-02-02  9:22     ` Adrian Hunter
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2010-02-02  3:12 UTC (permalink / raw)
  To: adrian.hunter; +Cc: madhu.cr, paul, linux-omap, linux-mmc, akpm

* Tony Lindgren <tony@atomide.com> [100122 09:13]:
> * adrian.hunter@nokia.com <adrian.hunter@nokia.com> [100122 00:31]:

<snip>

> > 
> > Thanks Madhu. Tony, are you ok taking these patches into your tree?
> 
> Looks good to me, will queue them into omap for-next.

Applied now, but there's a build error with omap_2430sdp_defconfig:

drivers/built-in.o: In function `omap_hsmmc_23_set_sleep':
hid-input.c:(.text+0x63dd0): undefined reference to `mmc_regulator_set_ocr'
drivers/built-in.o: In function `omap_hsmmc_23_set_power':
hid-input.c:(.text+0x63e48): undefined reference to `mmc_regulator_set_ocr'
drivers/built-in.o: In function `omap_hsmmc_1_set_power':
hid-input.c:(.text+0x63ee0): undefined reference to `mmc_regulator_set_ocr'
drivers/built-in.o: In function `omap_hsmmc_probe':
hid-input.c:(.init.text+0x3cb0): undefined reference to `mmc_regulator_get_ocrmask'

Any ideas what's missing for 2430?

Regards,

Tony

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

* Re: [PATCH V2 0/10] omap_hsmmc changes V2
  2010-02-02  3:12   ` Tony Lindgren
@ 2010-02-02  9:22     ` Adrian Hunter
  2010-02-03  2:17       ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Hunter @ 2010-02-02  9:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: madhu.cr@ti.com, paul@pwsan.com, linux-omap@vger.kernel.org,
	linux-mmc@vger.kernel.org, akpm@linux-foundation.org

>From 10920ef5efbfced940eea0932e314b5a63ac706c Mon Sep 17 00:00:00 2001
From: Adrian Hunter <adrian.hunter@nokia.com>
Date: Tue, 2 Feb 2010 10:53:38 +0200
Subject: [PATCH] omap_hsmmc: allow compile without regulator framework

It is still possible to use the omap_hsmmc module
without the regulator framework.  Accordingly, ifdef
out regulator-specific functions.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
---
 drivers/mmc/host/omap_hsmmc.c |  133 ++++++++++++++++++++++++-----------------
 1 files changed, 79 insertions(+), 54 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index af37477..83f0aff 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -236,6 +236,8 @@ static int omap_hsmmc_resume_cdirq(struct device *dev, int slot)
 
 #endif
 
+#ifdef CONFIG_REGULATOR
+
 static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
 				  int vdd)
 {
@@ -357,59 +359,6 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
 		return regulator_enable(host->vcc_aux);
 }
 
-static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
-{
-	int ret;
-
-	if (gpio_is_valid(pdata->slots[0].switch_pin)) {
-		pdata->suspend = omap_hsmmc_suspend_cdirq;
-		pdata->resume = omap_hsmmc_resume_cdirq;
-		if (pdata->slots[0].cover)
-			pdata->slots[0].get_cover_state =
-					omap_hsmmc_get_cover_state;
-		else
-			pdata->slots[0].card_detect = omap_hsmmc_card_detect;
-		pdata->slots[0].card_detect_irq =
-				gpio_to_irq(pdata->slots[0].switch_pin);
-		ret = gpio_request(pdata->slots[0].switch_pin, "mmc_cd");
-		if (ret)
-			return ret;
-		ret = gpio_direction_input(pdata->slots[0].switch_pin);
-		if (ret)
-			goto err_free_sp;
-	} else
-		pdata->slots[0].switch_pin = -EINVAL;
-
-	if (gpio_is_valid(pdata->slots[0].gpio_wp)) {
-		pdata->slots[0].get_ro = omap_hsmmc_get_wp;
-		ret = gpio_request(pdata->slots[0].gpio_wp, "mmc_wp");
-		if (ret)
-			goto err_free_cd;
-		ret = gpio_direction_input(pdata->slots[0].gpio_wp);
-		if (ret)
-			goto err_free_wp;
-	} else
-		pdata->slots[0].gpio_wp = -EINVAL;
-
-	return 0;
-
-err_free_wp:
-	gpio_free(pdata->slots[0].gpio_wp);
-err_free_cd:
-	if (gpio_is_valid(pdata->slots[0].switch_pin))
-err_free_sp:
-		gpio_free(pdata->slots[0].switch_pin);
-	return ret;
-}
-
-static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata)
-{
-	if (gpio_is_valid(pdata->slots[0].gpio_wp))
-		gpio_free(pdata->slots[0].gpio_wp);
-	if (gpio_is_valid(pdata->slots[0].switch_pin))
-		gpio_free(pdata->slots[0].switch_pin);
-}
-
 static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
 {
 	struct regulator *reg;
@@ -488,6 +437,82 @@ static void omap_hsmmc_reg_put(struct omap_hsmmc_host *host)
 	mmc_slot(host).set_sleep = NULL;
 }
 
+static inline int omap_hsmmc_have_reg(void)
+{
+	return 1;
+}
+
+#else
+
+static inline int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
+{
+	return -EINVAL;
+}
+
+static inline void omap_hsmmc_reg_put(struct omap_hsmmc_host *host)
+{
+}
+
+static inline int omap_hsmmc_have_reg(void)
+{
+	return 0;
+}
+
+#endif
+
+static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
+{
+	int ret;
+
+	if (gpio_is_valid(pdata->slots[0].switch_pin)) {
+		pdata->suspend = omap_hsmmc_suspend_cdirq;
+		pdata->resume = omap_hsmmc_resume_cdirq;
+		if (pdata->slots[0].cover)
+			pdata->slots[0].get_cover_state =
+					omap_hsmmc_get_cover_state;
+		else
+			pdata->slots[0].card_detect = omap_hsmmc_card_detect;
+		pdata->slots[0].card_detect_irq =
+				gpio_to_irq(pdata->slots[0].switch_pin);
+		ret = gpio_request(pdata->slots[0].switch_pin, "mmc_cd");
+		if (ret)
+			return ret;
+		ret = gpio_direction_input(pdata->slots[0].switch_pin);
+		if (ret)
+			goto err_free_sp;
+	} else
+		pdata->slots[0].switch_pin = -EINVAL;
+
+	if (gpio_is_valid(pdata->slots[0].gpio_wp)) {
+		pdata->slots[0].get_ro = omap_hsmmc_get_wp;
+		ret = gpio_request(pdata->slots[0].gpio_wp, "mmc_wp");
+		if (ret)
+			goto err_free_cd;
+		ret = gpio_direction_input(pdata->slots[0].gpio_wp);
+		if (ret)
+			goto err_free_wp;
+	} else
+		pdata->slots[0].gpio_wp = -EINVAL;
+
+	return 0;
+
+err_free_wp:
+	gpio_free(pdata->slots[0].gpio_wp);
+err_free_cd:
+	if (gpio_is_valid(pdata->slots[0].switch_pin))
+err_free_sp:
+		gpio_free(pdata->slots[0].switch_pin);
+	return ret;
+}
+
+static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata)
+{
+	if (gpio_is_valid(pdata->slots[0].gpio_wp))
+		gpio_free(pdata->slots[0].gpio_wp);
+	if (gpio_is_valid(pdata->slots[0].switch_pin))
+		gpio_free(pdata->slots[0].switch_pin);
+}
+
 /*
  * Stop clock to the card
  */
@@ -2119,7 +2144,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
 		}
 	}
 
-	if (!mmc_slot(host).set_power) {
+	if (omap_hsmmc_have_reg() && !mmc_slot(host).set_power) {
 		ret = omap_hsmmc_reg_get(host);
 		if (ret)
 			goto err_reg;
-- 
1.6.0.4

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

* Re: [PATCH V2 0/10] omap_hsmmc changes V2
  2010-02-02  9:22     ` Adrian Hunter
@ 2010-02-03  2:17       ` Tony Lindgren
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2010-02-03  2:17 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: madhu.cr@ti.com, paul@pwsan.com, linux-omap@vger.kernel.org,
	linux-mmc@vger.kernel.org, akpm@linux-foundation.org

* Adrian Hunter <adrian.hunter@nokia.com> [100202 01:21]:
> From 10920ef5efbfced940eea0932e314b5a63ac706c Mon Sep 17 00:00:00 2001
> From: Adrian Hunter <adrian.hunter@nokia.com>
> Date: Tue, 2 Feb 2010 10:53:38 +0200
> Subject: [PATCH] omap_hsmmc: allow compile without regulator framework
> 
> It is still possible to use the omap_hsmmc module
> without the regulator framework.  Accordingly, ifdef
> out regulator-specific functions.

Thanks that fixes the 2430 compile issue. Adding this into omap for-next.

Regards,

Tony
 
> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
> ---
> drivers/mmc/host/omap_hsmmc.c |  133 ++++++++++++++++++++++++-----------------
> 1 files changed, 79 insertions(+), 54 deletions(-)
> 
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index af37477..83f0aff 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -236,6 +236,8 @@ static int omap_hsmmc_resume_cdirq(struct device *dev, int slot)
> 
> #endif
> 
> +#ifdef CONFIG_REGULATOR
> +
> static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
> 				  int vdd)
> {
> @@ -357,59 +359,6 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
> 		return regulator_enable(host->vcc_aux);
> }
> 
> -static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
> -{
> -	int ret;
> -
> -	if (gpio_is_valid(pdata->slots[0].switch_pin)) {
> -		pdata->suspend = omap_hsmmc_suspend_cdirq;
> -		pdata->resume = omap_hsmmc_resume_cdirq;
> -		if (pdata->slots[0].cover)
> -			pdata->slots[0].get_cover_state =
> -					omap_hsmmc_get_cover_state;
> -		else
> -			pdata->slots[0].card_detect = omap_hsmmc_card_detect;
> -		pdata->slots[0].card_detect_irq =
> -				gpio_to_irq(pdata->slots[0].switch_pin);
> -		ret = gpio_request(pdata->slots[0].switch_pin, "mmc_cd");
> -		if (ret)
> -			return ret;
> -		ret = gpio_direction_input(pdata->slots[0].switch_pin);
> -		if (ret)
> -			goto err_free_sp;
> -	} else
> -		pdata->slots[0].switch_pin = -EINVAL;
> -
> -	if (gpio_is_valid(pdata->slots[0].gpio_wp)) {
> -		pdata->slots[0].get_ro = omap_hsmmc_get_wp;
> -		ret = gpio_request(pdata->slots[0].gpio_wp, "mmc_wp");
> -		if (ret)
> -			goto err_free_cd;
> -		ret = gpio_direction_input(pdata->slots[0].gpio_wp);
> -		if (ret)
> -			goto err_free_wp;
> -	} else
> -		pdata->slots[0].gpio_wp = -EINVAL;
> -
> -	return 0;
> -
> -err_free_wp:
> -	gpio_free(pdata->slots[0].gpio_wp);
> -err_free_cd:
> -	if (gpio_is_valid(pdata->slots[0].switch_pin))
> -err_free_sp:
> -		gpio_free(pdata->slots[0].switch_pin);
> -	return ret;
> -}
> -
> -static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata)
> -{
> -	if (gpio_is_valid(pdata->slots[0].gpio_wp))
> -		gpio_free(pdata->slots[0].gpio_wp);
> -	if (gpio_is_valid(pdata->slots[0].switch_pin))
> -		gpio_free(pdata->slots[0].switch_pin);
> -}
> -
> static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
> {
> 	struct regulator *reg;
> @@ -488,6 +437,82 @@ static void omap_hsmmc_reg_put(struct omap_hsmmc_host *host)
> 	mmc_slot(host).set_sleep = NULL;
> }
> 
> +static inline int omap_hsmmc_have_reg(void)
> +{
> +	return 1;
> +}
> +
> +#else
> +
> +static inline int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
> +{
> +	return -EINVAL;
> +}
> +
> +static inline void omap_hsmmc_reg_put(struct omap_hsmmc_host *host)
> +{
> +}
> +
> +static inline int omap_hsmmc_have_reg(void)
> +{
> +	return 0;
> +}
> +
> +#endif
> +
> +static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
> +{
> +	int ret;
> +
> +	if (gpio_is_valid(pdata->slots[0].switch_pin)) {
> +		pdata->suspend = omap_hsmmc_suspend_cdirq;
> +		pdata->resume = omap_hsmmc_resume_cdirq;
> +		if (pdata->slots[0].cover)
> +			pdata->slots[0].get_cover_state =
> +					omap_hsmmc_get_cover_state;
> +		else
> +			pdata->slots[0].card_detect = omap_hsmmc_card_detect;
> +		pdata->slots[0].card_detect_irq =
> +				gpio_to_irq(pdata->slots[0].switch_pin);
> +		ret = gpio_request(pdata->slots[0].switch_pin, "mmc_cd");
> +		if (ret)
> +			return ret;
> +		ret = gpio_direction_input(pdata->slots[0].switch_pin);
> +		if (ret)
> +			goto err_free_sp;
> +	} else
> +		pdata->slots[0].switch_pin = -EINVAL;
> +
> +	if (gpio_is_valid(pdata->slots[0].gpio_wp)) {
> +		pdata->slots[0].get_ro = omap_hsmmc_get_wp;
> +		ret = gpio_request(pdata->slots[0].gpio_wp, "mmc_wp");
> +		if (ret)
> +			goto err_free_cd;
> +		ret = gpio_direction_input(pdata->slots[0].gpio_wp);
> +		if (ret)
> +			goto err_free_wp;
> +	} else
> +		pdata->slots[0].gpio_wp = -EINVAL;
> +
> +	return 0;
> +
> +err_free_wp:
> +	gpio_free(pdata->slots[0].gpio_wp);
> +err_free_cd:
> +	if (gpio_is_valid(pdata->slots[0].switch_pin))
> +err_free_sp:
> +		gpio_free(pdata->slots[0].switch_pin);
> +	return ret;
> +}
> +
> +static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata)
> +{
> +	if (gpio_is_valid(pdata->slots[0].gpio_wp))
> +		gpio_free(pdata->slots[0].gpio_wp);
> +	if (gpio_is_valid(pdata->slots[0].switch_pin))
> +		gpio_free(pdata->slots[0].switch_pin);
> +}
> +
> /*
>  * Stop clock to the card
>  */
> @@ -2119,7 +2144,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
> 		}
> 	}
> 
> -	if (!mmc_slot(host).set_power) {
> +	if (omap_hsmmc_have_reg() && !mmc_slot(host).set_power) {
> 		ret = omap_hsmmc_reg_get(host);
> 		if (ret)
> 			goto err_reg;
> -- 
> 1.6.0.4

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

end of thread, other threads:[~2010-02-03  2:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1264149200.1920.11.camel@Nokia-N900-51-1>
2010-01-22 17:14 ` [PATCH V2 0/10] omap_hsmmc changes V2 Tony Lindgren
2010-02-02  3:12   ` Tony Lindgren
2010-02-02  9:22     ` Adrian Hunter
2010-02-03  2:17       ` Tony Lindgren
2010-01-17  1:32 Adrian Hunter
2010-01-21 17:29 ` Madhusudhan
2010-01-22  8:41   ` Adrian Hunter
  -- strict thread matches above, loose matches on Subject: below --
2010-01-17  1:28 Adrian Hunter

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