diff options
author | Arseny Solokha <asolokha@kb.kras.ru> | 2015-02-24 04:05:06 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-03-16 03:50:18 -0400 |
commit | 5e86bfde9cd93f272844c3ff6ac5f93d3666b3e7 (patch) | |
tree | 9368a79186a416dcc59deddaa31227498b4d6c9f /arch | |
parent | f98e7f2fe9d7ac5851cf8cc9933993a2b74566c1 (diff) |
powerpc/mpic: remove unused functions
Drop unused fsl_mpic_primary_get_version(), mpic_set_clk_ratio(),
mpic_set_serial_int().
+ fsl_mpic_primary_get_version() is just a safe wrapper around
fsl_mpic_get_version() for SMP configurations. While the latter is
called explicitly for handling PIC initialization and setting up error
interrupt vector depending on PIC hardware version, the former isn't
used for anything.
+ As for mpic_set_clk_ratio() and mpic_set_serial_int(), they both are
almost nine years old[1] but still have no chance to be called even from
out-of-tree modules because they both are __init and of course aren't
exported.
[1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2006-June/023867.html
Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>
Cc: hongtao.jia@freescale.com
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/mpic.h | 20 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 35 |
2 files changed, 0 insertions, 55 deletions
diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h index 754f93d208fa..6ce63a7662f8 100644 --- a/arch/powerpc/include/asm/mpic.h +++ b/arch/powerpc/include/asm/mpic.h | |||
@@ -34,10 +34,6 @@ | |||
34 | #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff | 34 | #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff |
35 | #define MPIC_GREG_GCONF_MCK 0x08000000 | 35 | #define MPIC_GREG_GCONF_MCK 0x08000000 |
36 | #define MPIC_GREG_GLOBAL_CONF_1 0x00030 | 36 | #define MPIC_GREG_GLOBAL_CONF_1 0x00030 |
37 | #define MPIC_GREG_GLOBAL_CONF_1_SIE 0x08000000 | ||
38 | #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x70000000 | ||
39 | #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r) \ | ||
40 | (((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK) | ||
41 | #define MPIC_GREG_VENDOR_0 0x00040 | 37 | #define MPIC_GREG_VENDOR_0 0x00040 |
42 | #define MPIC_GREG_VENDOR_1 0x00050 | 38 | #define MPIC_GREG_VENDOR_1 0x00050 |
43 | #define MPIC_GREG_VENDOR_2 0x00060 | 39 | #define MPIC_GREG_VENDOR_2 0x00060 |
@@ -395,16 +391,6 @@ extern struct bus_type mpic_subsys; | |||
395 | #define MPIC_REGSET_STANDARD MPIC_REGSET(0) /* Original MPIC */ | 391 | #define MPIC_REGSET_STANDARD MPIC_REGSET(0) /* Original MPIC */ |
396 | #define MPIC_REGSET_TSI108 MPIC_REGSET(1) /* Tsi108/109 PIC */ | 392 | #define MPIC_REGSET_TSI108 MPIC_REGSET(1) /* Tsi108/109 PIC */ |
397 | 393 | ||
398 | /* Get the version of primary MPIC */ | ||
399 | #ifdef CONFIG_MPIC | ||
400 | extern u32 fsl_mpic_primary_get_version(void); | ||
401 | #else | ||
402 | static inline u32 fsl_mpic_primary_get_version(void) | ||
403 | { | ||
404 | return 0; | ||
405 | } | ||
406 | #endif | ||
407 | |||
408 | /* Allocate the controller structure and setup the linux irq descs | 394 | /* Allocate the controller structure and setup the linux irq descs |
409 | * for the range if interrupts passed in. No HW initialization is | 395 | * for the range if interrupts passed in. No HW initialization is |
410 | * actually performed. | 396 | * actually performed. |
@@ -496,11 +482,5 @@ extern unsigned int mpic_get_coreint_irq(void); | |||
496 | /* Fetch Machine Check interrupt from primary mpic */ | 482 | /* Fetch Machine Check interrupt from primary mpic */ |
497 | extern unsigned int mpic_get_mcirq(void); | 483 | extern unsigned int mpic_get_mcirq(void); |
498 | 484 | ||
499 | /* Set the EPIC clock ratio */ | ||
500 | void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio); | ||
501 | |||
502 | /* Enable/Disable EPIC serial interrupt mode */ | ||
503 | void mpic_set_serial_int(struct mpic *mpic, int enable); | ||
504 | |||
505 | #endif /* __KERNEL__ */ | 485 | #endif /* __KERNEL__ */ |
506 | #endif /* _ASM_POWERPC_MPIC_H */ | 486 | #endif /* _ASM_POWERPC_MPIC_H */ |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index bbfbbf2025fd..f72b592d60cc 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -1219,16 +1219,6 @@ static u32 fsl_mpic_get_version(struct mpic *mpic) | |||
1219 | * Exported functions | 1219 | * Exported functions |
1220 | */ | 1220 | */ |
1221 | 1221 | ||
1222 | u32 fsl_mpic_primary_get_version(void) | ||
1223 | { | ||
1224 | struct mpic *mpic = mpic_primary; | ||
1225 | |||
1226 | if (mpic) | ||
1227 | return fsl_mpic_get_version(mpic); | ||
1228 | |||
1229 | return 0; | ||
1230 | } | ||
1231 | |||
1232 | struct mpic * __init mpic_alloc(struct device_node *node, | 1222 | struct mpic * __init mpic_alloc(struct device_node *node, |
1233 | phys_addr_t phys_addr, | 1223 | phys_addr_t phys_addr, |
1234 | unsigned int flags, | 1224 | unsigned int flags, |
@@ -1676,31 +1666,6 @@ void __init mpic_init(struct mpic *mpic) | |||
1676 | mpic_err_int_init(mpic, MPIC_FSL_ERR_INT); | 1666 | mpic_err_int_init(mpic, MPIC_FSL_ERR_INT); |
1677 | } | 1667 | } |
1678 | 1668 | ||
1679 | void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio) | ||
1680 | { | ||
1681 | u32 v; | ||
1682 | |||
1683 | v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); | ||
1684 | v &= ~MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK; | ||
1685 | v |= MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(clock_ratio); | ||
1686 | mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); | ||
1687 | } | ||
1688 | |||
1689 | void __init mpic_set_serial_int(struct mpic *mpic, int enable) | ||
1690 | { | ||
1691 | unsigned long flags; | ||
1692 | u32 v; | ||
1693 | |||
1694 | raw_spin_lock_irqsave(&mpic_lock, flags); | ||
1695 | v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); | ||
1696 | if (enable) | ||
1697 | v |= MPIC_GREG_GLOBAL_CONF_1_SIE; | ||
1698 | else | ||
1699 | v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE; | ||
1700 | mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); | ||
1701 | raw_spin_unlock_irqrestore(&mpic_lock, flags); | ||
1702 | } | ||
1703 | |||
1704 | void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | 1669 | void mpic_irq_set_priority(unsigned int irq, unsigned int pri) |
1705 | { | 1670 | { |
1706 | struct mpic *mpic = mpic_find(irq); | 1671 | struct mpic *mpic = mpic_find(irq); |