summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/ppc/platforms/Makefile2
-rw-r--r--arch/ppc/platforms/est8260_setup.c45
-rw-r--r--arch/ppc/platforms/pq2ads.c28
-rw-r--r--arch/ppc/platforms/rpx8260.c45
-rw-r--r--arch/ppc/platforms/sbc82xx.c22
-rw-r--r--arch/ppc/platforms/tqm8260_setup.c25
-rw-r--r--arch/ppc/syslib/m8260_setup.c53
7 files changed, 27 insertions, 193 deletions
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
index 9baf286da56b..c393f58e5a96 100644
--- a/arch/ppc/platforms/Makefile
+++ b/arch/ppc/platforms/Makefile
@@ -21,7 +21,6 @@ endif
obj-$(CONFIG_PMAC_BACKLIGHT) += pmac_backlight.o
obj-$(CONFIG_PREP_RESIDUAL) += residual.o
obj-$(CONFIG_ADIR) += adir_setup.o adir_pic.o adir_pci.o
-obj-$(CONFIG_EST8260) += est8260_setup.o
obj-$(CONFIG_PQ2ADS) += pq2ads.o
obj-$(CONFIG_TQM8260) += tqm8260_setup.o
obj-$(CONFIG_EV64260) += ev64260_setup.o
@@ -37,7 +36,6 @@ obj-$(CONFIG_POWERPMC250) += powerpmc250.o
obj-$(CONFIG_PPLUS) += pplus.o
obj-$(CONFIG_PRPMC750) += prpmc750.o
obj-$(CONFIG_PRPMC800) += prpmc800.o
-obj-$(CONFIG_RPX8260) += rpx8260.o
obj-$(CONFIG_SANDPOINT) += sandpoint.o
obj-$(CONFIG_SBC82xx) += sbc82xx.o
obj-$(CONFIG_SPRUCE) += spruce.o
diff --git a/arch/ppc/platforms/est8260_setup.c b/arch/ppc/platforms/est8260_setup.c
deleted file mode 100644
index fc2f72707021..000000000000
--- a/arch/ppc/platforms/est8260_setup.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * arch/ppc/platforms/est8260_setup.c
- *
- * EST8260 platform support
- *
- * Author: Allen Curtis <acurtis@onz.com>
- * Derived from: m8260_setup.c by Dan Malek, MVista
- *
- * Copyright 2002 Ones and Zeros, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#include <linux/config.h>
-#include <linux/seq_file.h>
-
-#include <asm/mpc8260.h>
-#include <asm/machdep.h>
-
-static void (*callback_setup_arch)(void);
-
-extern void m8260_init(unsigned long r3, unsigned long r4,
- unsigned long r5, unsigned long r6, unsigned long r7);
-
-static void __init
-est8260_setup_arch(void)
-{
- printk("EST SBC8260 Port\n");
- callback_setup_arch();
-}
-
-void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
- unsigned long r6, unsigned long r7)
-{
- /* Generic 8260 platform initialization */
- m8260_init(r3, r4, r5, r6, r7);
-
- /* Anything special for this platform */
- callback_setup_arch = ppc_md.setup_arch;
- ppc_md.setup_arch = est8260_setup_arch;
-}
diff --git a/arch/ppc/platforms/pq2ads.c b/arch/ppc/platforms/pq2ads.c
index 004b963898fa..cecaba630565 100644
--- a/arch/ppc/platforms/pq2ads.c
+++ b/arch/ppc/platforms/pq2ads.c
@@ -14,33 +14,13 @@
* option) any later version.
*/
-#include <linux/config.h>
-#include <linux/seq_file.h>
+#include <linux/init.h>
#include <asm/mpc8260.h>
-#include <asm/machdep.h>
-
-static void (*callback_setup_arch)(void);
-
-extern void m8260_init(unsigned long r3, unsigned long r4,
- unsigned long r5, unsigned long r6, unsigned long r7);
-
-static void __init
-pq2ads_setup_arch(void)
-{
- printk("PQ2 ADS Port\n");
- callback_setup_arch();
- *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
-}
void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
- unsigned long r6, unsigned long r7)
+m82xx_board_init(void)
{
- /* Generic 8260 platform initialization */
- m8260_init(r3, r4, r5, r6, r7);
-
- /* Anything special for this platform */
- callback_setup_arch = ppc_md.setup_arch;
- ppc_md.setup_arch = pq2ads_setup_arch;
+ /* Enable the 2nd UART port */
+ *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
}
diff --git a/arch/ppc/platforms/rpx8260.c b/arch/ppc/platforms/rpx8260.c
deleted file mode 100644
index 19c2bd3f7c1f..000000000000
--- a/arch/ppc/platforms/rpx8260.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * arch/ppc/platforms/rpx8260.c
- *
- * RPC EP8260 platform support
- *
- * Author: Dan Malek <dan@embeddededge.com>
- * Derived from: pq2ads_setup.c by Kumar
- *
- * Copyright 2004 Embedded Edge, LLC
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#include <linux/config.h>
-#include <linux/seq_file.h>
-
-#include <asm/mpc8260.h>
-#include <asm/machdep.h>
-
-static void (*callback_setup_arch)(void);
-
-extern void m8260_init(unsigned long r3, unsigned long r4,
- unsigned long r5, unsigned long r6, unsigned long r7);
-
-static void __init
-ep8260_setup_arch(void)
-{
- printk("RPC EP8260 Port\n");
- callback_setup_arch();
-}
-
-void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
- unsigned long r6, unsigned long r7)
-{
- /* Generic 8260 platform initialization */
- m8260_init(r3, r4, r5, r6, r7);
-
- /* Anything special for this platform */
- callback_setup_arch = ppc_md.setup_arch;
- ppc_md.setup_arch = ep8260_setup_arch;
-}
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c
index e7ce8301c5b7..6fbbc38f1487 100644
--- a/arch/ppc/platforms/sbc82xx.c
+++ b/arch/ppc/platforms/sbc82xx.c
@@ -16,10 +16,10 @@
*/
#include <linux/config.h>
-#include <linux/seq_file.h>
#include <linux/stddef.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
+#include <linux/init.h>
#include <asm/mpc8260.h>
#include <asm/machdep.h>
@@ -28,23 +28,12 @@
#include <asm/immap_cpm2.h>
#include <asm/pci.h>
-static void (*callback_setup_arch)(void);
static void (*callback_init_IRQ)(void);
extern unsigned char __res[sizeof(bd_t)];
-extern void m8260_init(unsigned long r3, unsigned long r4,
- unsigned long r5, unsigned long r6, unsigned long r7);
-
extern void (*late_time_init)(void);
-static void __init
-sbc82xx_setup_arch(void)
-{
- printk("SBC PowerQUICC II Port\n");
- callback_setup_arch();
-}
-
#ifdef CONFIG_GEN_RTC
TODC_ALLOC();
@@ -220,21 +209,14 @@ static int sbc82xx_pci_map_irq(struct pci_dev *dev, unsigned char idsel,
return PCI_IRQ_TABLE_LOOKUP;
}
-
-
void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
- unsigned long r6, unsigned long r7)
+m82xx_board_init(void)
{
- /* Generic 8260 platform initialization */
- m8260_init(r3, r4, r5, r6, r7);
-
/* u-boot may be using one of the FCC Ethernet devices.
Use the MAC address to the SCC. */
__res[offsetof(bd_t, bi_enetaddr[5])] &= ~3;
/* Anything special for this platform */
- callback_setup_arch = ppc_md.setup_arch;
callback_init_IRQ = ppc_md.init_IRQ;
ppc_md.setup_arch = sbc82xx_setup_arch;
diff --git a/arch/ppc/platforms/tqm8260_setup.c b/arch/ppc/platforms/tqm8260_setup.c
index f939f01e69c7..a8880bfc034b 100644
--- a/arch/ppc/platforms/tqm8260_setup.c
+++ b/arch/ppc/platforms/tqm8260_setup.c
@@ -14,18 +14,12 @@
* option) any later version.
*/
-#include <linux/config.h>
-#include <linux/seq_file.h>
+#include <linux/init.h>
#include <asm/immap_cpm2.h>
#include <asm/mpc8260.h>
#include <asm/machdep.h>
-static void (*callback_setup_arch)(void);
-
-extern void m8260_init(unsigned long r3, unsigned long r4,
- unsigned long r5, unsigned long r6, unsigned long r7);
-
static int
tqm8260_set_rtc_time(unsigned long time)
{
@@ -41,23 +35,10 @@ tqm8260_get_rtc_time(void)
return ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt;
}
-static void __init
-tqm8260_setup_arch(void)
-{
- printk("IN2 Systems TQM8260 port\n");
- callback_setup_arch();
-}
-
void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
- unsigned long r6, unsigned long r7)
+m82xx_board_init(void)
{
- /* Generic 8260 platform initialization */
- m8260_init(r3, r4, r5, r6, r7);
-
/* Anything special for this platform */
ppc_md.set_rtc_time = tqm8260_set_rtc_time;
ppc_md.get_rtc_time = tqm8260_get_rtc_time;
-
- callback_setup_arch = ppc_md.setup_arch;
- ppc_md.setup_arch = tqm8260_setup_arch;
+}
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c
index 44087e82c4b6..b62bef5809f2 100644
--- a/arch/ppc/syslib/m8260_setup.c
+++ b/arch/ppc/syslib/m8260_setup.c
@@ -8,35 +8,20 @@
* Further modified for generic 8xx and 8260 by Dan.
*/
-/*
- * bootup setup stuff..
- */
#include <linux/config.h>
-#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/stddef.h>
-#include <linux/unistd.h>
-#include <linux/ptrace.h>
#include <linux/slab.h>
-#include <linux/user.h>
-#include <linux/a.out.h>
-#include <linux/tty.h>
-#include <linux/major.h>
-#include <linux/interrupt.h>
-#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/initrd.h>
-#include <linux/ioport.h>
-#include <linux/ide.h>
#include <linux/seq_file.h>
+#include <linux/irq.h>
#include <asm/mmu.h>
-#include <asm/residual.h>
#include <asm/io.h>
#include <asm/pgtable.h>
-#include <asm/ide.h>
#include <asm/mpc8260.h>
#include <asm/immap_cpm2.h>
#include <asm/machdep.h>
@@ -45,10 +30,6 @@
#include "cpm2_pic.h"
-static int m8260_set_rtc_time(unsigned long time);
-static unsigned long m8260_get_rtc_time(void);
-static void m8260_calibrate_decr(void);
-
unsigned char __res[sizeof(bd_t)];
extern void cpm2_reset(void);
@@ -58,8 +39,10 @@ extern void idma_pci9_init(void);
static void __init
m8260_setup_arch(void)
{
- /* Reset the Communication Processor Module.
- */
+ /* Print out Vendor and Machine info. */
+ printk(KERN_INFO "%s %s port\n", CPUINFO_VENDOR, CPUINFO_MACHINE);
+
+ /* Reset the Communication Processor Module. */
cpm2_reset();
#ifdef CONFIG_8260_PCI9
/* Initialise IDMA for PCI erratum workaround */
@@ -76,7 +59,7 @@ m8260_setup_arch(void)
static void __init
m8260_calibrate_decr(void)
{
- bd_t *binfo = (bd_t *)__res;
+ bd_t *binfo = (bd_t *)__res;
int freq, divisor;
freq = binfo->bi_busfreq;
@@ -146,9 +129,7 @@ m8260_power_off(void)
static int
m8260_show_cpuinfo(struct seq_file *m)
{
- bd_t *bp;
-
- bp = (bd_t *)__res;
+ bd_t *bp = (bd_t *)__res;
seq_printf(m, "vendor\t\t: %s\n"
"machine\t\t: %s\n"
@@ -175,7 +156,6 @@ static void __init
m8260_init_IRQ(void)
{
int i;
- void cpm_interrupt_init(void);
for ( i = 0 ; i < NR_SIU_INTS ; i++ )
irq_desc[i].handler = &cpm2_pic;
@@ -195,10 +175,7 @@ m8260_init_IRQ(void)
static unsigned long __init
m8260_find_end_of_memory(void)
{
- bd_t *binfo;
- extern unsigned char __res[];
-
- binfo = (bd_t *)__res;
+ bd_t *binfo = (bd_t *)__res;
return binfo->bi_memsize;
}
@@ -221,6 +198,12 @@ m8260_map_io(void)
io_block_mapping(IO_VIRT_ADDR, IO_PHYS_ADDR, 0x10000000, _PAGE_IO);
}
+/* Place-holder for board-specific init */
+void __attribute__ ((weak)) __init
+m82xx_board_init(void)
+{
+}
+
/* Inputs:
* r3 - Optional pointer to a board information structure.
* r4 - Optional pointer to the physical starting address of the init RAM
@@ -233,7 +216,7 @@ m8260_map_io(void)
* command-line parameters.
*/
void __init
-m8260_init(unsigned long r3, unsigned long r4, unsigned long r5,
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
parse_bootinfo(find_bootinfo());
@@ -254,18 +237,18 @@ m8260_init(unsigned long r3, unsigned long r4, unsigned long r5,
strcpy(cmd_line, (char *)(r6+KERNELBASE));
}
+ /* Call back for board-specific settings. */
+ m82xx_board_init();
+
ppc_md.setup_arch = m8260_setup_arch;
ppc_md.show_cpuinfo = m8260_show_cpuinfo;
- ppc_md.irq_canonicalize = NULL;
ppc_md.init_IRQ = m8260_init_IRQ;
ppc_md.get_irq = cpm2_get_irq;
- ppc_md.init = NULL;
ppc_md.restart = m8260_restart;
ppc_md.power_off = m8260_power_off;
ppc_md.halt = m8260_halt;
- ppc_md.time_init = NULL;
ppc_md.set_rtc_time = m8260_set_rtc_time;
ppc_md.get_rtc_time = m8260_get_rtc_time;
ppc_md.calibrate_decr = m8260_calibrate_decr;