From: Roland Stigge <hidden> Date: 2012-06-24 13:49:04
This is the second round of patches for mach-lpc32xx, for v3.6. It builds upon
the first round of 22 patches and includes clock updates that separate out
initialization from the board specific init to clock.c.
Further, a defconfig update for LPC32xx, dts file update and mmc bugfix is
included.
Signed-off-by: Roland Stigge <redacted>
--
You can also pull from
git://git.antcom.de/linux-2.6.git lpc32xx-next2
Roland Stigge (6):
ARM: LPC32xx: Init MMC via clock
ARM: LPC32xx: Add further bits to MMC init
ARM: LPC32xx: Remove wrong re-initialization of MMC clock register
ARM: LPC32xx: Update DTS file for EA3250 board
ARM: LPC32xx: Defconfig update
ARM: LPC32xx: Remove USB and I2C init from phy3250.c
Alexandre Pereira da Silva (1):
ARM: LPC32xx: Cleanup USB clock init
arch/arm/boot/dts/ea3250.dts | 17 ++++
arch/arm/configs/lpc32xx_defconfig | 2
arch/arm/mach-lpc32xx/clock.c | 90 ++++++++++++++++++++++----
arch/arm/mach-lpc32xx/include/mach/platform.h | 14 ++++
arch/arm/mach-lpc32xx/phy3250.c | 17 ----
5 files changed, 112 insertions(+), 28 deletions(-)
From: Roland Stigge <hidden> Date: 2012-06-24 13:47:43
This patch fixes a bug, (wrongfully) resetting the value of
LPC32XX_CLKPWR_MS_CTRL back to its initial contents (after careful setup). This
was discovered only with a board/bootloader combination (EA3250) where the
contents of the respective register wasn't already at the correct value on
Linux boot.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Alexandre Pereira da Silva <redacted>
---
arch/arm/mach-lpc32xx/clock.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
@@ -871,7 +871,7 @@ static unsigned long mmc_round_rate(strustaticintmmc_set_rate(structclk*clk,unsignedlongrate){-u32oldclk,tmp;+u32tmp;unsignedlongprate,div,crate=mmc_round_rate(clk,rate);prate=clk->parent->get_rate(clk->parent);
@@ -879,16 +879,12 @@ static int mmc_set_rate(struct clk *clk,div=prate/crate;/* The MMC clock must be on when accessing an MMC register */-oldclk=__raw_readl(LPC32XX_CLKPWR_MS_CTRL);-__raw_writel(oldclk|LPC32XX_CLKPWR_MSCARD_SDCARD_EN,-LPC32XX_CLKPWR_MS_CTRL);tmp=__raw_readl(LPC32XX_CLKPWR_MS_CTRL)&~LPC32XX_CLKPWR_MSCARD_SDCARD_DIV(0xf);-tmp|=LPC32XX_CLKPWR_MSCARD_SDCARD_DIV(div);+tmp|=LPC32XX_CLKPWR_MSCARD_SDCARD_DIV(div)|+LPC32XX_CLKPWR_MSCARD_SDCARD_EN;__raw_writel(tmp,LPC32XX_CLKPWR_MS_CTRL);-__raw_writel(oldclk,LPC32XX_CLKPWR_MS_CTRL);-return0;}
From: Roland Stigge <hidden> Date: 2012-06-24 13:47:44
This patch makes sure certain MMC bits are cleared as they should for
initialization.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Alexandre Pereira da Silva <redacted>
---
arch/arm/mach-lpc32xx/clock.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
From: Roland Stigge <hidden> Date: 2012-06-24 13:48:55
From: Alexandre Pereira da Silva <redacted>
Move most of usb clock initialization from lpc32xx_udc and ohci-nxp to
clock.c. Also adds ohci clocks and otg clocks.
Signed-off-by: Alexandre Pereira da Silva <redacted>
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/mach-lpc32xx/clock.c | 68 +++++++++++++++++++++++++-
arch/arm/mach-lpc32xx/include/mach/platform.h | 14 +++++
2 files changed, 81 insertions(+), 1 deletion(-)
@@ -18,6 +18,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=y CONFIG_ARCH_LPC32XX=y+CONFIG_KEYBOARD_GPIO_POLLED=y CONFIG_PREEMPT=y CONFIG_AEABI=y CONFIG_ZBOOT_ROM_TEXT=0x0
@@ -89,6 +90,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 CONFIG_INPUT_EVDEV=y # CONFIG_KEYBOARD_ATKBD is not set+CONFIG_KEYBOARD_GPIO=y CONFIG_KEYBOARD_LPC32XX=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y
From: Roland Stigge <hidden> Date: 2012-06-24 13:48:59
USB and I2C initialization can be removed safely from the board specific
phy3250.c, now that initialization moved to the generalized clock.c.
Signed-off-by: Roland Stigge <redacted>
Tested-by: Alexandre Pereira da Silva <redacted>
---
arch/arm/mach-lpc32xx/phy3250.c | 12 ------------
1 file changed, 12 deletions(-)
@@ -248,18 +248,6 @@ static void __init lpc3250_machine_init(tmp|=LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_TFT16;__raw_writel(tmp,LPC32XX_CLKPWR_LCDCLK_CTRL);-/* Set up USB power */-tmp=__raw_readl(LPC32XX_CLKPWR_USB_CTRL);-tmp|=LPC32XX_CLKPWR_USBCTRL_HCLK_EN|-LPC32XX_CLKPWR_USBCTRL_USBI2C_EN;-__raw_writel(tmp,LPC32XX_CLKPWR_USB_CTRL);--/* Set up I2C pull levels */-tmp=__raw_readl(LPC32XX_CLKPWR_I2C_CLK_CTRL);-tmp|=LPC32XX_CLKPWR_I2CCLK_USBI2CHI_DRIVE|-LPC32XX_CLKPWR_I2CCLK_I2C2HI_DRIVE;-__raw_writel(tmp,LPC32XX_CLKPWR_I2C_CLK_CTRL);-lpc32xx_serial_init();/* Test clock needed for UDA1380 initial init */
?# CONFIG_BLK_DEV_BSG is not set
?CONFIG_PARTITION_ADVANCED=y
?CONFIG_ARCH_LPC32XX=y
+CONFIG_KEYBOARD_GPIO_POLLED=y
?CONFIG_PREEMPT=y
?CONFIG_AEABI=y
?CONFIG_ZBOOT_ROM_TEXT=0x0
?CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
?CONFIG_INPUT_EVDEV=y
?# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
?CONFIG_KEYBOARD_LPC32XX=y
?# CONFIG_INPUT_MOUSE is not set
?CONFIG_INPUT_TOUCHSCREEN=y