Skip to contentSkip to conversation

More omap2+ randconfig fixes

PATCH New Tony Lindgren 2 participants 10 messages Feb 24, 2012

Subsystems (3)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover More omap2+ randconfig fixes

Hi all,

Here are some more omap2+ randconfig related fixes for review.

Regards,

Tony

---

Tony Lindgren (7):
ARM: OMAP2+: Fix Kconfig dependencies for USB_ARCH_HAS_EHCI
ARM: OMAP2+: Fix OMAP_HDQ_BASE build error
ARM: OMAP2+: Fix board_mux section type conflict when OMAP_MUX is not set
ARM: OMAP2+: Fix zoom LCD backlight if TWL_CORE is not selected
ARM: OMAP2+: Fix devexit for smartreflex when CONFIG_HOTPLUG is not set
ARM: OMAP: Fix devexit for dma when CONFIG_HOTPLUG is not set
ARM: OMAP2+: Fix multiple randconfig errors with SOC_OMAP and SOC_OMAP_NOOP

 arch/arm/Makefile                        |    4 +-
 arch/arm/mach-omap2/Kconfig              |   55 ++++++++++++++++++++----------
 arch/arm/mach-omap2/board-zoom-display.c |    6 +++
 arch/arm/mach-omap2/devices.c            |    7 ++--
 arch/arm/mach-omap2/mux.h                |    2 +
 arch/arm/mach-omap2/smartreflex.c        |    2 +
 arch/arm/plat-omap/dma.c                 |    2 +
 7 files changed, 50 insertions(+), 28 deletions(-)
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/7 ARM: OMAP2+: Fix Kconfig dependencies for USB_ARCH_HAS_EHCI

Otherwise we get:

warning: (ARCH_OMAP3 && ARCH_OMAP4) selects USB_ARCH_HAS_EHCI which has unmet direct dependencies (USB_SUPPORT)

---
 arch/arm/mach-omap2/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/Kconfig +2 -2
index d965da4..337f98d 100644
@@ -32,7 +32,7 @@ config ARCH_OMAP3
 	depends on ARCH_OMAP2PLUS
 	default y
 	select CPU_V7
-	select USB_ARCH_HAS_EHCI
+	select USB_ARCH_HAS_EHCI if USB_SUPPORT
 	select ARCH_HAS_OPP
 	select PM_OPP if PM
 	select ARM_CPU_SUSPEND if PM
@@ -52,7 +52,7 @@ config ARCH_OMAP4
 	select ARM_ERRATA_720789
 	select ARCH_HAS_OPP
 	select PM_OPP if PM
-	select USB_ARCH_HAS_EHCI
+	select USB_ARCH_HAS_EHCI if USB_SUPPORT
 	select ARM_CPU_SUSPEND if PM
 
 comment "OMAP Core Type"
author maintainer
#2 lore raw

PATCH 2/7 ARM: OMAP2+: Fix OMAP_HDQ_BASE build error

In reply to Tony Lindgren

If CONFIG_SOC_OMAP3430 is not set and CONFIG_HDQ_MASTER_OMAP is selected for w1 driver we get the following error:

arch/arm/mach-omap2/devices.c:662:13: error:
'OMAP_HDQ_BASE' undeclared here (not in a function)

Looks like OMAP_HDQ_BASE is valid for all omaps except 2420, so we can remove the ifdef and not register the device on 2420.

---
 arch/arm/mach-omap2/devices.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/devices.c +4 -3
index 283d11e..3ffefe2 100644
@@ -654,9 +654,7 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
 /*-------------------------------------------------------------------------*/
 
 #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE)
-#if defined(CONFIG_SOC_OMAP2430) || defined(CONFIG_SOC_OMAP3430)
 #define OMAP_HDQ_BASE	0x480B2000
-#endif
 static struct resource omap_hdq_resources[] = {
 	{
 		.start		= OMAP_HDQ_BASE,
@@ -679,7 +677,10 @@ static struct platform_device omap_hdq_dev = {
 };
 static inline void omap_hdq_init(void)
 {
-	(void) platform_device_register(&omap_hdq_dev);
+	if (cpu_is_omap2420())
+		return;
+
+	platform_device_register(&omap_hdq_dev);
 }
 #else
 static inline void omap_hdq_init(void) {}
author maintainer
#3 lore raw

PATCH 3/7 ARM: OMAP2+: Fix board_mux section type conflict when OMAP_MUX is not set

In reply to Tony Lindgren

Otherwise we can get:

arch/arm/mach-omap2/mux.h:249:31: error: board_mux causes a section type conflict

---
 arch/arm/mach-omap2/mux.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/mux.h +1 -1
index 2132308..69fe060 100644
@@ -246,7 +246,7 @@ static inline void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state)
 {
 }
 
-static struct omap_board_mux *board_mux __initdata __maybe_unused;
+static struct omap_board_mux *board_mux __maybe_unused;
 
 #endif
 
author maintainer
#4 lore raw

PATCH 4/7 ARM: OMAP2+: Fix zoom LCD backlight if TWL_CORE is not selected

In reply to Tony Lindgren

Otherwise we get:

arch/arm/mach-omap2/board-zoom-display.c:64: undefined reference to twl_i2c_read_u8' arch/arm/mach-omap2/board-zoom-display.c:65: undefined reference to twl_i2c_read_u8' arch/arm/mach-omap2/board-zoom-display.c:84: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:86: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:91: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:92: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:72: undefined reference to `twl_i2c_write_u8'

---
 arch/arm/mach-omap2/board-zoom-display.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-zoom-display.c +6 -0
index d4683ba..7f75fcd 100644
@@ -53,8 +53,11 @@ static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev)
 #define TWL_LED_PWMON	0x0
 #define TWL_LED_PWMOFF	0x1
 
+
 static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level)
 {
+
+#ifdef CONFIG_TWL4030_CORE
 	unsigned char c;
 	u8 mux_pwm, enb_pwm;
 
@@ -90,6 +93,9 @@ static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level)
 	c = ((50 * (100 - level)) / 100) + 1;
 	twl_i2c_write_u8(TWL4030_MODULE_PWM1, 0x7F, TWL_LED_PWMOFF);
 	twl_i2c_write_u8(TWL4030_MODULE_PWM1, c, TWL_LED_PWMON);
+#else
+	pr_warn("Backlight not enabled\n");
+#endif
 
 	return 0;
 }
#5 lore raw

PATCH 4/7 ARM: OMAP2+: Fix zoom LCD backlight if TWL_CORE is not selected

Hello.

Quoted 11 lines · Tony Lindgren

Otherwise we get:

arch/arm/mach-omap2/board-zoom-display.c:64: undefined reference to twl_i2c_read_u8' arch/arm/mach-omap2/board-zoom-display.c:65: undefined reference to twl_i2c_read_u8' arch/arm/mach-omap2/board-zoom-display.c:84: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:86: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:91: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:92: undefined reference to twl_i2c_write_u8' arch/arm/mach-omap2/board-zoom-display.c:72: undefined reference to `twl_i2c_write_u8'

[...]

arch/arm/mach-omap2/board-zoom-display.c static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev) · line 59

Quoted 12 lines
arch/arm/mach-omap2/board-zoom-display.c +2 -0
index d4683ba..7f75fcd 100644
@@ -53,8 +53,11 @@ static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev)
  #define TWL_LED_PWMON	0x0
  #define TWL_LED_PWMOFF	0x1
 
+
  static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level)
  {
+

Empty lines not needed.

arch/arm/mach-omap2/board-zoom-display.c static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev) · line 63

Quoted 4 lines
arch/arm/mach-omap2/board-zoom-display.c +1 -0
+#ifdef CONFIG_TWL4030_CORE
  	unsigned char c;
  	u8 mux_pwm, enb_pwm;
 

WBR, Sergei

author maintainer
#6 lore raw

PATCH 4/7 ARM: OMAP2+: Fix zoom LCD backlight if TWL_CORE is not selected

Quoted 8 lines · Sergei Shtylyov
Quoted 6 lines · Tony Lindgren
arch/arm/mach-omap2/board-zoom-display.c +0 -0
@@ -53,8 +53,11 @@ static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev)
 #define TWL_LED_PWMON	0x0
 #define TWL_LED_PWMOFF	0x1
 
Quoted 6 lines

arch/arm/mach-omap2/board-zoom-display.c static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev) · line 59

Quoted 4 lines
arch/arm/mach-omap2/board-zoom-display.c +2 -0
+
 static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level)
 {
+

Empty lines not needed.

Thanks removing those.

Tony

author maintainer
#7 lore raw

PATCH 5/7 ARM: OMAP2+: Fix devexit for smartreflex when CONFIG_HOTPLUG is not set

In reply to Tony Lindgren

Otherwise we get:

omap_sr_remove' referenced in section .data' of arch/arm/mach-omap2/built-in.o:
defined in discarded section `.devexit.text' of arch/arm/mach-omap2/built-in.o

---
 arch/arm/mach-omap2/smartreflex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/smartreflex.c +1 -1
index 7e755bb..47c77a1 100644
@@ -1012,7 +1012,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver smartreflex_driver = {
-	.remove         = omap_sr_remove,
+	.remove         = __devexit_p(omap_sr_remove),
 	.driver		= {
 		.name	= "smartreflex",
 	},
author maintainer
#8 lore raw

PATCH 6/7 ARM: OMAP: Fix devexit for dma when CONFIG_HOTPLUG is not set

In reply to Tony Lindgren

Otherwise we get:

omap_system_dma_remove' referenced in section .data' of arch/arm/plat-omap/built-in.o:
defined in discarded section `.devexit.text' of arch/arm/plat-omap/built-in.o

---
 arch/arm/plat-omap/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/dma.c +1 -1
index 002fb4d..cb856fe 100644
@@ -2125,7 +2125,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev)
 
 static struct platform_driver omap_system_dma_driver = {
 	.probe		= omap_system_dma_probe,
-	.remove		= omap_system_dma_remove,
+	.remove		= __devexit_p(omap_system_dma_remove),
 	.driver		= {
 		.name	= "omap_dma_system"
 	},
author maintainer
#9 lore raw

PATCH 7/7 ARM: OMAP2+: Fix multiple randconfig errors with SOC_OMAP and SOC_OMAP_NOOP

In reply to Tony Lindgren

If we don't have ARCH_OMAP2, 3 or 4 selected randconfig will always fail with multiple errors as the CPU and MACHINE are not set.

Fix this by changing arch/arm/Makefile to build mach-omap2 based on ARCH_OMAP2PLUS. And let's introduce SOC_OMAP and SOC_OMAP_NOOP that allow randconfig to generate buildable .config files.

Note that we can also remove few uncecssary ARCH_OMAP2PLUS lines as they are all within if ARCH_OMAP2PLUS block.

---
 arch/arm/Makefile           |    4 +--
 arch/arm/mach-omap2/Kconfig |   51 +++++++++++++++++++++++++++++--------------
 2 files changed, 35 insertions(+), 20 deletions(-)
arch/arm/Makefile +1 -3
index 1683bfb..ea69448 100644
@@ -164,9 +164,7 @@ machine-$(CONFIG_ARCH_MXS)		:= mxs
 machine-$(CONFIG_ARCH_NETX)		:= netx
 machine-$(CONFIG_ARCH_NOMADIK)		:= nomadik
 machine-$(CONFIG_ARCH_OMAP1)		:= omap1
-machine-$(CONFIG_ARCH_OMAP2)		:= omap2
-machine-$(CONFIG_ARCH_OMAP3)		:= omap2
-machine-$(CONFIG_ARCH_OMAP4)		:= omap2
+machine-$(CONFIG_ARCH_OMAP2PLUS)	:= omap2
 machine-$(CONFIG_ARCH_ORION5X)		:= orion5x
 machine-$(CONFIG_ARCH_PICOXCELL)	:= picoxcell
 machine-$(CONFIG_ARCH_PNX4008)		:= pnx4008
arch/arm/mach-omap2/Kconfig +34 -17

118 lines not on this page · raw message