Skip to content

Commit a622c64

Browse files
3x380VRoger Quadros
authored andcommitted
memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()
Deprecated gpmc_update_nand_reg() is no longer used, remove. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Roger Quadros <rogerq@ti.com>
1 parent 0d96a4f commit a622c64

File tree

2 files changed

+24
-41
lines changed

2 files changed

+24
-41
lines changed

drivers/memory/omap-gpmc.c

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,33 @@ int gpmc_configure(int cmd, int wval)
10751075
}
10761076
EXPORT_SYMBOL(gpmc_configure);
10771077

1078-
void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
1078+
static bool gpmc_nand_writebuffer_empty(void)
1079+
{
1080+
if (gpmc_read_reg(GPMC_STATUS) & GPMC_STATUS_EMPTYWRITEBUFFERSTATUS)
1081+
return true;
1082+
1083+
return false;
1084+
}
1085+
1086+
static struct gpmc_nand_ops nand_ops = {
1087+
.nand_writebuffer_empty = gpmc_nand_writebuffer_empty,
1088+
};
1089+
1090+
/**
1091+
* gpmc_omap_get_nand_ops - Get the GPMC NAND interface
1092+
* @regs: the GPMC NAND register map exclusive for NAND use.
1093+
* @cs: GPMC chip select number on which the NAND sits. The
1094+
* register map returned will be specific to this chip select.
1095+
*
1096+
* Returns NULL on error e.g. invalid cs.
1097+
*/
1098+
struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *reg, int cs)
10791099
{
10801100
int i;
10811101

1102+
if (cs >= gpmc_cs_num)
1103+
return NULL;
1104+
10821105
reg->gpmc_nand_command = gpmc_base + GPMC_CS0_OFFSET +
10831106
GPMC_CS_NAND_COMMAND + GPMC_CS_SIZE * cs;
10841107
reg->gpmc_nand_address = gpmc_base + GPMC_CS0_OFFSET +
@@ -1110,34 +1133,6 @@ void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
11101133
reg->gpmc_bch_result6[i] = gpmc_base + GPMC_ECC_BCH_RESULT_6 +
11111134
i * GPMC_BCH_SIZE;
11121135
}
1113-
}
1114-
1115-
static bool gpmc_nand_writebuffer_empty(void)
1116-
{
1117-
if (gpmc_read_reg(GPMC_STATUS) & GPMC_STATUS_EMPTYWRITEBUFFERSTATUS)
1118-
return true;
1119-
1120-
return false;
1121-
}
1122-
1123-
static struct gpmc_nand_ops nand_ops = {
1124-
.nand_writebuffer_empty = gpmc_nand_writebuffer_empty,
1125-
};
1126-
1127-
/**
1128-
* gpmc_omap_get_nand_ops - Get the GPMC NAND interface
1129-
* @regs: the GPMC NAND register map exclusive for NAND use.
1130-
* @cs: GPMC chip select number on which the NAND sits. The
1131-
* register map returned will be specific to this chip select.
1132-
*
1133-
* Returns NULL on error e.g. invalid cs.
1134-
*/
1135-
struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *reg, int cs)
1136-
{
1137-
if (cs >= gpmc_cs_num)
1138-
return NULL;
1139-
1140-
gpmc_update_nand_reg(reg, cs);
11411136

11421137
return &nand_ops;
11431138
}

include/linux/omap-gpmc.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,6 @@ static inline struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs
3636
}
3737
#endif /* CONFIG_OMAP_GPMC */
3838

39-
/*--------------------------------*/
40-
41-
/* deprecated APIs */
42-
#if IS_ENABLED(CONFIG_OMAP_GPMC)
43-
void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs);
44-
#else
45-
static inline void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
46-
{
47-
}
48-
#endif /* CONFIG_OMAP_GPMC */
49-
/*--------------------------------*/
50-
5139
extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
5240
struct gpmc_settings *gpmc_s,
5341
struct gpmc_device_timings *dev_t);

0 commit comments

Comments
 (0)