From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 14 Feb 2013 16:27:16 -0700 Subject: [U-Boot] [PATCH v3 0/3] Tegra: MMC: Add DT support for MMC to T20 boards In-Reply-To: <1360791890-6644-1-git-send-email-twarren@nvidia.com> References: <1360791890-6644-1-git-send-email-twarren@nvidia.com> Message-ID: <511D72D4.8040106@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/13/2013 02:44 PM, Tom Warren wrote: > This patchset adds device-tree support to the Tegra MMC driver. > All device config is done via properties in the DT files instead > of hard-coded config options/function arguments. > > I've tested this on my Seaboard and everything works fine, > including card detect. For the other T20 boards, I've used > the Linux kernel DTS files for the sdhci nodes where there > wasn't one already, or expanded the info that was already > there. Everything builds fine, but I haven't tested anything > but Seaboard. With the incremental patch below applied, Tested-by: Stephen Warren On: Harmony, Seaboard(really Springbank), Ventana, Whistler, Paz00/AC100, TrimSlice. > commit a5be5907d77eb4ca18dd9a11dd09183148c9d1b2 > Author: Stephen Warren > Date: Thu Feb 14 16:02:24 2013 -0700 > > Fix MMC DT rework > > diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c > index e8e8512..630f6bd 100644 > --- a/drivers/mmc/tegra_mmc.c > +++ b/drivers/mmc/tegra_mmc.c > @@ -497,7 +497,6 @@ static int do_mmc_init(int dev_index) > struct mmc_host *host; > char gpusage[12]; /* "SD/MMCn PWR" or "SD/MMCn CD" */ > struct mmc *mmc; > - int card_det = 0; > > /* DT should have been read & host config filled in */ > host = &mmc_host[dev_index]; > @@ -514,16 +513,15 @@ static int do_mmc_init(int dev_index) > if (fdt_gpio_isvalid(&host->pwr_gpio)) { > sprintf(gpusage, "SD/MMC%d PWR", dev_index); > gpio_request(host->pwr_gpio.gpio, gpusage); > - fdtdec_set_gpio(&host->pwr_gpio, 1); > + gpio_direction_output(host->pwr_gpio.gpio, 1); > debug(" Power GPIO name = %s\n", host->pwr_gpio.name); > } > > if (fdt_gpio_isvalid(&host->cd_gpio)) { > sprintf(gpusage, "SD/MMC%d CD", dev_index); > gpio_request(host->cd_gpio.gpio, gpusage); > - card_det = fdtdec_get_gpio(&host->cd_gpio); > + gpio_direction_input(host->cd_gpio.gpio); > debug(" CD GPIO name = %s\n", host->cd_gpio.name); > - debug("%s: CD state = %d\n", __func__, card_det); > } > > mmc = &mmc_dev[dev_index];