mmc: omap_hsmmc: Clean up use/abuse of pdev->id
A message that is not in the archive (sent off-list or not yet received): [email protected]
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 ofomap_hsmmcdriver.Patches are based on 3.3-rc2 and can be found here
git://gitorious.org/omap-pm/linux.gitomap_hsmmc_cleanupTested 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,
RajendraBalaji T K (3):
?mmc:omap_hsmmc: useplatform_get_resource_bynamefor tx/rx DMA ? ?channels
?mmc:omap_hsmmc: remove unused .set_sleep function ?mmc:omap_hsmmc: UseOMAP_HSMMC_SUPPORTS_DUAL_VOLTflag to remove ? ?host->id based hardcodingRajendra Nayak (3):
?mmc:omap_hsmmc: Get rid ofomap_hsmmc_1_set_powerfunction ?mmc:omap_hsmmc: Get rid ofomap_hsmmc_4_set_powerfunction ?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(-)
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.
Tested-by Venkatraman S<[email protected]>
Great, thanks Venkat.
cover mmc: omap_hsmmc: Clean up use/abuse of pdev->id
In reply to S, VenkatramanQuoted 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 ofomap_hsmmcdriver.
Quoted 7 lines
Quoted 7 lines
Patches are based on 3.3-rc2 and can be found here
git://gitorious.org/omap-pm/linux.gitomap_hsmmc_cleanupTested 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.
Tested-by Venkatraman S <[email protected]>Quoted 20 lines
regards,
RajendraBalaji T K (3):
?mmc:omap_hsmmc: useplatform_get_resource_bynamefor tx/rx DMA ? ?channels
?mmc:omap_hsmmc: remove unused .set_sleep function ?mmc:omap_hsmmc: UseOMAP_HSMMC_SUPPORTS_DUAL_VOLTflag to remove ? ?host->id based hardcodingRajendra Nayak (3):
?mmc:omap_hsmmc: Get rid ofomap_hsmmc_1_set_powerfunction ?mmc:omap_hsmmc: Get rid ofomap_hsmmc_4_set_powerfunction ?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(-)
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 ofomap_hsmmcdriver.
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.gitomap_hsmmc_cleanupTested 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]
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.
Signed-off-by Rajendra Nayak <[email protected]>---
?drivers/mmc/host/omap_hsmmc.c | ? 14 -------------- ?1 files changed, 0 insertions(+), 14 deletions(-)drivers/mmc/host/omap_hsmmc.c +0
-10@@ -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.