]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
authorLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 06:20:46 +0000 (22:20 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 06:20:46 +0000 (22:20 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (78 commits)
  [PATCH] powerpc: Add FSL SEC node to documentation
  [PATCH] macintosh: tidy-up driver_register() return values
  [PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values
  [PATCH] powerpc: via-pmu warning fix
  [PATCH] macintosh: cleanup the use of i2c headers
  [PATCH] powerpc: dont allow old RTC to be selected
  [PATCH] powerpc: make powerbook_sleep_grackle static
  [PATCH] powerpc: Fix warning in add_memory
  [PATCH] powerpc: update mailing list addresses
  [PATCH] powerpc: Remove calculation of io hole
  [PATCH] powerpc: iseries: Add bootargs to /chosen
  [PATCH] powerpc: iseries: Add /system-id, /model and /compatible
  [PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
  [PATCH] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
  [PATCH] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
  [PATCH] powerpc: iseries: mf related cleanups
  [PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
  [PATCH] powerpc: trivial: Cleanup whitespace in cputable.h
  [PATCH] powerpc: Remove unused iommu_off logic from pSeries_init_early()
  [PATCH] powerpc: Unconfuse htab_bolt_mapping() callers
  ...

366 files changed:
Documentation/powerpc/booting-without-of.txt
Documentation/powerpc/eeh-pci-error-recovery.txt
Documentation/powerpc/hvcs.txt
MAINTAINERS
arch/powerpc/Kconfig
arch/powerpc/Makefile
arch/powerpc/boot/install.sh
arch/powerpc/boot/main.c
arch/powerpc/configs/mpc8540_ads_defconfig [new file with mode: 0644]
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/firmware.c
arch/powerpc/kernel/head_44x.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/head_8xx.S
arch/powerpc/kernel/head_booke.h [new file with mode: 0644]
arch/powerpc/kernel/head_fsl_booke.S
arch/powerpc/kernel/iomap.c
arch/powerpc/kernel/iommu.c
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/of_device.c
arch/powerpc/kernel/pci_iommu.c
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/kernel/process.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/ptrace-common.h
arch/powerpc/kernel/rtas-proc.c
arch/powerpc/kernel/rtas_pci.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/signal_64.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/vdso.c
arch/powerpc/lib/copypage_64.S
arch/powerpc/lib/copyuser_64.S
arch/powerpc/lib/e2a.c
arch/powerpc/lib/memcpy_64.S
arch/powerpc/lib/rheap.c
arch/powerpc/mm/fault.c
arch/powerpc/mm/hash_low_32.S
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/init_64.c
arch/powerpc/mm/lmb.c
arch/powerpc/mm/mem.c
arch/powerpc/mm/mmap.c
arch/powerpc/mm/numa.c
arch/powerpc/mm/slb_low.S
arch/powerpc/mm/stab.c
arch/powerpc/mm/tlb_64.c
arch/powerpc/oprofile/op_model_power4.c
arch/powerpc/platforms/83xx/Makefile
arch/powerpc/platforms/83xx/misc.c [new file with mode: 0644]
arch/powerpc/platforms/83xx/mpc834x_sys.c
arch/powerpc/platforms/83xx/mpc834x_sys.h
arch/powerpc/platforms/83xx/mpc83xx.h
arch/powerpc/platforms/83xx/pci.c
arch/powerpc/platforms/85xx/Kconfig
arch/powerpc/platforms/85xx/Makefile
arch/powerpc/platforms/85xx/misc.c [new file with mode: 0644]
arch/powerpc/platforms/85xx/mpc8540_ads.h [new file with mode: 0644]
arch/powerpc/platforms/85xx/mpc85xx.h [new file with mode: 0644]
arch/powerpc/platforms/85xx/mpc85xx_ads.c [new file with mode: 0644]
arch/powerpc/platforms/85xx/pci.c [new file with mode: 0644]
arch/powerpc/platforms/Makefile
arch/powerpc/platforms/chrp/pegasos_eth.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/chrp/time.c
arch/powerpc/platforms/iseries/mf.c
arch/powerpc/platforms/iseries/setup.c
arch/powerpc/platforms/maple/time.c
arch/powerpc/platforms/powermac/cpufreq_32.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/powermac/nvram.c
arch/powerpc/platforms/powermac/setup.c
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/firmware.c [new file with mode: 0644]
arch/powerpc/platforms/pseries/firmware.h [new file with mode: 0644]
arch/powerpc/platforms/pseries/hvCall.S
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/platforms/pseries/pci.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/pseries/smp.c
arch/powerpc/platforms/pseries/xics.c
arch/powerpc/sysdev/dart_iommu.c
arch/powerpc/sysdev/dcr.S
arch/powerpc/sysdev/fsl_soc.c
arch/powerpc/sysdev/ipic.h
arch/powerpc/xmon/xmon.c
arch/ppc/4xx_io/serial_sicc.c
arch/ppc/8xx_io/commproc.c
arch/ppc/Kconfig
arch/ppc/Kconfig.debug
arch/ppc/amiga/amiints.c
arch/ppc/amiga/bootinfo.c
arch/ppc/amiga/cia.c
arch/ppc/amiga/config.c
arch/ppc/amiga/ints.c
arch/ppc/boot/Makefile
arch/ppc/boot/common/Makefile
arch/ppc/boot/common/bootinfo.c
arch/ppc/boot/common/misc-common.c
arch/ppc/boot/common/ns16550.c
arch/ppc/boot/common/serial_stub.c
arch/ppc/boot/common/util.S
arch/ppc/boot/include/mpc10x.h
arch/ppc/boot/simple/Makefile
arch/ppc/boot/simple/cpc700_memory.c
arch/ppc/boot/simple/embed_config.c
arch/ppc/boot/simple/head.S
arch/ppc/boot/simple/misc-chestnut.c
arch/ppc/boot/simple/misc-cpci690.c
arch/ppc/boot/simple/misc-ev64260.c
arch/ppc/boot/simple/misc-ev64360.c
arch/ppc/boot/simple/misc-katana.c
arch/ppc/boot/simple/misc-mv64x60.c
arch/ppc/boot/simple/misc-prep.c
arch/ppc/boot/simple/misc-radstone_ppc7d.c
arch/ppc/boot/simple/misc-spruce.c
arch/ppc/boot/simple/misc.c
arch/ppc/boot/simple/mpc10x_memory.c
arch/ppc/boot/simple/mpc52xx_tty.c
arch/ppc/boot/simple/mv64x60_tty.c
arch/ppc/boot/simple/openbios.c
arch/ppc/boot/simple/relocate.S
arch/ppc/boot/utils/mkbugboot.c
arch/ppc/configs/ml300_defconfig [new file with mode: 0644]
arch/ppc/configs/ml403_defconfig [new file with mode: 0644]
arch/ppc/kernel/head_44x.S
arch/ppc/kernel/head_8xx.S
arch/ppc/kernel/head_fsl_booke.S
arch/ppc/kernel/smp-tbsync.c
arch/ppc/kernel/traps.c
arch/ppc/lib/rheap.c
arch/ppc/math-emu/math.c
arch/ppc/mm/44x_mmu.c
arch/ppc/mm/fault.c
arch/ppc/mm/hashtable.S
arch/ppc/platforms/4xx/Kconfig
arch/ppc/platforms/4xx/Makefile
arch/ppc/platforms/4xx/bamboo.c
arch/ppc/platforms/4xx/bamboo.h
arch/ppc/platforms/4xx/bubinga.h
arch/ppc/platforms/4xx/cpci405.c
arch/ppc/platforms/4xx/ebony.c
arch/ppc/platforms/4xx/ebony.h
arch/ppc/platforms/4xx/ep405.c
arch/ppc/platforms/4xx/ep405.h
arch/ppc/platforms/4xx/ibm405ep.c
arch/ppc/platforms/4xx/ibm405ep.h
arch/ppc/platforms/4xx/ibm405gp.h
arch/ppc/platforms/4xx/ibm405gpr.c
arch/ppc/platforms/4xx/ibm405gpr.h
arch/ppc/platforms/4xx/ibm440ep.c
arch/ppc/platforms/4xx/ibm440ep.h
arch/ppc/platforms/4xx/ibm440gp.c
arch/ppc/platforms/4xx/ibm440gp.h
arch/ppc/platforms/4xx/ibm440gx.c
arch/ppc/platforms/4xx/ibm440gx.h
arch/ppc/platforms/4xx/ibm440sp.c
arch/ppc/platforms/4xx/ibm440sp.h
arch/ppc/platforms/4xx/ibmnp405h.c
arch/ppc/platforms/4xx/ibmnp405h.h
arch/ppc/platforms/4xx/ibmstb4.c
arch/ppc/platforms/4xx/ibmstb4.h
arch/ppc/platforms/4xx/ibmstbx25.c
arch/ppc/platforms/4xx/ibmstbx25.h
arch/ppc/platforms/4xx/luan.c
arch/ppc/platforms/4xx/luan.h
arch/ppc/platforms/4xx/ocotea.c
arch/ppc/platforms/4xx/ocotea.h
arch/ppc/platforms/4xx/ppc440spe.c
arch/ppc/platforms/4xx/ppc440spe.h
arch/ppc/platforms/4xx/redwood5.c
arch/ppc/platforms/4xx/redwood5.h
arch/ppc/platforms/4xx/redwood6.c
arch/ppc/platforms/4xx/redwood6.h
arch/ppc/platforms/4xx/sycamore.c
arch/ppc/platforms/4xx/sycamore.h
arch/ppc/platforms/4xx/virtex-ii_pro.c [deleted file]
arch/ppc/platforms/4xx/virtex-ii_pro.h [deleted file]
arch/ppc/platforms/4xx/virtex.c [new file with mode: 0644]
arch/ppc/platforms/4xx/virtex.h [new file with mode: 0644]
arch/ppc/platforms/4xx/walnut.c
arch/ppc/platforms/4xx/walnut.h
arch/ppc/platforms/4xx/xilinx_ml300.c
arch/ppc/platforms/4xx/xilinx_ml300.h
arch/ppc/platforms/4xx/xilinx_ml403.c [new file with mode: 0644]
arch/ppc/platforms/4xx/xilinx_ml403.h [new file with mode: 0644]
arch/ppc/platforms/4xx/xparameters/xparameters.h [new file with mode: 0644]
arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h [new file with mode: 0644]
arch/ppc/platforms/4xx/yucca.c
arch/ppc/platforms/4xx/yucca.h
arch/ppc/platforms/83xx/mpc834x_sys.c
arch/ppc/platforms/83xx/mpc834x_sys.h
arch/ppc/platforms/85xx/mpc8540_ads.c
arch/ppc/platforms/85xx/mpc8540_ads.h
arch/ppc/platforms/85xx/mpc8555_cds.h
arch/ppc/platforms/85xx/mpc8560_ads.c
arch/ppc/platforms/85xx/mpc8560_ads.h
arch/ppc/platforms/85xx/mpc85xx_ads_common.c
arch/ppc/platforms/85xx/mpc85xx_ads_common.h
arch/ppc/platforms/85xx/mpc85xx_cds_common.c
arch/ppc/platforms/85xx/mpc85xx_cds_common.h
arch/ppc/platforms/85xx/sbc8560.c
arch/ppc/platforms/85xx/sbc8560.h
arch/ppc/platforms/85xx/sbc85xx.c
arch/ppc/platforms/85xx/sbc85xx.h
arch/ppc/platforms/85xx/stx_gp3.c
arch/ppc/platforms/85xx/stx_gp3.h
arch/ppc/platforms/85xx/tqm85xx.c
arch/ppc/platforms/85xx/tqm85xx.h
arch/ppc/platforms/Makefile
arch/ppc/platforms/apus_setup.c
arch/ppc/platforms/chestnut.c
arch/ppc/platforms/chestnut.h
arch/ppc/platforms/chrp_pegasos_eth.c
arch/ppc/platforms/chrp_setup.c
arch/ppc/platforms/chrp_time.c
arch/ppc/platforms/cpci690.c
arch/ppc/platforms/cpci690.h
arch/ppc/platforms/ev64260.c
arch/ppc/platforms/ev64260.h
arch/ppc/platforms/ev64360.c
arch/ppc/platforms/ev64360.h
arch/ppc/platforms/fads.h
arch/ppc/platforms/gemini.h
arch/ppc/platforms/gemini_prom.S
arch/ppc/platforms/gemini_setup.c
arch/ppc/platforms/hdpu.c
arch/ppc/platforms/hdpu.h
arch/ppc/platforms/katana.c
arch/ppc/platforms/katana.h
arch/ppc/platforms/lite5200.c
arch/ppc/platforms/lite5200.h
arch/ppc/platforms/lopec.c
arch/ppc/platforms/mpc8272ads_setup.c [new file with mode: 0644]
arch/ppc/platforms/mpc866ads_setup.c [new file with mode: 0644]
arch/ppc/platforms/mpc885ads_setup.c [new file with mode: 0644]
arch/ppc/platforms/mvme5100.c
arch/ppc/platforms/pal4.h
arch/ppc/platforms/pal4_pci.c
arch/ppc/platforms/pal4_serial.h
arch/ppc/platforms/pal4_setup.c
arch/ppc/platforms/powerpmc250.c
arch/ppc/platforms/pplus.c
arch/ppc/platforms/pplus.h
arch/ppc/platforms/pq2ads.c
arch/ppc/platforms/pq2ads.h
arch/ppc/platforms/pq2ads_pd.h [new file with mode: 0644]
arch/ppc/platforms/prep_setup.c
arch/ppc/platforms/prpmc750.c
arch/ppc/platforms/prpmc800.c
arch/ppc/platforms/radstone_ppc7d.c
arch/ppc/platforms/radstone_ppc7d.h
arch/ppc/platforms/sandpoint.c
arch/ppc/platforms/sandpoint.h
arch/ppc/platforms/sbc82xx.c
arch/ppc/platforms/spruce.c
arch/ppc/platforms/tqm8260_setup.c
arch/ppc/syslib/Makefile
arch/ppc/syslib/cpc700.h
arch/ppc/syslib/cpc700_pic.c
arch/ppc/syslib/cpc710.h
arch/ppc/syslib/gen550.h
arch/ppc/syslib/gen550_dbg.c
arch/ppc/syslib/gen550_kgdb.c
arch/ppc/syslib/gt64260_pic.c
arch/ppc/syslib/harrier.c
arch/ppc/syslib/hawk_common.c
arch/ppc/syslib/ibm440gp_common.c
arch/ppc/syslib/ibm440gp_common.h
arch/ppc/syslib/ibm440gx_common.c
arch/ppc/syslib/ibm440gx_common.h
arch/ppc/syslib/ibm440sp_common.c
arch/ppc/syslib/ibm440sp_common.h
arch/ppc/syslib/ibm44x_common.c
arch/ppc/syslib/ibm44x_common.h
arch/ppc/syslib/m8260_pci_erratum9.c
arch/ppc/syslib/m8260_setup.c
arch/ppc/syslib/m8xx_setup.c
arch/ppc/syslib/m8xx_wdt.c
arch/ppc/syslib/mpc10x_common.c
arch/ppc/syslib/mpc52xx_devices.c
arch/ppc/syslib/mpc52xx_pci.c
arch/ppc/syslib/mpc52xx_pci.h
arch/ppc/syslib/mpc52xx_pic.c
arch/ppc/syslib/mpc52xx_setup.c
arch/ppc/syslib/mpc52xx_sys.c
arch/ppc/syslib/mpc83xx_devices.c
arch/ppc/syslib/mpc83xx_sys.c
arch/ppc/syslib/mpc85xx_devices.c
arch/ppc/syslib/mpc85xx_sys.c
arch/ppc/syslib/mpc8xx_devices.c
arch/ppc/syslib/mpc8xx_sys.c
arch/ppc/syslib/mv64360_pic.c
arch/ppc/syslib/mv64x60.c
arch/ppc/syslib/mv64x60_dbg.c
arch/ppc/syslib/mv64x60_win.c
arch/ppc/syslib/ocp.c
arch/ppc/syslib/open_pic.c
arch/ppc/syslib/open_pic2.c
arch/ppc/syslib/open_pic_defs.h
arch/ppc/syslib/pci_auto.c
arch/ppc/syslib/ppc4xx_dma.c
arch/ppc/syslib/ppc4xx_pic.c
arch/ppc/syslib/ppc4xx_pm.c [deleted file]
arch/ppc/syslib/ppc4xx_sgdma.c
arch/ppc/syslib/ppc83xx_setup.c
arch/ppc/syslib/ppc83xx_setup.h
arch/ppc/syslib/ppc85xx_common.c
arch/ppc/syslib/ppc85xx_common.h
arch/ppc/syslib/ppc85xx_setup.c
arch/ppc/syslib/ppc85xx_setup.h
arch/ppc/syslib/ppc_sys.c
arch/ppc/syslib/pq2_devices.c
arch/ppc/syslib/pq2_sys.c
arch/ppc/syslib/prep_nvram.c
arch/ppc/syslib/todc_time.c
arch/ppc/syslib/xilinx_pic.c
drivers/char/Kconfig
drivers/char/hvcs.c
drivers/macintosh/macio_asic.c
drivers/macintosh/smu.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/via-pmu.c
drivers/macintosh/windfarm_lm75_sensor.c
drivers/macintosh/windfarm_max6690_sensor.c
drivers/macintosh/windfarm_smu_sat.c
drivers/net/Kconfig
include/asm-powerpc/atomic.h
include/asm-powerpc/cputable.h
include/asm-powerpc/cputime.h
include/asm-powerpc/firmware.h
include/asm-powerpc/irq.h
include/asm-powerpc/iseries/mf.h
include/asm-powerpc/lmb.h
include/asm-powerpc/mmu.h
include/asm-powerpc/paca.h
include/asm-powerpc/pgtable-4k.h
include/asm-powerpc/pgtable.h
include/asm-powerpc/ppc_asm.h
include/asm-powerpc/processor.h
include/asm-powerpc/prom.h
include/asm-powerpc/rwsem.h
include/asm-powerpc/synch.h
include/asm-powerpc/system.h
include/asm-powerpc/time.h
include/asm-ppc/harrier.h
include/asm-ppc/ibm44x.h
include/asm-ppc/ibm4xx.h
include/asm-ppc/io.h
include/asm-ppc/mpc10x.h
include/asm-ppc/mpc52xx.h
include/asm-ppc/mpc8260.h
include/asm-ppc/mpc83xx.h
include/asm-ppc/mpc85xx.h
include/asm-ppc/mpc8xx.h
include/asm-ppc/pgtable.h
include/asm-ppc/ppc_sys.h
include/asm-ppc/time.h
include/asm-ppc/todc.h
include/asm-ppc/xparameters.h [deleted file]
kernel/auditsc.c
lib/extable.c

index d02c64953dcdb63443a653cdf79691823368f694..ee551c6ea235a6f63f2df48bf35e9cb97a49a5a9 100644 (file)
@@ -1365,6 +1365,78 @@ platforms are moved over to use the flattened-device-tree model.
        };
 
 
+   g) Freescale SOC SEC Security Engines
+
+   Required properties:
+
+    - device_type : Should be "crypto"
+    - model : Model of the device.  Should be "SEC1" or "SEC2"
+    - compatible : Should be "talitos"
+    - reg : Offset and length of the register set for the device
+    - interrupts : <a b> where a is the interrupt number and b is a
+      field that represents an encoding of the sense and level
+      information for the interrupt.  This should be encoded based on
+      the information in section 2) depending on the type of interrupt
+      controller you have.
+    - interrupt-parent : the phandle for the interrupt controller that
+      services interrupts for this device.
+    - num-channels : An integer representing the number of channels
+      available.
+    - channel-fifo-len : An integer representing the number of
+      descriptor pointers each channel fetch fifo can hold.
+    - exec-units-mask : The bitmask representing what execution units
+      (EUs) are available. It's a single 32 bit cell. EU information
+      should be encoded following the SEC's Descriptor Header Dword
+      EU_SEL0 field documentation, i.e. as follows:
+
+        bit 0 = reserved - should be 0
+        bit 1 = set if SEC has the ARC4 EU (AFEU)
+        bit 2 = set if SEC has the DES/3DES EU (DEU)
+        bit 3 = set if SEC has the message digest EU (MDEU)
+        bit 4 = set if SEC has the random number generator EU (RNG)
+        bit 5 = set if SEC has the public key EU (PKEU)
+        bit 6 = set if SEC has the AES EU (AESU)
+        bit 7 = set if SEC has the Kasumi EU (KEU)
+
+      bits 8 through 31 are reserved for future SEC EUs.
+
+    - descriptor-types-mask : The bitmask representing what descriptors
+      are available. It's a single 32 bit cell. Descriptor type
+      information should be encoded following the SEC's Descriptor
+      Header Dword DESC_TYPE field documentation, i.e. as follows:
+
+        bit 0  = set if SEC supports the aesu_ctr_nonsnoop desc. type
+        bit 1  = set if SEC supports the ipsec_esp descriptor type
+        bit 2  = set if SEC supports the common_nonsnoop desc. type
+        bit 3  = set if SEC supports the 802.11i AES ccmp desc. type
+        bit 4  = set if SEC supports the hmac_snoop_no_afeu desc. type
+        bit 5  = set if SEC supports the srtp descriptor type
+        bit 6  = set if SEC supports the non_hmac_snoop_no_afeu desc.type
+        bit 7  = set if SEC supports the pkeu_assemble descriptor type
+        bit 8  = set if SEC supports the aesu_key_expand_output desc.type
+        bit 9  = set if SEC supports the pkeu_ptmul descriptor type
+        bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type
+        bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type
+
+      ..and so on and so forth.
+
+   Example:
+
+       /* MPC8548E */
+       crypto@30000 {
+               device_type = "crypto";
+               model = "SEC2";
+               compatible = "talitos";
+               reg = <30000 10000>;
+               interrupts = <1d 3>;
+               interrupt-parent = <40000>;
+               num-channels = <4>;
+               channel-fifo-len = <24>;
+               exec-units-mask = <000000fe>;
+               descriptor-types-mask = <073f1127>;
+       };
+
+
    More devices will be defined as this spec matures.
 
 
index 67a11a36270ca05c8761e3b339577fe364dda085..3764dd4b12cbac8f1d5a224faca4f2f5894ed889 100644 (file)
@@ -121,7 +121,7 @@ accomplished.
 
 EEH must be enabled in the PHB's very early during the boot process,
 and if a PCI slot is hot-plugged. The former is performed by
-eeh_init() in arch/ppc64/kernel/eeh.c, and the later by
+eeh_init() in arch/powerpc/platforms/pseries/eeh.c, and the later by
 drivers/pci/hotplug/pSeries_pci.c calling in to the eeh.c code.
 EEH must be enabled before a PCI scan of the device can proceed.
 Current Power5 hardware will not work unless EEH is enabled;
@@ -133,7 +133,7 @@ error.  Given an arbitrary address, the routine
 pci_get_device_by_addr() will find the pci device associated
 with that address (if any).
 
-The default include/asm-ppc64/io.h macros readb(), inb(), insb(),
+The default include/asm-powerpc/io.h macros readb(), inb(), insb(),
 etc. include a check to see if the i/o read returned all-0xff's.
 If so, these make a call to eeh_dn_check_failure(), which in turn
 asks the firmware if the all-ff's value is the sign of a true EEH
@@ -143,11 +143,12 @@ seen in /proc/ppc64/eeh (subject to change).  Normally, almost
 all of these occur during boot, when the PCI bus is scanned, where
 a large number of 0xff reads are part of the bus scan procedure.
 
-If a frozen slot is detected, code in arch/ppc64/kernel/eeh.c will
-print a stack trace to syslog (/var/log/messages).  This stack trace
-has proven to be very useful to device-driver authors for finding
-out at what point the EEH error was detected, as the error itself
-usually occurs slightly beforehand.
+If a frozen slot is detected, code in 
+arch/powerpc/platforms/pseries/eeh.c will print a stack trace to 
+syslog (/var/log/messages).  This stack trace has proven to be very 
+useful to device-driver authors for finding out at what point the EEH 
+error was detected, as the error itself usually occurs slightly 
+beforehand.
 
 Next, it uses the Linux kernel notifier chain/work queue mechanism to
 allow any interested parties to find out about the failure.  Device
index dca75cbda6f8abc144afb9efcdea77b7b5f21eac..1e38166f4e54b1d83cf5cb86c68394826c2e5fa9 100644 (file)
@@ -558,9 +558,9 @@ partitions.
 
 The proper channel for reporting bugs is either through the Linux OS
 distribution company that provided your OS or by posting issues to the
-ppc64 development mailing list at:
+PowerPC development mailing list at:
 
-linuxppc64-dev@lists.linuxppc.org
+linuxppc-dev@ozlabs.org
 
 This request is to provide a documented and searchable public exchange
 of the problems and solutions surrounding this driver for the benefit of
index dd1351dc32b895b5298fabe7c0c37062af9489c4..bfd7fbfe90ab4642e6913e261c34aa57dbf8c76b 100644 (file)
@@ -534,7 +534,7 @@ S:   Supported
 BROADBAND PROCESSOR ARCHITECTURE
 P:     Arnd Bergmann
 M:     arnd@arndb.de
-L:     linuxppc64-dev@ozlabs.org
+L:     linuxppc-dev@ozlabs.org
 W:     http://linuxppc64.org
 S:     Supported
 
@@ -1624,7 +1624,7 @@ P:        Anton Blanchard
 M:     anton@samba.org
 M:     anton@au.ibm.com
 W:     http://linuxppc64.org
-L:     linuxppc64-dev@ozlabs.org
+L:     linuxppc-dev@ozlabs.org
 S:     Supported
 
 LINUX SECURITY MODULE (LSM) FRAMEWORK
index dfba81719dec066b66078a37e48878622cb025fd..fae42da7468d0b82b1c6f3ab911d3ec3e05c1414 100644 (file)
@@ -127,6 +127,12 @@ config PPC_83xx
        select 83xx
        select PPC_FPU
 
+config PPC_85xx
+       bool "Freescale 85xx"
+       select E500
+       select FSL_SOC
+       select 85xx
+
 config 40x
        bool "AMCC 40x"
 
@@ -139,8 +145,6 @@ config 8xx
 config E200
        bool "Freescale e200"
 
-config E500
-       bool "Freescale e500"
 endchoice
 
 config POWER4_ONLY
@@ -168,6 +172,13 @@ config 6xx
 config 83xx
        bool
 
+# this is temp to handle compat with arch=ppc
+config 85xx
+       bool
+
+config E500
+       bool
+
 config PPC_FPU
        bool
        default y if PPC64
@@ -217,6 +228,7 @@ config ALTIVEC
 config SPE
        bool "SPE Support"
        depends on E200 || E500
+       default y
        ---help---
          This option enables kernel support for the Signal Processing
          Extensions (SPE) to the PowerPC processor. The kernel currently
@@ -238,6 +250,21 @@ config PPC_STD_MMU_32
        def_bool y
        depends on PPC_STD_MMU && PPC32
 
+config VIRT_CPU_ACCOUNTING
+       bool "Deterministic task and CPU time accounting"
+       depends on PPC64
+       default y
+       help
+         Select this option to enable more accurate task and CPU time
+         accounting.  This is done by reading a CPU counter on each
+         kernel entry and exit and on transitions within the kernel
+         between system, softirq and hardirq state, so there is a
+         small performance impact.  This also enables accounting of
+         stolen time on logically-partitioned systems running on
+         IBM POWER5-based machines.
+
+         If in doubt, say Y here.
+
 config SMP
        depends on PPC_STD_MMU
        bool "Symmetric multi-processing support"
@@ -734,13 +761,12 @@ config GENERIC_ISA_DMA
 
 config PPC_I8259
        bool
-       default y if 85xx
        default n
 
 config PPC_INDIRECT_PCI
        bool
        depends on PCI
-       default y if 40x || 44x || 85xx
+       default y if 40x || 44x
        default n
 
 config EISA
@@ -757,8 +783,8 @@ config MCA
        bool
 
 config PCI
-       bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
-       default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx
+       bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES)
+       default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx
        default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
        default PCI_QSPAN if !4xx && !CPM2 && 8xx
        help
index 5500ab55d042840db244abf496d7b66a7087f825..a3fc7a23158fadac51e13609e5c3c232e02d5ed8 100644 (file)
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE)
 
 CPPFLAGS_vmlinux.lds   := -Upowerpc
 
-BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage
+BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin
 
 .PHONY: $(BOOT_TARGETS)
 
index eacce9590816db61686cd20f3ef5d4f23a2c2cfb..b002bfd56786bd4d174e38f62a9d8cd59bd5f2c0 100644 (file)
@@ -1,7 +1,5 @@
 #!/bin/sh
 #
-# arch/ppc64/boot/install.sh
-#
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
index 55ec5986725079c24c56bef079c5f822700b9f0b..816446f0e497a64dda37c15f27ce0b6e4560a698 100644 (file)
@@ -152,7 +152,7 @@ static int is_elf64(void *hdr)
        elf64ph = (Elf64_Phdr *)((unsigned long)elf64 +
                                 (unsigned long)elf64->e_phoff);
        for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++)
-               if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0)
+               if (elf64ph->p_type == PT_LOAD)
                        break;
        if (i >= (unsigned int)elf64->e_phnum)
                return 0;
@@ -193,7 +193,7 @@ static int is_elf32(void *hdr)
        elf32 = (Elf32_Ehdr *)elfheader;
        elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff);
        for (i = 0; i < elf32->e_phnum; i++, elf32ph++)
-               if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0)
+               if (elf32ph->p_type == PT_LOAD)
                        break;
        if (i >= elf32->e_phnum)
                return 0;
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig
new file mode 100644 (file)
index 0000000..2a8290e
--- /dev/null
@@ -0,0 +1,721 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 
+# Sat Jan 14 15:57:54 2006
+#
+# CONFIG_PPC64 is not set
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+
+#
+# Processor support
+#
+# CONFIG_CLASSIC32 is not set
+# CONFIG_PPC_52xx is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+CONFIG_PPC_85xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_8xx is not set
+# CONFIG_E200 is not set
+CONFIG_85xx=y
+CONFIG_E500=y
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+# CONFIG_PHYS_64BIT is not set
+CONFIG_SPE=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_EMBEDDED=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# Block layer
+#
+# CONFIG_LBD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_MPIC=y
+# CONFIG_WANT_EARLY_SERIAL is not set
+
+#
+# Platform support
+#
+CONFIG_MPC8540_ADS=y
+CONFIG_MPC8540=y
+CONFIG_PPC_INDIRECT_PCI_BE=y
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_MATH_EMULATION=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+# CONFIG_SOFTWARE_SUSPEND is not set
+# CONFIG_SECCOMP is not set
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+# CONFIG_PPC_I8259 is not set
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_FSL_SOC=y
+# CONFIG_PCI is not set
+# CONFIG_PCI_DOMAINS is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PCI Hotplug Support
+#
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Macintosh device drivers
+#
+# CONFIG_WINDFARM is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+
+#
+# Ethernet (1000 Mbit)
+#
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+
+#
+# SN Devices
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+
+#
+# Instrumentation Support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_DEBUGGER is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_BOOTX_TEXT is not set
+# 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
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
index c9a660e4c2db24d4dd03c46b9ecf0065e405e027..882889b15926780f6eeff803a8029ad38248127c 100644 (file)
@@ -136,6 +136,9 @@ int main(void)
        DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp));
        DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr));
        DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id));
+       DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr));
+       DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
+       DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
 
        DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0));
        DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1));
index e4e81374cb9a48011191a85cc75995430e64817f..39e348a3ade2451cdeb01663b81eaec332c80850 100644 (file)
@@ -894,7 +894,7 @@ struct cpu_spec     cpu_specs[] = {
                .platform               = "ppc405",
        },
        {       /* Xilinx Virtex-II Pro  */
-               .pvr_mask               = 0xffff0000,
+               .pvr_mask               = 0xfffff000,
                .pvr_value              = 0x20010000,
                .cpu_name               = "Virtex-II Pro",
                .cpu_features           = CPU_FTRS_40X,
@@ -904,6 +904,16 @@ struct cpu_spec    cpu_specs[] = {
                .dcache_bsize           = 32,
                .platform               = "ppc405",
        },
+       {       /* Xilinx Virtex-4 FX */
+               .pvr_mask               = 0xfffff000,
+               .pvr_value              = 0x20011000,
+               .cpu_name               = "Virtex-4 FX",
+               .cpu_features           = CPU_FTRS_40X,
+               .cpu_user_features      = PPC_FEATURE_32 |
+                       PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+       },
        {       /* 405EP */
                .pvr_mask               = 0xffff0000,
                .pvr_value              = 0x51210000,
index 24be0cf86d7f75635de6cd81047f06ca832e5c6c..1060155d84c3f3aa035fad42097f49ca37d7c100 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc64/kernel/entry.S
- *
  *  PowerPC version 
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *  Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
@@ -63,6 +61,7 @@ system_call_common:
        std     r12,_MSR(r1)
        std     r0,GPR0(r1)
        std     r10,GPR1(r1)
+       ACCOUNT_CPU_USER_ENTRY(r10, r11)
        std     r2,GPR2(r1)
        std     r3,GPR3(r1)
        std     r4,GPR4(r1)
@@ -170,8 +169,9 @@ syscall_error_cont:
        stdcx.  r0,0,r1                 /* to clear the reservation */
        andi.   r6,r8,MSR_PR
        ld      r4,_LINK(r1)
-       beq-    1f                      /* only restore r13 if */
-       ld      r13,GPR13(r1)           /* returning to usermode */
+       beq-    1f
+       ACCOUNT_CPU_USER_EXIT(r11, r12)
+       ld      r13,GPR13(r1)   /* only restore r13 if returning to usermode */
 1:     ld      r2,GPR2(r1)
        li      r12,MSR_RI
        andc    r11,r10,r12
@@ -322,7 +322,7 @@ _GLOBAL(ret_from_fork)
  * the fork code also.
  *
  * The code which creates the new task context is in 'copy_thread'
- * in arch/ppc64/kernel/process.c
+ * in arch/powerpc/kernel/process.c 
  */
        .align  7
 _GLOBAL(_switch)
@@ -486,6 +486,7 @@ restore:
         * userspace
         */
        beq     1f
+       ACCOUNT_CPU_USER_EXIT(r3, r4)
        REST_GPR(13, r1)
 1:
        ld      r3,_CTR(r1)
index 65eae752a527ca9a3346c78826ffa7d15949b002..4d37a3cb80f64c786ac0cbf21f27f1318c1821c0 100644 (file)
 #include <asm/firmware.h>
 
 unsigned long ppc64_firmware_features;
-
-#ifdef CONFIG_PPC_PSERIES
-firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = {
-       {FW_FEATURE_PFT,                "hcall-pft"},
-       {FW_FEATURE_TCE,                "hcall-tce"},
-       {FW_FEATURE_SPRG0,              "hcall-sprg0"},
-       {FW_FEATURE_DABR,               "hcall-dabr"},
-       {FW_FEATURE_COPY,               "hcall-copy"},
-       {FW_FEATURE_ASR,                "hcall-asr"},
-       {FW_FEATURE_DEBUG,              "hcall-debug"},
-       {FW_FEATURE_PERF,               "hcall-perf"},
-       {FW_FEATURE_DUMP,               "hcall-dump"},
-       {FW_FEATURE_INTERRUPT,          "hcall-interrupt"},
-       {FW_FEATURE_MIGRATE,            "hcall-migrate"},
-       {FW_FEATURE_PERFMON,            "hcall-perfmon"},
-       {FW_FEATURE_CRQ,                "hcall-crq"},
-       {FW_FEATURE_VIO,                "hcall-vio"},
-       {FW_FEATURE_RDMA,               "hcall-rdma"},
-       {FW_FEATURE_LLAN,               "hcall-lLAN"},
-       {FW_FEATURE_BULK,               "hcall-bulk"},
-       {FW_FEATURE_XDABR,              "hcall-xdabr"},
-       {FW_FEATURE_MULTITCE,           "hcall-multi-tce"},
-       {FW_FEATURE_SPLPAR,             "hcall-splpar"},
-};
-#endif
index 8b49679fad549f7810a597f34857576d98d82bca..47c7fa148c9a999dfbe38f8a1c62eb12e2236b5c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/head_44x.S
- *
  * Kernel execution entry point code.
  *
  *    Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
index 9b65029dd2a32a4ea0ac17facfcbfda7eb8987d3..35084f3a841b91fbf49a12ac3167d93d8fe690a6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc64/kernel/head.S
- *
  *  PowerPC version
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *
@@ -279,6 +277,7 @@ exception_marker:
        std     r10,0(r1);              /* make stack chain pointer     */ \
        std     r0,GPR0(r1);            /* save r0 in stackframe        */ \
        std     r10,GPR1(r1);           /* save r1 in stackframe        */ \
+       ACCOUNT_CPU_USER_ENTRY(r9, r10);                                   \
        std     r2,GPR2(r1);            /* save r2 in stackframe        */ \
        SAVE_4GPRS(3, r1);              /* save r3 - r6 in stackframe   */ \
        SAVE_2GPRS(7, r1);              /* save r7, r8 in stackframe    */ \
@@ -846,6 +845,14 @@ fast_exception_return:
        ld      r11,_NIP(r1)
        andi.   r3,r12,MSR_RI           /* check if RI is set */
        beq-    unrecov_fer
+
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+       andi.   r3,r12,MSR_PR
+       beq     2f
+       ACCOUNT_CPU_USER_EXIT(r3, r4)
+2:
+#endif
+
        ld      r3,_CCR(r1)
        ld      r4,_LINK(r1)
        ld      r5,_CTR(r1)
index bc6d1ac55235aa80ecedcf8f70eb5cec8b213f24..28941f5ce6732cf91e28d2b40ba52133f34d0dc5 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/except_8xx.S
- *
  *  PowerPC version
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *  Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
new file mode 100644 (file)
index 0000000..8536e76
--- /dev/null
@@ -0,0 +1,363 @@
+#ifndef __HEAD_BOOKE_H__
+#define __HEAD_BOOKE_H__
+
+/*
+ * Macros used for common Book-e exception handling
+ */
+
+#define SET_IVOR(vector_number, vector_label)          \
+               li      r26,vector_label@l;             \
+               mtspr   SPRN_IVOR##vector_number,r26;   \
+               sync
+
+#define NORMAL_EXCEPTION_PROLOG                                                     \
+       mtspr   SPRN_SPRG0,r10;         /* save two registers to work with */\
+       mtspr   SPRN_SPRG1,r11;                                              \
+       mtspr   SPRN_SPRG4W,r1;                                              \
+       mfcr    r10;                    /* save CR in r10 for now          */\
+       mfspr   r11,SPRN_SRR1;          /* check whether user or kernel    */\
+       andi.   r11,r11,MSR_PR;                                              \
+       beq     1f;                                                          \
+       mfspr   r1,SPRN_SPRG3;          /* if from user, start at top of   */\
+       lwz     r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack   */\
+       addi    r1,r1,THREAD_SIZE;                                           \
+1:     subi    r1,r1,INT_FRAME_SIZE;   /* Allocate an exception frame     */\
+       mr      r11,r1;                                                      \
+       stw     r10,_CCR(r11);          /* save various registers          */\
+       stw     r12,GPR12(r11);                                              \
+       stw     r9,GPR9(r11);                                                \
+       mfspr   r10,SPRN_SPRG0;                                              \
+       stw     r10,GPR10(r11);                                              \
+       mfspr   r12,SPRN_SPRG1;                                              \
+       stw     r12,GPR11(r11);                                              \
+       mflr    r10;                                                         \
+       stw     r10,_LINK(r11);                                              \
+       mfspr   r10,SPRN_SPRG4R;                                             \
+       mfspr   r12,SPRN_SRR0;                                               \
+       stw     r10,GPR1(r11);                                               \
+       mfspr   r9,SPRN_SRR1;                                                \
+       stw     r10,0(r11);                                                  \
+       rlwinm  r9,r9,0,14,12;          /* clear MSR_WE (necessary?)       */\
+       stw     r0,GPR0(r11);                                                \
+       SAVE_4GPRS(3, r11);                                                  \
+       SAVE_2GPRS(7, r11)
+
+/* To handle the additional exception priority levels on 40x and Book-E
+ * processors we allocate a 4k stack per additional priority level. The various
+ * head_xxx.S files allocate space (exception_stack_top) for each priority's
+ * stack times the number of CPUs
+ *
+ * On 40x critical is the only additional level
+ * On 44x/e500 we have critical and machine check
+ * On e200 we have critical and debug (machine check occurs via critical)
+ *
+ * Additionally we reserve a SPRG for each priority level so we can free up a
+ * GPR to use as the base for indirect access to the exception stacks.  This
+ * is necessary since the MMU is always on, for Book-E parts, and the stacks
+ * are offset from KERNELBASE.
+ *
+ */
+#define BOOKE_EXCEPTION_STACK_SIZE     (8192)
+
+/* CRIT_SPRG only used in critical exception handling */
+#define CRIT_SPRG      SPRN_SPRG2
+/* MCHECK_SPRG only used in machine check exception handling */
+#define MCHECK_SPRG    SPRN_SPRG6W
+
+#define MCHECK_STACK_TOP       (exception_stack_top - 4096)
+#define CRIT_STACK_TOP         (exception_stack_top)
+
+/* only on e200 for now */
+#define DEBUG_STACK_TOP                (exception_stack_top - 4096)
+#define DEBUG_SPRG             SPRN_SPRG6W
+
+#ifdef CONFIG_SMP
+#define BOOKE_LOAD_EXC_LEVEL_STACK(level)              \
+       mfspr   r8,SPRN_PIR;                            \
+       mulli   r8,r8,BOOKE_EXCEPTION_STACK_SIZE;       \
+       neg     r8,r8;                                  \
+       addis   r8,r8,level##_STACK_TOP@ha;             \
+       addi    r8,r8,level##_STACK_TOP@l
+#else
+#define BOOKE_LOAD_EXC_LEVEL_STACK(level)              \
+       lis     r8,level##_STACK_TOP@h;                 \
+       ori     r8,r8,level##_STACK_TOP@l
+#endif
+
+/*
+ * Exception prolog for critical/machine check exceptions.  This is a
+ * little different from the normal exception prolog above since a
+ * critical/machine check exception can potentially occur at any point
+ * during normal exception processing. Thus we cannot use the same SPRG
+ * registers as the normal prolog above. Instead we use a portion of the
+ * critical/machine check exception stack at low physical addresses.
+ */
+#define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \
+       mtspr   exc_level##_SPRG,r8;                                         \
+       BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \
+       stw     r10,GPR10-INT_FRAME_SIZE(r8);                                \
+       stw     r11,GPR11-INT_FRAME_SIZE(r8);                                \
+       mfcr    r10;                    /* save CR in r10 for now          */\
+       mfspr   r11,exc_level_srr1;     /* check whether user or kernel    */\
+       andi.   r11,r11,MSR_PR;                                              \
+       mr      r11,r8;                                                      \
+       mfspr   r8,exc_level##_SPRG;                                         \
+       beq     1f;                                                          \
+       /* COMING FROM USER MODE */                                          \
+       mfspr   r11,SPRN_SPRG3;         /* if from user, start at top of   */\
+       lwz     r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
+       addi    r11,r11,THREAD_SIZE;                                         \
+1:     subi    r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame     */\
+       stw     r10,_CCR(r11);          /* save various registers          */\
+       stw     r12,GPR12(r11);                                              \
+       stw     r9,GPR9(r11);                                                \
+       mflr    r10;                                                         \
+       stw     r10,_LINK(r11);                                              \
+       mfspr   r12,SPRN_DEAR;          /* save DEAR and ESR in the frame  */\
+       stw     r12,_DEAR(r11);         /* since they may have had stuff   */\
+       mfspr   r9,SPRN_ESR;            /* in them at the point where the  */\
+       stw     r9,_ESR(r11);           /* exception was taken             */\
+       mfspr   r12,exc_level_srr0;                                          \
+       stw     r1,GPR1(r11);                                                \
+       mfspr   r9,exc_level_srr1;                                           \
+       stw     r1,0(r11);                                                   \
+       mr      r1,r11;                                                      \
+       rlwinm  r9,r9,0,14,12;          /* clear MSR_WE (necessary?)       */\
+       stw     r0,GPR0(r11);                                                \
+       SAVE_4GPRS(3, r11);                                                  \
+       SAVE_2GPRS(7, r11)
+
+#define CRITICAL_EXCEPTION_PROLOG \
+               EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1)
+#define DEBUG_EXCEPTION_PROLOG \
+               EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1)
+#define MCHECK_EXCEPTION_PROLOG \
+               EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1)
+
+/*
+ * Exception vectors.
+ */
+#define        START_EXCEPTION(label)                                               \
+        .align 5;                                                                   \
+label:
+
+#define FINISH_EXCEPTION(func)                                 \
+       bl      transfer_to_handler_full;                       \
+       .long   func;                                           \
+       .long   ret_from_except_full
+
+#define EXCEPTION(n, label, hdlr, xfer)                                \
+       START_EXCEPTION(label);                                 \
+       NORMAL_EXCEPTION_PROLOG;                                \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                     \
+       xfer(n, hdlr)
+
+#define CRITICAL_EXCEPTION(n, label, hdlr)                     \
+       START_EXCEPTION(label);                                 \
+       CRITICAL_EXCEPTION_PROLOG;                              \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                     \
+       EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
+                         NOCOPY, crit_transfer_to_handler, \
+                         ret_from_crit_exc)
+
+#define MCHECK_EXCEPTION(n, label, hdlr)                       \
+       START_EXCEPTION(label);                                 \
+       MCHECK_EXCEPTION_PROLOG;                                \
+       mfspr   r5,SPRN_ESR;                                    \
+       stw     r5,_ESR(r11);                                   \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                     \
+       EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
+                         NOCOPY, mcheck_transfer_to_handler,   \
+                         ret_from_mcheck_exc)
+
+#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret)  \
+       li      r10,trap;                                       \
+       stw     r10,_TRAP(r11);                                 \
+       lis     r10,msr@h;                                      \
+       ori     r10,r10,msr@l;                                  \
+       copyee(r10, r9);                                        \
+       bl      tfer;                                           \
+       .long   hdlr;                                           \
+       .long   ret
+
+#define COPY_EE(d, s)          rlwimi d,s,0,16,16
+#define NOCOPY(d, s)
+
+#define EXC_XFER_STD(n, hdlr)          \
+       EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
+                         ret_from_except_full)
+
+#define EXC_XFER_LITE(n, hdlr)         \
+       EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+                         ret_from_except)
+
+#define EXC_XFER_EE(n, hdlr)           \
+       EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \
+                         ret_from_except_full)
+
+#define EXC_XFER_EE_LITE(n, hdlr)      \
+       EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \
+                         ret_from_except)
+
+/* Check for a single step debug exception while in an exception
+ * handler before state has been saved.  This is to catch the case
+ * where an instruction that we are trying to single step causes
+ * an exception (eg ITLB/DTLB miss) and thus the first instruction of
+ * the exception handler generates a single step debug exception.
+ *
+ * If we get a debug trap on the first instruction of an exception handler,
+ * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is
+ * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR).
+ * The exception handler was handling a non-critical interrupt, so it will
+ * save (and later restore) the MSR via SPRN_CSRR1, which will still have
+ * the MSR_DE bit set.
+ */
+#ifdef CONFIG_E200
+#define DEBUG_EXCEPTION                                                              \
+       START_EXCEPTION(Debug);                                               \
+       DEBUG_EXCEPTION_PROLOG;                                               \
+                                                                             \
+       /*                                                                    \
+        * If there is a single step or branch-taken exception in an          \
+        * exception entry sequence, it was probably meant to apply to        \
+        * the code where the exception occurred (since exception entry       \
+        * doesn't turn off DE automatically).  We simulate the effect        \
+        * of turning off DE on entry to an exception handler by turning      \
+        * off DE in the CSRR1 value and clearing the debug status.           \
+        */                                                                   \
+       mfspr   r10,SPRN_DBSR;          /* check single-step/branch taken */  \
+       andis.  r10,r10,DBSR_IC@h;                                            \
+       beq+    2f;                                                           \
+                                                                             \
+       lis     r10,KERNELBASE@h;       /* check if exception in vectors */   \
+       ori     r10,r10,KERNELBASE@l;                                         \
+       cmplw   r12,r10;                                                      \
+       blt+    2f;                     /* addr below exception vectors */    \
+                                                                             \
+       lis     r10,Debug@h;                                                  \
+       ori     r10,r10,Debug@l;                                              \
+       cmplw   r12,r10;                                                      \
+       bgt+    2f;                     /* addr above exception vectors */    \
+                                                                             \
+       /* here it looks like we got an inappropriate debug exception. */     \
+1:     rlwinm  r9,r9,0,~MSR_DE;        /* clear DE in the CDRR1 value */     \
+       lis     r10,DBSR_IC@h;          /* clear the IC event */              \
+       mtspr   SPRN_DBSR,r10;                                                \
+       /* restore state and get out */                                       \
+       lwz     r10,_CCR(r11);                                                \
+       lwz     r0,GPR0(r11);                                                 \
+       lwz     r1,GPR1(r11);                                                 \
+       mtcrf   0x80,r10;                                                     \
+       mtspr   SPRN_DSRR0,r12;                                               \
+       mtspr   SPRN_DSRR1,r9;                                                \
+       lwz     r9,GPR9(r11);                                                 \
+       lwz     r12,GPR12(r11);                                               \
+       mtspr   DEBUG_SPRG,r8;                                                \
+       BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \
+       lwz     r10,GPR10-INT_FRAME_SIZE(r8);                                 \
+       lwz     r11,GPR11-INT_FRAME_SIZE(r8);                                 \
+       mfspr   r8,DEBUG_SPRG;                                                \
+                                                                             \
+       RFDI;                                                                 \
+       b       .;                                                            \
+                                                                             \
+       /* continue normal handling for a critical exception... */            \
+2:     mfspr   r4,SPRN_DBSR;                                                 \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                                   \
+       EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
+#else
+#define DEBUG_EXCEPTION                                                              \
+       START_EXCEPTION(Debug);                                               \
+       CRITICAL_EXCEPTION_PROLOG;                                            \
+                                                                             \
+       /*                                                                    \
+        * If there is a single step or branch-taken exception in an          \
+        * exception entry sequence, it was probably meant to apply to        \
+        * the code where the exception occurred (since exception entry       \
+        * doesn't turn off DE automatically).  We simulate the effect        \
+        * of turning off DE on entry to an exception handler by turning      \
+        * off DE in the CSRR1 value and clearing the debug status.           \
+        */                                                                   \
+       mfspr   r10,SPRN_DBSR;          /* check single-step/branch taken */  \
+       andis.  r10,r10,DBSR_IC@h;                                            \
+       beq+    2f;                                                           \
+                                                                             \
+       lis     r10,KERNELBASE@h;       /* check if exception in vectors */   \
+       ori     r10,r10,KERNELBASE@l;                                         \
+       cmplw   r12,r10;                                                      \
+       blt+    2f;                     /* addr below exception vectors */    \
+                                                                             \
+       lis     r10,Debug@h;                                                  \
+       ori     r10,r10,Debug@l;                                              \
+       cmplw   r12,r10;                                                      \
+       bgt+    2f;                     /* addr above exception vectors */    \
+                                                                             \
+       /* here it looks like we got an inappropriate debug exception. */     \
+1:     rlwinm  r9,r9,0,~MSR_DE;        /* clear DE in the CSRR1 value */     \
+       lis     r10,DBSR_IC@h;          /* clear the IC event */              \
+       mtspr   SPRN_DBSR,r10;                                                \
+       /* restore state and get out */                                       \
+       lwz     r10,_CCR(r11);                                                \
+       lwz     r0,GPR0(r11);                                                 \
+       lwz     r1,GPR1(r11);                                                 \
+       mtcrf   0x80,r10;                                                     \
+       mtspr   SPRN_CSRR0,r12;                                               \
+       mtspr   SPRN_CSRR1,r9;                                                \
+       lwz     r9,GPR9(r11);                                                 \
+       lwz     r12,GPR12(r11);                                               \
+       mtspr   CRIT_SPRG,r8;                                                 \
+       BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */  \
+       lwz     r10,GPR10-INT_FRAME_SIZE(r8);                                 \
+       lwz     r11,GPR11-INT_FRAME_SIZE(r8);                                 \
+       mfspr   r8,CRIT_SPRG;                                                 \
+                                                                             \
+       rfci;                                                                 \
+       b       .;                                                            \
+                                                                             \
+       /* continue normal handling for a critical exception... */            \
+2:     mfspr   r4,SPRN_DBSR;                                                 \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                                   \
+       EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
+#endif
+
+#define INSTRUCTION_STORAGE_EXCEPTION                                        \
+       START_EXCEPTION(InstructionStorage)                                   \
+       NORMAL_EXCEPTION_PROLOG;                                              \
+       mfspr   r5,SPRN_ESR;            /* Grab the ESR and save it */        \
+       stw     r5,_ESR(r11);                                                 \
+       mr      r4,r12;                 /* Pass SRR0 as arg2 */               \
+       li      r5,0;                   /* Pass zero as arg3 */               \
+       EXC_XFER_EE_LITE(0x0400, handle_page_fault)
+
+#define ALIGNMENT_EXCEPTION                                                  \
+       START_EXCEPTION(Alignment)                                            \
+       NORMAL_EXCEPTION_PROLOG;                                              \
+       mfspr   r4,SPRN_DEAR;           /* Grab the DEAR and save it */       \
+       stw     r4,_DEAR(r11);                                                \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                                   \
+       EXC_XFER_EE(0x0600, alignment_exception)
+
+#define PROGRAM_EXCEPTION                                                    \
+       START_EXCEPTION(Program)                                              \
+       NORMAL_EXCEPTION_PROLOG;                                              \
+       mfspr   r4,SPRN_ESR;            /* Grab the ESR and save it */        \
+       stw     r4,_ESR(r11);                                                 \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                                   \
+       EXC_XFER_STD(0x0700, program_check_exception)
+
+#define DECREMENTER_EXCEPTION                                                \
+       START_EXCEPTION(Decrementer)                                          \
+       NORMAL_EXCEPTION_PROLOG;                                              \
+       lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+       mtspr   SPRN_TSR,r0;            /* Clear the DEC interrupt */         \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                                   \
+       EXC_XFER_LITE(0x0900, timer_interrupt)
+
+#define FP_UNAVAILABLE_EXCEPTION                                             \
+       START_EXCEPTION(FloatingPointUnavailable)                             \
+       NORMAL_EXCEPTION_PROLOG;                                              \
+       bne     load_up_fpu;            /* if from user, just load it up */   \
+       addi    r3,r1,STACK_FRAME_OVERHEAD;                                   \
+       EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
+
+#endif /* __HEAD_BOOKE_H__ */
index 8d60fa99fc4b992a402ec73dfa516b139f049d08..dd86bbed76271120c4f64ea39912e1e07d65a9e8 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/head_fsl_booke.S
- *
  * Kernel execution entry point code.
  *
  *    Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
@@ -316,6 +314,7 @@ skpinv:     addi    r6,r6,1                         /* Increment */
         */
        lis     r2,DBCR0_IDM@h
        mtspr   SPRN_DBCR0,r2
+       isync
        /* clear any residual debug events */
        li      r2,-1
        mtspr   SPRN_DBSR,r2
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu)
 _GLOBAL(abort)
        li      r13,0
         mtspr   SPRN_DBCR0,r13         /* disable all debug events */
+       isync
        mfmsr   r13
        ori     r13,r13,MSR_DE@l        /* Enable Debug Events */
        mtmsr   r13
+       isync
         mfspr   r13,SPRN_DBCR0
         lis    r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h
         mtspr   SPRN_DBCR0,r13
+       isync
 
 _GLOBAL(set_context)
 
index 6160c8dbb7c50245a682f028514a6bb1a73b1f97..fd8214caedeedcdcfc4b44a660669ee2a9cda543 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/kernel/iomap.c
- *
  * ppc64 "iomap" interface implementation.
  *
  * (C) Copyright 2004 Linus Torvalds
index 946f3219fd29fc2b79c789cd423e9ecd129db154..d9a7fdef59b98234b3cbfddd378a84c12f9c7286 100644 (file)
@@ -1,5 +1,4 @@
 /*
- * arch/ppc64/kernel/iommu.c
  * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
  * 
  * Rewrite, cleanup, new allocation schemes, virtual merging: 
index d1fffce86df920799cad33996d51035b0bc3ebe0..24dc8117b822e5228098438711c2b1f6ae420025 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/irq.c
- *
  *  Derived from arch/i386/kernel/irq.c
  *    Copyright (C) 1992 Linus Torvalds
  *  Adapted from arch/i386 by Gary Thomas
@@ -371,6 +369,7 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq)
        return NO_IRQ;
 
 }
+#endif /* CONFIG_PPC64 */
 
 #ifdef CONFIG_IRQSTACKS
 struct thread_info *softirq_ctx[NR_CPUS];
@@ -394,10 +393,24 @@ void irq_ctx_init(void)
        }
 }
 
+static inline void do_softirq_onstack(void)
+{
+       struct thread_info *curtp, *irqtp;
+
+       curtp = current_thread_info();
+       irqtp = softirq_ctx[smp_processor_id()];
+       irqtp->task = curtp->task;
+       call_do_softirq(irqtp);
+       irqtp->task = NULL;
+}
+
+#else
+#define do_softirq_onstack()   __do_softirq()
+#endif /* CONFIG_IRQSTACKS */
+
 void do_softirq(void)
 {
        unsigned long flags;
-       struct thread_info *curtp, *irqtp;
 
        if (in_interrupt())
                return;
@@ -405,19 +418,18 @@ void do_softirq(void)
        local_irq_save(flags);
 
        if (local_softirq_pending()) {
-               curtp = current_thread_info();
-               irqtp = softirq_ctx[smp_processor_id()];
-               irqtp->task = curtp->task;
-               call_do_softirq(irqtp);
-               irqtp->task = NULL;
+               account_system_vtime(current);
+               local_bh_disable();
+               do_softirq_onstack();
+               account_system_vtime(current);
+               __local_bh_enable();
        }
 
        local_irq_restore(flags);
 }
 EXPORT_SYMBOL(do_softirq);
 
-#endif /* CONFIG_IRQSTACKS */
-
+#ifdef CONFIG_PPC64
 static int __init setup_noirqdistrib(char *str)
 {
        distribute_irqs = 0;
index cfab48566db1306c3e8f47b5034ca703a67f471b..258039fb301642d70057192f0ca443fbc9621e48 100644 (file)
@@ -1,6 +1,5 @@
 /*
  *  Kernel Probes (KProbes)
- *  arch/ppc64/kernel/kprobes.c
  *
  * 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
index 22d83d4d1af5f6ce33d3ba0b9cce8b26ed30b1e8..9feeeef5a87535a298b90e95f145b4664862277f 100644 (file)
@@ -147,15 +147,12 @@ postcore_initcall(of_bus_driver_init);
 
 int of_register_driver(struct of_platform_driver *drv)
 {
-       int count = 0;
-
        /* initialize common driver fields */
        drv->driver.name = drv->name;
        drv->driver.bus = &of_platform_bus_type;
 
        /* register with core */
-       count = driver_register(&drv->driver);
-       return count ? count : 1;
+       return driver_register(&drv->driver);
 }
 
 void of_unregister_driver(struct of_platform_driver *drv)
index bdf15dbbf4f0c4eb74f06e111b2da51dae5891b4..c336f3e31cff3d7579886aa5fbabe76b5fc482c0 100644 (file)
@@ -1,5 +1,4 @@
 /*
- * arch/ppc64/kernel/pci_iommu.c
  * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
  *
  * Rewrite, cleanup, new allocation schemes:
index 63ecbec05202c1170b1c7b9f0aecaa9189e3cd20..dfa5398ab3c8d68edfd2c65602f71d3858b161e8 100644 (file)
@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs);
 extern void alignment_exception(struct pt_regs *regs);
 extern void program_check_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);
 
 EXPORT_SYMBOL(clear_pages);
index c225cf154bfeb0f415a4f46cd83cf169c0dfd184..1770a066c2176f71afa3e736904d8744bf0e0b84 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/process.c
- *
  *  Derived from "arch/i386/kernel/process.c"
  *    Copyright (C) 1995  Linus Torvalds
  *
@@ -47,9 +45,9 @@
 #include <asm/mmu.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
+#include <asm/time.h>
 #ifdef CONFIG_PPC64
 #include <asm/firmware.h>
-#include <asm/time.h>
 #endif
 
 extern unsigned long _get_SP(void);
@@ -330,6 +328,11 @@ struct task_struct *__switch_to(struct task_struct *prev,
 #endif
 
        local_irq_save(flags);
+
+       account_system_vtime(current);
+       account_process_vtime(current);
+       calculate_steal_time();
+
        last = _switch(old_thread, new_thread);
 
        local_irq_restore(flags);
index 6dbd21726770c2b02524126593cb8111f945c00c..d63cd562d9d5e0bbccbba98ac6fd118f8ff515f0 100644 (file)
@@ -829,10 +829,6 @@ void __init unflatten_device_tree(void)
 
        /* Allocate memory for the expanded device tree */
        mem = lmb_alloc(size + 4, __alignof__(struct device_node));
-       if (!mem) {
-               DBG("Couldn't allocate memory with lmb_alloc()!\n");
-               panic("Couldn't allocate memory with lmb_alloc()!\n");
-       }
        mem = (unsigned long) __va(mem);
 
        ((u32 *)mem)[size / 4] = 0xdeadbeef;
index 5ccbdbe0d5c96c9e063a99ccbf66e20ecb53f83e..c42a860c8d25fd9fda90122b8aa1dd32655136b7 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/ppc64/kernel/ptrace-common.h
- *
  *    Copyright (c) 2002 Stephen Rothwell, IBM Coproration
  *    Extracted from ptrace.c and ptrace32.c
  *
index 7a95b8a283548cfca73e75f76ad74c1a77744ca4..1f03fb28cc0af580f8345fcdb80328df16389f77 100644 (file)
@@ -1,5 +1,4 @@
 /*
- *   arch/ppc64/kernel/rtas-proc.c
  *   Copyright (C) 2000 Tilmann Bitterberg
  *   (tilmann@bitterberg.de)
  *
index 7442775ef2a1dd864a01b515d79b611bd075fcaf..57b539a03fa963833661855b6c6b40b73c17d727 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/kernel/rtas_pci.c
- *
  * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
  * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
  *
index f96c49b03ba05f9cf58afe80649bdafb5f129c5d..2f3fdad35594335818fc2842aac001506b26029f 100644 (file)
@@ -497,8 +497,6 @@ void __init setup_system(void)
 #endif
        printk("-----------------------------------------------------\n");
 
-       mm_init_ppc64();
-
        DBG(" <- setup_system()\n");
 }
 
index 4324f8a8ba247cf4e24f765d44d0217b28c175d4..47f910380a6a5960d267ce9f3f3041a283871e3c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/ppc64/kernel/signal.c
- *
  *  PowerPC version 
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *
index 13595a64f013a2c1b31f2ce0d7cf86be2b1c3ae9..805eaedbc3084e3ea1c22d594705c6acb24fb514 100644 (file)
@@ -541,7 +541,7 @@ int __devinit start_secondary(void *unused)
                smp_ops->take_timebase();
 
        if (system_state > SYSTEM_BOOTING)
-               per_cpu(last_jiffy, cpu) = get_tb();
+               snapshot_timebase();
 
        spin_lock(&call_lock);
        cpu_set(cpu, cpu_online_map);
@@ -573,6 +573,8 @@ void __init smp_cpus_done(unsigned int max_cpus)
 
        set_cpus_allowed(current, old_mask);
 
+       snapshot_timebases();
+
        dump_numa_cpu_topology();
 }
 
index 86f7e3d154d8a11065e16064d4dc083fa99d115c..4a27218a086cb018bd5a6c31d8cfdf96b5434c98 100644 (file)
@@ -51,6 +51,7 @@
 #include <linux/percpu.h>
 #include <linux/rtc.h>
 #include <linux/jiffies.h>
+#include <linux/posix-timers.h>
 
 #include <asm/io.h>
 #include <asm/processor.h>
@@ -98,6 +99,7 @@ unsigned long tb_ticks_per_jiffy;
 unsigned long tb_ticks_per_usec = 100; /* sane default */
 EXPORT_SYMBOL(tb_ticks_per_usec);
 unsigned long tb_ticks_per_sec;
+EXPORT_SYMBOL(tb_ticks_per_sec);       /* for cputime_t conversions */
 u64 tb_to_xs;
 unsigned tb_to_us;
 
@@ -135,6 +137,224 @@ unsigned long tb_last_stamp;
  */
 DEFINE_PER_CPU(unsigned long, last_jiffy);
 
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+/*
+ * Factors for converting from cputime_t (timebase ticks) to
+ * jiffies, milliseconds, seconds, and clock_t (1/USER_HZ seconds).
+ * These are all stored as 0.64 fixed-point binary fractions.
+ */
+u64 __cputime_jiffies_factor;
+EXPORT_SYMBOL(__cputime_jiffies_factor);
+u64 __cputime_msec_factor;
+EXPORT_SYMBOL(__cputime_msec_factor);
+u64 __cputime_sec_factor;
+EXPORT_SYMBOL(__cputime_sec_factor);
+u64 __cputime_clockt_factor;
+EXPORT_SYMBOL(__cputime_clockt_factor);
+
+static void calc_cputime_factors(void)
+{
+       struct div_result res;
+
+       div128_by_32(HZ, 0, tb_ticks_per_sec, &res);
+       __cputime_jiffies_factor = res.result_low;
+       div128_by_32(1000, 0, tb_ticks_per_sec, &res);
+       __cputime_msec_factor = res.result_low;
+       div128_by_32(1, 0, tb_ticks_per_sec, &res);
+       __cputime_sec_factor = res.result_low;
+       div128_by_32(USER_HZ, 0, tb_ticks_per_sec, &res);
+       __cputime_clockt_factor = res.result_low;
+}
+
+/*
+ * Read the PURR on systems that have it, otherwise the timebase.
+ */
+static u64 read_purr(void)
+{
+       if (cpu_has_feature(CPU_FTR_PURR))
+               return mfspr(SPRN_PURR);
+       return mftb();
+}
+
+/*
+ * Account time for a transition between system, hard irq
+ * or soft irq state.
+ */
+void account_system_vtime(struct task_struct *tsk)
+{
+       u64 now, delta;
+       unsigned long flags;
+
+       local_irq_save(flags);
+       now = read_purr();
+       delta = now - get_paca()->startpurr;
+       get_paca()->startpurr = now;
+       if (!in_interrupt()) {
+               delta += get_paca()->system_time;
+               get_paca()->system_time = 0;
+       }
+       account_system_time(tsk, 0, delta);
+       local_irq_restore(flags);
+}
+
+/*
+ * Transfer the user and system times accumulated in the paca
+ * by the exception entry and exit code to the generic process
+ * user and system time records.
+ * Must be called with interrupts disabled.
+ */
+void account_process_vtime(struct task_struct *tsk)
+{
+       cputime_t utime;
+
+       utime = get_paca()->user_time;
+       get_paca()->user_time = 0;
+       account_user_time(tsk, utime);
+}
+
+static void account_process_time(struct pt_regs *regs)
+{
+       int cpu = smp_processor_id();
+
+       account_process_vtime(current);
+       run_local_timers();
+       if (rcu_pending(cpu))
+               rcu_check_callbacks(cpu, user_mode(regs));
+       scheduler_tick();
+       run_posix_cpu_timers(current);
+}
+
+#ifdef CONFIG_PPC_SPLPAR
+/*
+ * Stuff for accounting stolen time.
+ */
+struct cpu_purr_data {
+       int     initialized;                    /* thread is running */
+       u64     tb0;                    /* timebase at origin time */
+       u64     purr0;                  /* PURR at origin time */
+       u64     tb;                     /* last TB value read */
+       u64     purr;                   /* last PURR value read */
+       u64     stolen;                 /* stolen time so far */
+       spinlock_t lock;
+};
+
+static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data);
+
+static void snapshot_tb_and_purr(void *data)
+{
+       struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data);
+
+       p->tb0 = mftb();
+       p->purr0 = mfspr(SPRN_PURR);
+       p->tb = p->tb0;
+       p->purr = 0;
+       wmb();
+       p->initialized = 1;
+}
+
+/*
+ * Called during boot when all cpus have come up.
+ */
+void snapshot_timebases(void)
+{
+       int cpu;
+
+       if (!cpu_has_feature(CPU_FTR_PURR))
+               return;
+       for_each_cpu(cpu)
+               spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock);
+       on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1);
+}
+
+void calculate_steal_time(void)
+{
+       u64 tb, purr, t0;
+       s64 stolen;
+       struct cpu_purr_data *p0, *pme, *phim;
+       int cpu;
+
+       if (!cpu_has_feature(CPU_FTR_PURR))
+               return;
+       cpu = smp_processor_id();
+       pme = &per_cpu(cpu_purr_data, cpu);
+       if (!pme->initialized)
+               return;         /* this can happen in early boot */
+       p0 = &per_cpu(cpu_purr_data, cpu & ~1);
+       phim = &per_cpu(cpu_purr_data, cpu ^ 1);
+       spin_lock(&p0->lock);
+       tb = mftb();
+       purr = mfspr(SPRN_PURR) - pme->purr0;
+       if (!phim->initialized || !cpu_online(cpu ^ 1)) {
+               stolen = (tb - pme->tb) - (purr - pme->purr);
+       } else {
+               t0 = pme->tb0;
+               if (phim->tb0 < t0)
+                       t0 = phim->tb0;
+               stolen = phim->tb - t0 - phim->purr - purr - p0->stolen;
+       }
+       if (stolen > 0) {
+               account_steal_time(current, stolen);
+               p0->stolen += stolen;
+       }
+       pme->tb = tb;
+       pme->purr = purr;
+       spin_unlock(&p0->lock);
+}
+
+/*
+ * Must be called before the cpu is added to the online map when
+ * a cpu is being brought up at runtime.
+ */
+static void snapshot_purr(void)
+{
+       int cpu;
+       u64 purr;
+       struct cpu_purr_data *p0, *pme, *phim;
+       unsigned long flags;
+
+       if (!cpu_has_feature(CPU_FTR_PURR))
+               return;
+       cpu = smp_processor_id();
+       pme = &per_cpu(cpu_purr_data, cpu);
+       p0 = &per_cpu(cpu_purr_data, cpu & ~1);
+       phim = &per_cpu(cpu_purr_data, cpu ^ 1);
+       spin_lock_irqsave(&p0->lock, flags);
+       pme->tb = pme->tb0 = mftb();
+       purr = mfspr(SPRN_PURR);
+       if (!phim->initialized) {
+               pme->purr = 0;
+               pme->purr0 = purr;
+       } else {
+               /* set p->purr and p->purr0 for no change in p0->stolen */
+               pme->purr = phim->tb - phim->tb0 - phim->purr - p0->stolen;
+               pme->purr0 = purr - pme->purr;
+       }
+       pme->initialized = 1;
+       spin_unlock_irqrestore(&p0->lock, flags);
+}
+
+#endif /* CONFIG_PPC_SPLPAR */
+
+#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */
+#define calc_cputime_factors()
+#define account_process_time(regs)     update_process_times(user_mode(regs))
+#define calculate_steal_time()         do { } while (0)
+#endif
+
+#if !(defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR))
+#define snapshot_purr()                        do { } while (0)
+#endif
+
+/*
+ * Called when a cpu comes up after the system has finished booting,
+ * i.e. as a result of a hotplug cpu action.
+ */
+void snapshot_timebase(void)
+{
+       __get_cpu_var(last_jiffy) = get_tb();
+       snapshot_purr();
+}
+
 void __delay(unsigned long loops)
 {
        unsigned long start;
@@ -392,6 +612,7 @@ static void iSeries_tb_recal(void)
                                                new_tb_ticks_per_jiffy, sign, tick_diff );
                                tb_ticks_per_jiffy = new_tb_ticks_per_jiffy;
                                tb_ticks_per_sec   = new_tb_ticks_per_sec;
+                               calc_cputime_factors();
                                div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres );
                                do_gtod.tb_ticks_per_sec = tb_ticks_per_sec;
                                tb_to_xs = divres.result_low;
@@ -440,6 +661,7 @@ void timer_interrupt(struct pt_regs * regs)
        irq_enter();
 
        profile_tick(CPU_PROFILING, regs);
+       calculate_steal_time();
 
 #ifdef CONFIG_PPC_ISERIES
        get_lppaca()->int_dword.fields.decr_int = 0;
@@ -461,7 +683,7 @@ void timer_interrupt(struct pt_regs * regs)
                 * is the case.
                 */
                if (!cpu_is_offline(cpu))
-                       update_process_times(user_mode(regs));
+                       account_process_time(regs);
 
                /*
                 * No need to check whether cpu is offline here; boot_cpuid
@@ -518,13 +740,27 @@ void wakeup_decrementer(void)
 void __init smp_space_timers(unsigned int max_cpus)
 {
        int i;
+       unsigned long half = tb_ticks_per_jiffy / 2;
        unsigned long offset = tb_ticks_per_jiffy / max_cpus;
        unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid);
 
        /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */
        previous_tb -= tb_ticks_per_jiffy;
+       /*
+        * The stolen time calculation for POWER5 shared-processor LPAR
+        * systems works better if the two threads' timebase interrupts
+        * are staggered by half a jiffy with respect to each other.
+        */
        for_each_cpu(i) {
-               if (i != boot_cpuid) {
+               if (i == boot_cpuid)
+                       continue;
+               if (i == (boot_cpuid ^ 1))
+                       per_cpu(last_jiffy, i) =
+                               per_cpu(last_jiffy, boot_cpuid) - half;
+               else if (i & 1)
+                       per_cpu(last_jiffy, i) =
+                               per_cpu(last_jiffy, i ^ 1) + half;
+               else {
                        previous_tb += offset;
                        per_cpu(last_jiffy, i) = previous_tb;
                }
@@ -720,6 +956,7 @@ void __init time_init(void)
        tb_ticks_per_sec = ppc_tb_freq;
        tb_ticks_per_usec = ppc_tb_freq / 1000000;
        tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000);
+       calc_cputime_factors();
 
        /*
         * Calculate the length of each tick in ns.  It will not be
index 04f7df39ffbb7fc5b595dfff76a63f640bee4afc..ec837036842398bc52a0326810c8b3ed87a8cdc8 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/ppc64/kernel/vdso.c
- *
  *    Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
  *                      <benh@kernel.crashing.org>
  *
index 40523b140109e6455eaa162542fa98b4b4bfbf7b..f9837f44ac0bac2c2ba8d6c81b5f9eeb735b431b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/lib/copypage.S
- *
  * Copyright (C) 2002 Paul Mackerras, IBM Corp.
  *
  * This program is free software; you can redistribute it and/or
index 6d69ef39b7df7ca6ed0ac621f0d1b86deb717a0a..a6b54cb97c4912a60a85bb41f8a7ce05a93becfb 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/lib/copyuser.S
- *
  * Copyright (C) 2002 Paul Mackerras, IBM Corp.
  *
  * This program is free software; you can redistribute it and/or
index d2b834887920ac2f63c7fe40166364a88000464d..4b72ed8fd50e1da6325f9634ac705f73ebf93791 100644 (file)
@@ -1,9 +1,7 @@
 /*
- *  arch/ppc64/lib/e2a.c
- *
  *  EBCDIC to ASCII conversion
  *
- * This function moved here from arch/ppc64/kernel/viopath.c
+ * This function moved here from arch/powerpc/platforms/iseries/viopath.c 
  *
  * (C) Copyright 2000-2004 IBM Corporation
  *
@@ -105,4 +103,14 @@ unsigned char e2a(unsigned char x)
 }
 EXPORT_SYMBOL(e2a);
 
+unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n)
+{
+       int i;
+
+       n = strnlen(src, n);
 
+       for (i = 0; i < n; i++)
+               dest[i] = e2a(src[i]);
+
+       return dest;
+}
index 9ccacdf5bcb952f6a2664cd44b38fc5dee15dafd..fd66acfd3e3e1224ec75c5b0658db5f9e06c0e20 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/lib/memcpy.S
- *
  * Copyright (C) 2002 Paul Mackerras, IBM Corp.
  *
  * This program is free software; you can redistribute it and/or
index 42c5de2c898f28aaae69db9b370f3db0899ec8ef..31e511856dc58bc2b819e80c32a35840db5bd9ca 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/rheap.c
- *
  * A Remote Heap.  Remote means that we don't touch the memory that the
  * heap points to. Normal heap implementations use the memory they manage
  * to place their list. We cannot do that because the memory we manage may
index a4815d316722cddcf9c614b4524f57238f7a4c9f..ec4adcb4bc28c6192590b901aa2c3a04d0792bdf 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/mm/fault.c
- *
  *  PowerPC version
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *
index 12ccd7155bacc514da6dae7d9af3a1e032329d91..ea469eefa14603b82070efc9a7cf2cf18e52f96a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/hashtable.S
- *
  *  $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $
  *
  *  PowerPC version
index e9d589eefc14ce07aa5f670c036b35bfc3124328..89b35c1813141c41172295325d8684c4d88c568b 100644 (file)
@@ -169,7 +169,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
 #ifdef CONFIG_PPC_ISERIES
                if (_machine == PLATFORM_ISERIES_LPAR)
                        ret = iSeries_hpte_insert(hpteg, va,
-                                                 __pa(vaddr),
+                                                 paddr,
                                                  tmp_mode,
                                                  HPTE_V_BOLTED,
                                                  psize);
@@ -178,7 +178,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
 #ifdef CONFIG_PPC_PSERIES
                if (_machine & PLATFORM_LPAR)
                        ret = pSeries_lpar_hpte_insert(hpteg, va,
-                                                      virt_to_abs(paddr),
+                                                      paddr,
                                                       tmp_mode,
                                                       HPTE_V_BOLTED,
                                                       psize);
@@ -186,7 +186,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
 #endif
 #ifdef CONFIG_PPC_MULTIPLATFORM
                        ret = native_hpte_insert(hpteg, va,
-                                                virt_to_abs(paddr),
+                                                paddr,
                                                 tmp_mode, HPTE_V_BOLTED,
                                                 psize);
 #endif
@@ -392,7 +392,7 @@ static unsigned long __init htab_get_table_size(void)
 #ifdef CONFIG_MEMORY_HOTPLUG
 void create_section_mapping(unsigned long start, unsigned long end)
 {
-               BUG_ON(htab_bolt_mapping(start, end, start,
+               BUG_ON(htab_bolt_mapping(start, end, __pa(start),
                        _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
                        mmu_linear_psize));
 }
@@ -422,7 +422,7 @@ void __init htab_initialize(void)
 
        htab_hash_mask = pteg_count - 1;
 
-       if (platform_is_lpar()) {
+       if (firmware_has_feature(FW_FEATURE_LPAR)) {
                /* Using a hypervisor which owns the htab */
                htab_address = NULL;
                _SDR1 = 0; 
@@ -431,7 +431,6 @@ void __init htab_initialize(void)
                 * the absolute address space.
                 */
                table = lmb_alloc(htab_size_bytes, htab_size_bytes);
-               BUG_ON(table == 0);
 
                DBG("Hash table allocated at %lx, size: %lx\n", table,
                    htab_size_bytes);
@@ -474,21 +473,22 @@ void __init htab_initialize(void)
 
                if (dart_tablebase != 0 && dart_tablebase >= base
                    && dart_tablebase < (base + size)) {
+                       unsigned long dart_table_end = dart_tablebase + 16 * MB;
                        if (base != dart_tablebase)
                                BUG_ON(htab_bolt_mapping(base, dart_tablebase,
-                                                        base, mode_rw,
-                                                        mmu_linear_psize));
-                       if ((base + size) > (dart_tablebase + 16*MB))
+                                                       __pa(base), mode_rw,
+                                                       mmu_linear_psize));
+                       if ((base + size) > dart_table_end)
                                BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB,
-                                                        base + size,
-                                                        dart_tablebase+16*MB,
+                                                       base + size,
+                                                       __pa(dart_table_end),
                                                         mode_rw,
                                                         mmu_linear_psize));
                        continue;
                }
 #endif /* CONFIG_U3_DART */
-               BUG_ON(htab_bolt_mapping(base, base + size, base,
-                                        mode_rw, mmu_linear_psize));
+               BUG_ON(htab_bolt_mapping(base, base + size, __pa(base),
+                                       mode_rw, mmu_linear_psize));
        }
 
        /*
@@ -505,8 +505,8 @@ void __init htab_initialize(void)
                if (base + size >= tce_alloc_start)
                        tce_alloc_start = base + size + 1;
 
-               BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end,
-                                        tce_alloc_start, mode_rw,
+               BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end,
+                                        __pa(tce_alloc_start), mode_rw,
                                         mmu_linear_psize));
        }
 
@@ -517,7 +517,7 @@ void __init htab_initialize(void)
 
 void htab_initialize_secondary(void)
 {
-       if (!platform_is_lpar())
+       if (!firmware_has_feature(FW_FEATURE_LPAR))
                mtspr(SPRN_SDR1, _SDR1);
 }
 
index bacb71c89811b27c48f8e5f05b8dbf3dbe27fd3f..babebd15bdc49d7dc1fd905c8450948673c35876 100644 (file)
 /* max amount of RAM to use */
 unsigned long __max_memory;
 
-/* info on what we think the IO hole is */
-unsigned long  io_hole_start;
-unsigned long  io_hole_size;
-
-/*
- * Do very early mm setup.
- */
-void __init mm_init_ppc64(void)
-{
-#ifndef CONFIG_PPC_ISERIES
-       unsigned long i;
-#endif
-
-       ppc64_boot_msg(0x100, "MM Init");
-
-       /* This is the story of the IO hole... please, keep seated,
-        * unfortunately, we are out of oxygen masks at the moment.
-        * So we need some rough way to tell where your big IO hole
-        * is. On pmac, it's between 2G and 4G, on POWER3, it's around
-        * that area as well, on POWER4 we don't have one, etc...
-        * We need that as a "hint" when sizing the TCE table on POWER3
-        * So far, the simplest way that seem work well enough for us it
-        * to just assume that the first discontinuity in our physical
-        * RAM layout is the IO hole. That may not be correct in the future
-        * (and isn't on iSeries but then we don't care ;)
-        */
-
-#ifndef CONFIG_PPC_ISERIES
-       for (i = 1; i < lmb.memory.cnt; i++) {
-               unsigned long base, prevbase, prevsize;
-
-               prevbase = lmb.memory.region[i-1].base;
-               prevsize = lmb.memory.region[i-1].size;
-               base = lmb.memory.region[i].base;
-               if (base > (prevbase + prevsize)) {
-                       io_hole_start = prevbase + prevsize;
-                       io_hole_size = base  - (prevbase + prevsize);
-                       break;
-               }
-       }
-#endif /* CONFIG_PPC_ISERIES */
-       if (io_hole_start)
-               printk("IO Hole assumed to be %lx -> %lx\n",
-                      io_hole_start, io_hole_start + io_hole_size - 1);
-
-       ppc64_boot_msg(0x100, "MM Init Done");
-}
-
 void free_initmem(void)
 {
        unsigned long addr;
index bbe3eac918e8001338aa84ba2ede420ec2478b20..417d58518558bd0ab31975df7e7d864d6aea3a05 100644 (file)
@@ -31,6 +31,8 @@
 #define DBG(fmt...)
 #endif
 
+#define LMB_ALLOC_ANYWHERE     0
+
 struct lmb lmb;
 
 void lmb_dump_all(void)
@@ -225,6 +227,20 @@ unsigned long __init lmb_alloc(unsigned long size, unsigned long align)
 
 unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,
                                    unsigned long max_addr)
+{
+       unsigned long alloc;
+
+       alloc = __lmb_alloc_base(size, align, max_addr);
+
+       if (alloc == 0)
+               panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n",
+                               size, max_addr);
+
+       return alloc;
+}
+
+unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align,
+                                   unsigned long max_addr)
 {
        long i, j;
        unsigned long base = 0;
index 454cac01d8cc0667dfee9314372153d32adeefbf..badac10d700c2949de742b8d1544a9793f5cac86 100644 (file)
@@ -125,7 +125,7 @@ int __devinit add_memory(u64 start, u64 size)
        nid = hot_add_scn_to_nid(start);
        pgdata = NODE_DATA(nid);
 
-       start = __va(start);
+       start = (unsigned long)__va(start);
        create_section_mapping(start, start + size);
 
        /* this should work for most non-highmem platforms */
@@ -249,7 +249,6 @@ void __init do_init_bootmem(void)
        bootmap_pages = bootmem_bootmap_pages(total_pages);
 
        start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE);
-       BUG_ON(!start);
 
        boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages);
 
index fe65f522aff3a888645901de71f4d4360e58c29a..972a8e884b9aecac1856c7c86340eeb11000ab09 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/ppc64/mm/mmap.c
- *
  *  flexible mmap layout support
  *
  * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
index 2863a912bcd0950d3841d62c035110aa0f5b8d3a..e89b22aa539e477e79ad9dc26181d09aa19e859a 100644 (file)
@@ -129,10 +129,12 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn,
                *start_pfn = 0;
 }
 
-static inline void map_cpu_to_node(int cpu, int node)
+static void __cpuinit map_cpu_to_node(int cpu, int node)
 {
        numa_cpu_lookup_table[cpu] = node;
 
+       dbg("adding cpu %d to node %d\n", cpu, node);
+
        if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node])))
                cpu_set(cpu, numa_cpumask_lookup_table[node]);
 }
@@ -153,7 +155,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-static struct device_node *find_cpu_node(unsigned int cpu)
+static struct device_node * __cpuinit find_cpu_node(unsigned int cpu)
 {
        unsigned int hw_cpuid = get_hard_smp_processor_id(cpu);
        struct device_node *cpu_node = NULL;
@@ -189,23 +191,29 @@ static int *of_get_associativity(struct device_node *dev)
        return (unsigned int *)get_property(dev, "ibm,associativity", NULL);
 }
 
-static int of_node_numa_domain(struct device_node *device)
+/* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
+ * info is found.
+ */
+static int of_node_to_nid(struct device_node *device)
 {
-       int numa_domain;
+       int nid = -1;
        unsigned int *tmp;
 
        if (min_common_depth == -1)
-               return 0;
+               goto out;
 
        tmp = of_get_associativity(device);
-       if (tmp && (tmp[0] >= min_common_depth)) {
-               numa_domain = tmp[min_common_depth];
-       } else {
-               dbg("WARNING: no NUMA information for %s\n",
-                   device->full_name);
-               numa_domain = 0;
-       }
-       return numa_domain;
+       if (!tmp)
+               goto out;
+
+       if (tmp[0] >= min_common_depth)
+               nid = tmp[min_common_depth];
+
+       /* POWER4 LPAR uses 0xffff as invalid node */
+       if (nid == 0xffff || nid >= MAX_NUMNODES)
+               nid = -1;
+out:
+       return nid;
 }
 
 /*
@@ -246,8 +254,7 @@ static int __init find_min_common_depth(void)
        if ((len >= 1) && ref_points) {
                depth = ref_points[1];
        } else {
-               dbg("WARNING: could not find NUMA "
-                   "associativity reference point\n");
+               dbg("NUMA: ibm,associativity-reference-points not found.\n");
                depth = -1;
        }
        of_node_put(rtas_root);
@@ -283,9 +290,9 @@ static unsigned long __devinit read_n_cells(int n, unsigned int **buf)
  * Figure out to which domain a cpu belongs and stick it there.
  * Return the id of the domain used.
  */
-static int numa_setup_cpu(unsigned long lcpu)
+static int __cpuinit numa_setup_cpu(unsigned long lcpu)
 {
-       int numa_domain = 0;
+       int nid = 0;
        struct device_node *cpu = find_cpu_node(lcpu);
 
        if (!cpu) {
@@ -293,27 +300,16 @@ static int numa_setup_cpu(unsigned long lcpu)
                goto out;
        }
 
-       numa_domain = of_node_numa_domain(cpu);
+       nid = of_node_to_nid(cpu);
 
-       if (numa_domain >= num_online_nodes()) {
-               /*
-                * POWER4 LPAR uses 0xffff as invalid node,
-                * dont warn in this case.
-                */
-               if (numa_domain != 0xffff)
-                       printk(KERN_ERR "WARNING: cpu %ld "
-                              "maps to invalid NUMA node %d\n",
-                              lcpu, numa_domain);
-               numa_domain = 0;
-       }
+       if (nid < 0 || !node_online(nid))
+               nid = any_online_node(NODE_MASK_ALL);
 out:
-       node_set_online(numa_domain);
-
-       map_cpu_to_node(lcpu, numa_domain);
+       map_cpu_to_node(lcpu, nid);
 
        of_node_put(cpu);
 
-       return numa_domain;
+       return nid;
 }
 
 static int cpu_numa_callback(struct notifier_block *nfb,
@@ -325,10 +321,7 @@ static int cpu_numa_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_PREPARE:
-               if (min_common_depth == -1 || !numa_enabled)
-                       map_cpu_to_node(lcpu, 0);
-               else
-                       numa_setup_cpu(lcpu);
+               numa_setup_cpu(lcpu);
                ret = NOTIFY_OK;
                break;
 #ifdef CONFIG_HOTPLUG_CPU
@@ -375,7 +368,7 @@ static int __init parse_numa_properties(void)
 {
        struct device_node *cpu = NULL;
        struct device_node *memory = NULL;
-       int max_domain;
+       int default_nid = 0;
        unsigned long i;
 
        if (numa_enabled == 0) {
@@ -385,32 +378,32 @@ static int __init parse_numa_properties(void)
 
        min_common_depth = find_min_common_depth();
 
-       dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
        if (min_common_depth < 0)
                return min_common_depth;
 
-       max_domain = numa_setup_cpu(boot_cpuid);
+       dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
 
        /*
-        * Even though we connect cpus to numa domains later in SMP init,
-        * we need to know the maximum node id now. This is because each
-        * node id must have NODE_DATA etc backing it.
-        * As a result of hotplug we could still have cpus appear later on
-        * with larger node ids. In that case we force the cpu into node 0.
+        * Even though we connect cpus to numa domains later in SMP
+        * init, we need to know the node ids now. This is because
+        * each node to be onlined must have NODE_DATA etc backing it.
         */
-       for_each_cpu(i) {
-               int numa_domain;
+       for_each_present_cpu(i) {
+               int nid;
 
                cpu = find_cpu_node(i);
+               BUG_ON(!cpu);
+               nid = of_node_to_nid(cpu);
+               of_node_put(cpu);
 
-               if (cpu) {
-                       numa_domain = of_node_numa_domain(cpu);
-                       of_node_put(cpu);
-
-                       if (numa_domain < MAX_NUMNODES &&
-                           max_domain < numa_domain)
-                               max_domain = numa_domain;
-               }
+               /*
+                * Don't fall back to default_nid yet -- we will plug
+                * cpus into nodes once the memory scan has discovered
+                * the topology.
+                */
+               if (nid < 0)
+                       continue;
+               node_set_online(nid);
        }
 
        get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells);
@@ -418,7 +411,7 @@ static int __init parse_numa_properties(void)
        while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
                unsigned long start;
                unsigned long size;
-               int numa_domain;
+               int nid;
                int ranges;
                unsigned int *memcell_buf;
                unsigned int len;
@@ -439,18 +432,15 @@ new_range:
                start = read_n_cells(n_mem_addr_cells, &memcell_buf);
                size = read_n_cells(n_mem_size_cells, &memcell_buf);
 
-               numa_domain = of_node_numa_domain(memory);
-
-               if (numa_domain >= MAX_NUMNODES) {
-                       if (numa_domain != 0xffff)
-                               printk(KERN_ERR "WARNING: memory at %lx maps "
-                                      "to invalid NUMA node %d\n", start,
-                                      numa_domain);
-                       numa_domain = 0;
-               }
-
-               if (max_domain < numa_domain)
-                       max_domain = numa_domain;
+               /*
+                * Assumption: either all memory nodes or none will
+                * have associativity properties.  If none, then
+                * everything goes to default_nid.
+                */
+               nid = of_node_to_nid(memory);
+               if (nid < 0)
+                       nid = default_nid;
+               node_set_online(nid);
 
                if (!(size = numa_enforce_memory_limit(start, size))) {
                        if (--ranges)
@@ -459,16 +449,13 @@ new_range:
                                continue;
                }
 
-               add_region(numa_domain, start >> PAGE_SHIFT,
+               add_region(nid, start >> PAGE_SHIFT,
                           size >> PAGE_SHIFT);
 
                if (--ranges)
                        goto new_range;
        }
 
-       for (i = 0; i <= max_domain; i++)
-               node_set_online(i);
-
        return 0;
 }
 
@@ -483,7 +470,6 @@ static void __init setup_nonnuma(void)
        printk(KERN_INFO "Memory hole size: %ldMB\n",
               (top_of_ram - total_ram) >> 20);
 
-       map_cpu_to_node(boot_cpuid, 0);
        for (i = 0; i < lmb.memory.cnt; ++i)
                add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT,
                           lmb_size_pages(&lmb.memory, i));
@@ -570,11 +556,11 @@ static void __init *careful_allocation(int nid, unsigned long size,
                                       unsigned long end_pfn)
 {
        int new_nid;
-       unsigned long ret = lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT);
+       unsigned long ret = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT);
 
        /* retry over all memory */
        if (!ret)
-               ret = lmb_alloc_base(size, align, lmb_end_of_DRAM());
+               ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM());
 
        if (!ret)
                panic("numa.c: cannot allocate %lu bytes on node %d",
@@ -620,6 +606,8 @@ void __init do_init_bootmem(void)
                dump_numa_memory_topology();
 
        register_cpu_notifier(&ppc64_numa_nb);
+       cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE,
+                         (void *)(unsigned long)boot_cpuid);
 
        for_each_online_node(nid) {
                unsigned long start_pfn, end_pfn, pages_present;
@@ -767,10 +755,10 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
 {
        struct device_node *memory = NULL;
        nodemask_t nodes;
-       int numa_domain = 0;
+       int default_nid = any_online_node(NODE_MASK_ALL);
 
        if (!numa_enabled || (min_common_depth < 0))
-               return numa_domain;
+               return default_nid;
 
        while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
                unsigned long start, size;
@@ -787,15 +775,15 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
 ha_new_range:
                start = read_n_cells(n_mem_addr_cells, &memcell_buf);
                size = read_n_cells(n_mem_size_cells, &memcell_buf);
-               numa_domain = of_node_numa_domain(memory);
+               nid = of_node_to_nid(memory);
 
                /* Domains not present at boot default to 0 */
-               if (!node_online(numa_domain))
-                       numa_domain = any_online_node(NODE_MASK_ALL);
+               if (nid < 0 || !node_online(nid))
+                       nid = default_nid;
 
                if ((scn_addr >= start) && (scn_addr < (start + size))) {
                        of_node_put(memory);
-                       goto got_numa_domain;
+                       goto got_nid;
                }
 
                if (--ranges)           /* process all ranges in cell */
@@ -804,12 +792,12 @@ ha_new_range:
        BUG();  /* section address should be found above */
 
        /* Temporary code to ensure that returned node is not empty */
-got_numa_domain:
+got_nid:
        nodes_setall(nodes);
-       while (NODE_DATA(numa_domain)->node_spanned_pages == 0) {
-               node_clear(numa_domain, nodes);
-               numa_domain = any_online_node(nodes);
+       while (NODE_DATA(nid)->node_spanned_pages == 0) {
+               node_clear(nid, nodes);
+               nid = any_online_node(nodes);
        }
-       return numa_domain;
+       return nid;
 }
 #endif /* CONFIG_MEMORY_HOTPLUG */
index d1acee38f16326c55e615626be75cdef5daef049..abfaabf667bfb414b117429b9c6b9b101758c527 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/mm/slb_low.S
- *
  * Low-level SLB routines
  *
  * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM
index 82e4951826bc7985869687a449a9a818e56d9803..91d25fb27f8940973fe15d67ff6f76a3c28acaa2 100644 (file)
@@ -247,10 +247,6 @@ void stabs_alloc(void)
 
                newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE,
                                         1<<SID_SHIFT);
-               if (! newstab)
-                       panic("Unable to allocate segment table for CPU %d.\n",
-                             cpu);
-
                newstab = (unsigned long)__va(newstab);
 
                memset((void *)newstab, 0, HW_PAGE_SIZE);
index bb3afb6e631778f64e0ccb8dc6d1801b5ac3ea60..f734b11566c2a6a94ea0268149a6fafb153cc7f8 100644 (file)
@@ -36,7 +36,7 @@
 DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
 
 /* This is declared as we are using the more or less generic
- * include/asm-ppc64/tlb.h file -- tgall
+ * include/asm-powerpc/tlb.h file -- tgall
  */
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
index 659a021da0c7b35ab9005c57dd981fce81f04996..4b06e53eb9b4bb0d4b7c521cc2fa0fdd97abb62b 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/oprofile.h>
 #include <linux/init.h>
 #include <linux/smp.h>
+#include <asm/firmware.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <asm/processor.h>
@@ -232,7 +233,7 @@ static unsigned long get_pc(struct pt_regs *regs)
        mmcra = mfspr(SPRN_MMCRA);
 
        /* Were we in the hypervisor? */
-       if (platform_is_lpar() && (mmcra & MMCRA_SIHV))
+       if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & MMCRA_SIHV))
                /* function descriptor madness */
                return *((unsigned long *)hypervisor_bucket);
 
index 9d8b28ef33435a8c613ea8ae004ae5a2b7be9bd1..5c72367441a83dbc2c2e753bc204bdcb0f30484e 100644 (file)
@@ -1,4 +1,6 @@
 #
 # Makefile for the PowerPC 83xx linux kernel.
 #
-obj-$(CONFIG_MPC834x_SYS)      += mpc834x_sys.o pci.o
+obj-y                          := misc.o
+obj-$(CONFIG_PCI)              += pci.o
+obj-$(CONFIG_MPC834x_SYS)      += mpc834x_sys.o
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
new file mode 100644 (file)
index 0000000..1455bce
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * misc setup functions for MPC83xx
+ *
+ * Maintainer: Kumar Gala <galak@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 <linux/stddef.h>
+#include <linux/kernel.h>
+
+#include <asm/io.h>
+#include <asm/hw_irq.h>
+#include <sysdev/fsl_soc.h>
+
+#include "mpc83xx.h"
+
+void mpc83xx_restart(char *cmd)
+{
+#define RST_OFFSET     0x00000900
+#define RST_PROT_REG   0x00000018
+#define RST_CTRL_REG   0x0000001c
+       __be32 __iomem *reg;
+
+       /* map reset register space */
+       reg = ioremap(get_immrbase() + 0x900, 0xff);
+
+       local_irq_disable();
+
+       /* enable software reset "RSTE" */
+       out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
+
+       /* set software hard reset */
+       out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
+       for (;;) ;
+}
+
+long __init mpc83xx_time_init(void)
+{
+#define SPCR_OFFSET    0x00000110
+#define SPCR_TBEN      0x00400000
+       __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4);
+       __be32 tmp;
+
+       tmp = in_be32(spcr);
+       out_be32(spcr, tmp | SPCR_TBEN);
+
+       iounmap(spcr);
+
+       return 0;
+}
index 2098dd05a773c1def834ced9f349556029973b48..7c18b4cd5db43724b304ad786b655e3b29db3fb6 100644 (file)
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
-#include <linux/module.h>
-#include <linux/fsl_devices.h>
 
 #include <asm/system.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
 #include <asm/atomic.h>
 #include <asm/time.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/ipic.h>
 #include <asm/bootinfo.h>
-#include <asm/pci-bridge.h>
-#include <asm/mpc83xx.h>
 #include <asm/irq.h>
-#include <mm/mmu_decl.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
 #include <sysdev/fsl_soc.h>
@@ -52,8 +45,6 @@ unsigned long isa_mem_base = 0;
 #endif
 
 #ifdef CONFIG_PCI
-extern int mpc83xx_pci2_busno;
-
 static int
 mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
 {
@@ -78,26 +69,14 @@ mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
        const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4;
        return PCI_IRQ_TABLE_LOOKUP;
 }
-
-static int
-mpc83xx_exclude_device(u_char bus, u_char devfn)
-{
-       if (bus == 0 && PCI_SLOT(devfn) == 0)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-       if (mpc83xx_pci2_busno)
-               if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0)
-                       return PCIBIOS_DEVICE_NOT_FOUND;
-       return PCIBIOS_SUCCESSFUL;
-}
-#endif /* CONFIG_PCI */
+#endif                         /* CONFIG_PCI */
 
 /* ************************************************************************
  *
  * Setup the architecture
  *
  */
-static void __init
-mpc834x_sys_setup_arch(void)
+static void __init mpc834x_sys_setup_arch(void)
 {
        struct device_node *np;
 
@@ -106,14 +85,14 @@ mpc834x_sys_setup_arch(void)
 
        np = of_find_node_by_type(NULL, "cpu");
        if (np != 0) {
-               unsigned int *fp = (int *) get_property(np, "clock-frequency", NULL);
+               unsigned int *fp =
+                   (int *)get_property(np, "clock-frequency", NULL);
                if (fp != 0)
                        loops_per_jiffy = *fp / HZ;
                else
                        loops_per_jiffy = 50000000 / HZ;
                of_node_put(np);
        }
-
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
                add_bridge(np);
@@ -124,14 +103,13 @@ mpc834x_sys_setup_arch(void)
 #endif
 
 #ifdef  CONFIG_ROOT_NFS
-               ROOT_DEV = Root_NFS;
+       ROOT_DEV = Root_NFS;
 #else
-               ROOT_DEV = Root_HDA1;
+       ROOT_DEV = Root_HDA1;
 #endif
 }
 
-void __init
-mpc834x_sys_init_IRQ(void)
+void __init mpc834x_sys_init_IRQ(void)
 {
        u8 senses[8] = {
                0,                      /* EXT 0 */
@@ -160,64 +138,27 @@ mpc834x_sys_init_IRQ(void)
 }
 
 #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
-extern ulong   ds1374_get_rtc_time(void);
-extern int     ds1374_set_rtc_time(ulong);
+extern ulong ds1374_get_rtc_time(void);
+extern int ds1374_set_rtc_time(ulong);
 
-static int __init
-mpc834x_rtc_hookup(void)
+static int __init mpc834x_rtc_hookup(void)
 {
-       struct timespec tv;
+       struct timespec tv;
 
        ppc_md.get_rtc_time = ds1374_get_rtc_time;
        ppc_md.set_rtc_time = ds1374_set_rtc_time;
 
        tv.tv_nsec = 0;
-       tv.tv_sec = (ppc_md.get_rtc_time)();
+       tv.tv_sec = (ppc_md.get_rtc_time) ();
        do_settimeofday(&tv);
 
        return 0;
 }
+
 late_initcall(mpc834x_rtc_hookup);
 #endif
 
-static void
-mpc83xx_restart(char *cmd)
-{
-#define RST_OFFSET     0x00000900
-#define RST_PROT_REG   0x00000018
-#define RST_CTRL_REG   0x0000001c
-       __be32 __iomem *reg;
-
-       // map reset register space
-       reg = ioremap(get_immrbase() + 0x900, 0xff);
-
-       local_irq_disable();
-
-       /* enable software reset "RSTE" */
-       out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
-
-       /* set software hard reset */
-       out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445);
-       for(;;);
-}
-
-static long __init
-mpc83xx_time_init(void)
-{
-#define SPCR_OFFSET    0x00000110
-#define SPCR_TBEN      0x00400000
-       __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4);
-       __be32 tmp;
-
-       tmp = in_be32(spcr);
-       out_be32(spcr, tmp|SPCR_TBEN);
-
-       iounmap(spcr);
-
-       return 0;
-}
-void __init
-platform_init(void)
+void __init platform_init(void)
 {
        /* setup the PowerPC module struct */
        ppc_md.setup_arch = mpc834x_sys_setup_arch;
@@ -239,5 +180,3 @@ platform_init(void)
 
        return;
 }
-
-
index e4ca39f6a86205ac6154775299958e5b3e4f6a42..fedecb73f7ffc84a3e9b110c4a245acd14191a89 100644 (file)
@@ -20,4 +20,4 @@
 #define PIRQC  MPC83xx_IRQ_EXT6
 #define PIRQD  MPC83xx_IRQ_EXT7
 
-#endif                /* __MACH_MPC83XX_SYS_H__ */
+#endif                         /* __MACH_MPC83XX_SYS_H__ */
index ce9e66abef24ac92ddb8a48e0378580ffab9792d..01cae106912bec714d4df34105c3305971970554 100644 (file)
@@ -10,5 +10,8 @@
  */
 
 extern int add_bridge(struct device_node *dev);
+extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
+extern void mpc83xx_restart(char *cmd);
+extern long mpc83xx_time_init(void);
 
-#endif /* __MPC83XX_H__ */
+#endif                         /* __MPC83XX_H__ */
index 469cdacc5bd418657602b17cb0ab22b598e7930e..16f7d3b30e1dbf023e0229fe946441516fc3c845 100644 (file)
 
 int mpc83xx_pci2_busno;
 
-#ifdef CONFIG_PCI
+int mpc83xx_exclude_device(u_char bus, u_char devfn)
+{
+       if (bus == 0 && PCI_SLOT(devfn) == 0)
+               return PCIBIOS_DEVICE_NOT_FOUND;
+       if (mpc83xx_pci2_busno)
+               if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0)
+                       return PCIBIOS_DEVICE_NOT_FOUND;
+       return PCIBIOS_SUCCESSFUL;
+}
+
 int __init add_bridge(struct device_node *dev)
 {
        int len;
@@ -52,7 +61,7 @@ int __init add_bridge(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = (int *) get_property(dev, "bus-range", &len);
+       bus_range = (int *)get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);
@@ -74,7 +83,7 @@ int __init add_bridge(struct device_node *dev)
        if ((rsrc.start & 0xfffff) == 0x8500) {
                setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304);
        }
-       /* PCI 2*/
+       /* PCI 2 */
        if ((rsrc.start & 0xfffff) == 0x8600) {
                setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384);
                primary = 0;
@@ -84,10 +93,10 @@ int __init add_bridge(struct device_node *dev)
 
        printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. "
               "Firmware bus number: %d->%d\n",
-               rsrc.start, hose->first_busno, hose->last_busno);
+              rsrc.start, hose->first_busno, hose->last_busno);
 
        DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
-               hose, hose->cfg_addr, hose->cfg_data);
+           hose, hose->cfg_addr, hose->cfg_data);
 
        /* Interpret the "ranges" property */
        /* This also maps the I/O region and sets isa_io/mem_base */
@@ -95,5 +104,3 @@ int __init add_bridge(struct device_node *dev)
 
        return 0;
 }
-
-#endif
index c5bc2821d99162c673aac9a2d1558d4e950a8502..d3d0ff745e8428c7e823ed5dbdccc6a9ed926e50 100644 (file)
@@ -1,86 +1,30 @@
-config 85xx
-       bool
-       depends on E500
-       default y
-
-config PPC_INDIRECT_PCI_BE
-       bool
-       depends on 85xx
-       default y
-
-menu "Freescale 85xx options"
-       depends on E500
+menu "Platform support"
+       depends on PPC_85xx
 
 choice
        prompt "Machine Type"
-       depends on 85xx
        default MPC8540_ADS
 
 config MPC8540_ADS
        bool "Freescale MPC8540 ADS"
        help
-         This option enables support for the MPC 8540 ADS evaluation board.
-
-config MPC8548_CDS
-       bool "Freescale MPC8548 CDS"
-       help
-         This option enablese support for the MPC8548 CDS evaluation board.
-
-config MPC8555_CDS
-       bool "Freescale MPC8555 CDS"
-       help
-         This option enablese support for the MPC8555 CDS evaluation board.
-
-config MPC8560_ADS
-       bool "Freescale MPC8560 ADS"
-       help
-         This option enables support for the MPC 8560 ADS evaluation board.
-
-config SBC8560
-       bool "WindRiver PowerQUICC III SBC8560"
-       help
-         This option enables support for the WindRiver PowerQUICC III 
-         SBC8560 board.
-
-config STX_GP3
-       bool "Silicon Turnkey Express GP3"
-       help
-         This option enables support for the Silicon Turnkey Express GP3
-         board.
+         This option enables support for the MPC 8540 ADS board
 
 endchoice
 
-# It's often necessary to know the specific 85xx processor type.
-# Fortunately, it is implied (so far) from the board type, so we
-# don't need to ask more redundant questions.
 config MPC8540
        bool
-       depends on MPC8540_ADS
-       default y
-
-config MPC8548
-       bool
-       depends on MPC8548_CDS
-       default y
+       select PPC_UDBG_16550
+       select PPC_INDIRECT_PCI
+       default y if MPC8540_ADS
 
-config MPC8555
-       bool
-       depends on MPC8555_CDS
-       default y
-
-config MPC8560
+config PPC_INDIRECT_PCI_BE
        bool
-       depends on SBC8560 || MPC8560_ADS || STX_GP3
-       default y
-
-config 85xx_PCI2
-       bool "Supprt for 2nd PCI host controller"
-       depends on MPC8555_CDS
+       depends on PPC_85xx
        default y
 
-config PPC_GEN550
+config MPIC
        bool
-       depends on MPC8540 || SBC8560 || MPC8555
        default y
 
 endmenu
index 6407197ffd89399769cce3c116959a2096f70cdc..ffc4139cb214378984636b6cf0ea60eb82e07aca 100644 (file)
@@ -1 +1,5 @@
-# empty makefile so make clean works
+#
+# Makefile for the PowerPC 85xx linux kernel.
+#
+obj-$(CONFIG_PPC_85xx) += misc.o pci.o
+obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c
new file mode 100644 (file)
index 0000000..26c5e82
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * MPC85xx generic code.
+ *
+ * Maintained by Kumar Gala (see MAINTAINERS for contact information)
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+#include <linux/irq.h>
+#include <linux/module.h>
+#include <asm/irq.h>
+
+extern void abort(void);
+
+void mpc85xx_restart(char *cmd)
+{
+       local_irq_disable();
+       abort();
+}
+
+/* For now this is a pass through */
+phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size)
+{
+       return addr;
+};
+
+EXPORT_SYMBOL(fixup_bigphys_addr);
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h
new file mode 100644 (file)
index 0000000..f770cad
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * arch/ppc/platforms/85xx/mpc8540_ads.h
+ *
+ * MPC8540ADS board definitions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2004 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef __MACH_MPC8540ADS_H__
+#define __MACH_MPC8540ADS_H__
+
+#include <linux/config.h>
+#include <linux/initrd.h>
+
+#define BOARD_CCSRBAR          ((uint)0xe0000000)
+#define BCSR_ADDR              ((uint)0xf8000000)
+#define BCSR_SIZE              ((uint)(32 * 1024))
+
+/* PCI interrupt controller */
+#define PIRQA          MPC85xx_IRQ_EXT1
+#define PIRQB          MPC85xx_IRQ_EXT2
+#define PIRQC          MPC85xx_IRQ_EXT3
+#define PIRQD          MPC85xx_IRQ_EXT4
+
+/* Offset of CPM register space */
+#define CPM_MAP_ADDR   (CCSRBAR + MPC85xx_CPM_OFFSET)
+
+#endif                         /* __MACH_MPC8540ADS_H__ */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
new file mode 100644 (file)
index 0000000..b44db62
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * arch/ppc/platforms/85xx/mpc85xx.h
+ *
+ * MPC85xx soc definitions/function decls
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+
+extern void mpc85xx_restart(char *);
+extern int add_bridge(struct device_node *dev);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
new file mode 100644 (file)
index 0000000..b7821db
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * MPC85xx setup and early boot code plus other random bits.
+ *
+ * Maintained by Kumar Gala (see MAINTAINERS for contact information)
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+
+#include <asm/system.h>
+#include <asm/time.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/prom.h>
+#include <asm/mpic.h>
+#include <mm/mmu_decl.h>
+#include <asm/udbg.h>
+
+#include <sysdev/fsl_soc.h>
+#include "mpc85xx.h"
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+#endif
+
+/*
+ * Internal interrupts are all Level Sensitive, and Positive Polarity
+ *
+ * Note:  Likely, this table and the following function should be
+ *        obtained and derived from the OF Device Tree.
+ */
+static u_char mpc85xx_ads_openpic_initsenses[] __initdata = {
+       MPC85XX_INTERNAL_IRQ_SENSES,
+       0x0,                    /* External  0: */
+#if defined(CONFIG_PCI)
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* Ext 1: PCI slot 0 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* Ext 2: PCI slot 1 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* Ext 3: PCI slot 2 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* Ext 4: PCI slot 3 */
+#else
+       0x0,                    /* External  1: */
+       0x0,                    /* External  2: */
+       0x0,                    /* External  3: */
+       0x0,                    /* External  4: */
+#endif
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* External 5: PHY */
+       0x0,                    /* External  6: */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* External 7: PHY */
+       0x0,                    /* External  8: */
+       0x0,                    /* External  9: */
+       0x0,                    /* External 10: */
+       0x0,                    /* External 11: */
+};
+
+#ifdef CONFIG_PCI
+/*
+ * interrupt routing
+ */
+
+int
+mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+       static char pci_irq_table[][4] =
+           /*
+            * This is little evil, but works around the fact
+            * that revA boards have IDSEL starting at 18
+            * and others boards (older) start at 12
+            *
+            *      PCI IDSEL/INTPIN->INTLINE
+            *       A      B      C      D
+            */
+       {
+               {PIRQA, PIRQB, PIRQC, PIRQD},   /* IDSEL 2 */
+               {PIRQD, PIRQA, PIRQB, PIRQC},
+               {PIRQC, PIRQD, PIRQA, PIRQB},
+               {PIRQB, PIRQC, PIRQD, PIRQA},   /* IDSEL 5 */
+               {0, 0, 0, 0},   /* -- */
+               {0, 0, 0, 0},   /* -- */
+               {0, 0, 0, 0},   /* -- */
+               {0, 0, 0, 0},   /* -- */
+               {0, 0, 0, 0},   /* -- */
+               {0, 0, 0, 0},   /* -- */
+               {PIRQA, PIRQB, PIRQC, PIRQD},   /* IDSEL 12 */
+               {PIRQD, PIRQA, PIRQB, PIRQC},
+               {PIRQC, PIRQD, PIRQA, PIRQB},
+               {PIRQB, PIRQC, PIRQD, PIRQA},   /* IDSEL 15 */
+               {0, 0, 0, 0},   /* -- */
+               {0, 0, 0, 0},   /* -- */
+               {PIRQA, PIRQB, PIRQC, PIRQD},   /* IDSEL 18 */
+               {PIRQD, PIRQA, PIRQB, PIRQC},
+               {PIRQC, PIRQD, PIRQA, PIRQB},
+               {PIRQB, PIRQC, PIRQD, PIRQA},   /* IDSEL 21 */
+       };
+
+       const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4;
+       return PCI_IRQ_TABLE_LOOKUP;
+}
+
+int
+mpc85xx_exclude_device(u_char bus, u_char devfn)
+{
+       if (bus == 0 && PCI_SLOT(devfn) == 0)
+               return PCIBIOS_DEVICE_NOT_FOUND;
+       else
+               return PCIBIOS_SUCCESSFUL;
+}
+
+#endif /* CONFIG_PCI */
+
+
+void __init mpc85xx_ads_pic_init(void)
+{
+       struct mpic *mpic1;
+       phys_addr_t OpenPIC_PAddr;
+
+       /* Determine the Physical Address of the OpenPIC regs */
+       OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET;
+
+       mpic1 = mpic_alloc(OpenPIC_PAddr,
+                          MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
+                          4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250,
+                          mpc85xx_ads_openpic_initsenses,
+                          sizeof(mpc85xx_ads_openpic_initsenses),
+                          " OpenPIC  ");
+       BUG_ON(mpic1 == NULL);
+       mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200);
+       mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280);
+       mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300);
+       mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380);
+       mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400);
+       mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480);
+       mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500);
+       mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580);
+
+       /* dummy mappings to get to 48 */
+       mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600);
+       mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680);
+       mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700);
+       mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780);
+
+       /* External ints */
+       mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000);
+       mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080);
+       mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100);
+       mpic_init(mpic1);
+}
+
+/*
+ * Setup the architecture
+ */
+static void __init mpc85xx_ads_setup_arch(void)
+{
+       struct device_node *cpu;
+       struct device_node *np;
+
+       if (ppc_md.progress)
+               ppc_md.progress("mpc85xx_ads_setup_arch()", 0);
+
+       cpu = of_find_node_by_type(NULL, "cpu");
+       if (cpu != 0) {
+               unsigned int *fp;
+
+               fp = (int *)get_property(cpu, "clock-frequency", NULL);
+               if (fp != 0)
+                       loops_per_jiffy = *fp / HZ;
+               else
+                       loops_per_jiffy = 50000000 / HZ;
+               of_node_put(cpu);
+       }
+
+#ifdef CONFIG_PCI
+       for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
+               add_bridge(np);
+
+       ppc_md.pci_swizzle = common_swizzle;
+       ppc_md.pci_map_irq = mpc85xx_map_irq;
+       ppc_md.pci_exclude_device = mpc85xx_exclude_device;
+#endif
+
+#ifdef  CONFIG_ROOT_NFS
+       ROOT_DEV = Root_NFS;
+#else
+       ROOT_DEV = Root_HDA1;
+#endif
+}
+
+void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
+{
+       uint pvid, svid, phid1;
+       uint memsize = total_memory;
+
+       pvid = mfspr(SPRN_PVR);
+       svid = mfspr(SPRN_SVR);
+
+       seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
+       seq_printf(m, "Machine\t\t: mpc85xx\n");
+       seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
+       seq_printf(m, "SVR\t\t: 0x%x\n", svid);
+
+       /* Display cpu Pll setting */
+       phid1 = mfspr(SPRN_HID1);
+       seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
+
+       /* Display the amount of memory */
+       seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
+}
+
+void __init platform_init(void)
+{
+       ppc_md.setup_arch = mpc85xx_ads_setup_arch;
+       ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
+
+       ppc_md.init_IRQ = mpc85xx_ads_pic_init;
+       ppc_md.get_irq = mpic_get_irq;
+
+       ppc_md.restart = mpc85xx_restart;
+       ppc_md.power_off = NULL;
+       ppc_md.halt = NULL;
+
+       ppc_md.time_init = NULL;
+       ppc_md.set_rtc_time = NULL;
+       ppc_md.get_rtc_time = NULL;
+       ppc_md.calibrate_decr = generic_calibrate_decr;
+
+       ppc_md.progress = udbg_progress;
+
+       if (ppc_md.progress)
+               ppc_md.progress("mpc85xx_ads platform_init(): exit", 0);
+}
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
new file mode 100644 (file)
index 0000000..bad2901
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * FSL SoC setup code
+ *
+ * Maintained by Kumar Gala (see MAINTAINERS for contact information)
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/module.h>
+
+#include <asm/system.h>
+#include <asm/atomic.h>
+#include <asm/io.h>
+#include <asm/pci-bridge.h>
+#include <asm/prom.h>
+#include <sysdev/fsl_soc.h>
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define DBG(x...) printk(x)
+#else
+#define DBG(x...)
+#endif
+
+int mpc85xx_pci2_busno = 0;
+
+#ifdef CONFIG_PCI
+int __init add_bridge(struct device_node *dev)
+{
+       int len;
+       struct pci_controller *hose;
+       struct resource rsrc;
+       int *bus_range;
+       int primary = 1, has_address = 0;
+       phys_addr_t immr = get_immrbase();
+
+       DBG("Adding PCI host bridge %s\n", dev->full_name);
+
+       /* Fetch host bridge registers address */
+       has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
+
+       /* Get bus range if any */
+       bus_range = (int *) get_property(dev, "bus-range", &len);
+       if (bus_range == NULL || len < 2 * sizeof(int)) {
+               printk(KERN_WARNING "Can't get bus-range for %s, assume"
+                      " bus 0\n", dev->full_name);
+       }
+
+       hose = pcibios_alloc_controller();
+       if (!hose)
+               return -ENOMEM;
+       hose->arch_data = dev;
+       hose->set_cfg_type = 1;
+
+       hose->first_busno = bus_range ? bus_range[0] : 0;
+       hose->last_busno = bus_range ? bus_range[1] : 0xff;
+
+       /* PCI 1 */
+       if ((rsrc.start & 0xfffff) == 0x8000) {
+               setup_indirect_pci(hose, immr + 0x8000, immr + 0x8004);
+       }
+       /* PCI 2 */
+       if ((rsrc.start & 0xfffff) == 0x9000) {
+               setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004);
+               primary = 0;
+               hose->bus_offset = hose->first_busno;
+               mpc85xx_pci2_busno = hose->first_busno;
+       }
+
+       printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. "
+              "Firmware bus number: %d->%d\n",
+               rsrc.start, hose->first_busno, hose->last_busno);
+
+       DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+               hose, hose->cfg_addr, hose->cfg_data);
+
+       /* Interpret the "ranges" property */
+       /* This also maps the I/O region and sets isa_io/mem_base */
+       pci_process_bridge_OF_ranges(hose, dev, primary);
+
+       return 0;
+}
+
+#endif
index 04073fd987ec465d11686ab047ec7456cc24b72a..c4f6b0d2d140002f69a58d3625afd1be6c2617d2 100644 (file)
@@ -8,7 +8,7 @@ endif
 obj-$(CONFIG_PPC_CHRP)         += chrp/
 obj-$(CONFIG_4xx)              += 4xx/
 obj-$(CONFIG_PPC_83xx)         += 83xx/
-obj-$(CONFIG_85xx)             += 85xx/
+obj-$(CONFIG_PPC_85xx)         += 85xx/
 obj-$(CONFIG_PPC_PSERIES)      += pseries/
 obj-$(CONFIG_PPC_ISERIES)      += iseries/
 obj-$(CONFIG_PPC_MAPLE)                += maple/
index 29c86781c49365e0ca1e05ecf8fe388f4f7f425c..6ad4b1a72c96b9e5aa838305e413a12b212394eb 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/chrp_pegasos_eth.c
- *
  *  Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
  *  Thanks to :
  *     Dale Farnsworth <dale@farnsworth.org>
index e1fadbf49150d333b780ef3b2b6f757fd6db020c..8bf4307e323df5c58c5dc7f27204101829f8690b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/setup.c
- *
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
  *  Modified by Cort Dougan (cort@cs.nmt.edu)
index 78df2e7ca88a1c9d5edc76e54ad7f9102420dd2e..12c6f689b1aa443af167344a4bc976b27caba44f 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/chrp_time.c
- *
  *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
  *
  * Adapted for PowerPC (PReP) by Gary Thomas
index a41d8b78c0cd6e15b8e83c57321eff84fb26dbe9..d771b8ee857d59462af2a5dde6c870dfa6e52b13 100644 (file)
@@ -46,6 +46,7 @@
 #include "setup.h"
 
 extern int piranha_simulator;
+static int mf_initialized;
 
 /*
  * This is the structure layout for the Machine Facilites LPAR event
@@ -143,7 +144,8 @@ static spinlock_t pending_event_spinlock;
 static struct pending_event *pending_event_head;
 static struct pending_event *pending_event_tail;
 static struct pending_event *pending_event_avail;
-static struct pending_event pending_event_prealloc[16];
+#define PENDING_EVENT_PREALLOC_LEN 16
+static struct pending_event pending_event_prealloc[PENDING_EVENT_PREALLOC_LEN];
 
 /*
  * Put a pending event onto the available queue, so it can get reused.
@@ -597,7 +599,7 @@ void mf_power_off(void)
  * Global kernel interface to tell the VSP object in the primary
  * partition to reboot this partition.
  */
-void mf_reboot(void)
+void mf_reboot(char *cmd)
 {
        printk(KERN_INFO "mf.c: Preparing to bounce...\n");
        signal_ce_msg_simple(0x4e, NULL);
@@ -625,7 +627,7 @@ void mf_display_src(u32 word)
 /*
  * Display a single word SRC of the form "PROGXXXX" on the VSP control panel.
  */
-void mf_display_progress(u16 value)
+static __init void mf_display_progress_src(u16 value)
 {
        u8 ce[12];
        u8 src[72];
@@ -649,30 +651,42 @@ void mf_display_progress(u16 value)
  * Clear the VSP control panel.  Used to "erase" an SRC that was
  * previously displayed.
  */
-void mf_clear_src(void)
+static void mf_clear_src(void)
 {
        signal_ce_msg_simple(0x4b, NULL);
 }
 
+void __init mf_display_progress(u16 value)
+{
+       if (piranha_simulator || !mf_initialized)
+               return;
+
+       if (0xFFFF == value)
+               mf_clear_src();
+       else
+               mf_display_progress_src(value);
+}
+
 /*
  * Initialization code here.
  */
-void mf_init(void)
+void __init mf_init(void)
 {
        int i;
 
-       /* initialize */
        spin_lock_init(&pending_event_spinlock);
-       for (i = 0;
-            i < sizeof(pending_event_prealloc) / sizeof(*pending_event_prealloc);
-            ++i)
+
+       for (i = 0; i < PENDING_EVENT_PREALLOC_LEN; i++)
                free_pending_event(&pending_event_prealloc[i]);
+
        HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler);
 
        /* virtual continue ack */
        signal_ce_msg_simple(0x57, NULL);
 
-       /* initialization complete */
+       mf_initialized = 1;
+       mb();
+
        printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities "
                        "initialized\n");
 }
@@ -692,6 +706,43 @@ static void get_rtc_time_complete(void *token, struct ce_msg_data *ce_msg)
        complete(&rtc->com);
 }
 
+static int mf_set_rtc(struct rtc_time *tm)
+{
+       char ce_time[12];
+       u8 day, mon, hour, min, sec, y1, y2;
+       unsigned year;
+
+       year = 1900 + tm->tm_year;
+       y1 = year / 100;
+       y2 = year % 100;
+
+       sec = tm->tm_sec;
+       min = tm->tm_min;
+       hour = tm->tm_hour;
+       day = tm->tm_mday;
+       mon = tm->tm_mon + 1;
+
+       BIN_TO_BCD(sec);
+       BIN_TO_BCD(min);
+       BIN_TO_BCD(hour);
+       BIN_TO_BCD(mon);
+       BIN_TO_BCD(day);
+       BIN_TO_BCD(y1);
+       BIN_TO_BCD(y2);
+
+       memset(ce_time, 0, sizeof(ce_time));
+       ce_time[3] = 0x41;
+       ce_time[4] = y1;
+       ce_time[5] = y2;
+       ce_time[6] = sec;
+       ce_time[7] = min;
+       ce_time[8] = hour;
+       ce_time[10] = day;
+       ce_time[11] = mon;
+
+       return signal_ce_msg(ce_time, NULL);
+}
+
 static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm)
 {
        tm->tm_wday = 0;
@@ -747,7 +798,7 @@ static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm)
        return 0;
 }
 
-int mf_get_rtc(struct rtc_time *tm)
+static int mf_get_rtc(struct rtc_time *tm)
 {
        struct ce_msg_comp_data ce_complete;
        struct rtc_time_data rtc_data;
@@ -780,7 +831,7 @@ static void get_boot_rtc_time_complete(void *token, struct ce_msg_data *ce_msg)
        rtc->busy = 0;
 }
 
-int mf_get_boot_rtc(struct rtc_time *tm)
+static int mf_get_boot_rtc(struct rtc_time *tm)
 {
        struct ce_msg_comp_data ce_complete;
        struct boot_rtc_time_data rtc_data;
@@ -802,43 +853,6 @@ int mf_get_boot_rtc(struct rtc_time *tm)
        return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
 }
 
-int mf_set_rtc(struct rtc_time *tm)
-{
-       char ce_time[12];
-       u8 day, mon, hour, min, sec, y1, y2;
-       unsigned year;
-
-       year = 1900 + tm->tm_year;
-       y1 = year / 100;
-       y2 = year % 100;
-
-       sec = tm->tm_sec;
-       min = tm->tm_min;
-       hour = tm->tm_hour;
-       day = tm->tm_mday;
-       mon = tm->tm_mon + 1;
-
-       BIN_TO_BCD(sec);
-       BIN_TO_BCD(min);
-       BIN_TO_BCD(hour);
-       BIN_TO_BCD(mon);
-       BIN_TO_BCD(day);
-       BIN_TO_BCD(y1);
-       BIN_TO_BCD(y2);
-
-       memset(ce_time, 0, sizeof(ce_time));
-       ce_time[3] = 0x41;
-       ce_time[4] = y1;
-       ce_time[5] = y2;
-       ce_time[6] = sec;
-       ce_time[7] = min;
-       ce_time[8] = hour;
-       ce_time[10] = day;
-       ce_time[11] = mon;
-
-       return signal_ce_msg(ce_time, NULL);
-}
-
 #ifdef CONFIG_PROC_FS
 
 static int proc_mf_dump_cmdline(char *page, char **start, off_t off,
index 3ecc4a652d82e55425f6d3c3b8441266e389e316..fa4550611c118b91234b5690f206df7dcdc3487d 100644 (file)
@@ -50,6 +50,7 @@
 #include <asm/iseries/hv_call_xm.h>
 #include <asm/iseries/it_lp_queue.h>
 #include <asm/iseries/mf.h>
+#include <asm/iseries/it_exp_vpd_panel.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/lpar_map.h>
 #include <asm/udbg.h>
@@ -89,8 +90,6 @@ extern unsigned long embedded_sysmap_end;
 extern unsigned long iSeries_recal_tb;
 extern unsigned long iSeries_recal_titan;
 
-static int mf_initialized;
-
 static unsigned long cmd_mem_limit;
 
 struct MemoryBlock {
@@ -303,8 +302,6 @@ static void __init iSeries_init_early(void)
 {
        DBG(" -> iSeries_init_early()\n");
 
-       ppc64_firmware_features = FW_FEATURE_ISERIES;
-
        ppc64_interrupt_controller = IC_ISERIES;
 
 #if defined(CONFIG_BLK_DEV_INITRD)
@@ -349,8 +346,6 @@ static void __init iSeries_init_early(void)
        HvCallEvent_setLpEventQueueInterruptProc(0, 0);
 
        mf_init();
-       mf_initialized = 1;
-       mb();
 
        /* If we were passed an initrd, set the ROOT_DEV properly if the values
         * look sensible. If not, clear initrd reference.
@@ -560,39 +555,10 @@ static void iSeries_show_cpuinfo(struct seq_file *m)
        seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n");
 }
 
-/*
- * Document me.
- */
-static void iSeries_restart(char *cmd)
-{
-       mf_reboot();
-}
-
-/*
- * Document me.
- */
-static void iSeries_power_off(void)
-{
-       mf_power_off();
-}
-
-/*
- * Document me.
- */
-static void iSeries_halt(void)
-{
-       mf_power_off();
-}
-
 static void __init iSeries_progress(char * st, unsigned short code)
 {
        printk("Progress: [%04x] - %s\n", (unsigned)code, st);
-       if (!piranha_simulator && mf_initialized) {
-               if (code != 0xffff)
-                       mf_display_progress(code);
-               else
-                       mf_clear_src();
-       }
+       mf_display_progress(code);
 }
 
 static void __init iSeries_fixup_klimit(void)
@@ -711,7 +677,13 @@ void __init iSeries_init_IRQ(void) { }
 
 static int __init iseries_probe(int platform)
 {
-       return PLATFORM_ISERIES_LPAR == platform;
+       if (PLATFORM_ISERIES_LPAR != platform)
+               return 0;
+
+       ppc64_firmware_features |= FW_FEATURE_ISERIES;
+       ppc64_firmware_features |= FW_FEATURE_LPAR;
+
+       return 1;
 }
 
 struct machdep_calls __initdata iseries_md = {
@@ -721,9 +693,9 @@ struct machdep_calls __initdata iseries_md = {
        .get_irq        = iSeries_get_irq,
        .init_early     = iSeries_init_early,
        .pcibios_fixup  = iSeries_pci_final_fixup,
-       .restart        = iSeries_restart,
-       .power_off      = iSeries_power_off,
-       .halt           = iSeries_halt,
+       .restart        = mf_reboot,
+       .power_off      = mf_power_off,
+       .halt           = mf_power_off,
        .get_boot_time  = iSeries_get_boot_time,
        .set_rtc_time   = iSeries_set_rtc_time,
        .get_rtc_time   = iSeries_get_rtc_time,
@@ -917,6 +889,24 @@ void dt_cpus(struct iseries_flat_dt *dt)
        dt_end_node(dt);
 }
 
+void dt_model(struct iseries_flat_dt *dt)
+{
+       char buf[16] = "IBM,";
+
+       /* "IBM," + mfgId[2:3] + systemSerial[1:5] */
+       strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2);
+       strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5);
+       buf[11] = '\0';
+       dt_prop_str(dt, "system-id", buf);
+
+       /* "IBM," + machineType[0:4] */
+       strne2a(buf + 4, xItExtVpdPanel.machineType, 4);
+       buf[8] = '\0';
+       dt_prop_str(dt, "model", buf);
+
+       dt_prop_str(dt, "compatible", "IBM,iSeries");
+}
+
 void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
 {
        u64 tmp[2];
@@ -927,6 +917,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
 
        dt_prop_u32(dt, "#address-cells", 2);
        dt_prop_u32(dt, "#size-cells", 2);
+       dt_model(dt);
 
        /* /memory */
        dt_start_node(dt, "memory@0");
@@ -940,6 +931,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
        /* /chosen */
        dt_start_node(dt, "chosen");
        dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR);
+       dt_prop_str(dt, "bootargs", cmd_line);
        if (cmd_mem_limit)
                dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit);
        dt_end_node(dt);
index 50bc4eb853535bca3e78eae519dbf98367b7f294..5e6981d17379351ccf5bdf60f3b84bc7d843a8e1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc64/kernel/maple_time.c
- *
  *  (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org),
  *                     IBM Corp. 
  *
index 56fd4e05fede95b68d05e91b075e91f2c2ab535b..cfd6527a0d7e0799ec140bb5688481b2322112f7 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/pmac_cpufreq.c
- *
  *  Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>
  *  Copyright (C) 2004        John Steele Scott <toojays@toojays.net>
  *
index bbe794891a2076c22dc7b361b79b95451b0b6f1a..e49eddd5042d0d0847b89b0d14bf63a31564d58a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/pmac_feature.c
- *
  *  Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au)
  *                          Ben. Herrenschmidt (benh@kernel.crashing.org)
  *
index 3ebd045a335048a954cc401bd9dc135df0473103..5fd28995c74ceabb01f0c35792138918003c036a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/pmac_nvram.c
- *
  *  Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org)
  *
  *  This program is free software; you can redistribute it and/or
index 29c2946f1c77e5f00dfb68fd686221d37b7f36f4..385aab90c4d264bfa3a4353d6144c8dbf86cafb7 100644 (file)
@@ -86,11 +86,10 @@ int ppc_override_l2cr = 0;
 int ppc_override_l2cr_value;
 int has_l2cache = 0;
 
-int pmac_newworld = 1;
+int pmac_newworld;
 
 static int current_root_goodness = -1;
 
-extern int pmac_newworld;
 extern struct machdep_calls pmac_md;
 
 #define DEFAULT_ROOT_DEVICE Root_SDA1  /* sda1 - slightly silly choice */
@@ -308,9 +307,10 @@ static void __init pmac_setup_arch(void)
        for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
                if (get_property(ic, "interrupt-controller", NULL))
                        break;
-       pmac_newworld = (ic != NULL);
-       if (ic)
+       if (ic) {
+               pmac_newworld = 1;
                of_node_put(ic);
+       }
 
        /* Lookup PCI hosts */
        pmac_pci_init();
index 61616d1440729371060f711226672852addf82b4..930898635c9ffa2c25d6d8afb04221768f36ce43 100644 (file)
@@ -1,5 +1,6 @@
 obj-y                  := pci.o lpar.o hvCall.o nvram.o reconfig.o \
-                          setup.o iommu.o ras.o rtasd.o pci_dlpar.o
+                          setup.o iommu.o ras.o rtasd.o pci_dlpar.o \
+                          firmware.o
 obj-$(CONFIG_SMP)      += smp.o
 obj-$(CONFIG_IBMVIO)   += vio.o
 obj-$(CONFIG_XICS)     += xics.o
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
new file mode 100644 (file)
index 0000000..989f4bc
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ *  pSeries firmware setup code.
+ *
+ *  Portions from arch/powerpc/platforms/pseries/setup.c:
+ *   Copyright (C) 1995  Linus Torvalds
+ *   Adapted from 'alpha' version by Gary Thomas
+ *   Modified by Cort Dougan (cort@cs.nmt.edu)
+ *   Modified by PPC64 Team, IBM Corp
+ *
+ *  Portions from arch/powerpc/kernel/firmware.c
+ *   Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
+ *   Modifications for ppc64:
+ *    Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
+ *    Copyright (C) 2005 Stephen Rothwell, IBM Corporation
+ *
+ *  Copyright 2006 IBM Corporation.
+ *
+ * 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.
+ */
+
+#undef DEBUG
+
+#include <asm/firmware.h>
+#include <asm/prom.h>
+
+#ifdef DEBUG
+#define DBG(fmt...) udbg_printf(fmt)
+#else
+#define DBG(fmt...)
+#endif
+
+typedef struct {
+    unsigned long val;
+    char * name;
+} firmware_feature_t;
+
+static __initdata firmware_feature_t
+firmware_features_table[FIRMWARE_MAX_FEATURES] = {
+       {FW_FEATURE_PFT,                "hcall-pft"},
+       {FW_FEATURE_TCE,                "hcall-tce"},
+       {FW_FEATURE_SPRG0,              "hcall-sprg0"},
+       {FW_FEATURE_DABR,               "hcall-dabr"},
+       {FW_FEATURE_COPY,               "hcall-copy"},
+       {FW_FEATURE_ASR,                "hcall-asr"},
+       {FW_FEATURE_DEBUG,              "hcall-debug"},
+       {FW_FEATURE_PERF,               "hcall-perf"},
+       {FW_FEATURE_DUMP,               "hcall-dump"},
+       {FW_FEATURE_INTERRUPT,          "hcall-interrupt"},
+       {FW_FEATURE_MIGRATE,            "hcall-migrate"},
+       {FW_FEATURE_PERFMON,            "hcall-perfmon"},
+       {FW_FEATURE_CRQ,                "hcall-crq"},
+       {FW_FEATURE_VIO,                "hcall-vio"},
+       {FW_FEATURE_RDMA,               "hcall-rdma"},
+       {FW_FEATURE_LLAN,               "hcall-lLAN"},
+       {FW_FEATURE_BULK,               "hcall-bulk"},
+       {FW_FEATURE_XDABR,              "hcall-xdabr"},
+       {FW_FEATURE_MULTITCE,           "hcall-multi-tce"},
+       {FW_FEATURE_SPLPAR,             "hcall-splpar"},
+};
+
+/* Build up the firmware features bitmask using the contents of
+ * device-tree/ibm,hypertas-functions.  Ultimately this functionality may
+ * be moved into prom.c prom_init().
+ */
+void __init fw_feature_init(void)
+{
+       struct device_node *dn;
+       char *hypertas, *s;
+       int len, i;
+
+       DBG(" -> fw_feature_init()\n");
+
+       dn = of_find_node_by_path("/rtas");
+       if (dn == NULL) {
+               printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n");
+               goto out;
+       }
+
+       hypertas = get_property(dn, "ibm,hypertas-functions", &len);
+       if (hypertas == NULL)
+               goto out;
+
+       for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) {
+               for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) {
+                       /* check value against table of strings */
+                       if (!firmware_features_table[i].name ||
+                           strcmp(firmware_features_table[i].name, s))
+                               continue;
+
+                       /* we have a match */
+                       ppc64_firmware_features |=
+                               firmware_features_table[i].val;
+                       break;
+               }
+       }
+
+out:
+       of_node_put(dn);
+       DBG(" <- fw_feature_init()\n");
+}
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h
new file mode 100644 (file)
index 0000000..714f56f
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2006 IBM Corporation.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version
+ *  2 of the License, or (at your option) any later version.
+ */
+
+#ifndef _PSERIES_FIRMWARE_H
+#define _PSERIES_FIRMWARE_H
+
+#include <asm/firmware.h>
+
+extern void __init fw_feature_init(void);
+
+#endif /* _PSERIES_FIRMWARE_H */
index 176e8da764669c4c0c712fe819ed74b3e45c8ae6..db7c19fe92972ccb3fc750e2d53a71737c608552 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/kernel/pSeries_hvCall.S
- *
  * This file contains the generic code to perform a call to the
  * pSeries LPAR hypervisor.
  * NOTE: this file will go away when we move to inline this work.
index 48cfbfc43f9921df42965ade250cf84887b68304..2643078433f0123f8997c7f98823934e7b1feadb 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/kernel/pSeries_iommu.c
- *
  * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
  *
  * Rewrite, cleanup: 
@@ -582,7 +580,7 @@ void iommu_init_early_pSeries(void)
                return;
        }
 
-       if (platform_is_lpar()) {
+       if (firmware_has_feature(FW_FEATURE_LPAR)) {
                if (firmware_has_feature(FW_FEATURE_MULTITCE)) {
                        ppc_md.tce_build = tce_buildmulti_pSeriesLP;
                        ppc_md.tce_free  = tce_freemulti_pSeriesLP;
index 999a9620b5ce0f13f89cc08a8d75895ca46cad97..946ad59e3352047eb86728e76f619308bdc92859 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/kernel/pSeries_pci.c
- *
  * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
  * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
  *
index 9edeca83f43463e3ca5e0d1fba5fbc829bdd262e..44d5c7fdcd9704d1b294f070799ae4d7409cf521 100644 (file)
@@ -60,7 +60,6 @@
 #include <asm/time.h>
 #include <asm/nvram.h>
 #include "xics.h"
-#include <asm/firmware.h>
 #include <asm/pmc.h>
 #include <asm/mpic.h>
 #include <asm/ppc-pci.h>
@@ -70,6 +69,7 @@
 
 #include "plpar_wrappers.h"
 #include "ras.h"
+#include "firmware.h"
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
@@ -246,7 +246,7 @@ static void __init pSeries_setup_arch(void)
                ppc_md.idle_loop = default_idle;
        }
 
-       if (platform_is_lpar())
+       if (firmware_has_feature(FW_FEATURE_LPAR))
                ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
        else
                ppc_md.enable_pmcs = power4_enable_pmcs;
@@ -262,53 +262,6 @@ static int __init pSeries_init_panel(void)
 }
 arch_initcall(pSeries_init_panel);
 
-
-/* Build up the ppc64_firmware_features bitmask field
- * using contents of device-tree/ibm,hypertas-functions.
- * Ultimately this functionality may be moved into prom.c prom_init().
- */
-static void __init fw_feature_init(void)
-{
-       struct device_node * dn;
-       char * hypertas;
-       unsigned int len;
-
-       DBG(" -> fw_feature_init()\n");
-
-       ppc64_firmware_features = 0;
-       dn = of_find_node_by_path("/rtas");
-       if (dn == NULL) {
-               printk(KERN_ERR "WARNING ! Cannot find RTAS in device-tree !\n");
-               goto no_rtas;
-       }
-
-       hypertas = get_property(dn, "ibm,hypertas-functions", &len);
-       if (hypertas) {
-               while (len > 0){
-                       int i, hypertas_len;
-                       /* check value against table of strings */
-                       for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) {
-                               if ((firmware_features_table[i].name) &&
-                                   (strcmp(firmware_features_table[i].name,hypertas))==0) {
-                                       /* we have a match */
-                                       ppc64_firmware_features |= 
-                                               (firmware_features_table[i].val);
-                                       break;
-                               } 
-                       }
-                       hypertas_len = strlen(hypertas);
-                       len -= hypertas_len +1;
-                       hypertas+= hypertas_len +1;
-               }
-       }
-
-       of_node_put(dn);
-no_rtas:
-
-       DBG(" <- fw_feature_init()\n");
-}
-
-
 static  void __init pSeries_discover_pic(void)
 {
        struct device_node *np;
@@ -367,21 +320,16 @@ static int pseries_set_xdabr(unsigned long dabr)
  */
 static void __init pSeries_init_early(void)
 {
-       int iommu_off = 0;
-
        DBG(" -> pSeries_init_early()\n");
 
        fw_feature_init();
        
-       if (platform_is_lpar())
+       if (firmware_has_feature(FW_FEATURE_LPAR))
                hpte_init_lpar();
-       else {
+       else
                hpte_init_native();
-               iommu_off = (of_chosen &&
-                            get_property(of_chosen, "linux,iommu-off", NULL));
-       }
 
-       if (platform_is_lpar())
+       if (firmware_has_feature(FW_FEATURE_LPAR))
                find_udbg_vterm();
 
        if (firmware_has_feature(FW_FEATURE_DABR))
@@ -437,6 +385,9 @@ static int __init pSeries_probe(int platform)
         * it here ...
         */
 
+       if (platform == PLATFORM_PSERIES_LPAR)
+               ppc64_firmware_features |= FW_FEATURE_LPAR;
+
        return 1;
 }
 
@@ -576,7 +527,7 @@ static void pseries_shared_idle(void)
 
 static int pSeries_pci_probe_mode(struct pci_bus *bus)
 {
-       if (platform_is_lpar())
+       if (firmware_has_feature(FW_FEATURE_LPAR))
                return PCI_PROBE_DEVTREE;
        return PCI_PROBE_NORMAL;
 }
index 8d710af50756602f10c0c37480f70285d54008af..3cf78a6cd27c32d55659cec05350ed28f8835a86 100644 (file)
@@ -443,7 +443,7 @@ void __init smp_init_pSeries(void)
        smp_ops->cpu_die = pSeries_cpu_die;
 
        /* Processors can be added/removed only on LPAR */
-       if (platform_is_lpar())
+       if (firmware_has_feature(FW_FEATURE_LPAR))
                pSeries_reconfig_notifier_register(&pSeries_smp_nb);
 #endif
 
index fd823c7c9ac88e6db77d9d912750819df682ccd3..eb86cdb9b80248a5f1b77b6e07298119583d4966 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/gfp.h>
 #include <linux/radix-tree.h>
 #include <linux/cpu.h>
+#include <asm/firmware.h>
 #include <asm/prom.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
@@ -536,7 +537,7 @@ nextnode:
                of_node_put(np);
        }
 
-       if (platform_is_lpar())
+       if (firmware_has_feature(FW_FEATURE_LPAR))
                ops = &pSeriesLP_ops;
        else {
 #ifdef CONFIG_SMP
index 6298264efe36110bdc8318001180d3d8eb751fba..61d317428610ab3d953211366d2e938284f0d72a 100644 (file)
@@ -194,8 +194,6 @@ static int dart_init(struct device_node *dart_node)
         * prefetching into invalid pages and corrupting data
         */
        tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE);
-       if (!tmp)
-               panic("DART: Cannot allocate spare page!");
        dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) &
                                         DARTMAP_RPNMASK);
 
index 895f10243a43a9341e662c9e8a68d8119725b846..2078f39e2f179a2341b4916bb79d5b32ab6930ae 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/dcr.S
- *
  * "Indirect" DCR access
  *
  * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net>
index 064c9de47732166e915c0ddc39b79c8cdfcd62a2..ceb584682fa30f64d9c7bbc3d84af53db5d2d8f0 100644 (file)
@@ -40,7 +40,7 @@ phys_addr_t get_immrbase(void)
                return immrbase;
 
        soc = of_find_node_by_type(NULL, "soc");
-       if (soc != 0) {
+       if (soc) {
                unsigned int size;
                void *prop = get_property(soc, "reg", &size);
                immrbase = of_translate_address(soc, prop);
@@ -49,21 +49,20 @@ phys_addr_t get_immrbase(void)
 
        return immrbase;
 }
-EXPORT_SYMBOL(get_immrbase);
 
-static const char * gfar_tx_intr = "tx";
-static const char * gfar_rx_intr = "rx";
-static const char * gfar_err_intr = "error";
+EXPORT_SYMBOL(get_immrbase);
 
-static int __init gfar_of_init(void)
+static int __init gfar_mdio_of_init(void)
 {
        struct device_node *np;
        unsigned int i;
-       struct platform_device *mdio_dev, *gfar_dev;
+       struct platform_device *mdio_dev;
        struct resource res;
        int ret;
 
-       for (np = NULL, i = 0; (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; i++) {
+       for (np = NULL, i = 0;
+            (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL;
+            i++) {
                int k;
                struct device_node *child = NULL;
                struct gianfar_mdio_data mdio_data;
@@ -73,12 +72,14 @@ static int __init gfar_of_init(void)
 
                ret = of_address_to_resource(np, 0, &res);
                if (ret)
-                       goto mdio_err;
+                       goto err;
 
-               mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", res.start, &res, 1);
+               mdio_dev =
+                   platform_device_register_simple("fsl-gianfar_mdio",
+                                                   res.start, &res, 1);
                if (IS_ERR(mdio_dev)) {
                        ret = PTR_ERR(mdio_dev);
-                       goto mdio_err;
+                       goto err;
                }
 
                for (k = 0; k < 32; k++)
@@ -86,17 +87,44 @@ static int __init gfar_of_init(void)
 
                while ((child = of_get_next_child(np, child)) != NULL) {
                        if (child->n_intrs) {
-                               u32 *id = (u32 *) get_property(child, "reg", NULL);
+                               u32 *id =
+                                   (u32 *) get_property(child, "reg", NULL);
                                mdio_data.irq[*id] = child->intrs[0].line;
                        }
                }
 
-               ret = platform_device_add_data(mdio_dev, &mdio_data, sizeof(struct gianfar_mdio_data));
+               ret =
+                   platform_device_add_data(mdio_dev, &mdio_data,
+                                            sizeof(struct gianfar_mdio_data));
                if (ret)
-                       goto mdio_unreg;
+                       goto unreg;
        }
 
-       for (np = NULL, i = 0; (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; i++) {
+       return 0;
+
+unreg:
+       platform_device_unregister(mdio_dev);
+err:
+       return ret;
+}
+
+arch_initcall(gfar_mdio_of_init);
+
+static const char *gfar_tx_intr = "tx";
+static const char *gfar_rx_intr = "rx";
+static const char *gfar_err_intr = "error";
+
+static int __init gfar_of_init(void)
+{
+       struct device_node *np;
+       unsigned int i;
+       struct platform_device *gfar_dev;
+       struct resource res;
+       int ret;
+
+       for (np = NULL, i = 0;
+            (np = of_find_compatible_node(np, "network", "gianfar")) != NULL;
+            i++) {
                struct resource r[4];
                struct device_node *phy, *mdio;
                struct gianfar_platform_data gfar_data;
@@ -110,7 +138,7 @@ static int __init gfar_of_init(void)
 
                ret = of_address_to_resource(np, 0, &r[0]);
                if (ret)
-                       goto gfar_err;
+                       goto err;
 
                r[1].start = np->intrs[0].line;
                r[1].end = np->intrs[0].line;
@@ -133,11 +161,13 @@ static int __init gfar_of_init(void)
                        r[3].flags = IORESOURCE_IRQ;
                }
 
-               gfar_dev = platform_device_register_simple("fsl-gianfar", i, &r[0], np->n_intrs + 1);
+               gfar_dev =
+                   platform_device_register_simple("fsl-gianfar", i, &r[0],
+                                                   np->n_intrs + 1);
 
                if (IS_ERR(gfar_dev)) {
                        ret = PTR_ERR(gfar_dev);
-                       goto gfar_err;
+                       goto err;
                }
 
                mac_addr = get_property(np, "address", NULL);
@@ -145,26 +175,26 @@ static int __init gfar_of_init(void)
 
                if (model && !strcasecmp(model, "TSEC"))
                        gfar_data.device_flags =
-                               FSL_GIANFAR_DEV_HAS_GIGABIT |
-                               FSL_GIANFAR_DEV_HAS_COALESCE |
-                               FSL_GIANFAR_DEV_HAS_RMON |
-                               FSL_GIANFAR_DEV_HAS_MULTI_INTR;
+                           FSL_GIANFAR_DEV_HAS_GIGABIT |
+                           FSL_GIANFAR_DEV_HAS_COALESCE |
+                           FSL_GIANFAR_DEV_HAS_RMON |
+                           FSL_GIANFAR_DEV_HAS_MULTI_INTR;
                if (model && !strcasecmp(model, "eTSEC"))
                        gfar_data.device_flags =
-                               FSL_GIANFAR_DEV_HAS_GIGABIT |
-                               FSL_GIANFAR_DEV_HAS_COALESCE |
-                               FSL_GIANFAR_DEV_HAS_RMON |
-                               FSL_GIANFAR_DEV_HAS_MULTI_INTR |
-                               FSL_GIANFAR_DEV_HAS_CSUM |
-                               FSL_GIANFAR_DEV_HAS_VLAN |
-                               FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
+                           FSL_GIANFAR_DEV_HAS_GIGABIT |
+                           FSL_GIANFAR_DEV_HAS_COALESCE |
+                           FSL_GIANFAR_DEV_HAS_RMON |
+                           FSL_GIANFAR_DEV_HAS_MULTI_INTR |
+                           FSL_GIANFAR_DEV_HAS_CSUM |
+                           FSL_GIANFAR_DEV_HAS_VLAN |
+                           FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
 
                ph = (phandle *) get_property(np, "phy-handle", NULL);
                phy = of_find_node_by_phandle(*ph);
 
                if (phy == NULL) {
                        ret = -ENODEV;
-                       goto gfar_unreg;
+                       goto unreg;
                }
 
                mdio = of_get_parent(phy);
@@ -174,7 +204,7 @@ static int __init gfar_of_init(void)
                if (ret) {
                        of_node_put(phy);
                        of_node_put(mdio);
-                       goto gfar_unreg;
+                       goto unreg;
                }
 
                gfar_data.phy_id = *id;
@@ -183,23 +213,22 @@ static int __init gfar_of_init(void)
                of_node_put(phy);
                of_node_put(mdio);
 
-               ret = platform_device_add_data(gfar_dev, &gfar_data, sizeof(struct gianfar_platform_data));
+               ret =
+                   platform_device_add_data(gfar_dev, &gfar_data,
+                                            sizeof(struct
+                                                   gianfar_platform_data));
                if (ret)
-                       goto gfar_unreg;
+                       goto unreg;
        }
 
        return 0;
 
-mdio_unreg:
-       platform_device_unregister(mdio_dev);
-mdio_err:
-       return ret;
-
-gfar_unreg:
+unreg:
        platform_device_unregister(gfar_dev);
-gfar_err:
+err:
        return ret;
 }
+
 arch_initcall(gfar_of_init);
 
 static int __init fsl_i2c_of_init(void)
@@ -209,17 +238,19 @@ static int __init fsl_i2c_of_init(void)
        struct platform_device *i2c_dev;
        int ret;
 
-       for (np = NULL, i = 0; (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; i++) {
+       for (np = NULL, i = 0;
+            (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
+            i++) {
                struct resource r[2];
                struct fsl_i2c_platform_data i2c_data;
-               unsigned char * flags = NULL;
+               unsigned char *flags = NULL;
 
                memset(&r, 0, sizeof(r));
                memset(&i2c_data, 0, sizeof(i2c_data));
 
                ret = of_address_to_resource(np, 0, &r[0]);
                if (ret)
-                       goto i2c_err;
+                       goto err;
 
                r[1].start = np->intrs[0].line;
                r[1].end = np->intrs[0].line;
@@ -228,7 +259,7 @@ static int __init fsl_i2c_of_init(void)
                i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2);
                if (IS_ERR(i2c_dev)) {
                        ret = PTR_ERR(i2c_dev);
-                       goto i2c_err;
+                       goto err;
                }
 
                i2c_data.device_flags = 0;
@@ -240,18 +271,22 @@ static int __init fsl_i2c_of_init(void)
                if (flags)
                        i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200;
 
-               ret = platform_device_add_data(i2c_dev, &i2c_data, sizeof(struct fsl_i2c_platform_data));
+               ret =
+                   platform_device_add_data(i2c_dev, &i2c_data,
+                                            sizeof(struct
+                                                   fsl_i2c_platform_data));
                if (ret)
-                       goto i2c_unreg;
+                       goto unreg;
        }
 
        return 0;
 
-i2c_unreg:
+unreg:
        platform_device_unregister(i2c_dev);
-i2c_err:
+err:
        return ret;
 }
+
 arch_initcall(fsl_i2c_of_init);
 
 #ifdef CONFIG_PPC_83xx
@@ -267,51 +302,192 @@ static int __init mpc83xx_wdt_init(void)
 
        if (!np) {
                ret = -ENODEV;
-               goto mpc83xx_wdt_nodev;
+               goto nodev;
        }
 
        soc = of_find_node_by_type(NULL, "soc");
 
        if (!soc) {
                ret = -ENODEV;
-               goto mpc83xx_wdt_nosoc;
+               goto nosoc;
        }
 
        freq = (unsigned int *)get_property(soc, "bus-frequency", NULL);
        if (!freq) {
                ret = -ENODEV;
-               goto mpc83xx_wdt_err;
+               goto err;
        }
 
        memset(&r, 0, sizeof(r));
 
        ret = of_address_to_resource(np, 0, &r);
        if (ret)
-               goto mpc83xx_wdt_err;
+               goto err;
 
        dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1);
        if (IS_ERR(dev)) {
                ret = PTR_ERR(dev);
-               goto mpc83xx_wdt_err;
+               goto err;
        }
 
        ret = platform_device_add_data(dev, freq, sizeof(int));
        if (ret)
-               goto mpc83xx_wdt_unreg;
+               goto unreg;
 
        of_node_put(soc);
        of_node_put(np);
 
        return 0;
 
-mpc83xx_wdt_unreg:
+unreg:
        platform_device_unregister(dev);
-mpc83xx_wdt_err:
+err:
        of_node_put(soc);
-mpc83xx_wdt_nosoc:
+nosoc:
        of_node_put(np);
-mpc83xx_wdt_nodev:
+nodev:
        return ret;
 }
+
 arch_initcall(mpc83xx_wdt_init);
 #endif
+
+static enum fsl_usb2_phy_modes determine_usb_phy(char * phy_type)
+{
+       if (!phy_type)
+               return FSL_USB2_PHY_NONE;
+       if (!strcasecmp(phy_type, "ulpi"))
+               return FSL_USB2_PHY_ULPI;
+       if (!strcasecmp(phy_type, "utmi"))
+               return FSL_USB2_PHY_UTMI;
+       if (!strcasecmp(phy_type, "utmi_wide"))
+               return FSL_USB2_PHY_UTMI_WIDE;
+       if (!strcasecmp(phy_type, "serial"))
+               return FSL_USB2_PHY_SERIAL;
+
+       return FSL_USB2_PHY_NONE;
+}
+
+static int __init fsl_usb_of_init(void)
+{
+       struct device_node *np;
+       unsigned int i;
+       struct platform_device *usb_dev;
+       int ret;
+
+       for (np = NULL, i = 0;
+            (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
+            i++) {
+               struct resource r[2];
+               struct fsl_usb2_platform_data usb_data;
+               unsigned char *prop = NULL;
+
+               memset(&r, 0, sizeof(r));
+               memset(&usb_data, 0, sizeof(usb_data));
+
+               ret = of_address_to_resource(np, 0, &r[0]);
+               if (ret)
+                       goto err;
+
+               r[1].start = np->intrs[0].line;
+               r[1].end = np->intrs[0].line;
+               r[1].flags = IORESOURCE_IRQ;
+
+               usb_dev =
+                   platform_device_register_simple("fsl-usb2-mph", i, r, 2);
+               if (IS_ERR(usb_dev)) {
+                       ret = PTR_ERR(usb_dev);
+                       goto err;
+               }
+
+               usb_dev->dev.coherent_dma_mask = 0xffffffffUL;
+               usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask;
+
+               usb_data.operating_mode = FSL_USB2_MPH_HOST;
+
+               prop = get_property(np, "port0", NULL);
+               if (prop)
+                       usb_data.port_enables |= FSL_USB2_PORT0_ENABLED;
+
+               prop = get_property(np, "port1", NULL);
+               if (prop)
+                       usb_data.port_enables |= FSL_USB2_PORT1_ENABLED;
+
+               prop = get_property(np, "phy_type", NULL);
+               usb_data.phy_mode = determine_usb_phy(prop);
+
+               ret =
+                   platform_device_add_data(usb_dev, &usb_data,
+                                            sizeof(struct
+                                                   fsl_usb2_platform_data));
+               if (ret)
+                       goto unreg;
+       }
+
+       return 0;
+
+unreg:
+       platform_device_unregister(usb_dev);
+err:
+       return ret;
+}
+
+arch_initcall(fsl_usb_of_init);
+
+static int __init fsl_usb_dr_of_init(void)
+{
+       struct device_node *np;
+       unsigned int i;
+       struct platform_device *usb_dev;
+       int ret;
+
+       for (np = NULL, i = 0;
+            (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
+            i++) {
+               struct resource r[2];
+               struct fsl_usb2_platform_data usb_data;
+               unsigned char *prop = NULL;
+
+               memset(&r, 0, sizeof(r));
+               memset(&usb_data, 0, sizeof(usb_data));
+
+               ret = of_address_to_resource(np, 0, &r[0]);
+               if (ret)
+                       goto err;
+
+               r[1].start = np->intrs[0].line;
+               r[1].end = np->intrs[0].line;
+               r[1].flags = IORESOURCE_IRQ;
+
+               usb_dev =
+                   platform_device_register_simple("fsl-usb2-dr", i, r, 2);
+               if (IS_ERR(usb_dev)) {
+                       ret = PTR_ERR(usb_dev);
+                       goto err;
+               }
+
+               usb_dev->dev.coherent_dma_mask = 0xffffffffUL;
+               usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask;
+
+               usb_data.operating_mode = FSL_USB2_DR_HOST;
+
+               prop = get_property(np, "phy_type", NULL);
+               usb_data.phy_mode = determine_usb_phy(prop);
+
+               ret =
+                   platform_device_add_data(usb_dev, &usb_data,
+                                            sizeof(struct
+                                                   fsl_usb2_platform_data));
+               if (ret)
+                       goto unreg;
+       }
+
+       return 0;
+
+unreg:
+       platform_device_unregister(usb_dev);
+err:
+       return ret;
+}
+
+arch_initcall(fsl_usb_dr_of_init);
index a7ce7da8785c4c2ef256dd8144f9e2aa4cff7126..a60c9d18bb7f2e8cae30dc9bd789d3b610e34fd4 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/ipic.h
- *
  * IPIC private definitions and structure.
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 7d02fa2a899029d3df4023ef804f4b14588b539c..4735b41c113c7d7814a1ecff82451cb69d2f05b2 100644 (file)
@@ -191,6 +191,7 @@ Commands:\n\
   di   dump instructions\n\
   df   dump float values\n\
   dd   dump double values\n\
+  dr   dump stream of raw bytes\n\
   e    print exception information\n\
   f    flush cache\n\
   la   lookup symbol+offset of specified address\n\
@@ -1938,6 +1939,28 @@ bsesc(void)
        return c;
 }
 
+static void xmon_rawdump (unsigned long adrs, long ndump)
+{
+       long n, m, r, nr;
+       unsigned char temp[16];
+
+       for (n = ndump; n > 0;) {
+               r = n < 16? n: 16;
+               nr = mread(adrs, temp, r);
+               adrs += nr;
+               for (m = 0; m < r; ++m) {
+                       if (m < nr)
+                               printf("%.2x", temp[m]);
+                       else
+                               printf("%s", fault_chars[fault_type]);
+               }
+               n -= r;
+               if (nr < r)
+                       break;
+       }
+       printf("\n");
+}
+
 #define isxdigit(c)    (('0' <= (c) && (c) <= '9') \
                         || ('a' <= (c) && (c) <= 'f') \
                         || ('A' <= (c) && (c) <= 'F'))
@@ -1960,6 +1983,13 @@ dump(void)
                        nidump = MAX_DUMP;
                adrs += ppc_inst_dump(adrs, nidump, 1);
                last_cmd = "di\n";
+       } else if (c == 'r') {
+               scanhex(&ndump);
+               if (ndump == 0)
+                       ndump = 64;
+               xmon_rawdump(adrs, ndump);
+               adrs += ndump;
+               last_cmd = "dr\n";
        } else {
                scanhex(&ndump);
                if (ndump == 0)
index 8ace2a1f3b488f1c3b3dcfbf1b2a22da613e395b..98b25fa0049a2cbf561bee7400046f23b7976c1a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/4xx_io/serial_sicc.c
- *
  *  Driver for IBM STB3xxx SICC serial port
  *
  *  Based on drivers/char/serial_amba.c, by ARM Ltd.
@@ -1639,9 +1637,8 @@ static struct SICC_info *siccuart_get(int line)
     state->count++;
     if (state->info)
         return state->info;
-    info = kmalloc(sizeof(struct SICC_info), GFP_KERNEL);
+    info = kzalloc(sizeof(struct SICC_info), GFP_KERNEL);
     if (info) {
-        memset(info, 0, sizeof(struct SICC_info));
         init_waitqueue_head(&info->open_wait);
         init_waitqueue_head(&info->close_wait);
         init_waitqueue_head(&info->delta_msr_wait);
index 579cd40258b97750d61413246af840bc75c4ad6b..12b84ca51327f570d8becc0696c0cd405f2edadc 100644 (file)
@@ -73,7 +73,7 @@ cpm_mask_irq(unsigned int irq)
 {
        int cpm_vec = irq - CPM_IRQ_OFFSET;
 
-       out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) & ~(1 << cpm_vec));
+       clrbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec));
 }
 
 static void
@@ -81,7 +81,7 @@ cpm_unmask_irq(unsigned int irq)
 {
        int cpm_vec = irq - CPM_IRQ_OFFSET;
 
-       out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) | (1 << cpm_vec));
+       setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec));
 }
 
 static void
@@ -198,7 +198,7 @@ cpm_interrupt_init(void)
        if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction))
                panic("Could not allocate CPM error IRQ!");
 
-       out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr) | CICR_IEN);
+       setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, CICR_IEN);
 }
 
 /*
index 11899f06bf06b4657d1a6983d68867013acc577c..54a0a9bb12ddd1d6dfbbd790dce465e2226d162d 100644 (file)
@@ -481,6 +481,53 @@ config WINCEPT
 
 endchoice
 
+menu "Freescale Ethernet driver platform-specific options"
+       depends on FS_ENET
+
+       config MPC8xx_SECOND_ETH
+       bool "Second Ethernet channel"
+       depends on (MPC885ADS || MPC86XADS)
+       default y
+       help
+         This enables support for second Ethernet on MPC885ADS and MPC86xADS boards.
+         The latter will use SCC1, for 885ADS you can select it below.
+
+       choice
+               prompt "Second Ethernet channel"
+               depends on MPC8xx_SECOND_ETH
+               default MPC8xx_SECOND_ETH_FEC2
+
+               config MPC8xx_SECOND_ETH_FEC2
+               bool "FEC2"
+               depends on MPC885ADS
+               help
+                 Enable FEC2 to serve as 2-nd Ethernet channel. Note that SMC2
+                 (often 2-nd UART) will not work if this is enabled.
+
+               config MPC8xx_SECOND_ETH_SCC1
+               bool "SCC1"
+               depends on MPC86XADS
+               select MPC8xx_SCC_ENET_FIXED
+               help
+                 Enable SCC1 to serve as 2-nd Ethernet channel. Note that SMC1
+                 (often 1-nd UART) will not work if this is enabled.
+
+               config MPC8xx_SECOND_ETH_SCC3
+               bool "SCC3"
+               depends on MPC885ADS
+               help
+                 Enable SCC3 to serve as 2-nd Ethernet channel. Note that SMC1
+                 (often 1-nd UART) will not work if this is enabled.
+
+       endchoice
+
+       config MPC8xx_SCC_ENET_FIXED
+       depends on MPC8xx_SECOND_ETH_SCC
+       default n
+       bool "Use fixed MII-less mode for SCC Ethernet"
+
+endmenu
+
 choice
        prompt "Machine Type"
        depends on 6xx || POWER3
index 61653cb60c4e3f01f294f0dd04301446d5049a1d..8cc75abf3d834ff80aa604f53ffb334c7dcde7d9 100644 (file)
@@ -67,7 +67,7 @@ config SERIAL_TEXT_DEBUG
 
 config PPC_OCP
        bool
-       depends on IBM_OCP || XILINX_OCP
+       depends on IBM_OCP
        default y
 
 endmenu
index 5f35cf3986f768c186a269bbc0ec048e67cba824..b2bba052ab934af82bda92dc5650d46ab6fbf6a3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * arch/ppc/amiga/amiints.c -- Amiga Linux interrupt handling code
+ * Amiga Linux interrupt handling code
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file COPYING in the main directory of this archive
index e2e965661d03f17367b59f792df7bf9dd79394b3..efd869a3ed9be397ce7092fb3052860b49393958 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/amiga/bootinfo.c
- *
  *  Extracted from arch/m68k/kernel/setup.c.
  *  Should be properly generalized and put somewhere else.
  *                              Jesper
index 4431c58f611a95764ea2a6ed6f10f125e4014f60..9558f2f40e64673083adba2a3f8337e3dfd8e187 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/amiga/cia.c - CIA support
- *
  *  Copyright (C) 1996 Roman Zippel
  *
  *  The concept of some functions bases on the original Amiga OS function
index 60e2da1c92c07a79f47c387fe75059b7f1d61657..bbe47c9bd707cf25f0cbc36b8f83360ebc09582e 100644 (file)
@@ -1,8 +1,6 @@
 #define m68k_debug_device debug_device
 
 /*
- *  arch/ppc/amiga/config.c
- *
  *  Copyright (C) 1993 Hamish Macdonald
  *
  * This file is subject to the terms and conditions of the GNU General Public
index 5d318e498f06f7ece7fba335be1db7cde9952da1..083a174621909197343af4aebc578358416981be 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/amiga/ints.c
- *
  *  Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c
  *  Needed to drive the m68k emulating IRQ hardware on the PowerUp boards.
  */
index efd8ce515d5fb332e8afacfabc60b958b2e55c05..f565699a9fe0d60c081a916643dd3111b4222b41 100644 (file)
@@ -1,6 +1,3 @@
-#
-# arch/ppc/boot/Makefile
-#
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
index f88d647d5dd4cd87d51415f4cb1ea9abe890117b..a2e85e3beb880418cee3f10b80df3ebe338bac95 100644 (file)
@@ -1,6 +1,3 @@
-#
-# arch/ppc/boot/common/Makefile
-#
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
index 9c6e528940e90fc2367b272f58b5eca04c049700..f4dc9b9fab9c1d8e5110bec55fe57a82b87c8c9b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/common/bootinfo.c
- *
  * General bootinfo record utilities
  * Author: Randy Vinson <rvinson@mvista.com>
  *
index e79e6b3f276ec8d01f52d91d3f5b2b3e705c2854..073830a8559ac5c7d2f3f7857bda20f3d767d2d9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/common/misc-common.c
- *
  * Misc. bootloader code (almost) all platforms can use
  *
  * Author: Johnnie Peters <jpeters@mvista.com>
index 26818bbb6cfff6fe14657415f0899d957780ebc0..4f00c93ac870240cac5807aadb8c29c15120198c 100644 (file)
@@ -8,6 +8,9 @@
 #include <linux/serial_reg.h>
 #include <asm/serial.h>
 
+#if defined(CONFIG_XILINX_VIRTEX)
+#include <platforms/4xx/xparameters/xparameters.h>
+#endif
 #include "nonstdio.h"
 #include "serial.h"
 
index 03dfaa01fa63ded1995861424fff3ff3300abeff..5cc9ae66a8ba4425cf3efed3b507bd57a5405faa 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/common/serial_stub.c
- *
  * This is a few stub routines to make the boot code cleaner looking when
  * there is no serial port support doesn't need to be closed, for example.
  *
index 368ec035e6cd988986c0c590ede9dd2090cdf276..0c5e43c4ae06c39fdbce750fde4707c3a27d9e14 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/common/util.S
- *
  * Useful bootup functions, which are more easily done in asm than C.
  *
  * NOTE:  Be very very careful about the registers you use here.
index 6cd40ecabc748290c9b65016d283f75971be7f40..6e5d540d8d3e528ab441f0031830e3c53c46e094 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/include/mpc10.h
- *
  * Common defines for the Motorola SPS MPC106/8240/107 Host bridge/Mem
  * ctrl/EPIC/etc.
  *
index 9533f8de238ffc07471fbf3744abf29aca4f3d64..28be01b99c44b7837a73d135619ddca48f3eb394 100644 (file)
@@ -192,6 +192,7 @@ boot-$(CONFIG_8xx)          += embed_config.o
 boot-$(CONFIG_8260)            += embed_config.o
 boot-$(CONFIG_EP405)           += embed_config.o
 boot-$(CONFIG_XILINX_ML300)    += embed_config.o
+boot-$(CONFIG_XILINX_ML403)    += embed_config.o
 boot-$(CONFIG_BSEIP)           += iic.o
 boot-$(CONFIG_MBX)             += iic.o pci.o qspan_pci.o
 boot-$(CONFIG_MV64X60)         += misc-mv64x60.o
index 8c75cf6c238395a2c4e4abe550777b4f125a0353..d75420a45a59b8355fb3ab5ebf43f4efd29cb5e9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/common/cpc700_memory.c
- *
  * Find memory based upon settings in the CPC700 bridge
  *
  * Author: Dan Cox
index 491a691d10ccabb007b73f8b34de4dbc4f246f2e..3a51b1062940f5d2cf8ca26fcf460ce632201c5f 100644 (file)
@@ -21,6 +21,9 @@
 #ifdef CONFIG_40x
 #include <asm/io.h>
 #endif
+#ifdef CONFIG_XILINX_VIRTEX
+#include <platforms/4xx/xparameters/xparameters.h>
+#endif
 extern unsigned long timebase_period_ns;
 
 /* For those boards that don't provide one.
@@ -742,7 +745,7 @@ embed_config(bd_t **bdp)
 }
 #endif /* WILLOW */
 
-#ifdef CONFIG_XILINX_ML300
+#if defined(CONFIG_XILINX_ML300) || defined(CONFIG_XILINX_ML403)
 void
 embed_config(bd_t ** bdp)
 {
@@ -779,7 +782,7 @@ embed_config(bd_t ** bdp)
        timebase_period_ns = 1000000000 / bd->bi_tbfreq;
        /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */
 }
-#endif /* CONFIG_XILINX_ML300 */
+#endif /* CONFIG_XILINX_ML300 || CONFIG_XILINX_ML403 */
 
 #ifdef CONFIG_IBM_OPENBIOS
 /* This could possibly work for all treeboot roms.
index 5e4adc298bf9cdaf4aa12e655413a84fa1cdf190..160da1006ff8f5bca910a1b9d779b1a3aab79f54 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/head.S
- *
  * Initial board bringup code for many different boards.
  *
  * Author: Tom Rini
@@ -65,6 +63,13 @@ start_:
                         */
 #endif
 
+#if defined(CONFIG_XILINX_VIRTEX_4_FX)
+       /* PPC errata 213: only for Virtex-4 FX */
+       mfccr0  0
+       oris    0,0,0x50000000@h
+       mtccr0  0
+#endif
+
        mflr    r3      /* Save our actual starting address. */
 
        /* The following functions we call must not modify r3 or r4.....
index 0dce7f3557e4dbaecf9b81d6b34a65fb050ef6b1..b94e142ad8922023056b8add13fd8236ee6cd380 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-chestnut.c
- *
  * Setup for the IBM Chestnut (ibm-750fxgx_eval)
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
index 26860300fa090e9302570811475afad8ab768dc2..8a8614d11a32f0a7355dd03243931a062df984ab 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-cpci690.c
- *
  * Add birec data for Force CPCI690 board.
  *
  * Author: Mark A. Greer <source@mvista.com>
index 52ece6937a7ab4ad11c7f146b02b4e41f7b71746..2678c224af2237cadc79ff0fc27546a00816bd82 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-ev64260.c
- *
  * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board
  * with a GT64260 onboard.
  *
index cd1ccf2a1582f9f84b2403f00cac5f8a3e094330..a212b5b988cb0e9143581f266c714bf066e7e7e3 100644 (file)
@@ -1,5 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-ev64360.c
  * Copyright (C) 2005 Lee Nicks <allinux@gmail.com>
  *
  * Based on arch/ppc/boot/simple/misc-katana.c from:
index ec94a11bacac6d2320d9adbaaaf4d2ab874334d2..d97f2ee6f04ec4a80324c254446f645a65196762 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-katana.c
- *
  * Set up MPSC values to bootwrapper can prompt user.
  *
  * Author: Mark A. Greer <source@mvista.com>
index 258d4599fadc5b294322f9d3f11dcea4d3c7bff3..71ff20fd494a6d3c38dc3aac631c3d9f06a07561 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-mv64x60.c
- *
  * Relocate bridge's register base and call board specific routine.
  *
  * Author: Mark A. Greer <source@mvista.com>
index 75380ac416697123d39e32696d5aa73500a1a719..63def9d13d701347f0513c9bac3dc2efb55a447a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-prep.c
- *
  * Maintainer: Tom Rini <trini@kernel.crashing.org>
  *
  * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu>
index 569e0d4feeaf1cd864e51d95965bca33842abf09..0f302ea9c3d1f35752106dcf3b72c227d63fe573 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/misc-radstone_ppc7d.c
- *
  * Misc data for Radstone PPC7D board.
  *
  * Author: James Chapman <jchapman@katalix.com>
index d012c39278fdb6b3839449a550b69465ab2829c1..0cad2f557a1e814962c6cb1f85c6e844cb0e2835 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/spruce/misc.c
- *
  * Misc. bootloader code for IBM Spruce reference platform
  *
  * Authors: Johnnie Peters <jpeters@mvista.com>
index f415d6c62362ca84acece2c98ee6d99154fac9f2..3d78571ad94529b292cce24bdb9c01fd6d920558 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/simple/misc.c
- *
  * Misc. bootloader code for many machines.  This assumes you have are using
  * a 6xx/7xx/74xx CPU in your machine.  This assumes the chunk of memory
  * below 8MB is free.  Finally, it assumes you have a NS16550-style uart for
index 20d92a34ceb854e172b3cee797edbb7b1741ed8f..c24290823f7fb1994098c01563a6f9c1e398a584 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/common/mpc10x_common.c
- *
  * A routine to find out how much memory the machine has.
  *
  * Based on:
index 3acc6b7c0727cc5bc185187152e1c11c5d5783b3..1964493cf3bdc0337342202b06b0f0c18b75ad6c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/mpc52xx_tty.c
- *
  * Minimal serial functions needed to send messages out a MPC52xx
  * Programmable Serial Controller (PSC).
  *
index b9c24d4c738bb56005c22226afa8cc33378cd9e7..0c52f5c784a2eee9e2a91e6a70007e14a23789b0 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/mv64x60_tty.c
- *
  * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60.
  * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA).
  *
index 81f11d8b30a7ad80a426e348dc86715311bd70f3..3f2ed53f793ae880578ac23f3179c253e6013154 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/openbios.c
- *
  * Copyright (c) 2005 DENX Software Engineering
  * Stefan Roese <sr@denx.de>
  *
index 555a216ccc4926b2e22292c38926d41c2b23a085..7efddc507564d63b26bb642b2e8162da6978d163 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/simple/relocate.S
- *
  * This is the common part of the loader relocation and initialization
  * process.  All of the board/processor specific initialization is
  * done before we get here.
index 886122283f39ae19ae0eab48c55874fb686bbd84..29115e01f60adc8956b8cdec751916ed558b615b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/boot/utils/mkbugboot.c
- *
  * Makes a Motorola PPCBUG ROM bootable image which can be flashed
  * into one of the FLASH banks on a Motorola PowerPlus board.
  *
diff --git a/arch/ppc/configs/ml300_defconfig b/arch/ppc/configs/ml300_defconfig
new file mode 100644 (file)
index 0000000..4a33aca
--- /dev/null
@@ -0,0 +1,739 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.16-rc1
+# Wed Jan 18 00:49:20 2006
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_LBD=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor
+#
+# CONFIG_6xx is not set
+CONFIG_40x=y
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+# CONFIG_MATH_EMULATION is not set
+# CONFIG_KEXEC is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_4xx=y
+# CONFIG_WANT_EARLY_SERIAL is not set
+
+#
+# IBM 4xx options
+#
+# CONFIG_BUBINGA is not set
+# CONFIG_CPCI405 is not set
+# CONFIG_EP405 is not set
+# CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
+# CONFIG_WALNUT is not set
+CONFIG_XILINX_ML300=y
+CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
+CONFIG_XILINX_VIRTEX=y
+CONFIG_EMBEDDEDBOOT=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_PPC_GEN550=y
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+CONFIG_NOT_COHERENT_CACHE=y
+
+#
+# Platform options
+#
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyS0,9600"
+# CONFIG_PM is not set
+# CONFIG_SOFTWARE_SUSPEND is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PCI is not set
+# CONFIG_PCI_DOMAINS is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_CONSISTENT_START=0xff100000
+CONFIG_CONSISTENT_SIZE=0x00200000
+CONFIG_BOOT_LOAD=0x00400000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=65536
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Macintosh device drivers
+#
+# CONFIG_WINDFARM is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=y
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+# CONFIG_IBM_EMAC is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+
+#
+# SN Devices
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# IBM 40x options
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_KGDB is not set
+CONFIG_XMON=y
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff --git a/arch/ppc/configs/ml403_defconfig b/arch/ppc/configs/ml403_defconfig
new file mode 100644 (file)
index 0000000..fafd251
--- /dev/null
@@ -0,0 +1,740 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.16-rc1
+# Wed Jan 18 01:11:41 2006
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_LBD=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor
+#
+# CONFIG_6xx is not set
+CONFIG_40x=y
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+# CONFIG_MATH_EMULATION is not set
+# CONFIG_KEXEC is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_4xx=y
+# CONFIG_WANT_EARLY_SERIAL is not set
+
+#
+# IBM 4xx options
+#
+# CONFIG_BUBINGA is not set
+# CONFIG_CPCI405 is not set
+# CONFIG_EP405 is not set
+# CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
+# CONFIG_WALNUT is not set
+# CONFIG_XILINX_ML300 is not set
+CONFIG_XILINX_ML403=y
+CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
+CONFIG_XILINX_VIRTEX=y
+CONFIG_EMBEDDEDBOOT=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_PPC_GEN550=y
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+CONFIG_NOT_COHERENT_CACHE=y
+
+#
+# Platform options
+#
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyS0,9600"
+# CONFIG_PM is not set
+# CONFIG_SOFTWARE_SUSPEND is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PCI is not set
+# CONFIG_PCI_DOMAINS is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_CONSISTENT_START=0xff100000
+CONFIG_CONSISTENT_SIZE=0x00200000
+CONFIG_BOOT_LOAD=0x00400000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=65536
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Macintosh device drivers
+#
+# CONFIG_WINDFARM is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=y
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+# CONFIG_IBM_EMAC is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+
+#
+# SN Devices
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# IBM 40x options
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_KGDB is not set
+CONFIG_XMON=y
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
index 677c571aa276385427153d099451de14db4488ee..0d8b88219d3880ac2e8d966a77850cfe99e8853a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/head_44x.S
- *
  * Kernel execution entry point code.
  *
  *    Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
index c1e89ad0684da8894aff0a326929e0676c4dd888..ec53c7d65f2b39e7a43a07d50d4d22d228523986 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/except_8xx.S
- *
  *  PowerPC version
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *  Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
index 8d60fa99fc4b992a402ec73dfa516b139f049d08..dd86bbed76271120c4f64ea39912e1e07d65a9e8 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/head_fsl_booke.S
- *
  * Kernel execution entry point code.
  *
  *    Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
@@ -316,6 +314,7 @@ skpinv:     addi    r6,r6,1                         /* Increment */
         */
        lis     r2,DBCR0_IDM@h
        mtspr   SPRN_DBCR0,r2
+       isync
        /* clear any residual debug events */
        li      r2,-1
        mtspr   SPRN_DBSR,r2
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu)
 _GLOBAL(abort)
        li      r13,0
         mtspr   SPRN_DBCR0,r13         /* disable all debug events */
+       isync
        mfmsr   r13
        ori     r13,r13,MSR_DE@l        /* Enable Debug Events */
        mtmsr   r13
+       isync
         mfspr   r13,SPRN_DBCR0
         lis    r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h
         mtspr   SPRN_DBCR0,r13
+       isync
 
 _GLOBAL(set_context)
 
index 2c9cd95bcea6d9eb3cecd613826763c8ec6c5d36..6a5694fcc711efefdc063e9b53d905b82a091dab 100644 (file)
@@ -126,8 +126,7 @@ smp_generic_give_timebase( void )
        printk("Synchronizing timebase\n");
 
        /* if this fails then this kernel won't work anyway... */
-       tbsync = kmalloc( sizeof(*tbsync), GFP_KERNEL );
-       memset( tbsync, 0, sizeof(*tbsync) );
+       tbsync = kzalloc( sizeof(*tbsync), GFP_KERNEL );
        mb();
        running = 1;
 
index 6d0a1838d94cc4badc79fd46552ef6f83be106cc..1c0d68026abd0b9e03381220a1339a9d681ae5b3 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/traps.c
- *
  *  Copyright (C) 1995-1996  Gary Thomas (gdt@linuxppc.org)
  *
  *  This program is free software; you can redistribute it and/or
index 42c5de2c898f28aaae69db9b370f3db0899ec8ef..31e511856dc58bc2b819e80c32a35840db5bd9ca 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/rheap.c
- *
  * A Remote Heap.  Remote means that we don't touch the memory that the
  * heap points to. Normal heap implementations use the memory they manage
  * to place their list. We cannot do that because the memory we manage may
index b7dff53a71031a3b3984071621a1875343aadd5c..5891534727617836c6ebfffdb958f95edf12c107 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/math-emu/math.c
- *
  * Copyright (C) 1999  Eddie C. Dost  (ecd@atecom.com)
  */
 
index 3d79ce281b677f52eb359f6067e945706cf963c4..e0152a9b26e68590950db9f96c9286d3e128fb75 100644 (file)
@@ -104,7 +104,7 @@ unsigned long __init mmu_mapin_ram(void)
 
        /* Determine number of entries necessary to cover lowmem */
        pinned_tlbs = (unsigned int)
-               (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT);
+               (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT);
 
        /* Write upper watermark to save location */
        tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs;
@@ -112,7 +112,7 @@ unsigned long __init mmu_mapin_ram(void)
        /* If necessary, set additional pinned TLBs */
        if (pinned_tlbs > 1)
                for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) {
-                       unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE;
+                       unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE;
                        ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr);
                }
 
index ee5e9f25baf98d7c567361739ee30864bb8c980d..0217188ef4656a44a37fedf98d06c38f34037dcf 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/mm/fault.c
- *
  *  PowerPC version
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *
index 3ec87c91343e8f2dac625d7391117b165170571d..f09fa88db35acc54a4ab882084266b901b34b1aa 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/hashtable.S
- *
  *  $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $
  *
  *  PowerPC version
index d8837911bbc6a473d90ae22d3c1c04f38dc90e3c..174ddbc9758bb10fe33607f3c913c0c05915304f 100644 (file)
@@ -57,6 +57,10 @@ config XILINX_ML300
        help
          This option enables support for the Xilinx ML300 evaluation board.
 
+config XILINX_ML403
+       bool "Xilinx-ML403"
+       help
+         This option enables support for the Xilinx ML403 evaluation board.
 endchoice
 
 choice
@@ -172,11 +176,6 @@ config IBM_OCP
        depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
        default y
 
-config XILINX_OCP
-       bool
-       depends on XILINX_ML300
-       default y
-
 config IBM_EMAC4
        bool
        depends on 440GX || 440SP || 440SPE
@@ -208,11 +207,21 @@ config 405GPR
        depends on SYCAMORE
        default y
 
-config VIRTEX_II_PRO
+config XILINX_VIRTEX_II_PRO
        bool
        depends on XILINX_ML300
        default y
 
+config XILINX_VIRTEX_4_FX
+       bool
+       depends on XILINX_ML403
+       default y
+
+config XILINX_VIRTEX
+       bool
+       depends on XILINX_VIRTEX_II_PRO || XILINX_VIRTEX_4_FX
+       default y
+
 config STB03xxx
        bool
        depends on REDWOOD_5 || REDWOOD_6
@@ -220,7 +229,7 @@ config STB03xxx
 
 config EMBEDDEDBOOT
        bool
-       depends on EP405 || XILINX_ML300
+       depends on EP405 || XILINX_ML300 || XILINX_ML403
        default y
 
 config IBM_OPENBIOS
index c9bb6117095477144a43f26487a338536e0f683a..a04a0d0a0f5cd6b7670e0af81890a76b6e0bf2aa 100644 (file)
@@ -14,6 +14,7 @@ obj-$(CONFIG_REDWOOD_6)               += redwood6.o
 obj-$(CONFIG_SYCAMORE)         += sycamore.o
 obj-$(CONFIG_WALNUT)           += walnut.o
 obj-$(CONFIG_XILINX_ML300)     += xilinx_ml300.o
+obj-$(CONFIG_XILINX_ML403)     += xilinx_ml403.o
 
 obj-$(CONFIG_405GP)            += ibm405gp.o
 obj-$(CONFIG_REDWOOD_5)                += ibmstb4.o
@@ -26,4 +27,5 @@ obj-$(CONFIG_440SP)           += ibm440sp.o
 obj-$(CONFIG_440SPE)           += ppc440spe.o
 obj-$(CONFIG_405EP)            += ibm405ep.o
 obj-$(CONFIG_405GPR)           += ibm405gpr.o
-obj-$(CONFIG_VIRTEX_II_PRO)    += virtex-ii_pro.o
+obj-$(CONFIG_XILINX_VIRTEX)    += virtex.o
+
index 0ec53f04933871548acdbb2925037caa73a4a32a..b940cfd646c2af5783d3c87924454ab7393ba5d2 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/bamboo.c
- *
  * Bamboo board specific routines
  *
  * Wade Farnsworth <wfarnsworth@mvista.com>
index 5c01928264941ad0a227c38e693a4facd7d4cfe8..31c0dd6a26cb735b15f405a869bac732bdd91d61 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/bamboo.h
- *
  * Bamboo board definitions
  *
  * Wade Farnsworth <wfarnsworth@mvista.com>
index b5380cfaf5c0cae05aea52094746d1e568654332..606aa9fa5caa80547db202cae8bf3ace2440e778 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/bubinga.h
- *
  * Bubinga board definitions
  *
  * Copyright (c) 2005 DENX Software Engineering
index ff966773a0bf3d7df32114c7e6ca289dc83a271c..6571e39fbe48cefca99bb13332744e5c1c9711cf 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/cpci405.c
- *
  * Board setup routines for the esd CPCI-405 cPCI Board.
  *
  * Author: Stefan Roese
index 9a828b623417d3c3fc0890a18792dca6b75f055b..b4ecb9c798541e4cea57accaff4a3c1736f1c035 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ebony.c
- *
  * Ebony board specific routines
  *
  * Matt Porter <mporter@kernel.crashing.org>
index b91ad4272dfe2b299b253eba92bcef4c38728a8b..27b2e77c7c8375417261ccfc5ddbb4a34813fd4d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ebony.h
- *
  * Ebony board definitions
  *
  * Matt Porter <mporter@mvista.com>
index 26a07cdb30ec8ef7e0565d7c598d13b0f8ed1f7d..6efa91ff9c073efd0dd3b8ca2ce3242641fb1431 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ep405.c
- *
  * Embedded Planet 405GP board
  * http://www.embeddedplanet.com
  *
index ea3eb21338fbb0e711f569442e9b96a4c22d7a66..9814fc431725545204de79e567f0fa70e7330ec8 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ep405.h
- *
  * Embedded Planet 405GP board
  * http://www.embeddedplanet.com
  *
index 093b28d27a413dbe778be1b7d4b5384e2b94ff88..55af769a6e70854e5000017973a75b4f35924a53 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ibm405ep.c
- *
  * Support for IBM PPC 405EP processors.
  *
  * Author: SAW (IBM), derived from ibmnp405l.c.
index e051e3fe8c633ae9d2616b94745a367660af7a53..fe46640de15209244f7512d6eee8857e093ed1cb 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm405ep.h
- *
  * IBM PPC 405EP processor defines.
  *
  * Author: SAW (IBM), derived from ibm405gp.h.
index b2b642e81af7c37a779887c9b83f27ed20557044..eaf0ef57028d2066cf828f65811028bd5c5c44f0 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm405gp.h
- *
  * Author: Armin Kuster akuster@mvista.com
  *
  * 2001 (c) MontaVista, Software, Inc.  This file is licensed under
index cd0d00d8e8ee51fb22e8df9619cf571835a977cc..49da61f6854a08e95c3c111b4db92fcaf11c16ac 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm405gpr.c
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2002 (c) MontaVista, Software, Inc.  This file is licensed under
index 45412fb4368fce74d29ae2060c7e9d0cad350301..e90c5dde01d35d0a2faaa7e9023f4ac5ef408338 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm405gpr.h
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2002 (c) MontaVista, Software, Inc.  This file is licensed under
index 65ac0b9c2d05d8c9ccce0ec77af579d4066205bf..1fed6638c81fe8e5954c501b1f3cfc63fd03bb55 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440ep.c
- *
  * PPC440EP I/O descriptions
  *
  * Wade Farnsworth <wfarnsworth@mvista.com>
index 97c80b8e3e10878f0a3c0e4f32ffa24bdfe6fd1d..61717e8a799e968ee67aee04bf408608faf96b2c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440ep.h
- *
  * PPC440EP definitions
  *
  * Wade Farnsworth <wfarnsworth@mvista.com>
index d926245e8b3ebf013e61b1da0831adea976b3018..b67a72e5c6fe8570c7ca391c4a83b71b16fdaf6d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440gp.c
- *
  * PPC440GP I/O descriptions
  *
  * Matt Porter <mporter@mvista.com>
index ae1efc03b2954055552506f46bf07ba485d29416..7b2763b6024f761d4db9381c7d6d15246e6bd752 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440gp.h
- *
  * PPC440GP definitions
  *
  * Roland Dreier <roland@digitalvampire.org>
index d24c09ee7b18052ccf4868b6ed963731a9003990..685abffcb6cee1a7ba5aa715060b09aa8ec4d32f 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440gx.c
- *
  * PPC440GX I/O descriptions
  *
  * Matt Porter <mporter@mvista.com>
index 0b59d8dcd03ccbe9ba8185ead5444a1d8ec0c245..070a34efe1c7c56aeee65e1c217b5c0688649564 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ibm440gx.h
- *
  * PPC440GX definitions
  *
  * Matt Porter <mporter@mvista.com>
index 71a0117d3597e1643cfa38fe2314a3692255fa80..de8f7ac5623c1eca02dd5ce14535fc22a6c4c55f 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440sp.c
- *
  * PPC440SP I/O descriptions
  *
  * Matt Porter <mporter@kernel.crashing.org>
index c71e46a18b9e1a4fda64a14fdbd2e9be7c7e1827..77e8bb22c527f64640162a89169066a60c84be7a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440sp.h
- *
  * PPC440SP definitions
  *
  * Matt Porter <mporter@kernel.crashing.org>
index a477a78f4902956920bfb8d5985f861992e0229f..f1dcb0ac15b79463453156b69447a7d47b378eca 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibmnp405h.c
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2000-2002 (c) MontaVista, Software, Inc.  This file is licensed under
index e2c2b06128c88f99313e5345782ea0b40714595a..2c683f6aaa6699ab81d9113db55f9b7a685b94bf 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibmnp405h.h
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2002 (c) MontaVista, Software, Inc.  This file is licensed under
index 7e33bb635443e8c2ad459d5cb0a605691d23cb9a..799a2eccccc3912d5beeb37c4cc14309eee3a9e9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibmstb4.c
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2000-2001 (c) MontaVista, Software, Inc.  This file is licensed under
index 9f21d4c88a3d21a84d8b721b29315bbab49cc2b4..9de4265973510a7fdd655b1ac844ad7190c794ac 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibmstb4.h
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2001 (c) MontaVista, Software, Inc.  This file is licensed under
index b895b9cca57dd47ae2ab43ad8baeb39ec0366d59..090ddcbecc5e7f06316ec9cc0523720a81f67b46 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibmstbx25.c
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2000-2002 (c) MontaVista, Software, Inc.  This file is licensed under
index 9a2efc366e9c617627c323ae5b902b4c3426a39a..6884a49d3482203fea9c27fd9e3ad75cac73459b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibmstbx25.h
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2002 (c) MontaVista, Software, Inc.  This file is licensed under
index 21d29132aebd97456c20f062724d9b827d701441..5c37de28e13520160ce60a9adb7d0db320116eed 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/luan.c
- *
  * Luan board specific routines
  *
  * Matt Porter <mporter@kernel.crashing.org>
index bbe7d0766db8acde12b746af50e67c6d6e0f735a..e0db6a810febb4bc6d3fea98848ecdf147cfe24a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/luan.h
- *
  * Luan board definitions
  *
  * Matt Porter <mporter@kernel.crashing.org>
index 4f355b6acab2b29214543dc641ef863eb410321c..f841972f1fa9204238a49dd841c70839601d46c6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ocotea.c
- *
  * Ocotea board specific routines
  *
  * Matt Porter <mporter@kernel.crashing.org>
index 33251153ac5fff23187de3ecc48d6ec7e5c1f844..7c799a9ff82b409675157fc59f0fafff0d84dbe5 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ocotea.h
- *
  * Ocotea board definitions
  *
  * Matt Porter <mporter@kernel.crashing.org>
index 6139a0b3393e15291e84d77ce7fe11861d20edb8..1be5d1c8e266db92428cae4c4df222ed629816e4 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ppc440spe.c
- *
  * PPC440SPe I/O descriptions
  *
  * Roland Dreier <rolandd@cisco.com>
index 2216846973b837d26c00c7d53a2a6eb144f409f5..d3a620ddcdee3d91cfaa4f8be5287d8d8b7ccad1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/ibm440spe.h
- *
  * PPC440SPe definitions
  *
  * Roland Dreier <rolandd@cisco.com>
index 611ac861804d31f814e460a2f86d3bc6e23a317d..53da2b4f7c24acfc01b57b656220ac467c2d57ce 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/redwood5.c
- *
  * Support for the IBM redwood5 eval board file
  *
  * Author: Armin Kuster <akuster@mvista.com>
index 264e34fb3fbd6f532bcb67d6528cebbb87ef5d35..49edd4818970968bc9727cfaa3a8a5f83a081e2b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/redwood5.h
- *
  * Macros, definitions, and data structures specific to the IBM PowerPC
  * STB03xxx "Redwood" evaluation board.
  *
index b13116691289fa19171a45803afbb04b538911c5..41b27d106fa3b6304b8ab850b197d92aec99b849 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/redwood6.c
- *
  * Author: Armin Kuster <akuster@mvista.com>
  *
  * 2002 (c) MontaVista, Software, Inc.  This file is licensed under
index 1814b9f5fc3a2e393ac35d9ecb62b95325bf5189..1edcbe5c51c7f25e7f01c77656a69b52d982c6c6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/redwood6.h
- *
  * Macros, definitions, and data structures specific to the IBM PowerPC
  * STBx25xx "Redwood6" evaluation board.
  *
index 281b4a2ffb968ce55a46e2b4d9fc19ba9e9fb51b..bab31eb306874f54df052a2cde74b8b902e4f0b1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/sycamore.c
- *
  * Architecture- / platform-specific boot-time initialization code for
  * IBM PowerPC 4xx based boards.
  *
index 1cd6c824fd62efcde04c5de5bb5f8eb6e7be1f3b..dae01620227ddfb300976c0a81dee66438f08ee3 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/sycamore.h
- *
  * Sycamore board definitions
  *
  * Copyright (c) 2005 DENX Software Engineering
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.c b/arch/ppc/platforms/4xx/virtex-ii_pro.c
deleted file mode 100644 (file)
index 097cc9d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * arch/ppc/platforms/4xx/virtex-ii_pro.c
- *
- * Author: MontaVista Software, Inc.
- *         source@mvista.com
- *
- * 2002-2004 (c) MontaVista Software, Inc.  This file is licensed under the
- * terms of the GNU General Public License version 2.  This program is licensed
- * "as is" without any warranty of any kind, whether express or implied.
- */
-
-#include <linux/config.h>
-#include <linux/init.h>
-#include <asm/ocp.h>
-#include "virtex-ii_pro.h"
-
-/* Have OCP take care of the serial ports. */
-struct ocp_def core_ocp[] = {
-#ifdef XPAR_UARTNS550_0_BASEADDR
-       { .vendor       = OCP_VENDOR_XILINX,
-         .function     = OCP_FUNC_16550,
-         .index        = 0,
-         .paddr        = XPAR_UARTNS550_0_BASEADDR,
-         .irq          = XPAR_INTC_0_UARTNS550_0_VEC_ID,
-         .pm           = OCP_CPM_NA
-       },
-#ifdef XPAR_UARTNS550_1_BASEADDR
-       { .vendor       = OCP_VENDOR_XILINX,
-         .function     = OCP_FUNC_16550,
-         .index        = 1,
-         .paddr        = XPAR_UARTNS550_1_BASEADDR,
-         .irq          = XPAR_INTC_0_UARTNS550_1_VEC_ID,
-         .pm           = OCP_CPM_NA
-       },
-#ifdef XPAR_UARTNS550_2_BASEADDR
-       { .vendor       = OCP_VENDOR_XILINX,
-         .function     = OCP_FUNC_16550,
-         .index        = 2,
-         .paddr        = XPAR_UARTNS550_2_BASEADDR,
-         .irq          = XPAR_INTC_0_UARTNS550_2_VEC_ID,
-         .pm           = OCP_CPM_NA
-       },
-#ifdef XPAR_UARTNS550_3_BASEADDR
-       { .vendor       = OCP_VENDOR_XILINX,
-         .function     = OCP_FUNC_16550,
-         .index        = 3,
-         .paddr        = XPAR_UARTNS550_3_BASEADDR,
-         .irq          = XPAR_INTC_0_UARTNS550_3_VEC_ID,
-         .pm           = OCP_CPM_NA
-       },
-#ifdef XPAR_UARTNS550_4_BASEADDR
-#error Edit this file to add more devices.
-#endif                 /* 4 */
-#endif                 /* 3 */
-#endif                 /* 2 */
-#endif                 /* 1 */
-#endif                 /* 0 */
-       { .vendor       = OCP_VENDOR_INVALID
-       }
-};
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.h b/arch/ppc/platforms/4xx/virtex-ii_pro.h
deleted file mode 100644 (file)
index 9014c48..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * arch/ppc/platforms/4xx/virtex-ii_pro.h
- *
- * Include file that defines the Xilinx Virtex-II Pro processor
- *
- * Author: MontaVista Software, Inc.
- *         source@mvista.com
- *
- * 2002-2004 (c) MontaVista Software, Inc.  This file is licensed under the
- * terms of the GNU General Public License version 2.  This program is licensed
- * "as is" without any warranty of any kind, whether express or implied.
- */
-
-#ifdef __KERNEL__
-#ifndef __ASM_VIRTEXIIPRO_H__
-#define __ASM_VIRTEXIIPRO_H__
-
-#include <linux/config.h>
-#include <asm/xparameters.h>
-
-/* serial defines */
-
-#define RS_TABLE_SIZE  4       /* change this and add more devices below
-                                  if you have more then 4 16x50 UARTs */
-
-#define BASE_BAUD              (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16)
-
-/* The serial ports in the Virtex-II Pro have each I/O byte in the
- * LSByte of a word.  This means that iomem_reg_shift needs to be 2 to
- * change the byte offsets into word offsets.  In addition the base
- * addresses need to have 3 added to them to get to the LSByte.
- */
-#define STD_UART_OP(num)                                                \
-       { 0, BASE_BAUD, 0, XPAR_INTC_0_UARTNS550_##num##_VEC_ID,         \
-               ASYNC_BOOT_AUTOCONF,                                     \
-               .iomem_base = (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3, \
-               .iomem_reg_shift = 2,                                    \
-               .io_type = SERIAL_IO_MEM},
-
-#if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID)
-#define ML300_UART0 STD_UART_OP(0)
-#else
-#define ML300_UART0
-#endif
-
-#if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID)
-#define ML300_UART1 STD_UART_OP(1)
-#else
-#define ML300_UART1
-#endif
-
-#if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID)
-#define ML300_UART2 STD_UART_OP(2)
-#else
-#define ML300_UART2
-#endif
-
-#if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID)
-#define ML300_UART3 STD_UART_OP(3)
-#else
-#define ML300_UART3
-#endif
-
-#if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID)
-#error Edit this file to add more devices.
-#elif defined(XPAR_INTC_0_UARTNS550_3_VEC_ID)
-#define NR_SER_PORTS   4
-#elif defined(XPAR_INTC_0_UARTNS550_2_VEC_ID)
-#define NR_SER_PORTS   3
-#elif defined(XPAR_INTC_0_UARTNS550_1_VEC_ID)
-#define NR_SER_PORTS   2
-#elif defined(XPAR_INTC_0_UARTNS550_0_VEC_ID)
-#define NR_SER_PORTS   1
-#else
-#define NR_SER_PORTS   0
-#endif
-
-#if defined(CONFIG_UART0_TTYS0)
-#define SERIAL_PORT_DFNS       \
-       ML300_UART0             \
-       ML300_UART1             \
-       ML300_UART2             \
-       ML300_UART3
-#endif
-
-#if defined(CONFIG_UART0_TTYS1)
-#define SERIAL_PORT_DFNS       \
-       ML300_UART1             \
-       ML300_UART0             \
-       ML300_UART2             \
-       ML300_UART3
-#endif
-
-#define DCRN_CPMFR_BASE        0
-
-#include <asm/ibm405.h>
-
-#endif                         /* __ASM_VIRTEXIIPRO_H__ */
-#endif                         /* __KERNEL__ */
diff --git a/arch/ppc/platforms/4xx/virtex.c b/arch/ppc/platforms/4xx/virtex.c
new file mode 100644 (file)
index 0000000..133a831
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Virtex-II Pro & Virtex-4 FX common infrastructure
+ *
+ * Maintainer: Grant Likely <grant.likely@secretlab.ca>
+ *
+ * Copyright 2005 Secret Lab Technologies Ltd.
+ * Copyright 2005 General Dynamics Canada Ltd.
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/serial_8250.h>
+#include <asm/ppc_sys.h>
+#include <platforms/4xx/virtex.h>
+#include <platforms/4xx/xparameters/xparameters.h>
+
+#define XPAR_UART(num) { \
+               .mapbase  = XPAR_UARTNS550_##num##_BASEADDR + 3, \
+               .irq      = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \
+               .iotype   = UPIO_MEM, \
+               .uartclk  = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \
+               .flags    = UPF_BOOT_AUTOCONF, \
+               .regshift = 2, \
+       }
+
+struct plat_serial8250_port serial_platform_data[] = {
+#ifdef XPAR_UARTNS550_0_BASEADDR
+       XPAR_UART(0),
+#endif
+#ifdef XPAR_UARTNS550_1_BASEADDR
+       XPAR_UART(1),
+#endif
+#ifdef XPAR_UARTNS550_2_BASEADDR
+       XPAR_UART(2),
+#endif
+#ifdef XPAR_UARTNS550_3_BASEADDR
+       XPAR_UART(3),
+#endif
+       { }, /* terminated by empty record */
+};
+
+struct platform_device ppc_sys_platform_devices[] = {
+       [VIRTEX_UART] = {
+               .name           = "serial8250",
+               .id             = 0,
+               .dev.platform_data = serial_platform_data,
+       },
+};
+
diff --git a/arch/ppc/platforms/4xx/virtex.h b/arch/ppc/platforms/4xx/virtex.h
new file mode 100644 (file)
index 0000000..c14325d
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * arch/ppc/platforms/4xx/virtex.h
+ *
+ * Include file that defines the Xilinx Virtex-II Pro processor
+ *
+ * Author: MontaVista Software, Inc.
+ *         source@mvista.com
+ *
+ * 2002-2004 (c) MontaVista Software, Inc.  This file is licensed under the
+ * terms of the GNU General Public License version 2.  This program is licensed
+ * "as is" without any warranty of any kind, whether express or implied.
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_VIRTEX_H__
+#define __ASM_VIRTEX_H__
+
+/* serial defines */
+
+#include <asm/ibm405.h>
+
+/* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */
+#if !defined(BASE_BAUD)
+ #define BASE_BAUD             (0) /* dummy value; not used */
+#endif
+  
+/* Device type enumeration for platform bus definitions */
+#ifndef __ASSEMBLY__
+enum ppc_sys_devices {
+       VIRTEX_UART, NUM_PPC_SYS_DEVS,
+};
+#endif
+  
+#endif                         /* __ASM_VIRTEX_H__ */
+#endif                         /* __KERNEL__ */
index 74cb33182d9fac8baf42f6c2a1b5e096c67ffd6e..6bd77902b9a417ec4d100e3f74337096bc60a54f 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/walnut.c
- *
  * Architecture- / platform-specific boot-time initialization code for
  * IBM PowerPC 4xx based boards. Adapted from original
  * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
index dcf2691698c029b9350993130f7dc58f07a1a432..f13a577f0a4192a13b74937a84d7602814089fc4 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/walnut.h
- *
  * Walnut board definitions
  *
  * Copyright (c) 2005 DENX Software Engineering
index e90d97f64f76c1a2d0e3e3978110fe210051869c..d97a7f269f978065fc69834b9522aa791fafd277 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/xilinx_ml300.c
- *
  * Xilinx ML300 evaluation board initialization
  *
  * Author: MontaVista Software, Inc.
 #include <linux/tty.h>
 #include <linux/serial.h>
 #include <linux/serial_core.h>
+#include <linux/serial_8250.h>
 #include <linux/serialP.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
-#include <asm/ocp.h>
+#include <asm/ppc_sys.h>
 
-#include <platforms/4xx/virtex-ii_pro.h>       /* for NR_SER_PORTS */
+#include <syslib/gen550.h>
+#include <platforms/4xx/xparameters/xparameters.h>
 
 /*
  * As an overview of how the following functions (platform_init,
  *          ppc4xx_pic_init                    arch/ppc/syslib/xilinx_pic.c
  */
 
+/* Board specifications structures */
+struct ppc_sys_spec *cur_ppc_sys_spec;
+struct ppc_sys_spec ppc_sys_specs[] = {
+       {
+               /* Only one entry, always assume the same design */
+               .ppc_sys_name   = "Xilinx ML300 Reference Design",
+               .mask           = 0x00000000,
+               .value          = 0x00000000,
+               .num_devices    = 1,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       VIRTEX_UART,
+               },
+       },
+};
+
 #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR)
 
 static volatile unsigned *powerdown_base =
@@ -80,28 +96,39 @@ ml300_map_io(void)
 #endif
 }
 
+/* Early serial support functions */
 static void __init
+ml300_early_serial_init(int num, struct plat_serial8250_port *pdata)
+{
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+       struct uart_port serial_req;
+
+       memset(&serial_req, 0, sizeof(serial_req));
+       serial_req.mapbase      = pdata->mapbase;
+       serial_req.membase      = pdata->membase;
+       serial_req.irq          = pdata->irq;
+       serial_req.uartclk      = pdata->uartclk;
+       serial_req.regshift     = pdata->regshift;
+       serial_req.iotype       = pdata->iotype;
+       serial_req.flags        = pdata->flags;
+       gen550_init(num, &serial_req);
+#endif
+}
+
+void __init
 ml300_early_serial_map(void)
 {
 #ifdef CONFIG_SERIAL_8250
-       struct serial_state old_ports[] = { SERIAL_PORT_DFNS };
-       struct uart_port port;
-       int i;
-
-       /* Setup ioremapped serial port access */
-       for (i = 0; i < ARRAY_SIZE(old_ports); i++ ) {
-               memset(&port, 0, sizeof(port));
-               port.membase = ioremap((phys_addr_t)(old_ports[i].iomem_base), 16);
-               port.irq = old_ports[i].irq;
-               port.uartclk = old_ports[i].baud_base * 16;
-               port.regshift = old_ports[i].iomem_reg_shift;
-               port.iotype = UPIO_MEM;
-               port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
-               port.line = i;
-
-               if (early_serial_setup(&port) != 0) {
-                       printk("Early serial init of port %d failed\n", i);
-               }
+       struct plat_serial8250_port *pdata;
+       int i = 0;
+
+       pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART);
+       while(pdata && pdata->flags)
+       {
+               pdata->membase = ioremap(pdata->mapbase, 0x100);
+               ml300_early_serial_init(i, pdata);
+               pdata++;
+               i++;
        }
 #endif /* CONFIG_SERIAL_8250 */
 }
@@ -109,9 +136,8 @@ ml300_early_serial_map(void)
 void __init
 ml300_setup_arch(void)
 {
-       ppc4xx_setup_arch();    /* calls ppc4xx_find_bridges() */
-
        ml300_early_serial_map();
+       ppc4xx_setup_arch();    /* calls ppc4xx_find_bridges() */
 
        /* Identify the system */
        printk(KERN_INFO "Xilinx Virtex-II Pro port\n");
@@ -131,6 +157,8 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 {
        ppc4xx_init(r3, r4, r5, r6, r7);
 
+       identify_ppc_sys_by_id(mfspr(SPRN_PVR));
+
        ppc_md.setup_arch = ml300_setup_arch;
        ppc_md.setup_io_mappings = ml300_map_io;
        ppc_md.init_IRQ = ml300_init_irq;
index f8c5884123364239b72fc4543e1e5e797f01ee17..3d57332ba820ba3296614251ea202c0251b657a8 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/xilinx_ml300.h
- *
  * Include file that defines the Xilinx ML300 evaluation board
  *
  * Author: MontaVista Software, Inc.
@@ -16,7 +14,7 @@
 #define __ASM_XILINX_ML300_H__
 
 /* ML300 has a Xilinx Virtex-II Pro processor */
-#include <platforms/4xx/virtex-ii_pro.h>
+#include <platforms/4xx/virtex.h>
 
 #ifndef __ASSEMBLY__
 
@@ -41,7 +39,7 @@ typedef struct board_info {
 #define PPC4xx_ONB_IO_VADDR    0u
 #define PPC4xx_ONB_IO_SIZE     0u
 
-#define PPC4xx_MACHINE_NAME "Xilinx ML300"
+#define PPC4xx_MACHINE_NAME "Xilinx ML300 Reference System"
 
 #endif /* __ASM_XILINX_ML300_H__ */
 #endif /* __KERNEL__ */
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c
new file mode 100644 (file)
index 0000000..4c0c7e4
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * arch/ppc/platforms/4xx/xilinx_ml403.c
+ *
+ * Xilinx ML403 evaluation board initialization
+ *
+ * Author: Grant Likely <grant.likely@secretlab.ca>
+ *
+ * 2005 (c) Secret Lab Technologies Ltd.
+ * 2002-2004 (c) MontaVista Software, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/tty.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <linux/serial_8250.h>
+#include <linux/serialP.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/ppc_sys.h>
+
+#include <syslib/gen550.h>
+#include <platforms/4xx/xparameters/xparameters.h>
+
+/*
+ * As an overview of how the following functions (platform_init,
+ * ml403_map_io, ml403_setup_arch and ml403_init_IRQ) fit into the
+ * kernel startup procedure, here's a call tree:
+ *
+ * start_here                                  arch/ppc/kernel/head_4xx.S
+ *  early_init                                 arch/ppc/kernel/setup.c
+ *  machine_init                               arch/ppc/kernel/setup.c
+ *    platform_init                            this file
+ *      ppc4xx_init                            arch/ppc/syslib/ppc4xx_setup.c
+ *        parse_bootinfo
+ *          find_bootinfo
+ *        "setup some default ppc_md pointers"
+ *  MMU_init                                   arch/ppc/mm/init.c
+ *    *ppc_md.setup_io_mappings == ml403_map_io        this file
+ *      ppc4xx_map_io                          arch/ppc/syslib/ppc4xx_setup.c
+ *  start_kernel                               init/main.c
+ *    setup_arch                               arch/ppc/kernel/setup.c
+ * #if defined(CONFIG_KGDB)
+ *      *ppc_md.kgdb_map_scc() == gen550_kgdb_map_scc
+ * #endif
+ *      *ppc_md.setup_arch == ml403_setup_arch this file
+ *        ppc4xx_setup_arch                    arch/ppc/syslib/ppc4xx_setup.c
+ *          ppc4xx_find_bridges                        arch/ppc/syslib/ppc405_pci.c
+ *    init_IRQ                                 arch/ppc/kernel/irq.c
+ *      *ppc_md.init_IRQ == ml403_init_IRQ     this file
+ *        ppc4xx_init_IRQ                      arch/ppc/syslib/ppc4xx_setup.c
+ *          ppc4xx_pic_init                    arch/ppc/syslib/xilinx_pic.c
+ */
+
+/* Board specifications structures */
+struct ppc_sys_spec *cur_ppc_sys_spec;
+struct ppc_sys_spec ppc_sys_specs[] = {
+       {
+               /* Only one entry, always assume the same design */
+               .ppc_sys_name   = "Xilinx ML403 Reference Design",
+               .mask           = 0x00000000,
+               .value          = 0x00000000,
+               .num_devices    = 1,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       VIRTEX_UART,
+               },
+       },
+};
+
+#if defined(XPAR_POWER_0_POWERDOWN_BASEADDR)
+
+static volatile unsigned *powerdown_base =
+    (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR;
+
+static void
+xilinx_power_off(void)
+{
+       local_irq_disable();
+       out_be32(powerdown_base, XPAR_POWER_0_POWERDOWN_VALUE);
+       while (1) ;
+}
+#endif
+
+void __init
+ml403_map_io(void)
+{
+       ppc4xx_map_io();
+
+#if defined(XPAR_POWER_0_POWERDOWN_BASEADDR)
+       powerdown_base = ioremap((unsigned long) powerdown_base,
+                                XPAR_POWER_0_POWERDOWN_HIGHADDR -
+                                XPAR_POWER_0_POWERDOWN_BASEADDR + 1);
+#endif
+}
+
+/* Early serial support functions */
+static void __init
+ml403_early_serial_init(int num, struct plat_serial8250_port *pdata)
+{
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+       struct uart_port serial_req;
+
+       memset(&serial_req, 0, sizeof(serial_req));
+       serial_req.mapbase      = pdata->mapbase;
+       serial_req.membase      = pdata->membase;
+       serial_req.irq          = pdata->irq;
+       serial_req.uartclk      = pdata->uartclk;
+       serial_req.regshift     = pdata->regshift;
+       serial_req.iotype       = pdata->iotype;
+       serial_req.flags        = pdata->flags;
+       gen550_init(num, &serial_req);
+#endif
+}
+
+void __init
+ml403_early_serial_map(void)
+{
+#ifdef CONFIG_SERIAL_8250
+       struct plat_serial8250_port *pdata;
+       int i = 0;
+
+       pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART);
+       while(pdata && pdata->flags)
+       {
+               pdata->membase = ioremap(pdata->mapbase, 0x100);
+               ml403_early_serial_init(i, pdata);
+               pdata++;
+               i++;
+       }
+#endif /* CONFIG_SERIAL_8250 */
+}
+
+void __init
+ml403_setup_arch(void)
+{
+       ml403_early_serial_map();
+       ppc4xx_setup_arch();    /* calls ppc4xx_find_bridges() */
+
+       /* Identify the system */
+       printk(KERN_INFO "Xilinx ML403 Reference System (Virtex-4 FX)\n");
+}
+
+/* Called after board_setup_irq from ppc4xx_init_IRQ(). */
+void __init
+ml403_init_irq(void)
+{
+       ppc4xx_init_IRQ();
+}
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+             unsigned long r6, unsigned long r7)
+{
+       ppc4xx_init(r3, r4, r5, r6, r7);
+
+       identify_ppc_sys_by_id(mfspr(SPRN_PVR));
+
+       ppc_md.setup_arch = ml403_setup_arch;
+       ppc_md.setup_io_mappings = ml403_map_io;
+       ppc_md.init_IRQ = ml403_init_irq;
+
+#if defined(XPAR_POWER_0_POWERDOWN_BASEADDR)
+       ppc_md.power_off = xilinx_power_off;
+#endif
+
+#ifdef CONFIG_KGDB
+       ppc_md.early_serial_map = ml403_early_serial_map;
+#endif
+}
+
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.h b/arch/ppc/platforms/4xx/xilinx_ml403.h
new file mode 100644 (file)
index 0000000..4735969
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * arch/ppc/platforms/4xx/xilinx_ml403.h
+ *
+ * Include file that defines the Xilinx ML403 reference design
+ *
+ * Author: Grant Likely <grant.likely@secretlab.ca>
+ *
+ * 2005 (c) Secret Lab Technologies Ltd.
+ * 2002-2004 (c) MontaVista Software, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_XILINX_ML403_H__
+#define __ASM_XILINX_ML403_H__
+
+/* ML403 has a Xilinx Virtex-4 FPGA with a PPC405 hard core */
+#include <platforms/4xx/virtex.h>
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+
+typedef struct board_info {
+       unsigned int     bi_memsize;            /* DRAM installed, in bytes */
+       unsigned char    bi_enetaddr[6];        /* Local Ethernet MAC address */
+       unsigned int     bi_intfreq;            /* Processor speed, in Hz */
+       unsigned int     bi_busfreq;            /* PLB Bus speed, in Hz */
+       unsigned int     bi_pci_busfreq;        /* PCI Bus speed, in Hz */
+} bd_t;
+
+/* Some 4xx parts use a different timebase frequency from the internal clock.
+*/
+#define bi_tbfreq bi_intfreq
+
+#endif /* !__ASSEMBLY__ */
+
+/* We don't need anything mapped.  Size of zero will accomplish that. */
+#define PPC4xx_ONB_IO_PADDR    0u
+#define PPC4xx_ONB_IO_VADDR    0u
+#define PPC4xx_ONB_IO_SIZE     0u
+
+#define PPC4xx_MACHINE_NAME "Xilinx ML403 Reference Design"
+
+#endif /* __ASM_XILINX_ML403_H__ */
+#endif /* __KERNEL__ */
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h
new file mode 100644 (file)
index 0000000..4cf21f2
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * include/asm-ppc/xparameters.h
+ *
+ * This file includes the correct xparameters.h for the CONFIG'ed board plus
+ * fixups to translate board specific XPAR values to a common set of names
+ *
+ * Author: MontaVista Software, Inc.
+ *         source@mvista.com
+ *
+ * 2004 (c) MontaVista Software, Inc.  This file is licensed under the terms
+ * of the GNU General Public License version 2.  This program is licensed
+ * "as is" without any warranty of any kind, whether express or implied.
+ */
+
+#include <linux/config.h>
+
+#if defined(CONFIG_XILINX_ML300)
+  #include "xparameters_ml300.h"
+#elif defined(CONFIG_XILINX_ML403)
+  #include "xparameters_ml403.h"
+#else
+  /* Add other board xparameter includes here before the #else */
+  #error No xparameters_*.h file included
+#endif
+
+#ifndef SERIAL_PORT_DFNS
+  /* zImage serial port definitions */
+  #define RS_TABLE_SIZE 1
+  #define SERIAL_PORT_DFNS {                                           \
+       .baud_base       = XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16,           \
+       .irq             = XPAR_INTC_0_UARTNS550_0_VEC_ID,              \
+       .flags           = ASYNC_BOOT_AUTOCONF,                         \
+       .iomem_base      = (u8 *)XPAR_UARTNS550_0_BASEADDR + 3,         \
+       .iomem_reg_shift = 2,                                           \
+       .io_type         = SERIAL_IO_MEM,                               \
+  },
+#endif
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h
new file mode 100644 (file)
index 0000000..5cacdcb
--- /dev/null
@@ -0,0 +1,243 @@
+
+/*******************************************************************
+*
+* CAUTION: This file is automatically generated by libgen.
+* Version: Xilinx EDK 7.1.2 EDK_H.12.5.1
+* DO NOT EDIT.
+*
+* Copyright (c) 2005 Xilinx, Inc.  All rights reserved. 
+* 
+* Description: Driver parameters
+*
+*******************************************************************/
+
+#define XPAR_PLB_BRAM_IF_CNTLR_0_BASEADDR 0xFFFF0000
+#define XPAR_PLB_BRAM_IF_CNTLR_0_HIGHADDR 0xFFFFFFFF
+
+/******************************************************************/
+
+#define XPAR_OPB_EMC_0_MEM0_BASEADDR 0x20000000
+#define XPAR_OPB_EMC_0_MEM0_HIGHADDR 0x200FFFFF
+#define XPAR_OPB_EMC_0_MEM1_BASEADDR 0x28000000
+#define XPAR_OPB_EMC_0_MEM1_HIGHADDR 0x287FFFFF
+#define XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR 0xA6000000
+#define XPAR_OPB_AC97_CONTROLLER_REF_0_HIGHADDR 0xA60000FF
+#define XPAR_OPB_EMC_USB_0_MEM0_BASEADDR 0xA5000000
+#define XPAR_OPB_EMC_USB_0_MEM0_HIGHADDR 0xA50000FF
+#define XPAR_PLB_DDR_0_MEM0_BASEADDR 0x00000000
+#define XPAR_PLB_DDR_0_MEM0_HIGHADDR 0x0FFFFFFF
+
+/******************************************************************/
+
+#define XPAR_XEMAC_NUM_INSTANCES 1
+#define XPAR_OPB_ETHERNET_0_BASEADDR 0x60000000
+#define XPAR_OPB_ETHERNET_0_HIGHADDR 0x60003FFF
+#define XPAR_OPB_ETHERNET_0_DEVICE_ID 0
+#define XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST 1
+#define XPAR_OPB_ETHERNET_0_DMA_PRESENT 1
+#define XPAR_OPB_ETHERNET_0_MII_EXIST 1
+
+/******************************************************************/
+
+#define XPAR_XUARTNS550_NUM_INSTANCES 1
+#define XPAR_XUARTNS550_CLOCK_HZ 100000000
+#define XPAR_OPB_UART16550_0_BASEADDR 0xA0000000
+#define XPAR_OPB_UART16550_0_HIGHADDR 0xA0001FFF
+#define XPAR_OPB_UART16550_0_DEVICE_ID 0
+
+/******************************************************************/
+
+#define XPAR_XGPIO_NUM_INSTANCES 3
+#define XPAR_OPB_GPIO_0_BASEADDR 0x90000000
+#define XPAR_OPB_GPIO_0_HIGHADDR 0x900001FF
+#define XPAR_OPB_GPIO_0_DEVICE_ID 0
+#define XPAR_OPB_GPIO_0_INTERRUPT_PRESENT 0
+#define XPAR_OPB_GPIO_0_IS_DUAL 1
+#define XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR 0x90001000
+#define XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR 0x900011FF
+#define XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID 1
+#define XPAR_OPB_GPIO_EXP_HDR_0_INTERRUPT_PRESENT 0
+#define XPAR_OPB_GPIO_EXP_HDR_0_IS_DUAL 1
+#define XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR 0x90002000
+#define XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR 0x900021FF
+#define XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID 2
+#define XPAR_OPB_GPIO_CHAR_LCD_0_INTERRUPT_PRESENT 0
+#define XPAR_OPB_GPIO_CHAR_LCD_0_IS_DUAL 0
+
+/******************************************************************/
+
+#define XPAR_XPS2_NUM_INSTANCES 2
+#define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 0
+#define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 0xA9000000
+#define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 (0xA9000000+0x3F)
+#define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 1
+#define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 (0xA9000000+0x1000)
+#define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 (0xA9000000+0x103F)
+
+/******************************************************************/
+
+#define XPAR_XIIC_NUM_INSTANCES 1
+#define XPAR_OPB_IIC_0_BASEADDR 0xA8000000
+#define XPAR_OPB_IIC_0_HIGHADDR 0xA80001FF
+#define XPAR_OPB_IIC_0_DEVICE_ID 0
+#define XPAR_OPB_IIC_0_TEN_BIT_ADR 0
+#define XPAR_OPB_IIC_0_GPO_WIDTH 1
+
+/******************************************************************/
+
+#define XPAR_INTC_MAX_NUM_INTR_INPUTS 10
+#define XPAR_XINTC_HAS_IPR 1
+#define XPAR_XINTC_USE_DCR 0
+#define XPAR_XINTC_NUM_INSTANCES 1
+#define XPAR_OPB_INTC_0_BASEADDR 0xD1000FC0
+#define XPAR_OPB_INTC_0_HIGHADDR 0xD1000FDF
+#define XPAR_OPB_INTC_0_DEVICE_ID 0
+#define XPAR_OPB_INTC_0_KIND_OF_INTR 0x00000000
+
+/******************************************************************/
+
+#define XPAR_INTC_SINGLE_BASEADDR 0xD1000FC0
+#define XPAR_INTC_SINGLE_HIGHADDR 0xD1000FDF
+#define XPAR_INTC_SINGLE_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID
+#define XPAR_OPB_ETHERNET_0_IP2INTC_IRPT_MASK 0X000001
+#define XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR 0
+#define XPAR_SYSTEM_USB_HPI_INT_MASK 0X000002
+#define XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_INTR 1
+#define XPAR_MISC_LOGIC_0_PHY_MII_INT_MASK 0X000004
+#define XPAR_OPB_INTC_0_MISC_LOGIC_0_PHY_MII_INT_INTR 2
+#define XPAR_OPB_SYSACE_0_SYSACE_IRQ_MASK 0X000008
+#define XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR 3
+#define XPAR_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_MASK 0X000010
+#define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR 4
+#define XPAR_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_MASK 0X000020
+#define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR 5
+#define XPAR_OPB_IIC_0_IP2INTC_IRPT_MASK 0X000040
+#define XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR 6
+#define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR2_MASK 0X000080
+#define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR 7
+#define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR1_MASK 0X000100
+#define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR 8
+#define XPAR_OPB_UART16550_0_IP2INTC_IRPT_MASK 0X000200
+#define XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR 9
+
+/******************************************************************/
+
+#define XPAR_XTFT_NUM_INSTANCES 1
+#define XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR 0xD0000200
+#define XPAR_PLB_TFT_CNTLR_REF_0_DCR_HIGHADDR 0xD0000207
+#define XPAR_PLB_TFT_CNTLR_REF_0_DEVICE_ID 0
+
+/******************************************************************/
+
+#define XPAR_XSYSACE_MEM_WIDTH 16
+#define XPAR_XSYSACE_NUM_INSTANCES 1
+#define XPAR_OPB_SYSACE_0_BASEADDR 0xCF000000
+#define XPAR_OPB_SYSACE_0_HIGHADDR 0xCF0001FF
+#define XPAR_OPB_SYSACE_0_DEVICE_ID 0
+#define XPAR_OPB_SYSACE_0_MEM_WIDTH 16
+
+/******************************************************************/
+
+#define XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ 300000000
+
+/******************************************************************/
+
+
+/******************************************************************/
+
+/* Linux Redefines */
+
+/******************************************************************/
+
+#define XPAR_UARTNS550_0_BASEADDR (XPAR_OPB_UART16550_0_BASEADDR+0x1000)
+#define XPAR_UARTNS550_0_HIGHADDR XPAR_OPB_UART16550_0_HIGHADDR
+#define XPAR_UARTNS550_0_CLOCK_FREQ_HZ XPAR_XUARTNS550_CLOCK_HZ
+#define XPAR_UARTNS550_0_DEVICE_ID XPAR_OPB_UART16550_0_DEVICE_ID
+
+/******************************************************************/
+
+#define XPAR_INTC_0_BASEADDR XPAR_OPB_INTC_0_BASEADDR
+#define XPAR_INTC_0_HIGHADDR XPAR_OPB_INTC_0_HIGHADDR
+#define XPAR_INTC_0_KIND_OF_INTR XPAR_OPB_INTC_0_KIND_OF_INTR
+#define XPAR_INTC_0_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID
+
+/******************************************************************/
+
+#define XPAR_INTC_0_EMAC_0_VEC_ID XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR
+#define XPAR_INTC_0_SYSACE_0_VEC_ID XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR
+#define XPAR_INTC_0_IIC_0_VEC_ID XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR
+#define XPAR_INTC_0_PS2_1_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR
+#define XPAR_INTC_0_PS2_0_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR
+#define XPAR_INTC_0_UARTNS550_0_VEC_ID XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR
+
+/******************************************************************/
+
+#define XPAR_TFT_0_BASEADDR XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR
+
+/******************************************************************/
+
+#define XPAR_EMAC_0_BASEADDR XPAR_OPB_ETHERNET_0_BASEADDR
+#define XPAR_EMAC_0_HIGHADDR XPAR_OPB_ETHERNET_0_HIGHADDR
+#define XPAR_EMAC_0_DMA_PRESENT XPAR_OPB_ETHERNET_0_DMA_PRESENT
+#define XPAR_EMAC_0_MII_EXIST XPAR_OPB_ETHERNET_0_MII_EXIST
+#define XPAR_EMAC_0_ERR_COUNT_EXIST XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST
+#define XPAR_EMAC_0_DEVICE_ID XPAR_OPB_ETHERNET_0_DEVICE_ID
+
+/******************************************************************/
+
+#define XPAR_GPIO_0_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_0
+#define XPAR_GPIO_0_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_0
+#define XPAR_GPIO_0_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_0
+#define XPAR_GPIO_1_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_1
+#define XPAR_GPIO_1_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_1
+#define XPAR_GPIO_1_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_1
+#define XPAR_GPIO_2_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_0
+#define XPAR_GPIO_2_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_0
+#define XPAR_GPIO_2_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_0
+#define XPAR_GPIO_3_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_1
+#define XPAR_GPIO_3_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_1
+#define XPAR_GPIO_3_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_1
+#define XPAR_GPIO_4_BASEADDR XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR
+#define XPAR_GPIO_4_HIGHADDR XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR
+#define XPAR_GPIO_4_DEVICE_ID XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID
+
+/******************************************************************/
+
+#define XPAR_PS2_0_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0
+#define XPAR_PS2_0_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0
+#define XPAR_PS2_0_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0
+#define XPAR_PS2_1_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1
+#define XPAR_PS2_1_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1
+#define XPAR_PS2_1_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1
+
+/******************************************************************/
+
+#define XPAR_SYSACE_0_BASEADDR XPAR_OPB_SYSACE_0_BASEADDR
+#define XPAR_SYSACE_0_HIGHADDR XPAR_OPB_SYSACE_0_HIGHADDR
+#define XPAR_SYSACE_0_DEVICE_ID XPAR_OPB_SYSACE_0_DEVICE_ID
+
+/******************************************************************/
+
+#define XPAR_IIC_0_BASEADDR XPAR_OPB_IIC_0_BASEADDR
+#define XPAR_IIC_0_HIGHADDR XPAR_OPB_IIC_0_HIGHADDR
+#define XPAR_IIC_0_TEN_BIT_ADR XPAR_OPB_IIC_0_TEN_BIT_ADR
+#define XPAR_IIC_0_DEVICE_ID XPAR_OPB_IIC_0_DEVICE_ID
+
+/******************************************************************/
+
+#define XPAR_PLB_CLOCK_FREQ_HZ 100000000
+#define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ
+#define XPAR_DDR_0_SIZE 0x4000000
+
+/******************************************************************/
+
+#define XPAR_PERSISTENT_0_IIC_0_BASEADDR 0x00000400
+#define XPAR_PERSISTENT_0_IIC_0_HIGHADDR 0x000007FF
+#define XPAR_PERSISTENT_0_IIC_0_EEPROMADDR 0xA0
+
+/******************************************************************/
+
+#define XPAR_PCI_0_CLOCK_FREQ_HZ    0
+
+/******************************************************************/
+
index b065b8babcd3054ae95c795f6b01c4ccb244021f..f287dcdbffceecaa4df11c9116b25c4df766844d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/yucca.c
- *
  * Yucca board specific routines
  *
  * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter)
index 01a4afea151435a5cfe1af9720a226da480832e5..7ae23012237af8aa46741ae843c144261c2c2f03 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/4xx/yucca.h
- *
  * Yucca board definitions
  *
  * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter)
index 1a659bbc18609239950c1cf4d500914aa7d722f4..11626dd9090f6a497bd534fb81a57706ecf637b9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/83xx/mpc834x_sys.c
- *
  * MPC834x SYS board specific routines
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 2e514d316fb85c3f651bd001d95923483390bd8d..6727bbdc36ec317566816aae0317b0070ac010e3 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/83xx/mpc834x_sys.h
- *
  * MPC834X SYS common board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
@@ -25,7 +23,7 @@
 #define VIRT_IMMRBAR           ((uint)0xfe000000)
 
 #define BCSR_PHYS_ADDR         ((uint)0xf8000000)
-#define BCSR_SIZE              ((uint)(128 * 1024))
+#define BCSR_SIZE              ((uint)(32 * 1024))
 
 #define BCSR_MISC_REG2_OFF     0x07
 #define BCSR_MISC_REG2_PORESET 0x01
index 408d64f18e1a7e797e99923a432be28285a4cb2c..9b014df516b903d818783963695d12c280c77dca 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc8540_ads.c
- *
  * MPC8540ADS board specific routines
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index e48ca3a97397c37fdf80c71af2e3730b28767f76..0b5e7ff856f5e32c0b37bfc714db4feb1ff62d8c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc8540_ads.h
- *
  * MPC8540ADS board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 1a8e6c67355d67771651b61e7ec978df38501c15..9754dbd5d18c72e49d8579883fc4451398aa16fa 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/mpc8555_cds.h
- *
  * MPC8555CDS board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 442c7ff195d3c16e4bc241d48e0ebfc29d4fcd7c..0cb2e86470e2a34d7a7cc8501b736116611facd1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc8560_ads.c
- *
  * MPC8560ADS board specific routines
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 143ae7eefa7c501341c5a3ce1c64ddb9be8ceb25..c2247c21fc53aaa7cd9d8b927e6daf842062742c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/mpc8560_ads.h
- *
  * MPC8540ADS board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 17ce48fe3503e8ad4d5c54bd57dba949cdaaf36b..8fd9d763f58dc5d4349b45e6a930e2b197c833c1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc85xx_ads_common.c
- *
  * MPC85xx ADS board common routines
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 198a6a02cde83b8889ad98b639172e51b2a2a21b..de8d41aafe1160b07c8fe04837d2f1836ce394ab 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc85xx_ads_common.h
- *
  * MPC85XX ADS common board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 1801ab392e2223a278d1c84a0bf48d47fcfcf164..c9e0aeeca3d87d051dddc3012df8064ded1a8d42 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platform/85xx/mpc85xx_cds_common.c
- *
  * MPC85xx CDS board specific routines
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 5b588cfd0e41bc16c3b102b685d4f11eb852546d..62df54f61ae3aa95923879fff209da91da8bd622 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc85xx_cds_common.h
- *
  * MPC85xx CDS board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 8a72221f816c879ec565e3c2f5c954f0626fea73..b73778ecf8278727f15c8eabb26a29b164df581b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/sbc8560.c
- * 
  * Wind River SBC8560 board specific routines
  * 
  * Maintainer: Kumar Gala
index 5e1b00c77da5e016ca7fa4976d81b9e7a62c8cd2..44ffaa2d2c87ff0ad6a5cb8ff07c7bd457fc0581 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/sbc8560.h
- *
  * Wind River SBC8560 board definitions
  *
  * Copyright 2003 Motorola Inc.
index c02f110219f5e7a8d221e40639db5ac3195f9b7b..d3ff280510ffea144fd664e3e1e2b5c4492cf53e 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platform/85xx/sbc85xx.c
- * 
  * WindRiver PowerQUICC III SBC85xx board common routines
  *
  * Copyright 2002, 2003 Motorola Inc.
index 7af93c691a6b4a04ff24932bc972267c5a0378f1..5dd8b6a98c9ba5bbd416d0ae1236cd75e5afed3d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/sbc85xx.h
- *
  * WindRiver PowerQUICC III SBC85xx common board definitions
  *
  * Copyright 2003 Motorola Inc.
index 061bb7cf2d9a18ca12b9b7c6f4058b8de42c0f7d..8d7baa9a397ad19d81059d4b12e586564f026be9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/stx_gp3.c
- *
  * STx GP3 board specific routines
  *
  * Dan Malek <dan@embeddededge.com>
index 2f25b51951520ea560f18c5ec74173dc3b1c8c5e..3f71f8f59370679975ab131d98856ff43c59eb56 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/stx8560_gp3.h
- *
  * STx GP3 board definitions
  *
  * Dan Malek (dan@embeddededge.com)
index a5e38ba6273216232dd56a9debd98b4eee62406a..00af132262b30bf2ff0001a749e1afd2deb5aff9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/tqm85xx.c
- *
  * TQM85xx (40/41/55/60) board specific routines
  *
  * Copyright (c) 2005 DENX Software Engineering
index 3775eb363fde58b8836b34efa2e6e41d81b7a8bd..612d80504f9b5f3bd67aa3d582f1bed1324bbec7 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/tqm85xx.h
- *
  * TQM85xx (40/41/55/60) board definitions
  *
  * Copyright (c) 2005 DENX Software Engineering
index 51430e294b322beea0d0cd221c720eadead6369e..e8b91a33ce91f31b0f212a540f452dedfbd2bcb4 100644 (file)
@@ -37,6 +37,9 @@ obj-$(CONFIG_SBC82xx)         += sbc82xx.o
 obj-$(CONFIG_SPRUCE)           += spruce.o
 obj-$(CONFIG_LITE5200)         += lite5200.o
 obj-$(CONFIG_EV64360)          += ev64360.o
+obj-$(CONFIG_MPC86XADS)                += mpc866ads_setup.o
+obj-$(CONFIG_MPC885ADS)                += mpc885ads_setup.o
+obj-$(CONFIG_ADS8272)          += mpc8272ads_setup.o
 
 ifeq ($(CONFIG_SMP),y)
 obj-$(CONFIG_PPC_CHRP)         += chrp_smp.o
index c42c50073da54a6e621b16da9a57353299d10d66..fe0cdc04d4366b0c9460486e25d8b00eb4a58a76 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/apus_setup.c
- *
  *  Copyright (C) 1998, 1999  Jesper Skov
  *
  *  Basically what is needed to replace functionality found in
index aefcc0e7be57295a296fe9ace9dd4e171eb0c260..f324f757cae16fe3dda87278f91f31bd5ee22a3d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/chestnut.c
- *
  * Board setup routines for IBM Chestnut
  *
  * Author: <source@mvista.com>
index 0400b2be40ab5320a62b3e6975affbf69121dd64..e00fd9f8bbd039cd189c85e006f4aad9eee7235c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/chestnut.h
- *
  * Definitions for IBM 750FXGX Eval (Chestnut)
  *
  * Author: <source@mvista.com>
index 108a6e265185b443985e86fe95dced1108e39260..9305c8aa137323cf26befa4e57fdabe45f5a2e42 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/chrp_pegasos_eth.c
- *
  *  Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
  *  Thanks to :
  *     Dale Farnsworth <dale@farnsworth.org>
index 48996b787378f6e985c63de3525e5b69d14c3069..f9fd3f4f8e2ed4e88649a181c8e9bda2d919a1a6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/setup.c
- *
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
  *  Modified by Cort Dougan (cort@cs.nmt.edu)
index 57753a55b5806ecb1005aeea7875f59087025def..c8627770af139a9a0beddd844c2e9802fe93c465 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/chrp_time.c
- *
  *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
  *
  * Adapted for PowerPC (PReP) by Gary Thomas
index 6ca7bcac947421dfbdf52303bfedfdec0ae0d0f9..790475c22fd7405d896f4d5e12390d0f273eadc1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/cpci690.c
- *
  * Board setup routines for the Force CPCI690 board.
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
@@ -290,7 +288,7 @@ cpci690_fixup_mpsc_pdata(struct platform_device *pdev)
        pdata->brg_clk_freq = cpci690_get_bus_freq();
 }
 
-static int __init
+static int
 cpci690_platform_notify(struct device *dev)
 {
        static struct {
index 49584c9cedf38bf30df283c4190e989eb376db04..0fa5a4c31b6754dbfcaf66f38c708338c28090f9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/cpci690.h
- *
  * Definitions for Force CPCI690
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
index ffde8f6f6302ff798f90f2384dca3f7df3d20a00..31e8e21e1d5cf93cf1c1aeb8d79ba4e7fd586af2 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ev64260.c
- *
  * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board.
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
@@ -416,7 +414,7 @@ ev64260_fixup_mpsc_pdata(struct platform_device *pdev)
        return;
 }
 
-static int __init
+static int
 ev64260_platform_notify(struct device *dev)
 {
        static struct {
index bedffced3a02d641c36b79e4fdf65cf7c565c044..44d90d56745a53d852965443e1266577c13156fd 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ev64260.h
- *
  * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board.
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
index b9d844f88c2bc8088ebbab314a8498e860e93238..104ac9b16e8b2ee33039b2f564ef7a2d53ba9061 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ev64360.c
- *
  * Board setup routines for the Marvell EV-64360-BP Evaluation Board.
  *
  * Author: Lee Nicks <allinux@gmail.com>
@@ -300,7 +298,7 @@ ev64360_fixup_eth_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int __init
+static int
 ev64360_platform_notify(struct device *dev)
 {
        static struct {
index 68eabe4903977f67ece925056c3ce100aff77af6..b30f4722690a4f751c2e7f8bfcc7b77539d4b228 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/ev64360.h
- *
  * Definitions for Marvell EV-64360-BP Evaluation Board.
  *
  * Author: Lee Nicks <allinux@gmail.com>
index a48fb8d723e41a6fc0a02f9dd4552476f04a50fc..e1c0b1b6dcb383bbe39dd0dd16479d581c35248e 100644 (file)
 
 /* CPM Ethernet through SCC1 or SCC2 */
 
-#ifdef CONFIG_SCC1_ENET                /* Probably 860 variant */
+#if defined(CONFIG_SCC1_ENET) || defined(CONFIG_MPC8xx_SECOND_ETH_SCC1)                /* Probably 860 variant */
 /* Bits in parallel I/O port registers that have to be set/cleared
  * to configure the pins for SCC1 use.
  * TCLK - CLK1, RCLK - CLK2.
index 06de5924891863902f06e128219f180dbd4a0a10..5528fd0a12168f7642a27c12c803023448ecf987 100644 (file)
@@ -1,7 +1,4 @@
 /*
- *  arch/ppc/platforms/gemini.h
- *
- *
  *  Onboard registers and descriptions for Synergy Microsystems'
  *  "Gemini" boards.
  *
index 8c5065d565054f1907a07835991378562d5507bb..b181f210800121bd2d8bb9ca257cd88bff887b6d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/gemini_prom.S
- *
  *  Not really prom support code (yet), but sort of anti-prom code.  The current
  *  bootloader does a number of things it shouldn't and doesn't do things that it
  *  should.  The stuff in here is mainly a hodge-podge collection of setup code
index 729897c59033c429a0c4704dbae431c93f182c2a..0090ff154608c39473b2d51366eaed607dd86eff 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/gemini_setup.c
- *
  *  Copyright (C) 1995 Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
  *  Modified by Cort Dougan (cort@cs.nmt.edu)
index f945416960e94abae60c4b102ac4fcfd4d37eeb9..75dc2ee87d2fb9c6a7bc1bda30410dc2e76d03f6 100644 (file)
@@ -1,7 +1,4 @@
-
 /*
- * arch/ppc/platforms/hdpu_setup.c
- *
  * Board setup routines for the Sky Computers HDPU Compute Blade.
  *
  * Written by Brian Waite <waite@skycomputers.com>
@@ -353,7 +350,7 @@ static void __init hdpu_fixup_cpustate_pdata(struct platform_device *pd)
 }
 #endif
 
-static int __init hdpu_platform_notify(struct device *dev)
+static int hdpu_platform_notify(struct device *dev)
 {
        static struct {
                char *bus_id;
index 07c3cffb5c7b77406743344c6f6428365f9fa36e..f9e020b6970ccd6eddd5f2e85e2a885c105336cd 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/hdpu.h
- *
  * Definitions for Sky Computers HDPU board.
  *
  * Brian Waite <waite@skycomputers.com>
index 6e58e30ceed101b1aeace5055a19d4a00583b308..ad21280e892095abd5fa6759b86bcf5cc4c03a4a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/katana.c
- *
  * Board setup routines for the Artesyn Katana cPCI boards.
  *
  * Author: Tim Montgomery <timm@artesyncp.com>
@@ -598,7 +596,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int __init
+static int
 katana_platform_notify(struct device *dev)
 {
        static struct {
@@ -664,12 +662,11 @@ katana_setup_mtd(void)
 
        ptbl_entries = (size >= (64*MB)) ? 6 : 4;
 
-       if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition),
+       if ((ptbl = kcalloc(ptbl_entries, sizeof(struct mtd_partition),
                        GFP_KERNEL)) == NULL) {
                printk(KERN_WARNING "Can't alloc MTD partition table\n");
                return -ENOMEM;
        }
-       memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition));
 
        ptbl[0].name = "Monitor";
        ptbl[0].size = KATANA_MTD_MONITOR_SIZE;
index 597257eff2ec5a2e6216cb99d717863ac66cb43b..0a9b036526b1dbfb6bc963c964c279341280e714 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/katana.h
- *
  * Definitions for Artesyn Katana750i/3750 board.
  *
  * Author: Tim Montgomery <timm@artesyncp.com>
index 7ed52dc340c95394cf3a8e5a2c1ef32ec3744ca7..5171b53bccb5e8f2c540501d2aa32918cd378669 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/lite5200.c
- *
  * Platform support file for the Freescale LITE5200 based on MPC52xx.
  * A maximum of this file should be moved to syslib/mpc52xx_?????
  * so that new platform based on MPC52xx need a minimal platform file
index c1de2aa47175f62c44a59bba89e8ac847edf7fca..852a18e24d0b3ff0fada5621a03fe408ff4f967c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/lite5200.h
- * 
  * Definitions for Freescale LITE5200 : MPC52xx Standard Development
  * Platform board support
  * 
index 06d247c23b828800df83d816486dec0c757561cf..c6445a727ca3a8c0804cd24bfdcc7552bfa360fa 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/lopec.c
- *
  * Setup routines for the Motorola LoPEC.
  *
  * Author: Dan Cox
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c
new file mode 100644 (file)
index 0000000..bc9b94f
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * arch/ppc/platforms/82xx/pq2ads_pd.c
+ *
+ * MPC82xx Board-specific PlatformDevice descriptions
+ *
+ * 2005 (c) MontaVista Software, Inc.
+ * Vitaly Bordug <vbordug@ru.mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/ioport.h>
+#include <linux/fs_enet_pd.h>
+#include <linux/platform_device.h>
+
+#include <asm/io.h>
+#include <asm/mpc8260.h>
+#include <asm/cpm2.h>
+#include <asm/immap_cpm2.h>
+#include <asm/irq.h>
+#include <asm/ppc_sys.h>
+#include <asm/ppcboot.h>
+
+#include "pq2ads_pd.h"
+
+static void init_fcc1_ioports(void);
+static void init_fcc2_ioports(void);
+
+static struct fs_mii_bus_info mii_bus_info = {
+       .method                 = fsmii_bitbang,
+       .id                     = 0,
+       .i.bitbang = {
+               .mdio_port      = fsiop_portc,
+               .mdio_bit       = 18,
+               .mdc_port       = fsiop_portc,
+               .mdc_bit        = 19,
+               .delay          = 1,
+       },
+};
+
+static struct fs_platform_info mpc82xx_fcc1_pdata = {
+       .fs_no          = fsid_fcc1,
+       .cp_page        = CPM_CR_FCC1_PAGE,
+       .cp_block       = CPM_CR_FCC1_SBLOCK,
+       .clk_trx        = (PC_F1RXCLK | PC_F1TXCLK),
+       .clk_route      = CMX1_CLK_ROUTE,
+       .clk_mask       = CMX1_CLK_MASK,
+       .init_ioports   = init_fcc1_ioports,
+
+       .phy_addr       = 0,
+#ifdef PHY_INTERRUPT
+       .phy_irq        = PHY_INTERRUPT,
+#else
+       .phy_irq        = -1;
+#endif
+       .mem_offset     = FCC1_MEM_OFFSET,
+       .bus_info       = &mii_bus_info,
+       .rx_ring        = 32,
+       .tx_ring        = 32,
+       .rx_copybreak   = 240,
+       .use_napi       = 0,
+       .napi_weight    = 17,
+};
+
+static struct fs_platform_info mpc82xx_fcc2_pdata = {
+       .fs_no          = fsid_fcc2,
+       .cp_page        = CPM_CR_FCC2_PAGE,
+       .cp_block       = CPM_CR_FCC2_SBLOCK,
+       .clk_trx        = (PC_F2RXCLK | PC_F2TXCLK),
+       .clk_route      = CMX2_CLK_ROUTE,
+       .clk_mask       = CMX2_CLK_MASK,
+       .init_ioports   = init_fcc2_ioports,
+
+       .phy_addr       = 3,
+#ifdef PHY_INTERRUPT
+       .phy_irq        = PHY_INTERRUPT,
+#else
+       .phy_irq        = -1;
+#endif
+       .mem_offset     = FCC2_MEM_OFFSET,
+       .bus_info       = &mii_bus_info,
+       .rx_ring        = 32,
+       .tx_ring        = 32,
+       .rx_copybreak   = 240,
+       .use_napi       = 0,
+       .napi_weight    = 17,
+};
+
+static void init_fcc1_ioports(void)
+{
+       struct io_port *io;
+       u32 tempval;
+       cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
+       u32 *bcsr = ioremap(BCSR_ADDR+4, sizeof(u32));
+
+       io = &immap->im_ioport;
+
+       /* Enable the PHY */
+       clrbits32(bcsr, BCSR1_FETHIEN);
+       setbits32(bcsr, BCSR1_FETH_RST);
+
+       /* FCC1 pins are on port A/C. */
+       /* Configure port A and C pins for FCC1 Ethernet. */
+
+       tempval = in_be32(&io->iop_pdira);
+       tempval &= ~PA1_DIRA0;
+       tempval |= PA1_DIRA1;
+       out_be32(&io->iop_pdira, tempval);
+
+       tempval = in_be32(&io->iop_psora);
+       tempval &= ~PA1_PSORA0;
+       tempval |= PA1_PSORA1;
+       out_be32(&io->iop_psora, tempval);
+
+       setbits32(&io->iop_ppara,PA1_DIRA0 | PA1_DIRA1);
+
+       /* Alter clocks */
+       tempval = PC_F1TXCLK|PC_F1RXCLK;
+
+       clrbits32(&io->iop_psorc, tempval);
+       clrbits32(&io->iop_pdirc, tempval);
+       setbits32(&io->iop_pparc, tempval);
+
+       clrbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_MASK);
+       setbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_ROUTE);
+       iounmap(bcsr);
+       iounmap(immap);
+}
+
+static void init_fcc2_ioports(void)
+{
+       cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
+       u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32));
+
+       struct io_port *io;
+       u32 tempval;
+
+       immap = cpm2_immr;
+
+       io = &immap->im_ioport;
+
+       /* Enable the PHY */
+       clrbits32(bcsr, BCSR3_FETHIEN2);
+       setbits32(bcsr, BCSR3_FETH2_RST);
+
+       /* FCC2 are port B/C. */
+       /* Configure port A and C pins for FCC2 Ethernet. */
+
+       tempval = in_be32(&io->iop_pdirb);
+       tempval &= ~PB2_DIRB0;
+       tempval |= PB2_DIRB1;
+       out_be32(&io->iop_pdirb, tempval);
+
+       tempval = in_be32(&io->iop_psorb);
+       tempval &= ~PB2_PSORB0;
+       tempval |= PB2_PSORB1;
+       out_be32(&io->iop_psorb, tempval);
+
+       setbits32(&io->iop_pparb,PB2_DIRB0 | PB2_DIRB1);
+
+       tempval = PC_F2RXCLK|PC_F2TXCLK;
+
+       /* Alter clocks */
+       clrbits32(&io->iop_psorc,tempval);
+       clrbits32(&io->iop_pdirc,tempval);
+       setbits32(&io->iop_pparc,tempval);
+
+       clrbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_MASK);
+       setbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_ROUTE);
+
+       iounmap(bcsr);
+       iounmap(immap);
+}
+
+
+static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev,
+                                             int idx)
+{
+       bd_t* bi = (void*)__res;
+       int fs_no = fsid_fcc1+pdev->id-1;
+
+       mpc82xx_fcc1_pdata.dpram_offset = mpc82xx_fcc2_pdata.dpram_offset = (u32)cpm2_immr->im_dprambase;
+       mpc82xx_fcc1_pdata.fcc_regs_c = mpc82xx_fcc2_pdata.fcc_regs_c = (u32)cpm2_immr->im_fcc_c;
+
+       switch(fs_no) {
+               case fsid_fcc1:
+                       memcpy(&mpc82xx_fcc1_pdata.macaddr,bi->bi_enetaddr,6);
+                       pdev->dev.platform_data = &mpc82xx_fcc1_pdata;
+               break;
+               case fsid_fcc2:
+                       memcpy(&mpc82xx_fcc2_pdata.macaddr,bi->bi_enetaddr,6);
+                       mpc82xx_fcc2_pdata.macaddr[5] ^= 1;
+                       pdev->dev.platform_data = &mpc82xx_fcc2_pdata;
+               break;
+       }
+}
+
+static int mpc8272ads_platform_notify(struct device *dev)
+{
+       static const struct platform_notify_dev_map dev_map[] = {
+               {
+                       .bus_id = "fsl-cpm-fcc",
+                       .rtn = mpc8272ads_fixup_enet_pdata
+               },
+               {
+                       .bus_id = NULL
+               }
+       };
+       platform_notify_map(dev_map,dev);
+
+       return 0;
+
+}
+
+int __init mpc8272ads_init(void)
+{
+       printk(KERN_NOTICE "mpc8272ads: Init\n");
+
+       platform_notify = mpc8272ads_platform_notify;
+
+       ppc_sys_device_initfunc();
+
+       ppc_sys_device_disable_all();
+       ppc_sys_device_enable(MPC82xx_CPM_FCC1);
+       ppc_sys_device_enable(MPC82xx_CPM_FCC2);
+
+       return 0;
+}
+
+arch_initcall(mpc8272ads_init);
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c
new file mode 100644 (file)
index 0000000..ac8fcc6
--- /dev/null
@@ -0,0 +1,273 @@
+/*arch/ppc/platforms/mpc885ads-setup.c
+ *
+ * Platform setup for the Freescale mpc885ads board
+ *
+ * Vitaly Bordug <vbordug@ru.mvista.com>
+ *
+ * Copyright 2005 MontaVista Software Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/ioport.h>
+#include <linux/device.h>
+
+#include <linux/fs_enet_pd.h>
+#include <linux/mii.h>
+
+#include <asm/delay.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/page.h>
+#include <asm/processor.h>
+#include <asm/system.h>
+#include <asm/time.h>
+#include <asm/ppcboot.h>
+#include <asm/8xx_immap.h>
+#include <asm/commproc.h>
+#include <asm/ppc_sys.h>
+#include <asm/mpc8xx.h>
+
+extern unsigned char __res[];
+
+static struct fs_mii_bus_info fec_mii_bus_info = {
+       .method = fsmii_fec,
+       .id = 0,
+};
+
+static struct fs_mii_bus_info scc_mii_bus_info = {
+       .method = fsmii_fixed,
+       .id = 0,
+       .i.fixed.speed = 10,
+       .i.fixed.duplex = 0,
+};
+
+static struct fs_platform_info mpc8xx_fec_pdata[] = {
+       {
+        .rx_ring = 128,
+        .tx_ring = 16,
+        .rx_copybreak = 240,
+
+        .use_napi = 1,
+        .napi_weight = 17,
+
+        .phy_addr = 15,
+        .phy_irq = -1,
+
+        .use_rmii = 0,
+
+        .bus_info = &fec_mii_bus_info,
+        }
+};
+
+static struct fs_platform_info mpc8xx_scc_pdata = {
+       .rx_ring = 64,
+       .tx_ring = 8,
+       .rx_copybreak = 240,
+
+       .use_napi = 1,
+       .napi_weight = 17,
+
+       .phy_addr = -1,
+       .phy_irq = -1,
+
+       .bus_info = &scc_mii_bus_info,
+};
+
+void __init board_init(void)
+{
+       volatile cpm8xx_t *cp = cpmp;
+       unsigned *bcsr_io;
+
+       bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
+
+       if (bcsr_io == NULL) {
+               printk(KERN_CRIT "Could not remap BCSR1\n");
+               return;
+       }
+#ifdef CONFIG_SERIAL_CPM_SMC1
+       cp->cp_simode &= ~(0xe0000000 >> 17);   /* brg1 */
+       clrbits32(bcsr_io,(0x80000000 >> 7));
+#else
+       setbits32(bcsr_io,(0x80000000 >> 7));
+
+       cp->cp_pbpar &= ~(0x000000c0);
+       cp->cp_pbdir |= 0x000000c0;
+       cp->cp_smc[0].smc_smcmr = 0;
+       cp->cp_smc[0].smc_smce = 0;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SMC2
+       cp->cp_simode &= ~(0xe0000000 >> 1);
+       cp->cp_simode |= (0x20000000 >> 1);     /* brg2 */
+       clrbits32(bcsr_io,(0x80000000 >> 13));
+#else
+       clrbits32(bcsr_io,(0x80000000 >> 13));
+       cp->cp_pbpar &= ~(0x00000c00);
+       cp->cp_pbdir |= 0x00000c00;
+       cp->cp_smc[1].smc_smcmr = 0;
+       cp->cp_smc[1].smc_smce = 0;
+#endif
+       iounmap(bcsr_io);
+}
+
+static void setup_fec1_ioports(void)
+{
+       immap_t *immap = (immap_t *) IMAP_ADDR;
+
+       setbits16(&immap->im_ioport.iop_pdpar, 0x1fff);
+       setbits16(&immap->im_ioport.iop_pddir, 0x1fff);
+}
+
+static void setup_scc1_ioports(void)
+{
+       immap_t *immap = (immap_t *) IMAP_ADDR;
+       unsigned *bcsr_io;
+
+       bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
+
+       if (bcsr_io == NULL) {
+               printk(KERN_CRIT "Could not remap BCSR1\n");
+               return;
+       }
+
+       /* Enable the PHY.
+        */
+       clrbits32(bcsr_io,BCSR1_ETHEN);
+
+       /* Configure port A pins for Txd and Rxd.
+        */
+       /* Disable receive and transmit in case EPPC-Bug started it.
+        */
+       setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD);
+       clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD);
+       clrbits16(&immap->im_ioport.iop_paodr, PA_ENET_TXD);
+
+       /* Configure port C pins to enable CLSN and RENA.
+        */
+       clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
+       clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
+       setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
+       /* Configure port A for TCLK and RCLK.
+        */
+       setbits16(&immap->im_ioport.iop_papar, PA_ENET_TCLK | PA_ENET_RCLK);
+       clrbits16(&immap->im_ioport.iop_padir, PA_ENET_TCLK | PA_ENET_RCLK);
+       clrbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA);
+       clrbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA);
+
+       /* Configure Serial Interface clock routing.
+        * First, clear all SCC bits to zero, then set the ones we want.
+        */
+       clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK);
+       setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT);
+
+       /* In the original SCC enet driver the following code is placed at
+       the end of the initialization */
+       setbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA);
+       setbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA);
+
+}
+
+static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no)
+{
+       struct fs_platform_info *fpi = pdev->dev.platform_data;
+
+       volatile cpm8xx_t *cp;
+       bd_t *bd = (bd_t *) __res;
+       char *e;
+       int i;
+
+       /* Get pointer to Communication Processor */
+       cp = cpmp;
+       switch (fs_no) {
+       case fsid_fec1:
+               fpi = &mpc8xx_fec_pdata[0];
+               fpi->init_ioports = &setup_fec1_ioports;
+
+               break;
+       case fsid_scc1:
+               fpi = &mpc8xx_scc_pdata;
+               fpi->init_ioports = &setup_scc1_ioports;
+
+               break;
+       default:
+               printk(KERN_WARNING"Device %s is not supported!\n", pdev->name);
+               return;
+       }
+
+       pdev->dev.platform_data = fpi;
+       fpi->fs_no = fs_no;
+
+       e = (unsigned char *)&bd->bi_enetaddr;
+       for (i = 0; i < 6; i++)
+               fpi->macaddr[i] = *e++;
+
+       fpi->macaddr[5 - pdev->id]++;
+
+}
+
+static void mpc866ads_fixup_fec_enet_pdata(struct platform_device *pdev,
+                                          int idx)
+{
+       /* This is for FEC devices only */
+       if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec")))
+               return;
+       mpc866ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1);
+}
+
+static void mpc866ads_fixup_scc_enet_pdata(struct platform_device *pdev,
+                                          int idx)
+{
+       /* This is for SCC devices only */
+       if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc")))
+               return;
+
+       mpc866ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1);
+}
+
+static int mpc866ads_platform_notify(struct device *dev)
+{
+       static const struct platform_notify_dev_map dev_map[] = {
+               {
+                       .bus_id = "fsl-cpm-fec",
+                       .rtn = mpc866ads_fixup_fec_enet_pdata,
+               },
+               {
+                       .bus_id = "fsl-cpm-scc",
+                       .rtn = mpc866ads_fixup_scc_enet_pdata,
+               },
+               {
+                       .bus_id = NULL
+               }
+       };
+
+       platform_notify_map(dev_map,dev);
+
+       return 0;
+}
+
+int __init mpc866ads_init(void)
+{
+       printk(KERN_NOTICE "mpc866ads: Init\n");
+
+       platform_notify = mpc866ads_platform_notify;
+
+       ppc_sys_device_initfunc();
+       ppc_sys_device_disable_all();
+
+#ifdef MPC8xx_SECOND_ETH_SCC1
+       ppc_sys_device_enable(MPC8xx_CPM_SCC1);
+#endif
+       ppc_sys_device_enable(MPC8xx_CPM_FEC1);
+
+       return 0;
+}
+
+arch_initcall(mpc866ads_init);
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c
new file mode 100644 (file)
index 0000000..50a99e5
--- /dev/null
@@ -0,0 +1,389 @@
+/*arch/ppc/platforms/mpc885ads-setup.c
+ *
+ * Platform setup for the Freescale mpc885ads board
+ *
+ * Vitaly Bordug <vbordug@ru.mvista.com>
+ *
+ * Copyright 2005 MontaVista Software Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/ioport.h>
+#include <linux/device.h>
+
+#include <linux/fs_enet_pd.h>
+#include <linux/mii.h>
+
+#include <asm/delay.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/page.h>
+#include <asm/processor.h>
+#include <asm/system.h>
+#include <asm/time.h>
+#include <asm/ppcboot.h>
+#include <asm/8xx_immap.h>
+#include <asm/commproc.h>
+#include <asm/ppc_sys.h>
+
+extern unsigned char __res[];
+
+static void __init mpc885ads_scc_phy_init(char);
+
+static struct fs_mii_bus_info fec_mii_bus_info = {
+       .method = fsmii_fec,
+       .id = 0,
+};
+
+static struct fs_mii_bus_info scc_mii_bus_info = {
+#ifdef CONFIG_SCC_ENET_8xx_FIXED
+       .method = fsmii_fixed,
+#else
+       .method = fsmii_fec,
+#endif
+
+       .id = 0,
+};
+
+static struct fs_platform_info mpc8xx_fec_pdata[] = {
+       {
+        .rx_ring = 128,
+        .tx_ring = 16,
+        .rx_copybreak = 240,
+
+        .use_napi = 1,
+        .napi_weight = 17,
+
+        .phy_addr = 0,
+        .phy_irq = SIU_IRQ7,
+
+        .bus_info = &fec_mii_bus_info,
+        }, {
+            .rx_ring = 128,
+            .tx_ring = 16,
+            .rx_copybreak = 240,
+
+            .use_napi = 1,
+            .napi_weight = 17,
+
+            .phy_addr = 1,
+            .phy_irq = SIU_IRQ7,
+
+            .bus_info = &fec_mii_bus_info,
+            }
+};
+
+static struct fs_platform_info mpc8xx_scc_pdata = {
+       .rx_ring = 64,
+       .tx_ring = 8,
+       .rx_copybreak = 240,
+
+       .use_napi = 1,
+       .napi_weight = 17,
+
+       .phy_addr = 2,
+#ifdef CONFIG_MPC8xx_SCC_ENET_FIXED
+       .phy_irq = -1,
+#else
+       .phy_irq = SIU_IRQ7,
+#endif
+
+       .bus_info = &scc_mii_bus_info,
+};
+
+void __init board_init(void)
+{
+       volatile cpm8xx_t *cp = cpmp;
+       unsigned int *bcsr_io;
+
+#ifdef CONFIG_FS_ENET
+       immap_t *immap = (immap_t *) IMAP_ADDR;
+#endif
+       bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
+
+       if (bcsr_io == NULL) {
+               printk(KERN_CRIT "Could not remap BCSR\n");
+               return;
+       }
+#ifdef CONFIG_SERIAL_CPM_SMC1
+       cp->cp_simode &= ~(0xe0000000 >> 17);   /* brg1 */
+       clrbits32(bcsr_io, BCSR1_RS232EN_1);
+#else
+       setbits32(bcsr_io,BCSR1_RS232EN_1);
+       cp->cp_smc[0].smc_smcmr = 0;
+       cp->cp_smc[0].smc_smce = 0;
+#endif
+
+#ifdef CONFIG_SERIAL_CPM_SMC2
+       cp->cp_simode &= ~(0xe0000000 >> 1);
+       cp->cp_simode |= (0x20000000 >> 1);     /* brg2 */
+       clrbits32(bcsr_io,BCSR1_RS232EN_2);
+#else
+       setbits32(bcsr_io,BCSR1_RS232EN_2);
+       cp->cp_smc[1].smc_smcmr = 0;
+       cp->cp_smc[1].smc_smce = 0;
+#endif
+       iounmap(bcsr_io);
+
+#ifdef CONFIG_FS_ENET
+       /* use MDC for MII (common) */
+       setbits16(&immap->im_ioport.iop_pdpar, 0x0080);
+       clrbits16(&immap->im_ioport.iop_pddir, 0x0080);
+#endif
+}
+
+static void setup_fec1_ioports(void)
+{
+       immap_t *immap = (immap_t *) IMAP_ADDR;
+
+       /* configure FEC1 pins  */
+       setbits16(&immap->im_ioport.iop_papar, 0xf830);
+       setbits16(&immap->im_ioport.iop_padir, 0x0830);
+       clrbits16(&immap->im_ioport.iop_padir, 0xf000);
+       setbits32(&immap->im_cpm.cp_pbpar, 0x00001001);
+
+       clrbits32(&immap->im_cpm.cp_pbdir, 0x00001001);
+       setbits16(&immap->im_ioport.iop_pcpar, 0x000c);
+       clrbits16(&immap->im_ioport.iop_pcdir, 0x000c);
+       setbits32(&immap->im_cpm.cp_pepar, 0x00000003);
+
+       setbits32(&immap->im_cpm.cp_pedir, 0x00000003);
+       clrbits32(&immap->im_cpm.cp_peso, 0x00000003);
+       clrbits32(&immap->im_cpm.cp_cptr, 0x00000100);
+}
+
+static void setup_fec2_ioports(void)
+{
+       immap_t *immap = (immap_t *) IMAP_ADDR;
+
+       /* configure FEC2 pins */
+       setbits32(&immap->im_cpm.cp_pepar, 0x0003fffc);
+       setbits32(&immap->im_cpm.cp_pedir, 0x0003fffc);
+       setbits32(&immap->im_cpm.cp_peso, 0x00037800);
+       clrbits32(&immap->im_cpm.cp_peso, 0x000087fc);
+       clrbits32(&immap->im_cpm.cp_cptr, 0x00000080);
+}
+
+static void setup_scc3_ioports(void)
+{
+       immap_t *immap = (immap_t *) IMAP_ADDR;
+       unsigned *bcsr_io;
+
+       bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
+
+       if (bcsr_io == NULL) {
+               printk(KERN_CRIT "Could not remap BCSR\n");
+               return;
+       }
+
+       /* Enable the PHY.
+        */
+       setbits32(bcsr_io+4, BCSR4_ETH10_RST);
+       /* Configure port A pins for Txd and Rxd.
+        */
+       setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD);
+       clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD);
+
+       /* Configure port C pins to enable CLSN and RENA.
+        */
+       clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
+       clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
+       setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
+
+       /* Configure port E for TCLK and RCLK.
+        */
+       setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK);
+       clrbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA);
+       clrbits32(&immap->im_cpm.cp_pedir,
+                 PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA);
+       clrbits32(&immap->im_cpm.cp_peso, PE_ENET_TCLK | PE_ENET_RCLK);
+       setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA);
+
+       /* Configure Serial Interface clock routing.
+        * First, clear all SCC bits to zero, then set the ones we want.
+        */
+       clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK);
+       setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT);
+
+       /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used.
+        */
+       immap->im_cpm.cp_smc[0].smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN);
+       /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode
+        * by H/W setting after reset. SCC ethernet controller support only half duplex.
+        * This discrepancy of modes causes a lot of carrier lost errors.
+        */
+
+       /* In the original SCC enet driver the following code is placed at
+          the end of the initialization */
+       setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA);
+       clrbits32(&immap->im_cpm.cp_pedir, PE_ENET_TENA);
+       setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA);
+
+       setbits32(bcsr_io+1, BCSR1_ETHEN);
+       iounmap(bcsr_io);
+}
+
+static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no)
+{
+       struct fs_platform_info *fpi = pdev->dev.platform_data;
+
+       volatile cpm8xx_t *cp;
+       bd_t *bd = (bd_t *) __res;
+       char *e;
+       int i;
+
+       /* Get pointer to Communication Processor */
+       cp = cpmp;
+       switch (fs_no) {
+       case fsid_fec1:
+               fpi = &mpc8xx_fec_pdata[0];
+               fpi->init_ioports = &setup_fec1_ioports;
+               break;
+       case fsid_fec2:
+               fpi = &mpc8xx_fec_pdata[1];
+               fpi->init_ioports = &setup_fec2_ioports;
+               break;
+       case fsid_scc3:
+               fpi = &mpc8xx_scc_pdata;
+               fpi->init_ioports = &setup_scc3_ioports;
+               mpc885ads_scc_phy_init(fpi->phy_addr);
+               break;
+       default:
+               printk(KERN_WARNING"Device %s is not supported!\n", pdev->name);
+               return;
+       }
+
+       pdev->dev.platform_data = fpi;
+       fpi->fs_no = fs_no;
+
+       e = (unsigned char *)&bd->bi_enetaddr;
+       for (i = 0; i < 6; i++)
+               fpi->macaddr[i] = *e++;
+
+       fpi->macaddr[5 - pdev->id]++;
+
+}
+
+static void mpc885ads_fixup_fec_enet_pdata(struct platform_device *pdev,
+                                          int idx)
+{
+       /* This is for FEC devices only */
+       if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec")))
+               return;
+       mpc885ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1);
+}
+
+static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev,
+                                                 int idx)
+{
+       /* This is for SCC devices only */
+       if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc")))
+               return;
+
+       mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1);
+}
+
+/* SCC ethernet controller does not have MII management channel. FEC1 MII
+ * channel is used to communicate with the 10Mbit PHY.
+ */
+
+#define MII_ECNTRL_PINMUX        0x4
+#define FEC_ECNTRL_PINMUX        0x00000004
+#define FEC_RCNTRL_MII_MODE        0x00000004
+
+/* Make MII read/write commands.
+ */
+#define mk_mii_write(REG, VAL, PHY_ADDR)    (0x50020000 | (((REG) & 0x1f) << 18) | \
+                ((VAL) & 0xffff) | ((PHY_ADDR) << 23))
+
+static void mpc885ads_scc_phy_init(char phy_addr)
+{
+       volatile immap_t *immap;
+       volatile fec_t *fecp;
+       bd_t *bd;
+
+       bd = (bd_t *) __res;
+       immap = (immap_t *) IMAP_ADDR;  /* pointer to internal registers */
+       fecp = &(immap->im_cpm.cp_fec);
+
+       /* Enable MII pins of the FEC1
+        */
+       setbits16(&immap->im_ioport.iop_pdpar, 0x0080);
+       clrbits16(&immap->im_ioport.iop_pddir, 0x0080);
+       /* Set MII speed to 2.5 MHz
+        */
+       out_be32(&fecp->fec_mii_speed,
+                ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1);
+
+       /* Enable FEC pin MUX
+        */
+       setbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX);
+       setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE);
+
+       out_be32(&fecp->fec_mii_data,
+                mk_mii_write(MII_BMCR, BMCR_ISOLATE, phy_addr));
+       udelay(100);
+       out_be32(&fecp->fec_mii_data,
+                mk_mii_write(MII_ADVERTISE,
+                             ADVERTISE_10HALF | ADVERTISE_CSMA, phy_addr));
+       udelay(100);
+
+       /* Disable FEC MII settings
+        */
+       clrbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX);
+       clrbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE);
+       out_be32(&fecp->fec_mii_speed, 0);
+}
+
+static int mpc885ads_platform_notify(struct device *dev)
+{
+
+       static const struct platform_notify_dev_map dev_map[] = {
+               {
+                       .bus_id = "fsl-cpm-fec",
+                       .rtn = mpc885ads_fixup_fec_enet_pdata,
+               },
+               {
+                       .bus_id = "fsl-cpm-scc",
+                       .rtn = mpc885ads_fixup_scc_enet_pdata,
+               },
+               {
+                       .bus_id = NULL
+               }
+       };
+
+       platform_notify_map(dev_map,dev);
+
+}
+
+int __init mpc885ads_init(void)
+{
+       printk(KERN_NOTICE "mpc885ads: Init\n");
+
+       platform_notify = mpc885ads_platform_notify;
+
+       ppc_sys_device_initfunc();
+       ppc_sys_device_disable_all();
+
+       ppc_sys_device_enable(MPC8xx_CPM_FEC1);
+
+#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3
+       ppc_sys_device_enable(MPC8xx_CPM_SCC1);
+
+#endif
+#ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2
+       ppc_sys_device_enable(MPC8xx_CPM_FEC2);
+#endif
+
+       return 0;
+}
+
+arch_initcall(mpc885ads_init);
index 108eb182dddcc01c68128e83c02a961e4578fcc4..c717cd92c028e5e563c6c5b2c88bb12eedccb23d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/mvme5100.c
- *
  * Board setup routines for the Motorola MVME5100.
  *
  * Author: Matt Porter <mporter@mvista.com>
index 641a11a316570106918a0ce48b6a0842055495d8..8569c423d88775e7fa1386259bcece9248565d56 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/pal4.h
- *
  * Definitions for SBS Palomar IV board
  *
  * Author: Dan Cox
index c3b1b757a48b7bc9ae946022caa94e1c695bba63..d81ae1c7e1cff13abde531d3febbd0510e2e8749 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/pal4_pci.c
- *
  * PCI support for SBS Palomar IV
  *
  * Author: Dan Cox
index a715c66e1adf1733b43557b10256251e77f2beb9..a75343224cfd98629ca4f5bc84295f6acc2efa32 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/pal4_serial.h
- *
  * Definitions for SBS PalomarIV serial support
  *
  * Author: Dan Cox
index f93a3f871932888d91b54262082b6c182bf09cbb..3c3d881df00d52de50b804e5c54e152d9968ede4 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/pal4_setup.c
- *
  * Board setup routines for the SBS PalomarIV.
  *
  * Author: Dan Cox
index e6b520e6e13feaec3e9c073616f57821d1d9a97d..c3a86be11fb79960ee6e28d8d170269fa2ac2b66 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/powerpmc250.c
- *
  * Board setup routines for Force PowerPMC-250 Processor PMC
  *
  * Author: Troy Benjegerdes <tbenjegerdes@mvista.com>
index 22bd40cfb0928f7b2d37a88f4b7299cd4ed3a803..de2761ebe0d927a62350e67b9d07cb7cbb873ef0 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/pplus.c
- *
  * Board and PCI setup routines for MCG PowerPlus
  *
  * Author: Randy Vinson <rvinson@mvista.com>
index 90f0cb2d409f0c2f6eb6bb405f876fa7372e9577..a07cbbdd72c68df7410e79b4cb47e2830790e23b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/pplus.h
- *
  * Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr.
  *
  * Author: Mark A. Greerinclude/asm-ppc/hawk.h
index 71c9fca1fe9b9d4ce293e2793dcfe0a943cf04be..3365fd788a7af4dbe2c57b3f367e0399a0e99d20 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/pq2ads.c
- *
  * PQ2ADS platform support
  *
  * Author: Kumar Gala <galak@kernel.crashing.org>
index 067d9a5aebc108f7301913e74d3d218161c23ea7..6b26dd36c64071bca77ab912b7aced5a8ecc4cd1 100644 (file)
 
 #include <asm/ppcboot.h>
 
+#if defined(CONFIG_ADS8272)
+#define BOARD_CHIP_NAME "8272"
+#endif
+
 /* Memory map is configured by the PROM startup.
  * We just map a few things we need.  The CSR is actually 4 byte-wide
  * registers that can be accessed as 8-, 16-, or 32-bit values.
diff --git a/arch/ppc/platforms/pq2ads_pd.h b/arch/ppc/platforms/pq2ads_pd.h
new file mode 100644 (file)
index 0000000..8f14a43
--- /dev/null
@@ -0,0 +1,114 @@
+#ifndef __PQ2ADS_PD_H
+#define __PQ2ADS_PD_H
+/*
+ * arch/ppc/platforms/82xx/pq2ads_pd.h
+ *
+ * Some defines for MPC82xx board-specific PlatformDevice descriptions
+ *
+ * 2005 (c) MontaVista Software, Inc.
+ * Vitaly Bordug <vbordug@ru.mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/* FCC1 Clock Source Configuration.  These can be redefined in the board specific file.
+   Can only choose from CLK9-12 */
+
+#define F1_RXCLK       11
+#define F1_TXCLK       10
+
+/* FCC2 Clock Source Configuration.  These can be redefined in the board specific file.
+   Can only choose from CLK13-16 */
+#define F2_RXCLK       15
+#define F2_TXCLK       16
+
+/* FCC3 Clock Source Configuration.  These can be redefined in the board specific file.
+   Can only choose from CLK13-16 */
+#define F3_RXCLK       13
+#define F3_TXCLK       14
+
+/* Automatically generates register configurations */
+#define PC_CLK(x)      ((uint)(1<<(x-1)))      /* FCC CLK I/O ports */
+
+#define CMXFCR_RF1CS(x)        ((uint)((x-5)<<27))     /* FCC1 Receive Clock Source */
+#define CMXFCR_TF1CS(x)        ((uint)((x-5)<<24))     /* FCC1 Transmit Clock Source */
+#define CMXFCR_RF2CS(x)        ((uint)((x-9)<<19))     /* FCC2 Receive Clock Source */
+#define CMXFCR_TF2CS(x) ((uint)((x-9)<<16))    /* FCC2 Transmit Clock Source */
+#define CMXFCR_RF3CS(x)        ((uint)((x-9)<<11))     /* FCC3 Receive Clock Source */
+#define CMXFCR_TF3CS(x) ((uint)((x-9)<<8))     /* FCC3 Transmit Clock Source */
+
+#define PC_F1RXCLK     PC_CLK(F1_RXCLK)
+#define PC_F1TXCLK     PC_CLK(F1_TXCLK)
+#define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK))
+#define CMX1_CLK_MASK  ((uint)0xff000000)
+
+#define PC_F2RXCLK     PC_CLK(F2_RXCLK)
+#define PC_F2TXCLK     PC_CLK(F2_TXCLK)
+#define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK))
+#define CMX2_CLK_MASK  ((uint)0x00ff0000)
+
+#define PC_F3RXCLK     PC_CLK(F3_RXCLK)
+#define PC_F3TXCLK     PC_CLK(F3_TXCLK)
+#define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK))
+#define CMX3_CLK_MASK  ((uint)0x0000ff00)
+
+/* I/O Pin assignment for FCC1.  I don't yet know the best way to do this,
+ * but there is little variation among the choices.
+ */
+#define PA1_COL                0x00000001U
+#define PA1_CRS                0x00000002U
+#define PA1_TXER       0x00000004U
+#define PA1_TXEN       0x00000008U
+#define PA1_RXDV       0x00000010U
+#define PA1_RXER       0x00000020U
+#define PA1_TXDAT      0x00003c00U
+#define PA1_RXDAT      0x0003c000U
+#define PA1_PSORA0     (PA1_RXDAT | PA1_TXDAT)
+#define PA1_PSORA1     (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \
+               PA1_RXDV | PA1_RXER)
+#define PA1_DIRA0      (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV)
+#define PA1_DIRA1      (PA1_TXDAT | PA1_TXEN | PA1_TXER)
+
+
+/* I/O Pin assignment for FCC2.  I don't yet know the best way to do this,
+ * but there is little variation among the choices.
+ */
+#define PB2_TXER       0x00000001U
+#define PB2_RXDV       0x00000002U
+#define PB2_TXEN       0x00000004U
+#define PB2_RXER       0x00000008U
+#define PB2_COL                0x00000010U
+#define PB2_CRS                0x00000020U
+#define PB2_TXDAT      0x000003c0U
+#define PB2_RXDAT      0x00003c00U
+#define PB2_PSORB0     (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \
+               PB2_RXER | PB2_RXDV | PB2_TXER)
+#define PB2_PSORB1     (PB2_TXEN)
+#define PB2_DIRB0      (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV)
+#define PB2_DIRB1      (PB2_TXDAT | PB2_TXEN | PB2_TXER)
+
+
+/* I/O Pin assignment for FCC3.  I don't yet know the best way to do this,
+ * but there is little variation among the choices.
+ */
+#define PB3_RXDV       0x00004000U
+#define PB3_RXER       0x00008000U
+#define PB3_TXER       0x00010000U
+#define PB3_TXEN       0x00020000U
+#define PB3_COL                0x00040000U
+#define PB3_CRS                0x00080000U
+#define PB3_TXDAT      0x0f000000U
+#define PB3_RXDAT      0x00f00000U
+#define PB3_PSORB0     (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \
+               PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN)
+#define PB3_PSORB1     0
+#define PB3_DIRB0      (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV)
+#define PB3_DIRB1      (PB3_TXDAT | PB3_TXEN | PB3_TXER)
+
+#define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128))
+#define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0)
+#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1)
+
+#endif
index d065358020030a1c506e1766e9b89c8c67b5ac93..a0fc628ffb1e512a057581893e877a91e6f41b8d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/platforms/setup.c
- *
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
  *  Modified by Cort Dougan (cort@cs.nmt.edu)
index 0bb14a5e824caba79a67d8f636ffa4f0dea3e09a..cdd9cfb13ee991a56157341cee1c399ebab888f3 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/prpmc750_setup.c
- *
  * Board setup routines for Motorola PrPMC750
  *
  * Author: Matt Porter <mporter@mvista.com>
index de7baefacd3aa43094ee4213a36206f9f72226bc..e459a199fb1d5593e29e01f05c7b98cda8139aa9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/prpmc800.c
- *
  * Author: Dale Farnsworth <dale.farnsworth@mvista.com>
  *
  * 2001-2004 (c) MontaVista, Software, Inc.  This file is licensed under
index 872c0a3ba3c798b2e1297da971d517ee30ed023a..bc26b6d71c1d1cf988d02dd4e0024a978835d9fc 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/radstone_ppc7d.c
- *
  * Board setup routines for the Radstone PPC7D boards.
  *
  * Author: James Chapman <jchapman@katalix.com>
@@ -685,11 +683,10 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev)
 
        pdata = pdev->dev.platform_data;
        if (pdata == NULL) {
-               pdata = kmalloc(sizeof(*pdata), GFP_KERNEL);
+               pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
                if (pdata == NULL)
                        return;
 
-               memset(pdata, 0, sizeof(*pdata));
                pdev->dev.platform_data = pdata;
        }
 
@@ -712,7 +709,7 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int __init ppc7d_platform_notify(struct device *dev)
+static int ppc7d_platform_notify(struct device *dev)
 {
        static struct {
                char *bus_id;
index 938375510be48bdf4ea13bcfce9bfd0aa170459c..2bb093a0c03e986e5edfc75cd32217a78df0de4b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/radstone_ppc7d.h
- *
  * Board definitions for the Radstone PPC7D boards.
  *
  * Author: James Chapman <jchapman@katalix.com>
index 9eeed35723098d842efa856d4f2da75ebbe86d5d..6dc459decb2d105d3d3cfb366f99205f8932b6a7 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/sandpoint_setup.c
- *
  * Board setup routines for the Motorola SPS Sandpoint Test Platform.
  *
  * Author: Mark A. Greer
index f4e982cb69df8f52bde4cae00b11738522d9c855..3b64e64184898b52fc6d06003363303396be314d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/sandpoint.h
- *
  * Definitions for Motorola SPS Sandpoint Test Platform
  *
  * Author: Mark A. Greer
index 74c9ff72c3ddcc319268254158c8482d0ee19b16..866807b4ad0b32ffc32b92c281180b64a4356e9b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/sbc82xx.c
- *
  * SBC82XX platform support
  *
  * Author: Guy Streeter <streeter@redhat.com>
index 69e1de7971f2d47a5d992b6bbb4a47fcd8ccf6dd..3783deccd9b28d1aa21396be566b3449d2fd629e 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/spruce.c
- *
  * Board and PCI setup routines for IBM Spruce
  *
  * Author: MontaVista Software <source@mvista.com>
index 3409139330b1d9f4d8f8ec0e742e1b0e7180045d..b766339f44ac51cbf519f99e0390c551ca2da323 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/tqm8260_setup.c
- *
  * TQM8260 platform support
  *
  * Author: Allen Curtis <acurtis@onz.com>
index 159dcd92a6d129ff8f4514a34c0331f4e6a356f7..5cb62c6a51c84c8dfec24aa076f3c34883c0df5d 100644 (file)
@@ -17,8 +17,8 @@ obj-$(CONFIG_440GX)           += ibm440gx_common.o
 obj-$(CONFIG_440SP)            += ibm440gx_common.o ibm440sp_common.o
 obj-$(CONFIG_440SPE)           += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o
 ifeq ($(CONFIG_4xx),y)
-ifeq ($(CONFIG_VIRTEX_II_PRO),y)
-obj-$(CONFIG_40x)              += xilinx_pic.o
+ifeq ($(CONFIG_XILINX_VIRTEX),y)
+obj-$(CONFIG_40x)              += xilinx_pic.o ppc_sys.o
 else
 ifeq ($(CONFIG_403),y)
 obj-$(CONFIG_40x)              += ppc403_pic.o
index f2c002531019e52289477bc35b55f78bf2c770ce..0a8a5d84390fc9767fa9bc54e37289ee0e2b21f5 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/cpc700.h
- *
  * Header file for IBM CPC700 Host Bridge, et. al.
  *
  * Author: Mark A. Greer
index 75fe8eb1069359c3d52cbc3445d0ebd5b2658f26..5add0a919ef6182695f88fee3d149bbdd985e7b5 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/cpc700_pic.c
- *
  * Interrupt controller support for IBM Spruce
  *
  * Authors: Mark Greer, Matt Porter, and Johnnie Peters
index cc0afd80402974b5d4f4c16b1822bbfbdb787885..5299bf8b5d01092365e825561ab9e05a7b47a28a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/cpc710.h
- *
  * Definitions for the IBM CPC710 PCI Host Bridge
  *
  * Author: Matt Porter <mporter@mvista.com>
index 039d249e19a890b7aa32b9361866ac2f87f7cc99..5254d3cdbca6c98c4da4cd416a515d74ffb9ac5f 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/gen550.h
- *
  * gen550 prototypes
  *
  * Matt Porter <mporter@kernel.crashing.org>
index 9ef0113c83d1e395bdc97c0c1ba549304d967333..9fcff74bfdd0893ef1515ac3e00d382ca11bf6dc 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/gen550_dbg.c
- *
  * A library of polled 16550 serial routines.  These are intended to
  * be used to support progress messages, xmon, kgdb, etc. on a
  * variety of platforms.
index 7239d5d7ddcdca1d469dbb55d3e3f69f69c63359..874078a7664dc66ccdc3f1137ea5b3382cd7e093 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/gen550_kgdb.c
- *
  * Generic 16550 kgdb support intended to be useful on a variety
  * of platforms.  To enable this support, it is necessary to set
  * the CONFIG_GEN550 option.  Any virtual mapping of the serial
index f97b3a9abd1e48137da4cc0a6eeb6a5d7a2a862d..dc3bd9ecbbf6956c88079e1fc5a40e27c3c774f9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/gt64260_pic.c
- *
  * Interrupt controller support for Galileo's GT64260.
  *
  * Author: Chris Zankel <source@mvista.com>
index a6b3f86457932144ab87895bb39c1bfdde4d223c..c1583f4883254b81fff33f7562008d47004eaad0 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/harrier.c
- *
  * Motorola MCG Harrier northbridge/memory controller support
  *
  * Author: Dale Farnsworth
index a9911dc3a82f9a4b302310c209b38503f3a991bf..c5bf16b0d6a182327372a478c82496d9730b43a5 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/hawk_common.c
- *
  * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK.
  *
  * Author: Mark A. Greer
index 0d6be2d6dd6794c507789bd8c7e8fc7f9e37dc0c..fbaae5f6d8344e9f072ec7b773d75ccb02c57239 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ibm440gp_common.c
- *
  * PPC440GP system library
  *
  * Matt Porter <mporter@mvista.com>
index a054d83cb1ac50006310b29c13c4f643d9ea3447..f48529f3c23d7207316e67aff33dfb56720b3f1c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/ibm440gp_common.h
- *
  * PPC440GP system library
  *
  * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
index c36db279b43daa7f2ccb77c02e602e6cf57d57de..a7dd55f1c63e126f604227f249aefe648039d2db 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/ibm440gx_common.c
- *
  * PPC440GX system library
  *
  * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
index e73aa0411d3587ff9885c8f8a1b76fe8a45537bd..a2ab9fab8e34a555627da881d150989967e8455c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/ibm440gx_common.h
- *
  * PPC440GX system library
  *
  * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
index cdafda127d81f1a5615e133f110e53513542671f..293e4138d172e12b1d70054e97c87abfc27bd452 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ibm440sp_common.c
- *
  * PPC440SP/PPC440SPe system library
  *
  * Matt Porter <mporter@kernel.crashing.org>
index a21a9906dcc9ed42d2b9ed0fcfbc8cc9b8e48b31..8077bf8ed118a5adbdf494897acf4842f17f2861 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ibm440sp_common.h
- *
  * PPC440SP system library
  *
  * Matt Porter <mporter@kernel.crashing.org>
index 71db11d2215840016704ff8768418e655358f3b2..14a981a5cea72413ae496d41cdaf8b429cc8791d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ibm44x_common.c
- *
  * PPC44x system library
  *
  * Matt Porter <mporter@kernel.crashing.org>
index b25a8995e4e9c9b3b0d1952162aaa551a0d826c8..f179db8634e088f36d26f0cfbfaa2bed8b588cd6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/ibm44x_common.h
- *
  * PPC44x system library
  *
  * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
index 1dc7e4e1d4914ed5d11f583b944de475092436d7..99e4bc0e42af00b0c7b99b440ccb9f44ac425766 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/mpc8260_pci9.c
- *
  * Workaround for device erratum PCI 9.
  * See Motorola's "XPC826xA Family Device Errata Reference."
  * The erratum applies to all 8260 family Hip4 processors.  It is scheduled 
index 76a2aa4ce65e17ecfb16ca566c0d90c1ac8e59df..b7a6cb2d8d526b7f6273c4653009fea99e40827e 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/syslib/m8260_setup.c
- *
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
  *  Modified by Cort Dougan (cort@cs.nmt.edu)
index 688616de3cde5ceebdc980a306b66faf60351614..dae9af78bde1ba4674f889be162f87312bbe0733 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/setup.c
- *
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
  *  Modified by Cort Dougan (cort@cs.nmt.edu)
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
 
+#if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP)
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#endif
+
 #include <asm/mmu.h>
 #include <asm/reg.h>
 #include <asm/residual.h>
 
 #include "ppc8xx_pic.h"
 
+#ifdef CONFIG_MTD_PHYSMAP
+#define MPC8xxADS_BANK_WIDTH 4
+#endif
+
+#define MPC8xxADS_U_BOOT_SIZE          0x80000
+#define MPC8xxADS_FREE_AREA_OFFSET     MPC8xxADS_U_BOOT_SIZE
+
+#if defined(CONFIG_MTD_PARTITIONS)
+ /*
+   NOTE: bank width and interleave relative to the installed flash
+   should have been chosen within MTD_CFI_GEOMETRY options.
+ */
+static struct mtd_partition mpc8xxads_partitions[] = {
+       {
+               .name = "bootloader",
+               .size = MPC8xxADS_U_BOOT_SIZE,
+               .offset = 0,
+               .mask_flags   = MTD_WRITEABLE,  /* force read-only */
+       }, {
+               .name = "User FS",
+               .offset = MPC8xxADS_FREE_AREA_OFFSET
+       }
+};
+
+#define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0]))
+
+#endif
+
 static int m8xx_set_rtc_time(unsigned long time);
 static unsigned long m8xx_get_rtc_time(void);
 void m8xx_calibrate_decr(void);
@@ -71,6 +104,10 @@ board_init(void)
 void __init
 m8xx_setup_arch(void)
 {
+#if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP)
+       bd_t *binfo = (bd_t *)__res;
+#endif
+
        /* Reset the Communication Processor Module.
        */
        m8xx_cpm_reset();
@@ -106,6 +143,17 @@ m8xx_setup_arch(void)
        }
 #endif
 #endif
+
+#if defined (CONFIG_MPC86XADS) || defined (CONFIG_MPC885ADS)
+#if defined(CONFIG_MTD_PHYSMAP)
+       physmap_configure(binfo->bi_flashstart, binfo->bi_flashsize,
+                                               MPC8xxADS_BANK_WIDTH, NULL);
+#ifdef CONFIG_MTD_PARTITIONS
+       physmap_set_partitions(mpc8xxads_partitions, mpc8xxads_part_num);
+#endif /* CONFIG_MTD_PARTITIONS */
+#endif /* CONFIG_MTD_PHYSMAP */
+#endif
+
        board_init();
 }
 
@@ -140,9 +188,11 @@ void __init __attribute__ ((weak))
 init_internal_rtc(void)
 {
        /* Disable the RTC one second and alarm interrupts. */
-       out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) & ~(RTCSC_SIE | RTCSC_ALE));
+       clrbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_SIE | RTCSC_ALE));
+
        /* Enable the RTC */
-       out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) | (RTCSC_RTF | RTCSC_RTE));
+       setbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_RTF | RTCSC_RTE));
+
 }
 
 /* The decrementer counts at the system (internal) clock frequency divided by
@@ -159,8 +209,7 @@ void __init m8xx_calibrate_decr(void)
        out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY);
 
        /* Force all 8xx processors to use divide by 16 processor clock. */
-       out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr,
-               in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr)|0x02000000);
+       setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, 0x02000000);
        /* Processor frequency is MHz.
         * The value 'fp' is the number of decrementer ticks per second.
         */
@@ -239,8 +288,8 @@ m8xx_restart(char *cmd)
        __volatile__ unsigned char dummy;
 
        local_irq_disable();
-       out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr) | 0x00000080);
 
+       setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, 0x00000080);
        /* Clear the ME bit in MSR to cause checkstop on machine check
        */
        mtmsr(mfmsr() & ~0x1000);
@@ -310,8 +359,8 @@ m8xx_init_IRQ(void)
        i8259_init(0);
 
        /* The i8259 cascade interrupt must be level sensitive. */
-       out_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, in_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel & ~(0x80000000 >> ISA_BRIDGE_INT)));
 
+       clrbits32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, (0x80000000 >> ISA_BRIDGE_INT));
        if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction))
                enable_irq(ISA_BRIDGE_INT);
 #endif /* CONFIG_PCI */
index df6c9557b86a4f4889221ef2038d3100cd121898..ac11d7bab443840c193a6b0c741a7ba31b3663b2 100644 (file)
@@ -41,8 +41,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs)
 
        m8xx_wdt_reset();
 
-       out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */
-
+       setbits16(&imap->im_sit.sit_piscr, PISCR_PS);
        return IRQ_HANDLED;
 }
 
index 3e039706bdbcbc350430d068bd965c65757dd5a2..2fc7c4150a18890f94c6fc851e0ab6f66a18419b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc10x_common.c
- *
  * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge,
  * Mem ctlr, EPIC, etc.
  *
index da3c74bfdc9271cb637c9fb90d09b4f0e93724a4..7487539a4e9295d6f8f78eeeb256de67a00e56a5 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc52xx_devices.c
- *
  * Freescale MPC52xx device descriptions
  *
  *
index 313c96ec7eb1a636e664786d8eef76f88c42c522..9ec525f9fe98c910235c65fb5efa5f94bcf71638 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc52xx_pci.c
- *
  * PCI code for the Freescale MPC52xx embedded CPU.
  *
  *
index 04b509a02530d306ca77f8829079fddcfd83e81d..77d47dbba85e207823a895a63691b0a5e36efb4f 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc52xx_pci.h
- *
  * PCI Include file the Freescale MPC52xx embedded cpu chips
  *
  *
index 4c4497e62517daec2c0cf0b9778c176aa1e042f3..c4406f9dc6a3d0d8c2174524533b914a4313f1af 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc52xx_pic.c
- *
  * Programmable Interrupt Controller functions for the Freescale MPC52xx 
  * embedded CPU.
  *
index a4a4b02227df6c7fa06baa85d3dad5b3a828514d..2ee48ce0a517f83d5eaec683fed4657dc27ea767 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc52xx_setup.c
- *
  * Common code for the boards based on Freescale MPC52xx embedded CPU.
  *
  * 
index 9a0f90aa8aac8e4eaedea124ab964c0029f36b6e..b4e6f978f05795b6fe99dbfb6ee1b3afff9cfe92 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc52xx_sys.c
- *
  * Freescale MPC52xx system descriptions
  *
  *
index f9b95de70e230260a6f4e3b7d9cf0655719b90a8..1af2c000fcfa6ebdf47fdc9b9e3072fd9fdc948e 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/83xx/mpc83xx_devices.c
- *
  * MPC83xx Device descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 82cf3ab77f4a67b08e2c108bdfd28cf94769287a..0498ae7e01e3410c829e07674cae750ae929ca34 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/83xx/mpc83xx_sys.c
- *
  * MPC83xx System descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 00e9b6ff2f6e39f1931ab3cdfdb93e7bac4ebdd9..7735336f5b8f51b758587053736c0f18ffad9ae9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc85xx_devices.c
- *
  * MPC85xx Device descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 397cfbcce5ea10b88e4834385415809de26b4c0e..d96a93dbcb5a48b1019ba634f93799fd1df03428 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/85xx/mpc85xx_sys.c
- *
  * MPC85xx System descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 92dc98b36bdeffb3145d4a2057bb0eb975db5235..bd41ed83beb357f99607ba8b319ad488d80b566e 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc8xx_devices.c
- *
  * MPC8xx Device descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index d3c61752160398411682e2f0986c9461305ce1b4..eee2132848559c3810adc2b7d5b95a2e2e71a2d0 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/mpc8xx_sys.c
- *
  * MPC8xx System descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 58b0aa813e85e512542a23a3e593561682ce1401..5a19697060f0290ba124adb2fca72001ad82e0a3 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/mv64360_pic.c
- *
  * Interrupt controller support for Marvell's MV64360.
  *
  * Author: Rabeeh Khoury <rabeeh@galileo.co.il>
index 1f01b7e2376b97a1f258eb2c0fdcb7abe955d91f..3b039c30a439adfc2b8168285bd5418f12738fff 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mv64x60.c
- *
  * Common routines for the Marvell/Galileo Discovery line of host bridges
  * (gt64260, mv64360, mv64460, ...).
  *
index fa5b2e45e0ca54cc52b6a748ca67e6efaac0c105..9cf18764a1a145d33584181a2f37cd0c6998d938 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mv64x60_dbg.c
- *
  * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery).
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
index 5b827e2bbe22f47a3d3b2e5ff44df82a4a65c384..4bf1ad17bf1a6bdc9fd2f2ad19d6b4aa95fe01e6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mv64x60_win.c
- *
  * Tables with info on how to manipulate the 32 & 64 bit windows on the
  * various types of Marvell bridge chips.
  *
index 2fe28ded2c6096080be6bd0665135466dfc1e089..a4ecc2ee579ff781f567ef961aa6004b30b585da 100644 (file)
@@ -451,10 +451,9 @@ ocp_driver_init(void)
        DBG(("ocp: ocp_driver_init()...\n"));
 
        /* Allocate/register primary OCP bus */
-       ocp_bus = kmalloc(sizeof(struct device), GFP_KERNEL);
+       ocp_bus = kzalloc(sizeof(struct device), GFP_KERNEL);
        if (ocp_bus == NULL)
                return 1;
-       memset(ocp_bus, 0, sizeof(struct device));
        strcpy(ocp_bus->bus_id, "ocp");
 
        bus_register(&ocp_bus_type);
index 894779712b4614fbb517ffd23e3435fd76b835f7..38e5b93fbe41f0e8dc6da26fdfd86d6eb67745c0 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling
- *
  *  Copyright (C) 1997 Geert Uytterhoeven
  *
  *  This file is subject to the terms and conditions of the GNU General Public
index 1c40049b9a45b3fb53b9edb7e01a074fb706bc9e..bcbe40de26fe511cf42aba2faa98ff449a7f00d9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling
- *
  *  Copyright (C) 1997 Geert Uytterhoeven
  *
  *  This file is subject to the terms and conditions of the GNU General Public
index 6c94e713146353752a698fe09d951151718ebafe..3a25de7cb5728711506942d02a77b38cc51045e2 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/open_pic_defs.h -- OpenPIC definitions
- *
  *  Copyright (C) 1997 Geert Uytterhoeven
  *
  *  This file is based on the following documentation:
index d64207c2a972e3028a7730cd922002d1290465ff..ee20a86fcc4ba5295495ca0c535d0ec26e1dfeb1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/pci_auto.c
- *
  * PCI autoconfiguration library
  *
  * Author: Matt Porter <mporter@mvista.com>
index 05ccd598dd4ec717da856ca6b12eaef4df555851..b40b96a8c609ad341fa1e720aaa0ce161b45819b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/ppc4xx_dma.c
- *
  * IBM PPC4xx DMA engine core library
  *
  * Copyright 2000-2004 MontaVista Software Inc.
index aa4165144ec27481c61ea55b286d5c51557e34a0..fd9af0fc0e9f43ddce46abdba519b73e6c6c1810 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc4xx_pic.c
- *
  * Interrupt controller driver for PowerPC 4xx-based processors.
  *
  * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
diff --git a/arch/ppc/syslib/ppc4xx_pm.c b/arch/ppc/syslib/ppc4xx_pm.c
deleted file mode 100644 (file)
index 60a4792..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Author: Armin Kuster <akuster@mvista.com>
- *
- * 2002 (c) MontaVista, Software, Inc.  This file is licensed under
- * the terms of the GNU General Public License version 2.  This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- *
- * This an attempt to get Power Management going for the IBM 4xx processor.
- * This was derived from the ppc4xx._setup.c file
- */
-
-#include <linux/config.h>
-#include <linux/init.h>
-
-#include <asm/ibm4xx.h>
-
-void __init
-ppc4xx_pm_init(void)
-{
-
-       unsigned int value = 0;
-
-       /* turn off unused hardware to save power */
-#ifdef CONFIG_405GP
-       value |= CPM_DCP;       /* CodePack */
-#endif
-
-#if !defined(CONFIG_IBM_OCP_GPIO)
-       value |= CPM_GPIO0;
-#endif
-
-#if !defined(CONFIG_PPC405_I2C_ADAP)
-       value |= CPM_IIC0;
-#ifdef CONFIG_STB03xxx
-       value |= CPM_IIC1;
-#endif
-#endif
-
-
-#if !defined(CONFIG_405_DMA)
-       value |= CPM_DMA;
-#endif
-
-       mtdcr(DCRN_CPMFR, value);
-
-}
index 9f76e8ee39edc4c8d8d46b5c9b09f83f6111ad42..280ea010a9c8e735714b1541b5c1a646078ea3de 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/ppc4xx_sgdma.c
- *
  * IBM PPC4xx DMA engine scatter/gather library
  *
  * Copyright 2002-2003 MontaVista Software Inc.
index 7bada82527a892257b9f6f0c13834b4ef851faca..26afd637dc81806b1147be07e54b2cf9b87a808f 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc83xx_setup.c
- *
  * MPC83XX common board code
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index a122a7322e5eeda3d5c1457985e3aea0a213b16c..478b011cd963305bfe85700716e479bfd5133f86 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc83xx_setup.h
- *
  * MPC83XX common board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 19ad537225e4340c4c49485e082490144ecbd0ac..0145c968f9adf70777b464b6290cd944af89679b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc85xx_common.c
- *
  * MPC85xx support routines
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 94edf32151dda0a80de4193d3a1550d41783562d..182744a1321c3d85d80fe00a5f9b942c398a6709 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc85xx_common.h
- *
  * MPC85xx support routines
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index e4dda43fdaa7bb99e3ff2ca032aa924171b73f95..e70b34ee627519b977eb8a671a84d071843eb6c2 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc85xx_setup.c
- *
  * MPC85XX common board code
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index e340b0545fb5e2bbc7842ecba8066c75ccac53bf..f55b8032d3d946c117f9f8d3a9684a350e903fc1 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc85xx_setup.h
- *
  * MPC85XX common board definitions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index c0b93c4191eeac2b73e1803b1646bb61f61e4e3c..60c724e1158499e6c136542447c96f9a13ddce96 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/ppc_sys.c
- *
  * PPC System library functions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
  */
 
 #include <linux/string.h>
+#include <linux/bootmem.h>
 #include <asm/ppc_sys.h>
 
 int (*ppc_sys_device_fixup) (struct platform_device * pdev);
 
 static int ppc_sys_inited;
+static int ppc_sys_func_inited;
+
+static const char *ppc_sys_func_names[] = {
+       [PPC_SYS_FUNC_DUMMY] = "dummy",
+       [PPC_SYS_FUNC_ETH] = "eth",
+       [PPC_SYS_FUNC_UART] = "uart",
+       [PPC_SYS_FUNC_HLDC] = "hldc",
+       [PPC_SYS_FUNC_USB] = "usb",
+       [PPC_SYS_FUNC_IRDA] = "irda",
+};
 
 void __init identify_ppc_sys_by_id(u32 id)
 {
@@ -38,13 +47,13 @@ void __init identify_ppc_sys_by_id(u32 id)
 void __init identify_ppc_sys_by_name(char *name)
 {
        unsigned int i = 0;
-       while (ppc_sys_specs[i].ppc_sys_name[0])
-       {
+       while (ppc_sys_specs[i].ppc_sys_name[0]) {
                if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name))
                        break;
                i++;
        }
        cur_ppc_sys_spec = &ppc_sys_specs[i];
+
        return;
 }
 
@@ -128,6 +137,165 @@ void ppc_sys_device_remove(enum ppc_sys_devices dev)
        }
 }
 
+/* Platform-notify mapping
+ * Helper function for BSP code to assign board-specific platfom-divice bits
+ */
+
+void platform_notify_map(const struct platform_notify_dev_map *map,
+                        struct device *dev)
+{
+       struct platform_device *pdev;
+       int len, idx;
+       const char *s;
+
+       /* do nothing if no device or no bus_id */
+       if (!dev || !dev->bus_id)
+               return;
+
+       /* call per device map */
+       while (map->bus_id != NULL) {
+               idx = -1;
+               s = strrchr(dev->bus_id, '.');
+               if (s != NULL)
+                       idx = (int)simple_strtol(s + 1, NULL, 10);
+               else
+                       s = dev->bus_id;
+
+               len = s - dev->bus_id;
+
+               if (!strncmp(dev->bus_id, map->bus_id, len)) {
+                       pdev = container_of(dev, struct platform_device, dev);
+                       map->rtn(pdev, idx);
+               }
+               map++;
+       }
+}
+
+/*
+   Function assignment stuff.
+ Intended to work as follows:
+ the device name defined in foo_devices.c will be concatenated with :"func",
+ where func is string map of respective function from platfom_device_func enum
+
+ The PPC_SYS_FUNC_DUMMY function is intended to remove all assignments, making the device to appear
+ in platform bus with unmodified name.
+ */
+
+/*
+   Here we'll replace .name pointers with fixed-lenght strings
+   Hereby, this should be called *before* any func stuff triggeded.
+ */
+void ppc_sys_device_initfunc(void)
+{
+       int i;
+       const char *name;
+       static char new_names[NUM_PPC_SYS_DEVS][BUS_ID_SIZE];
+       enum ppc_sys_devices cur_dev;
+
+       /* If inited yet, do nothing */
+       if (ppc_sys_func_inited)
+               return;
+
+       for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) {
+               if ((cur_dev = cur_ppc_sys_spec->device_list[i]) < 0)
+                       continue;
+
+               if (ppc_sys_platform_devices[cur_dev].name) {
+                       /*backup name */
+                       name = ppc_sys_platform_devices[cur_dev].name;
+                       strlcpy(new_names[i], name, BUS_ID_SIZE);
+                       ppc_sys_platform_devices[cur_dev].name = new_names[i];
+               }
+       }
+
+       ppc_sys_func_inited = 1;
+}
+
+/*The "engine" of the func stuff. Here we either concat specified function string description
+ to the name, or remove it if PPC_SYS_FUNC_DUMMY parameter is passed here*/
+void ppc_sys_device_setfunc(enum ppc_sys_devices dev,
+                           enum platform_device_func func)
+{
+       char *s;
+       char *name = (char *)ppc_sys_platform_devices[dev].name;
+       char tmp[BUS_ID_SIZE];
+
+       if (!ppc_sys_func_inited) {
+               printk(KERN_ERR "Unable to alter function - not inited!\n");
+               return;
+       }
+
+       if (ppc_sys_inited) {
+               platform_device_unregister(&ppc_sys_platform_devices[dev]);
+       }
+
+       if ((s = (char *)strchr(name, ':')) != NULL) {  /* reassign */
+               /* Either change the name after ':' or remove func modifications */
+               if (func != PPC_SYS_FUNC_DUMMY)
+                       strlcpy(s + 1, ppc_sys_func_names[func], BUS_ID_SIZE);
+               else
+                       *s = 0;
+       } else if (func != PPC_SYS_FUNC_DUMMY) {
+               /* do assignment if it is not just "clear"  request */
+               sprintf(tmp, "%s:%s", name, ppc_sys_func_names[func]);
+               strlcpy(name, tmp, BUS_ID_SIZE);
+       }
+
+       if (ppc_sys_inited) {
+               platform_device_register(&ppc_sys_platform_devices[dev]);
+       }
+}
+
+void ppc_sys_device_disable(enum ppc_sys_devices dev)
+{
+       BUG_ON(cur_ppc_sys_spec == NULL);
+
+       /*Check if it is enabled*/
+       if(!(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED)) {
+               if (ppc_sys_inited) {
+                       platform_device_unregister(&ppc_sys_platform_devices[dev]);
+               }
+               cur_ppc_sys_spec->config[dev] |= PPC_SYS_CONFIG_DISABLED;
+       }
+}
+
+void ppc_sys_device_enable(enum ppc_sys_devices dev)
+{
+       BUG_ON(cur_ppc_sys_spec == NULL);
+
+       /*Check if it is disabled*/
+       if(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED) {
+               if (ppc_sys_inited) {
+                       platform_device_register(&ppc_sys_platform_devices[dev]);
+               }
+               cur_ppc_sys_spec->config[dev] &= ~PPC_SYS_CONFIG_DISABLED;
+       }
+
+}
+
+void ppc_sys_device_enable_all(void)
+{
+       enum ppc_sys_devices cur_dev;
+       int i;
+
+       for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) {
+               cur_dev = cur_ppc_sys_spec->device_list[i];
+               ppc_sys_device_enable(cur_dev);
+       }
+}
+
+void ppc_sys_device_disable_all(void)
+{
+       enum ppc_sys_devices cur_dev;
+       int i;
+
+       for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) {
+               cur_dev = cur_ppc_sys_spec->device_list[i];
+               ppc_sys_device_disable(cur_dev);
+       }
+}
+
+
 static int __init ppc_sys_init(void)
 {
        unsigned int i, dev_id, ret = 0;
@@ -136,7 +304,8 @@ static int __init ppc_sys_init(void)
 
        for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) {
                dev_id = cur_ppc_sys_spec->device_list[i];
-               if (dev_id != -1) {
+               if ((dev_id != -1) &&
+               !(cur_ppc_sys_spec->config[dev_id] & PPC_SYS_CONFIG_DISABLED)) {
                        if (ppc_sys_device_fixup != NULL)
                                ppc_sys_device_fixup(&ppc_sys_platform_devices
                                                     [dev_id]);
index 6ff3aab82fc3374c362951b82ab70d36315e3c16..0636aed7b8271b2f9357c27a6cb9da1a9a63c31b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/pq2_devices.c
- *
  * PQ2 Device descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 36d6e217994019200f0ccb390a8ac47e88721c6f..75e64f1c144d7fd6ff7462d1fe2b36cc6627698c 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/pq2_devices.c
- *
  * PQ2 System descriptions
  *
  * Maintainer: Kumar Gala <galak@kernel.crashing.org>
index 2c6364d9641fa4223812b6c38b50c47538b756b9..474dccbc4a8a9eff06be27bde3614e652e05e722 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/prep_nvram.c
- *
  * Copyright (C) 1998  Corey Minyard
  *
  * This reads the NvRAM on PReP compliant machines (generally from IBM or
index 1323c641c19d6e3a4b17a1388d1ef93c38fbe29e..a8168b8e5683b1fa94a6344a340e2ae28158a6ef 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/todc_time.c
- *
  * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818
  * Real Time Clocks/Timekeepers.
  *
index 47f04c71fe9c023bdcf17f119b380b096eeecc69..e672b600f315499a50b84a5ee5750e86f0e8e5c7 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/xilinx_pic.c
- *
  * Interrupt controller driver for Xilinx Virtex-II Pro.
  *
  * Author: MontaVista Software, Inc.
@@ -15,7 +13,7 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <asm/io.h>
-#include <asm/xparameters.h>
+#include <platforms/4xx/xparameters/xparameters.h>
 #include <asm/ibm4xx.h>
 #include <asm/machdep.h>
 
index 05ba410682a34db47c55e973e4391c43c601f3f6..b524f5ba78a962644994e60c01add424040967fb 100644 (file)
@@ -695,7 +695,7 @@ config NVRAM
 
 config RTC
        tristate "Enhanced Real Time Clock Support"
-       depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) && !FRV
+       depends on !PPC && !PARISC && !IA64 && !M68K && (!SPARC || PCI) && !FRV
        ---help---
          If you say Y here and create a character special file /dev/rtc with
          major number 10 and minor number 135 using mknod ("man mknod"), you
index 831eb4e8d9d372afd9e79eec2debb0367d9780e4..f7ac31856572a141b328a5b94ca43035978bcc36 100644 (file)
  * the hvcs_final_close() function in order to get it out of the spinlock.
  * Rearranged hvcs_close().  Cleaned up some printks and did some housekeeping
  * on the changelog.  Removed local CLC_LENGTH and used HVCS_CLC_LENGTH from
- * arch/ppc64/hvcserver.h.
+ * include/asm-powerpc/hvcserver.h 
  *
  * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to
  * prevent possible lockup with realtime scheduling as similarily pointed out by
@@ -168,9 +168,10 @@ MODULE_VERSION(HVCS_DRIVER_VERSION);
 
 /*
  * The hcall interface involves putting 8 chars into each of two registers.
- * We load up those 2 registers (in arch/ppc64/hvconsole.c) by casting char[16]
- * to long[2].  It would work without __ALIGNED__, but a little (tiny) bit
- * slower because an unaligned load is slower than aligned load.
+ * We load up those 2 registers (in arch/powerpc/platforms/pseries/hvconsole.c)
+ * by casting char[16] to long[2].  It would work without __ALIGNED__, but a 
+ * little (tiny) bit slower because an unaligned load is slower than aligned 
+ * load.
  */
 #define __ALIGNED__    __attribute__((__aligned__(8)))
 
index 69596f6438e9d5a6d37d4dc38c931332ab5e4d1b..431bd37225a13a05be8891b44de545e88b5802c1 100644 (file)
@@ -550,15 +550,12 @@ static void macio_pci_add_devices(struct macio_chip *chip)
  */
 int macio_register_driver(struct macio_driver *drv)
 {
-       int count = 0;
-
        /* initialize common driver fields */
        drv->driver.name = drv->name;
        drv->driver.bus = &macio_bus_type;
 
        /* register with core */
-       count = driver_register(&drv->driver);
-       return count ? count : 1;
+       return driver_register(&drv->driver);
 }
 
 /**
index db2ae71d07ef08511f480c5f6b7978b68772daaa..4eb05d7143d80281f9f610373ad4af8cb5abb37d 100644 (file)
@@ -629,8 +629,6 @@ static struct of_platform_driver smu_of_platform_driver =
 
 static int __init smu_init_sysfs(void)
 {
-       int rc;
-
        /*
         * Due to sysfs bogosity, a sysdev is not a real device, so
         * we should in fact create both if we want sysdev semantics
@@ -639,7 +637,7 @@ static int __init smu_init_sysfs(void)
         * I'm a bit too far from figuring out how that works with those
         * new chipsets, but that will come back and bite us
         */
-       rc = of_register_driver(&smu_of_platform_driver);
+       of_register_driver(&smu_of_platform_driver);
        return 0;
 }
 
index 4f50ee5767a23eff6b58a8082ceb2c5f1ea15e11..231146f439dddd841508b049d9aeaa14a9506468 100644 (file)
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
-#include <linux/i2c.h>
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/reboot.h>
 #include <linux/kmod.h>
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/io.h>
index 4a478eb0e27dabfa73b169072090abadfea2e143..4f5f3abc9cb3295c34529e9aff1340b7488b910f 100644 (file)
@@ -161,7 +161,9 @@ static int drop_interrupts;
 #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
 static int option_lid_wakeup = 1;
 #endif /* CONFIG_PM && CONFIG_PPC32 */
+#if (defined(CONFIG_PM)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT)
 static int sleep_in_progress;
+#endif
 static unsigned long async_req_locks;
 static unsigned int pmu_irq_stats[11];
 
@@ -2201,8 +2203,7 @@ pmac_wakeup_devices(void)
 #define        GRACKLE_NAP     (1<<4)
 #define        GRACKLE_SLEEP   (1<<3)
 
-int
-powerbook_sleep_grackle(void)
+static int powerbook_sleep_grackle(void)
 {
        unsigned long save_l2cr;
        unsigned short pmcr1;
index 423bfa2432c02ad4939219c40e2a177f33cf0f8c..3f7967feaf5b7e7900c3134e40cb5b3f33fef493 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 #include <linux/wait.h>
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/io.h>
index 8e99d408fddd5c62db695acb61266fe9b70b9b88..eae1189d6c41f6755636629df11621e6ef2d76a6 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 #include <asm/prom.h>
 #include <asm/pmac_low_i2c.h>
 
index 24e51d5e97fcec199558cd76a81eb0d0486058cf..e295a07a1ebcaf535a389d501c83e06f88cd4056 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/init.h>
 #include <linux/wait.h>
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 #include <asm/semaphore.h>
 #include <asm/prom.h>
 #include <asm/smu.h>
index 00993e8ba589812995d4ad140de2b6bad4e08f02..e20b849a22e8e59a4f3fb06304b1f190d840c050 100644 (file)
@@ -2172,6 +2172,7 @@ config BNX2
 config SPIDER_NET
        tristate "Spider Gigabit Ethernet driver"
        depends on PCI && PPC_CELL
+       select FW_LOADER
        help
          This driver supports the Gigabit Ethernet chips present on the
          Cell Processor-Based Blades from IBM.
index 147a38dcc766ed20129a497080bbcb42cd1026b2..bb3c0ab7e66771d5494b3798528fef3db602bc00 100644 (file)
@@ -8,6 +8,7 @@
 typedef struct { volatile int counter; } atomic_t;
 
 #ifdef __KERNEL__
+#include <linux/compiler.h>
 #include <asm/synch.h>
 #include <asm/asm-compat.h>
 
@@ -176,20 +177,29 @@ static __inline__ int atomic_dec_return(atomic_t *v)
  * Atomically adds @a to @v, so long as it was not @u.
  * Returns non-zero if @v was not @u, and zero otherwise.
  */
-#define atomic_add_unless(v, a, u)                     \
-({                                                     \
-       int c, old;                                     \
-       c = atomic_read(v);                             \
-       for (;;) {                                      \
-               if (unlikely(c == (u)))                 \
-                       break;                          \
-               old = atomic_cmpxchg((v), c, c + (a));  \
-               if (likely(old == c))                   \
-                       break;                          \
-               c = old;                                \
-       }                                               \
-       c != (u);                                       \
-})
+static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
+{
+       int t;
+
+       __asm__ __volatile__ (
+       LWSYNC_ON_SMP
+"1:    lwarx   %0,0,%1         # atomic_add_unless\n\
+       cmpw    0,%0,%3 \n\
+       beq-    2f \n\
+       add     %0,%2,%0 \n"
+       PPC405_ERR77(0,%2)
+"      stwcx.  %0,0,%1 \n\
+       bne-    1b \n"
+       ISYNC_ON_SMP
+"      subf    %0,%2,%0 \n\
+2:"
+       : "=&r" (t)
+       : "r" (&v->counter), "r" (a), "r" (u)
+       : "cc", "memory");
+
+       return t != u;
+}
+
 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
 
 #define atomic_sub_and_test(a, v)      (atomic_sub_return((a), (v)) == 0)
index 5638518968c3d8a9b2c543983d5eb389505ca0b5..fe45f6f3a4bee59fa4d4757834190ff4c5e44b96 100644 (file)
@@ -102,38 +102,40 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
 #define CPU_FTR_NEED_COHERENT          ASM_CONST(0x0000000000020000)
 #define CPU_FTR_NO_BTIC                        ASM_CONST(0x0000000000040000)
 #define CPU_FTR_BIG_PHYS               ASM_CONST(0x0000000000080000)
-#define CPU_FTR_NODSISRALIGN           ASM_CONST(0x0000000000100000)
+#define CPU_FTR_NODSISRALIGN           ASM_CONST(0x0000000000100000)
 
 #ifdef __powerpc64__
 /* Add the 64b processor unique features in the top half of the word */
-#define CPU_FTR_SLB                    ASM_CONST(0x0000000100000000)
-#define CPU_FTR_16M_PAGE               ASM_CONST(0x0000000200000000)
-#define CPU_FTR_TLBIEL                         ASM_CONST(0x0000000400000000)
-#define CPU_FTR_NOEXECUTE              ASM_CONST(0x0000000800000000)
-#define CPU_FTR_IABR                   ASM_CONST(0x0000002000000000)
-#define CPU_FTR_MMCRA                          ASM_CONST(0x0000004000000000)
+#define CPU_FTR_SLB                    ASM_CONST(0x0000000100000000)
+#define CPU_FTR_16M_PAGE               ASM_CONST(0x0000000200000000)
+#define CPU_FTR_TLBIEL                 ASM_CONST(0x0000000400000000)
+#define CPU_FTR_NOEXECUTE              ASM_CONST(0x0000000800000000)
+#define CPU_FTR_IABR                   ASM_CONST(0x0000002000000000)
+#define CPU_FTR_MMCRA                  ASM_CONST(0x0000004000000000)
 #define CPU_FTR_CTRL                   ASM_CONST(0x0000008000000000)
-#define CPU_FTR_SMT                    ASM_CONST(0x0000010000000000)
-#define CPU_FTR_COHERENT_ICACHE        ASM_CONST(0x0000020000000000)
+#define CPU_FTR_SMT                    ASM_CONST(0x0000010000000000)
+#define CPU_FTR_COHERENT_ICACHE                ASM_CONST(0x0000020000000000)
 #define CPU_FTR_LOCKLESS_TLBIE         ASM_CONST(0x0000040000000000)
 #define CPU_FTR_MMCRA_SIHV             ASM_CONST(0x0000080000000000)
 #define CPU_FTR_CI_LARGE_PAGE          ASM_CONST(0x0000100000000000)
 #define CPU_FTR_PAUSE_ZERO             ASM_CONST(0x0000200000000000)
+#define CPU_FTR_PURR                   ASM_CONST(0x0000400000000000)
 #else
 /* ensure on 32b processors the flags are available for compiling but
  * don't do anything */
-#define CPU_FTR_SLB                    ASM_CONST(0x0)
-#define CPU_FTR_16M_PAGE               ASM_CONST(0x0)
-#define CPU_FTR_TLBIEL                         ASM_CONST(0x0)
-#define CPU_FTR_NOEXECUTE              ASM_CONST(0x0)
-#define CPU_FTR_IABR                   ASM_CONST(0x0)
-#define CPU_FTR_MMCRA                          ASM_CONST(0x0)
+#define CPU_FTR_SLB                    ASM_CONST(0x0)
+#define CPU_FTR_16M_PAGE               ASM_CONST(0x0)
+#define CPU_FTR_TLBIEL                 ASM_CONST(0x0)
+#define CPU_FTR_NOEXECUTE              ASM_CONST(0x0)
+#define CPU_FTR_IABR                   ASM_CONST(0x0)
+#define CPU_FTR_MMCRA                  ASM_CONST(0x0)
 #define CPU_FTR_CTRL                   ASM_CONST(0x0)
-#define CPU_FTR_SMT                    ASM_CONST(0x0)
-#define CPU_FTR_COHERENT_ICACHE        ASM_CONST(0x0)
+#define CPU_FTR_SMT                    ASM_CONST(0x0)
+#define CPU_FTR_COHERENT_ICACHE                ASM_CONST(0x0)
 #define CPU_FTR_LOCKLESS_TLBIE         ASM_CONST(0x0)
 #define CPU_FTR_MMCRA_SIHV             ASM_CONST(0x0)
 #define CPU_FTR_CI_LARGE_PAGE          ASM_CONST(0x0)
+#define CPU_FTR_PURR                   ASM_CONST(0x0)
 #endif
 
 #ifndef __ASSEMBLY__
@@ -318,7 +320,7 @@ enum {
            CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 |
            CPU_FTR_MMCRA | CPU_FTR_SMT |
            CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
-           CPU_FTR_MMCRA_SIHV,
+           CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR,
        CPU_FTRS_CELL = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
            CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 |
            CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT |
index 6d68ad7e0ea3f41f0f5eb4eaf9895b77e87c659d..a21185d478830365eaa8fc2d8085f31c76f35ad7 100644 (file)
@@ -1 +1,203 @@
+/*
+ * Definitions for measuring cputime on powerpc machines.
+ *
+ * Copyright (C) 2006 Paul Mackerras, IBM Corp.
+ *
+ * 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.
+ *
+ * If we have CONFIG_VIRT_CPU_ACCOUNTING, we measure cpu time in
+ * the same units as the timebase.  Otherwise we measure cpu time
+ * in jiffies using the generic definitions.
+ */
+
+#ifndef __POWERPC_CPUTIME_H
+#define __POWERPC_CPUTIME_H
+
+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
 #include <asm-generic/cputime.h>
+#else
+
+#include <linux/types.h>
+#include <linux/time.h>
+#include <asm/div64.h>
+#include <asm/time.h>
+#include <asm/param.h>
+
+typedef u64 cputime_t;
+typedef u64 cputime64_t;
+
+#define cputime_zero                   ((cputime_t)0)
+#define cputime_max                    ((~((cputime_t)0) >> 1) - 1)
+#define cputime_add(__a, __b)          ((__a) +  (__b))
+#define cputime_sub(__a, __b)          ((__a) -  (__b))
+#define cputime_div(__a, __n)          ((__a) /  (__n))
+#define cputime_halve(__a)             ((__a) >> 1)
+#define cputime_eq(__a, __b)           ((__a) == (__b))
+#define cputime_gt(__a, __b)           ((__a) >  (__b))
+#define cputime_ge(__a, __b)           ((__a) >= (__b))
+#define cputime_lt(__a, __b)           ((__a) <  (__b))
+#define cputime_le(__a, __b)           ((__a) <= (__b))
+
+#define cputime64_zero                 ((cputime64_t)0)
+#define cputime64_add(__a, __b)                ((__a) + (__b))
+#define cputime_to_cputime64(__ct)     (__ct)
+
+#ifdef __KERNEL__
+
+/*
+ * Convert cputime <-> jiffies
+ */
+extern u64 __cputime_jiffies_factor;
+
+static inline unsigned long cputime_to_jiffies(const cputime_t ct)
+{
+       return mulhdu(ct, __cputime_jiffies_factor);
+}
+
+static inline cputime_t jiffies_to_cputime(const unsigned long jif)
+{
+       cputime_t ct;
+       unsigned long sec;
+
+       /* have to be a little careful about overflow */
+       ct = jif % HZ;
+       sec = jif / HZ;
+       if (ct) {
+               ct *= tb_ticks_per_sec;
+               do_div(ct, HZ);
+       }
+       if (sec)
+               ct += (cputime_t) sec * tb_ticks_per_sec;
+       return ct;
+}
+
+static inline u64 cputime64_to_jiffies64(const cputime_t ct)
+{
+       return mulhdu(ct, __cputime_jiffies_factor);
+}
+
+/*
+ * Convert cputime <-> milliseconds
+ */
+extern u64 __cputime_msec_factor;
+
+static inline unsigned long cputime_to_msecs(const cputime_t ct)
+{
+       return mulhdu(ct, __cputime_msec_factor);
+}
+
+static inline cputime_t msecs_to_cputime(const unsigned long ms)
+{
+       cputime_t ct;
+       unsigned long sec;
+
+       /* have to be a little careful about overflow */
+       ct = ms % 1000;
+       sec = ms / 1000;
+       if (ct) {
+               ct *= tb_ticks_per_sec;
+               do_div(ct, 1000);
+       }
+       if (sec)
+               ct += (cputime_t) sec * tb_ticks_per_sec;
+       return ct;
+}
+
+/*
+ * Convert cputime <-> seconds
+ */
+extern u64 __cputime_sec_factor;
+
+static inline unsigned long cputime_to_secs(const cputime_t ct)
+{
+       return mulhdu(ct, __cputime_sec_factor);
+}
+
+static inline cputime_t secs_to_cputime(const unsigned long sec)
+{
+       return (cputime_t) sec * tb_ticks_per_sec;
+}
+
+/*
+ * Convert cputime <-> timespec
+ */
+static inline void cputime_to_timespec(const cputime_t ct, struct timespec *p)
+{
+       u64 x = ct;
+       unsigned int frac;
+
+       frac = do_div(x, tb_ticks_per_sec);
+       p->tv_sec = x;
+       x = (u64) frac * 1000000000;
+       do_div(x, tb_ticks_per_sec);
+       p->tv_nsec = x;
+}
+
+static inline cputime_t timespec_to_cputime(const struct timespec *p)
+{
+       cputime_t ct;
+
+       ct = (u64) p->tv_nsec * tb_ticks_per_sec;
+       do_div(ct, 1000000000);
+       return ct + (u64) p->tv_sec * tb_ticks_per_sec;
+}
+
+/*
+ * Convert cputime <-> timeval
+ */
+static inline void cputime_to_timeval(const cputime_t ct, struct timeval *p)
+{
+       u64 x = ct;
+       unsigned int frac;
+
+       frac = do_div(x, tb_ticks_per_sec);
+       p->tv_sec = x;
+       x = (u64) frac * 1000000;
+       do_div(x, tb_ticks_per_sec);
+       p->tv_usec = x;
+}
+
+static inline cputime_t timeval_to_cputime(const struct timeval *p)
+{
+       cputime_t ct;
+
+       ct = (u64) p->tv_usec * tb_ticks_per_sec;
+       do_div(ct, 1000000);
+       return ct + (u64) p->tv_sec * tb_ticks_per_sec;
+}
+
+/*
+ * Convert cputime <-> clock_t (units of 1/USER_HZ seconds)
+ */
+extern u64 __cputime_clockt_factor;
+
+static inline unsigned long cputime_to_clock_t(const cputime_t ct)
+{
+       return mulhdu(ct, __cputime_clockt_factor);
+}
+
+static inline cputime_t clock_t_to_cputime(const unsigned long clk)
+{
+       cputime_t ct;
+       unsigned long sec;
+
+       /* have to be a little careful about overflow */
+       ct = clk % USER_HZ;
+       sec = clk / USER_HZ;
+       if (ct) {
+               ct *= tb_ticks_per_sec;
+               do_div(ct, USER_HZ);
+       }
+       if (sec)
+               ct += (cputime_t) sec * tb_ticks_per_sec;
+       return ct;
+}
+
+#define cputime64_to_clock_t(ct)       cputime_to_clock_t((cputime_t)(ct))
+
+#endif /* __KERNEL__ */
+#endif /* CONFIG_VIRT_CPU_ACCOUNTING */
+#endif /* __POWERPC_CPUTIME_H */
index f804b34cf06a6f63136955e315407a456107ce44..ce3788224ed0e1f8cfdc0d3ad886cb9dfd0a9f4e 100644 (file)
@@ -41,6 +41,7 @@
 #define FW_FEATURE_MULTITCE    (1UL<<19)
 #define FW_FEATURE_SPLPAR      (1UL<<20)
 #define FW_FEATURE_ISERIES     (1UL<<21)
+#define FW_FEATURE_LPAR                (1UL<<22)
 
 enum {
 #ifdef CONFIG_PPC64
@@ -51,10 +52,10 @@ enum {
                FW_FEATURE_MIGRATE | FW_FEATURE_PERFMON | FW_FEATURE_CRQ |
                FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN |
                FW_FEATURE_BULK | FW_FEATURE_XDABR | FW_FEATURE_MULTITCE |
-               FW_FEATURE_SPLPAR,
+               FW_FEATURE_SPLPAR | FW_FEATURE_LPAR,
        FW_FEATURE_PSERIES_ALWAYS = 0,
-       FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES,
-       FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES,
+       FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
+       FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
        FW_FEATURE_POSSIBLE =
 #ifdef CONFIG_PPC_PSERIES
                FW_FEATURE_PSERIES_POSSIBLE |
@@ -89,15 +90,6 @@ static inline unsigned long firmware_has_feature(unsigned long feature)
                (FW_FEATURE_POSSIBLE & ppc64_firmware_features & feature);
 }
 
-#ifdef CONFIG_PPC_PSERIES
-typedef struct {
-    unsigned long val;
-    char * name;
-} firmware_feature_t;
-
-extern firmware_feature_t firmware_features_table[];
-#endif
-
 extern void system_reset_fwnmi(void);
 extern void machine_check_fwnmi(void);
 
index 8eb7e857ec4cd167176c78b644ee046a6fbe09b5..51f87d9993b6d09e2833f2ff403a58783c61d7bf 100644 (file)
@@ -479,6 +479,10 @@ extern int distribute_irqs;
 struct irqaction;
 struct pt_regs;
 
+#define __ARCH_HAS_DO_SOFTIRQ
+
+extern void __do_softirq(void);
+
 #ifdef CONFIG_IRQSTACKS
 /*
  * Per-cpu stacks for handling hard and soft interrupts.
@@ -491,8 +495,6 @@ extern void call_do_softirq(struct thread_info *tp);
 extern int call___do_IRQ(int irq, struct pt_regs *regs,
                struct thread_info *tp);
 
-#define __ARCH_HAS_DO_SOFTIRQ
-
 #else
 #define irq_ctx_init()
 
index 857e5202fc7847262ffa22c3f397181b68a20bc6..eb851a9c9e5c442ea6c7fcd75961c83b1563bc85 100644 (file)
@@ -41,16 +41,11 @@ extern void mf_deallocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type,
                unsigned count, MFCompleteHandler hdlr, void *userToken);
 
 extern void mf_power_off(void);
-extern void mf_reboot(void);
+extern void mf_reboot(char *cmd);
 
 extern void mf_display_src(u32 word);
 extern void mf_display_progress(u16 value);
-extern void mf_clear_src(void);
 
 extern void mf_init(void);
 
-extern int mf_get_rtc(struct rtc_time *tm);
-extern int mf_get_boot_rtc(struct rtc_time *tm);
-extern int mf_set_rtc(struct rtc_time *tm);
-
 #endif /* _ASM_POWERPC_ISERIES_MF_H */
index d3546c4c9f46070e2c4ca3036fa96eb6a88abb0d..0c5880f702254338d0dee571b17a64a5fdbe99c4 100644 (file)
@@ -19,8 +19,6 @@
 
 #define MAX_LMB_REGIONS 128
 
-#define LMB_ALLOC_ANYWHERE     0
-
 struct lmb_property {
        unsigned long base;
        unsigned long size;
@@ -43,20 +41,19 @@ extern struct lmb lmb;
 
 extern void __init lmb_init(void);
 extern void __init lmb_analyze(void);
-extern long __init lmb_add(unsigned long, unsigned long);
-extern long __init lmb_reserve(unsigned long, unsigned long);
-extern unsigned long __init lmb_alloc(unsigned long, unsigned long);
-extern unsigned long __init lmb_alloc_base(unsigned long, unsigned long,
-                                          unsigned long);
+extern long __init lmb_add(unsigned long base, unsigned long size);
+extern long __init lmb_reserve(unsigned long base, unsigned long size);
+extern unsigned long __init lmb_alloc(unsigned long size, unsigned long align);
+extern unsigned long __init lmb_alloc_base(unsigned long size,
+               unsigned long align, unsigned long max_addr);
+extern unsigned long __init __lmb_alloc_base(unsigned long size,
+               unsigned long align, unsigned long max_addr);
 extern unsigned long __init lmb_phys_mem_size(void);
 extern unsigned long __init lmb_end_of_DRAM(void);
-extern unsigned long __init lmb_abs_to_phys(unsigned long);
-extern void __init lmb_enforce_memory_limit(unsigned long);
+extern void __init lmb_enforce_memory_limit(unsigned long memory_limit);
 
 extern void lmb_dump_all(void);
 
-extern unsigned long io_hole_start;
-
 static inline unsigned long
 lmb_size_bytes(struct lmb_region *type, unsigned long region_nr)
 {
index b0b9a3f8cdc2dad760ca3ba00eaaad0935894ebc..31f721994bd894265d73f398560e6028ad84640e 100644 (file)
@@ -236,7 +236,6 @@ extern void htab_initialize_secondary(void);
 extern void hpte_init_native(void);
 extern void hpte_init_lpar(void);
 extern void hpte_init_iSeries(void);
-extern void mm_init_ppc64(void);
 
 extern long pSeries_lpar_hpte_insert(unsigned long hpte_group,
                                     unsigned long va, unsigned long prpn,
index c9add8f1ad94b1e30d6430de06ad7d1fba5a63b0..4465b95ebef0a07d3fade371b63cc658f83b74a2 100644 (file)
@@ -54,7 +54,7 @@ struct paca_struct {
 #endif /* CONFIG_PPC_ISERIES */
 
        /*
-        * MAGIC: the spinlock functions in arch/ppc64/lib/locks.c
+        * MAGIC: the spinlock functions in arch/powerpc/lib/locks.c 
         * load lock_token and paca_index with a single lwz
         * instruction.  They must travel together and be properly
         * aligned.
@@ -96,6 +96,11 @@ struct paca_struct {
        u64 saved_r1;                   /* r1 save for RTAS calls */
        u64 saved_msr;                  /* MSR saved here by enter_rtas */
        u8 proc_enabled;                /* irq soft-enable flag */
+
+       /* Stuff for accurate time accounting */
+       u64 user_time;                  /* accumulated usermode TB ticks */
+       u64 system_time;                /* accumulated system TB ticks */
+       u64 startpurr;                  /* PURR/TB value snapshot */
 };
 
 extern struct paca_struct paca[];
index 80a7832d272177ec255189ba68b361a29d83df12..b2e18629932a3870c976b3a037f7a4d35a7dc4c1 100644 (file)
 /* shift to put page number into pte */
 #define PTE_RPN_SHIFT  (17)
 
-#define __real_pte(e,p)                ((real_pte_t)(e))
-#define __rpte_to_pte(r)       (r)
-#define __rpte_to_hidx(r,index)        (pte_val((r)) >> 12)
+#ifdef STRICT_MM_TYPECHECKS
+#define __real_pte(e,p)                ((real_pte_t){(e)})
+#define __rpte_to_pte(r)       ((r).pte)
+#else
+#define __real_pte(e,p)                (e)
+#define __rpte_to_pte(r)       (__pte(r))
+#endif
+#define __rpte_to_hidx(r,index)        (pte_val(__rpte_to_pte(r)) >> 12)
 
 #define pte_iterate_hashed_subpages(rpte, psize, va, index, shift)       \
        do {                                                             \
index 185ee15963a15158fa295c6be10f68df25736408..e9f1f4627e6bab35cd34910e3bf4bb05763b85ff 100644 (file)
@@ -188,9 +188,13 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
 #define pte_pfn(x)             ((unsigned long)((pte_val(x)>>PTE_RPN_SHIFT)))
 #define pte_page(x)            pfn_to_page(pte_pfn(x))
 
+#define PMD_BAD_BITS           (PTE_TABLE_SIZE-1)
+#define PUD_BAD_BITS           (PMD_TABLE_SIZE-1)
+
 #define pmd_set(pmdp, pmdval)  (pmd_val(*(pmdp)) = (pmdval))
 #define pmd_none(pmd)          (!pmd_val(pmd))
-#define        pmd_bad(pmd)            (pmd_val(pmd) == 0)
+#define        pmd_bad(pmd)            (!is_kernel_addr(pmd_val(pmd)) \
+                                || (pmd_val(pmd) & PMD_BAD_BITS))
 #define        pmd_present(pmd)        (pmd_val(pmd) != 0)
 #define        pmd_clear(pmdp)         (pmd_val(*(pmdp)) = 0)
 #define pmd_page_kernel(pmd)   (pmd_val(pmd) & ~PMD_MASKED_BITS)
@@ -198,7 +202,8 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
 
 #define pud_set(pudp, pudval)  (pud_val(*(pudp)) = (pudval))
 #define pud_none(pud)          (!pud_val(pud))
-#define pud_bad(pud)           ((pud_val(pud)) == 0)
+#define        pud_bad(pud)            (!is_kernel_addr(pud_val(pud)) \
+                                || (pud_val(pud) & PUD_BAD_BITS))
 #define pud_present(pud)       (pud_val(pud) != 0)
 #define pud_clear(pudp)                (pud_val(*(pudp)) = 0)
 #define pud_page(pud)          (pud_val(pud) & ~PUD_MASKED_BITS)
index ab8688d39024763ca01cd626035330015a06fab8..dd1c0a913d5f6324712d676c827372a40e880553 100644 (file)
 
 #define SZL                    (BITS_PER_LONG/8)
 
+/*
+ * Stuff for accurate CPU time accounting.
+ * These macros handle transitions between user and system state
+ * in exception entry and exit and accumulate time to the
+ * user_time and system_time fields in the paca.
+ */
+
+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
+#define ACCOUNT_CPU_USER_ENTRY(ra, rb)
+#define ACCOUNT_CPU_USER_EXIT(ra, rb)
+#else
+#define ACCOUNT_CPU_USER_ENTRY(ra, rb)                                 \
+       beq     2f;                     /* if from kernel mode */       \
+BEGIN_FTR_SECTION;                                                     \
+       mfspr   ra,SPRN_PURR;           /* get processor util. reg */   \
+END_FTR_SECTION_IFSET(CPU_FTR_PURR);                                   \
+BEGIN_FTR_SECTION;                                                     \
+       mftb    ra;                     /* or get TB if no PURR */      \
+END_FTR_SECTION_IFCLR(CPU_FTR_PURR);                                   \
+       ld      rb,PACA_STARTPURR(r13);                         \
+       std     ra,PACA_STARTPURR(r13);                                 \
+       subf    rb,rb,ra;               /* subtract start value */      \
+       ld      ra,PACA_USER_TIME(r13);                                 \
+       add     ra,ra,rb;               /* add on to user time */       \
+       std     ra,PACA_USER_TIME(r13);                                 \
+2:
+
+#define ACCOUNT_CPU_USER_EXIT(ra, rb)                                  \
+BEGIN_FTR_SECTION;                                                     \
+       mfspr   ra,SPRN_PURR;           /* get processor util. reg */   \
+END_FTR_SECTION_IFSET(CPU_FTR_PURR);                                   \
+BEGIN_FTR_SECTION;                                                     \
+       mftb    ra;                     /* or get TB if no PURR */      \
+END_FTR_SECTION_IFCLR(CPU_FTR_PURR);                                   \
+       ld      rb,PACA_STARTPURR(r13);                         \
+       std     ra,PACA_STARTPURR(r13);                                 \
+       subf    rb,rb,ra;               /* subtract start value */      \
+       ld      ra,PACA_SYSTEM_TIME(r13);                               \
+       add     ra,ra,rb;               /* add on to user time */       \
+       std     ra,PACA_SYSTEM_TIME(r13);
+#endif
+
 /*
  * Macros for storing registers into and loading registers from
  * exception frames.
index 415fa393b00c554de51282b6a5f6db09ed050a77..1c64a211cf191fe29626daacda7e55d8b297c510 100644 (file)
@@ -52,7 +52,6 @@
 #ifdef __KERNEL__
 #define platform_is_pseries()  (_machine == PLATFORM_PSERIES || \
                                 _machine == PLATFORM_PSERIES_LPAR)
-#define platform_is_lpar()     (!!(_machine & PLATFORM_LPAR))
 
 #if defined(CONFIG_PPC_MULTIPLATFORM)
 extern int _machine;
index cbd297f44cce6490ac1220898a945d58c95158aa..782e13a070a11ca7fe269b20d148b580db530abf 100644 (file)
@@ -126,8 +126,14 @@ extern struct device_node *find_all_nodes(void);
 /* New style node lookup */
 extern struct device_node *of_find_node_by_name(struct device_node *from,
        const char *name);
+#define for_each_node_by_name(dn, name) \
+       for (dn = of_find_node_by_name(NULL, name); dn; \
+            dn = of_find_node_by_name(dn, name))
 extern struct device_node *of_find_node_by_type(struct device_node *from,
        const char *type);
+#define for_each_node_by_type(dn, type) \
+       for (dn = of_find_node_by_type(NULL, type); dn; \
+            dn = of_find_node_by_type(dn, type))
 extern struct device_node *of_find_compatible_node(struct device_node *from,
        const char *type, const char *compat);
 extern struct device_node *of_find_node_by_path(const char *path);
index 79bae4933b73a2e57cd34c9d6ba7a18229095027..2c2fe9647595bd3de91342000551ae8baae26b9a 100644 (file)
@@ -4,7 +4,7 @@
 #ifdef __KERNEL__
 
 /*
- * include/asm-ppc64/rwsem.h: R/W semaphores for PPC using the stuff
+ * include/asm-powerpc/rwsem.h: R/W semaphores for PPC using the stuff
  * in lib/rwsem.c.  Adapted largely from include/asm-i386/rwsem.h
  * by Paul Mackerras <paulus@samba.org>.
  */
index c90d9d9aae720f6638e6896e0437442a1c65bb47..2cda3c38a9fa10afa8816eaaea6197e78ff64b51 100644 (file)
@@ -15,7 +15,7 @@
 #endif
 
 #ifdef CONFIG_SMP
-#define ISYNC_ON_SMP   "\n\tisync"
+#define ISYNC_ON_SMP   "\n\tisync\n"
 #define LWSYNC_ON_SMP  __stringify(LWSYNC) "\n"
 #else
 #define ISYNC_ON_SMP
index d9bf53653b10de8175fba20f16be1b9840a5f61a..65f5a7b2646b1ed590ec45acb7a596eb7f170706 100644 (file)
@@ -171,6 +171,8 @@ extern u32 booke_wdt_period;
 
 /* EBCDIC -> ASCII conversion for [0-9A-Z] on iSeries */
 extern unsigned char e2a(unsigned char);
+extern unsigned char* strne2a(unsigned char *dest,
+               const unsigned char *src, size_t n);
 
 struct device_node;
 extern void note_scsi_host(struct device_node *, void *);
@@ -424,5 +426,9 @@ static inline void create_function_call(unsigned long addr, void * func)
        create_branch(addr, func_addr, BRANCH_SET_LINK);
 }
 
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+extern void account_system_vtime(struct task_struct *);
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_SYSTEM_H */
index baddc9ab57adc1e561c6805be229449ffc64582b..912118db13ae7d183a41a46b2236edc4d1bc08a2 100644 (file)
@@ -41,6 +41,7 @@ extern time_t last_rtc_update;
 
 extern void generic_calibrate_decr(void);
 extern void wakeup_decrementer(void);
+extern void snapshot_timebase(void);
 
 /* Some sane defaults: 125 MHz timebase, 1GHz processor */
 extern unsigned long ppc_proc_freq;
@@ -221,5 +222,19 @@ struct cpu_usage {
 
 DECLARE_PER_CPU(struct cpu_usage, cpu_usage_array);
 
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+extern void account_process_vtime(struct task_struct *tsk);
+#else
+#define account_process_vtime(tsk)             do { } while (0)
+#endif
+
+#if defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR)
+extern void calculate_steal_time(void);
+extern void snapshot_timebases(void);
+#else
+#define calculate_steal_time()                 do { } while (0)
+#define snapshot_timebases()                   do { } while (0)
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* __PPC64_TIME_H */
index 36c73ab7e43e6af9eeded2390e7accb08e294169..7acd7fc126ecac6601796b39e3d9a2953e0ee55b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/harrier.h
- *
  * Definitions for Motorola MCG Harrier North Bridge & Memory controller
  *
  * Author: Dale Farnsworth
index f835066fb3cad431ff7a259df2b0f4a25c2b5e6e..3acc382cc83f3fc92077016ece9cd0a6b5815f34 100644 (file)
@@ -29,7 +29,7 @@
 
 /* TLB entry offset/size used for pinning kernel lowmem */
 #define PPC44x_PIN_SHIFT       28
-#define PPC44x_PIN_SIZE                (1 << PPC44x_PIN_SHIFT)
+#define PPC_PIN_SIZE           (1 << PPC44x_PIN_SHIFT)
 
 /* Lowest TLB slot consumed by the default pinned TLBs */
 #define PPC44x_LOW_SLOT                63
index 6c28ae7807f4fe20add48c793a0d84397e61bf50..38f99710752b1f041b29a3a40acea8ecc639d529 100644 (file)
 #include <platforms/4xx/xilinx_ml300.h>
 #endif
 
+#if defined(CONFIG_XILINX_ML403)
+#include <platforms/4xx/xilinx_ml403.h>
+#endif
+
 #ifndef __ASSEMBLY__
 
 #ifdef CONFIG_40x
index df9cf6ed189d6bc7392dc308a9c465b31ece8212..b919d8fb7d98b8771a6037c346630e0c86be7191 100644 (file)
@@ -575,4 +575,11 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
  */
 #define xlate_dev_kmem_ptr(p)  p
 
+/* access ports */
+#define setbits32(_addr, _v) out_be32((_addr), in_be32(_addr) |  (_v))
+#define clrbits32(_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v))
+
+#define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) |  (_v))
+#define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v))
+
 #endif /* __KERNEL__ */
index 77b1e092c206d109e6628225b70929ad968fe22c..b30a6a3b5bd20aaacb8d7ecb2bafa4a4731b7e6a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/kernel/mpc10x.h
- *
  * Common routines for the Motorola SPS MPC106/8240/107 Host bridge/Mem
  * ctlr/EPIC/etc.
  *
@@ -165,6 +163,7 @@ enum ppc_sys_devices {
        MPC10X_DMA1,
        MPC10X_UART0,
        MPC10X_UART1,
+       NUM_PPC_SYS_DEVS,
 };
 
 int mpc10x_bridge_init(struct pci_controller *hose,
index a055e0756b9d85e1ba72b34ec6c10b3ad72a1486..6167f74635f733ef45d2b1b2f471bdfd9df8b37a 100644 (file)
@@ -60,6 +60,7 @@ enum ppc_sys_devices {
        MPC52xx_ATA,
        MPC52xx_I2C1,
        MPC52xx_I2C2,
+       NUM_PPC_SYS_DEVS,
 };
 
 
index 321452695039acabfdcf80132efe0bb8d13a2831..6ba69a86b9ddf2cc2e488f01a0c57cad44e80c8f 100644 (file)
@@ -83,6 +83,7 @@ enum ppc_sys_devices {
        MPC82xx_CPM_SMC2,
        MPC82xx_CPM_USB,
        MPC82xx_SEC1,
+       NUM_PPC_SYS_DEVS,
 };
 
 #ifndef __ASSEMBLY__
index 7cdf60fa69b63a91baf01b3bec3348471ce9378d..3c23fc43bfbc4781afeea22ac1b562090c8e1916 100644 (file)
@@ -108,6 +108,7 @@ enum ppc_sys_devices {
        MPC83xx_USB2_DR,
        MPC83xx_USB2_MPH,
        MPC83xx_MDIO,
+       NUM_PPC_SYS_DEVS,
 };
 
 #endif /* CONFIG_83xx */
index c8a96aa44fb7c974b4186da61dd89a11acd12afd..f47002a60edf59dd293906233df56fc386c67679 100644 (file)
@@ -139,6 +139,7 @@ enum ppc_sys_devices {
        MPC85xx_eTSEC4,
        MPC85xx_IIC2,
        MPC85xx_MDIO,
+       NUM_PPC_SYS_DEVS,
 };
 
 /* Internal interrupts are all Level Sensitive, and Positive Polarity */
index 46f159cf589e9668d25e2fbe4a49c72c5151eeef..3515a7fa6c8939cc11515b6ff3807e35e576da9f 100644 (file)
@@ -111,8 +111,11 @@ enum ppc_sys_devices {
        MPC8xx_CPM_SMC1,
        MPC8xx_CPM_SMC2,
        MPC8xx_CPM_USB,
+       NUM_PPC_SYS_DEVS,
 };
 
+#define PPC_PIN_SIZE   (24 * 1024 * 1024)      /* 24Mbytes of data pinned */
+
 #ifndef BOARD_CHIP_NAME
 #define BOARD_CHIP_NAME ""
 #endif
index 6d1c39e8a6afef09a47c503b7bd734aa0e9acf28..e1c62da12e74a5e3cc58fca1b486599e1b5302b7 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/processor.h>             /* For TASK_SIZE */
 #include <asm/mmu.h>
 #include <asm/page.h>
+#include <asm/io.h>                    /* For sub-arch specific PPC_PIN_SIZE */
 struct mm_struct;
 
 extern unsigned long va_to_phys(unsigned long address);
@@ -127,9 +128,8 @@ extern unsigned long ioremap_bot, ioremap_base;
  * of RAM.  -- Cort
  */
 #define VMALLOC_OFFSET (0x1000000) /* 16M */
-#ifdef CONFIG_44x
-#include <asm/ibm44x.h>
-#define VMALLOC_START (((_ALIGN((long)high_memory, PPC44x_PIN_SIZE) + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
+#ifdef PPC_PIN_SIZE
+#define VMALLOC_START (((_ALIGN((long)high_memory, PPC_PIN_SIZE) + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
 #else
 #define VMALLOC_START ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
 #endif
index 83d8c77c124df3e2bae74b046c0cfce1d797821f..4b94f7059ebec5a8dbaac855f07a051d8c8653dd 100644 (file)
@@ -33,6 +33,8 @@
 #include <asm/mpc52xx.h>
 #elif defined(CONFIG_MPC10X_BRIDGE)
 #include <asm/mpc10x.h>
+#elif defined(CONFIG_XILINX_VIRTEX)
+#include <platforms/4xx/virtex.h>
 #else
 #error "need definition of ppc_sys_devices"
 #endif
@@ -44,9 +46,26 @@ struct ppc_sys_spec {
        u32                     value;
        u32                     num_devices;
        char                    *ppc_sys_name;
+       u8                      config[NUM_PPC_SYS_DEVS];
        enum ppc_sys_devices    *device_list;
 };
 
+struct platform_notify_dev_map {
+       const char *bus_id;
+       void (*rtn)(struct platform_device * pdev, int idx);
+};
+
+enum platform_device_func {
+       PPC_SYS_FUNC_DUMMY = 0,
+       PPC_SYS_FUNC_ETH = 1,
+       PPC_SYS_FUNC_UART = 2,
+       PPC_SYS_FUNC_HLDC = 3,
+       PPC_SYS_FUNC_USB = 4,
+       PPC_SYS_FUNC_IRDA = 5,
+};
+
+#define PPC_SYS_CONFIG_DISABLED                1
+
 /* describes all specific chips and which devices they have on them */
 extern struct ppc_sys_spec ppc_sys_specs[];
 extern struct ppc_sys_spec *cur_ppc_sys_spec;
@@ -72,5 +91,20 @@ extern void *ppc_sys_get_pdata(enum ppc_sys_devices dev) __init;
 /* remove a device from the system */
 extern void ppc_sys_device_remove(enum ppc_sys_devices dev);
 
+/* Function assignment stuff */
+void ppc_sys_device_initfunc(void);
+void ppc_sys_device_setfunc(enum ppc_sys_devices dev,
+                           enum platform_device_func func);
+void ppc_sys_device_set_func_all(enum platform_device_func func);
+
+void platform_notify_map(const struct platform_notify_dev_map *map,
+                        struct device *dev);
+
+/* Enable / disable stuff */
+void ppc_sys_device_disable(enum ppc_sys_devices dev);
+void ppc_sys_device_enable(enum ppc_sys_devices dev);
+void ppc_sys_device_enable_all(void);
+void ppc_sys_device_disable_all(void);
+
 #endif                         /* __ASM_PPC_SYS_H */
 #endif                         /* __KERNEL__ */
index 321fb75b5f222f7a20ca3841fedf5b040ba823cf..c86112323c9f097e3297d7dc74a51efeae76b4cb 100644 (file)
@@ -153,5 +153,10 @@ extern __inline__ unsigned binary_tbl(void) {
 ({unsigned z; asm ("mulhwu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;})
 
 unsigned mulhwu_scale_factor(unsigned, unsigned);
+
+#define account_process_vtime(tsk)             do { } while (0)
+#define calculate_steal_time()                 do { } while (0)
+#define snapshot_timebases()                   do { } while (0)
+
 #endif /* __ASM_TIME_H__ */
 #endif /* __KERNEL__ */
index 84bae7d7681451c4e6be1ca641073337cc556f6f..937c7dbe6e5c89d9b87d6ab74301f8d815eb9c35 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * include/asm-ppc/todc.h
- *
  * Definitions for the M48Txx and mc146818 series of Time of day/Real Time
  * Clock chips.
  *
diff --git a/include/asm-ppc/xparameters.h b/include/asm-ppc/xparameters.h
deleted file mode 100644 (file)
index fe4eac6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * include/asm-ppc/xparameters.h
- *
- * This file includes the correct xparameters.h for the CONFIG'ed board
- *
- * Author: MontaVista Software, Inc.
- *         source@mvista.com
- *
- * 2004 (c) MontaVista Software, Inc.  This file is licensed under the terms
- * of the GNU General Public License version 2.  This program is licensed
- * "as is" without any warranty of any kind, whether express or implied.
- */
-
-#include <linux/config.h>
-
-#if defined(CONFIG_XILINX_ML300)
-#include <platforms/4xx/xparameters/xparameters_ml300.h>
-#endif
index d7e7e637b92abc2e100503c5f0c31891b166381f..c4394abcd5e6952a293d30626a6f17c13b832822 100644 (file)
@@ -958,7 +958,7 @@ void audit_syscall_entry(struct task_struct *tsk, int arch, int major,
         *
         * i386     no
         * x86_64   no
-        * ppc64    yes (see arch/ppc64/kernel/misc.S)
+        * ppc64    yes (see arch/powerpc/platforms/iseries/misc.S)
         *
         * This also happens with vm86 emulation in a non-nested manner
         * (entries without exits), so this case must be caught.
index 18df57c029df1d702f4d1a4bb748b74e3ff82750..01c08b5836f5e8441920df88df4efc9859776efe 100644 (file)
@@ -1,5 +1,4 @@
 /*
- * lib/extable.c
  * Derived from arch/ppc/mm/extable.c and arch/i386/mm/extable.c.
  *
  * Copyright (C) 2004 Paul Mackerras, IBM Corp.