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

memory: omap-gpmc: deadcode a pair of functions

gpmc_get_client_irq() last use was removed by
commit ac28e47ccc3f ("ARM: OMAP2+: Remove legacy gpmc-nand.c")

gpmc_ticks_to_ns() last use was removed by
commit 2514830b8b8c ("ARM: OMAP2+: Remove gpmc-onenand")

Remove them.

gpmc_clk_ticks_to_ns() is now only used in some DEBUG
code; move inside the ifdef to avoid unused warnings.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20241211214227.107980-1-linux@treblig.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Dr. David Alan Gilbert and committed by
Krzysztof Kozlowski
5119e6b4 40384c84

+7 -30
+7 -26
drivers/memory/omap-gpmc.c
··· 358 358 return (time_ps + tick_ps - 1) / tick_ps; 359 359 } 360 360 361 - static unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs, 362 - enum gpmc_clk_domain cd) 363 - { 364 - return ticks * gpmc_get_clk_period(cs, cd) / 1000; 365 - } 366 - 367 - unsigned int gpmc_ticks_to_ns(unsigned int ticks) 368 - { 369 - return gpmc_clk_ticks_to_ns(ticks, /* any CS */ 0, GPMC_CD_FCLK); 370 - } 371 - 372 361 static unsigned int gpmc_ticks_to_ps(unsigned int ticks) 373 362 { 374 363 return ticks * gpmc_get_fclk_period(); ··· 404 415 } 405 416 406 417 #ifdef CONFIG_OMAP_GPMC_DEBUG 418 + 419 + static unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs, 420 + enum gpmc_clk_domain cd) 421 + { 422 + return ticks * gpmc_get_clk_period(cs, cd) / 1000; 423 + } 424 + 407 425 /** 408 426 * get_gpmc_timing_reg - read a timing parameter and print DTS settings for it. 409 427 * @cs: Chip Select Region ··· 1290 1294 return gpmc_cs_set_timings(cs, &gpmc_t, &gpmc_s); 1291 1295 } 1292 1296 EXPORT_SYMBOL_GPL(gpmc_omap_onenand_set_timings); 1293 - 1294 - int gpmc_get_client_irq(unsigned int irq_config) 1295 - { 1296 - if (!gpmc_irq_domain) { 1297 - pr_warn("%s called before GPMC IRQ domain available\n", 1298 - __func__); 1299 - return 0; 1300 - } 1301 - 1302 - /* we restrict this to NAND IRQs only */ 1303 - if (irq_config >= GPMC_NR_NAND_IRQS) 1304 - return 0; 1305 - 1306 - return irq_create_mapping(gpmc_irq_domain, irq_config); 1307 - } 1308 1297 1309 1298 static int gpmc_irq_endis(unsigned long hwirq, bool endis) 1310 1299 {
-4
include/linux/omap-gpmc.h
··· 66 66 67 67 struct device_node; 68 68 69 - extern int gpmc_get_client_irq(unsigned irq_config); 70 - 71 - extern unsigned int gpmc_ticks_to_ns(unsigned int ticks); 72 - 73 69 extern void gpmc_cs_write_reg(int cs, int idx, u32 val); 74 70 extern int gpmc_calc_divider(unsigned int sync_clk); 75 71 extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t,