From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ns.lynxeye.de ([87.118.118.114] helo=lynxeye.de) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WjkJ7-0003xg-Pk for barebox@lists.infradead.org; Mon, 12 May 2014 07:05:55 +0000 Received: from tellur.localdomain (p4FE65757.dip0.t-ipconnect.de [79.230.87.87]) by lynxeye.de (Postfix) with ESMTPA id D777218B425F for ; Mon, 12 May 2014 09:04:55 +0200 (CEST) From: Lucas Stach Date: Mon, 12 May 2014 09:07:46 +0200 Message-Id: <1399878486-16086-6-git-send-email-dev@lynxeye.de> In-Reply-To: <1399878486-16086-1-git-send-email-dev@lynxeye.de> References: <1399878486-16086-1-git-send-email-dev@lynxeye.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 05/25] mci: tegra: add reset control To: barebox@lists.infradead.org Enable the driver to reset the device itself. Signed-off-by: Lucas Stach --- drivers/mci/tegra-sdmmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mci/tegra-sdmmc.c b/drivers/mci/tegra-sdmmc.c index e4d8219..0ea0b5c 100644 --- a/drivers/mci/tegra-sdmmc.c +++ b/drivers/mci/tegra-sdmmc.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "sdhci.h" @@ -62,6 +63,7 @@ struct tegra_sdmmc_host { struct mci_host mci; void __iomem *regs; struct clk *clk; + struct reset_control *reset; int gpio_cd, gpio_pwr; }; #define to_tegra_sdmmc_host(mci) container_of(mci, struct tegra_sdmmc_host, mci) @@ -400,6 +402,10 @@ static int tegra_sdmmc_probe(struct device_d *dev) if (IS_ERR(host->clk)) return PTR_ERR(host->clk); + host->reset = reset_control_get(dev, NULL); + if (IS_ERR(host->reset)) + return PTR_ERR(host->reset); + host->regs = dev_request_mem_region(dev, 0); if (!host->regs) { dev_err(dev, "could not get iomem region\n"); @@ -430,6 +436,9 @@ static int tegra_sdmmc_probe(struct device_d *dev) } clk_enable(host->clk); + reset_control_assert(host->reset); + udelay(2); + reset_control_deassert(host->reset); mci->init = tegra_sdmmc_init; mci->card_present = tegra_sdmmc_card_present; -- 1.9.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox