Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'gpmc-omap-for-v4.15-pt2' of https://github.com/rogerq/linux into next/drivers

Pull "OMAP-GPMC: driver updates for v4.15, part 2" from Roger Quadros:

* get rid of unused function gpmc_update_nand_reg().

* tag 'gpmc-omap-for-v4.15-pt2' of https://github.com/rogerq/linux:
memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()

+24 -41
+24 -29
drivers/memory/omap-gpmc.c
··· 1075 1075 } 1076 1076 EXPORT_SYMBOL(gpmc_configure); 1077 1077 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) 1079 1099 { 1080 1100 int i; 1101 + 1102 + if (cs >= gpmc_cs_num) 1103 + return NULL; 1081 1104 1082 1105 reg->gpmc_nand_command = gpmc_base + GPMC_CS0_OFFSET + 1083 1106 GPMC_CS_NAND_COMMAND + GPMC_CS_SIZE * cs; ··· 1133 1110 reg->gpmc_bch_result6[i] = gpmc_base + GPMC_ECC_BCH_RESULT_6 + 1134 1111 i * GPMC_BCH_SIZE; 1135 1112 } 1136 - } 1137 - 1138 - static bool gpmc_nand_writebuffer_empty(void) 1139 - { 1140 - if (gpmc_read_reg(GPMC_STATUS) & GPMC_STATUS_EMPTYWRITEBUFFERSTATUS) 1141 - return true; 1142 - 1143 - return false; 1144 - } 1145 - 1146 - static struct gpmc_nand_ops nand_ops = { 1147 - .nand_writebuffer_empty = gpmc_nand_writebuffer_empty, 1148 - }; 1149 - 1150 - /** 1151 - * gpmc_omap_get_nand_ops - Get the GPMC NAND interface 1152 - * @regs: the GPMC NAND register map exclusive for NAND use. 1153 - * @cs: GPMC chip select number on which the NAND sits. The 1154 - * register map returned will be specific to this chip select. 1155 - * 1156 - * Returns NULL on error e.g. invalid cs. 1157 - */ 1158 - struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *reg, int cs) 1159 - { 1160 - if (cs >= gpmc_cs_num) 1161 - return NULL; 1162 - 1163 - gpmc_update_nand_reg(reg, cs); 1164 1113 1165 1114 return &nand_ops; 1166 1115 }
-12
include/linux/omap-gpmc.h
··· 36 36 } 37 37 #endif /* CONFIG_OMAP_GPMC */ 38 38 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 - 51 39 extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t, 52 40 struct gpmc_settings *gpmc_s, 53 41 struct gpmc_device_timings *dev_t);