Skip to contentSkip to conversation

mmc: omap_hsmmc: Clean up use/abuse of pdev->id

PATCH Superseded S, Venkatraman 3 participants 5 messages Feb 7, 2012 – Feb 14, 2012 2 messages not in the archive MMC, SD and SDIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

cover mmc: omap_hsmmc: Clean up use/abuse of pdev->id

Quoted 11 lines · Rajendra Nayak

This series mainly cleans up all instances of hardcoding's in the driver based on pdev->id. This is cleanup leading to the DT adaptation of omap_hsmmc driver.

Patches are based on 3.3-rc2 and can be found here
git://gitorious.org/omap-pm/linux.git omap_hsmmc_cleanup

Tested the patches on my omap4 boards (panda and SDP) but haven't tested yet on omap3/2 since I did'nt have boards handy. So any testing on any omap3/2 boards is really appreciated.

I gave it a spin on Beagleboard-XM (OMAP3630) with root filesystem on the SD card, and checked again on 4430SDP.

Quoted 20 lines

regards,
Rajendra

Balaji T K (3):
?mmc: omap_hsmmc: use platform_get_resource_byname for tx/rx DMA ? ?channels
?mmc: omap_hsmmc: remove unused .set_sleep function ?mmc: omap_hsmmc: Use OMAP_HSMMC_SUPPORTS_DUAL_VOLT flag to remove ? ?host->id based hardcoding

Rajendra Nayak (3):
?mmc: omap_hsmmc: Get rid of omap_hsmmc_1_set_power function ?mmc: omap_hsmmc: Get rid of omap_hsmmc_4_set_power function ?mmc: omap_hsmmc: Don't expect MMC1 to always have vmmc supply

?arch/arm/plat-omap/include/plat/mmc.h | ? ?2 - ?drivers/mmc/host/omap_hsmmc.c ? ? ? ? | ?158 +++------------------------------ ?2 files changed, 14 insertions(+), 146 deletions(-)

#2 lore raw

cover mmc: omap_hsmmc: Clean up use/abuse of pdev->id

Quoted 4 lines · Venkatraman

I gave it a spin on Beagleboard-XM (OMAP3630) with root filesystem on the SD card, and checked again on 4430SDP.

Great, thanks Venkat.

#3 lore raw

cover mmc: omap_hsmmc: Clean up use/abuse of pdev->id

In reply to S, Venkatraman
Quoted 5 lines · Venkatraman
Quoted 4 lines · Rajendra Nayak

This series mainly cleans up all instances of hardcoding's in the driver based on pdev->id. This is cleanup leading to the DT adaptation of omap_hsmmc driver.

Quoted 7 lines
Quoted 7 lines

Patches are based on 3.3-rc2 and can be found here
git://gitorious.org/omap-pm/linux.git omap_hsmmc_cleanup

Tested the patches on my omap4 boards (panda and SDP) but haven't tested yet on omap3/2 since I did'nt have boards handy. So any testing on any omap3/2 boards is really appreciated.

Tested this series on 2430SDP with FS on SD card

Quoted 26 lines

I gave it a spin on Beagleboard-XM (OMAP3630) with root filesystem on the SD card, and checked again on 4430SDP.

Quoted 20 lines

regards,
Rajendra

Balaji T K (3):
?mmc: omap_hsmmc: use platform_get_resource_byname for tx/rx DMA ? ?channels
?mmc: omap_hsmmc: remove unused .set_sleep function ?mmc: omap_hsmmc: Use OMAP_HSMMC_SUPPORTS_DUAL_VOLT flag to remove ? ?host->id based hardcoding

Rajendra Nayak (3):
?mmc: omap_hsmmc: Get rid of omap_hsmmc_1_set_power function ?mmc: omap_hsmmc: Get rid of omap_hsmmc_4_set_power function ?mmc: omap_hsmmc: Don't expect MMC1 to always have vmmc supply

?arch/arm/plat-omap/include/plat/mmc.h | ? ?2 - ?drivers/mmc/host/omap_hsmmc.c ? ? ? ? | ?158 +++------------------------------ ?2 files changed, 14 insertions(+), 146 deletions(-)

#4 lore raw

cover mmc: omap_hsmmc: Clean up use/abuse of pdev->id

Quoted 6 lines · Balaji
Quoted 5 lines · Venkatraman
Quoted 5 lines · Rajendra Nayak
Quoted 4 lines
Quoted 4 lines

This series mainly cleans up all instances of hardcoding's in the driver based on pdev->id. This is cleanup leading to the DT adaptation of omap_hsmmc driver.

Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Patches are based on 3.3-rc2 and can be found here
git://gitorious.org/omap-pm/linux.git omap_hsmmc_cleanup

Tested the patches on my omap4 boards (panda and SDP) but haven't tested yet on omap3/2 since I did'nt have boards handy. So any testing on any omap3/2 boards is really appreciated.

Tested this series on 2430SDP with FS on SD card

Thanks, will repost adding Tested-by from you and Venkat, also getting rid of the one instance of host->id usage left in a debug print.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

PATCH 6/6 mmc: omap_hsmmc: Don't expect MMC1 to always have vmmc supply

Quoted 38 lines · Rajendra Nayak

MMC1 is not the only instance that can be used/wired for SD. So remove this assumption from the driver.

---
?drivers/mmc/host/omap_hsmmc.c | ? 14 -------------- ?1 files changed, 0 insertions(+), 14 deletions(-)

drivers/mmc/host/omap_hsmmc.c +0 -10
index 17e264b..97d3065 100644
@@ -300,7 +300,6 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
 ?static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
 ?{
 ? ? ? ?struct regulator *reg;
- ? ? ? int ret = 0;
 ? ? ? ?int ocr_value = 0;
 
 ? ? ? ?mmc_slot(host).set_power = omap_hsmmc_set_power;
@@ -308,15 +307,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
 ? ? ? ?reg = regulator_get(host->dev, "vmmc");
 ? ? ? ?if (IS_ERR(reg)) {
 ? ? ? ? ? ? ? ?dev_dbg(host->dev, "vmmc regulator missing\n");
- ? ? ? ? ? ? ? /*
- ? ? ? ? ? ? ? * HACK: until fixed.c regulator is usable,
- ? ? ? ? ? ? ? * we don't require a main regulator
- ? ? ? ? ? ? ? * for MMC2 or MMC3
- ? ? ? ? ? ? ? */
- ? ? ? ? ? ? ? if (host->id == OMAP_MMC1_DEVID) {
- ? ? ? ? ? ? ? ? ? ? ? ret = PTR_ERR(reg);
- ? ? ? ? ? ? ? ? ? ? ? goto err;
- ? ? ? ? ? ? ? }
 ? ? ? ?} else {
 ? ? ? ? ? ? ? ?host->vcc = reg;
 ? ? ? ? ? ? ? ?ocr_value = mmc_regulator_get_ocrmask(reg);
@@ -358,10 +348,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
 ? ? ? ?}

drivers/mmc/host/omap_hsmmc.c static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)

Quoted 10 lines
drivers/mmc/host/omap_hsmmc.c +0 -5
 
 ? ? ? ?return 0;
-
-err:
- ? ? ? mmc_slot(host).set_power = NULL;
- ? ? ? return ret;
 ?}
 
 ?static void omap_hsmmc_reg_put(struct omap_hsmmc_host *host)
--

Almost all usage of the id field is gone, except for a trivial debug print. Would be prudent to get rid of it entirely from struct omap_hsmmc_host.