All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] OneNAND OMAP patches (resent)
@ 2010-12-13 12:20 Adrian Hunter
  2010-12-13 12:20 ` [PATCH 1/7] mtd: OneNAND: OMAP2/3: add support for command line partitioning Adrian Hunter
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Adrian Hunter @ 2010-12-13 12:20 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Tony Lindgren, Kyungmin Park, Artem Bityutskiy,
	linux-mtd Mailing List, Adrian Hunter

Hi

(resent with corrected email for Artem)

Here are some OneNAND and related OMAP patches.

Adrian Hunter (7):
      mtd: OneNAND: OMAP2/3: add support for command line partitioning
      mtd: OneNAND: add enable / disable methods to onenand_chip
      mtd: OneNAND: OMAP2/3: prevent regulator sleeping while OneNAND is in use
      OMAP2/3: GPMC: put sync_clk value in picoseconds instead of nanoseconds
      OMAP2/3: OneNAND: add 104MHz support
      OMAP2/3: OneNAND: add platform data callback for PM constraints
      mtd: OneNAND: lighten scary initial bad block messages

 arch/arm/mach-omap2/gpmc-nand.c           |    2 +-
 arch/arm/mach-omap2/gpmc-onenand.c        |   19 +++++--
 arch/arm/mach-omap2/gpmc.c                |   12 ++++-
 arch/arm/mach-omap2/usb-tusb6010.c        |    4 +-
 arch/arm/plat-omap/include/plat/gpmc.h    |    9 ++--
 arch/arm/plat-omap/include/plat/onenand.h |    9 +++
 drivers/mtd/onenand/omap2.c               |   85 +++++++++++++++++++++++------
 drivers/mtd/onenand/onenand_base.c        |   26 ++++++----
 drivers/mtd/onenand/onenand_bbt.c         |    4 +-
 include/linux/mtd/onenand.h               |    2 +
 10 files changed, 131 insertions(+), 41 deletions(-) 
 
Regards
Adrian

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [PATCH 0/7] OneNAND OMAP patches
@ 2010-12-13 12:11 Adrian Hunter
  2010-12-13 12:12 ` [PATCH 2/7] mtd: OneNAND: add enable / disable methods to onenand_chip Adrian Hunter
  0 siblings, 1 reply; 27+ messages in thread
From: Adrian Hunter @ 2010-12-13 12:11 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Tony Lindgren, Kyungmin Park, linux-mtd Mailing List,
	Artem.Bityutskiy.dedekind1, Adrian Hunter

Hi

Here are some OneNAND and related OMAP patches.

Adrian Hunter (7):
      mtd: OneNAND: OMAP2/3: add support for command line partitioning
      mtd: OneNAND: add enable / disable methods to onenand_chip
      mtd: OneNAND: OMAP2/3: prevent regulator sleeping while OneNAND is in use
      OMAP2/3: GPMC: put sync_clk value in picoseconds instead of nanoseconds
      OMAP2/3: OneNAND: add 104MHz support
      OMAP2/3: OneNAND: add platform data callback for PM constraints
      mtd: OneNAND: lighten scary initial bad block messages

 arch/arm/mach-omap2/gpmc-nand.c           |    2 +-
 arch/arm/mach-omap2/gpmc-onenand.c        |   19 +++++--
 arch/arm/mach-omap2/gpmc.c                |   12 ++++-
 arch/arm/mach-omap2/usb-tusb6010.c        |    4 +-
 arch/arm/plat-omap/include/plat/gpmc.h    |    9 ++--
 arch/arm/plat-omap/include/plat/onenand.h |    9 +++
 drivers/mtd/onenand/omap2.c               |   85 +++++++++++++++++++++++------
 drivers/mtd/onenand/onenand_base.c        |   26 ++++++----
 drivers/mtd/onenand/onenand_bbt.c         |    4 +-
 include/linux/mtd/onenand.h               |    2 +
 10 files changed, 131 insertions(+), 41 deletions(-) 
 
Regards
Adrian

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [PATCH 2/7] mtd: OneNAND: add enable / disable methods to onenand_chip
@ 2010-02-19 14:39 Adrian Hunter
  0 siblings, 0 replies; 27+ messages in thread
From: Adrian Hunter @ 2010-02-19 14:39 UTC (permalink / raw)
  To: linux-mtd

Add enable / disable methods called from get_device() / release_device().
These can be used, for example, to allow the driver to prevent the voltage
regulator from being put to sleep while OneNAND is in use.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
---
 drivers/mtd/onenand/onenand_base.c |    4 ++++
 include/linux/mtd/onenand.h        |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index c38bf9c..bde274f 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -948,6 +948,8 @@ static int onenand_get_device(struct mtd_info *mtd, int new_state)
 		if (this->state == FL_READY) {
 			this->state = new_state;
 			spin_unlock(&this->chip_lock);
+			if (this->enable)
+				this->enable(mtd);
 			break;
 		}
 		if (new_state == FL_PM_SUSPENDED) {
@@ -974,6 +976,8 @@ static void onenand_release_device(struct mtd_info *mtd)
 {
 	struct onenand_chip *this = mtd->priv;
 
+	if (this->state != FL_PM_SUSPENDED && this->disable)
+		this->disable(mtd);
 	/* Release the chip */
 	spin_lock(&this->chip_lock);
 	this->state = FL_READY;
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 6da3fe3..ae418e4 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -118,6 +118,8 @@ struct onenand_chip {
 	int (*chip_probe)(struct mtd_info *mtd);
 	int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
 	int (*scan_bbt)(struct mtd_info *mtd);
+	int (*enable)(struct mtd_info *mtd);
+	int (*disable)(struct mtd_info *mtd);
 
 	struct completion	complete;
 	int			irq;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [PATCH 2/7] mtd: OneNAND: add enable / disable methods to onenand_chip
@ 2010-02-19 14:39 Adrian Hunter
  0 siblings, 0 replies; 27+ messages in thread
From: Adrian Hunter @ 2010-02-19 14:39 UTC (permalink / raw)
  To: linux-mtd

Add enable / disable methods called from get_device() / release_device().
These can be used, for example, to allow the driver to prevent the voltage
regulator from being put to sleep while OneNAND is in use.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
---
 drivers/mtd/onenand/onenand_base.c |    4 ++++
 include/linux/mtd/onenand.h        |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index c38bf9c..bde274f 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -948,6 +948,8 @@ static int onenand_get_device(struct mtd_info *mtd, int new_state)
 		if (this->state == FL_READY) {
 			this->state = new_state;
 			spin_unlock(&this->chip_lock);
+			if (this->enable)
+				this->enable(mtd);
 			break;
 		}
 		if (new_state == FL_PM_SUSPENDED) {
@@ -974,6 +976,8 @@ static void onenand_release_device(struct mtd_info *mtd)
 {
 	struct onenand_chip *this = mtd->priv;
 
+	if (this->state != FL_PM_SUSPENDED && this->disable)
+		this->disable(mtd);
 	/* Release the chip */
 	spin_lock(&this->chip_lock);
 	this->state = FL_READY;
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 6da3fe3..ae418e4 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -118,6 +118,8 @@ struct onenand_chip {
 	int (*chip_probe)(struct mtd_info *mtd);
 	int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
 	int (*scan_bbt)(struct mtd_info *mtd);
+	int (*enable)(struct mtd_info *mtd);
+	int (*disable)(struct mtd_info *mtd);
 
 	struct completion	complete;
 	int			irq;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-01-05 12:45 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-13 12:20 [PATCH 0/7] OneNAND OMAP patches (resent) Adrian Hunter
2010-12-13 12:20 ` [PATCH 1/7] mtd: OneNAND: OMAP2/3: add support for command line partitioning Adrian Hunter
2010-12-15 14:04   ` Artem Bityutskiy
2011-01-05 11:02     ` Adrian Hunter
2011-01-05 12:12       ` Artem Bityutskiy
2011-01-05 12:24         ` Adrian Hunter
2011-01-05 12:45           ` Artem Bityutskiy
2010-12-15 14:06   ` Artem Bityutskiy
2010-12-13 12:20 ` [PATCH 2/7] mtd: OneNAND: add enable / disable methods to onenand_chip Adrian Hunter
2010-12-14  0:17   ` Kyungmin Park
2010-12-15  7:31     ` Adrian Hunter
2010-12-15  9:33     ` Adrian Hunter
2010-12-13 12:21 ` [PATCH 3/7] mtd: OneNAND: OMAP2/3: prevent regulator sleeping while OneNAND is in use Adrian Hunter
2010-12-13 12:21 ` [PATCH 4/7] OMAP2/3: GPMC: put sync_clk value in picoseconds instead of nanoseconds Adrian Hunter
2010-12-15  1:29   ` Tony Lindgren
2010-12-15  6:54     ` Adrian Hunter
2010-12-15  6:54       ` Adrian Hunter
2010-12-15  6:54       ` Adrian Hunter
2010-12-21  1:23   ` Tony Lindgren
2010-12-13 12:21 ` [PATCH 5/7] OMAP2/3: OneNAND: add 104MHz support Adrian Hunter
2010-12-13 12:21 ` [PATCH 6/7] OMAP2/3: OneNAND: add platform data callback for PM constraints Adrian Hunter
2010-12-13 12:21 ` [PATCH 7/7] mtd: OneNAND: lighten scary initial bad block messages Adrian Hunter
2010-12-14  0:21   ` Kyungmin Park
2010-12-15 13:58   ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2010-12-13 12:11 [PATCH 0/7] OneNAND OMAP patches Adrian Hunter
2010-12-13 12:12 ` [PATCH 2/7] mtd: OneNAND: add enable / disable methods to onenand_chip Adrian Hunter
2010-02-19 14:39 Adrian Hunter
2010-02-19 14:39 Adrian Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.