[PATCH 04/13] imx nand: remove unnecessary register write
Sascha Hauer
s.hauer at pengutronix.de
Wed Nov 10 09:53:50 EST 2010
NFC_SP_EN is cleared in probe and never set again, so we do not
need to clear it in other functions again.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mtd/nand/nand_imx.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index b49b7db..4b74974 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -321,16 +321,10 @@ static void send_page(struct imx_nand_host *host,
static void send_read_id(struct imx_nand_host *host)
{
struct nand_chip *this = &host->nand;
- u16 tmp;
/* NANDFC buffer 0 is used for device ID output */
writew(0x0, host->regs + NFC_BUF_ADDR);
- /* Read ID into main buffer */
- tmp = readw(host->regs + NFC_CONFIG1);
- tmp &= ~NFC_SP_EN;
- writew(tmp, host->regs + NFC_CONFIG1);
-
writew(NFC_ID, host->regs + NFC_CONFIG2);
/* Wait for operation to complete */
@@ -362,7 +356,7 @@ static u16 get_dev_status(struct imx_nand_host *host)
{
void *main_buf = host->main_area0;
u32 store;
- u16 ret, tmp;
+ u16 ret;
writew(0x0, host->regs + NFC_BUF_ADDR);
@@ -373,11 +367,6 @@ static u16 get_dev_status(struct imx_nand_host *host)
*/
store = readl(main_buf);
- /* Read status into main buffer */
- tmp = readw(host->regs + NFC_CONFIG1);
- tmp &= ~NFC_SP_EN;
- writew(tmp, host->regs + NFC_CONFIG1);
-
writew(NFC_STATUS, host->regs + NFC_CONFIG2);
/* Wait for operation to complete */
--
1.7.2.3
More information about the barebox
mailing list