Commit 512d73d1 authored by Roger Quadros's avatar Roger Quadros

memory: omap-gpmc: Add GPMC-NAND ops to get writebufferempty status

This is needed by OMAP NAND driver to poll the empty status
of the writebuffer.
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
parent f47fcad6
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
#define GPMC_CONFIG_LIMITEDADDRESS BIT(1) #define GPMC_CONFIG_LIMITEDADDRESS BIT(1)
#define GPMC_STATUS_EMPTYWRITEBUFFERSTATUS BIT(0)
#define GPMC_CONFIG2_CSEXTRADELAY BIT(7) #define GPMC_CONFIG2_CSEXTRADELAY BIT(7)
#define GPMC_CONFIG3_ADVEXTRADELAY BIT(7) #define GPMC_CONFIG3_ADVEXTRADELAY BIT(7)
#define GPMC_CONFIG4_OEEXTRADELAY BIT(7) #define GPMC_CONFIG4_OEEXTRADELAY BIT(7)
...@@ -1118,7 +1120,17 @@ void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs) ...@@ -1118,7 +1120,17 @@ void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
} }
} }
static struct gpmc_nand_ops nand_ops; static bool gpmc_nand_writebuffer_empty(void)
{
if (gpmc_read_reg(GPMC_STATUS) & GPMC_STATUS_EMPTYWRITEBUFFERSTATUS)
return true;
return false;
}
static struct gpmc_nand_ops nand_ops = {
.nand_writebuffer_empty = gpmc_nand_writebuffer_empty,
};
/** /**
* gpmc_omap_get_nand_ops - Get the GPMC NAND interface * gpmc_omap_get_nand_ops - Get the GPMC NAND interface
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment