accessing SD_3V3 in drivers/mmc/host/s3cmci.c

Werner Almesberger werner at openmoko.org
Wed Feb 4 19:13:33 CET 2009


Hi Balaji,

in commit 9d1fd9e7b19d66a35ee4e760b30a3b9a168c20a2, you introduced
a major change in s3cmci.c: you make it explicitly use the SD_3V3
regulator and give this precedence over the platform set_power
callback.

Unfortunately, there are a number of problems with this:

- s3cmci.c shouldn't have to know about a platform's power
  arrangements. That's why we have set_power.

- In GTA02, SD_3V3 is actually used for the MMC interface of the
  Glamo, so s3cmci.c is (unsuccessfully) trying to grab somebody
  else's regulator.

- If the whole thing worked, it would take precedence over the
  callback to gta02_s3c_mmc_set_power, thus disabling the WLAN
  reset logic.

Fortunately, all this does nothing on GTA02 because the regulator
is tied to gta02_mmc_dev so regulator_get returns NULL and s3cmci.c
returns to its normal behaviour after a bit of grumbling.

I'd suggest to revert the regulator changes you made to s3cmci.h
and s3cmci.c, introduce a gta01_s3c_mmc_set_power function for
GTA01 in arch/arm/mach-s3c2410/mach-gta01.c, and handle the
regulator access there.

- Werner



More information about the openmoko-kernel mailing list