Commit 8035f35c authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://ppc.bkbits.net/for-linus-ppc

into home.transmeta.com:/home/torvalds/v2.5/linux
parents ce231e44 c6b22ca6
...@@ -807,7 +807,7 @@ int __init scc_enet_init(void) ...@@ -807,7 +807,7 @@ int __init scc_enet_init(void)
/* Install our interrupt handler. /* Install our interrupt handler.
*/ */
request_8xxirq(SIU_INT_ENET, scc_enet_interrupt, 0, "enet", dev); request_irq(SIU_INT_ENET, scc_enet_interrupt, 0, "enet", dev);
/* Set GSMR_H to enable all normal operating modes. /* Set GSMR_H to enable all normal operating modes.
* Set GSMR_L to enable Ethernet to MC68160. * Set GSMR_L to enable Ethernet to MC68160.
......
...@@ -1705,12 +1705,12 @@ init_fcc_startup(fcc_info_t *fip, struct net_device *dev) ...@@ -1705,12 +1705,12 @@ init_fcc_startup(fcc_info_t *fip, struct net_device *dev)
/* Install our interrupt handler. /* Install our interrupt handler.
*/ */
if (request_8xxirq(fip->fc_interrupt, fcc_enet_interrupt, 0, if (request_irq(fip->fc_interrupt, fcc_enet_interrupt, 0,
"fenet", dev) < 0) "fenet", dev) < 0)
printk("Can't get FCC IRQ %d\n", fip->fc_interrupt); printk("Can't get FCC IRQ %d\n", fip->fc_interrupt);
#ifdef CONFIG_USE_MDIO #ifdef CONFIG_USE_MDIO
if (request_8xxirq(PHY_INTERRUPT, mii_link_interrupt, 0, if (request_irq(PHY_INTERRUPT, mii_link_interrupt, 0,
"mii", dev) < 0) "mii", dev) < 0)
printk("Can't get MII IRQ %d\n", fip->fc_interrupt); printk("Can't get MII IRQ %d\n", fip->fc_interrupt);
#endif /* CONFIG_USE_MDIO */ #endif /* CONFIG_USE_MDIO */
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
* Copyright (c) 1999 Dan Malek (dmalek@jlc.net) * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
* Copyright (c) 2000 MontaVista Software, Inc. (source@mvista.com) * Copyright (c) 2000 MontaVista Software, Inc. (source@mvista.com)
* 2.3.99 updates * 2.3.99 updates
* Copyright (c) 2002 Allen Curtis, Ones and Zeros, Inc. (acurtis@onz.com)
* 2.5.50 updates
* *
* I used the 8xx uart.c driver as the framework for this driver. * I used the 8xx uart.c driver as the framework for this driver.
* The original code was written for the EST8260 board. I tried to make * The original code was written for the EST8260 board. I tried to make
...@@ -28,6 +30,7 @@ ...@@ -28,6 +30,7 @@
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
...@@ -69,9 +72,7 @@ ...@@ -69,9 +72,7 @@
#define TX_WAKEUP ASYNC_SHARE_IRQ #define TX_WAKEUP ASYNC_SHARE_IRQ
static char *serial_name = "CPM UART driver"; static char *serial_name = "CPM UART driver";
static char *serial_version = "0.01"; static char *serial_version = "0.02";
static DECLARE_TASK_QUEUE(tq_serial);
static struct tty_driver serial_driver, callout_driver; static struct tty_driver serial_driver, callout_driver;
static int serial_refcount; static int serial_refcount;
...@@ -201,8 +202,8 @@ typedef struct serial_info { ...@@ -201,8 +202,8 @@ typedef struct serial_info {
int blocked_open; /* # of blocked opens */ int blocked_open; /* # of blocked opens */
long session; /* Session of opening process */ long session; /* Session of opening process */
long pgrp; /* pgrp of opening process */ long pgrp; /* pgrp of opening process */
struct tq_struct tqueue; struct work_struct tqueue;
struct tq_struct tqueue_hangup; struct work_struct tqueue_hangup;
wait_queue_head_t open_wait; wait_queue_head_t open_wait;
wait_queue_head_t close_wait; wait_queue_head_t close_wait;
...@@ -331,8 +332,7 @@ static _INLINE_ void rs_sched_event(ser_info_t *info, ...@@ -331,8 +332,7 @@ static _INLINE_ void rs_sched_event(ser_info_t *info,
int event) int event)
{ {
info->event |= 1 << event; info->event |= 1 << event;
queue_task(&info->tqueue, &tq_serial); schedule_work(&info->tqueue);
mark_bh(SERIAL_BH);
} }
static _INLINE_ void receive_chars(ser_info_t *info) static _INLINE_ void receive_chars(ser_info_t *info)
...@@ -479,7 +479,7 @@ static _INLINE_ void receive_chars(ser_info_t *info) ...@@ -479,7 +479,7 @@ static _INLINE_ void receive_chars(ser_info_t *info)
info->rx_cur = (cbd_t *)bdp; info->rx_cur = (cbd_t *)bdp;
queue_task(&tty->flip.tqueue, &tq_timer); schedule_delayed_work(&tty->flip.work, 1);
} }
static _INLINE_ void transmit_chars(ser_info_t *info) static _INLINE_ void transmit_chars(ser_info_t *info)
...@@ -537,7 +537,7 @@ static _INLINE_ void check_modem_status(struct async_struct *info) ...@@ -537,7 +537,7 @@ static _INLINE_ void check_modem_status(struct async_struct *info)
printk("scheduling hangup..."); printk("scheduling hangup...");
#endif #endif
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
if (schedule_task(&info->tqueue_hangup) == 0) if (schedule_work(&info->tqueue_hangup) == 0)
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
} }
} }
...@@ -628,11 +628,6 @@ static void rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs) ...@@ -628,11 +628,6 @@ static void rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
* interrupt driver proper are done; the interrupt driver schedules * interrupt driver proper are done; the interrupt driver schedules
* them using rs_sched_event(), and they get done here. * them using rs_sched_event(), and they get done here.
*/ */
static void do_serial_bh(void)
{
run_task_queue(&tq_serial);
}
static void do_softint(void *private_) static void do_softint(void *private_)
{ {
ser_info_t *info = (ser_info_t *) private_; ser_info_t *info = (ser_info_t *) private_;
...@@ -651,7 +646,7 @@ static void do_softint(void *private_) ...@@ -651,7 +646,7 @@ static void do_softint(void *private_)
} }
/* /*
* This routine is called from the scheduler tqueue when the interrupt * This routine is called from the scheduler work queue when the interrupt
* routine has signalled that a hangup has occurred. The path of * routine has signalled that a hangup has occurred. The path of
* hangup processing is: * hangup processing is:
* *
...@@ -1308,7 +1303,7 @@ static void begin_break(ser_info_t *info) ...@@ -1308,7 +1303,7 @@ static void begin_break(ser_info_t *info)
{ {
volatile cpm8260_t *cp; volatile cpm8260_t *cp;
uint page, sblock; uint page, sblock;
ushort num; int num;
cp = cpmp; cp = cpmp;
...@@ -1352,7 +1347,7 @@ static void end_break(ser_info_t *info) ...@@ -1352,7 +1347,7 @@ static void end_break(ser_info_t *info)
{ {
volatile cpm8260_t *cp; volatile cpm8260_t *cp;
uint page, sblock; uint page, sblock;
ushort num; int num;
cp = cpmp; cp = cpmp;
...@@ -1756,7 +1751,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -1756,7 +1751,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout)
*/ */
char_time = 1; char_time = 1;
if (timeout) if (timeout)
char_time = min(char_time, timeout); char_time = min(char_time, (unsigned long)timeout);
#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time); printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
printk("jiff=%lu...", jiffies); printk("jiff=%lu...", jiffies);
...@@ -1980,7 +1975,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp) ...@@ -1980,7 +1975,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
ser_info_t *info; ser_info_t *info;
int retval, line; int retval, line;
line = MINOR(tty->device) - tty->driver.minor_start; line = minor(tty->device) - tty->driver.minor_start;
if ((line < 0) || (line >= NR_PORTS)) if ((line < 0) || (line >= NR_PORTS))
return -ENODEV; return -ENODEV;
retval = get_async_struct(line, &info); retval = get_async_struct(line, &info);
...@@ -2455,7 +2450,7 @@ void kgdb_map_scc(void) ...@@ -2455,7 +2450,7 @@ void kgdb_map_scc(void)
static kdev_t serial_console_device(struct console *c) static kdev_t serial_console_device(struct console *c)
{ {
return MKDEV(TTY_MAJOR, 64 + c->index); return mk_kdev(TTY_MAJOR, 64 + c->index);
} }
...@@ -2503,8 +2498,6 @@ int __init rs_8xx_init(void) ...@@ -2503,8 +2498,6 @@ int __init rs_8xx_init(void)
volatile immap_t *immap; volatile immap_t *immap;
volatile iop8260_t *io; volatile iop8260_t *io;
init_bh(SERIAL_BH, do_serial_bh);
show_serial_version(); show_serial_version();
/* Initialize the tty_driver structure */ /* Initialize the tty_driver structure */
...@@ -2680,10 +2673,8 @@ int __init rs_8xx_init(void) ...@@ -2680,10 +2673,8 @@ int __init rs_8xx_init(void)
init_waitqueue_head(&info->close_wait); init_waitqueue_head(&info->close_wait);
info->magic = SERIAL_MAGIC; info->magic = SERIAL_MAGIC;
info->flags = state->flags; info->flags = state->flags;
info->tqueue.routine = do_softint; INIT_WORK(&info->tqueue, do_softint, info);
info->tqueue.data = info; INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info);
info->tqueue_hangup.routine = do_serial_hangup;
info->tqueue_hangup.data = info;
info->line = i; info->line = i;
info->state = state; info->state = state;
state->info = (struct async_struct *)info; state->info = (struct async_struct *)info;
...@@ -2874,7 +2865,7 @@ int __init rs_8xx_init(void) ...@@ -2874,7 +2865,7 @@ int __init rs_8xx_init(void)
/* Install interrupt handler. /* Install interrupt handler.
*/ */
request_8xxirq(state->irq, rs_8xx_interrupt, 0, "uart", info); request_irq(state->irq, rs_8xx_interrupt, 0, "uart", info);
/* Set up the baud rate generator. /* Set up the baud rate generator.
*/ */
......
# This file is included by the global makefile so that you can add your own # This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions # architecture-specific flags and dependencies.
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
# #
# This file is subject to the terms and conditions of the GNU General Public # This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive # License. See the file "COPYING" in the main directory of this archive
...@@ -17,24 +15,20 @@ KERNELLOAD =$(CONFIG_KERNEL_START) ...@@ -17,24 +15,20 @@ KERNELLOAD =$(CONFIG_KERNEL_START)
LDFLAGS_BLOB := --format binary --oformat elf32-powerpc LDFLAGS_BLOB := --format binary --oformat elf32-powerpc
LDFLAGS_vmlinux = -Ttext $(KERNELLOAD) -Bstatic LDFLAGS_vmlinux = -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH) CPPFLAGS += -Iarch/$(ARCH)
AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH) AFLAGS += -Iarch/$(ARCH)
CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -msoft-float -pipe \ cflags-y += -Iarch/$(ARCH) -msoft-float -pipe \
-ffixed-r2 -Wno-uninitialized -mmultiple -mstring -ffixed-r2 -Wno-uninitialized -mmultiple -mstring
CPP = $(CC) -E $(CFLAGS) CPP = $(CC) -E $(CFLAGS)
ifdef CONFIG_4xx cflags-$(CONFIG_4xx) += -Wa,-m405
CFLAGS := $(CFLAGS) -Wa,-m405 cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
endif # Use sed to remove the quotes.
cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
$(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
ifdef CONFIG_PPC64BRIDGE CFLAGS += $(cflags-y)
CFLAGS := $(CFLAGS) -Wa,-mppc64bridge
endif
ifdef CONFIG_MORE_COMPILE_OPTIONS
# Use sed to remove the quotes.
CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
endif
head-y := arch/ppc/kernel/head.o head-y := arch/ppc/kernel/head.o
head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
# modified by Cort (cort@cs.nmt.edu) # modified by Cort (cort@cs.nmt.edu)
# #
CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
HOSTCFLAGS += -I$(TOPDIR)/arch/$(ARCH)/boot/include HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
...@@ -21,7 +21,7 @@ subdir-y := lib common images ...@@ -21,7 +21,7 @@ subdir-y := lib common images
subdir-$(CONFIG_ALL_PPC) += of1275 subdir-$(CONFIG_ALL_PPC) += of1275
# for cleaning # for cleaning
subdir- += simple openfirmware prep subdir- += simple/ openfirmware/ prep/
tools-$(CONFIG_ALL_PPC) := addnote mknote hack-coff mkprep tools-$(CONFIG_ALL_PPC) := addnote mknote hack-coff mkprep
tools-$(CONFIG_PPLUS) := mkbugboot mkprep tools-$(CONFIG_PPLUS) := mkbugboot mkprep
...@@ -34,8 +34,6 @@ tools-$(CONFIG_PRPMC750) := mkbugboot mkprep ...@@ -34,8 +34,6 @@ tools-$(CONFIG_PRPMC750) := mkbugboot mkprep
tools-$(CONFIG_PRPMC800) := mkbugboot mkprep tools-$(CONFIG_PRPMC800) := mkbugboot mkprep
tools-$(CONFIG_SPRUCE) := mktree tools-$(CONFIG_SPRUCE) := mktree
all-tools := addnote mknote hack-coff mkprep mkbugboot mktree
host-progs := $(addprefix utils/,$(tools-y)) host-progs := $(addprefix utils/,$(tools-y))
.PHONY: $(BOOT_TARGETS) $(bootdir-y) .PHONY: $(BOOT_TARGETS) $(bootdir-y)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# This dir holds all of the images for PPC machines. # This dir holds all of the images for PPC machines.
# Tom Rini January 2001 # Tom Rini January 2001
targets := vmlinux.gz extra-y := vmlinux.gz
GZIP_FLAGS := -v9f GZIP_FLAGS := -v9f
$(obj)/vmlinux.gz: vmlinux $(obj)/vmlinux.gz: vmlinux
......
...@@ -26,10 +26,15 @@ COFF_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00700000 -Bstatic ...@@ -26,10 +26,15 @@ COFF_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00700000 -Bstatic
CHRP_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00800000 CHRP_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00800000
NEWWORLD_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x01000000 NEWWORLD_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x01000000
COMMONOBJS = $(obj)/start.o $(obj)/misc.o $(obj)/common.o COMMONOBJS := start.o misc.o common.o
COFFOBJS = $(obj)/coffcrt0.o $(COMMONOBJS) $(obj)/coffmain.o COFFOBJS := coffcrt0.o $(COMMONOBJS) coffmain.o
CHRPOBJS = $(obj)/crt0.o $(COMMONOBJS) $(obj)/chrpmain.o CHRPOBJS := crt0.o $(COMMONOBJS) chrpmain.o
NEWWORLDOBJS = $(obj)/crt0.o $(COMMONOBJS) $(obj)/newworldmain.o NEWWORLDOBJS := crt0.o $(COMMONOBJS) newworldmain.o
EXTRA_TARGETS := $(COFFOBJS) $(CHRPOBJS) $(NEWWORLDOBJS)
COFFOBJS := $(addprefix $(obj)/, $(COFFOBJS))
CHRPOBJS := $(addprefix $(obj)/, $(CHRPOBJS))
NEWWORLDOBJS := $(addprefix $(obj)/, $(NEWWORLDOBJS))
LIBS = lib/lib.a $(bootlib)/lib.a $(of1275)/lib.a $(common)/lib.a LIBS = lib/lib.a $(bootlib)/lib.a $(of1275)/lib.a $(common)/lib.a
......
...@@ -35,7 +35,8 @@ of1275 := $(boot)/of1275 ...@@ -35,7 +35,8 @@ of1275 := $(boot)/of1275
images := $(boot)/images images := $(boot)/images
simple := $(boot)/simple simple := $(boot)/simple
OBJS := $(addprefix $(obj)/,$(boot-y)) $(simple)/legacy.o EXTRA_TARGETS := $(boot-y) ../simple/legacy.o
OBJS := $(addprefix $(obj)/,$(boot-y)) $(simple)/legacy.o
# Tools # Tools
MKPREP := $(utils)/mkprep MKPREP := $(utils)/mkprep
......
...@@ -431,7 +431,7 @@ clk_8260(bd_t *bd) ...@@ -431,7 +431,7 @@ clk_8260(bd_t *bd)
} }
#endif #endif
#ifdef CONFIG_EST8260 #if defined(CONFIG_EST8260) || defined(CONFIG_TQM8260)
void void
embed_config(bd_t **bdp) embed_config(bd_t **bdp)
{ {
......
...@@ -28,11 +28,8 @@ obj-$(CONFIG_PCI) += pci-dma.o ...@@ -28,11 +28,8 @@ obj-$(CONFIG_PCI) += pci-dma.o
obj-$(CONFIG_KGDB) += ppc-stub.o obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_TAU) += temp.o obj-$(CONFIG_TAU) += temp.o
ifeq ($(CONFIG_8xx),y)
ifneq ($(CONFIG_MATH_EMULATION),n) ifdef CONFIG_MATH_EMULATION
obj-y += softemu8xx.o obj-$(CONFIG_8xx) += softemu8xx.o
endif
endif endif
find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
...@@ -176,6 +176,21 @@ pcibios_fixup_cardbus(struct pci_dev* dev) ...@@ -176,6 +176,21 @@ pcibios_fixup_cardbus(struct pci_dev* dev)
} }
#endif /* CONFIG_ALL_PPC */ #endif /* CONFIG_ALL_PPC */
void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res)
{
unsigned long offset = 0;
struct pci_controller *hose = dev->sysdata;
if (hose && res->flags & IORESOURCE_IO)
offset = (unsigned long)hose->io_base_virt - isa_io_base;
else if (hose && res->flags & IORESOURCE_MEM)
offset = hose->pci_mem_offset;
region->start = res->start - offset;
region->end = res->end - offset;
}
/* /*
* We need to avoid collisions with `mirrored' VGA ports * We need to avoid collisions with `mirrored' VGA ports
* and other strange ISA hardware, so we always want the * and other strange ISA hardware, so we always want the
...@@ -579,8 +594,10 @@ pcibios_assign_resources(void) ...@@ -579,8 +594,10 @@ pcibios_assign_resources(void)
*/ */
if ((r->flags & IORESOURCE_UNSET) && r->end && if ((r->flags & IORESOURCE_UNSET) && r->end &&
(!ppc_md.pcibios_enable_device_hook || (!ppc_md.pcibios_enable_device_hook ||
!ppc_md.pcibios_enable_device_hook(dev, 1))) !ppc_md.pcibios_enable_device_hook(dev, 1))) {
r->flags &= ~IORESOURCE_UNSET;
pci_assign_resource(dev, idx); pci_assign_resource(dev, idx);
}
} }
#if 0 /* don't assign ROMs */ #if 0 /* don't assign ROMs */
......
...@@ -337,7 +337,7 @@ EXPORT_SYMBOL(cpm_free_handler); ...@@ -337,7 +337,7 @@ EXPORT_SYMBOL(cpm_free_handler);
#if defined(CONFIG_8xx) || defined(CONFIG_4xx) #if defined(CONFIG_8xx) || defined(CONFIG_4xx)
EXPORT_SYMBOL(__res); EXPORT_SYMBOL(__res);
#endif #endif
#if defined(CONFIG_8xx) || defined(CONFIG_8260) #if defined(CONFIG_8xx)
EXPORT_SYMBOL(request_8xxirq); EXPORT_SYMBOL(request_8xxirq);
#endif #endif
......
...@@ -10,7 +10,7 @@ EXTRA_AFLAGS := -Wa,-m405 ...@@ -10,7 +10,7 @@ EXTRA_AFLAGS := -Wa,-m405
endif endif
# Extra CFLAGS so we don't have to do relative includes # Extra CFLAGS so we don't have to do relative includes
CFLAGS_pmac_setup.o += -I$(TOPDIR)/arch/$(ARCH)/mm CFLAGS_pmac_setup.o += -Iarch/$(ARCH)/mm
obj-$(CONFIG_APUS) += apus_setup.o obj-$(CONFIG_APUS) += apus_setup.o
ifeq ($(CONFIG_APUS),y) ifeq ($(CONFIG_APUS),y)
...@@ -28,6 +28,8 @@ obj-$(CONFIG_PMAC_PBOOK) += sleep.o ...@@ -28,6 +28,8 @@ obj-$(CONFIG_PMAC_PBOOK) += sleep.o
obj-$(CONFIG_PPC_RTAS) += error_log.o proc_rtas.o obj-$(CONFIG_PPC_RTAS) += error_log.o proc_rtas.o
obj-$(CONFIG_PREP_RESIDUAL) += residual.o obj-$(CONFIG_PREP_RESIDUAL) += residual.o
obj-$(CONFIG_ADIR) += adir_setup.o adir_pic.o adir_pci.o obj-$(CONFIG_ADIR) += adir_setup.o adir_pic.o adir_pci.o
obj-$(CONFIG_EST8260) += est8260_setup.o
obj-$(CONFIG_TQM8260) += tqm8260_setup.o
obj-$(CONFIG_EV64260) += ev64260_setup.o obj-$(CONFIG_EV64260) += ev64260_setup.o
obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o
obj-$(CONFIG_K2) += k2_setup.o k2_pci.o obj-$(CONFIG_K2) += k2_setup.o k2_pci.o
......
...@@ -3,8 +3,12 @@ ...@@ -3,8 +3,12 @@
* will soon be removed. All of the clock values are computed from * will soon be removed. All of the clock values are computed from
* the configuration SCMR and the Power-On-Reset word. * the configuration SCMR and the Power-On-Reset word.
*/ */
#ifndef __EST8260_PLATFORM
#define __EST8260_PLATFORM
#define IMAP_ADDR ((uint)0xf0000000) #define IMAP_ADDR ((uint)0xf0000000)
#define BOOTROM_RESTART_ADDR ((uint)0xff000104)
/* A Board Information structure that is given to a program when /* A Board Information structure that is given to a program when
...@@ -25,3 +29,4 @@ typedef struct bd_info { ...@@ -25,3 +29,4 @@ typedef struct bd_info {
extern bd_t m8xx_board_info; extern bd_t m8xx_board_info;
#endif /* __EST8260_PLATFORM */
/*
* 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 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);
static int
est8260_show_cpuinfo(struct seq_file *m)
{
bd_t *binfo = (bd_t *)__res;
seq_printf(m, "vendor\t\t: EST Corporation\n"
"machine\t\t: SBC8260 PowerPC\n"
"\n"
"mem size\t\t: 0x%08x\n"
"console baud\t\t: %d\n"
"\n",
binfo->bi_memsize,
binfo->bi_baudrate);
return 0;
}
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 */
ppc_md.show_cpuinfo = est8260_show_cpuinfo;
callback_setup_arch = ppc_md.setup_arch;
ppc_md.setup_arch = est8260_setup_arch;
}
...@@ -56,10 +56,10 @@ static unsigned int cpu_6xx[16] = { ...@@ -56,10 +56,10 @@ static unsigned int cpu_6xx[16] = {
/* IDE functions */ /* IDE functions */
static void __init static void __init
k2_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, k2_ide_init_hwif_ports (hw_regs_t *hw, unsigned long data_port,
ide_ioreg_t ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i = 8; int i = 8;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
......
...@@ -104,9 +104,9 @@ lopec_power_off(void) ...@@ -104,9 +104,9 @@ lopec_power_off(void)
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
int lopec_ide_ports_known = 0; int lopec_ide_ports_known = 0;
static ide_ioreg_t lopec_ide_regbase[MAX_HWIFS]; static unsigned long lopec_ide_regbase[MAX_HWIFS];
static ide_ioreg_t lopec_ide_ctl_regbase[MAX_HWIFS]; static unsigned long lopec_ide_ctl_regbase[MAX_HWIFS];
static ide_ioreg_t lopec_idedma_regbase; static unsigned long lopec_idedma_regbase;
static void static void
lopec_ide_probe(void) lopec_ide_probe(void)
...@@ -126,7 +126,7 @@ lopec_ide_probe(void) ...@@ -126,7 +126,7 @@ lopec_ide_probe(void)
} }
static int static int
lopec_ide_default_irq(ide_ioreg_t base) lopec_ide_default_irq(unsigned long base)
{ {
if (lopec_ide_ports_known == 0) if (lopec_ide_ports_known == 0)
lopec_ide_probe(); lopec_ide_probe();
...@@ -139,7 +139,7 @@ lopec_ide_default_irq(ide_ioreg_t base) ...@@ -139,7 +139,7 @@ lopec_ide_default_irq(ide_ioreg_t base)
return 0; return 0;
} }
static ide_ioreg_t static unsigned long
lopec_ide_default_io_base(int index) lopec_ide_default_io_base(int index)
{ {
if (lopec_ide_ports_known == 0) if (lopec_ide_ports_known == 0)
...@@ -148,10 +148,10 @@ lopec_ide_default_io_base(int index) ...@@ -148,10 +148,10 @@ lopec_ide_default_io_base(int index)
} }
static void __init static void __init
lopec_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data, lopec_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data,
ide_ioreg_t ctl, int *irq) unsigned long ctl, int *irq)
{ {
ide_ioreg_t reg = data; unsigned long reg = data;
uint alt_status_base; uint alt_status_base;
int i; int i;
......
...@@ -274,9 +274,9 @@ mcpn765_show_cpuinfo(struct seq_file *m) ...@@ -274,9 +274,9 @@ mcpn765_show_cpuinfo(struct seq_file *m)
* IDE support. * IDE support.
*/ */
static int mcpn765_ide_ports_known = 0; static int mcpn765_ide_ports_known = 0;
static ide_ioreg_t mcpn765_ide_regbase[MAX_HWIFS]; static unsigned long mcpn765_ide_regbase[MAX_HWIFS];
static ide_ioreg_t mcpn765_ide_ctl_regbase[MAX_HWIFS]; static unsigned long mcpn765_ide_ctl_regbase[MAX_HWIFS];
static ide_ioreg_t mcpn765_idedma_regbase; static unsigned long mcpn765_idedma_regbase;
static void static void
mcpn765_ide_probe(void) mcpn765_ide_probe(void)
...@@ -298,7 +298,7 @@ mcpn765_ide_probe(void) ...@@ -298,7 +298,7 @@ mcpn765_ide_probe(void)
} }
static int static int
mcpn765_ide_default_irq(ide_ioreg_t base) mcpn765_ide_default_irq(unsigned long base)
{ {
if (mcpn765_ide_ports_known == 0) if (mcpn765_ide_ports_known == 0)
mcpn765_ide_probe(); mcpn765_ide_probe();
...@@ -311,7 +311,7 @@ mcpn765_ide_default_irq(ide_ioreg_t base) ...@@ -311,7 +311,7 @@ mcpn765_ide_default_irq(ide_ioreg_t base)
return 0; return 0;
} }
static ide_ioreg_t static unsigned long
mcpn765_ide_default_io_base(int index) mcpn765_ide_default_io_base(int index)
{ {
if (mcpn765_ide_ports_known == 0) if (mcpn765_ide_ports_known == 0)
...@@ -321,10 +321,10 @@ mcpn765_ide_default_io_base(int index) ...@@ -321,10 +321,10 @@ mcpn765_ide_default_io_base(int index)
} }
static void __init static void __init
mcpn765_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, mcpn765_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_ioreg_t ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
uint alt_status_base; uint alt_status_base;
int i; int i;
......
...@@ -194,10 +194,10 @@ menf1_map_io(void) ...@@ -194,10 +194,10 @@ menf1_map_io(void)
/* IDE functions */ /* IDE functions */
static void __init static void __init
menf1_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, menf1_ide_init_hwif_ports (hw_regs_t *hw, unsigned long data_port,
ide_ioreg_t ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i = 8; int i = 8;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
...@@ -215,7 +215,7 @@ menf1_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -215,7 +215,7 @@ menf1_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
} }
static int static int
menf1_ide_default_irq(ide_ioreg_t base) menf1_ide_default_irq(unsigned long base)
{ {
if (base == MENF1_IDE0_BASE_ADDR) if (base == MENF1_IDE0_BASE_ADDR)
return 14; return 14;
...@@ -225,7 +225,7 @@ menf1_ide_default_irq(ide_ioreg_t base) ...@@ -225,7 +225,7 @@ menf1_ide_default_irq(ide_ioreg_t base)
return 0; return 0;
} }
static ide_ioreg_t static unsigned long
menf1_ide_default_io_base(int index) menf1_ide_default_io_base(int index)
{ {
if (index == 0) if (index == 0)
......
/*
* arch/ppc/platforms/mpc82xx.h
*
* Board specific support for various 82xx platforms.
*
* Author: Allen Curtis <acurtis@onz.com>
*
* 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.
*/
#ifndef __CONFIG_82XX_PLATFORMS
#define __CONFIG_82XX_PLATFORMS
#ifdef CONFIG_8260
#ifdef CONFIG_EST8260
#include <platforms/est8260.h>
#endif
#ifdef CONFIG_SBS8260
#include <platforms/sbs8260.h>
#endif
#ifdef CONFIG_RPX6
#include <platforms/rpxsuper.h>
#endif
#ifdef CONFIG_WILLOW
#include <platforms/willow.h>
#endif
#ifdef CONFIG_TQM8260
#include <platforms/tqm8260.h>
#endif
#endif /* CONFIG_8260 */
#endif
...@@ -81,8 +81,9 @@ extern void pmac_read_rtc_time(void); ...@@ -81,8 +81,9 @@ extern void pmac_read_rtc_time(void);
extern void pmac_calibrate_decr(void); extern void pmac_calibrate_decr(void);
extern void pmac_pcibios_fixup(void); extern void pmac_pcibios_fixup(void);
extern void pmac_find_bridges(void); extern void pmac_find_bridges(void);
extern int pmac_ide_check_base(ide_ioreg_t base); extern unsigned long pmac_ide_get_base(int index);
extern ide_ioreg_t pmac_ide_get_base(int index); extern void pmac_ide_init_hwif_ports(hw_regs_t *hw,
unsigned long data_port, unsigned long ctrl_port, int *irq);
extern void pmac_nvram_update(void); extern void pmac_nvram_update(void);
extern unsigned char pmac_nvram_read_byte(int addr); extern unsigned char pmac_nvram_read_byte(int addr);
...@@ -630,6 +631,13 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -630,6 +631,13 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.feature_call = pmac_do_feature_call; ppc_md.feature_call = pmac_do_feature_call;
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
#ifdef CONFIG_BLK_DEV_IDE_PMAC
ppc_ide_md.ide_init_hwif = pmac_ide_init_hwif_ports;
ppc_ide_md.default_io_base = pmac_ide_get_base;
#endif /* CONFIG_BLK_DEV_IDE_PMAC */
#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
#ifdef CONFIG_BOOTX_TEXT #ifdef CONFIG_BOOTX_TEXT
ppc_md.progress = pmac_progress; ppc_md.progress = pmac_progress;
#endif /* CONFIG_BOOTX_TEXT */ #endif /* CONFIG_BOOTX_TEXT */
......
...@@ -235,7 +235,7 @@ pplus_init_IRQ(void) ...@@ -235,7 +235,7 @@ pplus_init_IRQ(void)
* IDE stuff. * IDE stuff.
*/ */
static int static int
pplus_ide_default_irq(ide_ioreg_t base) pplus_ide_default_irq(unsigned long base)
{ {
switch (base) { switch (base) {
case 0x1f0: return 14; case 0x1f0: return 14;
...@@ -244,7 +244,7 @@ pplus_ide_default_irq(ide_ioreg_t base) ...@@ -244,7 +244,7 @@ pplus_ide_default_irq(ide_ioreg_t base)
} }
} }
static ide_ioreg_t static unsigned long
pplus_ide_default_io_base(int index) pplus_ide_default_io_base(int index)
{ {
switch (index) { switch (index) {
...@@ -256,9 +256,9 @@ pplus_ide_default_io_base(int index) ...@@ -256,9 +256,9 @@ pplus_ide_default_io_base(int index)
} }
static void __init static void __init
pplus_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) pplus_ide_init_hwif_ports (hw_regs_t *hw, unsigned long data_port, unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
......
...@@ -1017,7 +1017,7 @@ prep_init_IRQ(void) ...@@ -1017,7 +1017,7 @@ prep_init_IRQ(void)
* IDE stuff. * IDE stuff.
*/ */
static int __prep static int __prep
prep_ide_default_irq(ide_ioreg_t base) prep_ide_default_irq(unsigned long base)
{ {
switch (base) { switch (base) {
case 0x1f0: return 13; case 0x1f0: return 13;
...@@ -1030,7 +1030,7 @@ prep_ide_default_irq(ide_ioreg_t base) ...@@ -1030,7 +1030,7 @@ prep_ide_default_irq(ide_ioreg_t base)
} }
} }
static ide_ioreg_t __prep static unsigned long __prep
prep_ide_default_io_base(int index) prep_ide_default_io_base(int index)
{ {
switch (index) { switch (index) {
......
...@@ -433,9 +433,9 @@ sandpoint_show_cpuinfo(struct seq_file *m) ...@@ -433,9 +433,9 @@ sandpoint_show_cpuinfo(struct seq_file *m)
* IDE support. * IDE support.
*/ */
static int sandpoint_ide_ports_known = 0; static int sandpoint_ide_ports_known = 0;
static ide_ioreg_t sandpoint_ide_regbase[MAX_HWIFS]; static unsigned long sandpoint_ide_regbase[MAX_HWIFS];
static ide_ioreg_t sandpoint_ide_ctl_regbase[MAX_HWIFS]; static unsigned long sandpoint_ide_ctl_regbase[MAX_HWIFS];
static ide_ioreg_t sandpoint_idedma_regbase; static unsigned long sandpoint_idedma_regbase;
static void static void
sandpoint_ide_probe(void) sandpoint_ide_probe(void)
...@@ -457,7 +457,7 @@ sandpoint_ide_probe(void) ...@@ -457,7 +457,7 @@ sandpoint_ide_probe(void)
} }
static int static int
sandpoint_ide_default_irq(ide_ioreg_t base) sandpoint_ide_default_irq(unsigned long base)
{ {
if (sandpoint_ide_ports_known == 0) if (sandpoint_ide_ports_known == 0)
sandpoint_ide_probe(); sandpoint_ide_probe();
...@@ -470,7 +470,7 @@ sandpoint_ide_default_irq(ide_ioreg_t base) ...@@ -470,7 +470,7 @@ sandpoint_ide_default_irq(ide_ioreg_t base)
return 0; return 0;
} }
static ide_ioreg_t static unsigned long
sandpoint_ide_default_io_base(int index) sandpoint_ide_default_io_base(int index)
{ {
if (sandpoint_ide_ports_known == 0) if (sandpoint_ide_ports_known == 0)
...@@ -480,10 +480,10 @@ sandpoint_ide_default_io_base(int index) ...@@ -480,10 +480,10 @@ sandpoint_ide_default_io_base(int index)
} }
static void __init static void __init
sandpoint_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, sandpoint_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_ioreg_t ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
uint alt_status_base; uint alt_status_base;
int i; int i;
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright (c) 2001 Wolfgang Denk (wd@denx.de) * Copyright (c) 2001 Wolfgang Denk (wd@denx.de)
*/ */
#ifndef __MACH_TQM8260_H #ifndef __TQM8260_PLATFORM
#define __MACH_TQM8260_H #define __TQM8260_PLATFORM
#include <linux/config.h> #include <linux/config.h>
...@@ -14,4 +14,6 @@ ...@@ -14,4 +14,6 @@
#define IMAP_ADDR ((uint)0xFFF00000) #define IMAP_ADDR ((uint)0xFFF00000)
#define PHY_INTERRUPT 25 #define PHY_INTERRUPT 25
#endif /* __MACH_TQM8260_H */ #define BOOTROM_RESTART_ADDR ((uint)0x40000104)
#endif /* __TQM8260_PLATFORM */
/*
* arch/ppc/platforms/tqm8260_setup.c
*
* TQM8260 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/immap_8260.h>
#include <asm/mpc8260.h>
#include <asm/machdep.h>
static void (*callback_setup_arch)(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);
static int
tqm8260_show_cpuinfo(struct seq_file *m)
{
bd_t *binfo = (bd_t *)__res;
seq_printf(m, "vendor\t\t: IN2 Systems\n"
"machine\t\t: TQM8260 PowerPC\n"
"mem size\t\t: 0x%08x\n"
"\n",
binfo->bi_memsize);
return 0;
}
static int
tqm8260_set_rtc_time(unsigned long time)
{
((immap_t *)IMAP_ADDR)->im_sit.sit_tmcnt = time;
((immap_t *)IMAP_ADDR)->im_sit.sit_tmcntsc = 0x3;
return(0);
}
static unsigned long
tqm8260_get_rtc_time(void)
{
return ((immap_t *)IMAP_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)
{
/* Generic 8260 platform initialization */
m8260_init(r3, r4, r5, r6, r7);
/* Anything special for this platform */
ppc_md.show_cpuinfo = tqm8260_show_cpuinfo;
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;
...@@ -64,5 +64,3 @@ obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \ ...@@ -64,5 +64,3 @@ obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o obj-$(CONFIG_BOOTX_TEXT) += btext.o
find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
...@@ -63,16 +63,6 @@ m8260_setup_arch(void) ...@@ -63,16 +63,6 @@ m8260_setup_arch(void)
m8260_cpm_reset(); m8260_cpm_reset();
} }
static void
abort(void)
{
#ifdef CONFIG_XMON
extern void xmon(void *);
xmon(0);
#endif
machine_restart(NULL);
}
/* The decrementer counts at the system (internal) clock frequency /* The decrementer counts at the system (internal) clock frequency
* divided by four. * divided by four.
*/ */
...@@ -93,30 +83,27 @@ m8260_calibrate_decr(void) ...@@ -93,30 +83,27 @@ m8260_calibrate_decr(void)
*/ */
static uint rtc_time; static uint rtc_time;
static static int static int
m8260_set_rtc_time(unsigned long time) m8260_set_rtc_time(unsigned long time)
{ {
#ifdef CONFIG_TQM8260
((immap_t *)IMAP_ADDR)->im_sit.sit_tmcnt = time;
((immap_t *)IMAP_ADDR)->im_sit.sit_tmcntsc = 0x3;
#else
rtc_time = time; rtc_time = time;
#endif
return(0); return(0);
} }
static unsigned long static unsigned long
m8260_get_rtc_time(void) m8260_get_rtc_time(void)
{ {
#ifdef CONFIG_TQM8260
return ((immap_t *)IMAP_ADDR)->im_sit.sit_tmcnt;
#else
/* Get time from the RTC. /* Get time from the RTC.
*/ */
return((unsigned long)rtc_time); return((unsigned long)rtc_time);
#endif
} }
#ifndef BOOTROM_RESTART_ADDR
#warning "Using default BOOTROM_RESTART_ADDR!"
#define BOOTROM_RESTART_ADDR 0xff000104
#endif
static void static void
m8260_restart(char *cmd) m8260_restart(char *cmd)
{ {
...@@ -127,32 +114,28 @@ m8260_restart(char *cmd) ...@@ -127,32 +114,28 @@ m8260_restart(char *cmd)
* of the reset vector. If that doesn't work for you, change this * of the reset vector. If that doesn't work for you, change this
* or the reboot program to send a proper address. * or the reboot program to send a proper address.
*/ */
#ifdef CONFIG_TQM8260 startaddr = BOOTROM_RESTART_ADDR;
startaddr = 0x40000104;
#else
startaddr = 0xff000104;
#endif
if (cmd != NULL) { if (cmd != NULL) {
if (!strncmp(cmd, "startaddr=", 10)) if (!strncmp(cmd, "startaddr=", 10))
startaddr = simple_strtoul(&cmd[10], NULL, 0); startaddr = simple_strtoul(&cmd[10], NULL, 0);
} }
m8260_gorom((unsigned int)__pa(__res), startaddr); m8260_gorom((void*)__pa(__res), startaddr);
} }
static void static void
m8260_power_off(void) m8260_halt(void)
{ {
m8260_restart(NULL); local_irq_disable();
while (1);
} }
static void static void
m8260_halt(void) m8260_power_off(void)
{ {
m8260_restart(NULL); m8260_halt();
} }
static int static int
m8260_show_percpuinfo(struct seq_file *m, int i) m8260_show_percpuinfo(struct seq_file *m, int i)
{ {
...@@ -181,9 +164,6 @@ m8260_init_IRQ(void) ...@@ -181,9 +164,6 @@ m8260_init_IRQ(void)
int i; int i;
void cpm_interrupt_init(void); void cpm_interrupt_init(void);
#if 0
ppc8260_pic.irq_offset = 0;
#endif
for ( i = 0 ; i < NR_SIU_INTS ; i++ ) for ( i = 0 ; i < NR_SIU_INTS ; i++ )
irq_desc[i].handler = &ppc8260_pic; irq_desc[i].handler = &ppc8260_pic;
...@@ -194,7 +174,6 @@ m8260_init_IRQ(void) ...@@ -194,7 +174,6 @@ m8260_init_IRQ(void)
immr->im_intctl.ic_siprr = 0x05309770; immr->im_intctl.ic_siprr = 0x05309770;
immr->im_intctl.ic_scprrh = 0x05309770; immr->im_intctl.ic_scprrh = 0x05309770;
immr->im_intctl.ic_scprrl = 0x05309770; immr->im_intctl.ic_scprrl = 0x05309770;
} }
/* /*
...@@ -219,12 +198,29 @@ m8260_find_end_of_memory(void) ...@@ -219,12 +198,29 @@ m8260_find_end_of_memory(void)
static void __init static void __init
m8260_map_io(void) m8260_map_io(void)
{ {
io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); uint addr;
io_block_mapping(0xe0000000, 0xe0000000, 0x10000000, _PAGE_IO);
/* Map IMMR region to a 256MB BAT */
addr = (immr != NULL) ? (uint)immr : IMAP_ADDR;
io_block_mapping(addr, addr, 0x10000000, _PAGE_IO);
/* Map I/O region to a 256MB BAT */
io_block_mapping(IO_VIRT_ADDR, IO_PHYS_ADDR, 0x10000000, _PAGE_IO);
} }
/* Inputs:
* r3 - Optional pointer to a board information structure.
* r4 - Optional pointer to the physical starting address of the init RAM
* disk.
* r5 - Optional pointer to the physical ending address of the init RAM
* disk.
* r6 - Optional pointer to the physical starting address of any kernel
* command-line parameters.
* r7 - Optional pointer to the physical ending address of any kernel
* command-line parameters.
*/
void __init void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5, m8260_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7) unsigned long r6, unsigned long r7)
{ {
parse_bootinfo(find_bootinfo()); parse_bootinfo(find_bootinfo());
...@@ -265,11 +261,3 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -265,11 +261,3 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.setup_io_mappings = m8260_map_io; ppc_md.setup_io_mappings = m8260_map_io;
} }
/* Mainly for ksyms.
*/
int
request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
unsigned long flag, const char *naem, void *dev)
{
panic("request IRQ\n");
}
...@@ -228,8 +228,8 @@ ppc4xx_progress(char *s, unsigned short hex) ...@@ -228,8 +228,8 @@ ppc4xx_progress(char *s, unsigned short hex)
*/ */
#if defined(CONFIG_PCI) && defined(CONFIG_IDE) #if defined(CONFIG_PCI) && defined(CONFIG_IDE)
static void static void
ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port, ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, unsigned long data_port,
ide_ioreg_t ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
int i; int i;
......
...@@ -33,11 +33,11 @@ extern void __ide_mm_insl(unsigned long port, void *addr, u32 count); ...@@ -33,11 +33,11 @@ extern void __ide_mm_insl(unsigned long port, void *addr, u32 count);
extern void __ide_mm_outsl(unsigned long port, void *addr, u32 count); extern void __ide_mm_outsl(unsigned long port, void *addr, u32 count);
struct ide_machdep_calls { struct ide_machdep_calls {
int (*default_irq)(ide_ioreg_t base); int (*default_irq)(unsigned long base);
ide_ioreg_t (*default_io_base)(int index); unsigned long (*default_io_base)(int index);
void (*ide_init_hwif)(hw_regs_t *hw, void (*ide_init_hwif)(hw_regs_t *hw,
ide_ioreg_t data_port, unsigned long data_port,
ide_ioreg_t ctrl_port, unsigned long ctrl_port,
int *irq); int *irq);
}; };
...@@ -46,14 +46,14 @@ extern struct ide_machdep_calls ppc_ide_md; ...@@ -46,14 +46,14 @@ extern struct ide_machdep_calls ppc_ide_md;
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(unsigned long base)
{ {
if (ppc_ide_md.default_irq) if (ppc_ide_md.default_irq)
return ppc_ide_md.default_irq(base); return ppc_ide_md.default_irq(base);
return 0; return 0;
} }
static __inline__ ide_ioreg_t ide_default_io_base(int index) static __inline__ unsigned long ide_default_io_base(int index)
{ {
if (ppc_ide_md.default_io_base) if (ppc_ide_md.default_io_base)
return ppc_ide_md.default_io_base(index); return ppc_ide_md.default_io_base(index);
...@@ -66,10 +66,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index) ...@@ -66,10 +66,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index)
* as the pmac IDE interfaces. * as the pmac IDE interfaces.
*/ */
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, static __inline__ void ide_init_hwif_ports(hw_regs_t *hw,
ide_ioreg_t data_port, unsigned long data_port,
ide_ioreg_t ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++)
...@@ -92,7 +92,7 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -92,7 +92,7 @@ static __inline__ void ide_init_default_hwifs(void)
#ifndef CONFIG_PCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
ide_ioreg_t base; unsigned long base;
for (index = 0; index < MAX_HWIFS; index++) { for (index = 0; index < MAX_HWIFS; index++) {
base = ide_default_io_base(index); base = ide_default_io_base(index);
......
...@@ -9,51 +9,35 @@ ...@@ -9,51 +9,35 @@
#define __CONFIG_8260_DEFS #define __CONFIG_8260_DEFS
#include <linux/config.h> #include <linux/config.h>
#include <platforms/mpc82xx.h>
#ifdef CONFIG_8260 /* Make sure the memory translation stuff is there if PCI not used.
*/
#ifdef CONFIG_EST8260 #ifndef _IO_BASE
#include <platforms/est8260.h> #define _IO_BASE 0
#endif #endif
#ifdef CONFIG_SBS8260 #ifndef _ISA_MEM_BASE
#include <platforms/sbs8260.h> #define _ISA_MEM_BASE 0
#endif #endif
#ifdef CONFIG_RPX6 #ifndef PCI_DRAM_OFFSET
#include <platforms/rpxsuper.h> #define PCI_DRAM_OFFSET 0
#endif #endif
#ifdef CONFIG_WILLOW /* Map 256MB I/O region
#include <platforms/willow.h> */
#ifndef IO_PHYS_ADDR
#define IO_PHYS_ADDR 0xe0000000
#endif #endif
#ifndef IO_VIRT_ADDR
#ifdef CONFIG_TQM8260 #define IO_VIRT_ADDR IO_PHYS_ADDR
#include <platforms/tqm8260.h>
#endif #endif
/* I don't yet have the ISA or PCI stuff done....no 8260 with
* such thing.....
*/
#define _IO_BASE 0
#define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0
/* The "residual" data board information structure the boot loader /* The "residual" data board information structure the boot loader
* hands to us. * hands to us.
*/ */
extern unsigned char __res[]; extern unsigned char __res[];
/* I need this to get pt_regs.......
*/
#include <asm/ptrace.h>
extern int request_8xxirq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
unsigned long flags,
const char *device,
void *dev_id);
#endif /* CONFIG_8260 */
#endif /* !__CONFIG_8260_DEFS */ #endif /* !__CONFIG_8260_DEFS */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -271,9 +271,10 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, ...@@ -271,9 +271,10 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
#define HAVE_PCI_MMAP 1 #define HAVE_PCI_MMAP 1
#endif /* __KERNEL__ */ extern void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res);
/* generic pci stuff */ #endif /* __KERNEL__ */
#include <asm-generic/pci.h>
#endif /* __PPC_PCI_H */ #endif /* __PPC_PCI_H */
...@@ -35,15 +35,14 @@ ...@@ -35,15 +35,14 @@
#define RTC_AIE 0x20 /* alarm interrupt enable */ #define RTC_AIE 0x20 /* alarm interrupt enable */
#define RTC_UIE 0x10 /* update-finished interrupt enable */ #define RTC_UIE 0x10 /* update-finished interrupt enable */
extern void gen_rtc_interrupt(unsigned long);
/* some dummy definitions */ /* some dummy definitions */
#define RTC_BATT_BAD 0x100 /* battery bad */
#define RTC_SQWE 0x08 /* enable square-wave output */ #define RTC_SQWE 0x08 /* enable square-wave output */
#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */ #define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ #define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ #define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
static inline void get_rtc_time(struct rtc_time *time) static inline unsigned int get_rtc_time(struct rtc_time *time)
{ {
if (ppc_md.get_rtc_time) { if (ppc_md.get_rtc_time) {
unsigned long nowtime; unsigned long nowtime;
...@@ -55,6 +54,7 @@ static inline void get_rtc_time(struct rtc_time *time) ...@@ -55,6 +54,7 @@ static inline void get_rtc_time(struct rtc_time *time)
time->tm_year -= 1900; time->tm_year -= 1900;
time->tm_mon -= 1; /* Make sure userland has a 0-based month */ time->tm_mon -= 1; /* Make sure userland has a 0-based month */
} }
return RTC_24H;
} }
/* Set the current date and time in the real time clock. */ /* Set the current date and time in the real time clock. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment