linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arseny Solokha <asolokha@kb.kras.ru>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: hongtao.jia@freescale.com, linux-kernel@vger.kernel.org,
	Paul Mackerras <paulus@samba.org>,
	Scott Wood <scottwood@freescale.com>,
	Arseny Solokha <asolokha@kb.kras.ru>,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 4/4] powerpc/mpic: remove unused functions
Date: Tue, 24 Feb 2015 16:05:06 +0700	[thread overview]
Message-ID: <1424768706-23150-5-git-send-email-asolokha@kb.kras.ru> (raw)
In-Reply-To: <1424768706-23150-1-git-send-email-asolokha@kb.kras.ru>

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
---
 arch/powerpc/include/asm/mpic.h | 20 --------------------
 arch/powerpc/sysdev/mpic.c      | 35 -----------------------------------
 2 files changed, 55 deletions(-)

diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h
index 754f93d..6ce63a7 100644
--- a/arch/powerpc/include/asm/mpic.h
+++ b/arch/powerpc/include/asm/mpic.h
@@ -34,10 +34,6 @@
 #define		MPIC_GREG_GCONF_BASE_MASK		0x000fffff
 #define		MPIC_GREG_GCONF_MCK			0x08000000
 #define MPIC_GREG_GLOBAL_CONF_1		0x00030
-#define		MPIC_GREG_GLOBAL_CONF_1_SIE		0x08000000
-#define		MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK	0x70000000
-#define		MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r)	\
-			(((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK)
 #define MPIC_GREG_VENDOR_0		0x00040
 #define MPIC_GREG_VENDOR_1		0x00050
 #define MPIC_GREG_VENDOR_2		0x00060
@@ -395,16 +391,6 @@ extern struct bus_type mpic_subsys;
 #define	MPIC_REGSET_STANDARD		MPIC_REGSET(0)	/* Original MPIC */
 #define	MPIC_REGSET_TSI108		MPIC_REGSET(1)	/* Tsi108/109 PIC */
 
-/* Get the version of primary MPIC */
-#ifdef CONFIG_MPIC
-extern u32 fsl_mpic_primary_get_version(void);
-#else
-static inline u32 fsl_mpic_primary_get_version(void)
-{
-	return 0;
-}
-#endif
-
 /* Allocate the controller structure and setup the linux irq descs
  * for the range if interrupts passed in. No HW initialization is
  * actually performed.
@@ -496,11 +482,5 @@ extern unsigned int mpic_get_coreint_irq(void);
 /* Fetch Machine Check interrupt from primary mpic */
 extern unsigned int mpic_get_mcirq(void);
 
-/* Set the EPIC clock ratio */
-void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio);
-
-/* Enable/Disable EPIC serial interrupt mode */
-void mpic_set_serial_int(struct mpic *mpic, int enable);
-
 #endif /* __KERNEL__ */
 #endif	/* _ASM_POWERPC_MPIC_H */
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index bbfbbf2..f72b592 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)
  * Exported functions
  */
 
-u32 fsl_mpic_primary_get_version(void)
-{
-	struct mpic *mpic = mpic_primary;
-
-	if (mpic)
-		return fsl_mpic_get_version(mpic);
-
-	return 0;
-}
-
 struct mpic * __init mpic_alloc(struct device_node *node,
 				phys_addr_t phys_addr,
 				unsigned int flags,
@@ -1676,31 +1666,6 @@ void __init mpic_init(struct mpic *mpic)
 		mpic_err_int_init(mpic, MPIC_FSL_ERR_INT);
 }
 
-void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio)
-{
-	u32 v;
-
-	v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1);
-	v &= ~MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK;
-	v |= MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(clock_ratio);
-	mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v);
-}
-
-void __init mpic_set_serial_int(struct mpic *mpic, int enable)
-{
-	unsigned long flags;
-	u32 v;
-
-	raw_spin_lock_irqsave(&mpic_lock, flags);
-	v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1);
-	if (enable)
-		v |= MPIC_GREG_GLOBAL_CONF_1_SIE;
-	else
-		v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE;
-	mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v);
-	raw_spin_unlock_irqrestore(&mpic_lock, flags);
-}
-
 void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
 {
 	struct mpic *mpic = mpic_find(irq);
-- 
2.3.0

  parent reply	other threads:[~2015-02-24  9:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 10:56 [PATCH 0/4] powerpc: trivial unused functions cleanup Arseny Solokha
2015-02-16 10:56 ` [PATCH 1/4] powerpc/boot: drop planetcore_set_serial_speed Arseny Solokha
2015-02-16 10:56 ` [PATCH 2/4] kvm/ppc/mpic: drop unused IRQ_testbit Arseny Solokha
2015-02-16 10:56 ` [PATCH 3/4] powrepc/qe: drop unused ucc_slow_poll_transmitter_now Arseny Solokha
2015-02-16 10:56 ` [PATCH 4/4] powerpc/mpic: remove unused functions Arseny Solokha
2015-02-19  0:58   ` Michael Ellerman
2015-02-19 12:26     ` Arseny Solokha
2015-02-20  3:34       ` Michael Ellerman
2015-02-20  4:40         ` Arseny Solokha
2015-02-24  4:48           ` Michael Ellerman
2015-02-23 21:31       ` Scott Wood
2015-02-26  2:39         ` Hongtao Jia
2015-02-26  3:27           ` Scott Wood
2015-02-24  9:05 ` [PATCH V2 0/4] powerpc: trivial unused functions cleanup Arseny Solokha
2015-02-24  9:05   ` [PATCH 1/4] powerpc/boot: drop planetcore_set_serial_speed Arseny Solokha
2015-02-24  9:05   ` [PATCH 2/4] kvm/ppc/mpic: drop unused IRQ_testbit Arseny Solokha
2015-02-24  9:05   ` [PATCH 3/4] powrepc/qe: drop unused ucc_slow_poll_transmitter_now Arseny Solokha
2015-02-24  9:05   ` Arseny Solokha [this message]
2015-02-27  2:25     ` [PATCH 4/4] powerpc/mpic: remove unused functions Arseny Solokha
2015-03-20  3:56   ` [PATCH v3 0/4] powerpc: trivial unused functions cleanup Arseny Solokha
2015-03-20  3:56     ` [PATCH 1/4] powerpc/boot: drop planetcore_set_serial_speed Arseny Solokha
2015-03-20  3:56     ` [PATCH 2/4] kvm/ppc/mpic: drop unused IRQ_testbit Arseny Solokha
2015-03-20 11:41       ` Alexander Graf
2015-03-21  6:56         ` [PATCH v4 " Arseny Solokha
2015-03-21 14:54           ` Alexander Graf
2015-03-20  3:56     ` [PATCH 3/4] powrepc/qe: drop unused ucc_slow_poll_transmitter_now Arseny Solokha
2015-03-20  3:56     ` [PATCH 4/4] powerpc/mpic: remove unused functions Arseny Solokha
2015-03-20  4:23     ` [PATCH v3 0/4] powerpc: trivial unused functions cleanup Michael Ellerman
2015-03-20  4:55       ` Arseny Solokha
2015-03-20  5:39         ` Michael Ellerman
2015-03-21  6:56           ` Arseny Solokha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424768706-23150-5-git-send-email-asolokha@kb.kras.ru \
    --to=asolokha@kb.kras.ru \
    --cc=benh@kernel.crashing.org \
    --cc=hongtao.jia@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).