Skip to content

Commit 512d73d

Browse files
author
Roger Quadros
committed
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: Roger Quadros <[email protected]> Acked-by: Tony Lindgren <[email protected]>
1 parent f47fcad commit 512d73d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/memory/omap-gpmc.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181

8282
#define GPMC_CONFIG_LIMITEDADDRESS BIT(1)
8383

84+
#define GPMC_STATUS_EMPTYWRITEBUFFERSTATUS BIT(0)
85+
8486
#define GPMC_CONFIG2_CSEXTRADELAY BIT(7)
8587
#define GPMC_CONFIG3_ADVEXTRADELAY BIT(7)
8688
#define GPMC_CONFIG4_OEEXTRADELAY BIT(7)
@@ -1118,7 +1120,17 @@ void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
11181120
}
11191121
}
11201122

1121-
static struct gpmc_nand_ops nand_ops;
1123+
static bool gpmc_nand_writebuffer_empty(void)
1124+
{
1125+
if (gpmc_read_reg(GPMC_STATUS) & GPMC_STATUS_EMPTYWRITEBUFFERSTATUS)
1126+
return true;
1127+
1128+
return false;
1129+
}
1130+
1131+
static struct gpmc_nand_ops nand_ops = {
1132+
.nand_writebuffer_empty = gpmc_nand_writebuffer_empty,
1133+
};
11221134

11231135
/**
11241136
* gpmc_omap_get_nand_ops - Get the GPMC NAND interface

0 commit comments

Comments
 (0)