summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@kernel.org>2022-02-02 13:21:33 +0200
committerPraneeth Bajjuri <praneeth@ti.com>2022-02-02 16:22:01 -0600
commita12fe3ed51ccd8b9a8e959c8182c79b52e091bf5 (patch)
treebc9524c188f19606c3fecdcbe7f7b7761e018de9 /drivers/mtd
parent80db321c47624de96df59acc9d5102f97f935014 (diff)
mtd: rawnand: omap_gpmc: Get rid of GPMC_MAX_CS
GPMC_CS_NUM is the same thing so use that instead. This will allow us to get rid of GPMC_MAX_CS from mem.h Signed-off-by: Roger Quadros <rogerq@kernel.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/omap_gpmc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
index fd89451198..4942613776 100644
--- a/drivers/mtd/nand/raw/omap_gpmc.c
+++ b/drivers/mtd/nand/raw/omap_gpmc.c
@@ -8,7 +8,6 @@
#include <log.h>
#include <asm/io.h>
#include <linux/errno.h>
-#include <asm/arch/mem.h>
#include <linux/mtd/omap_gpmc.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/bch.h>
@@ -49,7 +48,7 @@ struct omap_nand_info {
};
/* We are wasting a bit of memory but al least we are safe */
-static struct omap_nand_info omap_nand_info[GPMC_MAX_CS];
+static struct omap_nand_info omap_nand_info[GPMC_CS_NUM];
/*
* omap_nand_hwcontrol - Set the address pointers corretly for the
@@ -972,7 +971,7 @@ int board_nand_init(struct nand_chip *nand)
* TBD: need to make this logic generic to handle multiple CS NAND
* devices.
*/
- while (cs < GPMC_MAX_CS) {
+ while (cs < GPMC_CS_NUM) {
/* Check if NAND type is set */
if ((readl(&gpmc_cfg->cs[cs].config1) & 0xC00) == 0x800) {
/* Found it!! */
@@ -980,7 +979,7 @@ int board_nand_init(struct nand_chip *nand)
}
cs++;
}
- if (cs >= GPMC_MAX_CS) {
+ if (cs >= GPMC_CS_NUM) {
printf("nand: error: Unable to find NAND settings in "
"GPMC Configuration - quitting\n");
return -ENODEV;