summaryrefslogtreecommitdiff
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-11-11 10:28:53 +0100
committerScott Wood <scottwood@freescale.com>2009-01-23 10:32:45 -0600
commit4fca3310d611cc0f51d7295ef3557afbdbd91dc3 (patch)
tree5ae43c68cb4dec3bcd7da7d70104aa86d1b487c6 /drivers/mtd/onenand
parent1ac5744e33ee0aa6d6ddab3b99f9e70953156e69 (diff)
OneNAND: Fix compiler warnings
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/onenand_base.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 66214e86d3c..8d004d383b6 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