Skip to content

Commit

Permalink
memory: omap-gpmc: Add GPMC-NAND ops to get writebufferempty status
Browse files Browse the repository at this point in the history
This is needed by OMAP NAND driver to poll the empty status
of the writebuffer.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Roger Quadros committed Apr 15, 2016
1 parent f47fcad commit 512d73d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/memory/omap-gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@

#define GPMC_CONFIG_LIMITEDADDRESS BIT(1)

#define GPMC_STATUS_EMPTYWRITEBUFFERSTATUS BIT(0)

#define GPMC_CONFIG2_CSEXTRADELAY BIT(7)
#define GPMC_CONFIG3_ADVEXTRADELAY BIT(7)
#define GPMC_CONFIG4_OEEXTRADELAY BIT(7)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 512d73d

Please sign in to comment.