Skip to contentSkip to conversation

ARM: OMAP: Fix warnings in devices.c for 2430sdp config

PATCH In review Dirk Behme 3 participants 5 messages Mar 19, 2007 – Apr 3, 2007

Subsystems (2)
lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 ARM: OMAP: Fix warnings in devices.c for 2430sdp config

Fix warnings

arch/arm/plat-omap/devices.c:159: warning: 'omap_init_kp' defined but not used arch/arm/plat-omap/devices.c:282: warning: 'omap_init_mmc' defined but not used arch/arm/plat-omap/devices.c:436: warning: 'omap_init_wdt' defined but not used arch/arm/plat-omap/devices.c:469: warning: 'omap_init_rng' defined but not used

if using omap_2430sdp_defconfig.

arch/arm/plat-omap/devices.c +8 -4
Index: linux-osk/arch/arm/plat-omap/devices.c
===================================================================
@@ -153,7 +153,8 @@ static inline void omap_init_i2c(void) {
 #endif
 
 /*-------------------------------------------------------------------------*/
-#if	defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
+#if	(defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)) && \
+        !defined(CONFIG_MACH_OMAP_2430SDP)
 
 static void omap_init_kp(void)
 {
@@ -210,7 +211,8 @@ static inline void omap_init_kp(void) {}
 
 /*-------------------------------------------------------------------------*/
 
-#if	defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if	(defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)) && \
+        !defined(CONFIG_MACH_OMAP_2430SDP)
 
 #ifdef CONFIG_ARCH_OMAP24XX
 #define	OMAP_MMC1_BASE		0x4809c000
@@ -409,7 +411,8 @@ static inline void omap_init_uwire(void)
 
 /*-------------------------------------------------------------------------*/
 
-#if	defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
+#if	(defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)) && \
+        !defined(CONFIG_MACH_OMAP_2430SDP)
 
 #ifdef CONFIG_ARCH_OMAP24XX
 #define	OMAP_WDT_BASE		0x48022000
@@ -442,7 +445,8 @@ static inline void omap_init_wdt(void) {
 
 /*-------------------------------------------------------------------------*/
 
-#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)
+#if     (defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)) && \
+        !defined(CONFIG_MACH_OMAP_2430SDP)
 
 #ifdef CONFIG_ARCH_OMAP24XX
 #define	OMAP_RNG_BASE		0x480A0000
#1 lore raw
Quoted 11 lines · Dirk Behme

Fix warnings

arch/arm/plat-omap/devices.c:159: warning: 'omap_init_kp' defined but not used arch/arm/plat-omap/devices.c:282: warning: 'omap_init_mmc' defined but not used arch/arm/plat-omap/devices.c:436: warning: 'omap_init_wdt' defined but not used arch/arm/plat-omap/devices.c:469: warning: 'omap_init_rng' defined but not used

AFAIK some these devices are on 2430, so maybe somebody could patch them to work instead? The DSP is different from 2420 though.

Tony

#2 lore raw

Tony,

Keypad and MMC are different from that on 2420 SDP as such. Keypad is based on TWL4030 Keypad controller and MMC is HSMMC controller. It might take some time to send a patch.

I am actually working on the Keypad one, will post a patch soon.

Regards,
Khasim

Quoted 30 lines

-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of [email protected]
Sent: Tuesday, March 20, 2007 11:06 AM
To: Dirk Behme
Cc: [email protected]
Subject: Re: [PATCH] ARM: OMAP: Fix warnings in devices.c for 2430sdp config

Quoted 11 lines · Dirk Behme

Fix warnings

arch/arm/plat-omap/devices.c:159: warning: 'omap_init_kp' defined but not used arch/arm/plat-omap/devices.c:282: warning: 'omap_init_mmc' defined but not used arch/arm/plat-omap/devices.c:436: warning: 'omap_init_wdt' defined but not used arch/arm/plat-omap/devices.c:469: warning: 'omap_init_rng' defined but not used

AFAIK some these devices are on 2430, so maybe somebody could patch them to work instead? The DSP is different from 2420 though.

Tony
_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

#3 lore raw
Quoted 7 lines · Syed Mohammed, Khasim

Tony,

Keypad and MMC are different from that on 2420 SDP as such. Keypad is based on TWL4030 Keypad controller and MMC is HSMMC controller. It might take some time to send a patch.

I am actually working on the Keypad one, will post a patch soon.

OK, how about this patch instead then? It assumes that wdt and rng are the same.

Regards,

Tony

ARM:OMAP: Fix compile warnings for 2430

Some 2430 devices are different and not yet done.

arch/arm/plat-omap/devices.c +8 -5
@@ -157,6 +157,10 @@ static inline void omap_init_i2c(void) {}
 
 static void omap_init_kp(void)
 {
+	/* REVISIT: 2430 keypad is on TWL4030 */
+	if (cpu_is_omap2430())
+		return;
+
 	if (machine_is_omap_h2() || machine_is_omap_h3()) {
 		omap_cfg_reg(F18_1610_KBC0);
 		omap_cfg_reg(D20_1610_KBC1);
@@ -283,6 +287,10 @@ static void __init omap_init_mmc(void)
 	const struct omap_mmc_config	*mmc_conf;
 	const struct omap_mmc_conf	*mmc;
 
+	/* REVISIT: 2430 has HS MMC */
+	if (cpu_is_omap2430())
+		return;
+
 	/* NOTE:  assumes MMC was never (wrongly) enabled */
 	mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config);
 	if (!mmc_conf)
@@ -495,10 +503,6 @@ static inline void omap_init_rng(void) {}
  */
 static int __init omap_init_devices(void)
 {
-/*
- * Need to enable relevant once for 2430 SDP
- */
-#ifndef CONFIG_MACH_OMAP_2430SDP
 	/* please keep these calls, and their implementations above,
 	 * in alphabetical order so they're easier to sort through.
 	 */
@@ -508,7 +512,6 @@ static int __init omap_init_devices(void)
 	omap_init_uwire();
 	omap_init_wdt();
 	omap_init_rng();
-#endif
 	omap_init_i2c();
 	return 0;
 }
#4 lore raw
Quoted 58 lines · Tony Lindgren
Quoted 7 lines · Syed Mohammed, Khasim

Tony,

Keypad and MMC are different from that on 2420 SDP as such. Keypad is based on TWL4030 Keypad controller and MMC is HSMMC controller. It might take some time to send a patch.

I am actually working on the Keypad one, will post a patch soon.

OK, how about this patch instead then? It assumes that wdt and rng are the same.

Regards,

Tony

ARM:OMAP: Fix compile warnings for 2430

Some 2430 devices are different and not yet done.

arch/arm/plat-omap/devices.c +8 -4
@@ -157,6 +157,10 @@ static inline void omap_init_i2c(void) {}
 
 static void omap_init_kp(void)
 {
+	/* REVISIT: 2430 keypad is on TWL4030 */
+	if (cpu_is_omap2430())
+		return;
+
 	if (machine_is_omap_h2() || machine_is_omap_h3()) {
 		omap_cfg_reg(F18_1610_KBC0);
 		omap_cfg_reg(D20_1610_KBC1);
@@ -283,6 +287,10 @@ static void __init omap_init_mmc(void)
 	const struct omap_mmc_config	*mmc_conf;
 	const struct omap_mmc_conf	*mmc;
 
+	/* REVISIT: 2430 has HS MMC */
+	if (cpu_is_omap2430())
+		return;
+
 	/* NOTE:  assumes MMC was never (wrongly) enabled */
 	mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config);
 	if (!mmc_conf)
@@ -495,10 +503,6 @@ static inline void omap_init_rng(void) {}
  */
 static int __init omap_init_devices(void)
 {
-/*
- * Need to enable relevant once for 2430 SDP
- */
-#ifndef CONFIG_MACH_OMAP_2430SDP
 	/* please keep these calls, and their implementations above,
 	 * in alphabetical order so they're easier to sort through.
 	 */

arch/arm/plat-omap/devices.c static int __init omap_init_devices(void) · line 517

Quoted 7 lines
arch/arm/plat-omap/devices.c +0 -1
@@ -508,7 +512,6 @@ static int __init omap_init_devices(void)
 	omap_init_uwire();
 	omap_init_wdt();
 	omap_init_rng();
-#endif
 	omap_init_i2c();
 	return 0;
 }

Pushed.

Tony