public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] OneNAND: Fix compiler warnings
@ 2008-11-11  9:28 Stefan Roese
  2008-11-11 17:53 ` Scott Wood
  2008-12-08 20:44 ` Wolfgang Denk
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Roese @ 2008-11-11  9:28 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Stefan Roese <sr@denx.de>
---
This patch has to be applied on top of the patch submitted by Kyungmin Park
on 2008-11-04:
[PATCH] [OneNAND] Sync with 2.6.27

It replaces my patch "[PATCH] OneNAND: Fix compiler warnings and add weak
attribute to memcpy_16()". The weak method is not needed. Thanks to Scott
for pointing this out.


 drivers/mtd/onenand/onenand_base.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 66214e8..8d004d3 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -409,6 +409,30 @@ static int onenand_write_bufferram(struct mtd_info *mtd, loff_t addr, int area,
 }
 
 /**
+ * onenand_get_2x_blockpage - [GENERIC] Get blockpage at 2x program mode
+ * @param mtd		MTD data structure
+ * @param addr		address to check
+ * @return		blockpage address
+ *
+ * Get blockpage address at 2x program mode
+ */
+static int onenand_get_2x_blockpage(struct mtd_info *mtd, loff_t addr)
+{
+	struct onenand_chip *this = mtd->priv;
+	int blockpage, block, page;
+
+	/* Calculate the even block number */
+	block = (int) (addr >> this->erase_shift) & ~1;
+	/* Is it the odd plane? */
+	if (addr & this->writesize)
+		block++;
+	page = (int) (addr >> (this->page_shift + 1)) & this->page_mask;
+	blockpage = (block << 7) | page;
+
+	return blockpage;
+}
+
+/**
  * onenand_check_bufferram - [GENERIC] Check BufferRAM information
  * @param mtd		MTD data structure
  * @param addr		address to check
@@ -1666,6 +1690,7 @@ static int onenand_do_lock_cmd(struct mtd_info *mtd, loff_t ofs, size_t len, int
 	return 0;
 }
 
+#ifdef ONENAND_LINUX
 /**
  * onenand_lock - [MTD Interface] Lock block(s)
  * @param mtd           MTD device structure
@@ -1701,6 +1726,7 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
 	onenand_release_device(mtd);
 	return ret;
 }
+#endif
 
 /**
  * onenand_check_lock_status - [OneNAND Interface] Check lock status
-- 
1.6.0.4

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

end of thread, other threads:[~2008-12-10  3:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11  9:28 [U-Boot] [PATCH] OneNAND: Fix compiler warnings Stefan Roese
2008-11-11 17:53 ` Scott Wood
2008-12-08 20:44 ` Wolfgang Denk
2008-12-08 23:17   ` Kyungmin Park
2008-12-09  6:27     ` Stefan Roese
2008-12-09  9:01       ` Amit Kumar Sharma
2008-12-09  9:15         ` Stefan Roese
2008-12-09 11:08           ` Amit Kumar Sharma
2008-12-09 17:34       ` Scott Wood
2008-12-09 20:25         ` Wolfgang Denk
2008-12-10  3:56           ` Kyungmin Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox