Commit 78cc0f43 authored by Matt Porter's avatar Matt Porter Committed by Linus Torvalds

PPC32: Add new arch/ppc/syslib/ directory for "system library" code.

This changeset moves all "system library" code to this directory.
System library code includes all common libraries
of routines (PIC, system controller, host bridge, kernel feature
enablement are all examples of things that belong here). The existing
arch/ppc/kernel/ directory keeps all "core" CPU support.  Cache
handling, basic cpu startup, tlb manipulation, and core kernel
code all belong here.  The arch/ppc/platforms/ directory now
contains only platform family specific files.  For SoC processors
this includes the OCP glue-code that defines an SoC family.
parent 19cdce9c
......@@ -54,7 +54,7 @@ else
endif
core-y += arch/ppc/kernel/ arch/ppc/platforms/ \
arch/ppc/mm/ arch/ppc/lib/
arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/
core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/
core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/
core-$(CONFIG_XMON) += arch/ppc/xmon/
......
......@@ -9,9 +9,6 @@ ifdef CONFIG_4xx
EXTRA_AFLAGS := -Wa,-m405
endif
CFLAGS_prom_init.o += -mrelocatable-lib
CFLAGS_btext.o += -mrelocatable-lib
# Start off with 'head.o', change as needed.
HEAD-y := head.o
HEAD-$(CONFIG_40x) := head_4xx.o
......@@ -20,7 +17,7 @@ HEAD-$(CONFIG_PPC_ISERIES) := iSeries_head.o
EXTRA_TARGETS := $(HEAD-y)
export-objs := ppc_ksyms.o time.o ppc405_dma.o
export-objs := ppc_ksyms.o time.o
obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
process.o signal.o ptrace.o align.o \
......@@ -36,55 +33,11 @@ obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_TAU) += temp.o
ifeq ($(CONFIG_4xx),y)
obj-$(CONFIG_4xx) += ppc4xx_setup.o ppc4xx_pic.o ppc4xx_serial.o
obj-$(CONFIG_PPC_RTC) += todc_time.o
obj-$(CONFIG_KGDB) += ppc4xx_kgdb.o
obj-$(CONFIG_405_DMA) += ppc405_dma.o
obj-$(CONFIG_PCI) += ppc405_pci.o indirect_pci.o pci_auto.o
obj-$(CONFIG_PM) += ppc4xx_pm.o
endif
obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o
ifeq ($(CONFIG_8xx),y)
obj-$(CONFIG_PCI) += qspan_pci.o i8259.o
ifneq ($(CONFIG_MATH_EMULATION),n)
obj-y += softemu8xx.o
endif
endif
obj-$(CONFIG_ALL_PPC) += prom_init.o prom.o open_pic.o \
indirect_pci.o i8259.o
obj-$(CONFIG_ADIR) += i8259.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_EV64260) += gt64260_common.o gt64260_pic.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_GEMINI) += open_pic.o i8259.o indirect_pci.o
obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \
pci_auto.o
obj-$(CONFIG_LOPEC) += mpc10x_common.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o todc_time.o
obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o pplus_common.o
obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \
pci_auto.o indirect_pci.o
obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \
i8259.o pci_auto.o pplus_common.o
obj-$(CONFIG_PCORE) += mpc10x_common.o todc_time.o i8259.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_POWERPMC250) += open_pic.o mpc10x_common.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_PPLUS) += pplus_common.o open_pic.o i8259.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o
obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o harrier.o
obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o mpc10x_common.o \
pci_auto.o indirect_pci.o todc_time.o
obj-$(CONFIG_SPRUCE) += indirect_pci.o pci_auto.o todc_time.o
obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \
i8259.o open_pic.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o
obj-$(CONFIG_PPC_ISERIES) += iSeries_misc.o
include $(TOPDIR)/Rules.make
......
......@@ -17,8 +17,8 @@
#ifdef __KERNEL__
#ifndef __ASM_ASH_H__
#define __ASM_ASH_H__
#include <platforms/ibm_ocp.h>
#include <platforms/ibmnp405h.h>
#include <platforms/4xx/ibm_ocp.h>
#include <platforms/4xx/ibmnp405h.h>
#ifndef __ASSEMBLY__
/*
......
......@@ -17,7 +17,7 @@
#ifdef __KERNEL__
#ifndef __ASM_CEDER_H__
#define __ASM_CEDER_H__
#include <platforms/ibmnp405l.h>
#include <platforms/4xx/ibmnp405l.h>
#ifndef __ASSEMBLY__
/*
......
......@@ -12,7 +12,7 @@
#include <asm/pci-bridge.h>
#include <asm/machdep.h>
#include <asm/todc.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
#undef DEBUG
#ifdef DEBUG
......
......@@ -13,7 +13,7 @@
#define __ASM_EP405_H__
/* We have a 405GP core */
#include <platforms/ibm405gp.h>
#include <platforms/4xx/ibm405gp.h>
#ifndef __ASSEMBLY__
typedef struct board_info {
......
......@@ -39,7 +39,7 @@
#include <linux/threads.h>
#include <linux/param.h>
#include <linux/string.h>
#include <platforms/ibm405gp.h>
#include <platforms/4xx/ibm405gp.h>
const struct pcil0_regs *PCIL_ADDR[] = {
(struct pcil0_regs *) PCIL0_BASE,
......
......@@ -50,7 +50,7 @@
#define __ASM_IBM405GP_H__
#include <linux/config.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */
......@@ -189,7 +189,7 @@
#define DCRN_UIC0_BASE 0x0C0
#define UIC0 DCRN_UIC0_BASE
#include <platforms/ibm405.h>
#include <asm/ibm405.h>
#endif /* __ASM_IBM405GP_H__ */
#endif /* __KERNEL__ */
......@@ -39,7 +39,7 @@
#include <linux/threads.h>
#include <linux/param.h>
#include <linux/string.h>
#include <platforms/ibmnp405h.h>
#include <platforms/4xx/ibmnp405h.h>
const struct NS16550* COM_PORTS[] =
{
......
......@@ -42,7 +42,7 @@
#define __ASM_IBMNP405H_H__
#include <linux/config.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */
......@@ -166,7 +166,7 @@
#define DCRN_UIC1_VCR (DCRN_UIC1_BASE + 0x8)
#endif
#include <platforms/ibm405.h>
#include <asm/ibm405.h>
#endif /* __ASM_IBMNP405H_H__ */
#endif /* __KERNEL__ */
......@@ -39,7 +39,7 @@
#include <linux/threads.h>
#include <linux/param.h>
#include <linux/string.h>
#include <platforms/ibmnp405l.h>
#include <platforms/4xx/ibmnp405l.h>
const struct NS16550* COM_PORTS[] =
{
......
......@@ -42,7 +42,7 @@
#define __ASM_IBMNP405L_H__
#include <linux/config.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */
......@@ -150,7 +150,7 @@
#define DCRN_UIC1_VCR (DCRN_UIC1_BASE + 0x8)
#endif
#include <platforms/ibm405.h>
#include <asm/ibm405.h>
#endif /* __ASM_IBMNP405L_H__ */
#endif /* __KERNEL__ */
......@@ -34,7 +34,7 @@
*/
#include <linux/config.h>
#include <platforms/ibmstb3.h>
#include <platforms/4xx/ibmstb3.h>
const struct NS16550* COM_PORTS[] =
{
......
......@@ -48,7 +48,7 @@
#define __ASM_IBMSTBX_H__
#include <linux/config.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
/* ibm405.h at bottom of this file */
......@@ -282,7 +282,7 @@
#define DCRN_OCMDSCR (DCRN_OCM0_BASE + 0x3) /* OCM Data Side Control */
#endif
#include <platforms/ibm405.h>
#include <asm/ibm405.h>
#endif /* __ASM_IBMSTBX_H__ */
#endif /* __KERNEL__ */
......@@ -34,7 +34,7 @@
*/
#include <linux/config.h>
#include <platforms/ibmstb4.h>
#include <platforms/4xx/ibmstb4.h>
const struct NS16550* COM_PORTS[] =
{
......
......@@ -42,7 +42,7 @@
#define __ASM_IBMSTB4_H__
#include <linux/config.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
/* serial port defines */
#define STB04xxx_IO_BASE ((uint)0xe0000000)
......@@ -262,7 +262,7 @@
#define DCRN_BESR0 (DCRN_EBIMC_BASE + 0x21) /* Bus Error Status Register */
#define DCRN_BIUCR (DCRN_EBIMC_BASE + 0x2A) /* Bus Interfac Unit Ctrl Reg */
#include <platforms/ibm405.h>
#include <asm/ibm405.h>
#endif /* __ASM_IBMSTB4_H__ */
#endif /* __KERNEL__ */
......@@ -16,7 +16,7 @@
#define __ASM_REDWOOD_H__
/* Redwoods have an STB03xxx or STB04xxx core */
#include <platforms/ibmstb3.h>
#include <platforms/4xx/ibmstb3.h>
#ifndef __ASSEMBLY__
typedef struct board_info {
......
......@@ -16,7 +16,7 @@
#define __ASM_REDWOOD5_H__
/* Redwood5 has an STB04xxx core */
#include <platforms/ibmstb4.h>
#include <platforms/4xx/ibmstb4.h>
#ifndef __ASSEMBLY__
typedef struct board_info {
......
......@@ -39,7 +39,7 @@
#include <asm/page.h>
#include <asm/time.h>
#include <asm/io.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
#ifdef CONFIG_PPC_RTC
#include <asm/todc.h>
......
......@@ -25,7 +25,7 @@
#define __ASM_WALNUT_H__
/* We have a 405GP core */
#include <platforms/ibm405gp.h>
#include <platforms/4xx/ibm405gp.h>
#ifndef __ASSEMBLY__
/*
......
......@@ -37,14 +37,14 @@ obj-$(CONFIG_LOPEC) += lopec_setup.o lopec_pci.o
obj-$(CONFIG_MCPN765) += mcpn765_setup.o mcpn765_pci.o
obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o
obj-$(CONFIG_MVME5100) += mvme5100_setup.o mvme5100_pci.o
obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o cpc700_pic.o
obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o
obj-$(CONFIG_PCORE) += pcore_setup.o pcore_pci.o
obj-$(CONFIG_POWERPMC250) += powerpmc250.o
obj-$(CONFIG_PPLUS) += pplus_pci.o pplus_setup.o
obj-$(CONFIG_PRPMC750) += prpmc750_setup.o prpmc750_pci.o
obj-$(CONFIG_PRPMC800) += prpmc800_setup.o prpmc800_pci.o
obj-$(CONFIG_SANDPOINT) += sandpoint_setup.o sandpoint_pci.o
obj-$(CONFIG_SPRUCE) += spruce_setup.o spruce_pci.o cpc700_pic.o
obj-$(CONFIG_SPRUCE) += spruce_setup.o spruce_pci.o
obj-$(CONFIG_ZX4500) += zx4500_setup.o zx4500_pci.o
obj-$(CONFIG_PPC_ISERIES) += iSeries_setup.o iSeries_time.o \
iSeries_dma.o iSeries_pic.o
......
......@@ -18,7 +18,7 @@
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include "cpc710.h"
#include <syslib/cpc710.h>
#include "adir.h"
#undef DEBUG
......
......@@ -24,7 +24,8 @@
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include "cpc710.h"
#include <syslib/cpc710.h>
#include "k2.h"
#undef DEBUG
......
......@@ -23,7 +23,8 @@
#include <asm/pci-bridge.h>
#include <asm/uaccess.h>
#include "cpc700.h"
#include <syslib/cpc700.h>
#include "pal4.h"
/* not much to this.... */
......
......@@ -31,7 +31,8 @@
#include <asm/todc.h>
#include <asm/bootinfo.h>
#include "cpc700.h"
#include <syslib/cpc700.h>
#include "pal4.h"
extern void pal4_find_bridges(void);
......
......@@ -41,7 +41,7 @@
#include <asm/pci-bridge.h>
#include <platforms/spruce.h>
#include "cpc700.h"
#include <syslib/cpc700.h>
static inline int
spruce_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
......
......@@ -57,7 +57,7 @@
#include <asm/todc.h>
#include <asm/bootinfo.h>
#include "cpc700.h"
#include <syslib/cpc700.h>
extern void spruce_init_IRQ(void);
extern int spruce_get_irq(struct pt_regs *);
......@@ -185,8 +185,6 @@ spruce_halt(void)
spruce_restart(NULL);
}
extern int boot_mem_size;
static void __init
spruce_map_io(void)
{
......
#
# Makefile for the linux kernel.
#
ifdef CONFIG_PPC64BRIDGE
EXTRA_AFLAGS := -Wa,-mppc64bridge
endif
ifdef CONFIG_4xx
EXTRA_AFLAGS := -Wa,-m405
endif
CFLAGS_prom_init.o += -mrelocatable-lib
CFLAGS_btext.o += -mrelocatable-lib
obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
ifeq ($(CONFIG_4xx),y)
obj-$(CONFIG_4xx) += ppc4xx_setup.o ppc4xx_pic.o ppc4xx_serial.o
obj-$(CONFIG_PPC_RTC) += todc_time.o
obj-$(CONFIG_KGDB) += ppc4xx_kgdb.o
obj-$(CONFIG_405_DMA) += ppc405_dma.o
obj-$(CONFIG_PCI) += ppc405_pci.o indirect_pci.o pci_auto.o
obj-$(CONFIG_PM) += ppc4xx_pm.o
endif
obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o
ifeq ($(CONFIG_8xx),y)
obj-$(CONFIG_PCI) += qspan_pci.o i8259.o
endif
obj-$(CONFIG_ALL_PPC) += prom_init.o prom.o open_pic.o \
indirect_pci.o i8259.o
obj-$(CONFIG_ADIR) += i8259.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_EV64260) += gt64260_common.o gt64260_pic.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_GEMINI) += open_pic.o i8259.o indirect_pci.o
obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \
pci_auto.o
obj-$(CONFIG_LOPEC) += mpc10x_common.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o todc_time.o
obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o pplus_common.o
obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \
pci_auto.o indirect_pci.o
obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \
i8259.o pci_auto.o pplus_common.o
obj-$(CONFIG_PAL4) += cpc700_pic.o
obj-$(CONFIG_PCORE) += mpc10x_common.o todc_time.o i8259.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_POWERPMC250) += open_pic.o mpc10x_common.o \
indirect_pci.o pci_auto.o
obj-$(CONFIG_PPLUS) += pplus_common.o open_pic.o i8259.o \
indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o
obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o harrier.o
obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o mpc10x_common.o \
pci_auto.o indirect_pci.o todc_time.o
obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \
i8259.o open_pic.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o
include $(TOPDIR)/Rules.make
find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
......@@ -38,7 +38,7 @@
#include <linux/init.h>
#include <asm/ibm4xx.h>
#include <asm/pci-bridge.h>
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
#ifdef CONFIG_DEBUG_BRINGUP
#define DBG(x...) printk(x)
......
......@@ -14,7 +14,7 @@
#define LSR_TEMT 0x40 /* Xmitter empty */
#define LSR_ERR 0x80 /* Error */
#include <platforms/ibm_ocp.h>
#include <platforms/4xx/ibm_ocp.h>
extern struct NS16550* COM_PORTS[];
#ifndef NULL
......
......@@ -19,35 +19,35 @@
#ifdef CONFIG_40x
#if defined(CONFIG_ASH)
#include <platforms/ash.h>
#include <platforms/4xx/ash.h>
#endif
#if defined (CONFIG_CEDER)
#include <platforms/ceder.h>
#include <platforms/4xx/ceder.h>
#endif
#if defined(CONFIG_CPCI405)
#include <platforms/cpci405.h>
#include <platforms/4xx/cpci405.h>
#endif
#if defined(CONFIG_EP405)
#include <platforms/ep405.h>
#include <platforms/4xx/ep405.h>
#endif
#if defined(CONFIG_OAK)
#include <platforms/oak.h>
#include <platforms/4xx/oak.h>
#endif
#if defined(CONFIG_REDWOOD_4)
#include <platforms/redwood.h>
#include <platforms/4xx/redwood.h>
#endif
#if defined(CONFIG_REDWOOD_5)
#include <platforms/redwood5.h>
#include <platforms/4xx/redwood5.h>
#endif
#if defined(CONFIG_WALNUT)
#include <platforms/walnut.h>
#include <platforms/4xx/walnut.h>
#endif
#ifndef PPC4xx_MACHINE_NAME
......
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