Commit fc03da1c authored by Linus Torvalds's avatar Linus Torvalds
parents caf5b04c e05b3b4a
...@@ -151,7 +151,7 @@ export srctree objtree VPATH TOPDIR ...@@ -151,7 +151,7 @@ export srctree objtree VPATH TOPDIR
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc64/powerpc/ ) -e s/ppc.*/powerpc/ )
# Cross compiling and selecting different set of gcc/bin-utils # Cross compiling and selecting different set of gcc/bin-utils
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
...@@ -78,17 +78,6 @@ config PPC_UDBG_16550 ...@@ -78,17 +78,6 @@ config PPC_UDBG_16550
bool bool
default n default n
config CRASH_DUMP
bool "kernel crash dumps (EXPERIMENTAL)"
depends on PPC_MULTIPLATFORM
depends on EXPERIMENTAL
help
Build a kernel suitable for use as a kdump capture kernel.
The kernel will be linked at a different address than normal, and
so can only be used for Kdump.
Don't change this unless you know what you are doing.
config GENERIC_TBSYNC config GENERIC_TBSYNC
bool bool
default y if PPC32 && SMP default y if PPC32 && SMP
...@@ -584,6 +573,16 @@ config KEXEC ...@@ -584,6 +573,16 @@ config KEXEC
support. As of this writing the exact hardware interface is support. As of this writing the exact hardware interface is
strongly in flux, so no good recommendation can be made. strongly in flux, so no good recommendation can be made.
config CRASH_DUMP
bool "kernel crash dumps (EXPERIMENTAL)"
depends on PPC_MULTIPLATFORM && PPC64 && EXPERIMENTAL
help
Build a kernel suitable for use as a kdump capture kernel.
The kernel will be linked at a different address than normal, and
so can only be used for Kdump.
Don't change this unless you know what you are doing.
config EMBEDDEDBOOT config EMBEDDEDBOOT
bool bool
depends on 8xx || 8260 depends on 8xx || 8260
......
...@@ -27,6 +27,7 @@ BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \ ...@@ -27,6 +27,7 @@ BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
OBJCOPYFLAGS := contents,alloc,load,readonly,data OBJCOPYFLAGS := contents,alloc,load,readonly,data
OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000 OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000
OBJCOPY_MIB_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment
zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c
zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h
...@@ -90,11 +91,11 @@ gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) ...@@ -90,11 +91,11 @@ gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section)))
hostprogs-y := addnote addRamDisk hack-coff hostprogs-y := addnote addRamDisk hack-coff
targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \ targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \
zImage.coff zImage.initrd.coff \ zImage.coff zImage.initrd.coff miboot.image miboot.initrd.image \
$(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \
$(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \
$(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \
vmlinux.initrd vmlinux.initrd dummy.o
extra-y := initrd.o extra-y := initrd.o
quiet_cmd_ramdisk = RAMDISK $@ quiet_cmd_ramdisk = RAMDISK $@
...@@ -116,6 +117,10 @@ quiet_cmd_addsection = ADDSEC $@ ...@@ -116,6 +117,10 @@ quiet_cmd_addsection = ADDSEC $@
quiet_cmd_addnote = ADDNOTE $@ quiet_cmd_addnote = ADDNOTE $@
cmd_addnote = $(obj)/addnote $@ cmd_addnote = $(obj)/addnote $@
quiet_cmd_gen-miboot = GEN $@
cmd_gen-miboot = $(OBJCOPY) $(OBJCOPY_MIB_ARGS) \
--add-section=$1=$(word 2, $^) $< $@
quiet_cmd_gencoff = COFF $@ quiet_cmd_gencoff = COFF $@
cmd_gencoff = $(OBJCOPY) $(OBJCOPY_COFF_ARGS) $@ && \ cmd_gencoff = $(OBJCOPY) $(OBJCOPY_COFF_ARGS) $@ && \
$(obj)/hack-coff $@ $(obj)/hack-coff $@
...@@ -141,19 +146,25 @@ $(obj)/zImage.initrd.vmode $(obj)/zImage.initrd.coff: obj-boot += $(call obj-sec ...@@ -141,19 +146,25 @@ $(obj)/zImage.initrd.vmode $(obj)/zImage.initrd.coff: obj-boot += $(call obj-sec
$(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(srctree)/$(src)/zImage.lds $(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(srctree)/$(src)/zImage.lds
$(call cmd,bootld,$(obj-boot),zImage.lds) $(call cmd,bootld,$(obj-boot),zImage.lds)
# For 32-bit powermacs, build the COFF images as well as the ELF images. # For 32-bit powermacs, build the COFF and miboot images
# as well as the ELF images.
coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff
coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff
mibootimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.image
mibrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.initrd.image
$(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y) $(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y) \
$(mibootimg-y-y)
@cp -f $< $@ @cp -f $< $@
$(call if_changed,addnote) $(call if_changed,addnote)
$(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote $(coffrdimg-y-y) $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote \
$(coffrdimg-y-y) $(mibrdimg-y-y)
@cp -f $< $@ @cp -f $< $@
$(call if_changed,addnote) $(call if_changed,addnote)
$(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff $(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) \
$(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff
$(call cmd,bootld,$(obj-boot),zImage.coff.lds) $(call cmd,bootld,$(obj-boot),zImage.coff.lds)
$(call cmd,gencoff) $(call cmd,gencoff)
...@@ -162,6 +173,12 @@ $(obj)/zImage.initrd.coff: $(call obj-sec, $(required) $(initrd)) $(obj-boot) \ ...@@ -162,6 +173,12 @@ $(obj)/zImage.initrd.coff: $(call obj-sec, $(required) $(initrd)) $(obj-boot) \
$(call cmd,bootld,$(obj-boot),zImage.coff.lds) $(call cmd,bootld,$(obj-boot),zImage.coff.lds)
$(call cmd,gencoff) $(call cmd,gencoff)
$(obj)/miboot.image: $(obj)/dummy.o $(obj)/vmlinux.gz
$(call cmd,gen-miboot,image)
$(obj)/miboot.initrd.image: $(obj)/miboot.image $(images)/ramdisk.image.gz
$(call cmd,gen-miboot,initrd)
#----------------------------------------------------------- #-----------------------------------------------------------
# build u-boot images # build u-boot images
#----------------------------------------------------------- #-----------------------------------------------------------
......
int main(void)
{
return 0;
}
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.15-rc5 # Linux kernel version: 2.6.15
# Tue Dec 13 17:24:05 2005 # Sat Jan 14 16:26:08 2006
# #
# CONFIG_PPC64 is not set # CONFIG_PPC64 is not set
CONFIG_PPC32=y CONFIG_PPC32=y
...@@ -15,11 +15,15 @@ CONFIG_EARLY_PRINTK=y ...@@ -15,11 +15,15 @@ CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_NVRAM=y CONFIG_GENERIC_NVRAM=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
# CONFIG_PPC_UDBG_16550 is not set
# CONFIG_CRASH_DUMP is not set
# CONFIG_GENERIC_TBSYNC is not set
# #
# Processor support # Processor support
# #
CONFIG_6xx=y CONFIG_CLASSIC32=y
# CONFIG_PPC_52xx is not set # CONFIG_PPC_52xx is not set
# CONFIG_PPC_82xx is not set # CONFIG_PPC_82xx is not set
# CONFIG_PPC_83xx is not set # CONFIG_PPC_83xx is not set
...@@ -28,6 +32,7 @@ CONFIG_6xx=y ...@@ -28,6 +32,7 @@ CONFIG_6xx=y
# CONFIG_8xx is not set # CONFIG_8xx is not set
# CONFIG_E200 is not set # CONFIG_E200 is not set
# CONFIG_E500 is not set # CONFIG_E500 is not set
CONFIG_6xx=y
CONFIG_PPC_FPU=y CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y CONFIG_ALTIVEC=y
CONFIG_PPC_STD_MMU=y CONFIG_PPC_STD_MMU=y
...@@ -53,17 +58,18 @@ CONFIG_POSIX_MQUEUE=y ...@@ -53,17 +58,18 @@ CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set # CONFIG_AUDIT is not set
CONFIG_HOTPLUG=y
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y CONFIG_PRINTK=y
CONFIG_BUG=y CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y CONFIG_BASE_FULL=y
CONFIG_FUTEX=y CONFIG_FUTEX=y
CONFIG_EPOLL=y CONFIG_EPOLL=y
...@@ -72,8 +78,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 ...@@ -72,8 +78,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0 CONFIG_CC_ALIGN_JUMPS=0
CONFIG_SLAB=y
# CONFIG_TINY_SHMEM is not set # CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0 CONFIG_BASE_SMALL=0
# CONFIG_SLOB is not set
# #
# Loadable module support # Loadable module support
...@@ -113,13 +121,10 @@ CONFIG_PPC_MULTIPLATFORM=y ...@@ -113,13 +121,10 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_APUS is not set # CONFIG_APUS is not set
# CONFIG_PPC_CHRP is not set # CONFIG_PPC_CHRP is not set
CONFIG_PPC_PMAC=y CONFIG_PPC_PMAC=y
CONFIG_PPC_OF=y
CONFIG_MPIC=y CONFIG_MPIC=y
# CONFIG_PPC_RTAS is not set # CONFIG_PPC_RTAS is not set
# CONFIG_MMIO_NVRAM is not set # CONFIG_MMIO_NVRAM is not set
# CONFIG_CRASH_DUMP is not set
CONFIG_PPC_MPC106=y CONFIG_PPC_MPC106=y
# CONFIG_GENERIC_TBSYNC is not set
CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set # CONFIG_CPU_FREQ_DEBUG is not set
...@@ -195,6 +200,11 @@ CONFIG_CARDBUS=y ...@@ -195,6 +200,11 @@ CONFIG_CARDBUS=y
# PC-card bridges # PC-card bridges
# #
CONFIG_YENTA=m CONFIG_YENTA=m
CONFIG_YENTA_O2=y
CONFIG_YENTA_RICOH=y
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
# CONFIG_PD6729 is not set # CONFIG_PD6729 is not set
# CONFIG_I82092 is not set # CONFIG_I82092 is not set
CONFIG_PCCARD_NONSTATIC=m CONFIG_PCCARD_NONSTATIC=m
...@@ -464,7 +474,7 @@ CONFIG_IEEE80211_CRYPT_TKIP=m ...@@ -464,7 +474,7 @@ CONFIG_IEEE80211_CRYPT_TKIP=m
# #
# CONFIG_STANDALONE is not set # CONFIG_STANDALONE is not set
CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m CONFIG_FW_LOADER=y
# CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DRIVER is not set
# #
...@@ -491,7 +501,7 @@ CONFIG_PROC_EVENTS=y ...@@ -491,7 +501,7 @@ CONFIG_PROC_EVENTS=y
# Block devices # Block devices
# #
# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_FD is not set
CONFIG_MAC_FLOPPY=y CONFIG_MAC_FLOPPY=m
# CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_DAC960 is not set
...@@ -603,7 +613,7 @@ CONFIG_SCSI_CONSTANTS=y ...@@ -603,7 +613,7 @@ CONFIG_SCSI_CONSTANTS=y
# SCSI Transport Attributes # SCSI Transport Attributes
# #
CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_FC_ATTRS is not set CONFIG_SCSI_FC_ATTRS=y
# CONFIG_SCSI_ISCSI_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set # CONFIG_SCSI_SAS_ATTRS is not set
...@@ -645,12 +655,7 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 ...@@ -645,12 +655,7 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLA2XXX=y CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA21XX is not set # CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA24XX is not set
# CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DC390T is not set
...@@ -658,7 +663,7 @@ CONFIG_SCSI_QLA2XXX=y ...@@ -658,7 +663,7 @@ CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_DEBUG is not set
CONFIG_SCSI_MESH=y CONFIG_SCSI_MESH=y
CONFIG_SCSI_MESH_SYNC_RATE=5 CONFIG_SCSI_MESH_SYNC_RATE=5
CONFIG_SCSI_MESH_RESET_DELAY_MS=1000 CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
CONFIG_SCSI_MAC53C94=y CONFIG_SCSI_MAC53C94=y
# #
...@@ -727,7 +732,6 @@ CONFIG_IEEE1394_SBP2=m ...@@ -727,7 +732,6 @@ CONFIG_IEEE1394_SBP2=m
CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_ETH1394=m
CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_DV1394=m
CONFIG_IEEE1394_RAWIO=m CONFIG_IEEE1394_RAWIO=m
# CONFIG_IEEE1394_CMP is not set
# #
# I2O device support # I2O device support
...@@ -740,7 +744,7 @@ CONFIG_IEEE1394_RAWIO=m ...@@ -740,7 +744,7 @@ CONFIG_IEEE1394_RAWIO=m
CONFIG_ADB=y CONFIG_ADB=y
CONFIG_ADB_CUDA=y CONFIG_ADB_CUDA=y
CONFIG_ADB_PMU=y CONFIG_ADB_PMU=y
CONFIG_PMAC_APM_EMU=y CONFIG_PMAC_APM_EMU=m
CONFIG_PMAC_MEDIABAY=y CONFIG_PMAC_MEDIABAY=y
CONFIG_PMAC_BACKLIGHT=y CONFIG_PMAC_BACKLIGHT=y
CONFIG_INPUT_ADBHID=y CONFIG_INPUT_ADBHID=y
...@@ -819,6 +823,7 @@ CONFIG_PCNET32=y ...@@ -819,6 +823,7 @@ CONFIG_PCNET32=y
# CONFIG_R8169 is not set # CONFIG_R8169 is not set
# CONFIG_SIS190 is not set # CONFIG_SIS190 is not set
# CONFIG_SKGE is not set # CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_SK98LIN is not set # CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set # CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set # CONFIG_TIGON3 is not set
...@@ -978,14 +983,14 @@ CONFIG_HW_CONSOLE=y ...@@ -978,14 +983,14 @@ CONFIG_HW_CONSOLE=y
CONFIG_SERIAL_8250=m CONFIG_SERIAL_8250=m
# CONFIG_SERIAL_8250_CS is not set # CONFIG_SERIAL_8250_CS is not set
CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set # CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=m CONFIG_SERIAL_CORE=m
# CONFIG_SERIAL_PMACZILOG is not set CONFIG_SERIAL_PMACZILOG=m
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LEGACY_PTY_COUNT=256
...@@ -1058,7 +1063,7 @@ CONFIG_I2C_ALGOBIT=y ...@@ -1058,7 +1063,7 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_I801 is not set # CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set # CONFIG_I2C_I810 is not set
# CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_PIIX4 is not set
CONFIG_I2C_KEYWEST=m CONFIG_I2C_POWERMAC=y
# CONFIG_I2C_MPC is not set # CONFIG_I2C_MPC is not set
# CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PARPORT_LIGHT is not set
...@@ -1160,7 +1165,6 @@ CONFIG_FB_ATY128=y ...@@ -1160,7 +1165,6 @@ CONFIG_FB_ATY128=y
CONFIG_FB_ATY=y CONFIG_FB_ATY=y
CONFIG_FB_ATY_CT=y CONFIG_FB_ATY_CT=y
# CONFIG_FB_ATY_GENERIC_LCD is not set # CONFIG_FB_ATY_GENERIC_LCD is not set
# CONFIG_FB_ATY_XL_INIT is not set
CONFIG_FB_ATY_GX=y CONFIG_FB_ATY_GX=y
# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set # CONFIG_FB_SIS is not set
...@@ -1169,7 +1173,6 @@ CONFIG_FB_ATY_GX=y ...@@ -1169,7 +1173,6 @@ CONFIG_FB_ATY_GX=y
CONFIG_FB_3DFX=y CONFIG_FB_3DFX=y
# CONFIG_FB_3DFX_ACCEL is not set # CONFIG_FB_3DFX_ACCEL is not set
# CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set # CONFIG_FB_TRIDENT is not set
# CONFIG_FB_VIRTUAL is not set # CONFIG_FB_VIRTUAL is not set
...@@ -1214,9 +1217,10 @@ CONFIG_SND_OSSEMUL=y ...@@ -1214,9 +1217,10 @@ CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
# CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set # CONFIG_SND_DEBUG is not set
CONFIG_SND_GENERIC_DRIVER=y
# #
# Generic devices # Generic devices
...@@ -1230,6 +1234,8 @@ CONFIG_SND_DUMMY=m ...@@ -1230,6 +1234,8 @@ CONFIG_SND_DUMMY=m
# #
# PCI devices # PCI devices
# #
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set # CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_ATIIXP_MODEM is not set
...@@ -1238,45 +1244,44 @@ CONFIG_SND_DUMMY=m ...@@ -1238,45 +1244,44 @@ CONFIG_SND_DUMMY=m
# CONFIG_SND_AU8830 is not set # CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set # CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set # CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set # CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_CS4281 is not set # CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set # CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set # CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set # CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set # CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set # CONFIG_SND_FM801 is not set
# CONFIG_SND_HDA_INTEL is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set # CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set # CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set # CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set # CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SONICVIBES is not set # CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set # CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set # CONFIG_SND_VX222 is not set
# CONFIG_SND_HDA_INTEL is not set # CONFIG_SND_YMFPCI is not set
# #
# ALSA PowerMac devices # ALSA PowerMac devices
# #
CONFIG_SND_POWERMAC=m CONFIG_SND_POWERMAC=m
# CONFIG_SND_POWERMAC_AUTO_DRC is not set CONFIG_SND_POWERMAC_AUTO_DRC=y
# #
# USB devices # USB devices
...@@ -1336,6 +1341,7 @@ CONFIG_USB_PRINTER=m ...@@ -1336,6 +1341,7 @@ CONFIG_USB_PRINTER=m
# may also be needed; see USB_STORAGE Help for more information # may also be needed; see USB_STORAGE Help for more information
# #
# CONFIG_USB_STORAGE is not set # CONFIG_USB_STORAGE is not set
# CONFIG_USB_LIBUSUAL is not set
# #
# USB Input Devices # USB Input Devices
...@@ -1355,6 +1361,7 @@ CONFIG_USB_HIDINPUT=y ...@@ -1355,6 +1361,7 @@ CONFIG_USB_HIDINPUT=y
# CONFIG_USB_YEALINK is not set # CONFIG_USB_YEALINK is not set
# CONFIG_USB_XPAD is not set # CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set # CONFIG_USB_ATI_REMOTE is not set
# CONFIG_USB_ATI_REMOTE2 is not set
# CONFIG_USB_KEYSPAN_REMOTE is not set # CONFIG_USB_KEYSPAN_REMOTE is not set
CONFIG_USB_APPLETOUCH=y CONFIG_USB_APPLETOUCH=y
...@@ -1501,6 +1508,7 @@ CONFIG_FS_MBCACHE=y ...@@ -1501,6 +1508,7 @@ CONFIG_FS_MBCACHE=y
# CONFIG_JFS_FS is not set # CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set # CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set # CONFIG_XFS_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set # CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set # CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y CONFIG_INOTIFY=y
...@@ -1540,6 +1548,7 @@ CONFIG_TMPFS=y ...@@ -1540,6 +1548,7 @@ CONFIG_TMPFS=y
# CONFIG_HUGETLB_PAGE is not set # CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y CONFIG_RAMFS=y
CONFIG_RELAYFS_FS=m CONFIG_RELAYFS_FS=m
# CONFIG_CONFIGFS_FS is not set
# #
# Miscellaneous filesystems # Miscellaneous filesystems
...@@ -1670,12 +1679,13 @@ CONFIG_OPROFILE=y ...@@ -1670,12 +1679,13 @@ CONFIG_OPROFILE=y
# Kernel hacking # Kernel hacking
# #
# CONFIG_PRINTK_TIME is not set # CONFIG_PRINTK_TIME is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_MAGIC_SYSRQ is not set # CONFIG_MAGIC_SYSRQ is not set
CONFIG_DEBUG_KERNEL=y
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
CONFIG_DETECT_SOFTLOCKUP=y CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_SCHEDSTATS is not set # CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_KOBJECT is not set
...@@ -1688,6 +1698,11 @@ CONFIG_XMON=y ...@@ -1688,6 +1698,11 @@ CONFIG_XMON=y
CONFIG_XMON_DEFAULT=y CONFIG_XMON_DEFAULT=y
# CONFIG_BDI_SWITCH is not set # CONFIG_BDI_SWITCH is not set
CONFIG_BOOTX_TEXT=y CONFIG_BOOTX_TEXT=y
# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
# CONFIG_PPC_EARLY_DEBUG_G5 is not set
# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
# #
# Security options # Security options
......
...@@ -60,7 +60,8 @@ obj-$(CONFIG_MODULES) += $(module-y) ...@@ -60,7 +60,8 @@ obj-$(CONFIG_MODULES) += $(module-y)
pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \
pci_direct_iommu.o iomap.o pci_direct_iommu.o iomap.o
obj-$(CONFIG_PCI) += $(pci64-y) pci32-$(CONFIG_PPC32) := pci_32.o
obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y)
kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o
kexec-$(CONFIG_PPC32) := machine_kexec_32.o kexec-$(CONFIG_PPC32) := machine_kexec_32.o
obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y) obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y)
......
...@@ -84,7 +84,10 @@ static void crash_save_this_cpu(struct pt_regs *regs, int cpu) ...@@ -84,7 +84,10 @@ static void crash_save_this_cpu(struct pt_regs *regs, int cpu)
* squirrelled away. ELF notes happen to provide * squirrelled away. ELF notes happen to provide
* all of that that no need to invent something new. * all of that that no need to invent something new.
*/ */
buf = &crash_notes[cpu][0]; buf = (u32*)per_cpu_ptr(crash_notes, cpu);
if (!buf)
return;
memset(&prstatus, 0, sizeof(prstatus)); memset(&prstatus, 0, sizeof(prstatus));
prstatus.pr_pid = current->pid; prstatus.pr_pid = current->pid;
elf_core_copy_regs(&prstatus.pr_reg, regs); elf_core_copy_regs(&prstatus.pr_reg, regs);
...@@ -93,76 +96,6 @@ static void crash_save_this_cpu(struct pt_regs *regs, int cpu) ...@@ -93,76 +96,6 @@ static void crash_save_this_cpu(struct pt_regs *regs, int cpu)
final_note(buf); final_note(buf);
} }
/* FIXME Merge this with xmon_save_regs ?? */
static inline void crash_get_current_regs(struct pt_regs *regs)
{
unsigned long tmp1, tmp2;
__asm__ __volatile__ (
"std 0,0(%2)\n"
"std 1,8(%2)\n"
"std 2,16(%2)\n"
"std 3,24(%2)\n"
"std 4,32(%2)\n"
"std 5,40(%2)\n"
"std 6,48(%2)\n"
"std 7,56(%2)\n"
"std 8,64(%2)\n"
"std 9,72(%2)\n"
"std 10,80(%2)\n"
"std 11,88(%2)\n"
"std 12,96(%2)\n"
"std 13,104(%2)\n"
"std 14,112(%2)\n"
"std 15,120(%2)\n"
"std 16,128(%2)\n"
"std 17,136(%2)\n"
"std 18,144(%2)\n"
"std 19,152(%2)\n"
"std 20,160(%2)\n"
"std 21,168(%2)\n"
"std 22,176(%2)\n"
"std 23,184(%2)\n"
"std 24,192(%2)\n"
"std 25,200(%2)\n"
"std 26,208(%2)\n"
"std 27,216(%2)\n"
"std 28,224(%2)\n"
"std 29,232(%2)\n"
"std 30,240(%2)\n"
"std 31,248(%2)\n"
"mfmsr %0\n"
"std %0, 264(%2)\n"
"mfctr %0\n"
"std %0, 280(%2)\n"
"mflr %0\n"
"std %0, 288(%2)\n"
"bl 1f\n"
"1: mflr %1\n"
"std %1, 256(%2)\n"
"mtlr %0\n"
"mfxer %0\n"
"std %0, 296(%2)\n"
: "=&r" (tmp1), "=&r" (tmp2)
: "b" (regs));
}
/* We may have saved_regs from where the error came from
* or it is NULL if via a direct panic().
*/
static void crash_save_self(struct pt_regs *saved_regs)
{
struct pt_regs regs;
int cpu;
cpu = smp_processor_id();
if (saved_regs)
memcpy(&regs, saved_regs, sizeof(regs));
else
crash_get_current_regs(&regs);
crash_save_this_cpu(&regs, cpu);
}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static atomic_t waiting_for_crash_ipi; static atomic_t waiting_for_crash_ipi;
...@@ -260,5 +193,5 @@ void default_machine_crash_shutdown(struct pt_regs *regs) ...@@ -260,5 +193,5 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
*/ */
crashing_cpu = smp_processor_id(); crashing_cpu = smp_processor_id();
crash_kexec_prepare_cpus(); crash_kexec_prepare_cpus();
crash_save_self(regs); crash_save_this_cpu(regs, crashing_cpu);
} }
This diff is collapsed.
...@@ -605,7 +605,8 @@ static void __init early_cmdline_parse(void) ...@@ -605,7 +605,8 @@ static void __init early_cmdline_parse(void)
opt = strstr(RELOC(prom_cmd_line), RELOC("crashkernel=")); opt = strstr(RELOC(prom_cmd_line), RELOC("crashkernel="));
if (opt) { if (opt) {
opt += 12; opt += 12;
RELOC(prom_crashk_size) = prom_memparse(opt, &opt); RELOC(prom_crashk_size) =
prom_memparse(opt, (const char **)&opt);
if (ALIGN(RELOC(prom_crashk_size), 0x1000000) != if (ALIGN(RELOC(prom_crashk_size), 0x1000000) !=
RELOC(prom_crashk_size)) { RELOC(prom_crashk_size)) {
......
...@@ -316,7 +316,6 @@ static int __init add_bridge(struct device_node *dev) ...@@ -316,7 +316,6 @@ static int __init add_bridge(struct device_node *dev)
char* disp_name; char* disp_name;
int *bus_range; int *bus_range;
int primary = 1; int primary = 1;
struct property *of_prop;
DBG("Adding PCI host bridge %s\n", dev->full_name); DBG("Adding PCI host bridge %s\n", dev->full_name);
......
...@@ -71,38 +71,60 @@ ...@@ -71,38 +71,60 @@
#define DBG(fmt...) #define DBG(fmt...)
#endif #endif
static unsigned long maple_find_nvram_base(void)
{
struct device_node *rtcs;
unsigned long result = 0;
/* find NVRAM device */
rtcs = of_find_compatible_node(NULL, "nvram", "AMD8111");
if (rtcs) {
struct resource r;
if (of_address_to_resource(rtcs, 0, &r)) {
printk(KERN_EMERG "Maple: Unable to translate NVRAM"
" address\n");
goto bail;
}
if (!(r.flags & IORESOURCE_IO)) {
printk(KERN_EMERG "Maple: NVRAM address isn't PIO!\n");
goto bail;
}
result = r.start;
} else
printk(KERN_EMERG "Maple: Unable to find NVRAM\n");
bail:
of_node_put(rtcs);
return result;
}
static void maple_restart(char *cmd) static void maple_restart(char *cmd)
{ {
unsigned int maple_nvram_base; unsigned int maple_nvram_base;
unsigned int maple_nvram_offset; unsigned int maple_nvram_offset;
unsigned int maple_nvram_command; unsigned int maple_nvram_command;
struct device_node *rtcs; struct device_node *sp;
/* find NVRAM device */ maple_nvram_base = maple_find_nvram_base();
rtcs = find_compatible_devices("nvram", "AMD8111"); if (maple_nvram_base == 0)
if (rtcs && rtcs->addrs) { goto fail;
maple_nvram_base = rtcs->addrs[0].address;
} else {
printk(KERN_EMERG "Maple: Unable to find NVRAM\n");
printk(KERN_EMERG "Maple: Manual Restart Required\n");
return;
}
/* find service processor device */ /* find service processor device */
rtcs = find_devices("service-processor"); sp = of_find_node_by_name(NULL, "service-processor");
if (!rtcs) { if (!sp) {
printk(KERN_EMERG "Maple: Unable to find Service Processor\n"); printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
printk(KERN_EMERG "Maple: Manual Restart Required\n"); goto fail;
return;
} }
maple_nvram_offset = *(unsigned int*) get_property(rtcs, maple_nvram_offset = *(unsigned int*) get_property(sp,
"restart-addr", NULL); "restart-addr", NULL);
maple_nvram_command = *(unsigned int*) get_property(rtcs, maple_nvram_command = *(unsigned int*) get_property(sp,
"restart-value", NULL); "restart-value", NULL);
of_node_put(sp);
/* send command */ /* send command */
outb_p(maple_nvram_command, maple_nvram_base + maple_nvram_offset); outb_p(maple_nvram_command, maple_nvram_base + maple_nvram_offset);
for (;;) ; for (;;) ;
fail:
printk(KERN_EMERG "Maple: Manual Restart Required\n");
} }
static void maple_power_off(void) static void maple_power_off(void)
...@@ -110,33 +132,29 @@ static void maple_power_off(void) ...@@ -110,33 +132,29 @@ static void maple_power_off(void)
unsigned int maple_nvram_base; unsigned int maple_nvram_base;
unsigned int maple_nvram_offset; unsigned int maple_nvram_offset;
unsigned int maple_nvram_command; unsigned int maple_nvram_command;
struct device_node *rtcs; struct device_node *sp;
/* find NVRAM device */ maple_nvram_base = maple_find_nvram_base();
rtcs = find_compatible_devices("nvram", "AMD8111"); if (maple_nvram_base == 0)
if (rtcs && rtcs->addrs) { goto fail;
maple_nvram_base = rtcs->addrs[0].address;
} else {
printk(KERN_EMERG "Maple: Unable to find NVRAM\n");
printk(KERN_EMERG "Maple: Manual Power-Down Required\n");
return;
}
/* find service processor device */ /* find service processor device */
rtcs = find_devices("service-processor"); sp = of_find_node_by_name(NULL, "service-processor");
if (!rtcs) { if (!sp) {
printk(KERN_EMERG "Maple: Unable to find Service Processor\n"); printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
printk(KERN_EMERG "Maple: Manual Power-Down Required\n"); goto fail;
return;
} }
maple_nvram_offset = *(unsigned int*) get_property(rtcs, maple_nvram_offset = *(unsigned int*) get_property(sp,
"power-off-addr", NULL); "power-off-addr", NULL);
maple_nvram_command = *(unsigned int*) get_property(rtcs, maple_nvram_command = *(unsigned int*) get_property(sp,
"power-off-value", NULL); "power-off-value", NULL);
of_node_put(sp);
/* send command */ /* send command */
outb_p(maple_nvram_command, maple_nvram_base + maple_nvram_offset); outb_p(maple_nvram_command, maple_nvram_base + maple_nvram_offset);
for (;;) ; for (;;) ;
fail:
printk(KERN_EMERG "Maple: Manual Power-Down Required\n");
} }
static void maple_halt(void) static void maple_halt(void)
...@@ -179,9 +197,6 @@ void __init maple_setup_arch(void) ...@@ -179,9 +197,6 @@ void __init maple_setup_arch(void)
*/ */
static void __init maple_init_early(void) static void __init maple_init_early(void)
{ {
unsigned int default_speed;
u64 physport;
DBG(" -> maple_init_early\n"); DBG(" -> maple_init_early\n");
/* Initialize hash table, from now on, we can take hash faults /* Initialize hash table, from now on, we can take hash faults
......
...@@ -168,11 +168,24 @@ unsigned long __init maple_get_boot_time(void) ...@@ -168,11 +168,24 @@ unsigned long __init maple_get_boot_time(void)
struct rtc_time tm; struct rtc_time tm;
struct device_node *rtcs; struct device_node *rtcs;
rtcs = find_compatible_devices("rtc", "pnpPNP,b00"); rtcs = of_find_compatible_node(NULL, "rtc", "pnpPNP,b00");
if (rtcs && rtcs->addrs) { if (rtcs) {
maple_rtc_addr = rtcs->addrs[0].address; struct resource r;
printk(KERN_INFO "Maple: Found RTC at 0x%x\n", maple_rtc_addr); if (of_address_to_resource(rtcs, 0, &r)) {
} else { printk(KERN_EMERG "Maple: Unable to translate RTC"
" address\n");
goto bail;
}
if (!(r.flags & IORESOURCE_IO)) {
printk(KERN_EMERG "Maple: RTC address isn't PIO!\n");
goto bail;
}
maple_rtc_addr = r.start;
printk(KERN_INFO "Maple: Found RTC at IO 0x%x\n",
maple_rtc_addr);
}
bail:
if (maple_rtc_addr == 0) {
maple_rtc_addr = RTC_PORT(0); /* legacy address */ maple_rtc_addr = RTC_PORT(0); /* legacy address */
printk(KERN_INFO "Maple: No device node for RTC, assuming " printk(KERN_INFO "Maple: No device node for RTC, assuming "
"legacy address (0x%x)\n", maple_rtc_addr); "legacy address (0x%x)\n", maple_rtc_addr);
......
...@@ -58,11 +58,11 @@ config 6xx ...@@ -58,11 +58,11 @@ config 6xx
help help
There are four types of PowerPC chips supported. The more common There are four types of PowerPC chips supported. The more common
types (601, 603, 604, 740, 750, 7400), the Motorola embedded types (601, 603, 604, 740, 750, 7400), the Motorola embedded
versions (821, 823, 850, 855, 860, 52xx, 82xx, 83xx), the IBM embedded versions (821, 823, 850, 855, 860, 52xx, 82xx, 83xx), the IBM
versions (403 and 405) and the high end 64 bit Power processors embedded versions (403 and 405) and the POWER3 processor.
(POWER 3, POWER4, and IBM 970 also known as G5) (For support for more recent 64-bit processors, set ARCH=powerpc.)
Unless you are building a kernel for one of the embedded processor Unless you are building a kernel for one of the embedded processor
systems, 64 bit IBM RS/6000 or an Apple G5, choose 6xx. systems or a POWER3-based IBM RS/6000, choose 6xx.
Note that the kernel runs in 32-bit mode even on 64-bit chips. Note that the kernel runs in 32-bit mode even on 64-bit chips.
Also note that because the 52xx, 82xx, & 83xx family has a 603e core, Also note that because the 52xx, 82xx, & 83xx family has a 603e core,
specific support for that chipset is asked later on. specific support for that chipset is asked later on.
...@@ -77,10 +77,6 @@ config POWER3 ...@@ -77,10 +77,6 @@ config POWER3
select PPC_FPU select PPC_FPU
bool "POWER3" bool "POWER3"
config POWER4
select PPC_FPU
bool "POWER4 and 970 (G5)"
config 8xx config 8xx
bool "8xx" bool "8xx"
...@@ -123,7 +119,7 @@ config PHYS_64BIT ...@@ -123,7 +119,7 @@ config PHYS_64BIT
config ALTIVEC config ALTIVEC
bool "AltiVec Support" bool "AltiVec Support"
depends on 6xx || POWER4 depends on 6xx
depends on !8260 && !83xx depends on !8260 && !83xx
---help--- ---help---
This option enables kernel support for the Altivec extensions to the This option enables kernel support for the Altivec extensions to the
...@@ -235,18 +231,9 @@ config KEXEC ...@@ -235,18 +231,9 @@ config KEXEC
source "drivers/cpufreq/Kconfig" source "drivers/cpufreq/Kconfig"
config CPU_FREQ_PMAC
bool "Support for Apple PowerBooks"
depends on CPU_FREQ && ADB_PMU
select CPU_FREQ_TABLE
help
This adds support for frequency switching on Apple PowerBooks,
this currently includes some models of iBook & Titanium
PowerBook.
config PPC601_SYNC_FIX config PPC601_SYNC_FIX
bool "Workarounds for PPC601 bugs" bool "Workarounds for PPC601 bugs"
depends on 6xx && (PPC_PREP || PPC_PMAC) depends on 6xx && PPC_PREP
help help
Some versions of the PPC601 (the first PowerPC chip) have bugs which Some versions of the PPC601 (the first PowerPC chip) have bugs which
mean that extra synchronization instructions are required near mean that extra synchronization instructions are required near
...@@ -258,26 +245,17 @@ config PPC601_SYNC_FIX ...@@ -258,26 +245,17 @@ config PPC601_SYNC_FIX
If in doubt, say Y here. If in doubt, say Y here.
config HOTPLUG_CPU
bool "Support for enabling/disabling CPUs"
depends on SMP && HOTPLUG && EXPERIMENTAL && PPC_PMAC
---help---
Say Y here to be able to disable and re-enable individual
CPUs at runtime on SMP machines.
Say N if you are unsure.
source arch/ppc/platforms/4xx/Kconfig source arch/ppc/platforms/4xx/Kconfig
source arch/ppc/platforms/85xx/Kconfig source arch/ppc/platforms/85xx/Kconfig
config PPC64BRIDGE config PPC64BRIDGE
bool bool
depends on POWER3 || POWER4 depends on POWER3
default y default y
config PPC_STD_MMU config PPC_STD_MMU
bool bool
depends on 6xx || POWER3 || POWER4 depends on 6xx || POWER3
default y default y
config NOT_COHERENT_CACHE config NOT_COHERENT_CACHE
...@@ -505,7 +483,7 @@ endchoice ...@@ -505,7 +483,7 @@ endchoice
choice choice
prompt "Machine Type" prompt "Machine Type"
depends on 6xx || POWER3 || POWER4 depends on 6xx || POWER3
default PPC_MULTIPLATFORM default PPC_MULTIPLATFORM
---help--- ---help---
Linux currently supports several different kinds of PowerPC-based Linux currently supports several different kinds of PowerPC-based
...@@ -516,11 +494,15 @@ choice ...@@ -516,11 +494,15 @@ choice
Platform) machines (including all of the recent IBM RS/6000 and Platform) machines (including all of the recent IBM RS/6000 and
pSeries machines), and several embedded PowerPC systems containing pSeries machines), and several embedded PowerPC systems containing
4xx, 6xx, 7xx, 8xx, 74xx, and 82xx processors. Currently, the 4xx, 6xx, 7xx, 8xx, 74xx, and 82xx processors. Currently, the
default option is to build a kernel which works on the first three. default option is to build a kernel which works on PReP and CHRP.
Select CHRP/PowerMac/PReP if configuring for an IBM RS/6000 or Note that support for Apple machines is now only available with
pSeries machine, a Power Macintosh (including iMacs, iBooks and ARCH=powerpc, and has been removed from this menu. If you wish
Powerbooks), or a PReP machine. to build a kernel for an Apple machine, exit this configuration
process and re-run it with ARCH=powerpc.
Select CHRP/PReP if configuring for an IBM RS/6000 or
pSeries machine, or a PReP machine.
Select Gemini if configuring for a Synergy Microsystems' Gemini Select Gemini if configuring for a Synergy Microsystems' Gemini
series Single Board Computer. More information is available at: series Single Board Computer. More information is available at:
...@@ -530,7 +512,7 @@ choice ...@@ -530,7 +512,7 @@ choice
available at: <http://linux-apus.sourceforge.net/>. available at: <http://linux-apus.sourceforge.net/>.
config PPC_MULTIPLATFORM config PPC_MULTIPLATFORM
bool "CHRP/PowerMac/PReP" bool "CHRP/PReP"
config APUS config APUS
bool "Amiga-APUS" bool "Amiga-APUS"
...@@ -768,25 +750,14 @@ config CPM2 ...@@ -768,25 +750,14 @@ config CPM2
on it (826x, 827x, 8560). on it (826x, 827x, 8560).
config PPC_CHRP config PPC_CHRP
bool bool "Support for CHRP (Common Hardware Reference Platform) machines"
depends on PPC_MULTIPLATFORM depends on PPC_MULTIPLATFORM
select PPC_I8259 select PPC_I8259
select PPC_INDIRECT_PCI select PPC_INDIRECT_PCI
default y default y
config PPC_PMAC
bool
depends on PPC_MULTIPLATFORM
select PPC_INDIRECT_PCI
default y
config PPC_PMAC64
bool
depends on PPC_PMAC && POWER4
default y
config PPC_PREP config PPC_PREP
bool bool "Support for PReP (PowerPC Reference Platform) machines"
depends on PPC_MULTIPLATFORM depends on PPC_MULTIPLATFORM
select PPC_I8259 select PPC_I8259
select PPC_INDIRECT_PCI select PPC_INDIRECT_PCI
...@@ -794,7 +765,7 @@ config PPC_PREP ...@@ -794,7 +765,7 @@ config PPC_PREP
config PPC_OF config PPC_OF
bool bool
depends on PPC_PMAC || PPC_CHRP depends on PPC_CHRP
default y default y
config PPC_GEN550 config PPC_GEN550
...@@ -1166,7 +1137,7 @@ config ISA ...@@ -1166,7 +1137,7 @@ config ISA
config GENERIC_ISA_DMA config GENERIC_ISA_DMA
bool bool
depends on POWER3 || POWER4 || 6xx && !CPM2 depends on POWER3 || 6xx && !CPM2
default y default y
config PPC_I8259 config PPC_I8259
......
...@@ -18,7 +18,7 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd ...@@ -18,7 +18,7 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
bootdir-y := simple bootdir-y := simple
bootdir-$(CONFIG_PPC_OF) += openfirmware bootdir-$(CONFIG_PPC_OF) += openfirmware
subdir-y := lib common images subdir-y := lib common images
subdir-$(CONFIG_PPC_OF) += of1275 subdir-$(CONFIG_PPC_MULTIPLATFORM) += of1275
# for cleaning # for cleaning
subdir- += simple openfirmware subdir- += simple openfirmware
......
...@@ -21,26 +21,16 @@ bootlib := $(boot)/lib ...@@ -21,26 +21,16 @@ bootlib := $(boot)/lib
of1275 := $(boot)/of1275 of1275 := $(boot)/of1275
images := $(boot)/images images := $(boot)/images
OBJCOPY_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment
COFF_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00500000 \
-Bstatic
CHRP_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00800000 CHRP_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00800000
NEWWORLD_LD_ARGS:= -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x01000000
COMMONOBJS := start.o misc.o common.o COMMONOBJS := start.o misc.o common.o
COFFOBJS := coffcrt0.o $(COMMONOBJS) coffmain.o
CHRPOBJS := crt0.o $(COMMONOBJS) chrpmain.o CHRPOBJS := crt0.o $(COMMONOBJS) chrpmain.o
NEWWORLDOBJS := crt0.o $(COMMONOBJS) newworldmain.o
targets := $(COFFOBJS) $(CHRPOBJS) $(NEWWORLDOBJS) dummy.o targets := $(CHRPOBJS) dummy.o
COFFOBJS := $(addprefix $(obj)/, $(COFFOBJS))
CHRPOBJS := $(addprefix $(obj)/, $(CHRPOBJS)) 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
HACKCOFF := $(utils)/hack-coff
ifdef CONFIG_SMP ifdef CONFIG_SMP
END := .smp END := .smp
endif endif
...@@ -72,56 +62,11 @@ targets += image.initrd.o ...@@ -72,56 +62,11 @@ targets += image.initrd.o
$(obj)/image.initrd.o: $(obj)/image.o $(images)/ramdisk.image.gz FORCE $(obj)/image.initrd.o: $(obj)/image.o $(images)/ramdisk.image.gz FORCE
$(call if_changed,genimage-initrd) $(call if_changed,genimage-initrd)
# Create the note section for New-World PowerMacs.
quiet_cmd_mknote = MKNOTE $@
cmd_mknote = $(utils)/mknote > $@
targets += note
$(obj)/note: $(utils)/mknote FORCE
$(call if_changed,mknote)
$(obj)/coffcrt0.o: EXTRA_AFLAGS := -DXCOFF targets += crt0.o
targets += coffcrt0.o crt0.o $(obj)/crt0.o: $(common)/crt0.S FORCE
$(obj)/coffcrt0.o $(obj)/crt0.o: $(common)/crt0.S FORCE
$(call if_changed_dep,as_o_S) $(call if_changed_dep,as_o_S)
quiet_cmd_gencoffb = COFF $@
cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) $< $(LIBS) && \
$(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec)
targets += coffboot
$(obj)/coffboot: $(obj)/image.o $(COFFOBJS) $(LIBS) $(srctree)/$(boot)/ld.script FORCE
$(call if_changed,gencoffb)
targets += coffboot.initrd
$(obj)/coffboot.initrd: $(obj)/image.initrd.o $(COFFOBJS) $(LIBS) \
$(srctree)/$(boot)/ld.script FORCE
$(call if_changed,gencoffb)
quiet_cmd_gen-coff = COFF $@
cmd_gen-coff = $(OBJCOPY) $(OBJCOPY_ARGS) $< $@ && \
$(HACKCOFF) $@ && \
ln -sf $(notdir $@) $(images)/zImage$(initrd).pmac
$(images)/vmlinux.coff: $(obj)/coffboot
$(call cmd,gen-coff)
$(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd
$(call cmd,gen-coff)
quiet_cmd_gen-elf-pmac = ELF $@
cmd_gen-elf-pmac = $(LD) $(NEWWORLD_LD_ARGS) -o $@ \
$(NEWWORLDOBJS) $(LIBS) $< && \
$(OBJCOPY) $@ $@ --add-section=.note=$(obj)/note \
-R .comment $(del-ramdisk-sec)
$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) \
$(obj)/note $(srctree)/$(boot)/ld.script
$(call cmd,gen-elf-pmac)
$(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \
$(LIBS) $(obj)/note \
$(srctree)/$(boot)/ld.script
$(call cmd,gen-elf-pmac)
quiet_cmd_gen-chrp = CHRP $@ quiet_cmd_gen-chrp = CHRP $@
cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \ cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \
$(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec)
...@@ -139,46 +84,23 @@ $(images)/zImage.chrp-rs6k $(images)/zImage.initrd.chrp-rs6k: \ ...@@ -139,46 +84,23 @@ $(images)/zImage.chrp-rs6k $(images)/zImage.initrd.chrp-rs6k: \
%-rs6k: % %-rs6k: %
$(call cmd,addnote) $(call cmd,addnote)
quiet_cmd_gen-miboot = GEN $@
cmd_gen-miboot = $(OBJCOPY) $(OBJCOPY_ARGS) \
--add-section=$1=$(word 2, $^) $< $@
$(images)/miboot.image: $(obj)/dummy.o $(images)/vmlinux.gz
$(call cmd,gen-miboot,image)
$(images)/miboot.initrd.image: $(images)/miboot.image $(images)/ramdisk.image.gz
$(call cmd,gen-miboot,initrd)
# The targets used on the make command-line # The targets used on the make command-line
.PHONY: zImage zImage.initrd .PHONY: zImage zImage.initrd
zImage: $(images)/vmlinux.coff \ zImage: $(images)/zImage.chrp \
$(images)/vmlinux.elf-pmac \ $(images)/zImage.chrp-rs6k
$(images)/zImage.chrp \
$(images)/zImage.chrp-rs6k \
$(images)/miboot.image
@echo ' kernel: $@ is ready ($<)' @echo ' kernel: $@ is ready ($<)'
zImage.initrd: $(images)/vmlinux.initrd.coff \ zImage.initrd: $(images)/zImage.initrd.chrp \
$(images)/vmlinux.initrd.elf-pmac \ $(images)/zImage.initrd.chrp-rs6k
$(images)/zImage.initrd.chrp \
$(images)/zImage.initrd.chrp-rs6k \
$(images)/miboot.initrd.image
@echo ' kernel: $@ is ready ($<)' @echo ' kernel: $@ is ready ($<)'
TFTPIMAGE := /tftpboot/zImage TFTPIMAGE := /tftpboot/zImage
.PHONY: znetboot znetboot.initrd .PHONY: znetboot znetboot.initrd
znetboot: $(images)/vmlinux.coff \ znetboot: $(images)/zImage.chrp
$(images)/vmlinux.elf-pmac \
$(images)/zImage.chrp
cp $(images)/vmlinux.coff $(TFTPIMAGE).pmac$(END)
cp $(images)/vmlinux.elf-pmac $(TFTPIMAGE).pmac$(END).elf
cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END)
@echo ' kernel: $@ is ready ($<)' @echo ' kernel: $@ is ready ($<)'
znetboot.initrd:$(images)/vmlinux.initrd.coff \ znetboot.initrd:$(images)/zImage.initrd.chrp
$(images)/vmlinux.initrd.elf-pmac \
$(images)/zImage.initrd.chrp
cp $(images)/vmlinux.initrd.coff $(TFTPIMAGE).pmac$(END)
cp $(images)/vmlinux.initrd.elf-pmac $(TFTPIMAGE).pmac$(END).elf
cp $(images)/zImage.initrd.chrp $(TFTPIMAGE).chrp$(END) cp $(images)/zImage.initrd.chrp $(TFTPIMAGE).chrp$(END)
@echo ' kernel: $@ is ready ($<)' @echo ' kernel: $@ is ready ($<)'
/*
* Copyright (C) Paul Mackerras 1997.
*
* 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/string.h>
#include <asm/processor.h>
#include <asm/page.h>
#include "nonstdio.h"
#include "of1275.h"
/* Passed from the linker */
extern char __image_begin, __image_end;
extern char __ramdisk_begin[], __ramdisk_end;
extern char _start, _end;
extern char image_data[], initrd_data[];
extern int initrd_len, image_len;
extern unsigned int heap_max;
extern void flush_cache(void *start, unsigned int len);
extern void gunzip(void *, int, unsigned char *, int *);
extern void make_bi_recs(unsigned long addr, char *name, unsigned int mach,
unsigned int progend);
extern void setup_bats(unsigned long start);
char *avail_ram;
char *begin_avail, *end_avail;
char *avail_high;
#define SCRATCH_SIZE (128 << 10)
static char heap[SCRATCH_SIZE];
static unsigned long ram_start = 0;
static unsigned long ram_end = 0x1000000;
static unsigned long prog_start = 0x800000;
static unsigned long prog_size = 0x700000;
typedef void (*kernel_start_t)(int, int, void *);
void boot(int a1, int a2, void *prom)
{
unsigned sa, len;
void *dst;
unsigned char *im;
unsigned initrd_start, initrd_size;
printf("coffboot starting: loaded at 0x%p\n", &_start);
setup_bats(ram_start);
initrd_size = (char *)(&__ramdisk_end) - (char *)(&__ramdisk_begin);
if (initrd_size) {
initrd_start = (ram_end - initrd_size) & ~0xFFF;
a1 = initrd_start;
a2 = initrd_size;
claim(initrd_start, ram_end - initrd_start, 0);
printf("initial ramdisk moving 0x%x <- 0x%p (%x bytes)\n\r",
initrd_start, (char *)(&__ramdisk_begin), initrd_size);
memcpy((char *)initrd_start, (char *)(&__ramdisk_begin), initrd_size);
prog_size = initrd_start - prog_start;
} else
a2 = 0xdeadbeef;
im = (char *)(&__image_begin);
len = (char *)(&__image_end) - (char *)(&__image_begin);
/* claim 4MB starting at PROG_START */
claim(prog_start, prog_size, 0);
map(prog_start, prog_start, prog_size);
dst = (void *) prog_start;
if (im[0] == 0x1f && im[1] == 0x8b) {
/* set up scratch space */
begin_avail = avail_high = avail_ram = heap;
end_avail = heap + sizeof(heap);
printf("heap at 0x%p\n", avail_ram);
printf("gunzipping (0x%p <- 0x%p:0x%p)...", dst, im, im+len);
gunzip(dst, prog_size, im, &len);
printf("done %u bytes\n", len);
printf("%u bytes of heap consumed, max in use %u\n",
avail_high - begin_avail, heap_max);
} else {
memmove(dst, im, len);
}
flush_cache(dst, len);
make_bi_recs(((unsigned long) dst + len), "coffboot", _MACH_Pmac,
(prog_start + prog_size));
sa = (unsigned long)prog_start;
printf("start address = 0x%x\n", sa);
(*(kernel_start_t)sa)(a1, a2, prom);
printf("returned?\n");
pause();
}
/*
* Copyright (C) Paul Mackerras 1997.
*
* 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/string.h>
#include "nonstdio.h"
#include "of1275.h"
#include <asm/processor.h>
#include <asm/page.h>
/* Passed from the linker */
extern char __image_begin, __image_end;
extern char __ramdisk_begin[], __ramdisk_end;
extern char _start, _end;
extern unsigned int heap_max;
extern void flush_cache(void *start, unsigned int len);
extern void gunzip(void *, int, unsigned char *, int *);
extern void make_bi_recs(unsigned long addr, char *name, unsigned int mach,
unsigned int progend);
char *avail_ram;
char *begin_avail, *end_avail;
char *avail_high;
#define RAM_END (16 << 20)
#define PROG_START 0x00010000
#define PROG_SIZE 0x007f0000
#define SCRATCH_SIZE (128 << 10)
typedef void (*kernel_start_t)(int, int, void *);
void boot(int a1, int a2, void *prom)
{
unsigned sa, len;
void *dst;
unsigned char *im;
unsigned initrd_start, initrd_size;
printf("chrpboot starting: loaded at 0x%p\n", &_start);
initrd_size = (char *)(&__ramdisk_end) - (char *)(&__ramdisk_begin);
if (initrd_size) {
initrd_start = (RAM_END - initrd_size) & ~0xFFF;
a1 = initrd_start;
a2 = initrd_size;
claim(initrd_start, RAM_END - initrd_start, 0);
printf("initial ramdisk moving 0x%x <- 0x%p (%x bytes)\n\r",
initrd_start, (char *)(&__ramdisk_begin), initrd_size);
memcpy((char *)initrd_start, (char *)(&__ramdisk_begin), initrd_size);
} else
a2 = 0xdeadbeef;
im = (char *)(&__image_begin);
len = (char *)(&__image_end) - (char *)(&__image_begin);
/* claim 3MB starting at PROG_START */
claim(PROG_START, PROG_SIZE, 0);
dst = (void *) PROG_START;
if (im[0] == 0x1f && im[1] == 0x8b) {
/* claim some memory for scratch space */
avail_ram = (char *) claim(0, SCRATCH_SIZE, 0x10);
begin_avail = avail_high = avail_ram;
end_avail = avail_ram + SCRATCH_SIZE;
printf("heap at 0x%p\n", avail_ram);
printf("gunzipping (0x%p <- 0x%p:0x%p)...", dst, im, im+len);
gunzip(dst, PROG_SIZE, im, &len);
printf("done %u bytes\n", len);
printf("%u bytes of heap consumed, max in use %u\n",
avail_high - begin_avail, heap_max);
release(begin_avail, SCRATCH_SIZE);
} else {
memmove(dst, im, len);
}
flush_cache(dst, len);
make_bi_recs(((unsigned long) dst + len), "chrpboot", _MACH_Pmac,
(PROG_START + PROG_SIZE));
sa = (unsigned long)PROG_START;
printf("start address = 0x%x\n", sa);
(*(kernel_start_t)sa)(a1, a2, prom);
printf("returned?\n");
pause();
}
...@@ -9,7 +9,6 @@ extra-$(CONFIG_44x) := head_44x.o ...@@ -9,7 +9,6 @@ extra-$(CONFIG_44x) := head_44x.o
extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o
extra-$(CONFIG_8xx) := head_8xx.o extra-$(CONFIG_8xx) := head_8xx.o
extra-$(CONFIG_6xx) += idle_6xx.o extra-$(CONFIG_6xx) += idle_6xx.o
extra-$(CONFIG_POWER4) += idle_power4.o
extra-y += vmlinux.lds extra-y += vmlinux.lds
obj-y := entry.o traps.o idle.o time.o misc.o \ obj-y := entry.o traps.o idle.o time.o misc.o \
...@@ -17,7 +16,6 @@ obj-y := entry.o traps.o idle.o time.o misc.o \ ...@@ -17,7 +16,6 @@ obj-y := entry.o traps.o idle.o time.o misc.o \
ppc_htab.o ppc_htab.o
obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
obj-$(CONFIG_POWER4) += cpu_setup_power4.o
obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o
obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o
obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PCI) += pci.o
...@@ -42,7 +40,6 @@ obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o ...@@ -42,7 +40,6 @@ obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o
obj-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_KGDB) += ppc-stub.o obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_TAU) += temp.o obj-$(CONFIG_TAU) += temp.o
ifndef CONFIG_E200 ifndef CONFIG_E200
......
...@@ -204,78 +204,6 @@ _GLOBAL(call_setup_cpu) ...@@ -204,78 +204,6 @@ _GLOBAL(call_setup_cpu)
mtctr r5 mtctr r5
bctr bctr
#if defined(CONFIG_CPU_FREQ_PMAC) && defined(CONFIG_6xx)
/* This gets called by via-pmu.c to switch the PLL selection
* on 750fx CPU. This function should really be moved to some
* other place (as most of the cpufreq code in via-pmu
*/
_GLOBAL(low_choose_750fx_pll)
/* Clear MSR:EE */
mfmsr r7
rlwinm r0,r7,0,17,15
mtmsr r0
/* If switching to PLL1, disable HID0:BTIC */
cmplwi cr0,r3,0
beq 1f
mfspr r5,SPRN_HID0
rlwinm r5,r5,0,27,25
sync
mtspr SPRN_HID0,r5
isync
sync
1:
/* Calc new HID1 value */
mfspr r4,SPRN_HID1 /* Build a HID1:PS bit from parameter */
rlwinm r5,r3,16,15,15 /* Clear out HID1:PS from value read */
rlwinm r4,r4,0,16,14 /* Could have I used rlwimi here ? */
or r4,r4,r5
mtspr SPRN_HID1,r4
/* Store new HID1 image */
rlwinm r6,r1,0,0,18
lwz r6,TI_CPU(r6)
slwi r6,r6,2
addis r6,r6,nap_save_hid1@ha
stw r4,nap_save_hid1@l(r6)
/* If switching to PLL0, enable HID0:BTIC */
cmplwi cr0,r3,0
bne 1f
mfspr r5,SPRN_HID0
ori r5,r5,HID0_BTIC
sync
mtspr SPRN_HID0,r5
isync
sync
1:
/* Return */
mtmsr r7
blr
_GLOBAL(low_choose_7447a_dfs)
/* Clear MSR:EE */
mfmsr r7
rlwinm r0,r7,0,17,15
mtmsr r0
/* Calc new HID1 value */
mfspr r4,SPRN_HID1
insrwi r4,r3,1,9 /* insert parameter into bit 9 */
sync
mtspr SPRN_HID1,r4
sync
isync
/* Return */
mtmsr r7
blr
#endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */
/* /*
* complement mask on the msr then "or" some values on. * complement mask on the msr then "or" some values on.
* _nmask_and_or_msr(nmask, value_to_or) * _nmask_and_or_msr(nmask, value_to_or)
......
/* /*
* Common pmac/prep/chrp pci routines. -- Cort * Common prep/chrp pci routines. -- Cort
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -50,8 +50,7 @@ static void fixup_cpc710_pci64(struct pci_dev* dev); ...@@ -50,8 +50,7 @@ static void fixup_cpc710_pci64(struct pci_dev* dev);
static u8* pci_to_OF_bus_map; static u8* pci_to_OF_bus_map;
#endif #endif
/* By default, we don't re-assign bus numbers. We do this only on /* By default, we don't re-assign bus numbers.
* some pmacs
*/ */
int pci_assign_all_buses; int pci_assign_all_buses;
...@@ -780,17 +779,6 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn) ...@@ -780,17 +779,6 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn)
return NULL; return NULL;
/* Fixup bus number according to what OF think it is. */ /* Fixup bus number according to what OF think it is. */
#ifdef CONFIG_PPC_PMAC
/* The G5 need a special case here. Basically, we don't remap all
* busses on it so we don't create the pci-OF-map. However, we do
* remap the AGP bus and so have to deal with it. A future better
* fix has to be done by making the remapping per-host and always
* filling the pci_to_OF map. --BenH
*/
if (_machine == _MACH_Pmac && busnr >= 0xf0)
busnr -= 0xf0;
else
#endif
if (pci_to_OF_bus_map) if (pci_to_OF_bus_map)
busnr = pci_to_OF_bus_map[busnr]; busnr = pci_to_OF_bus_map[busnr];
if (busnr == 0xff) if (busnr == 0xff)
...@@ -1040,216 +1028,6 @@ void pcibios_add_platform_entries(struct pci_dev *pdev) ...@@ -1040,216 +1028,6 @@ void pcibios_add_platform_entries(struct pci_dev *pdev)
} }
#ifdef CONFIG_PPC_PMAC
/*
* This set of routines checks for PCI<->PCI bridges that have closed
* IO resources and have child devices. It tries to re-open an IO
* window on them.
*
* This is a _temporary_ fix to workaround a problem with Apple's OF
* closing IO windows on P2P bridges when the OF drivers of cards
* below this bridge don't claim any IO range (typically ATI or
* Adaptec).
*
* A more complete fix would be to use drivers/pci/setup-bus.c, which
* involves a working pcibios_fixup_pbus_ranges(), some more care about
* ordering when creating the host bus resources, and maybe a few more
* minor tweaks
*/
/* Initialize bridges with base/limit values we have collected */
static void __init
do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga)
{
struct pci_dev *bridge = bus->self;
struct pci_controller* hose = (struct pci_controller *)bridge->sysdata;
u32 l;
u16 w;
struct resource res;
if (bus->resource[0] == NULL)
return;
res = *(bus->resource[0]);
DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
DBG(" IO window: %08lx-%08lx\n", res.start, res.end);
/* Set up the top and bottom of the PCI I/O segment for this bus. */
pci_read_config_dword(bridge, PCI_IO_BASE, &l);
l &= 0xffff000f;
l |= (res.start >> 8) & 0x00f0;
l |= res.end & 0xf000;
pci_write_config_dword(bridge, PCI_IO_BASE, l);
if ((l & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) {
l = (res.start >> 16) | (res.end & 0xffff0000);
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, l);
}
pci_read_config_word(bridge, PCI_COMMAND, &w);
w |= PCI_COMMAND_IO;
pci_write_config_word(bridge, PCI_COMMAND, w);
#if 0 /* Enabling this causes XFree 4.2.0 to hang during PCI probe */
if (enable_vga) {
pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, &w);
w |= PCI_BRIDGE_CTL_VGA;
pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, w);
}
#endif
}
/* This function is pretty basic and actually quite broken for the
* general case, it's enough for us right now though. It's supposed
* to tell us if we need to open an IO range at all or not and what
* size.
*/
static int __init
check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga)
{
struct pci_dev *dev;
int i;
int rc = 0;
#define push_end(res, size) do { unsigned long __sz = (size) ; \
res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \
} while (0)
list_for_each_entry(dev, &bus->devices, bus_list) {
u16 class = dev->class >> 8;
if (class == PCI_CLASS_DISPLAY_VGA ||
class == PCI_CLASS_NOT_DEFINED_VGA)
*found_vga = 1;
if (class >> 8 == PCI_BASE_CLASS_BRIDGE && dev->subordinate)
rc |= check_for_io_childs(dev->subordinate, res, found_vga);
if (class == PCI_CLASS_BRIDGE_CARDBUS)
push_end(res, 0xfff);
for (i=0; i<PCI_NUM_RESOURCES; i++) {
struct resource *r;
unsigned long r_size;
if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI
&& i >= PCI_BRIDGE_RESOURCES)
continue;
r = &dev->resource[i];
r_size = r->end - r->start;
if (r_size < 0xfff)
r_size = 0xfff;
if (r->flags & IORESOURCE_IO && (r_size) != 0) {
rc = 1;
push_end(res, r_size);
}
}
}
return rc;
}
/* Here we scan all P2P bridges of a given level that have a closed
* IO window. Note that the test for the presence of a VGA card should
* be improved to take into account already configured P2P bridges,
* currently, we don't see them and might end up configuring 2 bridges
* with VGA pass through enabled
*/
static void __init
do_fixup_p2p_level(struct pci_bus *bus)
{
struct pci_bus *b;
int i, parent_io;
int has_vga = 0;
for (parent_io=0; parent_io<4; parent_io++)
if (bus->resource[parent_io]
&& bus->resource[parent_io]->flags & IORESOURCE_IO)
break;
if (parent_io >= 4)
return;
list_for_each_entry(b, &bus->children, node) {
struct pci_dev *d = b->self;
struct pci_controller* hose = (struct pci_controller *)d->sysdata;
struct resource *res = b->resource[0];
struct resource tmp_res;
unsigned long max;
int found_vga = 0;
memset(&tmp_res, 0, sizeof(tmp_res));
tmp_res.start = bus->resource[parent_io]->start;
/* We don't let low addresses go through that closed P2P bridge, well,
* that may not be necessary but I feel safer that way
*/
if (tmp_res.start == 0)
tmp_res.start = 0x1000;
if (!list_empty(&b->devices) && res && res->flags == 0 &&
res != bus->resource[parent_io] &&
(d->class >> 8) == PCI_CLASS_BRIDGE_PCI &&
check_for_io_childs(b, &tmp_res, &found_vga)) {
u8 io_base_lo;
printk(KERN_INFO "Fixing up IO bus %s\n", b->name);
if (found_vga) {
if (has_vga) {
printk(KERN_WARNING "Skipping VGA, already active"
" on bus segment\n");
found_vga = 0;
} else
has_vga = 1;
}
pci_read_config_byte(d, PCI_IO_BASE, &io_base_lo);
if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32)
max = ((unsigned long) hose->io_base_virt
- isa_io_base) + 0xffffffff;
else
max = ((unsigned long) hose->io_base_virt
- isa_io_base) + 0xffff;
*res = tmp_res;
res->flags = IORESOURCE_IO;
res->name = b->name;
/* Find a resource in the parent where we can allocate */
for (i = 0 ; i < 4; i++) {
struct resource *r = bus->resource[i];
if (!r)
continue;
if ((r->flags & IORESOURCE_IO) == 0)
continue;
DBG("Trying to allocate from %08lx, size %08lx from parent"
" res %d: %08lx -> %08lx\n",
res->start, res->end, i, r->start, r->end);
if (allocate_resource(r, res, res->end + 1, res->start, max,
res->end + 1, NULL, NULL) < 0) {
DBG("Failed !\n");
continue;
}
do_update_p2p_io_resource(b, found_vga);
break;
}
}
do_fixup_p2p_level(b);
}
}
static void
pcibios_fixup_p2p_bridges(void)
{
struct pci_bus *b;
list_for_each_entry(b, &pci_root_buses, node)
do_fixup_p2p_level(b);
}
#endif /* CONFIG_PPC_PMAC */
static int __init static int __init
pcibios_init(void) pcibios_init(void)
{ {
...@@ -1290,9 +1068,6 @@ pcibios_init(void) ...@@ -1290,9 +1068,6 @@ pcibios_init(void)
pcibios_allocate_bus_resources(&pci_root_buses); pcibios_allocate_bus_resources(&pci_root_buses);
pcibios_allocate_resources(0); pcibios_allocate_resources(0);
pcibios_allocate_resources(1); pcibios_allocate_resources(1);
#ifdef CONFIG_PPC_PMAC
pcibios_fixup_p2p_bridges();
#endif /* CONFIG_PPC_PMAC */
pcibios_assign_resources(); pcibios_assign_resources();
/* Call machine dependent post-init code */ /* Call machine dependent post-init code */
...@@ -1722,17 +1497,6 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) ...@@ -1722,17 +1497,6 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
struct pci_controller* hose; struct pci_controller* hose;
long result = -EOPNOTSUPP; long result = -EOPNOTSUPP;
/* Argh ! Please forgive me for that hack, but that's the
* simplest way to get existing XFree to not lockup on some
* G5 machines... So when something asks for bus 0 io base
* (bus 0 is HT root), we return the AGP one instead.
*/
#ifdef CONFIG_PPC_PMAC
if (_machine == _MACH_Pmac && machine_is_compatible("MacRISC4"))
if (bus == 0)
bus = 0xf0;
#endif /* CONFIG_PPC_PMAC */
hose = pci_bus_to_hose(bus); hose = pci_bus_to_hose(bus);
if (!hose) if (!hose)
return -ENODEV; return -ENODEV;
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pmac_feature.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
...@@ -58,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs); ...@@ -58,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs);
extern void alignment_exception(struct pt_regs *regs); extern void alignment_exception(struct pt_regs *regs);
extern void program_check_exception(struct pt_regs *regs); extern void program_check_exception(struct pt_regs *regs);
extern void single_step_exception(struct pt_regs *regs); extern void single_step_exception(struct pt_regs *regs);
extern int pmac_newworld;
extern int sys_sigreturn(struct pt_regs *regs); extern int sys_sigreturn(struct pt_regs *regs);
long long __ashrdi3(long long, int); long long __ashrdi3(long long, int);
...@@ -213,10 +211,6 @@ EXPORT_SYMBOL(adb_try_handler_change); ...@@ -213,10 +211,6 @@ EXPORT_SYMBOL(adb_try_handler_change);
EXPORT_SYMBOL(cuda_request); EXPORT_SYMBOL(cuda_request);
EXPORT_SYMBOL(cuda_poll); EXPORT_SYMBOL(cuda_poll);
#endif /* CONFIG_ADB_CUDA */ #endif /* CONFIG_ADB_CUDA */
#ifdef CONFIG_PPC_PMAC
EXPORT_SYMBOL(sys_ctrler);
EXPORT_SYMBOL(pmac_newworld);
#endif
#ifdef CONFIG_PPC_OF #ifdef CONFIG_PPC_OF
EXPORT_SYMBOL(find_devices); EXPORT_SYMBOL(find_devices);
EXPORT_SYMBOL(find_type_devices); EXPORT_SYMBOL(find_type_devices);
...@@ -241,9 +235,6 @@ EXPORT_SYMBOL(of_node_put); ...@@ -241,9 +235,6 @@ EXPORT_SYMBOL(of_node_put);
#if defined(CONFIG_BOOTX_TEXT) #if defined(CONFIG_BOOTX_TEXT)
EXPORT_SYMBOL(btext_update_display); EXPORT_SYMBOL(btext_update_display);
#endif #endif
#if defined(CONFIG_SCSI) && defined(CONFIG_PPC_PMAC)
EXPORT_SYMBOL(note_scsi_host);
#endif
#ifdef CONFIG_VT #ifdef CONFIG_VT
EXPORT_SYMBOL(kd_mksound); EXPORT_SYMBOL(kd_mksound);
#endif #endif
......
/* /*
* Common prep/pmac/chrp boot and setup code. * Common prep/chrp boot and setup code.
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/pmac_feature.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/nvram.h> #include <asm/nvram.h>
#include <asm/xmon.h> #include <asm/xmon.h>
...@@ -55,7 +54,6 @@ ...@@ -55,7 +54,6 @@
extern void platform_init(unsigned long r3, unsigned long r4, extern void platform_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7); unsigned long r5, unsigned long r6, unsigned long r7);
extern void bootx_init(unsigned long r4, unsigned long phys);
extern void identify_cpu(unsigned long offset, unsigned long cpu); extern void identify_cpu(unsigned long offset, unsigned long cpu);
extern void do_cpu_ftr_fixups(unsigned long offset); extern void do_cpu_ftr_fixups(unsigned long offset);
extern void reloc_got2(unsigned long offset); extern void reloc_got2(unsigned long offset);
...@@ -80,8 +78,6 @@ EXPORT_SYMBOL(_machine); ...@@ -80,8 +78,6 @@ EXPORT_SYMBOL(_machine);
extern void prep_init(unsigned long r3, unsigned long r4, extern void prep_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7); unsigned long r5, unsigned long r6, unsigned long r7);
extern void pmac_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7);
extern void chrp_init(unsigned long r3, unsigned long r4, extern void chrp_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7); unsigned long r5, unsigned long r6, unsigned long r7);
...@@ -324,20 +320,15 @@ early_init(int r3, int r4, int r5) ...@@ -324,20 +320,15 @@ early_init(int r3, int r4, int r5)
identify_cpu(offset, 0); identify_cpu(offset, 0);
do_cpu_ftr_fixups(offset); do_cpu_ftr_fixups(offset);
#if defined(CONFIG_PPC_MULTIPLATFORM) #if defined(CONFIG_PPC_OF)
reloc_got2(offset); reloc_got2(offset);
/* If we came here from BootX, clear the screen,
* set up some pointers and return. */
if ((r3 == 0x426f6f58) && (r5 == 0))
bootx_init(r4, phys);
/* /*
* don't do anything on prep * don't do anything on prep
* for now, don't use bootinfo because it breaks yaboot 0.5 * for now, don't use bootinfo because it breaks yaboot 0.5
* and assume that if we didn't find a magic number, we have OF * and assume that if we didn't find a magic number, we have OF
*/ */
else if (*(unsigned long *)(0) != 0xdeadc0de) if (*(unsigned long *)(0) != 0xdeadc0de)
phys = prom_init(r3, r4, (prom_entry)r5); phys = prom_init(r3, r4, (prom_entry)r5);
reloc_got2(-offset); reloc_got2(-offset);
...@@ -424,6 +415,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -424,6 +415,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
} }
#endif #endif
#ifdef CONFIG_PPC_OF
have_of = 1; have_of = 1;
/* prom_init has already been called from __start */ /* prom_init has already been called from __start */
...@@ -495,19 +487,17 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -495,19 +487,17 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
#endif /* CONFIG_ADB */ #endif /* CONFIG_ADB */
switch (_machine) { switch (_machine) {
#ifdef CONFIG_PPC_PMAC
case _MACH_Pmac:
pmac_init(r3, r4, r5, r6, r7);
break;
#endif
#ifdef CONFIG_PPC_CHRP #ifdef CONFIG_PPC_CHRP
case _MACH_chrp: case _MACH_chrp:
chrp_init(r3, r4, r5, r6, r7); chrp_init(r3, r4, r5, r6, r7);
break; break;
#endif #endif
} }
#endif /* CONFIG_PPC_OF */
} }
#endif /* CONFIG_PPC_MULTIPLATFORM */
#ifdef CONFIG_PPC_OF
#ifdef CONFIG_SERIAL_CORE_CONSOLE #ifdef CONFIG_SERIAL_CORE_CONSOLE
extern char *of_stdout_device; extern char *of_stdout_device;
...@@ -564,7 +554,7 @@ static int __init set_preferred_console(void) ...@@ -564,7 +554,7 @@ static int __init set_preferred_console(void)
} }
console_initcall(set_preferred_console); console_initcall(set_preferred_console);
#endif /* CONFIG_SERIAL_CORE_CONSOLE */ #endif /* CONFIG_SERIAL_CORE_CONSOLE */
#endif /* CONFIG_PPC_MULTIPLATFORM */ #endif /* CONFIG_PPC_OF */
struct bi_record *find_bootinfo(void) struct bi_record *find_bootinfo(void)
{ {
...@@ -747,14 +737,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -747,14 +737,6 @@ void __init setup_arch(char **cmdline_p)
if (ppc_md.init_early) if (ppc_md.init_early)
ppc_md.init_early(); ppc_md.init_early();
#ifdef CONFIG_PPC_MULTIPLATFORM
/* This could be called "early setup arch", it must be done
* now because xmon need it
*/
if (_machine == _MACH_Pmac)
pmac_feature_init(); /* New cool way */
#endif
#ifdef CONFIG_XMON #ifdef CONFIG_XMON
xmon_init(1); xmon_init(1);
if (strstr(cmd_line, "xmon")) if (strstr(cmd_line, "xmon"))
......
...@@ -38,9 +38,6 @@ ...@@ -38,9 +38,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/reg.h> #include <asm/reg.h>
#include <asm/xmon.h> #include <asm/xmon.h>
#ifdef CONFIG_PMAC_BACKLIGHT
#include <asm/backlight.h>
#endif
#include <asm/pmc.h> #include <asm/pmc.h>
#ifdef CONFIG_XMON #ifdef CONFIG_XMON
...@@ -85,12 +82,6 @@ int die(const char * str, struct pt_regs * fp, long err) ...@@ -85,12 +82,6 @@ int die(const char * str, struct pt_regs * fp, long err)
int nl = 0; int nl = 0;
console_verbose(); console_verbose();
spin_lock_irq(&die_lock); spin_lock_irq(&die_lock);
#ifdef CONFIG_PMAC_BACKLIGHT
if (_machine == _MACH_Pmac) {
set_backlight_enable(1);
set_backlight_level(BACKLIGHT_MAX);
}
#endif
printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
printk("PREEMPT "); printk("PREEMPT ");
...@@ -159,7 +150,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) ...@@ -159,7 +150,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
*/ */
static inline int check_io_access(struct pt_regs *regs) static inline int check_io_access(struct pt_regs *regs)
{ {
#if defined CONFIG_PPC_PMAC || defined CONFIG_8xx #if defined CONFIG_8xx
unsigned long msr = regs->msr; unsigned long msr = regs->msr;
const struct exception_table_entry *entry; const struct exception_table_entry *entry;
unsigned int *nip = (unsigned int *)regs->nip; unsigned int *nip = (unsigned int *)regs->nip;
...@@ -196,7 +187,7 @@ static inline int check_io_access(struct pt_regs *regs) ...@@ -196,7 +187,7 @@ static inline int check_io_access(struct pt_regs *regs)
return 1; return 1;
} }
} }
#endif /* CONFIG_PPC_PMAC */ #endif /* CONFIG_8xx */
return 0; return 0;
} }
......
...@@ -67,10 +67,6 @@ unsigned long ppc_memoffset = PAGE_OFFSET; ...@@ -67,10 +67,6 @@ unsigned long ppc_memoffset = PAGE_OFFSET;
int mem_init_done; int mem_init_done;
int init_bootmem_done; int init_bootmem_done;
int boot_mapsize; int boot_mapsize;
#ifdef CONFIG_PPC_PMAC
unsigned long agp_special_page;
EXPORT_SYMBOL(agp_special_page);
#endif
extern char _end[]; extern char _end[];
extern char etext[], _stext[]; extern char etext[], _stext[];
...@@ -423,10 +419,6 @@ void __init mem_init(void) ...@@ -423,10 +419,6 @@ void __init mem_init(void)
addr < PAGE_ALIGN((ulong)__va(rtas_data)+rtas_size) ; addr < PAGE_ALIGN((ulong)__va(rtas_data)+rtas_size) ;
addr += PAGE_SIZE) addr += PAGE_SIZE)
SetPageReserved(virt_to_page(addr)); SetPageReserved(virt_to_page(addr));
#endif
#ifdef CONFIG_PPC_PMAC
if (agp_special_page)
SetPageReserved(virt_to_page(agp_special_page));
#endif #endif
for (addr = PAGE_OFFSET; addr < (unsigned long)high_memory; for (addr = PAGE_OFFSET; addr < (unsigned long)high_memory;
addr += PAGE_SIZE) { addr += PAGE_SIZE) {
...@@ -463,11 +455,6 @@ void __init mem_init(void) ...@@ -463,11 +455,6 @@ void __init mem_init(void)
initpages<< (PAGE_SHIFT-10), initpages<< (PAGE_SHIFT-10),
(unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))); (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)));
#ifdef CONFIG_PPC_PMAC
if (agp_special_page)
printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page);
#endif
mem_init_done = 1; mem_init_done = 1;
} }
...@@ -512,22 +499,6 @@ set_phys_avail(unsigned long total_memory) ...@@ -512,22 +499,6 @@ set_phys_avail(unsigned long total_memory)
if (rtas_data) if (rtas_data)
mem_pieces_remove(&phys_avail, rtas_data, rtas_size, 1); mem_pieces_remove(&phys_avail, rtas_data, rtas_size, 1);
#endif #endif
#ifdef CONFIG_PPC_PMAC
/* Because of some uninorth weirdness, we need a page of
* memory as high as possible (it must be outside of the
* bus address seen as the AGP aperture). It will be used
* by the r128 DRM driver
*
* FIXME: We need to make sure that page doesn't overlap any of the\
* above. This could be done by improving mem_pieces_find to be able
* to do a backward search from the end of the list.
*/
if (_machine == _MACH_Pmac && find_devices("uni-north-agp")) {
agp_special_page = (total_memory - PAGE_SIZE);
mem_pieces_remove(&phys_avail, agp_special_page, PAGE_SIZE, 0);
agp_special_page = (unsigned long)__va(agp_special_page);
}
#endif /* CONFIG_PPC_PMAC */
} }
/* Mark some memory as reserved by removing it from phys_avail. */ /* Mark some memory as reserved by removing it from phys_avail. */
......
...@@ -3,26 +3,18 @@ ...@@ -3,26 +3,18 @@
# #
# 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 += -Iarch/$(ARCH)/mm CFLAGS_chrp_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)
obj-$(CONFIG_PCI) += apus_pci.o obj-$(CONFIG_PCI) += apus_pci.o
endif endif
obj-$(CONFIG_PPC_PMAC) += pmac_pic.o pmac_setup.o pmac_time.o \
pmac_feature.o pmac_pci.o pmac_sleep.o \
pmac_low_i2c.o pmac_cache.o
obj-$(CONFIG_PPC_CHRP) += chrp_setup.o chrp_time.o chrp_pci.o \ obj-$(CONFIG_PPC_CHRP) += chrp_setup.o chrp_time.o chrp_pci.o \
chrp_pegasos_eth.o chrp_pegasos_eth.o
ifeq ($(CONFIG_PPC_CHRP),y) ifeq ($(CONFIG_PPC_CHRP),y)
obj-$(CONFIG_NVRAM) += chrp_nvram.o obj-$(CONFIG_NVRAM) += chrp_nvram.o
endif endif
obj-$(CONFIG_PPC_PREP) += prep_pci.o prep_setup.o obj-$(CONFIG_PPC_PREP) += prep_pci.o prep_setup.o
ifeq ($(CONFIG_PPC_PMAC),y)
obj-$(CONFIG_NVRAM) += pmac_nvram.o
obj-$(CONFIG_CPU_FREQ_PMAC) += pmac_cpufreq.o
endif
obj-$(CONFIG_PMAC_BACKLIGHT) += pmac_backlight.o
obj-$(CONFIG_PREP_RESIDUAL) += residual.o obj-$(CONFIG_PREP_RESIDUAL) += residual.o
obj-$(CONFIG_PQ2ADS) += pq2ads.o obj-$(CONFIG_PQ2ADS) += pq2ads.o
obj-$(CONFIG_TQM8260) += tqm8260_setup.o obj-$(CONFIG_TQM8260) += tqm8260_setup.o
...@@ -47,6 +39,5 @@ obj-$(CONFIG_LITE5200) += lite5200.o ...@@ -47,6 +39,5 @@ obj-$(CONFIG_LITE5200) += lite5200.o
obj-$(CONFIG_EV64360) += ev64360.o obj-$(CONFIG_EV64360) += ev64360.o
ifeq ($(CONFIG_SMP),y) ifeq ($(CONFIG_SMP),y)
obj-$(CONFIG_PPC_PMAC) += pmac_smp.o
obj-$(CONFIG_PPC_CHRP) += chrp_smp.o obj-$(CONFIG_PPC_CHRP) += chrp_smp.o
endif endif
...@@ -275,7 +275,7 @@ chrp_find_bridges(void) ...@@ -275,7 +275,7 @@ chrp_find_bridges(void)
setup_python(hose, dev); setup_python(hose, dev);
} else if (is_mot } else if (is_mot
|| strncmp(model, "Motorola, Grackle", 17) == 0) { || strncmp(model, "Motorola, Grackle", 17) == 0) {
setup_grackle(hose); setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
} else if (is_longtrail) { } else if (is_longtrail) {
void __iomem *p = ioremap(GG2_PCI_CONFIG_BASE, 0x80000); void __iomem *p = ioremap(GG2_PCI_CONFIG_BASE, 0x80000);
hose->ops = &gg2_pci_ops; hose->ops = &gg2_pci_ops;
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <asm/i8259.h> #include <asm/i8259.h>
#include <asm/open_pic.h> #include <asm/open_pic.h>
#include <asm/xmon.h> #include <asm/xmon.h>
#include "mem_pieces.h"
unsigned long chrp_get_rtc_time(void); unsigned long chrp_get_rtc_time(void);
int chrp_set_rtc_time(unsigned long nowtime); int chrp_set_rtc_time(unsigned long nowtime);
...@@ -65,7 +66,6 @@ void rtas_display_progress(char *, unsigned short); ...@@ -65,7 +66,6 @@ void rtas_display_progress(char *, unsigned short);
void rtas_indicator_progress(char *, unsigned short); void rtas_indicator_progress(char *, unsigned short);
void btext_progress(char *, unsigned short); void btext_progress(char *, unsigned short);
extern unsigned long pmac_find_end_of_memory(void);
extern int of_show_percpuinfo(struct seq_file *, int); extern int of_show_percpuinfo(struct seq_file *, int);
int _chrp_type; int _chrp_type;
...@@ -467,6 +467,75 @@ chrp_init2(void) ...@@ -467,6 +467,75 @@ chrp_init2(void)
ppc_md.progress(" Have fun! ", 0x7777); ppc_md.progress(" Have fun! ", 0x7777);
} }
static struct device_node *memory_node;
static int __init get_mem_prop(char *name, struct mem_pieces *mp)
{
struct reg_property *rp;
int i, s;
unsigned int *ip;
int nac = prom_n_addr_cells(memory_node);
int nsc = prom_n_size_cells(memory_node);
ip = (unsigned int *) get_property(memory_node, name, &s);
if (ip == NULL) {
printk(KERN_ERR "error: couldn't get %s property on /memory\n",
name);
return 0;
}
s /= (nsc + nac) * 4;
rp = mp->regions;
for (i = 0; i < s; ++i, ip += nac+nsc) {
if (nac >= 2 && ip[nac-2] != 0)
continue;
rp->address = ip[nac-1];
if (nsc >= 2 && ip[nac+nsc-2] != 0)
rp->size = ~0U;
else
rp->size = ip[nac+nsc-1];
++rp;
}
mp->n_regions = rp - mp->regions;
/* Make sure the pieces are sorted. */
mem_pieces_sort(mp);
mem_pieces_coalesce(mp);
return 1;
}
static unsigned long __init chrp_find_end_of_memory(void)
{
unsigned long a, total;
struct mem_pieces phys_mem;
/*
* Find out where physical memory is, and check that it
* starts at 0 and is contiguous. It seems that RAM is
* always physically contiguous on Power Macintoshes.
*
* Supporting discontiguous physical memory isn't hard,
* it just makes the virtual <-> physical mapping functions
* more complicated (or else you end up wasting space
* in mem_map).
*/
memory_node = find_devices("memory");
if (memory_node == NULL || !get_mem_prop("reg", &phys_mem)
|| phys_mem.n_regions == 0)
panic("No RAM??");
a = phys_mem.regions[0].address;
if (a != 0)
panic("RAM doesn't start at physical address 0");
total = phys_mem.regions[0].size;
if (phys_mem.n_regions > 1) {
printk("RAM starting at 0x%x is not contiguous\n",
phys_mem.regions[1].address);
printk("Using RAM from 0 to 0x%lx\n", total-1);
}
return total;
}
void __init void __init
chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7) unsigned long r6, unsigned long r7)
...@@ -525,7 +594,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -525,7 +594,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.get_rtc_time = chrp_get_rtc_time; ppc_md.get_rtc_time = chrp_get_rtc_time;
ppc_md.calibrate_decr = chrp_calibrate_decr; ppc_md.calibrate_decr = chrp_calibrate_decr;
ppc_md.find_end_of_memory = pmac_find_end_of_memory; ppc_md.find_end_of_memory = chrp_find_end_of_memory;
if (rtas_data) { if (rtas_data) {
struct device_node *rtas; struct device_node *rtas;
......
...@@ -163,13 +163,75 @@ unsigned long chrp_get_rtc_time(void) ...@@ -163,13 +163,75 @@ unsigned long chrp_get_rtc_time(void)
return mktime(year, mon, day, hour, min, sec); return mktime(year, mon, day, hour, min, sec);
} }
/*
* Calibrate the decrementer frequency with the VIA timer 1.
*/
#define VIA_TIMER_FREQ_6 4700000 /* time 1 frequency * 6 */
/* VIA registers */
#define RS 0x200 /* skip between registers */
#define T1CL (4*RS) /* Timer 1 ctr/latch (low 8 bits) */
#define T1CH (5*RS) /* Timer 1 counter (high 8 bits) */
#define T1LL (6*RS) /* Timer 1 latch (low 8 bits) */
#define T1LH (7*RS) /* Timer 1 latch (high 8 bits) */
#define ACR (11*RS) /* Auxiliary control register */
#define IFR (13*RS) /* Interrupt flag register */
/* Bits in ACR */
#define T1MODE 0xc0 /* Timer 1 mode */
#define T1MODE_CONT 0x40 /* continuous interrupts */
/* Bits in IFR and IER */
#define T1_INT 0x40 /* Timer 1 interrupt */
static int __init chrp_via_calibrate_decr(void)
{
struct device_node *vias;
volatile unsigned char __iomem *via;
int count = VIA_TIMER_FREQ_6 / 100;
unsigned int dstart, dend;
vias = find_devices("via-cuda");
if (vias == 0)
vias = find_devices("via");
if (vias == 0 || vias->n_addrs == 0)
return 0;
via = ioremap(vias->addrs[0].address, vias->addrs[0].size);
/* set timer 1 for continuous interrupts */
out_8(&via[ACR], (via[ACR] & ~T1MODE) | T1MODE_CONT);
/* set the counter to a small value */
out_8(&via[T1CH], 2);
/* set the latch to `count' */
out_8(&via[T1LL], count);
out_8(&via[T1LH], count >> 8);
/* wait until it hits 0 */
while ((in_8(&via[IFR]) & T1_INT) == 0)
;
dstart = get_dec();
/* clear the interrupt & wait until it hits 0 again */
in_8(&via[T1CL]);
while ((in_8(&via[IFR]) & T1_INT) == 0)
;
dend = get_dec();
tb_ticks_per_jiffy = (dstart - dend) / ((6 * HZ)/100);
tb_to_us = mulhwu_scale_factor(dstart - dend, 60000);
printk(KERN_INFO "via_calibrate_decr: ticks per jiffy = %u (%u ticks)\n",
tb_ticks_per_jiffy, dstart - dend);
iounmap(via);
return 1;
}
void __init chrp_calibrate_decr(void) void __init chrp_calibrate_decr(void)
{ {
struct device_node *cpu; struct device_node *cpu;
unsigned int freq, *fp; unsigned int freq, *fp;
if (via_calibrate_decr()) if (chrp_via_calibrate_decr())
return; return;
/* /*
......
/*
* Miscellaneous procedures for dealing with the PowerMac hardware.
* Contains support for the backlight.
*
* Copyright (C) 2000 Benjamin Herrenschmidt
*
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/reboot.h>
#include <linux/nvram.h>
#include <linux/console.h>
#include <asm/sections.h>
#include <asm/ptrace.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/prom.h>
#include <asm/machdep.h>
#include <asm/nvram.h>
#include <asm/backlight.h>
#include <linux/adb.h>
#include <linux/pmu.h>
static struct backlight_controller *backlighter;
static void* backlighter_data;
static int backlight_autosave;
static int backlight_level = BACKLIGHT_MAX;
static int backlight_enabled = 1;
static int backlight_req_level = -1;
static int backlight_req_enable = -1;
static void backlight_callback(void *);
static DECLARE_WORK(backlight_work, backlight_callback, NULL);
void register_backlight_controller(struct backlight_controller *ctrler,
void *data, char *type)
{
struct device_node* bk_node;
char *prop;
int valid = 0;
/* There's already a matching controller, bail out */
if (backlighter != NULL)
return;
bk_node = find_devices("backlight");
#ifdef CONFIG_ADB_PMU
/* Special case for the old PowerBook since I can't test on it */
backlight_autosave = machine_is_compatible("AAPL,3400/2400")
|| machine_is_compatible("AAPL,3500");
if ((backlight_autosave
|| machine_is_compatible("AAPL,PowerBook1998")
|| machine_is_compatible("PowerBook1,1"))
&& !strcmp(type, "pmu"))
valid = 1;
#endif
if (bk_node) {
prop = get_property(bk_node, "backlight-control", NULL);
if (prop && !strncmp(prop, type, strlen(type)))
valid = 1;
}
if (!valid)
return;
backlighter = ctrler;
backlighter_data = data;
if (bk_node && !backlight_autosave)
prop = get_property(bk_node, "bklt", NULL);
else
prop = NULL;
if (prop) {
backlight_level = ((*prop)+1) >> 1;
if (backlight_level > BACKLIGHT_MAX)
backlight_level = BACKLIGHT_MAX;
}
#ifdef CONFIG_ADB_PMU
if (backlight_autosave) {
struct adb_request req;
pmu_request(&req, NULL, 2, 0xd9, 0);
while (!req.complete)
pmu_poll();
backlight_level = req.reply[0] >> 4;
}
#endif
acquire_console_sem();
if (!backlighter->set_enable(1, backlight_level, data))
backlight_enabled = 1;
release_console_sem();
printk(KERN_INFO "Registered \"%s\" backlight controller,"
"level: %d/15\n", type, backlight_level);
}
EXPORT_SYMBOL(register_backlight_controller);
void unregister_backlight_controller(struct backlight_controller
*ctrler, void *data)
{
/* We keep the current backlight level (for now) */
if (ctrler == backlighter && data == backlighter_data)
backlighter = NULL;
}
EXPORT_SYMBOL(unregister_backlight_controller);
static int __set_backlight_enable(int enable)
{
int rc;
if (!backlighter)
return -ENODEV;
acquire_console_sem();
rc = backlighter->set_enable(enable, backlight_level,
backlighter_data);
if (!rc)
backlight_enabled = enable;
release_console_sem();
return rc;
}
int set_backlight_enable(int enable)
{
if (!backlighter)
return -ENODEV;
backlight_req_enable = enable;
schedule_work(&backlight_work);
return 0;
}
EXPORT_SYMBOL(set_backlight_enable);
int get_backlight_enable(void)
{
if (!backlighter)
return -ENODEV;
return backlight_enabled;
}
EXPORT_SYMBOL(get_backlight_enable);
static int __set_backlight_level(int level)
{
int rc = 0;
if (!backlighter)
return -ENODEV;
if (level < BACKLIGHT_MIN)
level = BACKLIGHT_OFF;
if (level > BACKLIGHT_MAX)
level = BACKLIGHT_MAX;
acquire_console_sem();
if (backlight_enabled)
rc = backlighter->set_level(level, backlighter_data);
if (!rc)
backlight_level = level;
release_console_sem();
if (!rc && !backlight_autosave) {
level <<=1;
if (level & 0x10)
level |= 0x01;
// -- todo: save to property "bklt"
}
return rc;
}
int set_backlight_level(int level)
{
if (!backlighter)
return -ENODEV;
backlight_req_level = level;
schedule_work(&backlight_work);
return 0;
}
EXPORT_SYMBOL(set_backlight_level);
int get_backlight_level(void)
{
if (!backlighter)
return -ENODEV;
return backlight_level;
}
EXPORT_SYMBOL(get_backlight_level);
static void backlight_callback(void *dummy)
{
int level, enable;
do {
level = backlight_req_level;
enable = backlight_req_enable;
mb();
if (level >= 0)
__set_backlight_level(level);
if (enable >= 0)
__set_backlight_enable(enable);
} while(cmpxchg(&backlight_req_level, level, -1) != level ||
cmpxchg(&backlight_req_enable, enable, -1) != enable);
}
/*
* This file contains low-level cache management functions
* used for sleep and CPU speed changes on Apple machines.
* (In fact the only thing that is Apple-specific is that we assume
* that we can read from ROM at physical address 0xfff00000.)
*
* Copyright (C) 2004 Paul Mackerras (paulus@samba.org) and
* Benjamin Herrenschmidt (benh@kernel.crashing.org)
*
* 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 <asm/processor.h>
#include <asm/ppc_asm.h>
#include <asm/cputable.h>
/*
* Flush and disable all data caches (dL1, L2, L3). This is used
* when going to sleep, when doing a PMU based cpufreq transition,
* or when "offlining" a CPU on SMP machines. This code is over
* paranoid, but I've had enough issues with various CPU revs and
* bugs that I decided it was worth beeing over cautious
*/
_GLOBAL(flush_disable_caches)
#ifndef CONFIG_6xx
blr
#else
BEGIN_FTR_SECTION
b flush_disable_745x
END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450)
BEGIN_FTR_SECTION
b flush_disable_75x
END_FTR_SECTION_IFSET(CPU_FTR_L2CR)
b __flush_disable_L1
/* This is the code for G3 and 74[01]0 */
flush_disable_75x:
mflr r10
/* Turn off EE and DR in MSR */
mfmsr r11
rlwinm r0,r11,0,~MSR_EE
rlwinm r0,r0,0,~MSR_DR
sync
mtmsr r0
isync
/* Stop DST streams */
BEGIN_FTR_SECTION
DSSALL
sync
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
/* Stop DPM */
mfspr r8,SPRN_HID0 /* Save SPRN_HID0 in r8 */
rlwinm r4,r8,0,12,10 /* Turn off HID0[DPM] */
sync
mtspr SPRN_HID0,r4 /* Disable DPM */
sync
/* Disp-flush L1. We have a weird problem here that I never
* totally figured out. On 750FX, using the ROM for the flush
* results in a non-working flush. We use that workaround for
* now until I finally understand what's going on. --BenH
*/
/* ROM base by default */
lis r4,0xfff0
mfpvr r3
srwi r3,r3,16
cmplwi cr0,r3,0x7000
bne+ 1f
/* RAM base on 750FX */
li r4,0
1: li r4,0x4000
mtctr r4
1: lwz r0,0(r4)
addi r4,r4,32
bdnz 1b
sync
isync
/* Disable / invalidate / enable L1 data */
mfspr r3,SPRN_HID0
rlwinm r3,r3,0,~(HID0_DCE | HID0_ICE)
mtspr SPRN_HID0,r3
sync
isync
ori r3,r3,(HID0_DCE|HID0_DCI|HID0_ICE|HID0_ICFI)
sync
isync
mtspr SPRN_HID0,r3
xori r3,r3,(HID0_DCI|HID0_ICFI)
mtspr SPRN_HID0,r3
sync
/* Get the current enable bit of the L2CR into r4 */
mfspr r5,SPRN_L2CR
/* Set to data-only (pre-745x bit) */
oris r3,r5,L2CR_L2DO@h
b 2f
/* When disabling L2, code must be in L1 */
.balign 32
1: mtspr SPRN_L2CR,r3
3: sync
isync
b 1f
2: b 3f
3: sync
isync
b 1b
1: /* disp-flush L2. The interesting thing here is that the L2 can be
* up to 2Mb ... so using the ROM, we'll end up wrapping back to memory
* but that is probbaly fine. We disp-flush over 4Mb to be safe
*/
lis r4,2
mtctr r4
lis r4,0xfff0
1: lwz r0,0(r4)
addi r4,r4,32
bdnz 1b
sync
isync
lis r4,2
mtctr r4
lis r4,0xfff0
1: dcbf 0,r4
addi r4,r4,32
bdnz 1b
sync
isync
/* now disable L2 */
rlwinm r5,r5,0,~L2CR_L2E
b 2f
/* When disabling L2, code must be in L1 */
.balign 32
1: mtspr SPRN_L2CR,r5
3: sync
isync
b 1f
2: b 3f
3: sync
isync
b 1b
1: sync
isync
/* Invalidate L2. This is pre-745x, we clear the L2I bit ourselves */
oris r4,r5,L2CR_L2I@h
mtspr SPRN_L2CR,r4
sync
isync
/* Wait for the invalidation to complete */
1: mfspr r3,SPRN_L2CR
rlwinm. r0,r3,0,31,31
bne 1b
/* Clear L2I */
xoris r4,r4,L2CR_L2I@h
sync
mtspr SPRN_L2CR,r4
sync
/* now disable the L1 data cache */
mfspr r0,SPRN_HID0
rlwinm r0,r0,0,~(HID0_DCE|HID0_ICE)
mtspr SPRN_HID0,r0
sync
isync
/* Restore HID0[DPM] to whatever it was before */
sync
mfspr r0,SPRN_HID0
rlwimi r0,r8,0,11,11 /* Turn back HID0[DPM] */
mtspr SPRN_HID0,r0
sync
/* restore DR and EE */
sync
mtmsr r11
isync
mtlr r10
blr
/* This code is for 745x processors */
flush_disable_745x:
/* Turn off EE and DR in MSR */
mfmsr r11
rlwinm r0,r11,0,~MSR_EE
rlwinm r0,r0,0,~MSR_DR
sync
mtmsr r0
isync
/* Stop prefetch streams */
DSSALL
sync
/* Disable L2 prefetching */
mfspr r0,SPRN_MSSCR0
rlwinm r0,r0,0,0,29
mtspr SPRN_MSSCR0,r0
sync
isync
lis r4,0
dcbf 0,r4
dcbf 0,r4
dcbf 0,r4
dcbf 0,r4
dcbf 0,r4
dcbf 0,r4
dcbf 0,r4
dcbf 0,r4
/* Due to a bug with the HW flush on some CPU revs, we occasionally
* experience data corruption. I'm adding a displacement flush along
* with a dcbf loop over a few Mb to "help". The problem isn't totally
* fixed by this in theory, but at least, in practice, I couldn't reproduce
* it even with a big hammer...
*/
lis r4,0x0002
mtctr r4
li r4,0
1:
lwz r0,0(r4)
addi r4,r4,32 /* Go to start of next cache line */
bdnz 1b
isync
/* Now, flush the first 4MB of memory */
lis r4,0x0002
mtctr r4
li r4,0
sync
1:
dcbf 0,r4
addi r4,r4,32 /* Go to start of next cache line */
bdnz 1b
/* Flush and disable the L1 data cache */
mfspr r6,SPRN_LDSTCR
lis r3,0xfff0 /* read from ROM for displacement flush */
li r4,0xfe /* start with only way 0 unlocked */
li r5,128 /* 128 lines in each way */
1: mtctr r5
rlwimi r6,r4,0,24,31
mtspr SPRN_LDSTCR,r6
sync
isync
2: lwz r0,0(r3) /* touch each cache line */
addi r3,r3,32
bdnz 2b
rlwinm r4,r4,1,24,30 /* move on to the next way */
ori r4,r4,1
cmpwi r4,0xff /* all done? */
bne 1b
/* now unlock the L1 data cache */
li r4,0
rlwimi r6,r4,0,24,31
sync
mtspr SPRN_LDSTCR,r6
sync
isync
/* Flush the L2 cache using the hardware assist */
mfspr r3,SPRN_L2CR
cmpwi r3,0 /* check if it is enabled first */
bge 4f
oris r0,r3,(L2CR_L2IO_745x|L2CR_L2DO_745x)@h
b 2f
/* When disabling/locking L2, code must be in L1 */
.balign 32
1: mtspr SPRN_L2CR,r0 /* lock the L2 cache */
3: sync
isync
b 1f
2: b 3f
3: sync
isync
b 1b
1: sync
isync
ori r0,r3,L2CR_L2HWF_745x
sync
mtspr SPRN_L2CR,r0 /* set the hardware flush bit */
3: mfspr r0,SPRN_L2CR /* wait for it to go to 0 */
andi. r0,r0,L2CR_L2HWF_745x
bne 3b
sync
rlwinm r3,r3,0,~L2CR_L2E
b 2f
/* When disabling L2, code must be in L1 */
.balign 32
1: mtspr SPRN_L2CR,r3 /* disable the L2 cache */
3: sync
isync
b 1f
2: b 3f
3: sync
isync
b 1b
1: sync
isync
oris r4,r3,L2CR_L2I@h
mtspr SPRN_L2CR,r4
sync
isync
1: mfspr r4,SPRN_L2CR
andis. r0,r4,L2CR_L2I@h
bne 1b
sync
BEGIN_FTR_SECTION
/* Flush the L3 cache using the hardware assist */
4: mfspr r3,SPRN_L3CR
cmpwi r3,0 /* check if it is enabled */
bge 6f
oris r0,r3,L3CR_L3IO@h
ori r0,r0,L3CR_L3DO
sync
mtspr SPRN_L3CR,r0 /* lock the L3 cache */
sync
isync
ori r0,r0,L3CR_L3HWF
sync
mtspr SPRN_L3CR,r0 /* set the hardware flush bit */
5: mfspr r0,SPRN_L3CR /* wait for it to go to zero */
andi. r0,r0,L3CR_L3HWF
bne 5b
rlwinm r3,r3,0,~L3CR_L3E
sync
mtspr SPRN_L3CR,r3 /* disable the L3 cache */
sync
ori r4,r3,L3CR_L3I
mtspr SPRN_L3CR,r4
1: mfspr r4,SPRN_L3CR
andi. r0,r4,L3CR_L3I
bne 1b
sync
END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
6: mfspr r0,SPRN_HID0 /* now disable the L1 data cache */
rlwinm r0,r0,0,~HID0_DCE
mtspr SPRN_HID0,r0
sync
isync
mtmsr r11 /* restore DR and EE */
isync
blr
#endif /* CONFIG_6xx */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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