Skip to content

Commit

Permalink
powerpc/85xx: Move mpc85xx_smp_init() decl to a new "smp.h"
Browse files Browse the repository at this point in the history
This removes a bunch of "extern" declarations and CONFIG_SMP ifdefs.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Kyle Moffett authored and Benjamin Herrenschmidt committed Dec 7, 2011
1 parent fa8cbaa commit 582d3e0
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 40 deletions.
7 changes: 1 addition & 6 deletions arch/powerpc/platforms/85xx/corenet_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/of_platform.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "smp.h"

void __init corenet_ds_pic_init(void)
{
Expand Down Expand Up @@ -65,10 +66,6 @@ void __init corenet_ds_pic_init(void)
/*
* Setup the architecture
*/
#ifdef CONFIG_SMP
void __init mpc85xx_smp_init(void);
#endif

void __init corenet_ds_setup_arch(void)
{
#ifdef CONFIG_PCI
Expand All @@ -77,9 +74,7 @@ void __init corenet_ds_setup_arch(void)
#endif
dma_addr_t max = 0xffffffff;

#ifdef CONFIG_SMP
mpc85xx_smp_init();
#endif

#ifdef CONFIG_PCI
for_each_node_by_type(np, "pci") {
Expand Down
6 changes: 1 addition & 5 deletions arch/powerpc/platforms/85xx/mpc85xx_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "smp.h"

#include "mpc85xx.h"

Expand Down Expand Up @@ -154,9 +155,6 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
/*
* Setup the architecture
*/
#ifdef CONFIG_SMP
extern void __init mpc85xx_smp_init(void);
#endif
static void __init mpc85xx_ds_setup_arch(void)
{
#ifdef CONFIG_PCI
Expand Down Expand Up @@ -189,9 +187,7 @@ static void __init mpc85xx_ds_setup_arch(void)
ppc_md.pci_exclude_device = mpc85xx_exclude_device;
#endif

#ifdef CONFIG_SMP
mpc85xx_smp_init();
#endif

#ifdef CONFIG_SWIOTLB
if (memblock_end_of_DRAM() > max) {
Expand Down
7 changes: 1 addition & 6 deletions arch/powerpc/platforms/85xx/mpc85xx_mds.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <asm/qe_ic.h>
#include <asm/mpic.h>
#include <asm/swiotlb.h>
#include "smp.h"

#include "mpc85xx.h"

Expand Down Expand Up @@ -155,10 +156,6 @@ static int mpc8568_mds_phy_fixups(struct phy_device *phydev)
* Setup the architecture
*
*/
#ifdef CONFIG_SMP
extern void __init mpc85xx_smp_init(void);
#endif

#ifdef CONFIG_QUICC_ENGINE
static void __init mpc85xx_mds_reset_ucc_phys(void)
{
Expand Down Expand Up @@ -363,9 +360,7 @@ static void __init mpc85xx_mds_setup_arch(void)
}
#endif

#ifdef CONFIG_SMP
mpc85xx_smp_init();
#endif

mpc85xx_mds_qe_init();

Expand Down
7 changes: 1 addition & 6 deletions arch/powerpc/platforms/85xx/mpc85xx_rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "smp.h"

#include "mpc85xx.h"

Expand Down Expand Up @@ -84,9 +85,6 @@ void __init mpc85xx_rdb_pic_init(void)
/*
* Setup the architecture
*/
#ifdef CONFIG_SMP
extern void __init mpc85xx_smp_init(void);
#endif
static void __init mpc85xx_rdb_setup_arch(void)
{
#ifdef CONFIG_PCI
Expand All @@ -104,10 +102,7 @@ static void __init mpc85xx_rdb_setup_arch(void)

#endif

#ifdef CONFIG_SMP
mpc85xx_smp_init();
#endif

printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n");
}

Expand Down
7 changes: 1 addition & 6 deletions arch/powerpc/platforms/85xx/p1022_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include <asm/fsl_guts.h>
#include "smp.h"

#include "mpc85xx.h"

Expand Down Expand Up @@ -268,10 +269,6 @@ void __init p1022_ds_pic_init(void)
mpic_init(mpic);
}

#ifdef CONFIG_SMP
void __init mpc85xx_smp_init(void);
#endif

/*
* Setup the architecture
*/
Expand Down Expand Up @@ -311,9 +308,7 @@ static void __init p1022_ds_setup_arch(void)
diu_ops.valid_monitor_port = p1022ds_valid_monitor_port;
#endif

#ifdef CONFIG_SMP
mpc85xx_smp_init();
#endif

#ifdef CONFIG_SWIOTLB
if (memblock_end_of_DRAM() > max) {
Expand Down
7 changes: 1 addition & 6 deletions arch/powerpc/platforms/85xx/p1023_rds.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
#include "smp.h"

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
Expand All @@ -41,10 +42,6 @@
* Setup the architecture
*
*/
#ifdef CONFIG_SMP
void __init mpc85xx_smp_init(void);
#endif

static void __init mpc85xx_rds_setup_arch(void)
{
struct device_node *np;
Expand Down Expand Up @@ -89,9 +86,7 @@ static void __init mpc85xx_rds_setup_arch(void)
fsl_add_bridge(np, 0);
#endif

#ifdef CONFIG_SMP
mpc85xx_smp_init();
#endif
}

machine_device_initcall(p1023_rds, mpc85xx_common_publish_devices);
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/85xx/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <sysdev/fsl_soc.h>
#include <sysdev/mpic.h>
#include "smp.h"

extern void __early_start(void);

Expand Down
15 changes: 15 additions & 0 deletions arch/powerpc/platforms/85xx/smp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef POWERPC_85XX_SMP_H_
#define POWERPC_85XX_SMP_H_ 1

#include <linux/init.h>

#ifdef CONFIG_SMP
void __init mpc85xx_smp_init(void);
#else
static inline void mpc85xx_smp_init(void)
{
/* Nothing to do */
}
#endif

#endif /* not POWERPC_85XX_SMP_H_ */
6 changes: 1 addition & 5 deletions arch/powerpc/platforms/85xx/xes_mpc85xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "smp.h"

#include "mpc85xx.h"

Expand Down Expand Up @@ -138,9 +139,6 @@ static int primary_phb_addr;
/*
* Setup the architecture
*/
#ifdef CONFIG_SMP
extern void __init mpc85xx_smp_init(void);
#endif
static void __init xes_mpc85xx_setup_arch(void)
{
#ifdef CONFIG_PCI
Expand Down Expand Up @@ -174,9 +172,7 @@ static void __init xes_mpc85xx_setup_arch(void)
}
#endif

#ifdef CONFIG_SMP
mpc85xx_smp_init();
#endif
}

machine_device_initcall(xes_mpc8572, mpc85xx_common_publish_devices);
Expand Down

0 comments on commit 582d3e0

Please sign in to comment.