Skip to contentSkip to conversation

- onenand - OMAP3 support - Kconfig update

PATCH In review Sameer 6 participants 14 messages Nov 19, 2007 – Dec 5, 2007

Subsystems (2)
lore
Share & tools
lore

Sameer

author
#0 lore raw

PATCH 1/1 - onenand - OMAP3 support - Kconfig update

Hi,
This patch enables the onenand Kconfig for OMAP3.

Regards,
-Sameer

---
 drivers/mtd/onenand/Kconfig |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/mtd/onenand/Kconfig +3 -3
Index: linux-omap-git/drivers/mtd/onenand/Kconfig
===================================================================
@@ -28,10 +28,10 @@ config MTD_ONENAND_GENERIC
          Support for OneNAND flash via platform device driver.
 
 config MTD_ONENAND_OMAP2
-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)
        help
-         Support for a OneNAND flash device connected to an OMAP2 CPU
+         Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
          via the GPMC memory controller.
#1 lore raw

Hi,

Quoted 26 lines · Sameer

Hi,
This patch enables the onenand Kconfig for OMAP3.

Regards,
-Sameer

---
 drivers/mtd/onenand/Kconfig |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Index: linux-omap-git/drivers/mtd/onenand/Kconfig
===================================================================

drivers/mtd/onenand/Kconfig +3 -3
@@ -28,10 +28,10 @@ config MTD_ONENAND_GENERIC
          Support for OneNAND flash via platform device driver.
 
 config MTD_ONENAND_OMAP2
-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)
        help
-         Support for a OneNAND flash device connected to an OMAP2 CPU
+         Support for a OneNAND flash device connected to an OMAP2/OMAP3
Quoted 3 lines

CPU
via the GPMC memory controller.

It looks good to me and I can say it's working although maybe Tony or any body else
can comment better on it.

In any case I ack this patch as it's working for me ;-)

Quoted 4 lines

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

Signature · 5 lines
Best Regards,

Felipe Balbi
http://felipebalbi.com
[email protected]
author
#2 lore raw

PATCH 1/1 - onenand - OMAP3 support - Kconfig update

In reply to Sameer

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and enables omap2_sleep_block() only if CONFIG_PM is defined.

Regards,
-Sameer

---
Index: linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
--- linux-omap-git-20071030.orig/arch/arm/configs/omap_3430sdp_defconfig

2007-11-08 11:28:56.000000000 -0600
+++ linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
2007-11-08 11:29:23.000000000 -0600

@@ -461,7 +461,10 @@
CONFIG_MTD_ONENAND=y
CONFIG_MTD_ONENAND_VERIFY_WRITE=y
# CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
# CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set

#
# UBI - Unsorted block images
Index: linux-omap-git-20071030/drivers/mtd/onenand/Kconfig
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/Kconfig 2007-11-08
11:25:21.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/Kconfig 2007-11-08 11:25:44.000000000 -0600
@@ -28,10 +28,10 @@
Support for OneNAND flash via platform device driver.

config MTD_ONENAND_OMAP2

-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)

help
- Support for a OneNAND flash device connected to an OMAP2 CPU
+ Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
via the GPMC memory controller.

config MTD_ONENAND_OTP
Index: linux-omap-git-20071030/drivers/mtd/onenand/omap2.c
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/omap2.c 2007-11-08
12:01:45.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/omap2.c 2007-11-08 12:02:08.000000000 -0600
@@ -39,7 +39,6 @@
#include <asm/arch/onenand.h>
#include <asm/arch/gpio.h>
#include <asm/arch/gpmc.h>
-#include <asm/arch/pm.h>

#include <linux/dma-mapping.h>
#include <asm/dma-mapping.h>
@@ -47,6 +46,13 @@

#include <asm/arch/board.h>

+#ifdef CONFIG_PM
+#include <asm/arch/pm.h>
+#else
+#define omap2_block_sleep() /* NULL */
+#define omap2_allow_sleep() /* NULL */
+#endif
+
#define ONENAND_IO_SIZE SZ_128K
#define ONENAND_BUFRAM_SIZE (1024 * 5)

#3 lore raw

Hi,

That's the reason not yet merged the mtd tree. The vanilla kernel doesn't have the omap2_sleep_block(). I'm not sure it's only dependent on CONFIG_PM.

Thank you,
Kyungmin Park

-----Original Message-----
From:
linux-omap-open-source-bounces+kyungmin.park=samsung.com@linux.omap.com [mailto:linux-omap-open-source-bounces+kyungmin.park=samsung.com@linux.omap. com] On Behalf Of Sameer
Sent: Tuesday, November 20, 2007 4:32 PM
To: [email protected]
Subject: [PATCH: Resending] - onenand - OMAP3 support - Kconfig update

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and enables omap2_sleep_block() only if CONFIG_PM
is defined.

Regards,
-Sameer

---
Index: linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
--- linux-omap-git-20071030.orig/arch/arm/configs/omap_3430sdp_defconfig

2007-11-08 11:28:56.000000000 -0600
+++ linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
2007-11-08 11:29:23.000000000 -0600

@@ -461,7 +461,10 @@
CONFIG_MTD_ONENAND=y
CONFIG_MTD_ONENAND_VERIFY_WRITE=y
# CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
# CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set

#
# UBI - Unsorted block images
Index: linux-omap-git-20071030/drivers/mtd/onenand/Kconfig
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/Kconfig 2007-11-08
11:25:21.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/Kconfig 2007-11-08 11:25:44.000000000 -0600
@@ -28,10 +28,10 @@
Support for OneNAND flash via platform device driver.

config MTD_ONENAND_OMAP2

-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)

help
- Support for a OneNAND flash device connected to an OMAP2 CPU
+ Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
via the GPMC memory controller.

config MTD_ONENAND_OTP
Index: linux-omap-git-20071030/drivers/mtd/onenand/omap2.c
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/omap2.c 2007-11-08
12:01:45.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/omap2.c 2007-11-08 12:02:08.000000000 -0600
@@ -39,7 +39,6 @@
#include <asm/arch/onenand.h>
#include <asm/arch/gpio.h>
#include <asm/arch/gpmc.h>
-#include <asm/arch/pm.h>

#include <linux/dma-mapping.h>
#include <asm/dma-mapping.h>
@@ -47,6 +46,13 @@

#include <asm/arch/board.h>

+#ifdef CONFIG_PM
+#include <asm/arch/pm.h>
+#else
+#define omap2_block_sleep() /* NULL */
+#define omap2_allow_sleep() /* NULL */
+#endif
+
#define ONENAND_IO_SIZE SZ_128K
#define ONENAND_BUFRAM_SIZE (1024 * 5)

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

author
#4 lore raw

PATCH 1/1 - onenand - OMAP3 support - Kconfig update

In reply to Sameer

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and enables omap2_sleep_block() only if CONFIG_PM is defined.
Also adding the signed off by line which was missed in the previous mail.

Regards,
-Sameer

---
Index: linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
--- linux-omap-git-20071030.orig/arch/arm/configs/omap_3430sdp_defconfig

2007-11-08 11:28:56.000000000 -0600
+++ linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
2007-11-08 11:29:23.000000000 -0600

@@ -461,7 +461,10 @@
CONFIG_MTD_ONENAND=y
CONFIG_MTD_ONENAND_VERIFY_WRITE=y
# CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
# CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set

#
# UBI - Unsorted block images
Index: linux-omap-git-20071030/drivers/mtd/onenand/Kconfig
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/Kconfig 2007-11-08
11:25:21.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/Kconfig 2007-11-08 11:25:44.000000000 -0600
@@ -28,10 +28,10 @@
Support for OneNAND flash via platform device driver.

config MTD_ONENAND_OMAP2

-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)

help
- Support for a OneNAND flash device connected to an OMAP2 CPU
+ Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
via the GPMC memory controller.

config MTD_ONENAND_OTP
Index: linux-omap-git-20071030/drivers/mtd/onenand/omap2.c
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/omap2.c 2007-11-08
12:01:45.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/omap2.c 2007-11-08 12:02:08.000000000 -0600
@@ -39,7 +39,6 @@
#include <asm/arch/onenand.h>
#include <asm/arch/gpio.h>
#include <asm/arch/gpmc.h>
-#include <asm/arch/pm.h>

#include <linux/dma-mapping.h>
#include <asm/dma-mapping.h>
@@ -47,6 +46,13 @@

#include <asm/arch/board.h>

+#ifdef CONFIG_PM
+#include <asm/arch/pm.h>
+#else
+#define omap2_block_sleep() /* NULL */
+#define omap2_allow_sleep() /* NULL */
+#endif
+
#define ONENAND_IO_SIZE SZ_128K
#define ONENAND_BUFRAM_SIZE (1024 * 5)

#5 lore raw

Hi,

Quoted 70 lines · Sameer

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and enables omap2_sleep_block() only if CONFIG_PM is defined.
Also adding the signed off by line which was missed in the previous mail.

Regards,
-Sameer

---
Index: linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
--- linux-omap-git-20071030.orig/arch/arm/configs/omap_3430sdp_defconfig

2007-11-08 11:28:56.000000000 -0600
+++ linux-omap-git-20071030/arch/arm/configs/omap_3430sdp_defconfig
2007-11-08 11:29:23.000000000 -0600
(quoted diff) +3 -0
@@ -461,7 +461,10 @@
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 # CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
 # CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set
 
 #
 # UBI - Unsorted block images

Index: linux-omap-git-20071030/drivers/mtd/onenand/Kconfig
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/Kconfig 2007-11-08
11:25:21.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/Kconfig 2007-11-08 11:25:44.000000000 -0600

drivers/mtd/onenand/Kconfig +3 -3
@@ -28,10 +28,10 @@
          Support for OneNAND flash via platform device driver.
 
 config MTD_ONENAND_OMAP2
-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)
        help
-         Support for a OneNAND flash device connected to an OMAP2 CPU
+         Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
          via the GPMC memory controller.
 
 config MTD_ONENAND_OTP

Index: linux-omap-git-20071030/drivers/mtd/onenand/omap2.c
===================================================================
--- linux-omap-git-20071030.orig/drivers/mtd/onenand/omap2.c 2007-11-08
12:01:45.000000000 -0600
+++ linux-omap-git-20071030/drivers/mtd/onenand/omap2.c 2007-11-08 12:02:08.000000000 -0600

(quoted diff) +0 -1
@@ -39,7 +39,6 @@
 #include <asm/arch/onenand.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/gpmc.h>
-#include <asm/arch/pm.h>
 
 #include <linux/dma-mapping.h>
 #include <asm/dma-mapping.h>
@@ -47,6 +46,13 @@
 
 #include <asm/arch/board.h>
 

Review line 58

Quoted 10 lines
(quoted diff) +7 -0
+#ifdef CONFIG_PM
+#include <asm/arch/pm.h>
+#else
+#define omap2_block_sleep()    /* NULL */
+#define omap2_allow_sleep()    /* NULL */
+#endif
+
 #define ONENAND_IO_SIZE                SZ_128K
 #define ONENAND_BUFRAM_SIZE    (1024 * 5)
 

How about defining these in asm/arch/pm.h instead?

Tony

author
#6 lore raw

PATCH 1/1 - onenand - OMAP3 support - Kconfig update

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and redeclaring the omap2_sleep_block(), omap2_allow_sleep() according to CONFIG_PM defination in pm.h according to Tony's recommendation.

Regards,
-Sameer

---

---
 arch/arm/configs/omap_3430sdp_defconfig |    3 +++
 drivers/mtd/onenand/Kconfig             |    6 +++---
 include/asm-arm/arch-omap/pm.h          |    8 +++++++-
 3 files changed, 13 insertions(+), 4 deletions(-)
arch/arm/configs/omap_3430sdp_defconfig +3 -0
Index: linux-omap-git/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
@@ -461,7 +461,10 @@ CONFIG_MTD_OMAP_NOR=y
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 # CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
 # CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set
 
 #
 # UBI - Unsorted block images
drivers/mtd/onenand/Kconfig +3 -3
Index: linux-omap-git/drivers/mtd/onenand/Kconfig
===================================================================
@@ -28,10 +28,10 @@ config MTD_ONENAND_GENERIC
          Support for OneNAND flash via platform device driver.
 
 config MTD_ONENAND_OMAP2
-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)
        help
-         Support for a OneNAND flash device connected to an OMAP2 CPU
+         Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
          via the GPMC memory controller.
 
 config MTD_ONENAND_OTP
include/asm-arm/arch-omap/pm.h +7 -1
Index: linux-omap-git/include/asm-arm/arch-omap/pm.h
===================================================================
@@ -107,7 +107,8 @@
 #if     !defined(CONFIG_ARCH_OMAP730) && \
        !defined(CONFIG_ARCH_OMAP15XX) && \
        !defined(CONFIG_ARCH_OMAP16XX) && \
-       !defined(CONFIG_ARCH_OMAP24XX)
+       !defined(CONFIG_ARCH_OMAP24XX) && \
+       !defined(CONFIG_ARCH_OMAP34XX)
 #error "Power management for this processor not implemented yet"
 #endif
 
@@ -134,8 +135,13 @@ void clk_deny_idle(struct clk *clk);
 
 extern void omap_pm_idle(void);
 extern void omap_pm_suspend(void);
+#ifdef CONFIG_PM
 extern void omap2_block_sleep(void);
 extern void omap2_allow_sleep(void);
+#else
+#define omap2_block_sleep()    /* NULL */
+#define omap2_allow_sleep()    /* NULL */
+#endif
 extern void omap730_cpu_suspend(unsigned short, unsigned short);
 extern void omap1510_cpu_suspend(unsigned short, unsigned short);
 extern void omap1611_cpu_suspend(unsigned short, unsigned short);
#7 lore raw

On Tue, Nov 27, 2007 at 04:51:24PM +0530, ext Sameer wrote:

snip

Quoted 15 lines

Index: linux-omap-git/include/asm-arm/arch-omap/pm.h
===================================================================

include/asm-arm/arch-omap/pm.h +2 -1
@@ -107,7 +107,8 @@
 #if     !defined(CONFIG_ARCH_OMAP730) && \
        !defined(CONFIG_ARCH_OMAP15XX) && \
        !defined(CONFIG_ARCH_OMAP16XX) && \
-       !defined(CONFIG_ARCH_OMAP24XX)
+       !defined(CONFIG_ARCH_OMAP24XX) && \
+       !defined(CONFIG_ARCH_OMAP34XX)
 #error "Power management for this processor not implemented yet"
 #endif
 

include/asm-arm/arch-omap/pm.h void clk_deny_idle(struct clk *clk); · line 143

Quoted 9 lines
include/asm-arm/arch-omap/pm.h +4 -0
@@ -134,8 +135,13 @@ void clk_deny_idle(struct clk *clk);
 
 extern void omap_pm_idle(void);
 extern void omap_pm_suspend(void);
+#ifdef CONFIG_PM
 extern void omap2_block_sleep(void);
 extern void omap2_allow_sleep(void);
+#else
+#define omap2_block_sleep()    /* NULL */
+#define omap2_allow_sleep()    /* NULL */

I'd prefer:
#else
static inline void omap2_block_sleep(void) { }
static inline void omap2_allow_sleep(void) { }
#endif

but it looks ok.

Quoted 9 lines
include/asm-arm/arch-omap/pm.h +1 -0
+#endif
 extern void omap730_cpu_suspend(unsigned short, unsigned short);
 extern void omap1510_cpu_suspend(unsigned short, unsigned short);
 extern void omap1611_cpu_suspend(unsigned short, unsigned short);

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

Signature · 8 lines
Best Regards,

Felipe Balbi
[email protected]
+55 92 2126-1003

INdT - OSMRC - Manaus
Core Team
author
#8 lore raw

PATCH 1/1 - onenand - OMAP3 support - Kconfig update

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and redeclaring the omap2_sleep_block(), omap2_allow_sleep() according to CONFIG_PM defination in pm.h according to Felipe Balbi's comments.

Regards,
-Sameer

---

---
 arch/arm/configs/omap_3430sdp_defconfig |    3 +++
 drivers/mtd/onenand/Kconfig             |    6 +++---
 include/asm-arm/arch-omap/pm.h          |    8 +++++++-
 3 files changed, 13 insertions(+), 4 deletions(-)
arch/arm/configs/omap_3430sdp_defconfig +3 -0
Index: linux-omap-git/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
@@ -461,7 +461,10 @@ CONFIG_MTD_OMAP_NOR=y
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 # CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
 # CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set
 
 #
 # UBI - Unsorted block images
drivers/mtd/onenand/Kconfig +3 -3
Index: linux-omap-git/drivers/mtd/onenand/Kconfig
===================================================================
@@ -28,10 +28,10 @@ config MTD_ONENAND_GENERIC
          Support for OneNAND flash via platform device driver.
 
 config MTD_ONENAND_OMAP2
-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)
        help
-         Support for a OneNAND flash device connected to an OMAP2 CPU
+         Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
          via the GPMC memory controller.
 
 config MTD_ONENAND_OTP
include/asm-arm/arch-omap/pm.h +7 -1
Index: linux-omap-git/include/asm-arm/arch-omap/pm.h
===================================================================
@@ -107,7 +107,8 @@
 #if     !defined(CONFIG_ARCH_OMAP730) && \
        !defined(CONFIG_ARCH_OMAP15XX) && \
        !defined(CONFIG_ARCH_OMAP16XX) && \
-       !defined(CONFIG_ARCH_OMAP24XX)
+       !defined(CONFIG_ARCH_OMAP24XX) && \
+       !defined(CONFIG_ARCH_OMAP34XX)
 #error "Power management for this processor not implemented yet"
 #endif
 
@@ -134,8 +135,13 @@ void clk_deny_idle(struct clk *clk);
 
 extern void omap_pm_idle(void);
 extern void omap_pm_suspend(void);
+#ifdef CONFIG_PM
 extern void omap2_block_sleep(void);
 extern void omap2_allow_sleep(void);
+#else
+static inline void omap2_block_sleep(void) { }
+static inline void omap2_allow_sleep(void) { }
+#endif
 extern void omap730_cpu_suspend(unsigned short, unsigned short);
 extern void omap1510_cpu_suspend(unsigned short, unsigned short);
 extern void omap1610_cpu_suspend(unsigned short, unsigned short);
Acked-by on v1 1/1
#9 lore raw
Quoted 10 lines · ext Sameer

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and redeclaring the omap2_sleep_block(), omap2_allow_sleep() according to CONFIG_PM defination in pm.h according to Felipe Balbi's comments.

Regards,
-Sameer

Quoted 68 lines

---

---
 arch/arm/configs/omap_3430sdp_defconfig |    3 +++
 drivers/mtd/onenand/Kconfig             |    6 +++---
 include/asm-arm/arch-omap/pm.h          |    8 +++++++-
 3 files changed, 13 insertions(+), 4 deletions(-)

Index: linux-omap-git/arch/arm/configs/omap_3430sdp_defconfig
===================================================================

arch/arm/configs/omap_3430sdp_defconfig +3 -0
@@ -461,7 +461,10 @@ CONFIG_MTD_OMAP_NOR=y
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 # CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
 # CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set
 
 #
 # UBI - Unsorted block images

Index: linux-omap-git/drivers/mtd/onenand/Kconfig
===================================================================

drivers/mtd/onenand/Kconfig +3 -3
@@ -28,10 +28,10 @@ config MTD_ONENAND_GENERIC
          Support for OneNAND flash via platform device driver.
 
 config MTD_ONENAND_OMAP2
-       tristate "OneNAND on OMAP2 support"
-       depends on MTD_ONENAND && ARCH_OMAP2
+       tristate "OneNAND on OMAP2/OMAP3 support"
+       depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)
        help
-         Support for a OneNAND flash device connected to an OMAP2 CPU
+         Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
          via the GPMC memory controller.
 
 config MTD_ONENAND_OTP

Index: linux-omap-git/include/asm-arm/arch-omap/pm.h
===================================================================

include/asm-arm/arch-omap/pm.h +7 -1
@@ -107,7 +107,8 @@
 #if     !defined(CONFIG_ARCH_OMAP730) && \
        !defined(CONFIG_ARCH_OMAP15XX) && \
        !defined(CONFIG_ARCH_OMAP16XX) && \
-       !defined(CONFIG_ARCH_OMAP24XX)
+       !defined(CONFIG_ARCH_OMAP24XX) && \
+       !defined(CONFIG_ARCH_OMAP34XX)
 #error "Power management for this processor not implemented yet"
 #endif
 
@@ -134,8 +135,13 @@ void clk_deny_idle(struct clk *clk);
 
 extern void omap_pm_idle(void);
 extern void omap_pm_suspend(void);
+#ifdef CONFIG_PM
 extern void omap2_block_sleep(void);
 extern void omap2_allow_sleep(void);
+#else
+static inline void omap2_block_sleep(void) { }
+static inline void omap2_allow_sleep(void) { }
+#endif
 extern void omap730_cpu_suspend(unsigned short, unsigned short);
 extern void omap1510_cpu_suspend(unsigned short, unsigned short);
 extern void omap1610_cpu_suspend(unsigned short, unsigned short);
Signature · 8 lines
Best Regards,

Felipe Balbi
[email protected]
+55 92 2126-1003

INdT - OSMRC - Manaus
Core Team
#10 lore raw
Quoted 5 lines · Felipe Balbi
Quoted 4 lines · ext Sameer

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3.
The patch enables the onenand in def_config file, enable onenand Kconfig for OMAP3 and redeclaring the omap2_sleep_block(), omap2_allow_sleep() according to CONFIG_PM defination in pm.h according to Felipe Balbi's comments.

Pushing today.

Tony

#11 lore raw

Hi Tony,

Quoted 10 lines

-----Original Message-----
From: Tony Lindgren
Sent: Wednesday, November 28, 2007 3:09 PM

Quoted 5 lines · Felipe Balbi
Quoted 4 lines · ext Sameer

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3. The patch enables the onenand in def_config file, enable

Quoted 7 lines

onenand Kconfig for OMAP3 and redeclaring the omap2_sleep_block(), omap2_allow_sleep() according to CONFIG_PM defination in pm.h according to Felipe Balbi's comments.

Pushing today.

Tony

Seems like this patch is not merged yet..

Regards,
Nishant

#12 lore raw
Quoted 16 lines · Kamat, Nishant

Hi Tony,

Quoted 14 lines

-----Original Message-----
From: Tony Lindgren
Sent: Wednesday, November 28, 2007 3:09 PM

Quoted 5 lines · Felipe Balbi
Quoted 4 lines · ext Sameer

Hi,
Please ignore the previous patch.
The following patch provides the onenand support for OMAP3. The patch enables the onenand in def_config file, enable

onenand Kconfig for OMAP3 and redeclaring the omap2_sleep_block(), omap2_allow_sleep() according to CONFIG_PM defination in pm.h according to Felipe Balbi's comments.

Quoted 5 lines
Quoted 3 lines

Pushing today.

Tony

Seems like this patch is not merged yet..

Sorry, I must have forgotten to do git-am after refreshing it as a quilt patch... Pushed now, can you please check?

Tony

#13 lore raw

Tony,

Quoted 5 lines

-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]

Quoted 2 lines
Quoted 2 lines

Pushing today.

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

Tony

Seems like this patch is not merged yet..

Sorry, I must have forgotten to do git-am after refreshing it as a quilt patch... Pushed now, can you please check?

Tony

Yes, its there now. Thanks!

Regards,
Nishant