Re: [PATCH 1/2] HSMMC: Make loopback clock configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 14, 2008 at 8:41 AM, Steve Sakoman <sakoman@xxxxxxxxx> wrote:
> On Thu, Nov 13, 2008 at 3:06 PM, Tony Lindgren <tony@xxxxxxxxxxx> wrote:
>> * Grazvydas Ignotas <notasas@xxxxxxxxx> [081113 13:40]:
>>> Some boards use input clock from external pin for MMC/SDIO
>>> modules in OMAP chips. Make that option selectable instead of
>>> forcing loop back clock on everyone.
>>
>> Thanks, pushing both today.
>
> Hmm . . . not sure if it is related to this patch, but I now get an
> oops on Overo.

Oops.. Haven't thought to try it without gpio_cd set up, in which case c->mmc
is not set initialized.. Please try the following patch:


diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index 0ea6ba6..626d668 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -239,6 +239,7 @@ static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
 	u32 reg;
 	int ret = 0;
 	struct twl_mmc_controller *c = &hsmmc[0];
+	struct omap_mmc_platform_data *mmc = dev->platform_data;
 
 	if (power_on) {
 		if (cpu_is_omap2430()) {
@@ -250,7 +251,7 @@ static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
 			omap_ctrl_writel(reg, OMAP243X_CONTROL_DEVCONF1);
 		}
 
-		if (c->mmc->slots[0].internal_clock) {
+		if (mmc->slots[0].internal_clock) {
 			reg = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
 			reg |= OMAP2_MMCSDIO1ADPCLKISEL;
 			omap_ctrl_writel(reg, OMAP2_CONTROL_DEVCONF0);
@@ -293,11 +294,11 @@ static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
 static int twl_mmc2_set_power(struct device *dev, int slot, int power_on, int vdd)
 {
 	int ret;
-
 	struct twl_mmc_controller *c = &hsmmc[1];
+	struct omap_mmc_platform_data *mmc = dev->platform_data;
 
 	if (power_on) {
-		if (c->mmc->slots[0].internal_clock) {
+		if (mmc->slots[0].internal_clock) {
 			u32 reg;
 
 			reg = omap_ctrl_readl(control_devconf1_offset);
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux