Skip to contentSkip to conversation

Omap fixes for 2.6.30-rc5

PATCH In review Tony Lindgren 4 participants 20 messages May 14, 2009 – May 16, 2009

Subsystems (7)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover Omap fixes for 2.6.30-rc5

Hi,

Here are some omap fixes for 2.6.30-rc5 for review.

Regards,

Tony

---

Jarkko Nikula (2):
ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config
ARM: OMAP2: Fix tusb6010 init error and compilation warning

Kalle Jokiniemi (1):
ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

Paul Walmsley (1):
ARM: OMAP: GPIO de-bounce clocks don't affect module idle state

Tomi Valkeinen (1):
ARM: OMAP: Fix printing of reserved memory for frambuffer

Tony Lindgren (3):
ARM: OMAP3: Fix number of GPIO lines for 34xx
ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi
ARM: OMAP2/3: Add name for musb clocks

 arch/arm/mach-omap2/clock24xx.c        |   10 +++++-----
 arch/arm/mach-omap2/clock34xx.c        |   12 ++++++------
 arch/arm/mach-omap2/clock34xx.h        |   12 ++++++------
 arch/arm/mach-omap2/devices.c          |    6 ++++--
 arch/arm/mach-omap2/prm-regbits-34xx.h |    2 +-
 arch/arm/mach-omap2/usb-tusb6010.c     |    2 +-
 arch/arm/plat-omap/fb.c                |    5 +++--
 arch/arm/plat-omap/gpio.c              |    2 +-
 drivers/video/omap/dispc.c             |   16 +++++++++-------
 drivers/video/omap/rfbi.c              |    8 +++++---
 10 files changed, 41 insertions(+), 34 deletions(-)
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/8 ARM: OMAP: Fix printing of reserved memory for frambuffer

From: Tomi Valkeinen <[email protected]>

Print reserved memory only if it was actually reserved.

---
 arch/arm/plat-omap/fb.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/plat-omap/fb.c +3 -2
index ce6b4ba..3746222 100644
@@ -206,9 +206,10 @@ void __init omapfb_reserve_sdram(void)
 			config_invalid = 1;
 			return;
 		}
-		if (rg.paddr)
+		if (rg.paddr) {
 			reserve_bootmem(rg.paddr, rg.size, BOOTMEM_DEFAULT);
-		reserved += rg.size;
+			reserved += rg.size;
+		}
 		omapfb_config.mem_desc.region[i] = rg;
 		configured_regions++;
 	}
author maintainer
#2 lore raw

PATCH 2/8 ARM: OMAP: GPIO de-bounce clocks don't affect module idle state

In reply to Tony Lindgren

From: Paul Walmsley <[email protected]>

GPIO de-bounce clocks don't have any impact on the module idle state, so the clock code should not wait for the module to enable after the de-bounce clocks are enabled.

Problem found by Kevin Hilman <[email protected]>.

---
 arch/arm/mach-omap2/clock34xx.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/clock34xx.h +6 -6
index 6763b8f..017a30e 100644
@@ -2182,7 +2182,7 @@ static struct clk wkup_32k_fck = {
 
 static struct clk gpio1_dbck = {
 	.name		= "gpio1_dbck",
-	.ops		= &clkops_omap2_dflt_wait,
+	.ops		= &clkops_omap2_dflt,
 	.parent		= &wkup_32k_fck,
 	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_GPIO1_SHIFT,
@@ -2427,7 +2427,7 @@ static struct clk per_32k_alwon_fck = {
 
 static struct clk gpio6_dbck = {
 	.name		= "gpio6_dbck",
-	.ops		= &clkops_omap2_dflt_wait,
+	.ops		= &clkops_omap2_dflt,
 	.parent		= &per_32k_alwon_fck,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_GPIO6_SHIFT,
@@ -2437,7 +2437,7 @@ static struct clk gpio6_dbck = {
 
 static struct clk gpio5_dbck = {
 	.name		= "gpio5_dbck",
-	.ops		= &clkops_omap2_dflt_wait,
+	.ops		= &clkops_omap2_dflt,
 	.parent		= &per_32k_alwon_fck,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_GPIO5_SHIFT,
@@ -2447,7 +2447,7 @@ static struct clk gpio5_dbck = {
 
 static struct clk gpio4_dbck = {
 	.name		= "gpio4_dbck",
-	.ops		= &clkops_omap2_dflt_wait,
+	.ops		= &clkops_omap2_dflt,
 	.parent		= &per_32k_alwon_fck,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_GPIO4_SHIFT,
@@ -2457,7 +2457,7 @@ static struct clk gpio4_dbck = {
 
 static struct clk gpio3_dbck = {
 	.name		= "gpio3_dbck",
-	.ops		= &clkops_omap2_dflt_wait,
+	.ops		= &clkops_omap2_dflt,
 	.parent		= &per_32k_alwon_fck,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_GPIO3_SHIFT,
@@ -2467,7 +2467,7 @@ static struct clk gpio3_dbck = {
 
 static struct clk gpio2_dbck = {
 	.name		= "gpio2_dbck",
-	.ops		= &clkops_omap2_dflt_wait,
+	.ops		= &clkops_omap2_dflt,
 	.parent		= &per_32k_alwon_fck,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_GPIO2_SHIFT,
author maintainer
#3 lore raw

PATCH 3/8 ARM: OMAP2: Fix tusb6010 init error and compilation warning

In reply to Tony Lindgren

From: Jarkko Nikula <[email protected]>

Fix "tusb6010 init error 5, -19" and compilation warning from function tusb6010_platform_retime "warning: 'sysclk_ps' is used uninitialized in this function".

I suppose commit c094ba34b8f780885d029ce3c2715a194b780e5d was meant to test for zero fclk_ps instead of sysclk_ps.

---
 arch/arm/mach-omap2/usb-tusb6010.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/usb-tusb6010.c +1 -1
index 8df55f4..8622c24 100644
@@ -187,7 +187,7 @@ int tusb6010_platform_retime(unsigned is_refclk)
 	unsigned	sysclk_ps;
 	int		status;
 
-	if (!refclk_psec || sysclk_ps == 0)
+	if (!refclk_psec || fclk_ps == 0)
 		return -ENODEV;
 
 	sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60;
author maintainer
#4 lore raw

PATCH 4/8 ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config

In reply to Tony Lindgren

From: Jarkko Nikula <[email protected]>

SPI driver will do unhandled fault on OMAP2420 if trying to probe non-existing SPI busses. Register those additional busses runtime only for cpus having them.

---
 arch/arm/mach-omap2/devices.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/devices.c +4 -2
index 496983a..894cc35 100644
@@ -354,10 +354,12 @@ static void omap_init_mcspi(void)
 	platform_device_register(&omap2_mcspi1);
 	platform_device_register(&omap2_mcspi2);
 #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
-	platform_device_register(&omap2_mcspi3);
+	if (cpu_is_omap2430() || cpu_is_omap343x())
+		platform_device_register(&omap2_mcspi3);
 #endif
 #ifdef CONFIG_ARCH_OMAP3
-	platform_device_register(&omap2_mcspi4);
+	if (cpu_is_omap343x())
+		platform_device_register(&omap2_mcspi4);
 #endif
 }
 
author maintainer
#5 lore raw

PATCH 5/8 ARM: OMAP2/3: Add name for musb clocks

In reply to Tony Lindgren

With the clkdev, musb_core.c needs to register clock with name "ick".

Once all the platforms using the musb driver have been converted to use clockdev, the clock name does not need to be passed from the low-level init code.

---
 arch/arm/mach-omap2/clock24xx.c |    2 +-
 arch/arm/mach-omap2/clock34xx.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/clock24xx.c +1 -1
index efc59c4..ff9b4c0 100644
@@ -206,7 +206,7 @@ static struct omap_clk omap24xx_clks[] = {
 	CLK(NULL,	"aes_ick",	&aes_ick,	CK_243X | CK_242X),
 	CLK(NULL,	"pka_ick",	&pka_ick,	CK_243X | CK_242X),
 	CLK(NULL,	"usb_fck",	&usb_fck,	CK_243X | CK_242X),
-	CLK(NULL,	"usbhs_ick",	&usbhs_ick,	CK_243X),
+	CLK("musb_hdrc",	"ick",	&usbhs_ick,	CK_243X),
 	CLK("mmci-omap-hs.0", "ick",	&mmchs1_ick,	CK_243X),
 	CLK("mmci-omap-hs.0", "fck",	&mmchs1_fck,	CK_243X),
 	CLK("mmci-omap-hs.1", "ick",	&mmchs2_ick,	CK_243X),
arch/arm/mach-omap2/clock34xx.c +1 -1
index 0a14dca..a057539 100644
@@ -157,7 +157,7 @@ static struct omap_clk omap34xx_clks[] = {
 	CLK(NULL,	"ssi_ssr_fck",	&ssi_ssr_fck,	CK_343X),
 	CLK(NULL,	"ssi_sst_fck",	&ssi_sst_fck,	CK_343X),
 	CLK(NULL,	"core_l3_ick",	&core_l3_ick,	CK_343X),
-	CLK(NULL,	"hsotgusb_ick",	&hsotgusb_ick,	CK_343X),
+	CLK("musb_hdrc",	"ick",	&hsotgusb_ick,	CK_343X),
 	CLK(NULL,	"sdrc_ick",	&sdrc_ick,	CK_343X),
 	CLK(NULL,	"gpmc_fck",	&gpmc_fck,	CK_343X),
 	CLK(NULL,	"security_l3_ick", &security_l3_ick, CK_343X),
author maintainer
#6 lore raw

PATCH 6/8 ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi

In reply to Tony Lindgren

This makes the framebuffer work on omap3.

Also fix the clk_get usage for checkpatch.pl
"ERROR: do not use assignment in if condition".

---
 arch/arm/mach-omap2/clock24xx.c |    8 ++++----
 arch/arm/mach-omap2/clock34xx.c |   10 +++++-----
 drivers/video/omap/dispc.c      |   16 +++++++++-------
 drivers/video/omap/rfbi.c       |    8 +++++---
 4 files changed, 23 insertions(+), 19 deletions(-)
arch/arm/mach-omap2/clock24xx.c +4 -4
index ff9b4c0..e4cef33 100644
@@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = {
 	CLK(NULL,	"mdm_ick",	&mdm_ick,	CK_243X),
 	CLK(NULL,	"mdm_osc_ck",	&mdm_osc_ck,	CK_243X),
 	/* DSS domain clocks */
-	CLK(NULL,	"dss_ick",	&dss_ick,	CK_243X | CK_242X),
-	CLK(NULL,	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
-	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
-	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"ick",		&dss_ick,	CK_243X | CK_242X),
+	CLK("omapfb",	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"tv_fck",	&dss_54m_fck,	CK_243X | CK_242X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_243X | CK_242X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_243X | CK_242X),
arch/arm/mach-omap2/clock34xx.c +5 -5
index a057539..ba05aa4 100644
@@ -197,11 +197,11 @@ static struct omap_clk omap34xx_clks[] = {
 	CLK("omap_rng",	"ick",		&rng_ick,	CK_343X),
 	CLK(NULL,	"sha11_ick",	&sha11_ick,	CK_343X),
 	CLK(NULL,	"des1_ick",	&des1_ick,	CK_343X),
-	CLK(NULL,	"dss1_alwon_fck", &dss1_alwon_fck, CK_343X),
-	CLK(NULL,	"dss_tv_fck",	&dss_tv_fck,	CK_343X),
-	CLK(NULL,	"dss_96m_fck",	&dss_96m_fck,	CK_343X),
-	CLK(NULL,	"dss2_alwon_fck", &dss2_alwon_fck, CK_343X),
-	CLK(NULL,	"dss_ick",	&dss_ick,	CK_343X),
+	CLK("omapfb",	"dss1_fck",	&dss1_alwon_fck, CK_343X),
+	CLK("omapfb",	"tv_fck",	&dss_tv_fck,	CK_343X),
+	CLK("omapfb",	"video_fck",	&dss_96m_fck,	CK_343X),
+	CLK("omapfb",	"dss2_fck",	&dss2_alwon_fck, CK_343X),
+	CLK("omapfb",	"ick",		&dss_ick,	CK_343X),
 	CLK(NULL,	"cam_mclk",	&cam_mclk,	CK_343X),
 	CLK(NULL,	"cam_ick",	&cam_ick,	CK_343X),
 	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_343X),
drivers/video/omap/dispc.c +9 -7
index dfb72f5..3668df2 100644
@@ -880,23 +880,25 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
 
 static int get_dss_clocks(void)
 {
-	if (IS_ERR((dispc.dss_ick = clk_get(dispc.fbdev->dev, "dss_ick")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_ick\n");
+	dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick");
+	if (IS_ERR(dispc.dss_ick)) {
+		dev_err(dispc.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(dispc.dss_ick);
 	}
 
-	if (IS_ERR((dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck")))) {
+	dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck");
+	if (IS_ERR(dispc.dss1_fck)) {
 		dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(dispc.dss_ick);
 		return PTR_ERR(dispc.dss1_fck);
 	}
 
-	if (IS_ERR((dispc.dss_54m_fck =
-				clk_get(dispc.fbdev->dev, "dss_54m_fck")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_54m_fck\n");
+	dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck");
+	if (IS_ERR(dispc.dss_54m_fck)) {
+		dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
 		clk_put(dispc.dss_ick);
 		clk_put(dispc.dss1_fck);
-		return PTR_ERR(dispc.dss_54m_fck);
+
 	}
 
 	return 0;
drivers/video/omap/rfbi.c +5 -3
index a13c8dc..9332d6c 100644
@@ -83,12 +83,14 @@ static inline u32 rfbi_read_reg(int idx)
 
 static int rfbi_get_clocks(void)
 {
-	if (IS_ERR((rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "dss_ick")))) {
-		dev_err(rfbi.fbdev->dev, "can't get dss_ick\n");
+	rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "ick");
+	if (IS_ERR(rfbi.dss_ick)) {
+		dev_err(rfbi.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(rfbi.dss_ick);
 	}
 
-	if (IS_ERR((rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck")))) {
+	rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck");
+	if (IS_ERR(rfbi.dss1_fck)) {
 		dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(rfbi.dss_ick);
 		return PTR_ERR(rfbi.dss1_fck);
Acked-by on v1 6/8
#7 lore raw

Re: [PATCH 6/8] ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi

Quoted 9 lines · On Thu, 14 May 2009 10:49:59 -0700 Tony Lindgren <[email protected]> wrote:

This makes the framebuffer work on omap3.

Also fix the clk_get usage for checkpatch.pl
"ERROR: do not use assignment in if condition".

---

Quoted 108 lines
 arch/arm/mach-omap2/clock24xx.c |    8 ++++----
 arch/arm/mach-omap2/clock34xx.c |   10 +++++-----
 drivers/video/omap/dispc.c      |   16 +++++++++-------
 drivers/video/omap/rfbi.c       |    8 +++++---
 4 files changed, 23 insertions(+), 19 deletions(-)
arch/arm/mach-omap2/clock24xx.c +4 -4
index ff9b4c0..e4cef33 100644
@@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = {
 	CLK(NULL,	"mdm_ick",	&mdm_ick,	CK_243X),
 	CLK(NULL,	"mdm_osc_ck",	&mdm_osc_ck,	CK_243X),
 	/* DSS domain clocks */
-	CLK(NULL,	"dss_ick",	&dss_ick,	CK_243X | CK_242X),
-	CLK(NULL,	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
-	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
-	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"ick",		&dss_ick,	CK_243X | CK_242X),
+	CLK("omapfb",	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"tv_fck",	&dss_54m_fck,	CK_243X | CK_242X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_243X | CK_242X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_243X | CK_242X),
arch/arm/mach-omap2/clock34xx.c +5 -5
index a057539..ba05aa4 100644
@@ -197,11 +197,11 @@ static struct omap_clk omap34xx_clks[] = {
 	CLK("omap_rng",	"ick",		&rng_ick,	CK_343X),
 	CLK(NULL,	"sha11_ick",	&sha11_ick,	CK_343X),
 	CLK(NULL,	"des1_ick",	&des1_ick,	CK_343X),
-	CLK(NULL,	"dss1_alwon_fck", &dss1_alwon_fck, CK_343X),
-	CLK(NULL,	"dss_tv_fck",	&dss_tv_fck,	CK_343X),
-	CLK(NULL,	"dss_96m_fck",	&dss_96m_fck,	CK_343X),
-	CLK(NULL,	"dss2_alwon_fck", &dss2_alwon_fck, CK_343X),
-	CLK(NULL,	"dss_ick",	&dss_ick,	CK_343X),
+	CLK("omapfb",	"dss1_fck",	&dss1_alwon_fck, CK_343X),
+	CLK("omapfb",	"tv_fck",	&dss_tv_fck,	CK_343X),
+	CLK("omapfb",	"video_fck",	&dss_96m_fck,	CK_343X),
+	CLK("omapfb",	"dss2_fck",	&dss2_alwon_fck, CK_343X),
+	CLK("omapfb",	"ick",		&dss_ick,	CK_343X),
 	CLK(NULL,	"cam_mclk",	&cam_mclk,	CK_343X),
 	CLK(NULL,	"cam_ick",	&cam_ick,	CK_343X),
 	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_343X),
drivers/video/omap/dispc.c +9 -7
index dfb72f5..3668df2 100644
@@ -880,23 +880,25 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
 
 static int get_dss_clocks(void)
 {
-	if (IS_ERR((dispc.dss_ick = clk_get(dispc.fbdev->dev, "dss_ick")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_ick\n");
+	dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick");
+	if (IS_ERR(dispc.dss_ick)) {
+		dev_err(dispc.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(dispc.dss_ick);
 	}
 
-	if (IS_ERR((dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck")))) {
+	dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck");
+	if (IS_ERR(dispc.dss1_fck)) {
 		dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(dispc.dss_ick);
 		return PTR_ERR(dispc.dss1_fck);
 	}
 
-	if (IS_ERR((dispc.dss_54m_fck =
-				clk_get(dispc.fbdev->dev, "dss_54m_fck")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_54m_fck\n");
+	dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck");
+	if (IS_ERR(dispc.dss_54m_fck)) {
+		dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
 		clk_put(dispc.dss_ick);
 		clk_put(dispc.dss1_fck);
-		return PTR_ERR(dispc.dss_54m_fck);
+
 	}
 
 	return 0;
drivers/video/omap/rfbi.c +5 -4
index a13c8dc..9332d6c 100644
@@ -83,12 +83,14 @@ static inline u32 rfbi_read_reg(int idx)
 
 static int rfbi_get_clocks(void)
 {
-	if (IS_ERR((rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "dss_ick")))) {
-		dev_err(rfbi.fbdev->dev, "can't get dss_ick\n");
+	rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "ick");
+	if (IS_ERR(rfbi.dss_ick)) {
+		dev_err(rfbi.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(rfbi.dss_ick);
 	}
 
-	if (IS_ERR((rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck")))) {
+	rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck");
+	if (IS_ERR(rfbi.dss1_fck)) {
 		dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(rfbi.dss_ick);
 		return PTR_ERR(rfbi.dss1_fck);
 
 
-------------------------------------------------------------------
Quoted 4 lines
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

----------------------------------------------------------------------
Czy bede bogaty?
Zapytaj wrozke >> http://link.interia.pl/f216c

author maintainer Acked-by Krzysztof Helt
#8 lore raw

Re: [PATCH 6/8] ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi

Quoted 8 lines · Krzysztof Helt
Quoted 5 lines · On Thu, 14 May 2009 10:49:59 -0700 Tony Lindgren <[email protected]> wrote:

This makes the framebuffer work on omap3.

Also fix the clk_get usage for checkpatch.pl
"ERROR: do not use assignment in if condition".

Quoted 6 lines
Quoted 4 lines

---

Thanks for looking. Here's v2 of the patch with one line fixed below.

Quoted 22 lines
Quoted 22 lines
drivers/video/omap/dispc.c +5 -3
@@ -880,23 +880,25 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
 
 static int get_dss_clocks(void)
 {
-	if (IS_ERR((dispc.dss_ick = clk_get(dispc.fbdev->dev, "dss_ick")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_ick\n");
+	dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick");
+	if (IS_ERR(dispc.dss_ick)) {
+		dev_err(dispc.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(dispc.dss_ick);
 	}
 
-	if (IS_ERR((dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck")))) {
+	dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck");
+	if (IS_ERR(dispc.dss1_fck)) {
 		dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(dispc.dss_ick);
 		return PTR_ERR(dispc.dss1_fck);
 	}
 
Quoted 11 lines

drivers/video/omap/dispc.c static irqreturn_t omap_dispc_irq_handler(int irq, void *dev) · line 902

Quoted 11 lines
drivers/video/omap/dispc.c +4 -4
-	if (IS_ERR((dispc.dss_54m_fck =
-				clk_get(dispc.fbdev->dev, "dss_54m_fck")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_54m_fck\n");
+	dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck");
+	if (IS_ERR(dispc.dss_54m_fck)) {
+		dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
 		clk_put(dispc.dss_ick);
 		clk_put(dispc.dss1_fck);
-		return PTR_ERR(dispc.dss_54m_fck);
+
 	}

The return PTR_ERR(dispc.dss_54m_fck) should not be left out.

Regards,

Tony

commit 27db33cfadd3c47c9499def6e71aaf5d2fd51e60

Author: Tony Lindgren <[email protected]>
Date:   Tue May 12 11:20:03 2009 -0700

ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi, v2

This makes the framebuffer work on omap3.

Also fix the clk_get usage for checkpatch.pl "ERROR: do not use assignment in if condition".

arch/arm/mach-omap2/clock24xx.c +4 -4
index ff9b4c0..e4cef33 100644
@@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = {
 	CLK(NULL,	"mdm_ick",	&mdm_ick,	CK_243X),
 	CLK(NULL,	"mdm_osc_ck",	&mdm_osc_ck,	CK_243X),
 	/* DSS domain clocks */
-	CLK(NULL,	"dss_ick",	&dss_ick,	CK_243X | CK_242X),
-	CLK(NULL,	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
-	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
-	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"ick",		&dss_ick,	CK_243X | CK_242X),
+	CLK("omapfb",	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
+	CLK("omapfb",	"tv_fck",	&dss_54m_fck,	CK_243X | CK_242X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_243X | CK_242X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_243X | CK_242X),
arch/arm/mach-omap2/clock34xx.c +5 -5
index a057539..ba05aa4 100644
@@ -197,11 +197,11 @@ static struct omap_clk omap34xx_clks[] = {
 	CLK("omap_rng",	"ick",		&rng_ick,	CK_343X),
 	CLK(NULL,	"sha11_ick",	&sha11_ick,	CK_343X),
 	CLK(NULL,	"des1_ick",	&des1_ick,	CK_343X),
-	CLK(NULL,	"dss1_alwon_fck", &dss1_alwon_fck, CK_343X),
-	CLK(NULL,	"dss_tv_fck",	&dss_tv_fck,	CK_343X),
-	CLK(NULL,	"dss_96m_fck",	&dss_96m_fck,	CK_343X),
-	CLK(NULL,	"dss2_alwon_fck", &dss2_alwon_fck, CK_343X),
-	CLK(NULL,	"dss_ick",	&dss_ick,	CK_343X),
+	CLK("omapfb",	"dss1_fck",	&dss1_alwon_fck, CK_343X),
+	CLK("omapfb",	"tv_fck",	&dss_tv_fck,	CK_343X),
+	CLK("omapfb",	"video_fck",	&dss_96m_fck,	CK_343X),
+	CLK("omapfb",	"dss2_fck",	&dss2_alwon_fck, CK_343X),
+	CLK("omapfb",	"ick",		&dss_ick,	CK_343X),
 	CLK(NULL,	"cam_mclk",	&cam_mclk,	CK_343X),
 	CLK(NULL,	"cam_ick",	&cam_ick,	CK_343X),
 	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_343X),
drivers/video/omap/dispc.c +8 -6
index dfb72f5..148cbcc 100644
@@ -880,20 +880,22 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
 
 static int get_dss_clocks(void)
 {
-	if (IS_ERR((dispc.dss_ick = clk_get(dispc.fbdev->dev, "dss_ick")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_ick\n");
+	dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick");
+	if (IS_ERR(dispc.dss_ick)) {
+		dev_err(dispc.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(dispc.dss_ick);
 	}
 
-	if (IS_ERR((dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck")))) {
+	dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck");
+	if (IS_ERR(dispc.dss1_fck)) {
 		dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(dispc.dss_ick);
 		return PTR_ERR(dispc.dss1_fck);
 	}
 
-	if (IS_ERR((dispc.dss_54m_fck =
-				clk_get(dispc.fbdev->dev, "dss_54m_fck")))) {
-		dev_err(dispc.fbdev->dev, "can't get dss_54m_fck\n");
+	dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck");
+	if (IS_ERR(dispc.dss_54m_fck)) {
+		dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
 		clk_put(dispc.dss_ick);
 		clk_put(dispc.dss1_fck);
 		return PTR_ERR(dispc.dss_54m_fck);
drivers/video/omap/rfbi.c +5 -3
index a13c8dc..9332d6c 100644
@@ -83,12 +83,14 @@ static inline u32 rfbi_read_reg(int idx)
 
 static int rfbi_get_clocks(void)
 {
-	if (IS_ERR((rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "dss_ick")))) {
-		dev_err(rfbi.fbdev->dev, "can't get dss_ick\n");
+	rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "ick");
+	if (IS_ERR(rfbi.dss_ick)) {
+		dev_err(rfbi.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(rfbi.dss_ick);
 	}
 
-	if (IS_ERR((rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck")))) {
+	rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck");
+	if (IS_ERR(rfbi.dss1_fck)) {
 		dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(rfbi.dss_ick);
 		return PTR_ERR(rfbi.dss1_fck);
#9 lore raw

Re: [PATCH 6/8] ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi

Quoted 8 lines · Tony Lindgren

commit 27db33cfadd3c47c9499def6e71aaf5d2fd51e60

Author: Tony Lindgren <[email protected]>
Date:   Tue May 12 11:20:03 2009 -0700

ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi, v2

This makes the framebuffer work on omap3.

Quoted 7 lines

Also fix the clk_get usage for checkpatch.pl "ERROR: do not use assignment in if condition".

This isn't a bug fix - the current code works, although checkpatch will complain about the assignment in the if condition.

The rest of the patch is just a conversion from the old way of doing things to the new way, and I don't think is -rc material.

author maintainer
#10 lore raw

Re: [PATCH 6/8] ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi

Quoted 17 lines · Russell King - ARM Linux
Quoted 8 lines · Tony Lindgren

commit 27db33cfadd3c47c9499def6e71aaf5d2fd51e60

Author: Tony Lindgren <[email protected]>
Date:   Tue May 12 11:20:03 2009 -0700

ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi, v2

This makes the framebuffer work on omap3.

Quoted 7 lines

Also fix the clk_get usage for checkpatch.pl "ERROR: do not use assignment in if condition".

Quoted 5 lines

This isn't a bug fix - the current code works, although checkpatch will complain about the assignment in the if condition.

The rest of the patch is just a conversion from the old way of doing things to the new way, and I don't think is -rc material.

The code does not work for omap3 without this patch because of the different clock names. It only works for 24xx. And because of the different source clocks, it's pointless trying to fix it in any other way for -rc series.

Dropping anyways from the omap-fixes series, we can wait a bit longer.

Tony

#11 lore raw

Re: [PATCH 6/8] ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi

Quoted 4 lines · Tony Lindgren

The code does not work for omap3 without this patch because of the different clock names. It only works for 24xx. And because of the different source clocks, it's pointless trying to fix it in any other way for -rc series.

If that's the case, leave it in please.

author maintainer
#12 lore raw

Re: [PATCH 6/8] ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi

Quoted 7 lines · Russell King - ARM Linux
Quoted 4 lines · Tony Lindgren

The code does not work for omap3 without this patch because of the different clock names. It only works for 24xx. And because of the different source clocks, it's pointless trying to fix it in any other way for -rc series.

If that's the case, leave it in please.

OK, thanks. I'll add it back and send an updated pull request too.

Regards,

Tony

author maintainer
#13 lore raw

PATCH 7/8 ARM: OMAP3: Fix number of GPIO lines for 34xx

In reply to Tony Lindgren

From: Tony Lindgren <Pandita>

As per 3430 TRM, there are 6 banks [0 to 191]

---
 arch/arm/plat-omap/gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/gpio.c +1 -1
index 17d7afe..ee0b21f 100644
@@ -307,7 +307,7 @@ static inline int gpio_valid(int gpio)
 		return 0;
 	if (cpu_is_omap24xx() && gpio < 128)
 		return 0;
-	if (cpu_is_omap34xx() && gpio < 160)
+	if (cpu_is_omap34xx() && gpio < 192)
 		return 0;
 	return -1;
 }
#14 lore raw

RE: [PATCH 7/8] ARM: OMAP3: Fix number of GPIO lines for 34xx

Quoted 2 lines

From: Tony Lindgren <Pandita>

Typo?

Quoted 24 lines

As per 3430 TRM, there are 6 banks [0 to 191]

---
 arch/arm/plat-omap/gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/gpio.c +1 -1
index 17d7afe..ee0b21f 100644
@@ -307,7 +307,7 @@ static inline int gpio_valid(int gpio)
 		return 0;
 	if (cpu_is_omap24xx() && gpio < 128)
 		return 0;
-	if (cpu_is_omap34xx() && gpio < 160)
+	if (cpu_is_omap34xx() && gpio < 192)
 		return 0;
 	return -1;
 }
author maintainer
#15 lore raw

Re: [PATCH 7/8] ARM: OMAP3: Fix number of GPIO lines for 34xx

Quoted 4 lines · Gadiyar, Anand
Quoted 2 lines

From: Tony Lindgren <Pandita>

Typo?

Thanks, fixed. Updated patch below.

Tony

commit 22c76ab3882a15542567c34bf2ed548401ff8cbe

Author: Vikram Pandita <[email protected]>
Date:   Wed May 13 10:33:05 2009 -0700

ARM: OMAP3: Fix number of GPIO lines for 34xx

As per 3430 TRM, there are 6 banks [0 to 191]

arch/arm/plat-omap/gpio.c +1 -1
index 17d7afe..ee0b21f 100644
@@ -307,7 +307,7 @@ static inline int gpio_valid(int gpio)
 		return 0;
 	if (cpu_is_omap24xx() && gpio < 128)
 		return 0;
-	if (cpu_is_omap34xx() && gpio < 160)
+	if (cpu_is_omap34xx() && gpio < 192)
 		return 0;
 	return -1;
 }
author maintainer
#16 lore raw

PATCH 8/8 ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

In reply to Tony Lindgren

From: Kalle Jokiniemi <[email protected]>

The OMAP3430ES2_SAVEANDRESTORE_SHIFT macro is used by powerdomain code in
"1 << OMAP3430ES2_SAVEANDRESTORE_SHIFT" manner, but the definition was also (1 << 4), meaning we actually modified bit 16. So the definition needs to be 4.

This fixes also a cold reset HW bug in OMAP3430 ES3.x where some of the efuse bits are not isolated during wake-up from off mode. This can cause randomish cold resets with off mode. Enabling the USBTLL hardware SAVEANDRESTORE causes the core power up assert to be delayed in a way that we will not get faulty values when boot ROM is reading the unisolated registers.

---
 arch/arm/mach-omap2/prm-regbits-34xx.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/prm-regbits-34xx.h +1 -1
index c6a7940..9fd03a2 100644
@@ -409,7 +409,7 @@
 /* PM_PREPWSTST_CAM specific bits */
 
 /* PM_PWSTCTRL_USBHOST specific bits */
-#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		(1 << 4)
+#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		4
 
 /* RM_RSTST_PER specific bits */
 
author maintainer
#17 lore raw

git pull request for omap-fixes (Re: [PATCH 0/8] Omap fixes for 2.6.30-rc5)

In reply to Tony Lindgren

Russell,

Quoted 3 lines · Tony Lindgren

Hi,

Here are some omap fixes for 2.6.30-rc5 for review.

Here's the pull request for you assuming you don't have any comments for these fixes.

Regards,

Tony

The following changes since commit 091bf7624d1c90cec9e578a18529f615213ff847:
Linus Torvalds (1):

        Linux 2.6.30-rc5

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-fixes

Jarkko Nikula (2):
ARM: OMAP2: Fix tusb6010 init error and compilation warning
ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config

Kalle Jokiniemi (1):
ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

Paul Walmsley (1):
ARM: OMAP: GPIO de-bounce clocks don't affect module idle state

Tomi Valkeinen (1):
ARM: OMAP: Fix printing of reserved memory for frambuffer

Tony Lindgren (2):
ARM: OMAP2/3: Add name for musb clocks
ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi, v2

Vikram Pandita (1):
ARM: OMAP3: Fix number of GPIO lines for 34xx

 arch/arm/mach-omap2/clock24xx.c        |   10 +++++-----
 arch/arm/mach-omap2/clock34xx.c        |   12 ++++++------
 arch/arm/mach-omap2/clock34xx.h        |   12 ++++++------
 arch/arm/mach-omap2/devices.c          |    6 ++++--
 arch/arm/mach-omap2/prm-regbits-34xx.h |    2 +-
 arch/arm/mach-omap2/usb-tusb6010.c     |    2 +-
 arch/arm/plat-omap/fb.c                |    5 +++--
 arch/arm/plat-omap/gpio.c              |    2 +-
 drivers/video/omap/dispc.c             |   14 ++++++++------
 drivers/video/omap/rfbi.c              |    8 +++++---
 10 files changed, 40 insertions(+), 33 deletions(-)
author maintainer
#18 lore raw

Re: git pull request for omap-fixes, v2 (Re: [PATCH 0/8] Omap fixes for 2.6.30-rc5)

Quoted 9 lines · Tony Lindgren

Russell,

Quoted 3 lines · Tony Lindgren

Hi,

Here are some omap fixes for 2.6.30-rc5 for review.

Here's the pull request for you assuming you don't have any comments for these fixes.

Updated pull request below with the dispc clkdev patch dropped.

Tony

The following changes since commit 091bf7624d1c90cec9e578a18529f615213ff847:
Linus Torvalds (1):

        Linux 2.6.30-rc5

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-fixes

Jarkko Nikula (2):
ARM: OMAP2: Fix tusb6010 init error and compilation warning
ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config

Kalle Jokiniemi (1):
ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

Paul Walmsley (1):
ARM: OMAP: GPIO de-bounce clocks don't affect module idle state

Tomi Valkeinen (1):
ARM: OMAP: Fix printing of reserved memory for frambuffer

Tony Lindgren (1):
ARM: OMAP2/3: Add name for musb clocks

Vikram Pandita (1):
ARM: OMAP3: Fix number of GPIO lines for 34xx

 arch/arm/mach-omap2/clock24xx.c        |    2 +-
 arch/arm/mach-omap2/clock34xx.c        |    2 +-
 arch/arm/mach-omap2/clock34xx.h        |   12 ++++++------
 arch/arm/mach-omap2/devices.c          |    6 ++++--
 arch/arm/mach-omap2/prm-regbits-34xx.h |    2 +-
 arch/arm/mach-omap2/usb-tusb6010.c     |    2 +-
 arch/arm/plat-omap/fb.c                |    5 +++--
 arch/arm/plat-omap/gpio.c              |    2 +-
 8 files changed, 18 insertions(+), 15 deletions(-)
author maintainer
#19 lore raw

Re: git pull request for omap-fixes, v3 (Re: [PATCH 0/8] Omap fixes for 2.6.30-rc5)

Quoted 4 lines · Tony Lindgren
Quoted 3 lines · Tony Lindgren

Russell,

* Tony Lindgren <[email protected]> [090514 10:42]:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Hi,

Here are some omap fixes for 2.6.30-rc5 for review.

Here's the pull request for you assuming you don't have any comments for these fixes.

Updated pull request below with the dispc clkdev patch dropped.

Added back the dispc clkdev patch as discussed in the other thread, updated pull request here.

Tony

The following changes since commit 091bf7624d1c90cec9e578a18529f615213ff847:
Linus Torvalds (1):

        Linux 2.6.30-rc5

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-fixes

Jarkko Nikula (2):
ARM: OMAP2: Fix tusb6010 init error and compilation warning
ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config

Kalle Jokiniemi (1):
ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

Paul Walmsley (1):
ARM: OMAP: GPIO de-bounce clocks don't affect module idle state

Tomi Valkeinen (1):
ARM: OMAP: Fix printing of reserved memory for frambuffer

Tony Lindgren (2):
ARM: OMAP2/3: Add name for musb clocks
ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi, v2

Vikram Pandita (1):
ARM: OMAP3: Fix number of GPIO lines for 34xx

 arch/arm/mach-omap2/clock24xx.c        |   10 +++++-----
 arch/arm/mach-omap2/clock34xx.c        |   12 ++++++------
 arch/arm/mach-omap2/clock34xx.h        |   12 ++++++------
 arch/arm/mach-omap2/devices.c          |    6 ++++--
 arch/arm/mach-omap2/prm-regbits-34xx.h |    2 +-
 arch/arm/mach-omap2/usb-tusb6010.c     |    2 +-
 arch/arm/plat-omap/fb.c                |    5 +++--
 arch/arm/plat-omap/gpio.c              |    2 +-
 drivers/video/omap/dispc.c             |   14 ++++++++------
 drivers/video/omap/rfbi.c              |    8 +++++---
 10 files changed, 40 insertions(+), 33 deletions(-)