Skip to content

Commit

Permalink
ARM: LPC32xx: Init MMC via clock
Browse files Browse the repository at this point in the history
This patch moves MMC/SD controller initialization from the board specific file
phy3250.c to clock.c.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
  • Loading branch information
Roland Stigge committed Jul 1, 2012
1 parent df07271 commit 5df5d01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 4 additions & 2 deletions arch/arm/mach-lpc32xx/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,11 +812,13 @@ static int mmc_onoff_enable(struct clk *clk, int enable)
u32 tmp;

tmp = __raw_readl(LPC32XX_CLKPWR_MS_CTRL) &
~LPC32XX_CLKPWR_MSCARD_SDCARD_EN;
~(LPC32XX_CLKPWR_MSCARD_SDCARD_EN |
LPC32XX_CLKPWR_MSCARD_MSDIO_PU_EN);

/* If rate is 0, disable clock */
if (enable != 0)
tmp |= LPC32XX_CLKPWR_MSCARD_SDCARD_EN;
tmp |= LPC32XX_CLKPWR_MSCARD_SDCARD_EN |
LPC32XX_CLKPWR_MSCARD_MSDIO_PU_EN;

__raw_writel(tmp, LPC32XX_CLKPWR_MS_CTRL);

Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-lpc32xx/phy3250.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,6 @@ static void __init lpc3250_machine_init(void)

lpc32xx_serial_init();

tmp = __raw_readl(LPC32XX_CLKPWR_MS_CTRL);
tmp |= LPC32XX_CLKPWR_MSCARD_SDCARD_EN |
LPC32XX_CLKPWR_MSCARD_MSDIO_PU_EN;
__raw_writel(tmp, LPC32XX_CLKPWR_MS_CTRL);

/* Test clock needed for UDA1380 initial init */
__raw_writel(LPC32XX_CLKPWR_TESTCLK2_SEL_MOSC |
LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN,
Expand Down

0 comments on commit 5df5d01

Please sign in to comment.