Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 14 Feb 2007 02:17:26 +0000 (18:17 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 14 Feb 2007 02:17:26 +0000 (18:17 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPSEC]: Fix the address family to refer encap_family
  [IPSEC]: changing API of xfrm6_tunnel_register
  [IPSEC]: make sit use the xfrm4_tunnel_register
  [IPSEC]: Changing API of xfrm4_tunnel_register.
  [TCP]: Prevent pseudo garbage in SYN's advertized window
  [NET_SCHED]: sch_hfsc: replace ASSERT macro by WARN_ON
  [BRIDGE] br_if: Fix oops in port_carrier_check
  [NETFILTER]: Clear GSO bits for TCP reset packet
  [TG3]: Update copyright, version, and reldate.
  [TG3]: Add some tx timeout debug messages.
  [TG3]: Use constant for PHY register 0x1e.
  [TG3]: Power down 5704 serdes transceiver when shutting down.
  [TG3]: 5906 doesn't need to switch to slower clock.
  [TG3]: 5722/5756 don't need PHY jitter workaround.
  [TG3]: Use lower DMA watermark for 5703.
  [TG3]: Save MSI state before suspend.
  [XFRM]: Fix IPv4 tunnel mode decapsulation with IPV6=n
  [IPV6] HASHTABLES: Use appropriate seed for caluculating ehash index.

234 files changed:
Documentation/i2c/busses/i2c-i801
Documentation/i2c/busses/i2c-parport
Documentation/i2c/busses/i2c-piix4
Documentation/i2c/busses/i2c-viapro
Documentation/i2c/porting-clients
Documentation/i2c/smbus-protocol
Documentation/i2c/writing-clients
Documentation/powerpc/booting-without-of.txt
Documentation/powerpc/mpc52xx-device-tree-bindings.txt
MAINTAINERS
arch/mips/Kconfig
arch/mips/configs/ip27_defconfig
arch/mips/dec/int-handler.S
arch/mips/kernel/entry.S
arch/mips/kernel/linux32.c
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/signal-common.h
arch/mips/kernel/signal.c
arch/mips/kernel/signal32.c
arch/mips/kernel/signal_n32.c
arch/mips/mm/Makefile
arch/mips/mm/c-sb1.c
arch/mips/mm/dma-coherent.c [deleted file]
arch/mips/mm/dma-default.c [new file with mode: 0644]
arch/mips/mm/dma-ip27.c [deleted file]
arch/mips/mm/dma-ip32.c [deleted file]
arch/mips/mm/dma-noncoherent.c [deleted file]
arch/mips/pci/Makefile
arch/mips/pci/pci-dac.c [new file with mode: 0644]
arch/powerpc/Kconfig
arch/powerpc/boot/dts/kuroboxHD.dts [new file with mode: 0644]
arch/powerpc/boot/dts/lite5200.dts
arch/powerpc/boot/dts/lite5200b.dts
arch/powerpc/boot/dts/mpc8313erdb.dts [new file with mode: 0644]
arch/powerpc/boot/dts/mpc8349emds.dts [deleted file]
arch/powerpc/boot/dts/mpc8349emitxgp.dts [new file with mode: 0644]
arch/powerpc/boot/dts/mpc834x_mds.dts [new file with mode: 0644]
arch/powerpc/boot/dts/mpc8568mds.dts [new file with mode: 0644]
arch/powerpc/configs/linkstation_defconfig
arch/powerpc/configs/mpc8313_rdb_defconfig [new file with mode: 0644]
arch/powerpc/configs/mpc834x_itx_defconfig
arch/powerpc/configs/mpc834x_itxgp_defconfig [new file with mode: 0644]
arch/powerpc/configs/mpc834x_mds_defconfig
arch/powerpc/configs/mpc8568mds_defconfig [new file with mode: 0644]
arch/powerpc/kernel/btext.c
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/head_44x.S
arch/powerpc/kernel/head_fsl_booke.S
arch/powerpc/kernel/legacy_serial.c
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/udbg.c
arch/powerpc/kernel/vdso.c
arch/powerpc/mm/mem.c
arch/powerpc/mm/pgtable_32.c
arch/powerpc/oprofile/op_model_cell.c
arch/powerpc/platforms/52xx/Makefile
arch/powerpc/platforms/52xx/efika-pci.c [deleted file]
arch/powerpc/platforms/52xx/efika-setup.c [deleted file]
arch/powerpc/platforms/52xx/efika.c [new file with mode: 0644]
arch/powerpc/platforms/52xx/efika.h [deleted file]
arch/powerpc/platforms/52xx/lite5200.c
arch/powerpc/platforms/52xx/mpc52xx_common.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
arch/powerpc/platforms/83xx/Kconfig
arch/powerpc/platforms/83xx/Makefile
arch/powerpc/platforms/83xx/mpc8313_rdb.c [new file with mode: 0644]
arch/powerpc/platforms/83xx/mpc834x_itx.c
arch/powerpc/platforms/83xx/mpc834x_mds.c [new file with mode: 0644]
arch/powerpc/platforms/83xx/mpc834x_sys.c [deleted file]
arch/powerpc/platforms/83xx/mpc834x_sys.h [deleted file]
arch/powerpc/platforms/83xx/mpc83xx.h
arch/powerpc/platforms/85xx/Kconfig
arch/powerpc/platforms/85xx/Makefile
arch/powerpc/platforms/85xx/mpc8568_mds.c [new file with mode: 0644]
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/Makefile
arch/powerpc/platforms/cell/pmu.c
arch/powerpc/platforms/cell/spu_manage.c
arch/powerpc/platforms/cell/spufs/context.c
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/sched.c
arch/powerpc/platforms/cell/spufs/spufs.h
arch/powerpc/platforms/celleb/htab.c
arch/powerpc/platforms/embedded6xx/linkstation.c
arch/powerpc/platforms/ps3/spu.c
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/firmware.h [deleted file]
arch/powerpc/platforms/pseries/kexec.c [new file with mode: 0644]
arch/powerpc/platforms/pseries/pci.c
arch/powerpc/platforms/pseries/pseries.h [new file with mode: 0644]
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/ras.h [deleted file]
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/pseries/smp.c
arch/powerpc/sysdev/fsl_soc.c
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/qe_lib/ucc_slow.c
arch/powerpc/xmon/xmon.c
arch/ppc/configs/taishan_defconfig [new file with mode: 0644]
arch/ppc/kernel/head_fsl_booke.S
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/mm/pgtable.c
arch/ppc/platforms/4xx/Kconfig
arch/ppc/platforms/4xx/Makefile
arch/ppc/platforms/4xx/taishan.c [new file with mode: 0644]
arch/ppc/platforms/4xx/taishan.h [new file with mode: 0644]
arch/ppc/syslib/Makefile
drivers/acpi/i2c_ec.c
drivers/ata/pata_mpc52xx.c
drivers/char/keyboard.c
drivers/char/sysrq.c
drivers/char/tty_io.c
drivers/char/vt.c
drivers/char/watchdog/acquirewdt.c
drivers/char/watchdog/advantechwdt.c
drivers/char/watchdog/alim1535_wdt.c
drivers/char/watchdog/alim7101_wdt.c
drivers/char/watchdog/cpu5wdt.c
drivers/char/watchdog/eurotechwdt.c
drivers/char/watchdog/i6300esb.c
drivers/char/watchdog/i8xx_tco.c
drivers/char/watchdog/iTCO_wdt.c
drivers/char/watchdog/ib700wdt.c
drivers/char/watchdog/ibmasr.c
drivers/char/watchdog/indydog.c
drivers/char/watchdog/machzwd.c
drivers/char/watchdog/mixcomwd.c
drivers/char/watchdog/pc87413_wdt.c
drivers/char/watchdog/pcwd.c
drivers/char/watchdog/pcwd_pci.c
drivers/char/watchdog/pcwd_usb.c
drivers/char/watchdog/pnx4008_wdt.c
drivers/char/watchdog/s3c2410_wdt.c
drivers/char/watchdog/sbc60xxwdt.c
drivers/char/watchdog/sbc8360.c
drivers/char/watchdog/sbc_epx_c3.c
drivers/char/watchdog/sc1200wdt.c
drivers/char/watchdog/sc520_wdt.c
drivers/char/watchdog/shwdt.c
drivers/char/watchdog/smsc37b787_wdt.c
drivers/char/watchdog/softdog.c
drivers/char/watchdog/w83627hf_wdt.c
drivers/char/watchdog/w83697hf_wdt.c
drivers/char/watchdog/w83877f_wdt.c
drivers/char/watchdog/w83977f_wdt.c
drivers/char/watchdog/wafer5823wdt.c
drivers/char/watchdog/wdt.c
drivers/char/watchdog/wdt977.c
drivers/char/watchdog/wdt_pci.c
drivers/hwmon/vt8231.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-ali1535.c
drivers/i2c/busses/i2c-ali1563.c
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-amd756-s4882.c
drivers/i2c/busses/i2c-amd756.c
drivers/i2c/busses/i2c-amd8111.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-i810.c
drivers/i2c/busses/i2c-ibm_iic.c
drivers/i2c/busses/i2c-isa.c
drivers/i2c/busses/i2c-mv64xxx.c
drivers/i2c/busses/i2c-nforce2.c
drivers/i2c/busses/i2c-parport.h
drivers/i2c/busses/i2c-pasemi.c [new file with mode: 0644]
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-powermac.c
drivers/i2c/busses/i2c-savage4.c
drivers/i2c/busses/i2c-sis5595.c
drivers/i2c/busses/i2c-sis630.c
drivers/i2c/busses/i2c-sis96x.c
drivers/i2c/busses/i2c-via.c
drivers/i2c/busses/i2c-viapro.c
drivers/i2c/busses/i2c-voodoo3.c
drivers/i2c/busses/scx200_acb.c
drivers/i2c/busses/scx200_i2c.c
drivers/i2c/i2c-core.c
drivers/ieee1394/pcilynx.c
drivers/macintosh/adbhid.c
drivers/macintosh/apm_emu.c
drivers/macintosh/mac_hid.c
drivers/macintosh/therm_adt746x.c
drivers/macintosh/via-cuda.c
drivers/macintosh/via-macii.c
drivers/macintosh/via-maciisi.c
drivers/macintosh/via-pmu.c
drivers/macintosh/via-pmu68k.c
drivers/media/dvb/b2c2/flexcop-i2c.c
drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/video/cafe_ccic.c
drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
drivers/media/video/usbvision/usbvision-i2c.c
drivers/media/video/w9968cf.c
drivers/media/video/zoran_card.c
drivers/rtc/rtc-ds1672.c
drivers/rtc/rtc-pcf8563.c
drivers/rtc/rtc-rs5c372.c
drivers/rtc/rtc-x1205.c
drivers/serial/Kconfig
drivers/serial/Makefile
drivers/serial/mpc52xx_uart.c
drivers/serial/of_serial.c [new file with mode: 0644]
drivers/video/matrox/i2c-matroxfb.c
fs/dcache.c
include/asm-mips/atomic.h
include/asm-mips/bitops.h
include/asm-mips/compat-signal.h [new file with mode: 0644]
include/asm-mips/dma-mapping.h
include/asm-mips/mach-generic/dma-coherence.h [new file with mode: 0644]
include/asm-mips/mach-generic/kmalloc.h
include/asm-mips/mach-ip27/dma-coherence.h [new file with mode: 0644]
include/asm-mips/mach-ip32/dma-coherence.h [new file with mode: 0644]
include/asm-mips/mach-jazz/dma-coherence.h [new file with mode: 0644]
include/asm-mips/spinlock.h
include/asm-mips/system.h
include/asm-mips/uaccess.h
include/asm-powerpc/cell-pmu.h
include/asm-powerpc/floppy.h
include/asm-powerpc/spu.h
include/asm-powerpc/systbl.h
include/asm-powerpc/ucc_slow.h
include/asm-powerpc/udbg.h
include/asm-powerpc/vdso.h
include/asm-ppc/ibm4xx.h
include/linux/i2c-id.h
include/linux/i2c.h
include/linux/pci_ids.h

index 3db69a086c41d466afa26dfc6132c82b304a57e7..c34f0db78a30f9f66b22f055f92cd95ae024c6dc 100644 (file)
@@ -48,14 +48,9 @@ following:
 The SMBus controller is function 3 in device 1f. Class 0c05 is SMBus Serial
 Controller.
 
-If you do NOT see the 24x3 device at function 3, and you can't figure out
-any way in the BIOS to enable it,
-
 The ICH chips are quite similar to Intel's PIIX4 chip, at least in the
 SMBus controller.
 
-See the file i2c-piix4 for some additional information.
-
 
 Process Call Support
 --------------------
@@ -74,6 +69,61 @@ SMBus 2.0 Support
 
 The 82801DB (ICH4) and later chips support several SMBus 2.0 features.
 
+
+Hidden ICH SMBus
+----------------
+
+If your system has an Intel ICH south bridge, but you do NOT see the
+SMBus device at 00:1f.3 in lspci, and you can't figure out any way in the
+BIOS to enable it, it means it has been hidden by the BIOS code. Asus is
+well known for first doing this on their P4B motherboard, and many other
+boards after that. Some vendor machines are affected as well.
+
+The first thing to try is the "i2c_ec" ACPI driver. It could be that the
+SMBus was hidden on purpose because it'll be driven by ACPI. If the
+i2c_ec driver works for you, just forget about the i2c-i801 driver and
+don't try to unhide the ICH SMBus. Even if i2c_ec doesn't work, you
+better make sure that the SMBus isn't used by the ACPI code. Try loading
+the "fan" and "thermal" drivers, and check in /proc/acpi/fan and
+/proc/acpi/thermal_zone. If you find anything there, it's likely that
+the ACPI is accessing the SMBus and it's safer not to unhide it. Only
+once you are certain that ACPI isn't using the SMBus, you can attempt
+to unhide it.
+
+In order to unhide the SMBus, we need to change the value of a PCI
+register before the kernel enumerates the PCI devices. This is done in
+drivers/pci/quirks.c, where all affected boards must be listed (see
+function asus_hides_smbus_hostbridge.) If the SMBus device is missing,
+and you think there's something interesting on the SMBus (e.g. a
+hardware monitoring chip), you need to add your board to the list.
+
+The motherboard is identified using the subvendor and subdevice IDs of the
+host bridge PCI device. Get yours with "lspci -n -v -s 00:00.0":
+
+00:00.0 Class 0600: 8086:2570 (rev 02)
+        Subsystem: 1043:80f2
+        Flags: bus master, fast devsel, latency 0
+        Memory at fc000000 (32-bit, prefetchable) [size=32M]
+        Capabilities: [e4] #09 [2106]
+        Capabilities: [a0] AGP version 3.0
+
+Here the host bridge ID is 2570 (82865G/PE/P), the subvendor ID is 1043
+(Asus) and the subdevice ID is 80f2 (P4P800-X). You can find the symbolic
+names for the bridge ID and the subvendor ID in include/linux/pci_ids.h,
+and then add a case for your subdevice ID at the right place in
+drivers/pci/quirks.c. Then please give it very good testing, to make sure
+that the unhidden SMBus doesn't conflict with e.g. ACPI.
+
+If it works, proves useful (i.e. there are usable chips on the SMBus)
+and seems safe, please submit a patch for inclusion into the kernel.
+
+Note: There's a useful script in lm_sensors 2.10.2 and later, named
+unhide_ICH_SMBus (in prog/hotplug), which uses the fakephp driver to
+temporarily unhide the SMBus without having to patch and recompile your
+kernel. It's very convenient if you just want to check if there's
+anything interesting on your hidden ICH SMBus.
+
+
 **********************
 The lm_sensors project gratefully acknowledges the support of Texas
 Instruments in the initial development of this driver.
index 77b995dfca22652bc94532a9145047d444b8baec..dceaba1ad930733e04d95dca441ec3c411f7f0be 100644 (file)
@@ -19,6 +19,7 @@ It currently supports the following devices:
  * (type=4) Analog Devices ADM1032 evaluation board
  * (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031
  * (type=6) Barco LPT->DVI (K5800236) adapter
+ * (type=7) One For All JP1 parallel port adapter
 
 These devices use different pinout configurations, so you have to tell
 the driver what you have, using the type module parameter. There is no
@@ -157,3 +158,17 @@ many more, using /dev/velleman.
   http://home.wanadoo.nl/hihihi/libk8005.htm
   http://struyve.mine.nu:8080/index.php?block=k8000
   http://sourceforge.net/projects/libk8005/
+
+
+One For All JP1 parallel port adapter
+-------------------------------------
+
+The JP1 project revolves around a set of remote controls which expose
+the I2C bus their internal configuration EEPROM lives on via a 6 pin
+jumper in the battery compartment. More details can be found at:
+
+http://www.hifi-remote.com/jp1/
+
+Details of the simple parallel port hardware can be found at:
+
+http://www.hifi-remote.com/jp1/hardware.shtml
index 921476333235b3b207c30458f97986956c372b68..7cbe43fa2701dfb875a7eae69754ecb557e5c043 100644 (file)
@@ -6,7 +6,7 @@ Supported adapters:
     Datasheet: Publicly available at the Intel website
   * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges
     Datasheet: Only available via NDA from ServerWorks
-  * ATI IXP southbridges IXP200, IXP300, IXP400
+  * ATI IXP200, IXP300, IXP400 and SB600 southbridges
     Datasheet: Not publicly available
   * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
     Datasheet: Publicly available at the SMSC website http://www.smsc.com
index 25680346e0acd2059bf23608f5982b8bb2163eaf..775f489e86f63162d9abe00b1588f4b515704521 100644 (file)
@@ -13,6 +13,9 @@ Supported adapters:
   * VIA Technologies, Inc. VT8235, VT8237R, VT8237A, VT8251
     Datasheet: available on request and under NDA from VIA
 
+  * VIA Technologies, Inc. CX700
+    Datasheet: available on request and under NDA from VIA
+
 Authors:
        Kyösti Mälkki <kmalkki@cc.hut.fi>,
        Mark D. Studebaker <mdsxyz123@yahoo.com>,
@@ -44,6 +47,7 @@ Your lspci -n listing must show one of these :
  device 1106:3227   (VT8237R)
  device 1106:3337   (VT8237A)
  device 1106:3287   (VT8251)
+ device 1106:8324   (CX700)
 
 If none of these show up, you should look in the BIOS for settings like
 enable ACPI / SMBus or even USB.
@@ -51,3 +55,6 @@ enable ACPI / SMBus or even USB.
 Except for the oldest chips (VT82C596A/B, VT82C686A and most probably
 VT8231), this driver supports I2C block transactions. Such transactions
 are mainly useful to read from and write to EEPROMs.
+
+The CX700 additionally appears to support SMBus PEC, although this driver
+doesn't implement it yet.
index f03c2a02f806684c39c0cd8459eaab71a661496b..ca272b263a92e5f2aefaf0158c30145ba7119a9f 100644 (file)
@@ -129,6 +129,12 @@ Technical changes:
   structure, those name member should be initialized to a driver name
   string. i2c_driver itself has no name member anymore.
 
+* [Driver model] Instead of shutdown or reboot notifiers, provide a
+  shutdown() method in your driver.
+
+* [Power management] Use the driver model suspend() and resume()
+  callbacks instead of the obsolete pm_register() calls.
+
 Coding policy:
 
 * [Copyright] Use (C), not (c), for copyright.
index 09f5e5ca49272544002b862d0b61af21bc66ce70..8a653c60d25a22d1bde489b947e58b0847d6e324 100644 (file)
@@ -97,7 +97,7 @@ SMBus Write Word Data
 =====================
 
 This is the opposite operation of the Read Word Data command. 16 bits
-of data is read from a device, from a designated register that is 
+of data is written to a device, to the designated register that is
 specified through the Comm byte. 
 
 S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P
index 3a057c8e5507c4d1ef8620b93fff8bfe1f208702..fbcff96f4ca1f8881d8459ff94c74ac1e38e6417 100644 (file)
@@ -21,20 +21,26 @@ The driver structure
 
 Usually, you will implement a single driver structure, and instantiate
 all clients from it. Remember, a driver structure contains general access 
-routines, a client structure specific information like the actual I2C
-address.
+routines, and should be zero-initialized except for fields with data you
+provide.  A client structure holds device-specific information like the
+driver model device node, and its I2C address.
 
 static struct i2c_driver foo_driver = {
        .driver = {
                .name   = "foo",
        },
-       .attach_adapter = &foo_attach_adapter,
-       .detach_client  = &foo_detach_client,
-       .command        = &foo_command /* may be NULL */
+       .attach_adapter = foo_attach_adapter,
+       .detach_client  = foo_detach_client,
+       .shutdown       = foo_shutdown, /* optional */
+       .suspend        = foo_suspend,  /* optional */
+       .resume         = foo_resume,   /* optional */
+       .command        = foo_command,  /* optional */
 }
  
-The name field must match the driver name, including the case. It must not
-contain spaces, and may be up to 31 characters long.
+The name field is the driver name, and must not contain spaces.  It
+should match the module name (if the driver can be compiled as a module),
+although you can use MODULE_ALIAS (passing "foo" in this example) to add
+another name for the module.
 
 All other fields are for call-back functions which will be explained 
 below.
@@ -43,11 +49,18 @@ below.
 Extra client data
 =================
 
-The client structure has a special `data' field that can point to any
-structure at all. You can use this to keep client-specific data. You
+Each client structure has a special `data' field that can point to any
+structure at all.  You should use this to keep device-specific data,
+especially in drivers that handle multiple I2C or SMBUS devices.  You
 do not always need this, but especially for `sensors' drivers, it can
 be very useful.
 
+       /* store the value */
+       void i2c_set_clientdata(struct i2c_client *client, void *data);
+
+       /* retrieve the value */
+       void *i2c_get_clientdata(struct i2c_client *client);
+
 An example structure is below.
 
   struct foo_data {
@@ -493,6 +506,33 @@ by `__init_data'.  Hose functions and structures can be removed after
 kernel booting (or module loading) is completed.
 
 
+Power Management
+================
+
+If your I2C device needs special handling when entering a system low
+power state -- like putting a transceiver into a low power mode, or
+activating a system wakeup mechanism -- do that in the suspend() method.
+The resume() method should reverse what the suspend() method does.
+
+These are standard driver model calls, and they work just like they
+would for any other driver stack.  The calls can sleep, and can use
+I2C messaging to the device being suspended or resumed (since their
+parent I2C adapter is active when these calls are issued, and IRQs
+are still enabled).
+
+
+System Shutdown
+===============
+
+If your I2C device needs special handling when the system shuts down
+or reboots (including kexec) -- like turning something off -- use a
+shutdown() method.
+
+Again, this is a standard driver model call, working just like it
+would for any other driver stack:  the calls can sleep, and can use
+I2C messaging.
+
+
 Command function
 ================
 
index 33994271cb3bcbc81caba4581be2c5ec16046946..3b514672b80ed3ef6d34b179dc65d35e366f0126 100644 (file)
@@ -1334,6 +1334,9 @@ platforms are moved over to use the flattened-device-tree model.
       fsl-usb2-mph compatible controllers.  Either this property or
       "port0" (or both) must be defined for "fsl-usb2-mph" compatible 
       controllers.
+    - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible
+      controllers.  Can be "host", "peripheral", or "otg".  Default to
+      "host" if not defined for backward compatibility.
 
    Recommended properties :
     - interrupts : <a b> where a is the interrupt number and b is a
@@ -1367,6 +1370,7 @@ platforms are moved over to use the flattened-device-tree model.
                #size-cells = <0>;
                interrupt-parent = <700>;
                interrupts = <26 1>;
+               dr_mode = "otg";
                phy = "ulpi";
        };
 
index 69f016f02bb0f6055913528b2fa19428872a6584..e59fcbbe338cb437dabb6fd28d8d0f5d1e14345b 100644 (file)
@@ -1,7 +1,7 @@
-MPC52xx Device Tree Bindings
+MPC5200 Device Tree Bindings
 ----------------------------
 
-(c) 2006 Secret Lab Technologies Ltd
+(c) 2006-2007 Secret Lab Technologies Ltd
 Grant Likely <grant.likely at secretlab.ca>
 
 ********** DRAFT ***********
@@ -20,11 +20,11 @@ described in Documentation/powerpc/booting-without-of.txt), or passed
 by Open Firmare (IEEE 1275) compatible firmware using an OF compatible
 client interface API.
 
-This document specifies the requirements on the device-tree for mpc52xx
+This document specifies the requirements on the device-tree for mpc5200
 based boards.  These requirements are above and beyond the details
 specified in either the OpenFirmware spec or booting-without-of.txt
 
-All new mpc52xx-based boards are expected to match this document.  In
+All new mpc5200-based boards are expected to match this document.  In
 cases where this document is not sufficient to support a new board port,
 this document should be updated as part of adding the new board support.
 
@@ -32,26 +32,26 @@ II - Philosophy
 ===============
 The core of this document is naming convention.  The whole point of
 defining this convention is to reduce or eliminate the number of
-special cases required to support a 52xx board.  If all 52xx boards
-follow the same convention, then generic 52xx support code will work
+special cases required to support a 5200 board.  If all 5200 boards
+follow the same convention, then generic 5200 support code will work
 rather than coding special cases for each new board.
 
 This section tries to capture the thought process behind why the naming
 convention is what it is.
 
-1. Node names
--------------
+1.  names
+---------
 There is strong convention/requirements already established for children
 of the root node.  'cpus' describes the processor cores, 'memory'
 describes memory, and 'chosen' provides boot configuration.  Other nodes
 are added to describe devices attached to the processor local bus.
+
 Following convention already established with other system-on-chip
-processors, MPC52xx boards must have an 'soc5200' node as a child of the
-root node.
+processors, 5200 device trees should use the name 'soc5200' for the
+parent node of on chip devices, and the root node should be its parent.
 
-The soc5200 node holds child nodes for all on chip devices.  Child nodes
-are typically named after the configured function.  ie. the FEC node is
-named 'ethernet', and a PSC in uart mode is named 'serial'.
+Child nodes are typically named after the configured function.  ie.
+the FEC node is named 'ethernet', and a PSC in uart mode is named 'serial'.
 
 2. device_type property
 -----------------------
@@ -66,28 +66,47 @@ exactly.
 Since device_type isn't enough to match devices to drivers, there also
 needs to be a naming convention for the compatible property.  Compatible
 is an list of device descriptions sorted from specific to generic.  For
-the mpc52xx, the required format for each compatible value is
-<chip>-<device>[-<mode>].  At the minimum, the list shall contain two
-items; the first specifying the exact chip, and the second specifying
-mpc52xx for the chip.
-
-ie. ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc52xx-ethernet"
-
-The idea here is that most drivers will match to the most generic field
-in the compatible list (mpc52xx-*), but can also test the more specific
-field for enabling bug fixes or extra features.
+the mpc5200, the required format for each compatible value is
+<chip>-<device>[-<mode>].  The OS should be able to match a device driver
+to the device based solely on the compatible value.  If two drivers
+match on the compatible list; the 'most compatible' driver should be
+selected.
+
+The split between the MPC5200 and the MPC5200B leaves a bit of a
+connundrum.  How should the compatible property be set up to provide
+maximum compatability information; but still acurately describe the
+chip?  For the MPC5200; the answer is easy.  Most of the SoC devices
+originally appeared on the MPC5200.  Since they didn't exist anywhere
+else; the 5200 compatible properties will contain only one item;
+"mpc5200-<device>".
+
+The 5200B is almost the same as the 5200, but not quite.  It fixes
+silicon bugs and it adds a small number of enhancements.  Most of the
+devices either provide exactly the same interface as on the 5200.  A few
+devices have extra functions but still have a backwards compatible mode.
+To express this infomation as completely as possible, 5200B device trees
+should have two items in the compatible list;
+"mpc5200b-<device>\0mpc5200-<device>".  It is *strongly* recommended
+that 5200B device trees follow this convention (instead of only listing
+the base mpc5200 item).
+
+If another chip appear on the market with one of the mpc5200 SoC
+devices, then the compatible list should include mpc5200-<device>.
+
+ie. ethernet on mpc5200: compatible = "mpc5200-ethernet"
+    ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc5200-ethernet"
 
 Modal devices, like PSCs, also append the configured function to the
 end of the compatible field.  ie. A PSC in i2s mode would specify
-"mpc52xx-psc-i2s", not "mpc52xx-i2s".  This convention is chosen to
+"mpc5200-psc-i2s", not "mpc5200-i2s".  This convention is chosen to
 avoid naming conflicts with non-psc devices providing the same
-function.  For example, "mpc52xx-spi" and "mpc52xx-psc-spi" describe
+function.  For example, "mpc5200-spi" and "mpc5200-psc-spi" describe
 the mpc5200 simple spi device and a PSC spi mode respectively.
 
 If the soc device is more generic and present on other SOCs, the
 compatible property can specify the more generic device type also.
 
-ie. mscan: compatible = "mpc5200-mscan\0mpc52xx-mscan\0fsl,mscan";
+ie. mscan: compatible = "mpc5200-mscan\0fsl,mscan";
 
 At the time of writing, exact chip may be either 'mpc5200' or
 'mpc5200b'.
@@ -96,7 +115,7 @@ Device drivers should always try to match as generically as possible.
 
 III - Structure
 ===============
-The device tree for an mpc52xx board follows the structure defined in
+The device tree for an mpc5200 board follows the structure defined in
 booting-without-of.txt with the following additional notes:
 
 0) the root node
@@ -115,7 +134,7 @@ Typical memory description node; see booting-without-of.
 
 3) The soc5200 node
 -------------------
-This node describes the on chip SOC peripherals.  Every mpc52xx based
+This node describes the on chip SOC peripherals.  Every mpc5200 based
 board will have this node, and as such there is a common naming
 convention for SOC devices.
 
@@ -125,71 +144,111 @@ name                     type            description
 device_type            string          must be "soc"
 ranges                 int             should be <0 baseaddr baseaddr+10000>
 reg                    int             must be <baseaddr 10000>
+compatible             string          mpc5200: "mpc5200-soc"
+                                       mpc5200b: "mpc5200b-soc\0mpc5200-soc"
+system-frequency       int             Fsystem frequency; source of all
+                                       other clocks.
+bus-frequency          int             IPB bus frequency in HZ.  Clock rate
+                                       used by most of the soc devices.
+#interrupt-cells       int             must be <3>.
 
 Recommended properties:
 name                   type            description
 ----                   ----            -----------
-compatible             string          should be "<chip>-soc\0mpc52xx-soc"
-                                       ie. "mpc5200b-soc\0mpc52xx-soc"
-#interrupt-cells       int             must be <3>.  If it is not defined
-                                       here then it must be defined in every
-                                       soc device node.
-bus-frequency          int             IPB bus frequency in HZ.  Clock rate
-                                       used by most of the soc devices.
-                                       Defining it here avoids needing it
-                                       added to every device node.
+model                  string          Exact model of the chip;
+                                       ie: model="fsl,mpc5200"
+revision               string          Silicon revision of chip
+                                       ie: revision="M08A"
+
+The 'model' and 'revision' properties are *strongly* recommended.  Having
+them presence acts as a bit of a safety net for working around as yet
+undiscovered bugs on one version of silicon.  For example, device drivers
+can use the model and revision properties to decide if a bug fix should
+be turned on.
 
 4) soc5200 child nodes
 ----------------------
 Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
 
-Note: in the tables below, '*' matches all <chip> values.  ie.
-*-pic would translate to "mpc5200-pic\0mpc52xx-pic"
+Note: The tables below show the value for the mpc5200.  A mpc5200b device
+tree should use the "mpc5200b-<device>\0mpc5200-<device> form.
 
 Required soc5200 child nodes:
 name           device_type             compatible      Description
 ----           -----------             ----------      -----------
-cdm@<addr>     cdm                     *-cmd           Clock Distribution
-pic@<addr>     interrupt-controller    *-pic           need an interrupt
+cdm@<addr>     cdm                     mpc5200-cmd     Clock Distribution
+pic@<addr>     interrupt-controller    mpc5200-pic     need an interrupt
                                                        controller to boot
-bestcomm@<addr>        dma-controller          *-bestcomm      52xx pic also requires
-                                                       the bestcomm device
+bestcomm@<addr>        dma-controller          mpc5200-bestcomm 5200 pic also requires
+                                                        the bestcomm device
 
 Recommended soc5200 child nodes; populate as needed for your board
-name           device_type     compatible      Description
-----           -----------     ----------      -----------
-gpt@<addr>     gpt             *-gpt           General purpose timers
-rtc@<addr>     rtc             *-rtc           Real time clock
-mscan@<addr>   mscan           *-mscan         CAN bus controller
-pci@<addr>     pci             *-pci           PCI bridge
-serial@<addr>  serial          *-psc-uart      PSC in serial mode
-i2s@<addr>     sound           *-psc-i2s       PSC in i2s mode
-ac97@<addr>    sound           *-psc-ac97      PSC in ac97 mode
-spi@<addr>     spi             *-psc-spi       PSC in spi mode
-irda@<addr>    irda            *-psc-irda      PSC in IrDA mode
-spi@<addr>     spi             *-spi           MPC52xx spi device
-ethernet@<addr>        network         *-fec           MPC52xx ethernet device
-ata@<addr>     ata             *-ata           IDE ATA interface
-i2c@<addr>     i2c             *-i2c           I2C controller
-usb@<addr>     usb-ohci-be     *-ohci,ohci-be  USB controller
-xlb@<addr>     xlb             *-xlb           XLB arbritrator
+name           device_type     compatible        Description
+----           -----------     ----------        -----------
+gpt@<addr>     gpt             mpc5200-gpt       General purpose timers
+rtc@<addr>     rtc             mpc5200-rtc       Real time clock
+mscan@<addr>   mscan           mpc5200-mscan     CAN bus controller
+pci@<addr>     pci             mpc5200-pci       PCI bridge
+serial@<addr>  serial          mpc5200-psc-uart  PSC in serial mode
+i2s@<addr>     sound           mpc5200-psc-i2s   PSC in i2s mode
+ac97@<addr>    sound           mpc5200-psc-ac97  PSC in ac97 mode
+spi@<addr>     spi             mpc5200-psc-spi   PSC in spi mode
+irda@<addr>    irda            mpc5200-psc-irda  PSC in IrDA mode
+spi@<addr>     spi             mpc5200-spi       MPC5200 spi device
+ethernet@<addr>        network         mpc5200-fec       MPC5200 ethernet device
+ata@<addr>     ata             mpc5200-ata       IDE ATA interface
+i2c@<addr>     i2c             mpc5200-i2c       I2C controller
+usb@<addr>     usb-ohci-be     mpc5200-ohci,ohci-be    USB controller
+xlb@<addr>     xlb             mpc5200-xlb       XLB arbritrator
+
+Important child node properties
+name           type            description
+----           ----            -----------
+cell-index     int             When multiple devices are present, is the
+                               index of the device in the hardware (ie. There
+                               are 6 PSC on the 5200 numbered PSC1 to PSC6)
+                                   PSC1 has 'cell-index = <0>'
+                                   PSC4 has 'cell-index = <3>'
+
+5) General Purpose Timer nodes (child of soc5200 node)
+On the mpc5200 and 5200b, GPT0 has a watchdog timer function.  If the board
+design supports the internal wdt, then the device node for GPT0 should
+include the empty property 'has-wdt'.
+
+6) PSC nodes (child of soc5200 node)
+PSC nodes can define the optional 'port-number' property to force assignment
+order of serial ports.  For example, PSC5 might be physically connected to
+the port labeled 'COM1' and PSC1 wired to 'COM1'.  In this case, PSC5 would
+have a "port-number = <0>" property, and PSC1 would have "port-number = <1>".
+
+PSC in i2s mode:  The mpc5200 and mpc5200b PSCs are not compatible when in
+i2s mode.  An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
+compatible field.
 
 IV - Extra Notes
 ================
 
 1. Interrupt mapping
 --------------------
-The mpc52xx pic driver splits hardware IRQ numbers into two levels.  The
+The mpc5200 pic driver splits hardware IRQ numbers into two levels.  The
 split reflects the layout of the PIC hardware itself, which groups
 interrupts into one of three groups; CRIT, MAIN or PERP.  Also, the
 Bestcomm dma engine has it's own set of interrupt sources which are
 cascaded off of peripheral interrupt 0, which the driver interprets as a
 fourth group, SDMA.
 
-The interrupts property for device nodes using the mpc52xx pic consists
+The interrupts property for device nodes using the mpc5200 pic consists
 of three cells; <L1 L2 level>
 
     L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
     L2 := interrupt number; directly mapped from the value in the
           "ICTL PerStat, MainStat, CritStat Encoded Register"
     level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
+
+2. Shared registers
+-------------------
+Some SoC devices share registers between them.  ie. the i2c devices use
+a single clock control register, and almost all device are affected by
+the port_config register.  Devices which need to manipulate shared regs
+should look to the parent SoC node.  The soc node is responsible
+for arbitrating all shared register access.
index f85c603b02a335aa9bf0bae7eec28f7e44ef68b3..93a338daedd83b5168bf891a85305167043dd124 100644 (file)
@@ -2523,6 +2523,12 @@ M:       olof@lixom.net
 L:     netdev@vger.kernel.org
 S:     Maintained
 
+PA SEMI SMBUS DRIVER
+P:     Olof Johansson
+M:     olof@lixom.net
+L:     i2c@lm-sensors.org
+S:     Maintained
+
 PARALLEL PORT SUPPORT
 P:     Phil Blundell
 M:     philb@gnu.org
index 5fe195a41a804025a838a7d33e40dfbee6d91998..a92ce6bd7cf1c89fa867e08126e8d573b61cbb06 100644 (file)
@@ -598,8 +598,6 @@ config SGI_IP32
        select ARC
        select ARC32
        select BOOT_ELF32
-       select OWN_DMA
-       select DMA_IP32
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select R5000_CPU_SCACHE
@@ -883,9 +881,6 @@ config DMA_NONCOHERENT
 config DMA_NEED_PCI_MAP_STATE
        bool
 
-config OWN_DMA
-       bool
-
 config EARLY_PRINTK
        bool
 
index 96090f28373bbfe025871a72dc7adf0c5fa88a77..f21186c12d81f41fae2ca403d59a5d87ec0bc399 100644 (file)
@@ -264,7 +264,7 @@ CONFIG_BINFMT_ELF=y
 CONFIG_MIPS32_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_MIPS32_O32=y
-# CONFIG_MIPS32_N32 is not set
+CONFIG_MIPS32_N32=y
 CONFIG_BINFMT_ELF32=y
 
 #
index b251ef864c33b281fa899a295c266f10f48db98d..00cecdcc75f215cb6e5a6581442774996fcc26f3 100644 (file)
                 srlv   t3,t1,t2
 
 handle_it:
-               LONG_L  s0, TI_REGS($28)
-               LONG_S  sp, TI_REGS($28)
-               PTR_LA  ra, ret_from_irq
                j       dec_irq_dispatch
                 nop
 
@@ -277,7 +274,6 @@ fpu:
 #endif
 
 spurious:
-               PTR_LA  ra, _ret_from_irq
                j       spurious_interrupt
                 nop
                END(plat_irq_dispatch)
index f10b6a19f8bf7b672242dbf2dcf9bf1f495c7c13..0b78fcbf044ab563453850fe8d404ca3615b6053 100644 (file)
 #endif
 
 #ifndef CONFIG_PREEMPT
-       .macro  preempt_stop
-       local_irq_disable
-       .endm
 #define resume_kernel  restore_all
+#else
+#define __ret_from_irq ret_from_exception
 #endif
 
        .text
        .align  5
-FEXPORT(ret_from_irq)
-       LONG_S  s0, TI_REGS($28)
-#ifdef CONFIG_PREEMPT
-FEXPORT(ret_from_exception)
-#else
-       b       _ret_from_irq
+#ifndef CONFIG_PREEMPT
 FEXPORT(ret_from_exception)
-       preempt_stop
+       local_irq_disable                       # preempt stop
+       b       __ret_from_irq
 #endif
-FEXPORT(_ret_from_irq)
+FEXPORT(ret_from_irq)
+       LONG_S  s0, TI_REGS($28)
+FEXPORT(__ret_from_irq)
        LONG_L  t0, PT_STATUS(sp)               # returning to kernel mode?
        andi    t0, t0, KU_USER
        beqz    t0, resume_kernel
index ca7ad78f4def1fea27de9142b1ffd17d91900337..fc4dd6c9dd802c8308f16f422b7f93cc15734905 100644 (file)
@@ -39,6 +39,7 @@
 #include <net/sock.h>
 #include <net/scm.h>
 
+#include <asm/compat-signal.h>
 #include <asm/ipc.h>
 #include <asm/sim.h>
 #include <asm/uaccess.h>
@@ -736,3 +737,49 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs)
        return do_fork(clone_flags, newsp, &regs, 0,
                       parent_tidptr, child_tidptr);
 }
+
+/*
+ * Implement the event wait interface for the eventpoll file. It is the kernel
+ * part of the user space epoll_pwait(2).
+ */
+asmlinkage long compat_sys_epoll_pwait(int epfd,
+       struct epoll_event __user *events, int maxevents, int timeout,
+       const compat_sigset_t __user *sigmask, size_t sigsetsize)
+{
+       int error;
+       sigset_t ksigmask, sigsaved;
+
+       /*
+        * If the caller wants a certain signal mask to be set during the wait,
+        * we apply it here.
+        */
+       if (sigmask) {
+               if (sigsetsize != sizeof(sigset_t))
+                       return -EINVAL;
+               if (!access_ok(VERIFY_READ, sigmask, sizeof(ksigmask)))
+                       return -EFAULT;
+               if (__copy_conv_sigset_from_user(&ksigmask, sigmask))
+                       return -EFAULT;
+               sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
+               sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
+       }
+
+       error = sys_epoll_wait(epfd, events, maxevents, timeout);
+
+       /*
+        * If we changed the signal mask, we need to restore the original one.
+        * In case we've got a signal while waiting, we do not restore the
+        * signal mask yet, and we allow do_signal() to deliver the signal on
+        * the way back to userspace, before the signal mask is restored.
+        */
+       if (sigmask) {
+               if (error == -EINTR) {
+                       memcpy(&current->saved_sigmask, &sigsaved,
+                               sizeof(sigsaved));
+                       set_thread_flag(TIF_RESTORE_SIGMASK);
+               } else
+                       sigprocmask(SIG_SETMASK, &sigsaved, NULL);
+       }
+
+       return error;
+}
index e569b846e9a380ff96e65507f6e13ec3d5f6e414..10e9a18630aa47b168c8140b99f80875e5c76c32 100644 (file)
@@ -470,4 +470,4 @@ sys_call_table:
        PTR     sys_get_robust_list
        PTR     sys_kexec_load                  /* 5270 */
        PTR     sys_getcpu
-       PTR     sys_epoll_pwait
+       PTR     compat_sys_epoll_pwait
index ee8802b597582ef1a71458dfeb93ad0de5412a74..2ceda4644a4d7b4ee64d778753b8fcd0c9dce170 100644 (file)
@@ -396,4 +396,4 @@ EXPORT(sysn32_call_table)
        PTR     compat_sys_get_robust_list
        PTR     compat_sys_kexec_load
        PTR     sys_getcpu
-       PTR     sys_epoll_pwait
+       PTR     compat_sys_epoll_pwait
index 9a8abd67ec5c94a0bad855251f296d2f07be8bf3..fdbdbdc65b543b6333610afcdf0f68d318b1151e 100644 (file)
 #  define DEBUGP(fmt, args...)
 #endif
 
-/*
- * Horribly complicated - with the bloody RM9000 workarounds enabled
- * the signal trampolines is moving to the end of the structure so we can
- * increase the alignment without breaking software compatibility.
- */
-#if ICACHE_REFILLS_WORKAROUND_WAR == 0
-
-struct sigframe {
-       u32 sf_ass[4];          /* argument save space for o32 */
-       u32 sf_code[2];         /* signal trampoline */
-       struct sigcontext sf_sc;
-       sigset_t sf_mask;
-};
-
-#else  /* ICACHE_REFILLS_WORKAROUND_WAR */
-
-struct sigframe {
-       u32 sf_ass[4];                  /* argument save space for o32 */
-       u32 sf_pad[2];
-       struct sigcontext sf_sc;        /* hw context */
-       sigset_t sf_mask;
-       u32 sf_code[8] ____cacheline_aligned;   /* signal trampoline */
-};
-
-#endif /* !ICACHE_REFILLS_WORKAROUND_WAR */
-
-/*
- * handle hardware context
- */
-extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *);
-extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
+#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
 /*
  * Determine which stack to use..
index 54398af2371f9b33d834cfc70b9916fc4337d0d6..b2e9ab1bb10152b6c3c712c1b27adbddd021ff8a 100644 (file)
 
 #include "signal-common.h"
 
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
+/*
+ * Horribly complicated - with the bloody RM9000 workarounds enabled
+ * the signal trampolines is moving to the end of the structure so we can
+ * increase the alignment without breaking software compatibility.
+ */
 #if ICACHE_REFILLS_WORKAROUND_WAR == 0
 
+struct sigframe {
+       u32 sf_ass[4];          /* argument save space for o32 */
+       u32 sf_code[2];         /* signal trampoline */
+       struct sigcontext sf_sc;
+       sigset_t sf_mask;
+};
+
 struct rt_sigframe {
        u32 rs_ass[4];          /* argument save space for o32 */
        u32 rs_code[2];         /* signal trampoline */
@@ -47,6 +57,14 @@ struct rt_sigframe {
 
 #else
 
+struct sigframe {
+       u32 sf_ass[4];                  /* argument save space for o32 */
+       u32 sf_pad[2];
+       struct sigcontext sf_sc;        /* hw context */
+       sigset_t sf_mask;
+       u32 sf_code[8] ____cacheline_aligned;   /* signal trampoline */
+};
+
 struct rt_sigframe {
        u32 rs_ass[4];                  /* argument save space for o32 */
        u32 rs_pad[2];
index 183fc7e55f34cff2b38c88e5c8ec4f7412446d46..c28cb21514c858dc856918f22211f4036565b7c7 100644 (file)
@@ -8,6 +8,7 @@
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  */
 #include <linux/cache.h>
+#include <linux/compat.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
@@ -24,6 +25,7 @@
 
 #include <asm/abi.h>
 #include <asm/asm.h>
+#include <asm/compat-signal.h>
 #include <linux/bitops.h>
 #include <asm/cacheflush.h>
 #include <asm/sim.h>
@@ -104,8 +106,6 @@ typedef struct compat_siginfo {
 #define __NR_O32_rt_sigreturn          4193
 #define __NR_O32_restart_syscall       4253
 
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
 /* 32-bit compatibility types */
 
 #define _NSIG_BPW32    32
@@ -139,8 +139,20 @@ struct ucontext32 {
        sigset_t32          uc_sigmask;   /* mask last for extensibility */
 };
 
+/*
+ * Horribly complicated - with the bloody RM9000 workarounds enabled
+ * the signal trampolines is moving to the end of the structure so we can
+ * increase the alignment without breaking software compatibility.
+ */
 #if ICACHE_REFILLS_WORKAROUND_WAR == 0
 
+struct sigframe32 {
+       u32 sf_ass[4];          /* argument save space for o32 */
+       u32 sf_code[2];         /* signal trampoline */
+       struct sigcontext32 sf_sc;
+       sigset_t sf_mask;
+};
+
 struct rt_sigframe32 {
        u32 rs_ass[4];                  /* argument save space for o32 */
        u32 rs_code[2];                 /* signal trampoline */
@@ -150,6 +162,14 @@ struct rt_sigframe32 {
 
 #else  /* ICACHE_REFILLS_WORKAROUND_WAR */
 
+struct sigframe32 {
+       u32 sf_ass[4];                  /* argument save space for o32 */
+       u32 sf_pad[2];
+       struct sigcontext32 sf_sc;      /* hw context */
+       sigset_t sf_mask;
+       u32 sf_code[8] ____cacheline_aligned;   /* signal trampoline */
+};
+
 struct rt_sigframe32 {
        u32 rs_ass[4];                  /* argument save space for o32 */
        u32 rs_pad[2];
@@ -493,13 +513,13 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
 
 asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
 {
-       struct sigframe __user *frame;
+       struct sigframe32 __user *frame;
        sigset_t blocked;
 
-       frame = (struct sigframe __user *) regs.regs[29];
+       frame = (struct sigframe32 __user *) regs.regs[29];
        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
                goto badframe;
-       if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked)))
+       if (__copy_conv_sigset_from_user(&blocked, &frame->sf_mask))
                goto badframe;
 
        sigdelsetmask(&blocked, ~_BLOCKABLE);
@@ -536,7 +556,7 @@ asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
        frame = (struct rt_sigframe32 __user *) regs.regs[29];
        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
                goto badframe;
-       if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
+       if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask))
                goto badframe;
 
        sigdelsetmask(&set, ~_BLOCKABLE);
@@ -581,7 +601,7 @@ badframe:
 int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
        int signr, sigset_t *set)
 {
-       struct sigframe __user *frame;
+       struct sigframe32 __user *frame;
        int err = 0;
 
        frame = get_sigframe(ka, regs, sizeof(*frame));
@@ -591,7 +611,8 @@ int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
        err |= install_sigtramp(frame->sf_code, __NR_O32_sigreturn);
 
        err |= setup_sigcontext32(regs, &frame->sf_sc);
-       err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set));
+       err |= __copy_conv_sigset_to_user(&frame->sf_mask, set);
+
        if (err)
                goto give_sigsegv;
 
@@ -650,7 +671,7 @@ int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
        err |= __put_user(current->sas_ss_size,
                          &frame->rs_uc.uc_stack.ss_size);
        err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext);
-       err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
+       err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
 
        if (err)
                goto give_sigsegv;
index 57456e6a0c628e005b4be025f1ad5c28860947ad..7ca2a078841fb65253d5e9aeec70b8dfcebbd5c9 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <asm/asm.h>
 #include <asm/cacheflush.h>
+#include <asm/compat-signal.h>
 #include <asm/sim.h>
 #include <asm/uaccess.h>
 #include <asm/ucontext.h>
@@ -47,7 +48,9 @@
 #define __NR_N32_rt_sigreturn          6211
 #define __NR_N32_restart_syscall       6214
 
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
+extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *);
+extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
+
 
 /* IRIX compatible stack_t  */
 typedef struct sigaltstack32 {
@@ -61,7 +64,7 @@ struct ucontextn32 {
        s32                 uc_link;
        stack32_t           uc_stack;
        struct sigcontext   uc_mcontext;
-       sigset_t            uc_sigmask;   /* mask last for extensibility */
+       compat_sigset_t     uc_sigmask;   /* mask last for extensibility */
 };
 
 #if ICACHE_REFILLS_WORKAROUND_WAR == 0
@@ -127,7 +130,7 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
        frame = (struct rt_sigframe_n32 __user *) regs.regs[29];
        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
                goto badframe;
-       if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
+       if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask))
                goto badframe;
 
        sigdelsetmask(&set, ~_BLOCKABLE);
@@ -193,7 +196,7 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
        err |= __put_user(current->sas_ss_size,
                          &frame->rs_uc.uc_stack.ss_size);
        err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
-       err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
+       err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
 
        if (err)
                goto give_sigsegv;
index 19e41fd186c4e0c8a9d4ab3646c5897aa359514b..de5727385bc67c2a03a91845a1d66c86fa61cfcb 100644 (file)
@@ -2,8 +2,8 @@
 # Makefile for the Linux/MIPS-specific parts of the memory manager.
 #
 
-obj-y                          += cache.o extable.o fault.o init.o pgtable.o \
-                                  tlbex.o tlbex-fault.o
+obj-y                          += cache.o dma-default.o extable.o fault.o \
+                                  init.o pgtable.o tlbex.o tlbex-fault.o
 
 obj-$(CONFIG_32BIT)            += ioremap.o pgtable-32.o
 obj-$(CONFIG_64BIT)            += pgtable-64.o
@@ -32,14 +32,4 @@ obj-$(CONFIG_R5000_CPU_SCACHE)  += sc-r5k.o
 obj-$(CONFIG_RM7000_CPU_SCACHE)        += sc-rm7k.o
 obj-$(CONFIG_MIPS_CPU_SCACHE)  += sc-mips.o
 
-#
-# Choose one DMA coherency model
-#
-ifndef CONFIG_OWN_DMA
-obj-$(CONFIG_DMA_COHERENT)     += dma-coherent.o
-obj-$(CONFIG_DMA_NONCOHERENT)  += dma-noncoherent.o
-endif
-obj-$(CONFIG_DMA_IP27)         += dma-ip27.o
-obj-$(CONFIG_DMA_IP32)         += dma-ip32.o
-
 EXTRA_AFLAGS := $(CFLAGS)
index 3a8afd47feaab8b3f1e98e5be73b563acd612282..9ea460b16bda3e3e2b25614621bd332093e14982 100644 (file)
@@ -259,6 +259,12 @@ static void sb1_flush_cache_data_page(unsigned long addr)
                on_each_cpu(sb1_flush_cache_data_page_ipi, (void *) addr, 1, 1);
 }
 #else
+
+static void local_sb1_flush_cache_data_page(unsigned long addr)
+{
+       __sb1_writeback_inv_dcache_range(addr, addr + PAGE_SIZE);
+}
+
 void sb1_flush_cache_data_page(unsigned long)
        __attribute__((alias("local_sb1_flush_cache_data_page")));
 #endif
diff --git a/arch/mips/mm/dma-coherent.c b/arch/mips/mm/dma-coherent.c
deleted file mode 100644 (file)
index 5697c6e..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * 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.
- *
- * Copyright (C) 2000  Ani Joshi <ajoshi@unixbox.com>
- * Copyright (C) 2000, 2001  Ralf Baechle <ralf@gnu.org>
- * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
- */
-#include <linux/types.h>
-#include <linux/dma-mapping.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/string.h>
-
-#include <asm/cache.h>
-#include <asm/io.h>
-
-void *dma_alloc_noncoherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-{
-       void *ret;
-       /* ignore region specifiers */
-       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
-
-       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
-       ret = (void *) __get_free_pages(gfp, get_order(size));
-
-       if (ret != NULL) {
-               memset(ret, 0, size);
-               *dma_handle = virt_to_phys(ret);
-       }
-
-       return ret;
-}
-
-EXPORT_SYMBOL(dma_alloc_noncoherent);
-
-void *dma_alloc_coherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-       __attribute__((alias("dma_alloc_noncoherent")));
-
-EXPORT_SYMBOL(dma_alloc_coherent);
-
-void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle)
-{
-       unsigned long addr = (unsigned long) vaddr;
-
-       free_pages(addr, get_order(size));
-}
-
-EXPORT_SYMBOL(dma_free_noncoherent);
-
-void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle) __attribute__((alias("dma_free_noncoherent")));
-
-EXPORT_SYMBOL(dma_free_coherent);
-
-dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
-       enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-
-       return __pa(ptr);
-}
-
-EXPORT_SYMBOL(dma_map_single);
-
-void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_unmap_single);
-
-int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       for (i = 0; i < nents; i++, sg++) {
-               sg->dma_address = (dma_addr_t)page_to_phys(sg->page) + sg->offset;
-       }
-
-       return nents;
-}
-
-EXPORT_SYMBOL(dma_map_sg);
-
-dma_addr_t dma_map_page(struct device *dev, struct page *page,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-
-       return page_to_phys(page) + offset;
-}
-
-EXPORT_SYMBOL(dma_map_page);
-
-void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-              enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_unmap_page);
-
-void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-            enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_unmap_sg);
-
-void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
-       size_t size, enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_cpu);
-
-void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
-       size_t size, enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_device);
-
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
-                     unsigned long offset, size_t size,
-                     enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
-
-void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
-                     unsigned long offset, size_t size,
-                     enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_device);
-
-void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-                enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_cpu);
-
-void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
-                enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_device);
-
-int dma_mapping_error(dma_addr_t dma_addr)
-{
-       return 0;
-}
-
-EXPORT_SYMBOL(dma_mapping_error);
-
-int dma_supported(struct device *dev, u64 mask)
-{
-       /*
-        * we fall back to GFP_DMA when the mask isn't all 1s,
-        * so we can't guarantee allocations that must be
-        * within a tighter range than GFP_DMA..
-        */
-       if (mask < 0x00ffffff)
-               return 0;
-
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_supported);
-
-int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
-{
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_is_consistent);
-
-void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
-              enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_cache_sync);
-
-/* The DAC routines are a PCIism.. */
-
-#ifdef CONFIG_PCI
-
-#include <linux/pci.h>
-
-dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
-       struct page *page, unsigned long offset, int direction)
-{
-       return (dma64_addr_t)page_to_phys(page) + offset;
-}
-
-EXPORT_SYMBOL(pci_dac_page_to_dma);
-
-struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
-       dma64_addr_t dma_addr)
-{
-       return mem_map + (dma_addr >> PAGE_SHIFT);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_to_page);
-
-unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
-       dma64_addr_t dma_addr)
-{
-       return dma_addr & ~PAGE_MASK;
-}
-
-EXPORT_SYMBOL(pci_dac_dma_to_offset);
-
-void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
-       dma64_addr_t dma_addr, size_t len, int direction)
-{
-       BUG_ON(direction == PCI_DMA_NONE);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
-
-void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
-       dma64_addr_t dma_addr, size_t len, int direction)
-{
-       BUG_ON(direction == PCI_DMA_NONE);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
-
-#endif /* CONFIG_PCI */
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
new file mode 100644 (file)
index 0000000..4a32e93
--- /dev/null
@@ -0,0 +1,363 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2000  Ani Joshi <ajoshi@unixbox.com>
+ * Copyright (C) 2000, 2001, 06  Ralf Baechle <ralf@linux-mips.org>
+ * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
+ */
+
+#include <linux/types.h>
+#include <linux/dma-mapping.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/string.h>
+
+#include <asm/cache.h>
+#include <asm/io.h>
+
+#include <dma-coherence.h>
+
+/*
+ * Warning on the terminology - Linux calls an uncached area coherent;
+ * MIPS terminology calls memory areas with hardware maintained coherency
+ * coherent.
+ */
+
+static inline int cpu_is_noncoherent_r10000(struct device *dev)
+{
+       return !plat_device_is_coherent(dev) &&
+              (current_cpu_data.cputype == CPU_R10000 &&
+              current_cpu_data.cputype == CPU_R12000);
+}
+
+void *dma_alloc_noncoherent(struct device *dev, size_t size,
+       dma_addr_t * dma_handle, gfp_t gfp)
+{
+       void *ret;
+
+       /* ignore region specifiers */
+       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
+
+       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
+               gfp |= GFP_DMA;
+       ret = (void *) __get_free_pages(gfp, get_order(size));
+
+       if (ret != NULL) {
+               memset(ret, 0, size);
+               *dma_handle = plat_map_dma_mem(dev, ret, size);
+       }
+
+       return ret;
+}
+
+EXPORT_SYMBOL(dma_alloc_noncoherent);
+
+void *dma_alloc_coherent(struct device *dev, size_t size,
+       dma_addr_t * dma_handle, gfp_t gfp)
+{
+       void *ret;
+
+       /* ignore region specifiers */
+       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
+
+       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
+               gfp |= GFP_DMA;
+       ret = (void *) __get_free_pages(gfp, get_order(size));
+
+       if (ret) {
+               memset(ret, 0, size);
+               *dma_handle = plat_map_dma_mem(dev, ret, size);
+
+               if (!plat_device_is_coherent(dev)) {
+                       dma_cache_wback_inv((unsigned long) ret, size);
+                       ret = UNCAC_ADDR(ret);
+               }
+       }
+
+       return ret;
+}
+
+EXPORT_SYMBOL(dma_alloc_coherent);
+
+void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
+       dma_addr_t dma_handle)
+{
+       free_pages((unsigned long) vaddr, get_order(size));
+}
+
+EXPORT_SYMBOL(dma_free_noncoherent);
+
+void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
+       dma_addr_t dma_handle)
+{
+       unsigned long addr = (unsigned long) vaddr;
+
+       if (!plat_device_is_coherent(dev))
+               addr = CAC_ADDR(addr);
+
+       free_pages(addr, get_order(size));
+}
+
+EXPORT_SYMBOL(dma_free_coherent);
+
+static inline void __dma_sync(unsigned long addr, size_t size,
+       enum dma_data_direction direction)
+{
+       switch (direction) {
+       case DMA_TO_DEVICE:
+               dma_cache_wback(addr, size);
+               break;
+
+       case DMA_FROM_DEVICE:
+               dma_cache_inv(addr, size);
+               break;
+
+       case DMA_BIDIRECTIONAL:
+               dma_cache_wback_inv(addr, size);
+               break;
+
+       default:
+               BUG();
+       }
+}
+
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
+       enum dma_data_direction direction)
+{
+       unsigned long addr = (unsigned long) ptr;
+
+       if (!plat_device_is_coherent(dev))
+               __dma_sync(addr, size, direction);
+
+       return plat_map_dma_mem(dev, ptr, size);
+}
+
+EXPORT_SYMBOL(dma_map_single);
+
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+       enum dma_data_direction direction)
+{
+       if (cpu_is_noncoherent_r10000(dev))
+               __dma_sync(plat_dma_addr_to_phys(dma_addr) + PAGE_OFFSET, size,
+                          direction);
+
+       plat_unmap_dma_mem(dma_addr);
+}
+
+EXPORT_SYMBOL(dma_unmap_single);
+
+int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+       enum dma_data_direction direction)
+{
+       int i;
+
+       BUG_ON(direction == DMA_NONE);
+
+       for (i = 0; i < nents; i++, sg++) {
+               unsigned long addr;
+
+               addr = (unsigned long) page_address(sg->page);
+               if (!plat_device_is_coherent(dev) && addr)
+                       __dma_sync(addr + sg->offset, sg->length, direction);
+               sg->dma_address = plat_map_dma_mem_page(dev, sg->page) +
+                                 sg->offset;
+       }
+
+       return nents;
+}
+
+EXPORT_SYMBOL(dma_map_sg);
+
+dma_addr_t dma_map_page(struct device *dev, struct page *page,
+       unsigned long offset, size_t size, enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+
+       if (!plat_device_is_coherent(dev)) {
+               unsigned long addr;
+
+               addr = (unsigned long) page_address(page) + offset;
+               dma_cache_wback_inv(addr, size);
+       }
+
+       return plat_map_dma_mem_page(dev, page) + offset;
+}
+
+EXPORT_SYMBOL(dma_map_page);
+
+void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
+       enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+
+       if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) {
+               unsigned long addr;
+
+               addr = plat_dma_addr_to_phys(dma_address);
+               dma_cache_wback_inv(addr, size);
+       }
+
+       plat_unmap_dma_mem(dma_address);
+}
+
+EXPORT_SYMBOL(dma_unmap_page);
+
+void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
+       enum dma_data_direction direction)
+{
+       unsigned long addr;
+       int i;
+
+       BUG_ON(direction == DMA_NONE);
+
+       for (i = 0; i < nhwentries; i++, sg++) {
+               if (!plat_device_is_coherent(dev) &&
+                   direction != DMA_TO_DEVICE) {
+                       addr = (unsigned long) page_address(sg->page);
+                       if (addr)
+                               __dma_sync(addr + sg->offset, sg->length,
+                                          direction);
+               }
+               plat_unmap_dma_mem(sg->dma_address);
+       }
+}
+
+EXPORT_SYMBOL(dma_unmap_sg);
+
+void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
+       size_t size, enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+
+       if (cpu_is_noncoherent_r10000(dev)) {
+               unsigned long addr;
+
+               addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);
+               __dma_sync(addr, size, direction);
+       }
+}
+
+EXPORT_SYMBOL(dma_sync_single_for_cpu);
+
+void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
+       size_t size, enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+
+       if (cpu_is_noncoherent_r10000(dev)) {
+               unsigned long addr;
+
+               addr = plat_dma_addr_to_phys(dma_handle);
+               __dma_sync(addr, size, direction);
+       }
+}
+
+EXPORT_SYMBOL(dma_sync_single_for_device);
+
+void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
+       unsigned long offset, size_t size, enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+
+       if (cpu_is_noncoherent_r10000(dev)) {
+               unsigned long addr;
+
+               addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);
+               __dma_sync(addr + offset, size, direction);
+       }
+}
+
+EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
+
+void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
+       unsigned long offset, size_t size, enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+
+       if (cpu_is_noncoherent_r10000(dev)) {
+               unsigned long addr;
+
+               addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);
+               __dma_sync(addr + offset, size, direction);
+       }
+}
+
+EXPORT_SYMBOL(dma_sync_single_range_for_device);
+
+void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
+       enum dma_data_direction direction)
+{
+       int i;
+
+       BUG_ON(direction == DMA_NONE);
+
+       /* Make sure that gcc doesn't leave the empty loop body.  */
+       for (i = 0; i < nelems; i++, sg++) {
+               if (!plat_device_is_coherent(dev))
+                       __dma_sync((unsigned long)page_address(sg->page),
+                                  sg->length, direction);
+               plat_unmap_dma_mem(sg->dma_address);
+       }
+}
+
+EXPORT_SYMBOL(dma_sync_sg_for_cpu);
+
+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
+       enum dma_data_direction direction)
+{
+       int i;
+
+       BUG_ON(direction == DMA_NONE);
+
+       /* Make sure that gcc doesn't leave the empty loop body.  */
+       for (i = 0; i < nelems; i++, sg++) {
+               if (!plat_device_is_coherent(dev))
+                       __dma_sync((unsigned long)page_address(sg->page),
+                                  sg->length, direction);
+               plat_unmap_dma_mem(sg->dma_address);
+       }
+}
+
+EXPORT_SYMBOL(dma_sync_sg_for_device);
+
+int dma_mapping_error(dma_addr_t dma_addr)
+{
+       return 0;
+}
+
+EXPORT_SYMBOL(dma_mapping_error);
+
+int dma_supported(struct device *dev, u64 mask)
+{
+       /*
+        * we fall back to GFP_DMA when the mask isn't all 1s,
+        * so we can't guarantee allocations that must be
+        * within a tighter range than GFP_DMA..
+        */
+       if (mask < 0x00ffffff)
+               return 0;
+
+       return 1;
+}
+
+EXPORT_SYMBOL(dma_supported);
+
+int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
+{
+       return plat_device_is_coherent(dev);
+}
+
+EXPORT_SYMBOL(dma_is_consistent);
+
+void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+              enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+
+       if (!plat_device_is_coherent(dev))
+               dma_cache_wback_inv((unsigned long)vaddr, size);
+}
+
+EXPORT_SYMBOL(dma_cache_sync);
diff --git a/arch/mips/mm/dma-ip27.c b/arch/mips/mm/dma-ip27.c
deleted file mode 100644 (file)
index f088344..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * 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.
- *
- * Copyright (C) 2000  Ani Joshi <ajoshi@unixbox.com>
- * Copyright (C) 2000, 2001  Ralf Baechle <ralf@gnu.org>
- * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
- */
-#include <linux/types.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/pci.h>
-
-#include <asm/cache.h>
-#include <asm/pci/bridge.h>
-
-#define pdev_to_baddr(pdev, addr) \
-       (BRIDGE_CONTROLLER(pdev->bus)->baddr + (addr))
-#define dev_to_baddr(dev, addr) \
-       pdev_to_baddr(to_pci_dev(dev), (addr))
-
-void *dma_alloc_noncoherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-{
-       void *ret;
-
-       /* ignore region specifiers */
-       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
-
-       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
-       ret = (void *) __get_free_pages(gfp, get_order(size));
-
-       if (ret != NULL) {
-               memset(ret, 0, size);
-               *dma_handle = dev_to_baddr(dev, virt_to_phys(ret));
-       }
-
-       return ret;
-}
-
-EXPORT_SYMBOL(dma_alloc_noncoherent);
-
-void *dma_alloc_coherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-       __attribute__((alias("dma_alloc_noncoherent")));
-
-EXPORT_SYMBOL(dma_alloc_coherent);
-
-void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle)
-{
-       unsigned long addr = (unsigned long) vaddr;
-
-       free_pages(addr, get_order(size));
-}
-
-EXPORT_SYMBOL(dma_free_noncoherent);
-
-void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle) __attribute__((alias("dma_free_noncoherent")));
-
-EXPORT_SYMBOL(dma_free_coherent);
-
-dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
-       enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-
-       return dev_to_baddr(dev, __pa(ptr));
-}
-
-EXPORT_SYMBOL(dma_map_single);
-
-void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_unmap_single);
-
-int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       for (i = 0; i < nents; i++, sg++) {
-               sg->dma_address = (dma_addr_t) dev_to_baddr(dev,
-                       page_to_phys(sg->page) + sg->offset);
-       }
-
-       return nents;
-}
-
-EXPORT_SYMBOL(dma_map_sg);
-
-dma_addr_t dma_map_page(struct device *dev, struct page *page,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-
-       return dev_to_baddr(dev, page_to_phys(page) + offset);
-}
-
-EXPORT_SYMBOL(dma_map_page);
-
-void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-              enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_unmap_page);
-
-void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-            enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_unmap_sg);
-
-void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
-               enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_cpu);
-
-void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
-               enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_device);
-
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
-                     unsigned long offset, size_t size,
-                     enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
-
-void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
-                     unsigned long offset, size_t size,
-                     enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_device);
-
-void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-                enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_cpu);
-
-void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
-                enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_device);
-
-int dma_mapping_error(dma_addr_t dma_addr)
-{
-       return 0;
-}
-
-EXPORT_SYMBOL(dma_mapping_error);
-
-int dma_supported(struct device *dev, u64 mask)
-{
-       /*
-        * we fall back to GFP_DMA when the mask isn't all 1s,
-        * so we can't guarantee allocations that must be
-        * within a tighter range than GFP_DMA..
-        */
-       if (mask < 0x00ffffff)
-               return 0;
-
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_supported);
-
-int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
-{
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_is_consistent);
-
-void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
-              enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-EXPORT_SYMBOL(dma_cache_sync);
-
-dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
-       struct page *page, unsigned long offset, int direction)
-{
-       dma64_addr_t addr = page_to_phys(page) + offset;
-
-       return (dma64_addr_t) pdev_to_baddr(pdev, addr);
-}
-
-EXPORT_SYMBOL(pci_dac_page_to_dma);
-
-struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
-       dma64_addr_t dma_addr)
-{
-       struct bridge_controller *bc = BRIDGE_CONTROLLER(pdev->bus);
-
-       return pfn_to_page((dma_addr - bc->baddr) >> PAGE_SHIFT);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_to_page);
-
-unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
-       dma64_addr_t dma_addr)
-{
-       return dma_addr & ~PAGE_MASK;
-}
-
-EXPORT_SYMBOL(pci_dac_dma_to_offset);
-
-void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
-       dma64_addr_t dma_addr, size_t len, int direction)
-{
-       BUG_ON(direction == PCI_DMA_NONE);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
-
-void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
-       dma64_addr_t dma_addr, size_t len, int direction)
-{
-       BUG_ON(direction == PCI_DMA_NONE);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
diff --git a/arch/mips/mm/dma-ip32.c b/arch/mips/mm/dma-ip32.c
deleted file mode 100644 (file)
index b42b6f7..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * 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.
- *
- * Copyright (C) 2000  Ani Joshi <ajoshi@unixbox.com>
- * Copyright (C) 2000, 2001  Ralf Baechle <ralf@gnu.org>
- * Copyright (C) 2005 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
- * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
- * IP32 changes by Ilya.
- */
-#include <linux/types.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/dma-mapping.h>
-
-#include <asm/cache.h>
-#include <asm/io.h>
-#include <asm/ip32/crime.h>
-
-/*
- * Warning on the terminology - Linux calls an uncached area coherent;
- * MIPS terminology calls memory areas with hardware maintained coherency
- * coherent.
- */
-
-/*
- * Few notes.
- * 1. CPU sees memory as two chunks: 0-256M@0x0, and the rest @0x40000000+256M
- * 2. PCI sees memory as one big chunk @0x0 (or we could use 0x40000000 for native-endian)
- * 3. All other devices see memory as one big chunk at 0x40000000
- * 4. Non-PCI devices will pass NULL as struct device*
- * Thus we translate differently, depending on device.
- */
-
-#define RAM_OFFSET_MASK        0x3fffffff
-
-void *dma_alloc_noncoherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-{
-       void *ret;
-       /* ignore region specifiers */
-       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
-
-       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
-       ret = (void *) __get_free_pages(gfp, get_order(size));
-
-       if (ret != NULL) {
-               unsigned long addr = virt_to_phys(ret)&RAM_OFFSET_MASK;
-               memset(ret, 0, size);
-               if(dev==NULL)
-                   addr+= CRIME_HI_MEM_BASE;
-               *dma_handle = addr;
-       }
-
-       return ret;
-}
-
-EXPORT_SYMBOL(dma_alloc_noncoherent);
-
-void *dma_alloc_coherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-{
-       void *ret;
-
-       ret = dma_alloc_noncoherent(dev, size, dma_handle, gfp);
-       if (ret) {
-               dma_cache_wback_inv((unsigned long) ret, size);
-               ret = UNCAC_ADDR(ret);
-       }
-
-       return ret;
-}
-
-EXPORT_SYMBOL(dma_alloc_coherent);
-
-void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle)
-{
-       free_pages((unsigned long) vaddr, get_order(size));
-}
-
-EXPORT_SYMBOL(dma_free_noncoherent);
-
-void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle)
-{
-       unsigned long addr = (unsigned long) vaddr;
-
-       addr = CAC_ADDR(addr);
-       free_pages(addr, get_order(size));
-}
-
-EXPORT_SYMBOL(dma_free_coherent);
-
-static inline void __dma_sync(unsigned long addr, size_t size,
-       enum dma_data_direction direction)
-{
-       switch (direction) {
-       case DMA_TO_DEVICE:
-               dma_cache_wback(addr, size);
-               break;
-
-       case DMA_FROM_DEVICE:
-               dma_cache_inv(addr, size);
-               break;
-
-       case DMA_BIDIRECTIONAL:
-               dma_cache_wback_inv(addr, size);
-               break;
-
-       default:
-               BUG();
-       }
-}
-
-dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
-       enum dma_data_direction direction)
-{
-       unsigned long addr = (unsigned long) ptr;
-
-       switch (direction) {
-       case DMA_TO_DEVICE:
-               dma_cache_wback(addr, size);
-               break;
-
-       case DMA_FROM_DEVICE:
-               dma_cache_inv(addr, size);
-               break;
-
-       case DMA_BIDIRECTIONAL:
-               dma_cache_wback_inv(addr, size);
-               break;
-
-       default:
-               BUG();
-       }
-
-       addr = virt_to_phys(ptr)&RAM_OFFSET_MASK;
-       if(dev == NULL)
-           addr+=CRIME_HI_MEM_BASE;
-       return (dma_addr_t)addr;
-}
-
-EXPORT_SYMBOL(dma_map_single);
-
-void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-       enum dma_data_direction direction)
-{
-       switch (direction) {
-       case DMA_TO_DEVICE:
-               break;
-
-       case DMA_FROM_DEVICE:
-               break;
-
-       case DMA_BIDIRECTIONAL:
-               break;
-
-       default:
-               BUG();
-       }
-}
-
-EXPORT_SYMBOL(dma_unmap_single);
-
-int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       for (i = 0; i < nents; i++, sg++) {
-               unsigned long addr;
-
-               addr = (unsigned long) page_address(sg->page)+sg->offset;
-               if (addr)
-                       __dma_sync(addr, sg->length, direction);
-               addr = __pa(addr)&RAM_OFFSET_MASK;
-               if(dev == NULL)
-                       addr +=  CRIME_HI_MEM_BASE;
-               sg->dma_address = (dma_addr_t)addr;
-       }
-
-       return nents;
-}
-
-EXPORT_SYMBOL(dma_map_sg);
-
-dma_addr_t dma_map_page(struct device *dev, struct page *page,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       addr = (unsigned long) page_address(page) + offset;
-       dma_cache_wback_inv(addr, size);
-       addr = __pa(addr)&RAM_OFFSET_MASK;
-       if(dev == NULL)
-               addr +=  CRIME_HI_MEM_BASE;
-
-       return (dma_addr_t)addr;
-}
-
-EXPORT_SYMBOL(dma_map_page);
-
-void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-       enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-
-       if (direction != DMA_TO_DEVICE) {
-               unsigned long addr;
-
-               dma_address&=RAM_OFFSET_MASK;
-               addr = dma_address + PAGE_OFFSET;
-               if(dma_address>=256*1024*1024)
-                       addr+=CRIME_HI_MEM_BASE;
-               dma_cache_wback_inv(addr, size);
-       }
-}
-
-EXPORT_SYMBOL(dma_unmap_page);
-
-void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-       enum dma_data_direction direction)
-{
-       unsigned long addr;
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       if (direction == DMA_TO_DEVICE)
-               return;
-
-       for (i = 0; i < nhwentries; i++, sg++) {
-               addr = (unsigned long) page_address(sg->page);
-               if (!addr)
-                       continue;
-               dma_cache_wback_inv(addr + sg->offset, sg->length);
-       }
-}
-
-EXPORT_SYMBOL(dma_unmap_sg);
-
-void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
-       size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       dma_handle&=RAM_OFFSET_MASK;
-       addr = dma_handle + PAGE_OFFSET;
-       if(dma_handle>=256*1024*1024)
-           addr+=CRIME_HI_MEM_BASE;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_cpu);
-
-void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
-       size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       dma_handle&=RAM_OFFSET_MASK;
-       addr = dma_handle + PAGE_OFFSET;
-       if(dma_handle>=256*1024*1024)
-           addr+=CRIME_HI_MEM_BASE;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_device);
-
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       dma_handle&=RAM_OFFSET_MASK;
-       addr = dma_handle + offset + PAGE_OFFSET;
-       if(dma_handle>=256*1024*1024)
-           addr+=CRIME_HI_MEM_BASE;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
-
-void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       dma_handle&=RAM_OFFSET_MASK;
-       addr = dma_handle + offset + PAGE_OFFSET;
-       if(dma_handle>=256*1024*1024)
-           addr+=CRIME_HI_MEM_BASE;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_device);
-
-void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       /* Make sure that gcc doesn't leave the empty loop body.  */
-       for (i = 0; i < nelems; i++, sg++)
-               __dma_sync((unsigned long)page_address(sg->page),
-                          sg->length, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_cpu);
-
-void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       /* Make sure that gcc doesn't leave the empty loop body.  */
-       for (i = 0; i < nelems; i++, sg++)
-               __dma_sync((unsigned long)page_address(sg->page),
-                          sg->length, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_device);
-
-int dma_mapping_error(dma_addr_t dma_addr)
-{
-       return 0;
-}
-
-EXPORT_SYMBOL(dma_mapping_error);
-
-int dma_supported(struct device *dev, u64 mask)
-{
-       /*
-        * we fall back to GFP_DMA when the mask isn't all 1s,
-        * so we can't guarantee allocations that must be
-        * within a tighter range than GFP_DMA..
-        */
-       if (mask < 0x00ffffff)
-               return 0;
-
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_supported);
-
-int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
-{
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_is_consistent);
-
-void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
-       enum dma_data_direction direction)
-{
-       if (direction == DMA_NONE)
-               return;
-
-       dma_cache_wback_inv((unsigned long)vaddr, size);
-}
-
-EXPORT_SYMBOL(dma_cache_sync);
-
diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c
deleted file mode 100644 (file)
index 8cecef0..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * 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.
- *
- * Copyright (C) 2000  Ani Joshi <ajoshi@unixbox.com>
- * Copyright (C) 2000, 2001  Ralf Baechle <ralf@gnu.org>
- * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
- */
-#include <linux/types.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/dma-mapping.h>
-
-#include <asm/cache.h>
-#include <asm/io.h>
-
-/*
- * Warning on the terminology - Linux calls an uncached area coherent;
- * MIPS terminology calls memory areas with hardware maintained coherency
- * coherent.
- */
-
-void *dma_alloc_noncoherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-{
-       void *ret;
-       /* ignore region specifiers */
-       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
-
-       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
-       ret = (void *) __get_free_pages(gfp, get_order(size));
-
-       if (ret != NULL) {
-               memset(ret, 0, size);
-               *dma_handle = virt_to_phys(ret);
-       }
-
-       return ret;
-}
-
-EXPORT_SYMBOL(dma_alloc_noncoherent);
-
-void *dma_alloc_coherent(struct device *dev, size_t size,
-       dma_addr_t * dma_handle, gfp_t gfp)
-{
-       void *ret;
-
-       ret = dma_alloc_noncoherent(dev, size, dma_handle, gfp);
-       if (ret) {
-               dma_cache_wback_inv((unsigned long) ret, size);
-               ret = UNCAC_ADDR(ret);
-       }
-
-       return ret;
-}
-
-EXPORT_SYMBOL(dma_alloc_coherent);
-
-void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle)
-{
-       free_pages((unsigned long) vaddr, get_order(size));
-}
-
-EXPORT_SYMBOL(dma_free_noncoherent);
-
-void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
-       dma_addr_t dma_handle)
-{
-       unsigned long addr = (unsigned long) vaddr;
-
-       addr = CAC_ADDR(addr);
-       free_pages(addr, get_order(size));
-}
-
-EXPORT_SYMBOL(dma_free_coherent);
-
-static inline void __dma_sync(unsigned long addr, size_t size,
-       enum dma_data_direction direction)
-{
-       switch (direction) {
-       case DMA_TO_DEVICE:
-               dma_cache_wback(addr, size);
-               break;
-
-       case DMA_FROM_DEVICE:
-               dma_cache_inv(addr, size);
-               break;
-
-       case DMA_BIDIRECTIONAL:
-               dma_cache_wback_inv(addr, size);
-               break;
-
-       default:
-               BUG();
-       }
-}
-
-dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
-       enum dma_data_direction direction)
-{
-       unsigned long addr = (unsigned long) ptr;
-
-       __dma_sync(addr, size, direction);
-
-       return virt_to_phys(ptr);
-}
-
-EXPORT_SYMBOL(dma_map_single);
-
-void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-       enum dma_data_direction direction)
-{
-       unsigned long addr;
-       addr = dma_addr + PAGE_OFFSET;
-
-       //__dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_unmap_single);
-
-int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       for (i = 0; i < nents; i++, sg++) {
-               unsigned long addr;
-
-               addr = (unsigned long) page_address(sg->page);
-               if (addr) {
-                       __dma_sync(addr + sg->offset, sg->length, direction);
-                       sg->dma_address = (dma_addr_t)page_to_phys(sg->page)
-                                         + sg->offset;
-               }
-       }
-
-       return nents;
-}
-
-EXPORT_SYMBOL(dma_map_sg);
-
-dma_addr_t dma_map_page(struct device *dev, struct page *page,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       addr = (unsigned long) page_address(page) + offset;
-       dma_cache_wback_inv(addr, size);
-
-       return page_to_phys(page) + offset;
-}
-
-EXPORT_SYMBOL(dma_map_page);
-
-void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-       enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-
-       if (direction != DMA_TO_DEVICE) {
-               unsigned long addr;
-
-               addr = dma_address + PAGE_OFFSET;
-               dma_cache_wback_inv(addr, size);
-       }
-}
-
-EXPORT_SYMBOL(dma_unmap_page);
-
-void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-       enum dma_data_direction direction)
-{
-       unsigned long addr;
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       if (direction == DMA_TO_DEVICE)
-               return;
-
-       for (i = 0; i < nhwentries; i++, sg++) {
-               addr = (unsigned long) page_address(sg->page);
-               if (addr)
-                       __dma_sync(addr + sg->offset, sg->length, direction);
-       }
-}
-
-EXPORT_SYMBOL(dma_unmap_sg);
-
-void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
-       size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       addr = dma_handle + PAGE_OFFSET;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_cpu);
-
-void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
-       size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       addr = dma_handle + PAGE_OFFSET;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_for_device);
-
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       addr = dma_handle + offset + PAGE_OFFSET;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
-
-void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
-       unsigned long offset, size_t size, enum dma_data_direction direction)
-{
-       unsigned long addr;
-
-       BUG_ON(direction == DMA_NONE);
-
-       addr = dma_handle + offset + PAGE_OFFSET;
-       __dma_sync(addr, size, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_single_range_for_device);
-
-void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       /* Make sure that gcc doesn't leave the empty loop body.  */
-       for (i = 0; i < nelems; i++, sg++)
-               __dma_sync((unsigned long)page_address(sg->page),
-                          sg->length, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_cpu);
-
-void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
-       enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       /* Make sure that gcc doesn't leave the empty loop body.  */
-       for (i = 0; i < nelems; i++, sg++)
-               __dma_sync((unsigned long)page_address(sg->page),
-                          sg->length, direction);
-}
-
-EXPORT_SYMBOL(dma_sync_sg_for_device);
-
-int dma_mapping_error(dma_addr_t dma_addr)
-{
-       return 0;
-}
-
-EXPORT_SYMBOL(dma_mapping_error);
-
-int dma_supported(struct device *dev, u64 mask)
-{
-       /*
-        * we fall back to GFP_DMA when the mask isn't all 1s,
-        * so we can't guarantee allocations that must be
-        * within a tighter range than GFP_DMA..
-        */
-       if (mask < 0x00ffffff)
-               return 0;
-
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_supported);
-
-int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
-{
-       return 1;
-}
-
-EXPORT_SYMBOL(dma_is_consistent);
-
-void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
-       enum dma_data_direction direction)
-{
-       if (direction == DMA_NONE)
-               return;
-
-       dma_cache_wback_inv((unsigned long)vaddr, size);
-}
-
-EXPORT_SYMBOL(dma_cache_sync);
-
-/* The DAC routines are a PCIism.. */
-
-#ifdef CONFIG_PCI
-
-#include <linux/pci.h>
-
-dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
-       struct page *page, unsigned long offset, int direction)
-{
-       return (dma64_addr_t)page_to_phys(page) + offset;
-}
-
-EXPORT_SYMBOL(pci_dac_page_to_dma);
-
-struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
-       dma64_addr_t dma_addr)
-{
-       return mem_map + (dma_addr >> PAGE_SHIFT);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_to_page);
-
-unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
-       dma64_addr_t dma_addr)
-{
-       return dma_addr & ~PAGE_MASK;
-}
-
-EXPORT_SYMBOL(pci_dac_dma_to_offset);
-
-void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
-       dma64_addr_t dma_addr, size_t len, int direction)
-{
-       BUG_ON(direction == PCI_DMA_NONE);
-
-       dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
-
-void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
-       dma64_addr_t dma_addr, size_t len, int direction)
-{
-       BUG_ON(direction == PCI_DMA_NONE);
-
-       dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
-}
-
-EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
-
-#endif /* CONFIG_PCI */
index 82b20c28bef8f8782a83ef4495728b12a119325b..bf85995ca042fecf18f6250a5683fa93f6e70683 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the PCI specific kernel interface routines under Linux.
 #
 
-obj-y                          += pci.o
+obj-y                          += pci.o pci-dac.o
 
 #
 # PCI bus host bridge specific code
diff --git a/arch/mips/pci/pci-dac.c b/arch/mips/pci/pci-dac.c
new file mode 100644 (file)
index 0000000..0f0ea1b
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2000  Ani Joshi <ajoshi@unixbox.com>
+ * Copyright (C) 2000, 2001, 06  Ralf Baechle <ralf@linux-mips.org>
+ * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
+ */
+
+#include <linux/types.h>
+#include <linux/dma-mapping.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/string.h>
+
+#include <asm/cache.h>
+#include <asm/io.h>
+
+#include <dma-coherence.h>
+
+#include <linux/pci.h>
+
+dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
+       struct page *page, unsigned long offset, int direction)
+{
+       struct device *dev = &pdev->dev;
+
+       BUG_ON(direction == DMA_NONE);
+
+       if (!plat_device_is_coherent(dev)) {
+               unsigned long addr;
+
+               addr = (unsigned long) page_address(page) + offset;
+               dma_cache_wback_inv(addr, PAGE_SIZE);
+       }
+
+       return plat_map_dma_mem_page(dev, page) + offset;
+}
+
+EXPORT_SYMBOL(pci_dac_page_to_dma);
+
+struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
+       dma64_addr_t dma_addr)
+{
+       return pfn_to_page(plat_dma_addr_to_phys(dma_addr) >> PAGE_SHIFT);
+}
+
+EXPORT_SYMBOL(pci_dac_dma_to_page);
+
+unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
+       dma64_addr_t dma_addr)
+{
+       return dma_addr & ~PAGE_MASK;
+}
+
+EXPORT_SYMBOL(pci_dac_dma_to_offset);
+
+void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
+       dma64_addr_t dma_addr, size_t len, int direction)
+{
+       BUG_ON(direction == PCI_DMA_NONE);
+
+       if (!plat_device_is_coherent(&pdev->dev))
+               dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
+}
+
+EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
+
+void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
+       dma64_addr_t dma_addr, size_t len, int direction)
+{
+       BUG_ON(direction == PCI_DMA_NONE);
+
+       if (!plat_device_is_coherent(&pdev->dev))
+               dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
+}
+
+EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
index 0088c5ebca78190328a382ceebaa522ded7489b0..340d9beab6d1368978907f387fa1ff9943a71123 100644 (file)
@@ -876,7 +876,7 @@ config ARCH_SPARSEMEM_ENABLE
 
 config ARCH_SPARSEMEM_DEFAULT
        def_bool y
-       depends on (SMP && PPC_PSERIES) || PPC_CELL
+       depends on (SMP && PPC_PSERIES) || PPC_PS3
 
 config ARCH_POPULATES_NODE_MAP
        def_bool y
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts
new file mode 100644 (file)
index 0000000..096e94a
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * Device Tree Souce for Buffalo KuroboxHD
+ *
+ * Choose CONFIG_LINKSTATION to build a kernel for KuroboxHD, or use
+ * the default configuration linkstation_defconfig.
+ *
+ * Based on sandpoint.dts
+ *
+ * 2006 (c) G. Liakhovetski <g.liakhovetski@gmx.de>
+ *
+ * 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.
+
+XXXX add flash parts, rtc, ??
+
+build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
+
+
+ */
+
+/ {
+       linux,phandle = <1000>;
+       model = "KuroboxHD";
+       compatible = "linkstation";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               linux,phandle = <2000>;
+               #cpus = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               PowerPC,603e { /* Really 8241 */
+                       linux,phandle = <2100>;
+                       linux,boot-cpu;
+                       device_type = "cpu";
+                       reg = <0>;
+                       clock-frequency = <bebc200>;    /* Fixed by bootwrapper */
+                       timebase-frequency = <1743000>; /* Fixed by bootwrapper */
+                       bus-frequency = <0>;            /* From bootloader */
+                       /* Following required by dtc but not used */
+                       i-cache-line-size = <0>;
+                       d-cache-line-size = <0>;
+                       i-cache-size = <4000>;
+                       d-cache-size = <4000>;
+               };
+       };
+
+       memory {
+               linux,phandle = <3000>;
+               device_type = "memory";
+               reg = <00000000 04000000>;
+       };
+
+       soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */
+               linux,phandle = <4000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               #interrupt-cells = <2>;
+               device_type = "soc";
+               compatible = "mpc10x";
+               store-gathering = <0>; /* 0 == off, !0 == on */
+               reg = <80000000 00100000>;
+               ranges = <80000000 80000000 70000000    /* pci mem space */
+                         fc000000 fc000000 00100000    /* EUMB */
+                         fe000000 fe000000 00c00000    /* pci i/o space */
+                         fec00000 fec00000 00300000    /* pci cfg regs */
+                         fef00000 fef00000 00100000>;  /* pci iack */
+
+               i2c@80003000 {
+                       linux,phandle = <4300>;
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <80003000 1000>;
+                       interrupts = <5 2>;
+                       interrupt-parent = <4400>;
+               };
+
+               serial@80004500 {
+                       linux,phandle = <4511>;
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <80004500 8>;
+                       clock-frequency = <5d08d88>;
+                       current-speed = <2580>;
+                       interrupts = <9 2>;
+                       interrupt-parent = <4400>;
+               };
+
+               serial@80004600 {
+                       linux,phandle = <4512>;
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <80004600 8>;
+                       clock-frequency = <5d08d88>;
+                       current-speed = <e100>;
+                       interrupts = <a 0>;
+                       interrupt-parent = <4400>;
+               };
+
+               pic@80040000 {
+                       linux,phandle = <4400>;
+                       #interrupt-cells = <2>;
+                       #address-cells = <0>;
+                       device_type = "open-pic";
+                       compatible = "chrp,open-pic";
+                       interrupt-controller;
+                       reg = <80040000 40000>;
+                       built-in;
+               };
+
+               pci@fec00000 {
+                       linux,phandle = <4500>;
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+                       #interrupt-cells = <1>;
+                       device_type = "pci";
+                       compatible = "mpc10x-pci";
+                       reg = <fec00000 400000>;
+                       ranges = <01000000 0        0 fe000000 0 00c00000
+                                 02000000 0 80000000 80000000 0 70000000>;
+                       bus-range = <0 ff>;
+                       clock-frequency = <7f28155>;
+                       interrupt-parent = <4400>;
+                       interrupt-map-mask = <f800 0 0 7>;
+                       interrupt-map = <
+                               /* IDSEL 0x11 - IRQ0 ETH */
+                               5800 0 0 1 4400 0 1
+                               5800 0 0 2 4400 1 1
+                               5800 0 0 3 4400 2 1
+                               5800 0 0 4 4400 3 1
+                               /* IDSEL 0x12 - IRQ1 IDE0 */
+                               6000 0 0 1 4400 1 1
+                               6000 0 0 2 4400 2 1
+                               6000 0 0 3 4400 3 1
+                               6000 0 0 4 4400 0 1
+                               /* IDSEL 0x14 - IRQ3 USB2.0 */
+                               7000 0 0 1 4400 3 1
+                               7000 0 0 2 4400 3 1
+                               7000 0 0 3 4400 3 1
+                               7000 0 0 4 4400 3 1
+                       >;
+               };
+       };
+};
index 186870704ad92832332e9582166117d1e44211db..c03103c632855877dd2c7d088dfd6d509a3ea540 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Lite5200 board Device Tree Source
  *
- * Copyright 2006 Secret Lab Technologies Ltd.
+ * Copyright 2006-2007 Secret Lab Technologies Ltd.
  * Grant Likely <grant.likely@secretlab.ca>
  *
  * This program is free software; you can redistribute  it and/or modify it
@@ -17,8 +17,9 @@
  */
 
 / {
-       model = "Lite5200";
-       compatible = "lite5200\0lite52xx\0mpc5200\0mpc52xx";
+       model = "fsl,lite5200";
+       // revision = "1.0";
+       compatible = "fsl,lite5200\0generic-mpc5200";
        #address-cells = <1>;
        #size-cells = <1>;
 
        };
 
        soc5200@f0000000 {
+               model = "fsl,mpc5200";
+               revision = ""                   // from bootloader
                #interrupt-cells = <3>;
                device_type = "soc";
                ranges = <0 f0000000 f0010000>;
                reg = <f0000000 00010000>;
                bus-frequency = <0>;            // from bootloader
+               system-frequency = <0>;         // from bootloader
 
                cdm@200 {
-                       compatible = "mpc5200-cdm\0mpc52xx-cdm";
+                       compatible = "mpc5200-cdm";
                        reg = <200 38>;
                };
 
                        interrupt-controller;
                        #interrupt-cells = <3>;
                        device_type = "interrupt-controller";
-                       compatible = "mpc5200-pic\0mpc52xx-pic";
+                       compatible = "mpc5200-pic";
                        reg = <500 80>;
                        built-in;
                };
 
                gpt@600 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <0>;
                        reg = <600 10>;
                        interrupts = <1 9 0>;
                        interrupt-parent = <500>;
+                       has-wdt;
                };
 
                gpt@610 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <1>;
                        reg = <610 10>;
                        interrupts = <1 a 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@620 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <2>;
                        reg = <620 10>;
                        interrupts = <1 b 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@630 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <3>;
                        reg = <630 10>;
                        interrupts = <1 c 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@640 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <4>;
                        reg = <640 10>;
                        interrupts = <1 d 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@650 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <5>;
                        reg = <650 10>;
                        interrupts = <1 e 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@660 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <6>;
                        reg = <660 10>;
                        interrupts = <1 f 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@670 {       // General Purpose Timer
-                       compatible = "mpc5200-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <7>;
                        reg = <670 10>;
                        interrupts = <1 10 0>;
                        interrupt-parent = <500>;
                };
 
                rtc@800 {       // Real time clock
-                       compatible = "mpc5200-rtc\0mpc52xx-rtc";
+                       compatible = "mpc5200-rtc";
                        device_type = "rtc";
                        reg = <800 100>;
                        interrupts = <1 5 0 1 6 0>;
 
                mscan@900 {
                        device_type = "mscan";
-                       compatible = "mpc5200-mscan\0mpc52xx-mscan";
+                       compatible = "mpc5200-mscan";
+                       cell-index = <0>;
                        interrupts = <2 11 0>;
                        interrupt-parent = <500>;
                        reg = <900 80>;
 
                mscan@980 {
                        device_type = "mscan";
-                       compatible = "mpc5200-mscan\0mpc52xx-mscan";
+                       compatible = "mpc5200-mscan";
+                       cell-index = <1>;
                        interrupts = <1 12 0>;
                        interrupt-parent = <500>;
                        reg = <980 80>;
                };
 
                gpio@b00 {
-                       compatible = "mpc5200-gpio\0mpc52xx-gpio";
+                       compatible = "mpc5200-gpio";
                        reg = <b00 40>;
                        interrupts = <1 7 0>;
                        interrupt-parent = <500>;
                };
 
                gpio-wkup@b00 {
-                       compatible = "mpc5200-gpio-wkup\0mpc52xx-gpio-wkup";
+                       compatible = "mpc5200-gpio-wkup";
                        reg = <c00 40>;
                        interrupts = <1 8 0 0 3 0>;
                        interrupt-parent = <500>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       compatible = "mpc5200-pci\0mpc52xx-pci";
+                       compatible = "mpc5200-pci";
                        reg = <d00 100>;
                        interrupt-map-mask = <f800 0 0 7>;
                        interrupt-map = <c000 0 0 1 500 0 0 3
 
                spi@f00 {
                        device_type = "spi";
-                       compatible = "mpc5200-spi\0mpc52xx-spi";
+                       compatible = "mpc5200-spi";
                        reg = <f00 20>;
                        interrupts = <2 d 0 2 e 0>;
                        interrupt-parent = <500>;
 
                usb@1000 {
                        device_type = "usb-ohci-be";
-                       compatible = "mpc5200-ohci\0mpc52xx-ohci\0ohci-be";
+                       compatible = "mpc5200-ohci\0ohci-be";
                        reg = <1000 ff>;
                        interrupts = <2 6 0>;
                        interrupt-parent = <500>;
 
                bestcomm@1200 {
                        device_type = "dma-controller";
-                       compatible = "mpc5200-bestcomm\0mpc52xx-bestcomm";
+                       compatible = "mpc5200-bestcomm";
                        reg = <1200 80>;
                        interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
                                      3 4 0  3 5 0  3 6 0  3 7 0
                };
 
                xlb@1f00 {
-                       compatible = "mpc5200-xlb\0mpc52xx-xlb";
+                       compatible = "mpc5200-xlb";
                        reg = <1f00 100>;
                };
 
                serial@2000 {           // PSC1
                        device_type = "serial";
-                       compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart";
+                       compatible = "mpc5200-psc-uart";
                        port-number = <0>;  // Logical port assignment
+                       cell-index = <0>;
                        reg = <2000 100>;
                        interrupts = <2 1 0>;
                        interrupt-parent = <500>;
                };
 
-               // PSC2 in spi mode example
-               spi@2200 {              // PSC2
-                       device_type = "spi";
-                       compatible = "mpc5200-psc-spi\0mpc52xx-psc-spi";
-                       reg = <2200 100>;
-                       interrupts = <2 2 0>;
-                       interrupt-parent = <500>;
-               };
+               // PSC2 in ac97 mode example
+               //ac97@2200 {           // PSC2
+               //      device_type = "sound";
+               //      compatible = "mpc5200-psc-ac97";
+               //      cell-index = <1>;
+               //      reg = <2200 100>;
+               //      interrupts = <2 2 0>;
+               //      interrupt-parent = <500>;
+               //};
 
                // PSC3 in CODEC mode example
-               i2s@2400 {              // PSC3
-                       device_type = "sound";
-                       compatible = "mpc5200-psc-i2s\0mpc52xx-psc-i2s";
-                       reg = <2400 100>;
-                       interrupts = <2 3 0>;
-                       interrupt-parent = <500>;
-               };
+               //i2s@2400 {            // PSC3
+               //      device_type = "sound";
+               //      compatible = "mpc5200-psc-i2s";
+               //      cell-index = <2>;
+               //      reg = <2400 100>;
+               //      interrupts = <2 3 0>;
+               //      interrupt-parent = <500>;
+               //};
 
-               // PSC4 unconfigured
+               // PSC4 in uart mode example
                //serial@2600 {         // PSC4
                //      device_type = "serial";
-               //      compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart";
+               //      compatible = "mpc5200-psc-uart";
+               //      cell-index = <3>;
                //      reg = <2600 100>;
                //      interrupts = <2 b 0>;
                //      interrupt-parent = <500>;
                //};
 
-               // PSC5 unconfigured
+               // PSC5 in uart mode example
                //serial@2800 {         // PSC5
                //      device_type = "serial";
-               //      compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart";
+               //      compatible = "mpc5200-psc-uart";
+               //      cell-index = <4>;
                //      reg = <2800 100>;
                //      interrupts = <2 c 0>;
                //      interrupt-parent = <500>;
                //};
 
-               // PSC6 in AC97 mode example
-               ac97@2c00 {             // PSC6
-                       device_type = "sound";
-                       compatible = "mpc5200-psc-ac97\0mpc52xx-psc-ac97";
-                       reg = <2c00 100>;
-                       interrupts = <2 4 0>;
-                       interrupt-parent = <500>;
-               };
+               // PSC6 in spi mode example
+               //spi@2c00 {            // PSC6
+               //      device_type = "spi";
+               //      compatible = "mpc5200-psc-spi";
+               //      cell-index = <5>;
+               //      reg = <2c00 100>;
+               //      interrupts = <2 4 0>;
+               //      interrupt-parent = <500>;
+               //};
 
                ethernet@3000 {
                        device_type = "network";
-                       compatible = "mpc5200-fec\0mpc52xx-fec";
+                       compatible = "mpc5200-fec";
                        reg = <3000 800>;
                        mac-address = [ 02 03 04 05 06 07 ]; // Bad!
                        interrupts = <2 5 0>;
 
                ata@3a00 {
                        device_type = "ata";
-                       compatible = "mpc5200-ata\0mpc52xx-ata";
+                       compatible = "mpc5200-ata";
                        reg = <3a00 100>;
                        interrupts = <2 7 0>;
                        interrupt-parent = <500>;
 
                i2c@3d00 {
                        device_type = "i2c";
-                       compatible = "mpc5200-i2c\0mpc52xx-i2c";
+                       compatible = "mpc5200-i2c";
+                       cell-index = <0>;
                        reg = <3d00 40>;
                        interrupts = <2 f 0>;
                        interrupt-parent = <500>;
 
                i2c@3d40 {
                        device_type = "i2c";
-                       compatible = "mpc5200-i2c\0mpc52xx-i2c";
+                       compatible = "mpc5200-i2c";
+                       cell-index = <1>;
                        reg = <3d40 40>;
                        interrupts = <2 10 0>;
                        interrupt-parent = <500>;
                };
                sram@8000 {
                        device_type = "sram";
-                       compatible = "mpc5200-sram\0mpc52xx-sram\0sram";
+                       compatible = "mpc5200-sram\0sram";
                        reg = <8000 4000>;
                };
        };
index 5bb2760d7c30cf3e72fd5c0c40610d0f098b6ccc..3875ca9a9a624550b457188e3dd53602e86c35d4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Lite5200B board Device Tree Source
  *
- * Copyright 2006 Secret Lab Technologies Ltd.
+ * Copyright 2006-2007 Secret Lab Technologies Ltd.
  * Grant Likely <grant.likely@secretlab.ca>
  *
  * This program is free software; you can redistribute  it and/or modify it
@@ -17,8 +17,9 @@
  */
 
 / {
-       model = "Lite5200b";
-       compatible = "lite5200b\0lite52xx\0mpc5200b\0mpc52xx";
+       model = "fsl,lite5200b";
+       // revision = "1.0";
+       compatible = "fsl,lite5200b\0generic-mpc5200";
        #address-cells = <1>;
        #size-cells = <1>;
 
        };
 
        soc5200@f0000000 {
+               model = "fsl,mpc5200b";
+               revision = "";                  // from bootloader
                #interrupt-cells = <3>;
                device_type = "soc";
                ranges = <0 f0000000 f0010000>;
                reg = <f0000000 00010000>;
                bus-frequency = <0>;            // from bootloader
+               system-frequency = <0>;         // from bootloader
 
                cdm@200 {
-                       compatible = "mpc5200b-cdm\0mpc52xx-cdm";
+                       compatible = "mpc5200b-cdm\0mpc5200-cdm";
                        reg = <200 38>;
                };
 
                        interrupt-controller;
                        #interrupt-cells = <3>;
                        device_type = "interrupt-controller";
-                       compatible = "mpc5200b-pic\0mpc52xx-pic";
+                       compatible = "mpc5200b-pic\0mpc5200-pic";
                        reg = <500 80>;
                        built-in;
                };
 
                gpt@600 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <0>;
                        reg = <600 10>;
                        interrupts = <1 9 0>;
                        interrupt-parent = <500>;
+                       has-wdt;
                };
 
                gpt@610 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <1>;
                        reg = <610 10>;
                        interrupts = <1 a 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@620 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <2>;
                        reg = <620 10>;
                        interrupts = <1 b 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@630 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <3>;
                        reg = <630 10>;
                        interrupts = <1 c 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@640 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <4>;
                        reg = <640 10>;
                        interrupts = <1 d 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@650 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <5>;
                        reg = <650 10>;
                        interrupts = <1 e 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@660 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <6>;
                        reg = <660 10>;
                        interrupts = <1 f 0>;
                        interrupt-parent = <500>;
                };
 
                gpt@670 {       // General Purpose Timer
-                       compatible = "mpc5200b-gpt\0mpc52xx-gpt";
+                       compatible = "mpc5200b-gpt\0mpc5200-gpt";
                        device_type = "gpt";
+                       cell-index = <7>;
                        reg = <670 10>;
                        interrupts = <1 10 0>;
                        interrupt-parent = <500>;
                };
 
                rtc@800 {       // Real time clock
-                       compatible = "mpc5200b-rtc\0mpc52xx-rtc";
+                       compatible = "mpc5200b-rtc\0mpc5200-rtc";
                        device_type = "rtc";
                        reg = <800 100>;
                        interrupts = <1 5 0 1 6 0>;
 
                mscan@900 {
                        device_type = "mscan";
-                       compatible = "mpc5200b-mscan\0mpc52xx-mscan";
+                       compatible = "mpc5200b-mscan\0mpc5200-mscan";
+                       cell-index = <0>;
                        interrupts = <2 11 0>;
                        interrupt-parent = <500>;
                        reg = <900 80>;
 
                mscan@980 {
                        device_type = "mscan";
-                       compatible = "mpc5200b-mscan\0mpc52xx-mscan";
+                       compatible = "mpc5200b-mscan\0mpc5200-mscan";
+                       cell-index = <1>;
                        interrupts = <1 12 0>;
                        interrupt-parent = <500>;
                        reg = <980 80>;
                };
 
                gpio@b00 {
-                       compatible = "mpc5200b-gpio\0mpc52xx-gpio";
+                       compatible = "mpc5200b-gpio\0mpc5200-gpio";
                        reg = <b00 40>;
                        interrupts = <1 7 0>;
                        interrupt-parent = <500>;
                };
 
                gpio-wkup@b00 {
-                       compatible = "mpc5200b-gpio-wkup\0mpc52xx-gpio-wkup";
+                       compatible = "mpc5200b-gpio-wkup\0mpc5200-gpio-wkup";
                        reg = <c00 40>;
                        interrupts = <1 8 0 0 3 0>;
                        interrupt-parent = <500>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       compatible = "mpc5200b-pci\0mpc52xx-pci";
+                       compatible = "mpc5200b-pci\0mpc5200-pci";
                        reg = <d00 100>;
                        interrupt-map-mask = <f800 0 0 7>;
                        interrupt-map = <c000 0 0 1 500 0 0 3 // 1st slot
 
                spi@f00 {
                        device_type = "spi";
-                       compatible = "mpc5200b-spi\0mpc52xx-spi";
+                       compatible = "mpc5200b-spi\0mpc5200-spi";
                        reg = <f00 20>;
                        interrupts = <2 d 0 2 e 0>;
                        interrupt-parent = <500>;
 
                usb@1000 {
                        device_type = "usb-ohci-be";
-                       compatible = "mpc5200b-ohci\0mpc52xx-ohci\0ohci-be";
+                       compatible = "mpc5200b-ohci\0mpc5200-ohci\0ohci-be";
                        reg = <1000 ff>;
                        interrupts = <2 6 0>;
                        interrupt-parent = <500>;
 
                bestcomm@1200 {
                        device_type = "dma-controller";
-                       compatible = "mpc5200b-bestcomm\0mpc52xx-bestcomm";
+                       compatible = "mpc5200b-bestcomm\0mpc5200-bestcomm";
                        reg = <1200 80>;
                        interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
                                      3 4 0  3 5 0  3 6 0  3 7 0
                };
 
                xlb@1f00 {
-                       compatible = "mpc5200b-xlb\0mpc52xx-xlb";
+                       compatible = "mpc5200b-xlb\0mpc5200-xlb";
                        reg = <1f00 100>;
                };
 
                serial@2000 {           // PSC1
                        device_type = "serial";
-                       compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart";
+                       compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
                        port-number = <0>;  // Logical port assignment
+                       cell-index = <0>;
                        reg = <2000 100>;
                        interrupts = <2 1 0>;
                        interrupt-parent = <500>;
                };
 
-               // PSC2 in spi mode example
-               spi@2200 {              // PSC2
-                       device_type = "spi";
-                       compatible = "mpc5200b-psc-spi\0mpc52xx-psc-spi";
-                       reg = <2200 100>;
-                       interrupts = <2 2 0>;
-                       interrupt-parent = <500>;
-               };
+               // PSC2 in ac97 mode example
+               //ac97@2200 {           // PSC2
+               //      device_type = "sound";
+               //      compatible = "mpc5200b-psc-ac97\0mpc5200-psc-ac97";
+               //      cell-index = <1>;
+               //      reg = <2200 100>;
+               //      interrupts = <2 2 0>;
+               //      interrupt-parent = <500>;
+               //};
 
                // PSC3 in CODEC mode example
-               i2s@2400 {              // PSC3
-                       device_type = "sound";
-                       compatible = "mpc5200b-psc-i2s\0mpc52xx-psc-i2s";
-                       reg = <2400 100>;
-                       interrupts = <2 3 0>;
-                       interrupt-parent = <500>;
-               };
+               //i2s@2400 {            // PSC3
+               //      device_type = "sound";
+               //      compatible = "mpc5200b-psc-i2s"; //not 5200 compatible
+               //      cell-index = <2>;
+               //      reg = <2400 100>;
+               //      interrupts = <2 3 0>;
+               //      interrupt-parent = <500>;
+               //};
 
-               // PSC4 unconfigured
+               // PSC4 in uart mode example
                //serial@2600 {         // PSC4
                //      device_type = "serial";
-               //      compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart";
+               //      compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
+               //      cell-index = <3>;
                //      reg = <2600 100>;
                //      interrupts = <2 b 0>;
                //      interrupt-parent = <500>;
                //};
 
-               // PSC5 unconfigured
+               // PSC5 in uart mode example
                //serial@2800 {         // PSC5
                //      device_type = "serial";
-               //      compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart";
+               //      compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
+               //      cell-index = <4>;
                //      reg = <2800 100>;
                //      interrupts = <2 c 0>;
                //      interrupt-parent = <500>;
                //};
 
-               // PSC6 in AC97 mode example
-               ac97@2c00 {             // PSC6
-                       device_type = "sound";
-                       compatible = "mpc5200b-psc-ac97\0mpc52xx-psc-ac97";
-                       reg = <2c00 100>;
-                       interrupts = <2 4 0>;
-                       interrupt-parent = <500>;
-               };
+               // PSC6 in spi mode example
+               //spi@2c00 {            // PSC6
+               //      device_type = "spi";
+               //      compatible = "mpc5200b-psc-spi\0mpc5200-psc-spi";
+               //      cell-index = <5>;
+               //      reg = <2c00 100>;
+               //      interrupts = <2 4 0>;
+               //      interrupt-parent = <500>;
+               //};
 
                ethernet@3000 {
                        device_type = "network";
-                       compatible = "mpc5200b-fec\0mpc52xx-fec";
+                       compatible = "mpc5200b-fec\0mpc5200-fec";
                        reg = <3000 800>;
                        mac-address = [ 02 03 04 05 06 07 ]; // Bad!
                        interrupts = <2 5 0>;
 
                ata@3a00 {
                        device_type = "ata";
-                       compatible = "mpc5200b-ata\0mpc52xx-ata";
+                       compatible = "mpc5200b-ata\0mpc5200-ata";
                        reg = <3a00 100>;
                        interrupts = <2 7 0>;
                        interrupt-parent = <500>;
 
                i2c@3d00 {
                        device_type = "i2c";
-                       compatible = "mpc5200b-i2c\0mpc52xx-i2c";
+                       compatible = "mpc5200b-i2c\0mpc5200-i2c";
+                       cell-index = <0>;
                        reg = <3d00 40>;
                        interrupts = <2 f 0>;
                        interrupt-parent = <500>;
 
                i2c@3d40 {
                        device_type = "i2c";
-                       compatible = "mpc5200b-i2c\0mpc52xx-i2c";
+                       compatible = "mpc5200b-i2c\0mpc5200-i2c";
+                       cell-index = <1>;
                        reg = <3d40 40>;
                        interrupts = <2 10 0>;
                        interrupt-parent = <500>;
                };
                sram@8000 {
                        device_type = "sram";
-                       compatible = "mpc5200b-sram\0mpc52xx-sram\0sram";
+                       compatible = "mpc5200b-sram\0mpc5200-sram\0sram";
                        reg = <8000 4000>;
                };
        };
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
new file mode 100644 (file)
index 0000000..3d2f5a0
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * MPC8313E RDB Device Tree Source
+ *
+ * Copyright 2005, 2006, 2007 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.
+ */
+
+/ {
+       model = "MPC8313ERDB";
+       compatible = "MPC83xx";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               #cpus = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               PowerPC,8313@0 {
+                       device_type = "cpu";
+                       reg = <0>;
+                       d-cache-line-size = <20>;       // 32 bytes
+                       i-cache-line-size = <20>;       // 32 bytes
+                       d-cache-size = <4000>;          // L1, 16K
+                       i-cache-size = <4000>;          // L1, 16K
+                       timebase-frequency = <0>;       // from bootloader
+                       bus-frequency = <0>;            // from bootloader
+                       clock-frequency = <0>;          // from bootloader
+                       32-bit;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <00000000 08000000>;      // 128MB at 0
+       };
+
+       soc8313@e0000000 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               #interrupt-cells = <2>;
+               device_type = "soc";
+               ranges = <0 e0000000 00100000>;
+               reg = <e0000000 00000200>;
+               bus-frequency = <0>;
+
+               wdt@200 {
+                       device_type = "watchdog";
+                       compatible = "mpc83xx_wdt";
+                       reg = <200 100>;
+               };
+
+               i2c@3000 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3000 100>;
+                       interrupts = <e 8>;
+                       interrupt-parent = <700>;
+                       dfsrr;
+               };
+
+               i2c@3100 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3100 100>;
+                       interrupts = <f 8>;
+                       interrupt-parent = <700>;
+                       dfsrr;
+               };
+
+               spi@7000 {
+                       device_type = "spi";
+                       compatible = "mpc83xx_spi";
+                       reg = <7000 1000>;
+                       interrupts = <10 8>;
+                       interrupt-parent = <700>;
+                       mode = <0>;
+               };
+
+               /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+               usb@23000 {
+                       device_type = "usb";
+                       compatible = "fsl-usb2-dr";
+                       reg = <23000 1000>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupt-parent = <700>;
+                       interrupts = <26 2>;
+                       phy_type = "utmi_wide";
+               };
+
+               mdio@24520 {
+                       device_type = "mdio";
+                       compatible = "gianfar";
+                       reg = <24520 20>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       linux,phandle = <24520>;
+                       ethernet-phy@1 {
+                               linux,phandle = <2452001>;
+                               interrupt-parent = <700>;
+                               interrupts = <13 2>;
+                               reg = <1>;
+                               device_type = "ethernet-phy";
+                       };
+                       ethernet-phy@4 {
+                               linux,phandle = <2452004>;
+                               interrupt-parent = <700>;
+                               interrupts = <14 2>;
+                               reg = <4>;
+                               device_type = "ethernet-phy";
+                       };
+               };
+
+               ethernet@24000 {
+                       device_type = "network";
+                       model = "eTSEC";
+                       compatible = "gianfar";
+                       reg = <24000 1000>;
+                       local-mac-address = [ 00 00 00 00 00 00 ];
+                       interrupts = <25 8 24 8 23 8>;
+                       interrupt-parent = <700>;
+                       phy-handle = <2452001>;
+               };
+
+               ethernet@25000 {
+                       device_type = "network";
+                       model = "eTSEC";
+                       compatible = "gianfar";
+                       reg = <25000 1000>;
+                       local-mac-address = [ 00 00 00 00 00 00 ];
+                       interrupts = <22 8 21 8 20 8>;
+                       interrupt-parent = <700>;
+                       phy-handle = <2452004>;
+               };
+
+               serial@4500 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4500 100>;
+                       clock-frequency = <0>;
+                       interrupts = <9 8>;
+                       interrupt-parent = <700>;
+               };
+
+               serial@4600 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4600 100>;
+                       clock-frequency = <0>;
+                       interrupts = <a 8>;
+                       interrupt-parent = <700>;
+               };
+
+               pci@8500 {
+                       interrupt-map-mask = <f800 0 0 7>;
+                       interrupt-map = <
+
+                                       /* IDSEL 0x0E -mini PCI */
+                                        7000 0 0 1 700 12 8
+                                        7000 0 0 2 700 12 8
+                                        7000 0 0 3 700 12 8
+                                        7000 0 0 4 700 12 8
+
+                                       /* IDSEL 0x0F - PCI slot */
+                                        7800 0 0 1 700 11 8
+                                        7800 0 0 2 700 12 8
+                                        7800 0 0 3 700 11 8
+                                        7800 0 0 4 700 12 8>;
+                       interrupt-parent = <700>;
+                       interrupts = <42 8>;
+                       bus-range = <0 0>;
+                       ranges = <02000000 0 90000000 90000000 0 10000000
+                                 42000000 0 80000000 80000000 0 10000000
+                                 01000000 0 00000000 e2000000 0 00100000>;
+                       clock-frequency = <3f940aa>;
+                       #interrupt-cells = <1>;
+                       #size-cells = <2>;
+                       #address-cells = <3>;
+                       reg = <8500 100>;
+                       compatible = "83xx";
+                       device_type = "pci";
+               };
+
+               crypto@30000 {
+                       device_type = "crypto";
+                       model = "SEC2";
+                       compatible = "talitos";
+                       reg = <30000 7000>;
+                       interrupts = <b 8>;
+                       interrupt-parent = <700>;
+                       /* Rev. 2.2 */
+                       num-channels = <1>;
+                       channel-fifo-len = <18>;
+                       exec-units-mask = <0000004c>;
+                       descriptor-types-mask = <0122003f>;
+               };
+
+               /* IPIC
+                * interrupts cell = <intr #, sense>
+                * sense values match linux IORESOURCE_IRQ_* defines:
+                * sense == 8: Level, low assertion
+                * sense == 2: Edge, high-to-low change
+                */
+               pic@700 {
+                       linux,phandle = <700>;
+                       interrupt-controller;
+                       #address-cells = <0>;
+                       #interrupt-cells = <2>;
+                       reg = <700 100>;
+                       built-in;
+                       device_type = "ipic";
+               };
+       };
+};
diff --git a/arch/powerpc/boot/dts/mpc8349emds.dts b/arch/powerpc/boot/dts/mpc8349emds.dts
deleted file mode 100644 (file)
index efceb34..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * MPC8349E MDS Device Tree Source
- *
- * Copyright 2005, 2006 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.
- */
-
-/ {
-       model = "MPC8349EMDS";
-       compatible = "MPC834xMDS";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       cpus {
-               #cpus = <1>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               PowerPC,8349@0 {
-                       device_type = "cpu";
-                       reg = <0>;
-                       d-cache-line-size = <20>;       // 32 bytes
-                       i-cache-line-size = <20>;       // 32 bytes
-                       d-cache-size = <8000>;          // L1, 32K
-                       i-cache-size = <8000>;          // L1, 32K
-                       timebase-frequency = <0>;       // from bootloader
-                       bus-frequency = <0>;            // from bootloader
-                       clock-frequency = <0>;          // from bootloader
-                       32-bit;
-               };
-       };
-
-       memory {
-               device_type = "memory";
-               reg = <00000000 10000000>;      // 256MB at 0
-       };
-
-       soc8349@e0000000 {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               #interrupt-cells = <2>;
-               device_type = "soc";
-               ranges = <0 e0000000 00100000>;
-               reg = <e0000000 00000200>;
-               bus-frequency = <0>;
-
-               wdt@200 {
-                       device_type = "watchdog";
-                       compatible = "mpc83xx_wdt";
-                       reg = <200 100>;
-               };
-
-               i2c@3000 {
-                       device_type = "i2c";
-                       compatible = "fsl-i2c";
-                       reg = <3000 100>;
-                       interrupts = <e 8>;
-                       interrupt-parent = <700>;
-                       dfsrr;
-               };
-
-               i2c@3100 {
-                       device_type = "i2c";
-                       compatible = "fsl-i2c";
-                       reg = <3100 100>;
-                       interrupts = <f 8>;
-                       interrupt-parent = <700>;
-                       dfsrr;
-               };
-
-               spi@7000 {
-                       device_type = "spi";
-                       compatible = "mpc83xx_spi";
-                       reg = <7000 1000>;
-                       interrupts = <10 8>;
-                       interrupt-parent = <700>;
-                       mode = <0>;
-               };
-
-               /* phy type (ULPI or SERIAL) are only types supportted for MPH */
-               /* port = 0 or 1 */
-               usb@22000 {
-                       device_type = "usb";
-                       compatible = "fsl-usb2-mph";
-                       reg = <22000 1000>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupt-parent = <700>;
-                       interrupts = <27 2>;
-                       phy_type = "ulpi";
-                       port1;
-               };
-               /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
-               usb@23000 {
-                       device_type = "usb";
-                       compatible = "fsl-usb2-dr";
-                       reg = <23000 1000>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupt-parent = <700>;
-                       interrupts = <26 2>;
-                       phy_type = "ulpi";
-               };
-
-               mdio@24520 {
-                       device_type = "mdio";
-                       compatible = "gianfar";
-                       reg = <24520 20>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       linux,phandle = <24520>;
-                       ethernet-phy@0 {
-                               linux,phandle = <2452000>;
-                               interrupt-parent = <700>;
-                               interrupts = <11 2>;
-                               reg = <0>;
-                               device_type = "ethernet-phy";
-                       };
-                       ethernet-phy@1 {
-                               linux,phandle = <2452001>;
-                               interrupt-parent = <700>;
-                               interrupts = <12 2>;
-                               reg = <1>;
-                               device_type = "ethernet-phy";
-                       };
-               };
-
-               ethernet@24000 {
-                       device_type = "network";
-                       model = "TSEC";
-                       compatible = "gianfar";
-                       reg = <24000 1000>;
-                       address = [ 00 00 00 00 00 00 ];
-                       local-mac-address = [ 00 00 00 00 00 00 ];
-                       interrupts = <20 8 21 8 22 8>;
-                       interrupt-parent = <700>;
-                       phy-handle = <2452000>;
-               };
-
-               ethernet@25000 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       device_type = "network";
-                       model = "TSEC";
-                       compatible = "gianfar";
-                       reg = <25000 1000>;
-                       address = [ 00 00 00 00 00 00 ];
-                       local-mac-address = [ 00 00 00 00 00 00 ];
-                       interrupts = <23 8 24 8 25 8>;
-                       interrupt-parent = <700>;
-                       phy-handle = <2452001>;
-               };
-
-               serial@4500 {
-                       device_type = "serial";
-                       compatible = "ns16550";
-                       reg = <4500 100>;
-                       clock-frequency = <0>;
-                       interrupts = <9 8>;
-                       interrupt-parent = <700>;
-               };
-
-               serial@4600 {
-                       device_type = "serial";
-                       compatible = "ns16550";
-                       reg = <4600 100>;
-                       clock-frequency = <0>;
-                       interrupts = <a 8>;
-                       interrupt-parent = <700>;
-               };
-
-               pci@8500 {
-                       interrupt-map-mask = <f800 0 0 7>;
-                       interrupt-map = <
-
-                                       /* IDSEL 0x11 */
-                                        8800 0 0 1 700 14 8
-                                        8800 0 0 2 700 15 8
-                                        8800 0 0 3 700 16 8
-                                        8800 0 0 4 700 17 8
-
-                                       /* IDSEL 0x12 */
-                                        9000 0 0 1 700 16 8
-                                        9000 0 0 2 700 17 8
-                                        9000 0 0 3 700 14 8
-                                        9000 0 0 4 700 15 8
-
-                                       /* IDSEL 0x13 */
-                                        9800 0 0 1 700 17 8
-                                        9800 0 0 2 700 14 8
-                                        9800 0 0 3 700 15 8
-                                        9800 0 0 4 700 16 8
-
-                                       /* IDSEL 0x15 */
-                                        a800 0 0 1 700 14 8
-                                        a800 0 0 2 700 15 8
-                                        a800 0 0 3 700 16 8
-                                        a800 0 0 4 700 17 8
-
-                                       /* IDSEL 0x16 */
-                                        b000 0 0 1 700 17 8
-                                        b000 0 0 2 700 14 8
-                                        b000 0 0 3 700 15 8
-                                        b000 0 0 4 700 16 8
-
-                                       /* IDSEL 0x17 */
-                                        b800 0 0 1 700 16 8
-                                        b800 0 0 2 700 17 8
-                                        b800 0 0 3 700 14 8
-                                        b800 0 0 4 700 15 8
-
-                                       /* IDSEL 0x18 */
-                                        c000 0 0 1 700 15 8
-                                        c000 0 0 2 700 16 8
-                                        c000 0 0 3 700 17 8
-                                        c000 0 0 4 700 14 8>;
-                       interrupt-parent = <700>;
-                       interrupts = <42 8>;
-                       bus-range = <0 0>;
-                       ranges = <02000000 0 a0000000 a0000000 0 10000000
-                                 42000000 0 80000000 80000000 0 10000000
-                                 01000000 0 00000000 e2000000 0 00100000>;
-                       clock-frequency = <3f940aa>;
-                       #interrupt-cells = <1>;
-                       #size-cells = <2>;
-                       #address-cells = <3>;
-                       reg = <8500 100>;
-                       compatible = "83xx";
-                       device_type = "pci";
-               };
-
-               pci@8600 {
-                       interrupt-map-mask = <f800 0 0 7>;
-                       interrupt-map = <
-
-                                       /* IDSEL 0x11 */
-                                        8800 0 0 1 700 14 8
-                                        8800 0 0 2 700 15 8
-                                        8800 0 0 3 700 16 8
-                                        8800 0 0 4 700 17 8
-
-                                       /* IDSEL 0x12 */
-                                        9000 0 0 1 700 16 8
-                                        9000 0 0 2 700 17 8
-                                        9000 0 0 3 700 14 8
-                                        9000 0 0 4 700 15 8
-
-                                       /* IDSEL 0x13 */
-                                        9800 0 0 1 700 17 8
-                                        9800 0 0 2 700 14 8
-                                        9800 0 0 3 700 15 8
-                                        9800 0 0 4 700 16 8
-
-                                       /* IDSEL 0x15 */
-                                        a800 0 0 1 700 14 8
-                                        a800 0 0 2 700 15 8
-                                        a800 0 0 3 700 16 8
-                                        a800 0 0 4 700 17 8
-
-                                       /* IDSEL 0x16 */
-                                        b000 0 0 1 700 17 8
-                                        b000 0 0 2 700 14 8
-                                        b000 0 0 3 700 15 8
-                                        b000 0 0 4 700 16 8
-
-                                       /* IDSEL 0x17 */
-                                        b800 0 0 1 700 16 8
-                                        b800 0 0 2 700 17 8
-                                        b800 0 0 3 700 14 8
-                                        b800 0 0 4 700 15 8
-
-                                       /* IDSEL 0x18 */
-                                        c000 0 0 1 700 15 8
-                                        c000 0 0 2 700 16 8
-                                        c000 0 0 3 700 17 8
-                                        c000 0 0 4 700 14 8>;
-                       interrupt-parent = <700>;
-                       interrupts = <42 8>;
-                       bus-range = <0 0>;
-                       ranges = <02000000 0 b0000000 b0000000 0 10000000
-                                 42000000 0 90000000 90000000 0 10000000
-                                 01000000 0 00000000 e2100000 0 00100000>;
-                       clock-frequency = <3f940aa>;
-                       #interrupt-cells = <1>;
-                       #size-cells = <2>;
-                       #address-cells = <3>;
-                       reg = <8600 100>;
-                       compatible = "83xx";
-                       device_type = "pci";
-               };
-
-               /* May need to remove if on a part without crypto engine */
-               crypto@30000 {
-                       device_type = "crypto";
-                       model = "SEC2";
-                       compatible = "talitos";
-                       reg = <30000 10000>;
-                       interrupts = <b 8>;
-                       interrupt-parent = <700>;
-                       num-channels = <4>;
-                       channel-fifo-len = <18>;
-                       exec-units-mask = <0000007e>;
-                       /* desc mask is for rev2.0,
-                        * we need runtime fixup for >2.0 */
-                       descriptor-types-mask = <01010ebf>;
-               };
-
-               /* IPIC
-                * interrupts cell = <intr #, sense>
-                * sense values match linux IORESOURCE_IRQ_* defines:
-                * sense == 8: Level, low assertion
-                * sense == 2: Edge, high-to-low change
-                */
-               pic@700 {
-                       linux,phandle = <700>;
-                       interrupt-controller;
-                       #address-cells = <0>;
-                       #interrupt-cells = <2>;
-                       reg = <700 100>;
-                       built-in;
-                       device_type = "ipic";
-               };
-       };
-};
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
new file mode 100644 (file)
index 0000000..3190774
--- /dev/null
@@ -0,0 +1,187 @@
+/*
+ * MPC8349E-mITX-GP Device Tree Source
+ *
+ * Copyright 2007 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.
+ */
+/ {
+       model = "MPC8349EMITXGP";
+       compatible = "MPC834xMITXGP";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               #cpus = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               PowerPC,8349@0 {
+                       device_type = "cpu";
+                       reg = <0>;
+                       d-cache-line-size = <20>;
+                       i-cache-line-size = <20>;
+                       d-cache-size = <8000>;
+                       i-cache-size = <8000>;
+                       timebase-frequency = <0>;       // from bootloader
+                       bus-frequency = <0>;            // from bootloader
+                       clock-frequency = <0>;          // from bootloader
+                       32-bit;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <00000000 10000000>;
+       };
+
+       soc8349@e0000000 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               #interrupt-cells = <2>;
+               device_type = "soc";
+               ranges = <0 e0000000 00100000>;
+               reg = <e0000000 00000200>;
+               bus-frequency = <0>;                    // from bootloader
+
+               wdt@200 {
+                       device_type = "watchdog";
+                       compatible = "mpc83xx_wdt";
+                       reg = <200 100>;
+               };
+
+               i2c@3000 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3000 100>;
+                       interrupts = <e 8>;
+                       interrupt-parent = <700>;
+                       dfsrr;
+               };
+
+               i2c@3100 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3100 100>;
+                       interrupts = <f 8>;
+                       interrupt-parent = <700>;
+                       dfsrr;
+               };
+
+               spi@7000 {
+                       device_type = "spi";
+                       compatible = "mpc83xx_spi";
+                       reg = <7000 1000>;
+                       interrupts = <10 8>;
+                       interrupt-parent = <700>;
+                       mode = <0>;
+               };
+
+               usb@23000 {
+                       device_type = "usb";
+                       compatible = "fsl-usb2-dr";
+                       reg = <23000 1000>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupt-parent = <700>;
+                       interrupts = <26 2>;
+                       dr_mode = "otg";
+                       phy_type = "ulpi";
+               };
+
+               mdio@24520 {
+                       device_type = "mdio";
+                       compatible = "gianfar";
+                       reg = <24520 20>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       linux,phandle = <24520>;
+
+                       /* Vitesse 8201 */
+                       ethernet-phy@1c {
+                               linux,phandle = <245201c>;
+                               interrupt-parent = <700>;
+                               interrupts = <12 2>;
+                               reg = <1c>;
+                               device_type = "ethernet-phy";
+                       };
+               };
+
+               ethernet@24000 {
+                       device_type = "network";
+                       model = "TSEC";
+                       compatible = "gianfar";
+                       reg = <24000 1000>;
+                       local-mac-address = [ 00 00 00 00 00 00 ];
+                       interrupts = <20 8 21 8 22 8>;
+                       interrupt-parent = <700>;
+                       phy-handle = <245201c>;
+               };
+
+               serial@4500 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4500 100>;
+                       clock-frequency = <0>;          // from bootloader
+                       interrupts = <9 8>;
+                       interrupt-parent = <700>;
+               };
+
+               serial@4600 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4600 100>;
+                       clock-frequency = <0>;          // from bootloader
+                       interrupts = <a 8>;
+                       interrupt-parent = <700>;
+               };
+
+               pci@8600 {
+                       interrupt-map-mask = <f800 0 0 7>;
+                       interrupt-map = <
+                                       /* IDSEL 0x0F - PCI Slot */
+                                       7800 0 0 1 700 14 8 /* PCI_INTA */
+                                       7800 0 0 2 700 15 8 /* PCI_INTB */
+                                        >;
+                       interrupt-parent = <700>;
+                       interrupts = <43 8>;
+                       bus-range = <1 1>;
+                       ranges = <42000000 0 a0000000 a0000000 0 10000000
+                                 02000000 0 b0000000 b0000000 0 10000000
+                                 01000000 0 00000000 e3000000 0 01000000>;
+                       clock-frequency = <3f940aa>;
+                       #interrupt-cells = <1>;
+                       #size-cells = <2>;
+                       #address-cells = <3>;
+                       reg = <8600 100>;
+                       compatible = "83xx";
+                       device_type = "pci";
+               };
+
+               crypto@30000 {
+                       device_type = "crypto";
+                       model = "SEC2";
+                       compatible = "talitos";
+                       reg = <30000 10000>;
+                       interrupts = <b 8>;
+                       interrupt-parent = <700>;
+                       num-channels = <4>;
+                       channel-fifo-len = <18>;
+                       exec-units-mask = <0000007e>;
+                       descriptor-types-mask = <01010ebf>;
+               };
+
+               pic@700 {
+                       linux,phandle = <700>;
+                       interrupt-controller;
+                       #address-cells = <0>;
+                       #interrupt-cells = <2>;
+                       reg = <700 100>;
+                       built-in;
+                       device_type = "ipic";
+               };
+       };
+};
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
new file mode 100644 (file)
index 0000000..dc121b3
--- /dev/null
@@ -0,0 +1,334 @@
+/*
+ * MPC8349E MDS Device Tree Source
+ *
+ * Copyright 2005, 2006 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.
+ */
+
+/ {
+       model = "MPC8349EMDS";
+       compatible = "MPC834xMDS";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               #cpus = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               PowerPC,8349@0 {
+                       device_type = "cpu";
+                       reg = <0>;
+                       d-cache-line-size = <20>;       // 32 bytes
+                       i-cache-line-size = <20>;       // 32 bytes
+                       d-cache-size = <8000>;          // L1, 32K
+                       i-cache-size = <8000>;          // L1, 32K
+                       timebase-frequency = <0>;       // from bootloader
+                       bus-frequency = <0>;            // from bootloader
+                       clock-frequency = <0>;          // from bootloader
+                       32-bit;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <00000000 10000000>;      // 256MB at 0
+       };
+
+       bcsr@e2400000 {
+               device_type = "board-control";
+               reg = <e2400000 8000>;
+       };
+
+       soc8349@e0000000 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               #interrupt-cells = <2>;
+               device_type = "soc";
+               ranges = <0 e0000000 00100000>;
+               reg = <e0000000 00000200>;
+               bus-frequency = <0>;
+
+               wdt@200 {
+                       device_type = "watchdog";
+                       compatible = "mpc83xx_wdt";
+                       reg = <200 100>;
+               };
+
+               i2c@3000 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3000 100>;
+                       interrupts = <e 8>;
+                       interrupt-parent = <700>;
+                       dfsrr;
+               };
+
+               i2c@3100 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3100 100>;
+                       interrupts = <f 8>;
+                       interrupt-parent = <700>;
+                       dfsrr;
+               };
+
+               spi@7000 {
+                       device_type = "spi";
+                       compatible = "mpc83xx_spi";
+                       reg = <7000 1000>;
+                       interrupts = <10 8>;
+                       interrupt-parent = <700>;
+                       mode = <0>;
+               };
+
+               /* phy type (ULPI or SERIAL) are only types supportted for MPH */
+               /* port = 0 or 1 */
+               usb@22000 {
+                       device_type = "usb";
+                       compatible = "fsl-usb2-mph";
+                       reg = <22000 1000>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupt-parent = <700>;
+                       interrupts = <27 2>;
+                       phy_type = "ulpi";
+                       port1;
+               };
+               /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+               usb@23000 {
+                       device_type = "usb";
+                       compatible = "fsl-usb2-dr";
+                       reg = <23000 1000>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupt-parent = <700>;
+                       interrupts = <26 2>;
+                       dr_mode = "otg";
+                       phy_type = "ulpi";
+               };
+
+               mdio@24520 {
+                       device_type = "mdio";
+                       compatible = "gianfar";
+                       reg = <24520 20>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       linux,phandle = <24520>;
+                       ethernet-phy@0 {
+                               linux,phandle = <2452000>;
+                               interrupt-parent = <700>;
+                               interrupts = <11 2>;
+                               reg = <0>;
+                               device_type = "ethernet-phy";
+                       };
+                       ethernet-phy@1 {
+                               linux,phandle = <2452001>;
+                               interrupt-parent = <700>;
+                               interrupts = <12 2>;
+                               reg = <1>;
+                               device_type = "ethernet-phy";
+                       };
+               };
+
+               ethernet@24000 {
+                       device_type = "network";
+                       model = "TSEC";
+                       compatible = "gianfar";
+                       reg = <24000 1000>;
+                       address = [ 00 00 00 00 00 00 ];
+                       local-mac-address = [ 00 00 00 00 00 00 ];
+                       interrupts = <20 8 21 8 22 8>;
+                       interrupt-parent = <700>;
+                       phy-handle = <2452000>;
+               };
+
+               ethernet@25000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       device_type = "network";
+                       model = "TSEC";
+                       compatible = "gianfar";
+                       reg = <25000 1000>;
+                       address = [ 00 00 00 00 00 00 ];
+                       local-mac-address = [ 00 00 00 00 00 00 ];
+                       interrupts = <23 8 24 8 25 8>;
+                       interrupt-parent = <700>;
+                       phy-handle = <2452001>;
+               };
+
+               serial@4500 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4500 100>;
+                       clock-frequency = <0>;
+                       interrupts = <9 8>;
+                       interrupt-parent = <700>;
+               };
+
+               serial@4600 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4600 100>;
+                       clock-frequency = <0>;
+                       interrupts = <a 8>;
+                       interrupt-parent = <700>;
+               };
+
+               pci@8500 {
+                       interrupt-map-mask = <f800 0 0 7>;
+                       interrupt-map = <
+
+                                       /* IDSEL 0x11 */
+                                        8800 0 0 1 700 14 8
+                                        8800 0 0 2 700 15 8
+                                        8800 0 0 3 700 16 8
+                                        8800 0 0 4 700 17 8
+
+                                       /* IDSEL 0x12 */
+                                        9000 0 0 1 700 16 8
+                                        9000 0 0 2 700 17 8
+                                        9000 0 0 3 700 14 8
+                                        9000 0 0 4 700 15 8
+
+                                       /* IDSEL 0x13 */
+                                        9800 0 0 1 700 17 8
+                                        9800 0 0 2 700 14 8
+                                        9800 0 0 3 700 15 8
+                                        9800 0 0 4 700 16 8
+
+                                       /* IDSEL 0x15 */
+                                        a800 0 0 1 700 14 8
+                                        a800 0 0 2 700 15 8
+                                        a800 0 0 3 700 16 8
+                                        a800 0 0 4 700 17 8
+
+                                       /* IDSEL 0x16 */
+                                        b000 0 0 1 700 17 8
+                                        b000 0 0 2 700 14 8
+                                        b000 0 0 3 700 15 8
+                                        b000 0 0 4 700 16 8
+
+                                       /* IDSEL 0x17 */
+                                        b800 0 0 1 700 16 8
+                                        b800 0 0 2 700 17 8
+                                        b800 0 0 3 700 14 8
+                                        b800 0 0 4 700 15 8
+
+                                       /* IDSEL 0x18 */
+                                        c000 0 0 1 700 15 8
+                                        c000 0 0 2 700 16 8
+                                        c000 0 0 3 700 17 8
+                                        c000 0 0 4 700 14 8>;
+                       interrupt-parent = <700>;
+                       interrupts = <42 8>;
+                       bus-range = <0 0>;
+                       ranges = <02000000 0 a0000000 a0000000 0 10000000
+                                 42000000 0 80000000 80000000 0 10000000
+                                 01000000 0 00000000 e2000000 0 00100000>;
+                       clock-frequency = <3f940aa>;
+                       #interrupt-cells = <1>;
+                       #size-cells = <2>;
+                       #address-cells = <3>;
+                       reg = <8500 100>;
+                       compatible = "83xx";
+                       device_type = "pci";
+               };
+
+               pci@8600 {
+                       interrupt-map-mask = <f800 0 0 7>;
+                       interrupt-map = <
+
+                                       /* IDSEL 0x11 */
+                                        8800 0 0 1 700 14 8
+                                        8800 0 0 2 700 15 8
+                                        8800 0 0 3 700 16 8
+                                        8800 0 0 4 700 17 8
+
+                                       /* IDSEL 0x12 */
+                                        9000 0 0 1 700 16 8
+                                        9000 0 0 2 700 17 8
+                                        9000 0 0 3 700 14 8
+                                        9000 0 0 4 700 15 8
+
+                                       /* IDSEL 0x13 */
+                                        9800 0 0 1 700 17 8
+                                        9800 0 0 2 700 14 8
+                                        9800 0 0 3 700 15 8
+                                        9800 0 0 4 700 16 8
+
+                                       /* IDSEL 0x15 */
+                                        a800 0 0 1 700 14 8
+                                        a800 0 0 2 700 15 8
+                                        a800 0 0 3 700 16 8
+                                        a800 0 0 4 700 17 8
+
+                                       /* IDSEL 0x16 */
+                                        b000 0 0 1 700 17 8
+                                        b000 0 0 2 700 14 8
+                                        b000 0 0 3 700 15 8
+                                        b000 0 0 4 700 16 8
+
+                                       /* IDSEL 0x17 */
+                                        b800 0 0 1 700 16 8
+                                        b800 0 0 2 700 17 8
+                                        b800 0 0 3 700 14 8
+                                        b800 0 0 4 700 15 8
+
+                                       /* IDSEL 0x18 */
+                                        c000 0 0 1 700 15 8
+                                        c000 0 0 2 700 16 8
+                                        c000 0 0 3 700 17 8
+                                        c000 0 0 4 700 14 8>;
+                       interrupt-parent = <700>;
+                       interrupts = <42 8>;
+                       bus-range = <0 0>;
+                       ranges = <02000000 0 b0000000 b0000000 0 10000000
+                                 42000000 0 90000000 90000000 0 10000000
+                                 01000000 0 00000000 e2100000 0 00100000>;
+                       clock-frequency = <3f940aa>;
+                       #interrupt-cells = <1>;
+                       #size-cells = <2>;
+                       #address-cells = <3>;
+                       reg = <8600 100>;
+                       compatible = "83xx";
+                       device_type = "pci";
+               };
+
+               /* May need to remove if on a part without crypto engine */
+               crypto@30000 {
+                       device_type = "crypto";
+                       model = "SEC2";
+                       compatible = "talitos";
+                       reg = <30000 10000>;
+                       interrupts = <b 8>;
+                       interrupt-parent = <700>;
+                       num-channels = <4>;
+                       channel-fifo-len = <18>;
+                       exec-units-mask = <0000007e>;
+                       /* desc mask is for rev2.0,
+                        * we need runtime fixup for >2.0 */
+                       descriptor-types-mask = <01010ebf>;
+               };
+
+               /* IPIC
+                * interrupts cell = <intr #, sense>
+                * sense values match linux IORESOURCE_IRQ_* defines:
+                * sense == 8: Level, low assertion
+                * sense == 2: Edge, high-to-low change
+                */
+               pic@700 {
+                       linux,phandle = <700>;
+                       interrupt-controller;
+                       #address-cells = <0>;
+                       #interrupt-cells = <2>;
+                       reg = <700 100>;
+                       built-in;
+                       device_type = "ipic";
+               };
+       };
+};
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
new file mode 100644 (file)
index 0000000..06d2465
--- /dev/null
@@ -0,0 +1,380 @@
+/*
+ * MPC8568E MDS Device Tree Source
+ *
+ * Copyright 2007 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.
+ */
+
+
+/*
+/memreserve/   00000000 1000000;
+*/
+
+/ {
+       model = "MPC8568EMDS";
+       compatible = "MPC85xxMDS";
+       #address-cells = <1>;
+       #size-cells = <1>;
+       linux,phandle = <100>;
+
+       cpus {
+               #cpus = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               linux,phandle = <200>;
+
+               PowerPC,8568@0 {
+                       device_type = "cpu";
+                       reg = <0>;
+                       d-cache-line-size = <20>;       // 32 bytes
+                       i-cache-line-size = <20>;       // 32 bytes
+                       d-cache-size = <8000>;          // L1, 32K
+                       i-cache-size = <8000>;          // L1, 32K
+                       timebase-frequency = <0>;
+                       bus-frequency = <0>;
+                       clock-frequency = <0>;
+                       32-bit;
+                       linux,phandle = <201>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               linux,phandle = <300>;
+               reg = <00000000 10000000>;
+       };
+
+       bcsr@f8000000 {
+               device_type = "board-control";
+               reg = <f8000000 8000>;
+       };
+
+       soc8568@e0000000 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               #interrupt-cells = <2>;
+               device_type = "soc";
+               ranges = <0 e0000000 00100000>;
+               reg = <e0000000 00100000>;
+               bus-frequency = <0>;
+
+               i2c@3000 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3000 100>;
+                       interrupts = <1b 2>;
+                       interrupt-parent = <40000>;
+                       dfsrr;
+               };
+
+               i2c@3100 {
+                       device_type = "i2c";
+                       compatible = "fsl-i2c";
+                       reg = <3100 100>;
+                       interrupts = <1b 2>;
+                       interrupt-parent = <40000>;
+                       dfsrr;
+               };
+
+               mdio@24520 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       device_type = "mdio";
+                       compatible = "gianfar";
+                       reg = <24520 20>;
+                       linux,phandle = <24520>;
+                       ethernet-phy@0 {
+                               linux,phandle = <2452000>;
+                               interrupt-parent = <40000>;
+                               interrupts = <31 1>;
+                               reg = <0>;
+                               device_type = "ethernet-phy";
+                       };
+                       ethernet-phy@1 {
+                               linux,phandle = <2452001>;
+                               interrupt-parent = <40000>;
+                               interrupts = <32 1>;
+                               reg = <1>;
+                               device_type = "ethernet-phy";
+                       };
+
+                       ethernet-phy@2 {
+                               linux,phandle = <2452002>;
+                               interrupt-parent = <40000>;
+                               interrupts = <31 1>;
+                               reg = <2>;
+                               device_type = "ethernet-phy";
+                       };
+                       ethernet-phy@3 {
+                               linux,phandle = <2452003>;
+                               interrupt-parent = <40000>;
+                               interrupts = <32 1>;
+                               reg = <3>;
+                               device_type = "ethernet-phy";
+                       };
+               };
+
+               ethernet@24000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       device_type = "network";
+                       model = "eTSEC";
+                       compatible = "gianfar";
+                       reg = <24000 1000>;
+                       mac-address = [ 00 00 00 00 00 00 ];
+                       interrupts = <d 2 e 2 12 2>;
+                       interrupt-parent = <40000>;
+                       phy-handle = <2452002>;
+               };
+
+               ethernet@25000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       device_type = "network";
+                       model = "eTSEC";
+                       compatible = "gianfar";
+                       reg = <25000 1000>;
+                       mac-address = [ 00 00 00 00 00 00];
+                       interrupts = <13 2 14 2 18 2>;
+                       interrupt-parent = <40000>;
+                       phy-handle = <2452003>;
+               };
+
+               serial@4500 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4500 100>;
+                       clock-frequency = <0>;
+                       interrupts = <1a 2>;
+                       interrupt-parent = <40000>;
+               };
+
+               serial@4600 {
+                       device_type = "serial";
+                       compatible = "ns16550";
+                       reg = <4600 100>;
+                       clock-frequency = <0>;
+                       interrupts = <1a 2>;
+                       interrupt-parent = <40000>;
+               };
+
+               crypto@30000 {
+                       device_type = "crypto";
+                       model = "SEC2";
+                       compatible = "talitos";
+                       reg = <30000 f000>;
+                       interrupts = <1d 2>;
+                       interrupt-parent = <40000>;
+                       num-channels = <4>;
+                       channel-fifo-len = <18>;
+                       exec-units-mask = <000000fe>;
+                       descriptor-types-mask = <012b0ebf>;
+               };
+
+               pic@40000 {
+                       linux,phandle = <40000>;
+                       clock-frequency = <0>;
+                       interrupt-controller;
+                       #address-cells = <0>;
+                       #interrupt-cells = <2>;
+                       reg = <40000 40000>;
+                       built-in;
+                       compatible = "chrp,open-pic";
+                       device_type = "open-pic";
+                        big-endian;
+               };
+               par_io@e0100 {
+                       reg = <e0100 100>;
+                       device_type = "par_io";
+                       num-ports = <7>;
+
+                       ucc_pin@01 {
+                               linux,phandle = <e010001>;
+                               pio-map = <
+                       /* port  pin  dir  open_drain  assignment  has_irq */
+                                       4  0a  1  0  2  0       /* TxD0 */
+                                       4  09  1  0  2  0       /* TxD1 */
+                                       4  08  1  0  2  0       /* TxD2 */
+                                       4  07  1  0  2  0       /* TxD3 */
+                                       4  17  1  0  2  0       /* TxD4 */
+                                       4  16  1  0  2  0       /* TxD5 */
+                                       4  15  1  0  2  0       /* TxD6 */
+                                       4  14  1  0  2  0       /* TxD7 */
+                                       4  0f  2  0  2  0       /* RxD0 */
+                                       4  0e  2  0  2  0       /* RxD1 */
+                                       4  0d  2  0  2  0       /* RxD2 */
+                                       4  0c  2  0  2  0       /* RxD3 */
+                                       4  1d  2  0  2  0       /* RxD4 */
+                                       4  1c  2  0  2  0       /* RxD5 */
+                                       4  1b  2  0  2  0       /* RxD6 */
+                                       4  1a  2  0  2  0       /* RxD7 */
+                                       4  0b  1  0  2  0       /* TX_EN */
+                                       4  18  1  0  2  0       /* TX_ER */
+                                       4  0f  2  0  2  0       /* RX_DV */
+                                       4  1e  2  0  2  0       /* RX_ER */
+                                       4  11  2  0  2  0       /* RX_CLK */
+                                       4  13  1  0  2  0       /* GTX_CLK */
+                                       1  1f  2  0  3  0>;     /* GTX125 */
+                       };
+                       ucc_pin@02 {
+                               linux,phandle = <e010002>;
+                               pio-map = <
+                       /* port  pin  dir  open_drain  assignment  has_irq */
+                                       5  0a 1  0  2  0   /* TxD0 */
+                                       5  09 1  0  2  0   /* TxD1 */
+                                       5  08 1  0  2  0   /* TxD2 */
+                                       5  07 1  0  2  0   /* TxD3 */
+                                       5  17 1  0  2  0   /* TxD4 */
+                                       5  16 1  0  2  0   /* TxD5 */
+                                       5  15 1  0  2  0   /* TxD6 */
+                                       5  14 1  0  2  0   /* TxD7 */
+                                       5  0f 2  0  2  0   /* RxD0 */
+                                       5  0e 2  0  2  0   /* RxD1 */
+                                       5  0d 2  0  2  0   /* RxD2 */
+                                       5  0c 2  0  2  0   /* RxD3 */
+                                       5  1d 2  0  2  0   /* RxD4 */
+                                       5  1c 2  0  2  0   /* RxD5 */
+                                       5  1b 2  0  2  0   /* RxD6 */
+                                       5  1a 2  0  2  0   /* RxD7 */
+                                       5  0b 1  0  2  0   /* TX_EN */
+                                       5  18 1  0  2  0   /* TX_ER */
+                                       5  10 2  0  2  0   /* RX_DV */
+                                       5  1e 2  0  2  0   /* RX_ER */
+                                       5  11 2  0  2  0   /* RX_CLK */
+                                       5  13 1  0  2  0   /* GTX_CLK */
+                                       1  1f 2  0  3  0   /* GTX125 */
+                                       4  06 3  0  2  0   /* MDIO */
+                                       4  05 1  0  2  0>; /* MDC */
+                       };
+               };
+       };
+
+       qe@e0080000 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               device_type = "qe";
+               model = "QE";
+               ranges = <0 e0080000 00040000>;
+               reg = <e0080000 480>;
+               brg-frequency = <0>;
+               bus-frequency = <179A7B00>;
+
+               muram@10000 {
+                       device_type = "muram";
+                       ranges = <0 00010000 0000c000>;
+
+                       data-only@0{
+                               reg = <0 c000>;
+                       };
+               };
+
+               spi@4c0 {
+                       device_type = "spi";
+                       compatible = "fsl_spi";
+                       reg = <4c0 40>;
+                       interrupts = <2>;
+                       interrupt-parent = <80>;
+                       mode = "cpu";
+               };
+
+               spi@500 {
+                       device_type = "spi";
+                       compatible = "fsl_spi";
+                       reg = <500 40>;
+                       interrupts = <1>;
+                       interrupt-parent = <80>;
+                       mode = "cpu";
+               };
+
+               ucc@2000 {
+                       device_type = "network";
+                       compatible = "ucc_geth";
+                       model = "UCC";
+                       device-id = <1>;
+                       reg = <2000 200>;
+                       interrupts = <20>;
+                       interrupt-parent = <80>;
+                       mac-address = [ 00 04 9f 00 23 23 ];
+                       rx-clock = <0>;
+                       tx-clock = <19>;
+                       phy-handle = <212000>;
+                       pio-handle = <e010001>;
+               };
+
+               ucc@3000 {
+                       device_type = "network";
+                       compatible = "ucc_geth";
+                       model = "UCC";
+                       device-id = <2>;
+                       reg = <3000 200>;
+                       interrupts = <21>;
+                       interrupt-parent = <80>;
+                       mac-address = [ 00 11 22 33 44 55 ];
+                       rx-clock = <0>;
+                       tx-clock = <14>;
+                       phy-handle = <212001>;
+                       pio-handle = <e010002>;
+               };
+
+               mdio@2120 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <2120 18>;
+                       device_type = "mdio";
+                       compatible = "ucc_geth_phy";
+
+                       /* These are the same PHYs as on
+                        * gianfar's MDIO bus */
+                       ethernet-phy@00 {
+                               linux,phandle = <212000>;
+                               interrupt-parent = <40000>;
+                               interrupts = <31 1>;
+                               reg = <0>;
+                               device_type = "ethernet-phy";
+                               interface = <6>; //ENET_1000_GMII
+                       };
+                       ethernet-phy@01 {
+                               linux,phandle = <212001>;
+                               interrupt-parent = <40000>;
+                               interrupts = <32 1>;
+                               reg = <1>;
+                               device_type = "ethernet-phy";
+                               interface = <6>;
+                       };
+                       ethernet-phy@02 {
+                               linux,phandle = <212002>;
+                               interrupt-parent = <40000>;
+                               interrupts = <31 1>;
+                               reg = <2>;
+                               device_type = "ethernet-phy";
+                               interface = <6>; //ENET_1000_GMII
+                       };
+                       ethernet-phy@03 {
+                               linux,phandle = <212003>;
+                               interrupt-parent = <40000>;
+                               interrupts = <32 1>;
+                               reg = <3>;
+                               device_type = "ethernet-phy";
+                               interface = <6>; //ENET_1000_GMII
+                       };
+               };
+
+               qeic@80 {
+                       linux,phandle = <80>;
+                       interrupt-controller;
+                       device_type = "qeic";
+                       #address-cells = <0>;
+                       #interrupt-cells = <1>;
+                       reg = <80 80>;
+                       built-in;
+                       big-endian;
+                       interrupts = <1e 2 1e 2>; //high:30 low:30
+                       interrupt-parent = <40000>;
+               };
+
+       };
+};
index 405c1c908213d0215ed9178c4f76ce7a19c3b53b..dde66a597a8d90e4f8ac1596425847ec15d9785d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc5
-# Mon Jan 22 22:17:58 2007
+# Linux kernel version: 2.6.20-rc6
+# Sun Jan 28 23:13:56 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -58,7 +58,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 #
 # General setup
 #
-CONFIG_LOCALVERSION="-kuroboxHG"
+CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
@@ -206,7 +206,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
 # CONFIG_PM is not set
-# CONFIG_SECCOMP is not set
+CONFIG_SECCOMP=y
 CONFIG_ISA_DMA_API=y
 
 #
@@ -312,39 +312,40 @@ CONFIG_NF_CONNTRACK=m
 # CONFIG_NF_CT_ACCT is not set
 # CONFIG_NF_CONNTRACK_MARK is not set
 # CONFIG_NF_CONNTRACK_EVENTS is not set
-# CONFIG_NF_CT_PROTO_SCTP is not set
-# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CONNTRACK_AMANDA=m
 CONFIG_NF_CONNTRACK_FTP=m
-# CONFIG_NF_CONNTRACK_H323 is not set
+CONFIG_NF_CONNTRACK_H323=m
 CONFIG_NF_CONNTRACK_IRC=m
-# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
-# CONFIG_NF_CONNTRACK_PPTP is not set
-# CONFIG_NF_CONNTRACK_SIP is not set
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
 # CONFIG_NETFILTER_XT_TARGET_DSCP is not set
-CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
 # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
 # CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
 # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
 # CONFIG_NETFILTER_XT_MATCH_DCCP is not set
 # CONFIG_NETFILTER_XT_MATCH_DSCP is not set
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
 CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
 # CONFIG_NETFILTER_XT_MATCH_POLICY is not set
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
 # CONFIG_NETFILTER_XT_MATCH_REALM is not set
 # CONFIG_NETFILTER_XT_MATCH_SCTP is not set
-# CONFIG_NETFILTER_XT_MATCH_STATE is not set
+CONFIG_NETFILTER_XT_MATCH_STATE=m
 # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
 # CONFIG_NETFILTER_XT_MATCH_STRING is not set
 # CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
@@ -359,12 +360,12 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
 # CONFIG_IP_NF_MATCH_TOS is not set
-# CONFIG_IP_NF_MATCH_RECENT is not set
+CONFIG_IP_NF_MATCH_RECENT=m
 # CONFIG_IP_NF_MATCH_ECN is not set
 # CONFIG_IP_NF_MATCH_AH is not set
 # CONFIG_IP_NF_MATCH_TTL is not set
-# CONFIG_IP_NF_MATCH_OWNER is not set
-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 # CONFIG_IP_NF_TARGET_LOG is not set
@@ -374,16 +375,17 @@ CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
+# CONFIG_IP_NF_TARGET_NETMAP is not set
+# CONFIG_IP_NF_TARGET_SAME is not set
 # CONFIG_NF_NAT_SNMP_BASIC is not set
+CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_FTP=m
 CONFIG_NF_NAT_IRC=m
 CONFIG_NF_NAT_TFTP=m
-# CONFIG_NF_NAT_AMANDA is not set
-# CONFIG_NF_NAT_PPTP is not set
-# CONFIG_NF_NAT_H323 is not set
-# CONFIG_NF_NAT_SIP is not set
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -472,6 +474,7 @@ CONFIG_MTD_PARTITIONS=y
 # User Modules And Translation Layers
 #
 CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
@@ -518,6 +521,7 @@ CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_PHYSMAP_START=0xffc00000
 CONFIG_MTD_PHYSMAP_LEN=0x400000
 CONFIG_MTD_PHYSMAP_BANKWIDTH=1
+# CONFIG_MTD_PHYSMAP_OF is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
@@ -540,6 +544,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
 # NAND Flash Device Drivers
 #
 # CONFIG_MTD_NAND is not set
+# CONFIG_MTD_NAND_CAFE is not set
 
 #
 # OneNAND Flash Device Drivers
@@ -696,7 +701,7 @@ CONFIG_ATA=y
 # CONFIG_PATA_HPT37X is not set
 # CONFIG_PATA_HPT3X2N is not set
 # CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
+CONFIG_PATA_IT821X=y
 # CONFIG_PATA_JMICRON is not set
 # CONFIG_PATA_TRIFLEX is not set
 # CONFIG_PATA_MARVELL is not set
@@ -763,11 +768,33 @@ CONFIG_TUN=m
 #
 # PHY device support
 #
+# CONFIG_PHYLIB is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
-# CONFIG_NET_ETHERNET is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_ULI526X is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -829,7 +856,8 @@ CONFIG_NET_RADIO=y
 # CONFIG_USB_ZD1201 is not set
 # CONFIG_HOSTAP is not set
 # CONFIG_BCM43XX is not set
-# CONFIG_ZD1211RW is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
 CONFIG_NET_WIRELESS=y
 
 #
@@ -1098,7 +1126,7 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # HID Devices
 #
-CONFIG_HID=y
+CONFIG_HID=m
 
 #
 # USB support
@@ -1115,7 +1143,6 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1136,7 +1163,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 # USB Device Class drivers
 #
 # CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
+CONFIG_USB_PRINTER=m
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1371,7 +1398,11 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_SECURITY is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
@@ -1461,7 +1492,12 @@ CONFIG_SUNRPC_GSS=y
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1495,7 +1531,7 @@ CONFIG_NLS_CODEPAGE_437=m
 # 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_932=m
 # CONFIG_NLS_CODEPAGE_949 is not set
 # CONFIG_NLS_CODEPAGE_874 is not set
 # CONFIG_NLS_ISO8859_8 is not set
@@ -1526,12 +1562,14 @@ CONFIG_NLS_UTF8=m
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_CRC_CCITT is not set
+CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
 CONFIG_PLIST=y
 CONFIG_IOMAP_COPY=y
 
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig
new file mode 100644 (file)
index 0000000..f875237
--- /dev/null
@@ -0,0 +1,1409 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20
+# Wed Feb  7 22:08:04 2007
+#
+# CONFIG_PPC64 is not set
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=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
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFAULT_UIMAGE=y
+
+#
+# Processor support
+#
+# CONFIG_CLASSIC32 is not set
+# CONFIG_PPC_82xx is not set
+CONFIG_PPC_83xx=y
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_86xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_6xx=y
+CONFIG_83xx=y
+CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_STD_MMU_32=y
+# CONFIG_SMP is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=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_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_KALLSYMS 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 is not set
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=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 is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF 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_PPC_GEN550=y
+# CONFIG_WANT_EARLY_SERIAL is not set
+
+#
+# Platform support
+#
+CONFIG_MPC8313_RDB=y
+# CONFIG_MPC832x_MDS is not set
+# CONFIG_MPC834x_SYS is not set
+# CONFIG_MPC834x_ITX is not set
+# CONFIG_MPC8360E_PB is not set
+CONFIG_PPC_MPC831x=y
+# CONFIG_MPIC is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# 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 is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=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_RESOURCES_64BIT is not set
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_GENERIC_ISA_DMA=y
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_FSL_SOC=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCIEPORTBUS is not set
+# CONFIG_PCI_DEBUG is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PCI Hotplug Support
+#
+# CONFIG_HOTPLUG_PCI 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_BOOT_LOAD=0x00800000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# 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_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK 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
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC 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
+# 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
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0xfe000000
+CONFIG_MTD_PHYSMAP_LEN=0x1000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PHYSMAP_OF is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_NAND_CAFE is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND 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_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM 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_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+# CONFIG_BLK_DEV_SD is not set
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ARCMSR is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=y
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
+# CONFIG_MD_RAID456 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
+# CONFIG_BLK_DEV_DM is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+# CONFIG_MAC_EMUMOUSEBTN is not set
+# 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
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET 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=y
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_FIXED_PHY is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=y
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+# CONFIG_QLA3XXX is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC 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
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# 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_PCI=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_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_83xx_WDT=y
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_M41T00 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_MPC83xx=y
+
+#
+# SPI Protocol Masters
+#
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_BANDWIDTH is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_SPLIT_ISO is not set
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=y
+# CONFIG_USB_SL811_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Input Devices
+#
+# CONFIG_USB_HID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=y
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=y
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_X1205 is not set
+CONFIG_RTC_DRV_DS1307=y
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# DMA Engine support
+#
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+CONFIG_NET_DMA=y
+
+#
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=y
+
+#
+# Virtualization
+#
+
+#
+# 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_EXT4DEV_FS 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_GFS2_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_INOTIFY_USER=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_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# 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_JFFS2_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=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# 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=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL 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_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
+
+#
+# Instrumentation Support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK 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_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUGGER is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_BOOTX_TEXT is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
index 7902806429f8a7979206049c7c71e7345c0a7ce6..23d8964846e0bef598ed75abd3c3a20e98b0354a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc5
-# Fri Jan 26 00:19:02 2007
+# Linux kernel version: 2.6.20
+# Wed Feb  7 13:12:18 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
 CONFIG_PPC_83xx=y
 # CONFIG_PPC_85xx is not set
 # CONFIG_PPC_86xx is not set
+# CONFIG_PPC_8xx is not set
 # CONFIG_40x is not set
 # CONFIG_44x is not set
-# CONFIG_8xx is not set
 # CONFIG_E200 is not set
 CONFIG_6xx=y
 CONFIG_83xx=y
@@ -178,7 +178,6 @@ CONFIG_FSL_SOC=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_DEBUG is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
@@ -303,7 +302,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
-# CONFIG_DEBUG_DRIVER is not set
 # CONFIG_SYS_HYPERVISOR is not set
 
 #
@@ -523,6 +521,7 @@ CONFIG_SCSI_SPI_ATTRS=y
 # Serial ATA (prod) and Parallel ATA (experimental) drivers
 #
 CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
 # CONFIG_SATA_AHCI is not set
 # CONFIG_SATA_SVW is not set
 # CONFIG_ATA_PIIX is not set
@@ -647,37 +646,7 @@ CONFIG_CICADA_PHY=y
 #
 # Ethernet (10 or 100Mbit)
 #
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_CASSINI is not set
-# CONFIG_NET_VENDOR_3COM is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-# CONFIG_PCNET32 is not set
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=y
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-# CONFIG_8139TOO is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
+# CONFIG_NET_ETHERNET is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -693,7 +662,6 @@ CONFIG_E100=y
 # CONFIG_SKGE is not set
 # CONFIG_SKY2 is not set
 # CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
 CONFIG_GIANFAR=y
@@ -746,26 +714,7 @@ CONFIG_GFAR_NAPI=y
 #
 # Input device support
 #
-CONFIG_INPUT=y
-# CONFIG_INPUT_FF_MEMLESS is not set
-
-#
-# 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
+# CONFIG_INPUT is not set
 
 #
 # Hardware I/O ports
@@ -784,7 +733,7 @@ CONFIG_INPUT=y
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
+# CONFIG_SERIAL_8250_PCI is not set
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
@@ -887,7 +836,7 @@ CONFIG_I2C_MPC=y
 # CONFIG_SENSORS_DS1337 is not set
 # CONFIG_SENSORS_DS1374 is not set
 # CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
+CONFIG_SENSORS_PCF8574=y
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_M41T00 is not set
@@ -901,7 +850,6 @@ CONFIG_I2C_MPC=y
 # SPI support
 #
 CONFIG_SPI=y
-# CONFIG_SPI_DEBUG is not set
 CONFIG_SPI_MASTER=y
 
 #
@@ -922,52 +870,8 @@ CONFIG_SPI_MPC83xx=y
 #
 # Hardware Monitoring support
 #
-CONFIG_HWMON=y
+# CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ABITUGURU is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM70 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_PC87427 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47M192 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT1211 is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83791D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83793 is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -983,7 +887,7 @@ CONFIG_HWMON=y
 #
 # Graphics support
 #
-CONFIG_FIRMWARE_EDID=y
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 # CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
@@ -993,11 +897,6 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
-#
-# HID Devices
-#
-CONFIG_HID=y
-
 #
 # USB support
 #
@@ -1023,10 +922,8 @@ CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 # CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=y
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 
 #
@@ -1058,25 +955,10 @@ CONFIG_USB_STORAGE=y
 #
 # USB Input Devices
 #
-# CONFIG_USB_HID is not set
 
 #
 # USB HID Boot Protocol drivers
 #
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_TOUCHSCREEN is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
 
 #
 # USB Imaging devices
@@ -1133,25 +1015,7 @@ CONFIG_USB_MON=y
 #
 # USB Gadget Support
 #
-CONFIG_USB_GADGET=y
-# CONFIG_USB_GADGET_DEBUG_FILES is not set
-CONFIG_USB_GADGET_SELECTED=y
-CONFIG_USB_GADGET_NET2280=y
-CONFIG_USB_NET2280=y
-# CONFIG_USB_GADGET_PXA2XX is not set
-# CONFIG_USB_GADGET_GOKU is not set
-# CONFIG_USB_GADGET_LH7A40X is not set
-# CONFIG_USB_GADGET_OMAP is not set
-# CONFIG_USB_GADGET_AT91 is not set
-# CONFIG_USB_GADGET_DUMMY_HCD is not set
-CONFIG_USB_GADGET_DUALSPEED=y
-# CONFIG_USB_ZERO is not set
-CONFIG_USB_ETH=y
-CONFIG_USB_ETH_RNDIS=y
-# CONFIG_USB_GADGETFS is not set
-# CONFIG_USB_FILE_STORAGE is not set
-# CONFIG_USB_G_SERIAL is not set
-# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_GADGET is not set
 
 #
 # MMC/SD Card support
@@ -1273,8 +1137,11 @@ CONFIG_DNOTIFY=y
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+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
 
 #
@@ -1340,7 +1207,7 @@ CONFIG_PARTITION_ADVANCED=y
 # 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_MAC_PARTITION=y
 CONFIG_MSDOS_PARTITION=y
 # CONFIG_BSD_DISKLABEL is not set
 # CONFIG_MINIX_SUBPARTITION is not set
@@ -1356,7 +1223,46 @@ CONFIG_MSDOS_PARTITION=y
 #
 # Native Language Support
 #
-# CONFIG_NLS is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# 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 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# 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 is not set
 
 #
 # Distributed Lock Manager
@@ -1388,27 +1294,9 @@ CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_BUGVERBOSE is not set
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_LIST is not set
-CONFIG_FORCED_INLINING=y
-# 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_SERIAL_TEXT_DEBUG is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig
new file mode 100644 (file)
index 0000000..4aa666c
--- /dev/null
@@ -0,0 +1,1174 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20
+# Fri Feb  9 13:28:19 2007
+#
+# CONFIG_PPC64 is not set
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=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
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFAULT_UIMAGE=y
+
+#
+# Processor support
+#
+# CONFIG_CLASSIC32 is not set
+# CONFIG_PPC_82xx is not set
+CONFIG_PPC_83xx=y
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_86xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_6xx=y
+CONFIG_83xx=y
+CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_STD_MMU_32=y
+# CONFIG_SMP is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=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_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_KALLSYMS 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 is not set
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=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 is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF 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_PPC_GEN550=y
+# CONFIG_WANT_EARLY_SERIAL is not set
+
+#
+# Platform support
+#
+# CONFIG_MPC832x_MDS is not set
+# CONFIG_MPC834x_SYS is not set
+CONFIG_MPC834x_ITX=y
+# CONFIG_MPC8360E_PB is not set
+CONFIG_MPC834x=y
+# CONFIG_MPIC is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# 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 is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=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_RESOURCES_64BIT is not set
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_GENERIC_ISA_DMA=y
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_FSL_SOC=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCIEPORTBUS is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PCI Hotplug Support
+#
+# CONFIG_HOTPLUG_PCI 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_BOOT_LOAD=0x00800000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# 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_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK 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
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC 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
+# 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_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0xfe000000
+CONFIG_MTD_PHYSMAP_LEN=0x800000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PHYSMAP_OF is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_NAND_CAFE is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND 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_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM 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_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ARCMSR is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+# CONFIG_MAC_EMUMOUSEBTN is not set
+# 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
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET 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=y
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_FIXED_PHY is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+# CONFIG_QLA3XXX is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC 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 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_PCI is not set
+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_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_83xx_WDT=y
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+CONFIG_SENSORS_PCF8574=y
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_M41T00 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_MPC83xx=y
+
+#
+# SPI Protocol Masters
+#
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB 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
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_X1205 is not set
+CONFIG_RTC_DRV_DS1307=y
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# DMA Engine support
+#
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+CONFIG_NET_DMA=y
+
+#
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=y
+
+#
+# Virtualization
+#
+
+#
+# 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_EXT4DEV_FS 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_GFS2_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_INOTIFY_USER=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_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# 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_JFFS2_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=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# 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=y
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL 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_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# 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 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# 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 is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
+
+#
+# Instrumentation Support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_BOOTX_TEXT is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
index 9eaed3a369832cadfb7ba6a56e76eaf83063a798..2e3f8efb6ab1aa417b77782b7ce3ac95df581803 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc5
-# Fri Jan 26 00:19:27 2007
+# Linux kernel version: 2.6.20
+# Thu Feb  8 01:00:48 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
 CONFIG_PPC_83xx=y
 # CONFIG_PPC_85xx is not set
 # CONFIG_PPC_86xx is not set
+# CONFIG_PPC_8xx is not set
 # CONFIG_40x is not set
 # CONFIG_44x is not set
-# CONFIG_8xx is not set
 # CONFIG_E200 is not set
 CONFIG_6xx=y
 CONFIG_83xx=y
@@ -128,8 +128,9 @@ CONFIG_PPC_GEN550=y
 #
 # Platform support
 #
+# CONFIG_MPC8313_RDB is not set
 # CONFIG_MPC832x_MDS is not set
-CONFIG_MPC834x_SYS=y
+CONFIG_MPC834x_MDS=y
 # CONFIG_MPC834x_ITX is not set
 # CONFIG_MPC8360E_PB is not set
 CONFIG_MPC834x=y
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
new file mode 100644 (file)
index 0000000..058e06d
--- /dev/null
@@ -0,0 +1,992 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20-rc5
+# Wed Feb  7 23:54:25 2007
+#
+# CONFIG_PPC64 is not set
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=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
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFAULT_UIMAGE=y
+
+#
+# Processor support
+#
+# CONFIG_CLASSIC32 is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+CONFIG_PPC_85xx=y
+# CONFIG_PPC_86xx is not set
+# 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_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+# CONFIG_PHYS_64BIT is not set
+CONFIG_SPE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=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_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_KALLSYMS 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 is not set
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=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 is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF 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_WANT_EARLY_SERIAL is not set
+
+#
+# Platform support
+#
+# CONFIG_MPC8540_ADS is not set
+# CONFIG_MPC8560_ADS is not set
+# CONFIG_MPC85xx_CDS is not set
+CONFIG_MPC8568_MDS=y
+CONFIG_MPC85xx=y
+CONFIG_PPC_INDIRECT_PCI_BE=y
+CONFIG_MPIC=y
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# 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 is not set
+CONFIG_MATH_EMULATION=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=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_RESOURCES_64BIT is not set
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+# CONFIG_MPIC_WEIRD is not set
+# 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_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# 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_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK 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
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC 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
+# 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
+# CONFIG_SYS_HYPERVISOR 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_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_TIFM_CORE is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+# CONFIG_BLK_DEV_SD is not set
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA 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_MAC_EMUMOUSEBTN is not set
+# 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=y
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_FIXED_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
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# 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_UARTLITE is not set
+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=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_BOOKE_WDT is not set
+CONFIG_HW_RANDOM=y
+# 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
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_M41T00 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP 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=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+
+#
+# USB support
+#
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI 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
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# Virtualization
+#
+
+#
+# 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_EXT4DEV_FS 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_GFS2_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_INOTIFY_USER=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_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# 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=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# 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_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
+
+#
+# Instrumentation Support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK 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_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+CONFIG_DEBUGGER=y
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+CONFIG_BOOTX_TEXT=y
+CONFIG_PPC_EARLY_DEBUG=y
+# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
+# CONFIG_PPC_EARLY_DEBUG_G5 is not set
+# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
+# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE 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=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
index 93f21aaf7c8ef163a08483cc5f6d06c31d571c80..3678997339d6270cfcf5065979965ab4bf15fefa 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/lmb.h>
 #include <asm/processor.h>
+#include <asm/udbg.h>
 
 #define NO_SCROLL
 
@@ -912,3 +913,11 @@ static unsigned char vga_font[cmapsz] = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00,
 };
+
+void __init udbg_init_btext(void)
+{
+       /* If btext is enabled, we might have a BAT setup for early display,
+        * thus we do enable some very basic udbg output
+        */
+       udbg_putc = btext_drawchar;
+}
index dd17dffbf05863fea22ab3c65133a0d1dd0a17ef..7ec4ac77c0fa0ee0eb24f92977d0b7740261a56b 100644 (file)
@@ -44,7 +44,7 @@ extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
-extern void __restore_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
+extern void __restore_cpu_pa6t(void);
 extern void __restore_cpu_ppc970(void);
 #endif /* CONFIG_PPC64 */
 
index accb39d49911bee35bbaa7ed5277017661e0a0bf..a15d4b8cce48783e0c54f12bf9b112460532408f 100644 (file)
@@ -32,8 +32,6 @@
 #include <asm/page.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
-#include <asm/ibm4xx.h>
-#include <asm/ibm44x.h>
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
 #include <asm/ppc_asm.h>
index 66877bdfe0b7b8c5a20d2d0bdc7df02b4594152c..1f155d399d576859ab502f0149bf2032285f3e49 100644 (file)
@@ -206,7 +206,8 @@ skpinv:     addi    r6,r6,1                         /* Increment */
        rlwimi  r7,r3,16,4,15   /* Setup MAS0 = TLBSEL | ESEL(r3) */
        mtspr   SPRN_MAS0,r7
        tlbre
-       li      r6,0
+       mfspr   r6,SPRN_MAS1
+       rlwinm  r6,r6,0,2,0     /* clear IPROT */
        mtspr   SPRN_MAS1,r6
        tlbwe
        /* Invalidate TLB1 */
@@ -248,6 +249,8 @@ skpinv:     addi    r6,r6,1                         /* Increment */
        rlwimi  r7,r5,16,4,15   /* Setup MAS0 = TLBSEL | ESEL(r5) */
        mtspr   SPRN_MAS0,r7
        tlbre
+       mfspr   r8,SPRN_MAS1
+       rlwinm  r8,r8,0,2,0     /* clear IPROT */
        mtspr   SPRN_MAS1,r8
        tlbwe
        /* Invalidate TLB1 */
@@ -889,7 +892,6 @@ load_up_spe:
        REST_GPR(9, r11)
        REST_GPR(12, r11)
        lwz     r11,GPR11(r11)
-       SYNC
        rfi
 
 /*
@@ -953,7 +955,6 @@ _GLOBAL(giveup_altivec)
 _GLOBAL(giveup_spe)
        mfmsr   r5
        oris    r5,r5,MSR_SPE@h
-       SYNC
        mtmsr   r5                      /* enable use of SPE now */
        isync
        cmpi    0,r3,0
index 89f46f377922aca7ad8b8ad42ee3989f61ae91b0..325f490a10cccbfdafff8503e44dd12ba6b6f968 100644 (file)
@@ -124,6 +124,10 @@ static int __init add_legacy_soc_port(struct device_node *np,
        if (get_property(np, "clock-frequency", NULL) == NULL)
                return -1;
 
+       /* if rtas uses this device, don't try to use it as well */
+       if (get_property(np, "used-by-rtas", NULL) != NULL)
+               return -1;
+
        /* Get the address */
        addrp = of_get_address(soc_dev, 0, NULL, NULL);
        if (addrp == NULL)
@@ -334,6 +338,17 @@ void __init find_legacy_serial_ports(void)
                of_node_put(tsi);
        }
 
+       /* First fill our array with opb bus ports */
+       for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16750")) != NULL;) {
+               struct device_node *opb = of_get_parent(np);
+               if (opb && !strcmp(opb->type, "opb")) {
+                       index = add_legacy_soc_port(np, np);
+                       if (index >= 0 && np == stdout)
+                               legacy_serial_console = index;
+               }
+               of_node_put(opb);
+       }
+
 #ifdef CONFIG_PCI
        /* Next, try to locate PCI ports */
        for (np = NULL; (np = of_find_all_nodes(np));) {
index 520ef42f642ecca95c2f04ce3a4480fa3f913c33..4fb5938ce6d389b8b01b9eac48a35b37159cd26b 100644 (file)
@@ -2117,11 +2117,92 @@ static void __init fixup_device_tree_pmac(void)
 #define fixup_device_tree_pmac()
 #endif
 
+#ifdef CONFIG_PPC_EFIKA
+/* The current fw of the Efika has a device tree needs quite a few
+ * fixups to be compliant with the mpc52xx bindings. It's currently
+ * unknown if it will ever be compliant (come on bPlan ...) so we do fixups.
+ * NOTE that we (barely) tolerate it because the EFIKA was out before
+ * the bindings were finished, for any new boards -> RTFM ! */
+
+struct subst_entry {
+       char *path;
+       char *property;
+       void *value;
+       int value_len;
+};
+
+static void __init fixup_device_tree_efika(void)
+{
+       /* Substitution table */
+       #define prop_cstr(x) x, sizeof(x)
+       int prop_sound_irq[3] = { 2, 2, 0 };
+       int prop_bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
+                                    3,4,0, 3,5,0, 3,6,0, 3,7,0,
+                                    3,8,0, 3,9,0, 3,10,0, 3,11,0,
+                                    3,12,0, 3,13,0, 3,14,0, 3,15,0 };
+       struct subst_entry efika_subst_table[] = {
+               { "/",                  "device_type",  prop_cstr("efika") },
+               { "/builtin",           "compatible",   prop_cstr("soc") },
+               { "/builtin/ata",       "compatible",   prop_cstr("mpc5200b-ata\0mpc5200-ata"), },
+               { "/builtin/bestcomm",  "compatible",   prop_cstr("mpc5200b-bestcomm\0mpc5200-bestcomm") },
+               { "/builtin/bestcomm",  "interrupts",   prop_bcomm_irq, sizeof(prop_bcomm_irq) },
+               { "/builtin/ethernet",  "compatible",   prop_cstr("mpc5200b-fec\0mpc5200-fec") },
+               { "/builtin/pic",       "compatible",   prop_cstr("mpc5200b-pic\0mpc5200-pic") },
+               { "/builtin/serial",    "compatible",   prop_cstr("mpc5200b-psc-uart\0mpc5200-psc-uart") },
+               { "/builtin/sound",     "compatible",   prop_cstr("mpc5200b-psc-ac97\0mpc5200-psc-ac97") },
+               { "/builtin/sound",     "interrupts",   prop_sound_irq, sizeof(prop_sound_irq) },
+               { "/builtin/sram",      "compatible",   prop_cstr("mpc5200b-sram\0mpc5200-sram") },
+               { "/builtin/sram",      "device_type",  prop_cstr("sram") },
+               {}
+       };
+       #undef prop_cstr
+
+       /* Vars */
+       u32 node;
+       char prop[64];
+       int rv, i;
+
+       /* Check if we're really running on a EFIKA */
+       node = call_prom("finddevice", 1, 1, ADDR("/"));
+       if (!PHANDLE_VALID(node))
+               return;
+
+       rv = prom_getprop(node, "model", prop, sizeof(prop));
+       if (rv == PROM_ERROR)
+               return;
+       if (strcmp(prop, "EFIKA5K2"))
+               return;
+
+       prom_printf("Applying EFIKA device tree fixups\n");
+
+       /* Process substitution table */
+       for (i=0; efika_subst_table[i].path; i++) {
+               struct subst_entry *se = &efika_subst_table[i];
+
+               node = call_prom("finddevice", 1, 1, ADDR(se->path));
+               if (!PHANDLE_VALID(node)) {
+                       prom_printf("fixup_device_tree_efika: ",
+                               "skipped entry %x - not found\n", i);
+                       continue;
+               }
+
+               rv = prom_setprop(node, se->path, se->property,
+                                       se->value, se->value_len );
+               if (rv == PROM_ERROR)
+                       prom_printf("fixup_device_tree_efika: ",
+                               "skipped entry %x - setprop error\n", i);
+       }
+}
+#else
+#define fixup_device_tree_efika()
+#endif
+
 static void __init fixup_device_tree(void)
 {
        fixup_device_tree_maple();
        fixup_device_tree_chrp();
        fixup_device_tree_pmac();
+       fixup_device_tree_efika();
 }
 
 static void __init prom_find_boot_cpu(void)
index 6a19fa40dceea957e41c6558c55880aecb33ea4b..44a6a3c47feb5a4f666be6ba4a0c402ffbe74526 100644 (file)
@@ -116,12 +116,8 @@ unsigned long __init early_init(unsigned long dt_ptr)
  */
 void __init machine_init(unsigned long dt_ptr, unsigned long phys)
 {
-       /* If btext is enabled, we might have a BAT setup for early display,
-        * thus we do enable some very basic udbg output
-        */
-#ifdef CONFIG_BOOTX_TEXT
-       udbg_putc = btext_drawchar;
-#endif
+       /* Enable early debugging if any specified (see udbg.h) */
+       udbg_early_init();
 
        /* Do some early initialization based on the flat device tree */
        early_init_devtree(__va(dt_ptr));
index 0e8beca460af59d8b814e99701a1bc65560ba4ba..924d692bc8f9249fd5b0feb091b195bfd08fbfa7 100644 (file)
@@ -78,29 +78,6 @@ int smt_enabled_at_boot = 1;
 
 static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
 
-#ifdef CONFIG_MPIC
-int __init smp_mpic_probe(void)
-{
-       int nr_cpus;
-
-       DBG("smp_mpic_probe()...\n");
-
-       nr_cpus = cpus_weight(cpu_possible_map);
-
-       DBG("nr_cpus: %d\n", nr_cpus);
-
-       if (nr_cpus > 1)
-               mpic_request_ipis();
-
-       return nr_cpus;
-}
-
-void __devinit smp_mpic_setup_cpu(int cpu)
-{
-       mpic_setup_this_cpu();
-}
-#endif /* CONFIG_MPIC */
-
 #ifdef CONFIG_PPC64
 void __devinit smp_generic_kick_cpu(int nr)
 {
index 194a93eeb3e7c2c402e54275db7074704930a27c..7e0971868fc25ec77377feb5ac7c34e195a1fd8f 100644 (file)
@@ -49,6 +49,8 @@ void __init udbg_early_init(void)
        udbg_init_debug_beat();
 #elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE)
        udbg_init_pas_realmode();
+#elif defined(CONFIG_BOOTX_TEXT)
+       udbg_init_btext();
 #endif
 }
 
index 50149ec6efa4354c29e0013f7131492baf17939b..e46c31b36641e7fb074e6ba3e45e17fbb7600f14 100644 (file)
 /* Max supported size for symbol names */
 #define MAX_SYMNAME    64
 
-#define VDSO32_MAXPAGES        (((0x3000 + PAGE_MASK) >> PAGE_SHIFT) + 2)
-#define VDSO64_MAXPAGES        (((0x3000 + PAGE_MASK) >> PAGE_SHIFT) + 2)
-
 extern char vdso32_start, vdso32_end;
 static void *vdso32_kbase = &vdso32_start;
-unsigned int vdso32_pages;
-static struct page *vdso32_pagelist[VDSO32_MAXPAGES];
+static unsigned int vdso32_pages;
+static struct page **vdso32_pagelist;
 unsigned long vdso32_sigtramp;
 unsigned long vdso32_rt_sigtramp;
 
 #ifdef CONFIG_PPC64
 extern char vdso64_start, vdso64_end;
 static void *vdso64_kbase = &vdso64_start;
-unsigned int vdso64_pages;
-static struct page *vdso64_pagelist[VDSO64_MAXPAGES];
+static unsigned int vdso64_pages;
+static struct page **vdso64_pagelist;
 unsigned long vdso64_rt_sigtramp;
 #endif /* CONFIG_PPC64 */
 
+static int vdso_ready;
+
 /*
  * The vdso data page (aka. systemcfg for old ppc64 fans) is here.
  * Once the early boot kernel code no longer needs to muck around
@@ -182,6 +181,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
        unsigned long vdso_base;
        int rc;
 
+       if (!vdso_ready)
+               return 0;
+
 #ifdef CONFIG_PPC64
        if (test_thread_flag(TIF_32BIT)) {
                vdso_pagelist = vdso32_pagelist;
@@ -661,7 +663,7 @@ static void __init vdso_setup_syscall_map(void)
 }
 
 
-void __init vdso_init(void)
+static int __init vdso_init(void)
 {
        int i;
 
@@ -716,11 +718,13 @@ void __init vdso_init(void)
 #ifdef CONFIG_PPC64
                vdso64_pages = 0;
 #endif
-               return;
+               return 0;
        }
 
        /* Make sure pages are in the correct state */
-       BUG_ON(vdso32_pages + 2 > VDSO32_MAXPAGES);
+       vdso32_pagelist = kzalloc(sizeof(struct page *) * (vdso32_pages + 2),
+                                 GFP_KERNEL);
+       BUG_ON(vdso32_pagelist == NULL);
        for (i = 0; i < vdso32_pages; i++) {
                struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE);
                ClearPageReserved(pg);
@@ -731,7 +735,9 @@ void __init vdso_init(void)
        vdso32_pagelist[i] = NULL;
 
 #ifdef CONFIG_PPC64
-       BUG_ON(vdso64_pages + 2 > VDSO64_MAXPAGES);
+       vdso64_pagelist = kzalloc(sizeof(struct page *) * (vdso64_pages + 2),
+                                 GFP_KERNEL);
+       BUG_ON(vdso64_pagelist == NULL);
        for (i = 0; i < vdso64_pages; i++) {
                struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE);
                ClearPageReserved(pg);
@@ -743,7 +749,13 @@ void __init vdso_init(void)
 #endif /* CONFIG_PPC64 */
 
        get_page(virt_to_page(vdso_data));
+
+       smp_wmb();
+       vdso_ready = 1;
+
+       return 0;
 }
+arch_initcall(vdso_init);
 
 int in_gate_area_no_task(unsigned long addr)
 {
index 77b4637097e93ce40682e6a4f57a26e81dee2ea9..52f397c108a7b3e981800f8ee9f18c64effcef65 100644 (file)
@@ -384,9 +384,6 @@ void __init mem_init(void)
                initsize >> 10);
 
        mem_init_done = 1;
-
-       /* Initialize the vDSO */
-       vdso_init();
 }
 
 /*
index bd02272bcb0fee3dcdcfcc507c725b7d23bd8404..c284bdac9947088e57fb66bc120639422eaf8900 100644 (file)
@@ -295,7 +295,7 @@ void __init mapin_ram(void)
 }
 
 /* is x a power of 4? */
-#define is_power_of_4(x)       is_power_of_2(x) && (ffs(x) & 1))
+#define is_power_of_4(x)       is_power_of_2(x) && (ffs(x) & 1)
 
 /*
  * Set up a mapping for a block of I/O.
index 2eb15f3881035895e1e83d1cbb0c90ee6bb2e8d8..e08e1d7b3dc5d21bc525d2f5d88fd89efa34ea9c 100644 (file)
 #include "../platforms/cell/interrupt.h"
 
 #define PPU_CYCLES_EVENT_NUM 1 /*  event number for CYCLES */
+#define PPU_CYCLES_GRP_NUM   1  /* special group number for identifying
+                                 * PPU_CYCLES event
+                                 */
 #define CBE_COUNT_ALL_CYCLES 0x42800000        /* PPU cycle event specifier */
 
-#define NUM_THREADS 2
-#define VIRT_CNTR_SW_TIME_NS 100000000 // 0.5 seconds
+#define NUM_THREADS 2         /* number of physical threads in
+                              * physical processor
+                              */
+#define NUM_TRACE_BUS_WORDS 4
+#define NUM_INPUT_BUS_WORDS 2
+
 
 struct pmc_cntrl_data {
        unsigned long vcntr;
@@ -58,7 +65,7 @@ struct pmc_cntrl_data {
 struct pm_signal {
        u16 cpu;                /* Processor to modify */
        u16 sub_unit;           /* hw subunit this applies to (if applicable) */
-       u16 signal_group;       /* Signal Group to Enable/Disable */
+       short int signal_group; /* Signal Group to Enable/Disable */
        u8 bus_word;            /* Enable/Disable on this Trace/Trigger/Event
                                 * Bus Word(s) (bitmask)
                                 */
@@ -93,7 +100,6 @@ static struct {
        u32 pm07_cntrl[NR_PHYS_CTRS];
 } pm_regs;
 
-
 #define GET_SUB_UNIT(x) ((x & 0x0000f000) >> 12)
 #define GET_BUS_WORD(x) ((x & 0x000000f0) >> 4)
 #define GET_BUS_TYPE(x) ((x & 0x00000300) >> 8)
@@ -101,7 +107,6 @@ static struct {
 #define GET_COUNT_CYCLES(x) (x & 0x00000001)
 #define GET_INPUT_CONTROL(x) ((x & 0x00000004) >> 2)
 
-
 static DEFINE_PER_CPU(unsigned long[NR_PHYS_CTRS], pmc_values);
 
 static struct pmc_cntrl_data pmc_cntrl[NUM_THREADS][NR_PHYS_CTRS];
@@ -129,8 +134,8 @@ static spinlock_t virt_cntr_lock = SPIN_LOCK_UNLOCKED;
 
 static u32 ctr_enabled;
 
-static unsigned char trace_bus[4];
-static unsigned char input_bus[2];
+static unsigned char trace_bus[NUM_TRACE_BUS_WORDS];
+static unsigned char input_bus[NUM_INPUT_BUS_WORDS];
 
 /*
  * Firmware interface functions
@@ -177,25 +182,40 @@ static void pm_rtas_reset_signals(u32 node)
 static void pm_rtas_activate_signals(u32 node, u32 count)
 {
        int ret;
-       int j;
+       int i, j;
        struct pm_signal pm_signal_local[NR_PHYS_CTRS];
 
+       /* There is no debug setup required for the cycles event.
+        * Note that only events in the same group can be used.
+        * Otherwise, there will be conflicts in correctly routing
+        * the signals on the debug bus.  It is the responsiblity
+        * of the OProfile user tool to check the events are in
+        * the same group.
+        */
+       i = 0;
        for (j = 0; j < count; j++) {
-               /* fw expects physical cpu # */
-               pm_signal_local[j].cpu = node;
-               pm_signal_local[j].signal_group = pm_signal[j].signal_group;
-               pm_signal_local[j].bus_word = pm_signal[j].bus_word;
-               pm_signal_local[j].sub_unit = pm_signal[j].sub_unit;
-               pm_signal_local[j].bit = pm_signal[j].bit;
+               if (pm_signal[j].signal_group != PPU_CYCLES_GRP_NUM) {
+
+                       /* fw expects physical cpu # */
+                       pm_signal_local[i].cpu = node;
+                       pm_signal_local[i].signal_group
+                               = pm_signal[j].signal_group;
+                       pm_signal_local[i].bus_word = pm_signal[j].bus_word;
+                       pm_signal_local[i].sub_unit = pm_signal[j].sub_unit;
+                       pm_signal_local[i].bit = pm_signal[j].bit;
+                       i++;
+               }
        }
 
-       ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE, PASSTHRU_ENABLE,
-                                    pm_signal_local,
-                                    count * sizeof(struct pm_signal));
+       if (i != 0) {
+               ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE, PASSTHRU_ENABLE,
+                                            pm_signal_local,
+                                            i * sizeof(struct pm_signal));
 
-       if (ret)
-               printk(KERN_WARNING "%s: rtas returned: %d\n",
-                      __FUNCTION__, ret);
+               if (ret)
+                       printk(KERN_WARNING "%s: rtas returned: %d\n",
+                              __FUNCTION__, ret);
+       }
 }
 
 /*
@@ -212,7 +232,7 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
                /* Special Event: Count all cpu cycles */
                pm_regs.pm07_cntrl[ctr] = CBE_COUNT_ALL_CYCLES;
                p = &(pm_signal[ctr]);
-               p->signal_group = 21;
+               p->signal_group = PPU_CYCLES_GRP_NUM;
                p->bus_word = 1;
                p->sub_unit = 0;
                p->bit = 0;
@@ -232,13 +252,21 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
 
        p->signal_group = event / 100;
        p->bus_word = bus_word;
-       p->sub_unit = unit_mask & 0x0000f000;
+       p->sub_unit = (unit_mask & 0x0000f000) >> 12;
 
        pm_regs.pm07_cntrl[ctr] = 0;
        pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles);
        pm_regs.pm07_cntrl[ctr] |= PM07_CTR_POLARITY(polarity);
        pm_regs.pm07_cntrl[ctr] |= PM07_CTR_INPUT_CONTROL(input_control);
 
+       /* Some of the islands signal selection is based on 64 bit words.
+        * The debug bus words are 32 bits, the input words to the performance
+        * counters are defined as 32 bits.  Need to convert the 64 bit island
+        * specification to the appropriate 32 input bit and bus word for the
+        * performance counter event selection.  See the CELL Performance
+        * monitoring signals manual and the Perf cntr hardware descriptions
+        * for the details.
+        */
        if (input_control == 0) {
                if (signal_bit > 31) {
                        signal_bit -= 32;
@@ -259,12 +287,12 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
                p->bit = signal_bit;
        }
 
-       for (i = 0; i < 4; i++) {
+       for (i = 0; i < NUM_TRACE_BUS_WORDS; i++) {
                if (bus_word & (1 << i)) {
                        pm_regs.debug_bus_control |=
                            (bus_type << (31 - (2 * i) + 1));
 
-                       for (j = 0; j < 2; j++) {
+                       for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) {
                                if (input_bus[j] == 0xff) {
                                        input_bus[j] = i;
                                        pm_regs.group_control |=
@@ -278,52 +306,58 @@ out:
        ;
 }
 
-static void write_pm_cntrl(int cpu, struct pm_cntrl *pm_cntrl)
+static void write_pm_cntrl(int cpu)
 {
-       /* Oprofile will use 32 bit counters, set bits 7:10 to 0 */
+       /* Oprofile will use 32 bit counters, set bits 7:10 to 0
+        * pmregs.pm_cntrl is a global
+        */
+
        u32 val = 0;
-       if (pm_cntrl->enable == 1)
+       if (pm_regs.pm_cntrl.enable == 1)
                val |= CBE_PM_ENABLE_PERF_MON;
 
-       if (pm_cntrl->stop_at_max == 1)
+       if (pm_regs.pm_cntrl.stop_at_max == 1)
                val |= CBE_PM_STOP_AT_MAX;
 
-       if (pm_cntrl->trace_mode == 1)
-               val |= CBE_PM_TRACE_MODE_SET(pm_cntrl->trace_mode);
+       if (pm_regs.pm_cntrl.trace_mode == 1)
+               val |= CBE_PM_TRACE_MODE_SET(pm_regs.pm_cntrl.trace_mode);
 
-       if (pm_cntrl->freeze == 1)
+       if (pm_regs.pm_cntrl.freeze == 1)
                val |= CBE_PM_FREEZE_ALL_CTRS;
 
        /* Routine set_count_mode must be called previously to set
         * the count mode based on the user selection of user and kernel.
         */
-       val |= CBE_PM_COUNT_MODE_SET(pm_cntrl->count_mode);
+       val |= CBE_PM_COUNT_MODE_SET(pm_regs.pm_cntrl.count_mode);
        cbe_write_pm(cpu, pm_control, val);
 }
 
 static inline void
-set_count_mode(u32 kernel, u32 user, struct pm_cntrl *pm_cntrl)
+set_count_mode(u32 kernel, u32 user)
 {
        /* The user must specify user and kernel if they want them. If
-        *  neither is specified, OProfile will count in hypervisor mode
+        *  neither is specified, OProfile will count in hypervisor mode.
+        *  pm_regs.pm_cntrl is a global
         */
        if (kernel) {
                if (user)
-                       pm_cntrl->count_mode = CBE_COUNT_ALL_MODES;
+                       pm_regs.pm_cntrl.count_mode = CBE_COUNT_ALL_MODES;
                else
-                       pm_cntrl->count_mode = CBE_COUNT_SUPERVISOR_MODE;
+                       pm_regs.pm_cntrl.count_mode =
+                               CBE_COUNT_SUPERVISOR_MODE;
        } else {
                if (user)
-                       pm_cntrl->count_mode = CBE_COUNT_PROBLEM_MODE;
+                       pm_regs.pm_cntrl.count_mode = CBE_COUNT_PROBLEM_MODE;
                else
-                       pm_cntrl->count_mode = CBE_COUNT_HYPERVISOR_MODE;
+                       pm_regs.pm_cntrl.count_mode =
+                               CBE_COUNT_HYPERVISOR_MODE;
        }
 }
 
 static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl)
 {
 
-       pm07_cntrl[ctr] |= PM07_CTR_ENABLE(1);
+       pm07_cntrl[ctr] |= CBE_PM_CTR_ENABLE;
        cbe_write_pm07_control(cpu, ctr, pm07_cntrl[ctr]);
 }
 
@@ -365,6 +399,14 @@ static void cell_virtual_cntr(unsigned long data)
        hdw_thread = 1 ^ hdw_thread;
        next_hdw_thread = hdw_thread;
 
+       for (i = 0; i < num_counters; i++)
+       /* There are some per thread events.  Must do the
+        * set event, for the thread that is being started
+        */
+               set_pm_event(i,
+                       pmc_cntrl[next_hdw_thread][i].evnts,
+                       pmc_cntrl[next_hdw_thread][i].masks);
+
        /* The following is done only once per each node, but
         * we need cpu #, not node #, to pass to the cbe_xxx functions.
         */
@@ -385,12 +427,13 @@ static void cell_virtual_cntr(unsigned long data)
                            == 0xFFFFFFFF)
                                /* If the cntr value is 0xffffffff, we must
                                 * reset that to 0xfffffff0 when the current
-                                * thread is restarted.  This will generate a new
-                                * interrupt and make sure that we never restore
-                                * the counters to the max value.  If the counters
-                                * were restored to the max value, they do not
-                                * increment and no interrupts are generated.  Hence
-                                * no more samples will be collected on that cpu.
+                                * thread is restarted.  This will generate a
+                                * new interrupt and make sure that we never
+                                * restore the counters to the max value.  If
+                                * the counters were restored to the max value,
+                                * they do not increment and no interrupts are
+                                * generated.  Hence no more samples will be
+                                * collected on that cpu.
                                 */
                                cbe_write_ctr(cpu, i, 0xFFFFFFF0);
                        else
@@ -410,9 +453,6 @@ static void cell_virtual_cntr(unsigned long data)
                                 * Must do the set event, enable_cntr
                                 * for each cpu.
                                 */
-                               set_pm_event(i,
-                                    pmc_cntrl[next_hdw_thread][i].evnts,
-                                    pmc_cntrl[next_hdw_thread][i].masks);
                                enable_ctr(cpu, i,
                                           pm_regs.pm07_cntrl);
                        } else {
@@ -465,8 +505,7 @@ cell_reg_setup(struct op_counter_config *ctr,
        pm_regs.pm_cntrl.trace_mode = 0;
        pm_regs.pm_cntrl.freeze = 1;
 
-       set_count_mode(sys->enable_kernel, sys->enable_user,
-                      &pm_regs.pm_cntrl);
+       set_count_mode(sys->enable_kernel, sys->enable_user);
 
        /* Setup the thread 0 events */
        for (i = 0; i < num_ctrs; ++i) {
@@ -498,10 +537,10 @@ cell_reg_setup(struct op_counter_config *ctr,
                pmc_cntrl[1][i].vcntr = i;
        }
 
-       for (i = 0; i < 4; i++)
+       for (i = 0; i < NUM_TRACE_BUS_WORDS; i++)
                trace_bus[i] = 0xff;
 
-       for (i = 0; i < 2; i++)
+       for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
                input_bus[i] = 0xff;
 
        /* Our counters count up, and "count" refers to
@@ -560,7 +599,7 @@ static void cell_cpu_setup(struct op_counter_config *cntr)
        cbe_write_pm(cpu, pm_start_stop, 0);
        cbe_write_pm(cpu, group_control, pm_regs.group_control);
        cbe_write_pm(cpu, debug_bus_control, pm_regs.debug_bus_control);
-       write_pm_cntrl(cpu, &pm_regs.pm_cntrl);
+       write_pm_cntrl(cpu);
 
        for (i = 0; i < num_counters; ++i) {
                if (ctr_enabled & (1 << i)) {
@@ -602,7 +641,7 @@ static void cell_global_start(struct op_counter_config *ctr)
                        }
                }
 
-               cbe_clear_pm_interrupts(cpu);
+               cbe_get_and_clear_pm_interrupts(cpu);
                cbe_enable_pm_interrupts(cpu, hdw_thread, interrupt_mask);
                cbe_enable_pm(cpu);
        }
@@ -672,7 +711,7 @@ cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr)
 
        cbe_disable_pm(cpu);
 
-       interrupt_mask = cbe_clear_pm_interrupts(cpu);
+       interrupt_mask = cbe_get_and_clear_pm_interrupts(cpu);
 
        /* If the interrupt mask has been cleared, then the virt cntr
         * has cleared the interrupt.  When the thread that generated
index 795b713ec9ee5bc6925178509ade409a7adeb494..07cdbcacf1569348a7fffed925225640830e8c3c 100644 (file)
@@ -6,5 +6,5 @@ obj-y                           += mpc52xx_pic.o mpc52xx_common.o
 obj-$(CONFIG_PCI)              += mpc52xx_pci.o
 endif
 
-obj-$(CONFIG_PPC_EFIKA)                += efika-setup.o efika-pci.o
+obj-$(CONFIG_PPC_EFIKA)                += efika.o
 obj-$(CONFIG_PPC_LITE5200)     += lite5200.o
diff --git a/arch/powerpc/platforms/52xx/efika-pci.c b/arch/powerpc/platforms/52xx/efika-pci.c
deleted file mode 100644 (file)
index 62e05b2..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/string.h>
-#include <linux/init.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/prom.h>
-#include <asm/machdep.h>
-#include <asm/sections.h>
-#include <asm/pci-bridge.h>
-#include <asm/rtas.h>
-
-#include "efika.h"
-
-#ifdef CONFIG_PCI
-/*
- * Access functions for PCI config space using RTAS calls.
- */
-static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
-                           int len, u32 * val)
-{
-       struct pci_controller *hose = bus->sysdata;
-       unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-           | (((bus->number - hose->first_busno) & 0xff) << 16)
-           | (hose->index << 24);
-       int ret = -1;
-       int rval;
-
-       rval = rtas_call(rtas_token("read-pci-config"), 2, 2, &ret, addr, len);
-       *val = ret;
-       return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
-}
-
-static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
-                            int offset, int len, u32 val)
-{
-       struct pci_controller *hose = bus->sysdata;
-       unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-           | (((bus->number - hose->first_busno) & 0xff) << 16)
-           | (hose->index << 24);
-       int rval;
-
-       rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
-                        addr, len, val);
-       return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
-}
-
-static struct pci_ops rtas_pci_ops = {
-       rtas_read_config,
-       rtas_write_config
-};
-
-void __init efika_pcisetup(void)
-{
-       const int *bus_range;
-       int len;
-       struct pci_controller *hose;
-       struct device_node *root;
-       struct device_node *pcictrl;
-
-       root = of_find_node_by_path("/");
-       if (root == NULL) {
-               printk(KERN_WARNING EFIKA_PLATFORM_NAME
-                      ": Unable to find the root node\n");
-               return;
-       }
-
-       for (pcictrl = NULL;;) {
-               pcictrl = of_get_next_child(root, pcictrl);
-               if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
-                       break;
-       }
-
-       of_node_put(root);
-
-       if (pcictrl == NULL) {
-               printk(KERN_WARNING EFIKA_PLATFORM_NAME
-                      ": Unable to find the PCI bridge node\n");
-               return;
-       }
-
-       bus_range = get_property(pcictrl, "bus-range", &len);
-       if (bus_range == NULL || len < 2 * sizeof(int)) {
-               printk(KERN_WARNING EFIKA_PLATFORM_NAME
-                      ": Can't get bus-range for %s\n", pcictrl->full_name);
-               return;
-       }
-
-       if (bus_range[1] == bus_range[0])
-               printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
-                      bus_range[0]);
-       else
-               printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
-                      bus_range[0], bus_range[1]);
-       printk(" controlled by %s\n", pcictrl->full_name);
-       printk("\n");
-
-       hose = pcibios_alloc_controller();
-       if (!hose) {
-               printk(KERN_WARNING EFIKA_PLATFORM_NAME
-                      ": Can't allocate PCI controller structure for %s\n",
-                      pcictrl->full_name);
-               return;
-       }
-
-       hose->arch_data = of_node_get(pcictrl);
-       hose->first_busno = bus_range[0];
-       hose->last_busno = bus_range[1];
-       hose->ops = &rtas_pci_ops;
-
-       pci_process_bridge_OF_ranges(hose, pcictrl, 0);
-}
-
-#else
-void __init efika_pcisetup(void)
-{}
-#endif
diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c
deleted file mode 100644 (file)
index 110c980..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * Efika 5K2 platform setup
- * Some code really inspired from the lite5200b platform.
- * 
- * Copyright (C) 2006 bplan GmbH
- *
- * 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/errno.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/reboot.h>
-#include <linux/init.h>
-#include <linux/utsrelease.h>
-#include <linux/seq_file.h>
-#include <linux/root_dev.h>
-#include <linux/initrd.h>
-#include <linux/timer.h>
-#include <linux/pci.h>
-
-#include <asm/pgtable.h>
-#include <asm/prom.h>
-#include <asm/time.h>
-#include <asm/machdep.h>
-#include <asm/rtas.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
-#include <asm/mpc52xx.h>
-
-#include "efika.h"
-
-static void efika_show_cpuinfo(struct seq_file *m)
-{
-       struct device_node *root;
-       const char *revision = NULL;
-       const char *codegendescription = NULL;
-       const char *codegenvendor = NULL;
-
-       root = of_find_node_by_path("/");
-       if (root) {
-               revision = get_property(root, "revision", NULL);
-               codegendescription =
-                   get_property(root, "CODEGEN,description", NULL);
-               codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
-
-               of_node_put(root);
-       }
-
-       if (codegendescription)
-               seq_printf(m, "machine\t\t: %s\n", codegendescription);
-       else
-               seq_printf(m, "machine\t\t: Efika\n");
-
-       if (revision)
-               seq_printf(m, "revision\t: %s\n", revision);
-
-       if (codegenvendor)
-               seq_printf(m, "vendor\t\t: %s\n", codegenvendor);
-
-       of_node_put(root);
-}
-
-static void __init efika_setup_arch(void)
-{
-       rtas_initialize();
-
-#ifdef CONFIG_BLK_DEV_INITRD
-       initrd_below_start_ok = 1;
-
-       if (initrd_start)
-               ROOT_DEV = Root_RAM0;
-       else
-#endif
-               ROOT_DEV = Root_SDA2;   /* sda2 (sda1 is for the kernel) */
-
-       efika_pcisetup();
-
-       if (ppc_md.progress)
-               ppc_md.progress("Linux/PPC " UTS_RELEASE " runnung on Efika ;-)\n", 0x0);
-}
-
-static void __init efika_init(void)
-{
-       struct device_node *np;
-       struct device_node *cnp = NULL;
-       const u32 *base;
-
-       /* Find every child of the SOC node and add it to of_platform */
-       np = of_find_node_by_name(NULL, "builtin");
-       if (np) {
-               char name[BUS_ID_SIZE];
-               while ((cnp = of_get_next_child(np, cnp))) {
-                       strcpy(name, cnp->name);
-
-                       base = get_property(cnp, "reg", NULL);
-                       if (base == NULL)
-                               continue;
-
-                       snprintf(name+strlen(name), BUS_ID_SIZE, "@%x", *base);
-                       of_platform_device_create(cnp, name, NULL);
-
-                       printk(KERN_INFO EFIKA_PLATFORM_NAME" : Added %s (type '%s' at '%s') to the known devices\n", name, cnp->type, cnp->full_name);
-               }
-       }
-
-       if (ppc_md.progress)
-               ppc_md.progress("  Have fun with your Efika!    ", 0x7777);
-}
-
-static int __init efika_probe(void)
-{
-       char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
-                                         "model", NULL);
-
-       if (model == NULL)
-               return 0;
-       if (strcmp(model, "EFIKA5K2"))
-               return 0;
-
-       ISA_DMA_THRESHOLD = ~0L;
-       DMA_MODE_READ = 0x44;
-       DMA_MODE_WRITE = 0x48;
-
-       return 1;
-}
-
-define_machine(efika)
-{
-       .name = EFIKA_PLATFORM_NAME,
-       .probe = efika_probe,
-       .setup_arch = efika_setup_arch,
-       .init = efika_init,
-       .show_cpuinfo = efika_show_cpuinfo,
-       .init_IRQ = mpc52xx_init_irq,
-       .get_irq = mpc52xx_get_irq,
-       .restart = rtas_restart,
-       .power_off = rtas_power_off,
-       .halt = rtas_halt,
-       .set_rtc_time = rtas_set_rtc_time,
-       .get_rtc_time = rtas_get_rtc_time,
-       .progress = rtas_progress,
-       .get_boot_time = rtas_get_boot_time,
-       .calibrate_decr = generic_calibrate_decr,
-       .phys_mem_access_prot = pci_phys_mem_access_prot,
-};
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
new file mode 100644 (file)
index 0000000..8de0341
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * Efika 5K2 platform code
+ * Some code really inspired from the lite5200b platform.
+ *
+ * Copyright (C) 2006 bplan GmbH
+ *
+ * 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/errno.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+#include <linux/utsrelease.h>
+#include <linux/seq_file.h>
+#include <linux/string.h>
+#include <linux/root_dev.h>
+#include <linux/initrd.h>
+#include <linux/timer.h>
+#include <linux/pci.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/sections.h>
+#include <asm/pci-bridge.h>
+#include <asm/pgtable.h>
+#include <asm/prom.h>
+#include <asm/time.h>
+#include <asm/machdep.h>
+#include <asm/rtas.h>
+#include <asm/of_device.h>
+#include <asm/of_platform.h>
+#include <asm/mpc52xx.h>
+
+
+#define EFIKA_PLATFORM_NAME "Efika"
+
+
+/* ------------------------------------------------------------------------ */
+/* PCI accesses thru RTAS                                                   */
+/* ------------------------------------------------------------------------ */
+
+#ifdef CONFIG_PCI
+
+/*
+ * Access functions for PCI config space using RTAS calls.
+ */
+static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
+                           int len, u32 * val)
+{
+       struct pci_controller *hose = bus->sysdata;
+       unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
+           | (((bus->number - hose->first_busno) & 0xff) << 16)
+           | (hose->index << 24);
+       int ret = -1;
+       int rval;
+
+       rval = rtas_call(rtas_token("read-pci-config"), 2, 2, &ret, addr, len);
+       *val = ret;
+       return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
+}
+
+static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
+                            int offset, int len, u32 val)
+{
+       struct pci_controller *hose = bus->sysdata;
+       unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
+           | (((bus->number - hose->first_busno) & 0xff) << 16)
+           | (hose->index << 24);
+       int rval;
+
+       rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
+                        addr, len, val);
+       return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops rtas_pci_ops = {
+       rtas_read_config,
+       rtas_write_config
+};
+
+
+void __init efika_pcisetup(void)
+{
+       const int *bus_range;
+       int len;
+       struct pci_controller *hose;
+       struct device_node *root;
+       struct device_node *pcictrl;
+
+       root = of_find_node_by_path("/");
+       if (root == NULL) {
+               printk(KERN_WARNING EFIKA_PLATFORM_NAME
+                      ": Unable to find the root node\n");
+               return;
+       }
+
+       for (pcictrl = NULL;;) {
+               pcictrl = of_get_next_child(root, pcictrl);
+               if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
+                       break;
+       }
+
+       of_node_put(root);
+
+       if (pcictrl == NULL) {
+               printk(KERN_WARNING EFIKA_PLATFORM_NAME
+                      ": Unable to find the PCI bridge node\n");
+               return;
+       }
+
+       bus_range = get_property(pcictrl, "bus-range", &len);
+       if (bus_range == NULL || len < 2 * sizeof(int)) {
+               printk(KERN_WARNING EFIKA_PLATFORM_NAME
+                      ": Can't get bus-range for %s\n", pcictrl->full_name);
+               return;
+       }
+
+       if (bus_range[1] == bus_range[0])
+               printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
+                      bus_range[0]);
+       else
+               printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
+                      bus_range[0], bus_range[1]);
+       printk(" controlled by %s\n", pcictrl->full_name);
+       printk("\n");
+
+       hose = pcibios_alloc_controller();
+       if (!hose) {
+               printk(KERN_WARNING EFIKA_PLATFORM_NAME
+                      ": Can't allocate PCI controller structure for %s\n",
+                      pcictrl->full_name);
+               return;
+       }
+
+       hose->arch_data = of_node_get(pcictrl);
+       hose->first_busno = bus_range[0];
+       hose->last_busno = bus_range[1];
+       hose->ops = &rtas_pci_ops;
+
+       pci_process_bridge_OF_ranges(hose, pcictrl, 0);
+}
+
+#else
+void __init efika_pcisetup(void)
+{}
+#endif
+
+
+
+/* ------------------------------------------------------------------------ */
+/* Platform setup                                                           */
+/* ------------------------------------------------------------------------ */
+
+static void efika_show_cpuinfo(struct seq_file *m)
+{
+       struct device_node *root;
+       const char *revision = NULL;
+       const char *codegendescription = NULL;
+       const char *codegenvendor = NULL;
+
+       root = of_find_node_by_path("/");
+       if (!root)
+               return;
+
+       revision = get_property(root, "revision", NULL);
+       codegendescription =
+                   get_property(root, "CODEGEN,description", NULL);
+       codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
+
+       if (codegendescription)
+               seq_printf(m, "machine\t\t: %s\n", codegendescription);
+       else
+               seq_printf(m, "machine\t\t: Efika\n");
+
+       if (revision)
+               seq_printf(m, "revision\t: %s\n", revision);
+
+       if (codegenvendor)
+               seq_printf(m, "vendor\t\t: %s\n", codegenvendor);
+
+       of_node_put(root);
+}
+
+static void __init efika_setup_arch(void)
+{
+       rtas_initialize();
+
+#ifdef CONFIG_BLK_DEV_INITRD
+       initrd_below_start_ok = 1;
+
+       if (initrd_start)
+               ROOT_DEV = Root_RAM0;
+       else
+#endif
+               ROOT_DEV = Root_SDA2;   /* sda2 (sda1 is for the kernel) */
+
+       efika_pcisetup();
+
+       if (ppc_md.progress)
+               ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
+}
+
+static int __init efika_probe(void)
+{
+       char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
+                                         "model", NULL);
+
+       if (model == NULL)
+               return 0;
+       if (strcmp(model, "EFIKA5K2"))
+               return 0;
+
+       ISA_DMA_THRESHOLD = ~0L;
+       DMA_MODE_READ = 0x44;
+       DMA_MODE_WRITE = 0x48;
+
+       return 1;
+}
+
+define_machine(efika)
+{
+       .name                   = EFIKA_PLATFORM_NAME,
+       .probe                  = efika_probe,
+       .setup_arch             = efika_setup_arch,
+       .init                   = mpc52xx_declare_of_platform_devices,
+       .show_cpuinfo           = efika_show_cpuinfo,
+       .init_IRQ               = mpc52xx_init_irq,
+       .get_irq                = mpc52xx_get_irq,
+       .restart                = rtas_restart,
+       .power_off              = rtas_power_off,
+       .halt                   = rtas_halt,
+       .set_rtc_time           = rtas_set_rtc_time,
+       .get_rtc_time           = rtas_get_rtc_time,
+       .progress               = rtas_progress,
+       .get_boot_time          = rtas_get_boot_time,
+       .calibrate_decr         = generic_calibrate_decr,
+       .phys_mem_access_prot   = pci_phys_mem_access_prot,
+};
+
diff --git a/arch/powerpc/platforms/52xx/efika.h b/arch/powerpc/platforms/52xx/efika.h
deleted file mode 100644 (file)
index 2f060fd..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Efika 5K2 platform setup - Header file
- *
- * Copyright (C) 2006 bplan GmbH
- *
- * 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.
- *
- */
-
-#ifndef __ARCH_POWERPC_EFIKA__
-#define __ARCH_POWERPC_EFIKA__
-
-#define EFIKA_PLATFORM_NAME "Efika"
-
-extern void __init efika_pcisetup(void);
-
-#endif
index cdb16bfa6ca67976cc7dfba0499ef4b6839ffc55..cc3b40de21ddf8ef3351694d593568be95601b2a 100644 (file)
  */
 
 static void __init
-lite52xx_setup_cpu(void)
+lite5200_setup_cpu(void)
 {
        struct mpc52xx_gpio __iomem *gpio;
        u32 port_config;
 
        /* Map zones */
-       gpio = mpc52xx_find_and_map("mpc52xx-gpio");
+       gpio = mpc52xx_find_and_map("mpc5200-gpio");
        if (!gpio) {
                printk(KERN_ERR __FILE__ ": "
                        "Error while mapping GPIO register for port config. "
@@ -85,12 +85,12 @@ error:
        iounmap(gpio);
 }
 
-static void __init lite52xx_setup_arch(void)
+static void __init lite5200_setup_arch(void)
 {
        struct device_node *np;
 
        if (ppc_md.progress)
-               ppc_md.progress("lite52xx_setup_arch()", 0);
+               ppc_md.progress("lite5200_setup_arch()", 0);
 
        np = of_find_node_by_type(NULL, "cpu");
        if (np) {
@@ -105,7 +105,7 @@ static void __init lite52xx_setup_arch(void)
 
        /* CPU & Port mux setup */
        mpc52xx_setup_cpu();    /* Generic */
-       lite52xx_setup_cpu();   /* Platorm specific */
+       lite5200_setup_cpu();   /* Platorm specific */
 
 #ifdef CONFIG_PCI
        np = of_find_node_by_type(np, "pci");
@@ -126,7 +126,7 @@ static void __init lite52xx_setup_arch(void)
 
 }
 
-void lite52xx_show_cpuinfo(struct seq_file *m)
+void lite5200_show_cpuinfo(struct seq_file *m)
 {
        struct device_node* np = of_find_all_nodes(NULL);
        const char *model = NULL;
@@ -143,25 +143,26 @@ void lite52xx_show_cpuinfo(struct seq_file *m)
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
-static int __init lite52xx_probe(void)
+static int __init lite5200_probe(void)
 {
        unsigned long node = of_get_flat_dt_root();
        const char *model = of_get_flat_dt_prop(node, "model", NULL);
 
-       if (!of_flat_dt_is_compatible(node, "lite52xx"))
+       if (!of_flat_dt_is_compatible(node, "fsl,lite5200") &&
+           !of_flat_dt_is_compatible(node, "fsl,lite5200b"))
                return 0;
-       pr_debug("%s board w/ mpc52xx found\n", model ? model : "unknown");
+       pr_debug("%s board found\n", model ? model : "unknown");
 
        return 1;
 }
 
-define_machine(lite52xx) {
-       .name           = "lite52xx",
-       .probe          = lite52xx_probe,
-       .setup_arch     = lite52xx_setup_arch,
+define_machine(lite5200) {
+       .name           = "lite5200",
+       .probe          = lite5200_probe,
+       .setup_arch     = lite5200_setup_arch,
        .init           = mpc52xx_declare_of_platform_devices,
        .init_IRQ       = mpc52xx_init_irq,
        .get_irq        = mpc52xx_get_irq,
-       .show_cpuinfo   = lite52xx_show_cpuinfo,
+       .show_cpuinfo   = lite5200_show_cpuinfo,
        .calibrate_decr = generic_calibrate_decr,
 };
index cc40889074bd1f6c88e07a619f40186a047546d3..ed0cb694aea878692e329f941e7ce40aaf0d7a1d 100644 (file)
@@ -83,8 +83,8 @@ mpc52xx_setup_cpu(void)
        struct mpc52xx_xlb  __iomem *xlb;
 
        /* Map zones */
-       cdm = mpc52xx_find_and_map("mpc52xx-cdm");
-       xlb = mpc52xx_find_and_map("mpc52xx-xlb");
+       cdm = mpc52xx_find_and_map("mpc5200-cdm");
+       xlb = mpc52xx_find_and_map("mpc5200-xlb");
 
        if (!cdm || !xlb) {
                printk(KERN_ERR __FILE__ ": "
index cd91a6c3aafa5b90edaaf0cf5c07f1e96871713b..c75192567e5573e2292dfb98f4fc7f433552e1d1 100644 (file)
@@ -383,16 +383,16 @@ void __init mpc52xx_init_irq(void)
        struct device_node *picnode;
 
        /* Remap the necessary zones */
-       picnode = of_find_compatible_node(NULL, NULL, "mpc52xx-pic");
+       picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
 
-       intr = mpc52xx_find_and_map("mpc52xx-pic");
+       intr = mpc52xx_find_and_map("mpc5200-pic");
        if (!intr)
-               panic(__FILE__  ": find_and_map failed on 'mpc52xx-pic'. "
+               panic(__FILE__  ": find_and_map failed on 'mpc5200-pic'. "
                                "Check node !");
 
-       sdma = mpc52xx_find_and_map("mpc52xx-bestcomm");
+       sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
        if (!sdma)
-               panic(__FILE__  ": find_and_map failed on 'mpc52xx-bestcomm'. "
+               panic(__FILE__  ": find_and_map failed on 'mpc5200-bestcomm'. "
                                "Check node !");
 
        /* Disable all interrupt sources. */
index edcd5b875b6699e8a3f2f8dc21c63f541d37eae1..1aea1e69ff31c3ac562326d4a4e4900afa1d1a8c 100644 (file)
@@ -3,7 +3,13 @@ menu "Platform support"
 
 choice
        prompt "Machine Type"
-       default MPC834x_SYS
+       default MPC834x_MDS
+
+config MPC8313_RDB
+       bool "Freescale MPC8313 RDB"
+       select DEFAULT_UIMAGE
+       help
+         This option enables support for the MPC8313 RDB board.
 
 config MPC832x_MDS
        bool "Freescale MPC832x MDS"
@@ -12,13 +18,13 @@ config MPC832x_MDS
        help
          This option enables support for the MPC832x MDS evaluation board.
 
-config MPC834x_SYS
-       bool "Freescale MPC834x SYS"
+config MPC834x_MDS
+       bool "Freescale MPC834x MDS"
        select DEFAULT_UIMAGE
        help
-         This option enables support for the MPC 834x SYS evaluation board.
+         This option enables support for the MPC 834x MDS evaluation board.
 
-         Be aware that PCI buses can only function when SYS board is plugged
+         Be aware that PCI buses can only function when MDS board is plugged
          into the PIB (Platform IO Board) board from Freescale which provide
          3 PCI slots.  The PIBs PCI initialization is the bootloader's
          responsibility.
@@ -41,6 +47,12 @@ config MPC8360E_PB
 
 endchoice
 
+config PPC_MPC831x
+       bool
+       select PPC_UDBG_16550
+       select PPC_INDIRECT_PCI
+       default y if MPC8313_RDB
+
 config PPC_MPC832x
        bool
        select PPC_UDBG_16550
@@ -51,7 +63,7 @@ config MPC834x
        bool
        select PPC_UDBG_16550
        select PPC_INDIRECT_PCI
-       default y if MPC834x_SYS || MPC834x_ITX
+       default y if MPC834x_MDS || MPC834x_ITX
 
 config PPC_MPC836x
        bool
index f1aa7e24a9382de1f18153dca7ce5a4da2c305fe..6c8199c4c38214c1da86b58f77137b39486a1b99 100644 (file)
@@ -3,7 +3,8 @@
 #
 obj-y                          := misc.o
 obj-$(CONFIG_PCI)              += pci.o
-obj-$(CONFIG_MPC834x_SYS)      += mpc834x_sys.o
+obj-$(CONFIG_MPC8313_RDB)      += mpc8313_rdb.o
+obj-$(CONFIG_MPC834x_MDS)      += mpc834x_mds.o
 obj-$(CONFIG_MPC834x_ITX)      += mpc834x_itx.o
 obj-$(CONFIG_MPC8360E_PB)      += mpc8360e_pb.o
 obj-$(CONFIG_MPC832x_MDS)      += mpc832x_mds.o
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
new file mode 100644 (file)
index 0000000..c3b98c3
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * arch/powerpc/platforms/83xx/mpc8313_rdb.c
+ *
+ * Description: MPC8313x RDB board specific routines.
+ * This file is based on mpc834x_sys.c
+ * Author: Lo Wlison <r43300@freescale.com>
+ *
+ * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
+ *
+ * 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/pci.h>
+
+#include <asm/time.h>
+#include <asm/ipic.h>
+#include <asm/udbg.h>
+
+#include "mpc83xx.h"
+
+#undef DEBUG
+#ifdef DEBUG
+#define DBG(fmt...) udbg_printf(fmt)
+#else
+#define DBG(fmt...)
+#endif
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+#endif
+
+/* ************************************************************************
+ *
+ * Setup the architecture
+ *
+ */
+static void __init mpc8313_rdb_setup_arch(void)
+{
+       struct device_node *np;
+
+       if (ppc_md.progress)
+               ppc_md.progress("mpc8313_rdb_setup_arch()", 0);
+
+#ifdef CONFIG_PCI
+       for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
+               add_bridge(np);
+
+       ppc_md.pci_exclude_device = mpc83xx_exclude_device;
+#endif
+}
+
+void __init mpc8313_rdb_init_IRQ(void)
+{
+       struct device_node *np;
+
+       np = of_find_node_by_type(NULL, "ipic");
+       if (!np)
+               return;
+
+       ipic_init(np, 0);
+
+       /* Initialize the default interrupt mapping priorities,
+        * in case the boot rom changed something on us.
+        */
+       ipic_set_default_priority();
+}
+
+/*
+ * Called very early, MMU is off, device-tree isn't unflattened
+ */
+static int __init mpc8313_rdb_probe(void)
+{
+       char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
+                                         "model", NULL);
+       if (model == NULL)
+               return 0;
+       if (strcmp(model, "MPC8313ERDB"))
+               return 0;
+
+       DBG("MPC8313 RDB found\n");
+
+       return 1;
+}
+
+define_machine(mpc8313_rdb) {
+       .name                   = "MPC8313 RDB",
+       .probe                  = mpc8313_rdb_probe,
+       .setup_arch             = mpc8313_rdb_setup_arch,
+       .init_IRQ               = mpc8313_rdb_init_IRQ,
+       .get_irq                = ipic_get_irq,
+       .restart                = mpc83xx_restart,
+       .time_init              = mpc83xx_time_init,
+       .calibrate_decr         = generic_calibrate_decr,
+       .progress               = udbg_progress,
+};
index 2446dea9407ec17a1a83b90ce225e62389bbe16b..443a3172f370f96295f751e8baafbaddeb9a6acc 100644 (file)
@@ -38,8 +38,6 @@
 
 #include "mpc83xx.h"
 
-#include <platforms/83xx/mpc834x_sys.h>
-
 #ifndef CONFIG_PCI
 unsigned long isa_io_base = 0;
 unsigned long isa_mem_base = 0;
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
new file mode 100644 (file)
index 0000000..d2736da
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * arch/powerpc/platforms/83xx/mpc834x_mds.c
+ *
+ * MPC834x MDS board specific routines
+ *
+ * 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/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+
+#include <asm/system.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/irq.h>
+#include <asm/prom.h>
+#include <asm/udbg.h>
+#include <sysdev/fsl_soc.h>
+
+#include "mpc83xx.h"
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+#endif
+
+#define BCSR5_INT_USB          0x02
+/* Note: This is only for PB, not for PB+PIB
+ * On PB only port0 is connected using ULPI */
+static int mpc834x_usb_cfg(void)
+{
+       unsigned long sccr, sicrl;
+       void __iomem *immap;
+       void __iomem *bcsr_regs = NULL;
+       u8 bcsr5;
+       struct device_node *np = NULL;
+       int port0_is_dr = 0;
+
+       if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL)
+               port0_is_dr = 1;
+       if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL){
+               if (port0_is_dr) {
+                       printk(KERN_WARNING
+                               "There is only one USB port on PB board! \n");
+                       return -1;
+               } else if (!port0_is_dr)
+                       /* No usb port enabled */
+                       return -1;
+       }
+
+       immap = ioremap(get_immrbase(), 0x1000);
+       if (!immap)
+               return -1;
+
+       /* Configure clock */
+       sccr = in_be32(immap + MPC83XX_SCCR_OFFS);
+       if (port0_is_dr)
+               sccr |= MPC83XX_SCCR_USB_DRCM_11;  /* 1:3 */
+       else
+               sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
+       out_be32(immap + MPC83XX_SCCR_OFFS, sccr);
+
+       /* Configure Pin */
+       sicrl = in_be32(immap + MPC83XX_SICRL_OFFS);
+       /* set port0 only */
+       if (port0_is_dr)
+               sicrl |= MPC83XX_SICRL_USB0;
+       else
+               sicrl &= ~(MPC83XX_SICRL_USB0);
+       out_be32(immap + MPC83XX_SICRL_OFFS, sicrl);
+
+       iounmap(immap);
+
+       /* Map BCSR area */
+       np = of_find_node_by_name(NULL, "bcsr");
+       if (np != 0) {
+               struct resource res;
+
+               of_address_to_resource(np, 0, &res);
+               bcsr_regs = ioremap(res.start, res.end - res.start + 1);
+               of_node_put(np);
+       }
+       if (!bcsr_regs)
+               return -1;
+
+       /*
+        * if MDS board is plug into PIB board,
+        * force to use the PHY on MDS board
+        */
+       bcsr5 = in_8(bcsr_regs + 5);
+       if (!(bcsr5 & BCSR5_INT_USB))
+               out_8(bcsr_regs + 5, (bcsr5 | BCSR5_INT_USB));
+       iounmap(bcsr_regs);
+       return 0;
+}
+
+/* ************************************************************************
+ *
+ * Setup the architecture
+ *
+ */
+static void __init mpc834x_mds_setup_arch(void)
+{
+       struct device_node *np;
+
+       if (ppc_md.progress)
+               ppc_md.progress("mpc834x_mds_setup_arch()", 0);
+
+       np = of_find_node_by_type(NULL, "cpu");
+       if (np != 0) {
+               const unsigned int *fp =
+                       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);
+
+       ppc_md.pci_exclude_device = mpc83xx_exclude_device;
+#endif
+
+       mpc834x_usb_cfg();
+
+#ifdef  CONFIG_ROOT_NFS
+       ROOT_DEV = Root_NFS;
+#else
+       ROOT_DEV = Root_HDA1;
+#endif
+}
+
+static void __init mpc834x_mds_init_IRQ(void)
+{
+       struct device_node *np;
+
+       np = of_find_node_by_type(NULL, "ipic");
+       if (!np)
+               return;
+
+       ipic_init(np, 0);
+
+       /* Initialize the default interrupt mapping priorities,
+        * in case the boot rom changed something on us.
+        */
+       ipic_set_default_priority();
+}
+
+#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
+extern ulong ds1374_get_rtc_time(void);
+extern int ds1374_set_rtc_time(ulong);
+
+static int __init mpc834x_rtc_hookup(void)
+{
+       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) ();
+       do_settimeofday(&tv);
+
+       return 0;
+}
+
+late_initcall(mpc834x_rtc_hookup);
+#endif
+
+/*
+ * Called very early, MMU is off, device-tree isn't unflattened
+ */
+static int __init mpc834x_mds_probe(void)
+{
+       /* We always match for now, eventually we should look at the flat
+          dev tree to ensure this is the board we are suppose to run on
+       */
+       return 1;
+}
+
+define_machine(mpc834x_mds) {
+       .name                   = "MPC834x MDS",
+       .probe                  = mpc834x_mds_probe,
+       .setup_arch             = mpc834x_mds_setup_arch,
+       .init_IRQ               = mpc834x_mds_init_IRQ,
+       .get_irq                = ipic_get_irq,
+       .restart                = mpc83xx_restart,
+       .time_init              = mpc83xx_time_init,
+       .calibrate_decr         = generic_calibrate_decr,
+       .progress               = udbg_progress,
+};
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c
deleted file mode 100644 (file)
index f30393f..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * arch/powerpc/platforms/83xx/mpc834x_sys.c
- *
- * MPC834x SYS board specific routines
- *
- * 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/stddef.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/reboot.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/root_dev.h>
-
-#include <asm/system.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/irq.h>
-#include <asm/prom.h>
-#include <asm/udbg.h>
-#include <sysdev/fsl_soc.h>
-
-#include "mpc83xx.h"
-
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
-/* ************************************************************************
- *
- * Setup the architecture
- *
- */
-static void __init mpc834x_sys_setup_arch(void)
-{
-       struct device_node *np;
-
-       if (ppc_md.progress)
-               ppc_md.progress("mpc834x_sys_setup_arch()", 0);
-
-       np = of_find_node_by_type(NULL, "cpu");
-       if (np != 0) {
-               const unsigned int *fp =
-                       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);
-
-       ppc_md.pci_exclude_device = mpc83xx_exclude_device;
-#endif
-
-#ifdef  CONFIG_ROOT_NFS
-       ROOT_DEV = Root_NFS;
-#else
-       ROOT_DEV = Root_HDA1;
-#endif
-}
-
-static void __init mpc834x_sys_init_IRQ(void)
-{
-       struct device_node *np;
-
-       np = of_find_node_by_type(NULL, "ipic");
-       if (!np)
-               return;
-
-       ipic_init(np, 0);
-
-       /* Initialize the default interrupt mapping priorities,
-        * in case the boot rom changed something on us.
-        */
-       ipic_set_default_priority();
-}
-
-#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
-extern ulong ds1374_get_rtc_time(void);
-extern int ds1374_set_rtc_time(ulong);
-
-static int __init mpc834x_rtc_hookup(void)
-{
-       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) ();
-       do_settimeofday(&tv);
-
-       return 0;
-}
-
-late_initcall(mpc834x_rtc_hookup);
-#endif
-
-/*
- * Called very early, MMU is off, device-tree isn't unflattened
- */
-static int __init mpc834x_sys_probe(void)
-{
-       /* We always match for now, eventually we should look at the flat
-          dev tree to ensure this is the board we are suppose to run on
-       */
-       return 1;
-}
-
-define_machine(mpc834x_sys) {
-       .name                   = "MPC834x SYS",
-       .probe                  = mpc834x_sys_probe,
-       .setup_arch             = mpc834x_sys_setup_arch,
-       .init_IRQ               = mpc834x_sys_init_IRQ,
-       .get_irq                = ipic_get_irq,
-       .restart                = mpc83xx_restart,
-       .time_init              = mpc83xx_time_init,
-       .calibrate_decr         = generic_calibrate_decr,
-       .progress               = udbg_progress,
-};
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h
deleted file mode 100644 (file)
index 7d5bbef..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * arch/powerpc/platforms/83xx/mpc834x_sys.h
- *
- * MPC834X SYS common board definitions
- *
- * 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.
- *
- */
-
-#ifndef __MACH_MPC83XX_SYS_H__
-#define __MACH_MPC83XX_SYS_H__
-
-#define PIRQA  MPC83xx_IRQ_EXT4
-#define PIRQB  MPC83xx_IRQ_EXT5
-#define PIRQC  MPC83xx_IRQ_EXT6
-#define PIRQD  MPC83xx_IRQ_EXT7
-
-#endif                         /* __MACH_MPC83XX_SYS_H__ */
index 01cae106912bec714d4df34105c3305971970554..9cd03b59c8f4796a177e8df9801a03cd09d02c5e 100644 (file)
@@ -4,6 +4,24 @@
 #include <linux/init.h>
 #include <linux/device.h>
 
+/* System Clock Control Register */
+#define MPC83XX_SCCR_OFFS          0xA08
+#define MPC83XX_SCCR_USB_MPHCM_11  0x00c00000
+#define MPC83XX_SCCR_USB_MPHCM_01  0x00400000
+#define MPC83XX_SCCR_USB_MPHCM_10  0x00800000
+#define MPC83XX_SCCR_USB_DRCM_11   0x00300000
+#define MPC83XX_SCCR_USB_DRCM_01   0x00100000
+#define MPC83XX_SCCR_USB_DRCM_10   0x00200000
+
+/* system i/o configuration register low */
+#define MPC83XX_SICRL_OFFS         0x114
+#define MPC83XX_SICRL_USB0         0x40000000
+#define MPC83XX_SICRL_USB1         0x20000000
+
+/* system i/o configuration register high */
+#define MPC83XX_SICRH_OFFS         0x118
+#define MPC83XX_SICRH_USB_UTMI     0x00020000
+
 /*
  * Declaration for the various functions exported by the
  * mpc83xx_* files. Mostly for use by mpc83xx_setup
index 0584f3c7e8844559d2ad15622c571fe8cf2cfb68..0efdd2f1babe382bfdae1cd4d6f240c7895215fe 100644 (file)
@@ -23,6 +23,13 @@ config MPC85xx_CDS
        help
          This option enables support for the MPC85xx CDS board
 
+config MPC8568_MDS
+       bool "Freescale MPC8568 MDS"
+       select DEFAULT_UIMAGE
+#      select QUICC_ENGINE
+       help
+         This option enables support for the MPC8568 MDS board
+
 endchoice
 
 config MPC8540
@@ -36,6 +43,12 @@ config MPC8560
        select PPC_INDIRECT_PCI
        default y if MPC8560_ADS
 
+config MPC85xx
+       bool
+       select PPC_UDBG_16550
+       select PPC_INDIRECT_PCI
+       default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC8568_MDS
+
 config PPC_INDIRECT_PCI_BE
        bool
        depends on PPC_85xx
index 282f5d0d01520a4a83b78b378283e352803d7e5d..e40e521816b8147a1d4e508ee137d69360e94f7e 100644 (file)
@@ -5,3 +5,4 @@ obj-$(CONFIG_PPC_85xx)  += misc.o pci.o
 obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
 obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
 obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
+obj-$(CONFIG_MPC8568_MDS) += mpc8568_mds.o
diff --git a/arch/powerpc/platforms/85xx/mpc8568_mds.c b/arch/powerpc/platforms/85xx/mpc8568_mds.c
new file mode 100644 (file)
index 0000000..0861d11
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+ * Copyright (C) Freescale Semicondutor, Inc. 2006-2007. All rights reserved.
+ *
+ * Author: Andy Fleming <afleming@freescale.com>
+ *
+ * Based on 83xx/mpc8360e_pb.c by:
+ *        Li Yang <LeoLi@freescale.com>
+ *        Yin Olivia <Hong-hua.Yin@freescale.com>
+ *
+ * Description:
+ * MPC8568E MDS PB board specific routines.
+ *
+ * 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/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+#include <linux/initrd.h>
+#include <linux/module.h>
+#include <linux/fsl_devices.h>
+
+#include <asm/of_device.h>
+#include <asm/of_platform.h>
+#include <asm/system.h>
+#include <asm/atomic.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/bootinfo.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <mm/mmu_decl.h>
+#include <asm/prom.h>
+#include <asm/udbg.h>
+#include <sysdev/fsl_soc.h>
+#include <asm/qe.h>
+#include <asm/qe_ic.h>
+#include <asm/mpic.h>
+
+#include "mpc85xx.h"
+
+#undef DEBUG
+#ifdef DEBUG
+#define DBG(fmt...) udbg_printf(fmt)
+#else
+#define DBG(fmt...)
+#endif
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+#endif
+
+/* ************************************************************************
+ *
+ * Setup the architecture
+ *
+ */
+static void __init mpc8568_mds_setup_arch(void)
+{
+       struct device_node *np;
+       static u8 *bcsr_regs = NULL;
+
+
+       if (ppc_md.progress)
+               ppc_md.progress("mpc8568_mds_setup_arch()", 0);
+
+       np = of_find_node_by_type(NULL, "cpu");
+       if (np != NULL) {
+               const unsigned int *fp =
+                   get_property(np, "clock-frequency", NULL);
+               if (fp != NULL)
+                       loops_per_jiffy = *fp / HZ;
+               else
+                       loops_per_jiffy = 50000000 / HZ;
+               of_node_put(np);
+       }
+
+       /* Map BCSR area */
+       np = of_find_node_by_name(NULL, "bcsr");
+       if (np != NULL) {
+               struct resource res;
+
+               of_address_to_resource(np, 0, &res);
+               bcsr_regs = ioremap(res.start, res.end - res.start +1);
+               of_node_put(np);
+       }
+
+#ifdef CONFIG_PCI
+       for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
+               add_bridge(np);
+       }
+       of_node_put(np);
+#endif
+
+#ifdef CONFIG_QUICC_ENGINE
+       if ((np = of_find_node_by_name(NULL, "qe")) != NULL) {
+               qe_reset();
+               of_node_put(np);
+       }
+
+       if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
+               struct device_node *ucc = NULL;
+
+               par_io_init(np);
+               of_node_put(np);
+
+               for ( ;(ucc = of_find_node_by_name(ucc, "ucc")) != NULL;)
+                       par_io_of_config(ucc);
+
+               of_node_put(ucc);
+       }
+
+       if (bcsr_regs) {
+               u8 bcsr_phy;
+
+               /* Reset the Ethernet PHY */
+               bcsr_phy = in_be8(&bcsr_regs[9]);
+               bcsr_phy &= ~0x20;
+               out_be8(&bcsr_regs[9], bcsr_phy);
+
+               udelay(1000);
+
+               bcsr_phy = in_be8(&bcsr_regs[9]);
+               bcsr_phy |= 0x20;
+               out_be8(&bcsr_regs[9], bcsr_phy);
+
+               iounmap(bcsr_regs);
+       }
+
+#endif /* CONFIG_QUICC_ENGINE */
+}
+
+static struct of_device_id mpc8568_ids[] = {
+       { .type = "soc", },
+       { .compatible = "soc", },
+       { .type = "qe", },
+       {},
+};
+
+static int __init mpc8568_publish_devices(void)
+{
+       if (!machine_is(mpc8568_mds))
+               return 0;
+
+       /* Publish the QE devices */
+       of_platform_bus_probe(NULL,mpc8568_ids,NULL);
+
+       return 0;
+}
+device_initcall(mpc8568_publish_devices);
+
+static void __init mpc8568_mds_pic_init(void)
+{
+       struct mpic *mpic;
+       struct resource r;
+       struct device_node *np = NULL;
+
+       np = of_find_node_by_type(NULL, "open-pic");
+       if (!np)
+               return;
+
+       if (of_address_to_resource(np, 0, &r)) {
+               printk(KERN_ERR "Failed to map mpic register space\n");
+               of_node_put(np);
+               return;
+       }
+
+       mpic = mpic_alloc(np, r.start,
+                       MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
+                       4, 0, " OpenPIC  ");
+       BUG_ON(mpic == NULL);
+       of_node_put(np);
+
+       /* Internal Interrupts */
+       mpic_assign_isu(mpic, 0, r.start + 0x10200);
+       mpic_assign_isu(mpic, 1, r.start + 0x10280);
+       mpic_assign_isu(mpic, 2, r.start + 0x10300);
+       mpic_assign_isu(mpic, 3, r.start + 0x10380);
+       mpic_assign_isu(mpic, 4, r.start + 0x10400);
+       mpic_assign_isu(mpic, 5, r.start + 0x10480);
+       mpic_assign_isu(mpic, 6, r.start + 0x10500);
+       mpic_assign_isu(mpic, 7, r.start + 0x10580);
+       mpic_assign_isu(mpic, 8, r.start + 0x10600);
+       mpic_assign_isu(mpic, 9, r.start + 0x10680);
+       mpic_assign_isu(mpic, 10, r.start + 0x10700);
+       mpic_assign_isu(mpic, 11, r.start + 0x10780);
+
+       /* External Interrupts */
+       mpic_assign_isu(mpic, 12, r.start + 0x10000);
+       mpic_assign_isu(mpic, 13, r.start + 0x10080);
+       mpic_assign_isu(mpic, 14, r.start + 0x10100);
+
+       mpic_init(mpic);
+
+
+#ifdef CONFIG_QUICC_ENGINE
+       np = of_find_node_by_type(NULL, "qeic");
+       if (!np)
+               return;
+
+       qe_ic_init(np, 0);
+       of_node_put(np);
+#endif                         /* CONFIG_QUICC_ENGINE */
+}
+
+
+static int __init mpc8568_mds_probe(void)
+{
+       char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
+                                         "model", NULL);
+       if (model == NULL)
+               return 0;
+       if (strcmp(model, "MPC8568EMDS"))
+               return 0;
+
+       DBG("MPC8568EMDS found\n");
+
+       return 1;
+}
+
+
+define_machine(mpc8568_mds) {
+       .name           = "MPC8568E MDS",
+       .probe          = mpc8568_mds_probe,
+       .setup_arch     = mpc8568_mds_setup_arch,
+       .init_IRQ       = mpc8568_mds_pic_init,
+       .get_irq        = mpic_get_irq,
+       .restart        = mpc85xx_restart,
+       .calibrate_decr = generic_calibrate_decr,
+       .progress       = udbg_progress,
+};
index bda2e55e6c4c1db7e5f84eadd8a2c18d18682894..c56fce57621c1cb5c943fbfeb94de26c8c3e1cd8 100644 (file)
@@ -45,8 +45,7 @@ unsigned long isa_mem_base = 0;
 #endif
 
 #ifdef CONFIG_PCI
-int
-mpc85xx_exclude_device(u_char bus, u_char devfn)
+static int mpc85xx_exclude_device(u_char bus, u_char devfn)
 {
        if (bus == 0 && PCI_SLOT(devfn) == 0)
                return PCIBIOS_DEVICE_NOT_FOUND;
@@ -69,7 +68,7 @@ static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
 
 #endif /* CONFIG_CPM2 */
 
-void __init mpc85xx_ads_pic_init(void)
+static void __init mpc85xx_ads_pic_init(void)
 {
        struct mpic *mpic;
        struct resource r;
@@ -254,7 +253,7 @@ static void __init mpc85xx_ads_setup_arch(void)
 #endif
 }
 
-void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
+static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
 {
        uint pvid, svid, phid1;
        uint memsize = total_memory;
index 953cd5dd3f54df1fff74edd4c5253e7ec40182b4..abc0aca6de4052760ce9b6204eec9604c0a3cef1 100644 (file)
@@ -56,7 +56,6 @@ unsigned long isa_mem_base = 0;
 static int cds_pci_slot = 2;
 static volatile u8 *cadmus;
 
-
 #ifdef CONFIG_PCI
 
 #define ARCADIA_HOST_BRIDGE_IDSEL      17
@@ -64,8 +63,7 @@ static volatile u8 *cadmus;
 
 extern int mpc85xx_pci2_busno;
 
-int
-mpc85xx_exclude_device(u_char bus, u_char devfn)
+static int mpc85xx_exclude_device(u_char bus, u_char devfn)
 {
        if (bus == 0 && PCI_SLOT(devfn) == 0)
                return PCIBIOS_DEVICE_NOT_FOUND;
@@ -81,8 +79,7 @@ mpc85xx_exclude_device(u_char bus, u_char devfn)
                return PCIBIOS_SUCCESSFUL;
 }
 
-void __init
-mpc85xx_cds_pcibios_fixup(void)
+static void __init mpc85xx_cds_pcibios_fixup(void)
 {
        struct pci_dev *dev;
        u_char          c;
@@ -144,7 +141,7 @@ static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
 #endif /* PPC_I8259 */
 #endif /* CONFIG_PCI */
 
-void __init mpc85xx_cds_pic_init(void)
+static void __init mpc85xx_cds_pic_init(void)
 {
        struct mpic *mpic;
        struct resource r;
@@ -224,12 +221,10 @@ void __init mpc85xx_cds_pic_init(void)
 #endif /* CONFIG_PPC_I8259 */
 }
 
-
 /*
  * Setup the architecture
  */
-static void __init
-mpc85xx_cds_setup_arch(void)
+static void __init mpc85xx_cds_setup_arch(void)
 {
        struct device_node *cpu;
 #ifdef CONFIG_PCI
@@ -276,9 +271,7 @@ mpc85xx_cds_setup_arch(void)
 #endif
 }
 
-
-void
-mpc85xx_cds_show_cpuinfo(struct seq_file *m)
+static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
 {
        uint pvid, svid, phid1;
        uint memsize = total_memory;
index 65e612315b9bd6e4f80314a95a8f0a5cd179e046..452004283f1707b31625428f93da4ddc39fcafcf 100644 (file)
@@ -5,9 +5,9 @@ ifeq ($(CONFIG_PPC64),y)
 obj-$(CONFIG_PPC_PMAC)         += powermac/
 endif
 endif
-obj-$(CONFIG_PPC_MPC52xx)      += 52xx/
 obj-$(CONFIG_PPC_CHRP)         += chrp/
 obj-$(CONFIG_4xx)              += 4xx/
+obj-$(CONFIG_PPC_MPC52xx)      += 52xx/
 obj-$(CONFIG_PPC_8xx)          += 8xx/
 obj-$(CONFIG_PPC_82xx)         += 82xx/
 obj-$(CONFIG_PPC_83xx)         += 83xx/
index d04ae1671e6ce5d40f413f820efeb645169d3ba2..66ca4b5a1dbc6cab284962aec94ac9a38f2da189 100644 (file)
@@ -345,18 +345,12 @@ EXPORT_SYMBOL_GPL(cbe_read_trace_buffer);
  * Enabling/disabling interrupts for the entire performance monitoring unit.
  */
 
-u32 cbe_query_pm_interrupts(u32 cpu)
-{
-       return cbe_read_pm(cpu, pm_status);
-}
-EXPORT_SYMBOL_GPL(cbe_query_pm_interrupts);
-
-u32 cbe_clear_pm_interrupts(u32 cpu)
+u32 cbe_get_and_clear_pm_interrupts(u32 cpu)
 {
        /* Reading pm_status clears the interrupt bits. */
-       return cbe_query_pm_interrupts(cpu);
+       return cbe_read_pm(cpu, pm_status);
 }
-EXPORT_SYMBOL_GPL(cbe_clear_pm_interrupts);
+EXPORT_SYMBOL_GPL(cbe_get_and_clear_pm_interrupts);
 
 void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask)
 {
@@ -371,7 +365,7 @@ EXPORT_SYMBOL_GPL(cbe_enable_pm_interrupts);
 
 void cbe_disable_pm_interrupts(u32 cpu)
 {
-       cbe_clear_pm_interrupts(cpu);
+       cbe_get_and_clear_pm_interrupts(cpu);
        cbe_write_pm(cpu, pm_status, 0);
 }
 EXPORT_SYMBOL_GPL(cbe_disable_pm_interrupts);
index d8b39fe39cddc9be1872e5f75fd59ccd2cd3ab23..e34599f53d284250b4174b90f6bbaaa9daab99ba 100644 (file)
@@ -59,63 +59,6 @@ static u64 __init find_spu_unit_number(struct device_node *spe)
        return 0;
 }
 
-static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
-               const char *prop)
-{
-       const struct address_prop {
-               unsigned long address;
-               unsigned int len;
-       } __attribute__((packed)) *p;
-       int proplen;
-
-       unsigned long start_pfn, nr_pages;
-       struct pglist_data *pgdata;
-       struct zone *zone;
-       int ret;
-
-       p = get_property(spe, prop, &proplen);
-       WARN_ON(proplen != sizeof (*p));
-
-       start_pfn = p->address >> PAGE_SHIFT;
-       nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
-
-       pgdata = NODE_DATA(spu->node);
-       zone = pgdata->node_zones;
-
-       ret = __add_pages(zone, start_pfn, nr_pages);
-
-       return ret;
-}
-
-static void __iomem * __init map_spe_prop(struct spu *spu,
-               struct device_node *n, const char *name)
-{
-       const struct address_prop {
-               unsigned long address;
-               unsigned int len;
-       } __attribute__((packed)) *prop;
-
-       const void *p;
-       int proplen;
-       void __iomem *ret = NULL;
-       int err = 0;
-
-       p = get_property(n, name, &proplen);
-       if (proplen != sizeof (struct address_prop))
-               return NULL;
-
-       prop = p;
-
-       err = cell_spuprop_present(spu, n, name);
-       if (err && (err != -EEXIST))
-               goto out;
-
-       ret = ioremap(prop->address, prop->len);
-
- out:
-       return ret;
-}
-
 static void spu_unmap(struct spu *spu)
 {
        if (!firmware_has_feature(FW_FEATURE_LPAR))
@@ -157,6 +100,23 @@ static int __init spu_map_interrupts_old(struct spu *spu,
        return spu->irqs[2] == NO_IRQ ? -EINVAL : 0;
 }
 
+static void __iomem * __init spu_map_prop_old(struct spu *spu,
+                                             struct device_node *n,
+                                             const char *name)
+{
+       const struct address_prop {
+               unsigned long address;
+               unsigned int len;
+       } __attribute__((packed)) *prop;
+       int proplen;
+
+       prop = get_property(n, name, &proplen);
+       if (prop == NULL || proplen != sizeof (struct address_prop))
+               return NULL;
+
+       return ioremap(prop->address, prop->len);
+}
+
 static int __init spu_map_device_old(struct spu *spu)
 {
        struct device_node *node = spu->devnode;
@@ -175,7 +135,7 @@ static int __init spu_map_device_old(struct spu *spu)
 
        /* we use local store as ram, not io memory */
        spu->local_store = (void __force *)
-               map_spe_prop(spu, node, "local-store");
+               spu_map_prop_old(spu, node, "local-store");
        if (!spu->local_store)
                goto out;
 
@@ -184,16 +144,16 @@ static int __init spu_map_device_old(struct spu *spu)
                goto out_unmap;
        spu->problem_phys = *(unsigned long *)prop;
 
-       spu->problem = map_spe_prop(spu, node, "problem");
+       spu->problem = spu_map_prop_old(spu, node, "problem");
        if (!spu->problem)
                goto out_unmap;
 
-       spu->priv2 = map_spe_prop(spu, node, "priv2");
+       spu->priv2 = spu_map_prop_old(spu, node, "priv2");
        if (!spu->priv2)
                goto out_unmap;
 
        if (!firmware_has_feature(FW_FEATURE_LPAR)) {
-               spu->priv1 = map_spe_prop(spu, node, "priv1");
+               spu->priv1 = spu_map_prop_old(spu, node, "priv1");
                if (!spu->priv1)
                        goto out_unmap;
        }
@@ -245,34 +205,20 @@ static int spu_map_resource(struct spu *spu, int nr,
                            void __iomem** virt, unsigned long *phys)
 {
        struct device_node *np = spu->devnode;
-       unsigned long start_pfn, nr_pages;
-       struct pglist_data *pgdata;
-       struct zone *zone;
        struct resource resource = { };
        unsigned long len;
        int ret;
 
        ret = of_address_to_resource(np, nr, &resource);
        if (ret)
-               goto out;
-
+               return ret;
        if (phys)
                *phys = resource.start;
        len = resource.end - resource.start + 1;
        *virt = ioremap(resource.start, len);
        if (!*virt)
-               ret = -EINVAL;
-
-       start_pfn = resource.start >> PAGE_SHIFT;
-       nr_pages = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
-
-       pgdata = NODE_DATA(spu->node);
-       zone = pgdata->node_zones;
-
-       ret = __add_pages(zone, start_pfn, nr_pages);
-
-out:
-       return ret;
+               return -EINVAL;
+       return 0;
 }
 
 static int __init spu_map_device(struct spu *spu)
index 0870009f56db64e7e535bf61c70d393e95684605..04ad2e364e977350643d89087b06e2c5c8163478 100644 (file)
@@ -42,7 +42,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
        }
        spin_lock_init(&ctx->mmio_lock);
        kref_init(&ctx->kref);
-       init_rwsem(&ctx->state_sema);
+       mutex_init(&ctx->state_mutex);
        init_MUTEX(&ctx->run_sema);
        init_waitqueue_head(&ctx->ibox_wq);
        init_waitqueue_head(&ctx->wbox_wq);
@@ -53,6 +53,10 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
        ctx->owner = get_task_mm(current);
        if (gang)
                spu_gang_add_ctx(gang, ctx);
+       ctx->rt_priority = current->rt_priority;
+       ctx->policy = current->policy;
+       ctx->prio = current->prio;
+       INIT_DELAYED_WORK(&ctx->sched_work, spu_sched_tick);
        goto out;
 out_free:
        kfree(ctx);
@@ -65,9 +69,9 @@ void destroy_spu_context(struct kref *kref)
 {
        struct spu_context *ctx;
        ctx = container_of(kref, struct spu_context, kref);
-       down_write(&ctx->state_sema);
+       mutex_lock(&ctx->state_mutex);
        spu_deactivate(ctx);
-       up_write(&ctx->state_sema);
+       mutex_unlock(&ctx->state_mutex);
        spu_fini_csa(&ctx->csa);
        if (ctx->gang)
                spu_gang_remove_ctx(ctx->gang, ctx);
@@ -96,107 +100,102 @@ void spu_forget(struct spu_context *ctx)
        spu_release(ctx);
 }
 
-void spu_acquire(struct spu_context *ctx)
-{
-       down_read(&ctx->state_sema);
-}
-
-void spu_release(struct spu_context *ctx)
-{
-       up_read(&ctx->state_sema);
-}
-
 void spu_unmap_mappings(struct spu_context *ctx)
 {
        if (ctx->local_store)
                unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
        if (ctx->mfc)
-               unmap_mapping_range(ctx->mfc, 0, 0x4000, 1);
+               unmap_mapping_range(ctx->mfc, 0, 0x1000, 1);
        if (ctx->cntl)
-               unmap_mapping_range(ctx->cntl, 0, 0x4000, 1);
+               unmap_mapping_range(ctx->cntl, 0, 0x1000, 1);
        if (ctx->signal1)
-               unmap_mapping_range(ctx->signal1, 0, 0x4000, 1);
+               unmap_mapping_range(ctx->signal1, 0, PAGE_SIZE, 1);
        if (ctx->signal2)
-               unmap_mapping_range(ctx->signal2, 0, 0x4000, 1);
+               unmap_mapping_range(ctx->signal2, 0, PAGE_SIZE, 1);
+       if (ctx->mss)
+               unmap_mapping_range(ctx->mss, 0, 0x1000, 1);
+       if (ctx->psmap)
+               unmap_mapping_range(ctx->psmap, 0, 0x20000, 1);
 }
 
+/**
+ * spu_acquire_exclusive - lock spu contex and protect against userspace access
+ * @ctx:       spu contex to lock
+ *
+ * Note:
+ *     Returns 0 and with the context locked on success
+ *     Returns negative error and with the context _unlocked_ on failure.
+ */
 int spu_acquire_exclusive(struct spu_context *ctx)
 {
-       int ret = 0;
+       int ret = -EINVAL;
 
-       down_write(&ctx->state_sema);
-       /* ctx is about to be freed, can't acquire any more */
-       if (!ctx->owner) {
-               ret = -EINVAL;
-               goto out;
-       }
+       spu_acquire(ctx);
+       /*
+        * Context is about to be freed, so we can't acquire it anymore.
+        */
+       if (!ctx->owner)
+               goto out_unlock;
 
        if (ctx->state == SPU_STATE_SAVED) {
                ret = spu_activate(ctx, 0);
                if (ret)
-                       goto out;
-               ctx->state = SPU_STATE_RUNNABLE;
+                       goto out_unlock;
        } else {
-               /* We need to exclude userspace access to the context. */
+               /*
+                * We need to exclude userspace access to the context.
+                *
+                * To protect against memory access we invalidate all ptes
+                * and make sure the pagefault handlers block on the mutex.
+                */
                spu_unmap_mappings(ctx);
        }
 
-out:
-       if (ret)
-               up_write(&ctx->state_sema);
+       return 0;
+
+ out_unlock:
+       spu_release(ctx);
        return ret;
 }
 
-int spu_acquire_runnable(struct spu_context *ctx)
+/**
+ * spu_acquire_runnable - lock spu contex and make sure it is in runnable state
+ * @ctx:       spu contex to lock
+ *
+ * Note:
+ *     Returns 0 and with the context locked on success
+ *     Returns negative error and with the context _unlocked_ on failure.
+ */
+int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
 {
-       int ret = 0;
-
-       down_read(&ctx->state_sema);
-       if (ctx->state == SPU_STATE_RUNNABLE) {
-               ctx->spu->prio = current->prio;
-               return 0;
-       }
-       up_read(&ctx->state_sema);
-
-       down_write(&ctx->state_sema);
-       /* ctx is about to be freed, can't acquire any more */
-       if (!ctx->owner) {
-               ret = -EINVAL;
-               goto out;
-       }
+       int ret = -EINVAL;
 
+       spu_acquire(ctx);
        if (ctx->state == SPU_STATE_SAVED) {
-               ret = spu_activate(ctx, 0);
+               /*
+                * Context is about to be freed, so we can't acquire it anymore.
+                */
+               if (!ctx->owner)
+                       goto out_unlock;
+               ret = spu_activate(ctx, flags);
                if (ret)
-                       goto out;
-               ctx->state = SPU_STATE_RUNNABLE;
+                       goto out_unlock;
        }
 
-       downgrade_write(&ctx->state_sema);
-       /* On success, we return holding the lock */
-
-       return ret;
-out:
-       /* Release here, to simplify calling code. */
-       up_write(&ctx->state_sema);
+       return 0;
 
+ out_unlock:
+       spu_release(ctx);
        return ret;
 }
 
+/**
+ * spu_acquire_saved - lock spu contex and make sure it is in saved state
+ * @ctx:       spu contex to lock
+ */
 void spu_acquire_saved(struct spu_context *ctx)
 {
-       down_read(&ctx->state_sema);
-
-       if (ctx->state == SPU_STATE_SAVED)
-               return;
-
-       up_read(&ctx->state_sema);
-       down_write(&ctx->state_sema);
-
-       if (ctx->state == SPU_STATE_RUNNABLE) {
+       spu_acquire(ctx);
+       if (ctx->state != SPU_STATE_SAVED)
                spu_deactivate(ctx);
-               ctx->state = SPU_STATE_SAVED;
-       }
-
-       downgrade_write(&ctx->state_sema);
 }
index af9e9455a70635b1d0552ee539b28f2f1e64e764..b00653d69c01cd654749d9a51231f6db7f258072 100644 (file)
@@ -45,8 +45,8 @@ spufs_mem_open(struct inode *inode, struct file *file)
        struct spufs_inode_info *i = SPUFS_I(inode);
        struct spu_context *ctx = i->i_ctx;
        file->private_data = ctx;
-       file->f_mapping = inode->i_mapping;
        ctx->local_store = inode->i_mapping;
+       smp_wmb();
        return 0;
 }
 
@@ -95,39 +95,38 @@ spufs_mem_write(struct file *file, const char __user *buffer,
        return ret;
 }
 
-static struct page *
-spufs_mem_mmap_nopage(struct vm_area_struct *vma,
-                     unsigned long address, int *type)
+static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma,
+                                         unsigned long address)
 {
-       struct page *page = NOPAGE_SIGBUS;
-
        struct spu_context *ctx = vma->vm_file->private_data;
-       unsigned long offset = address - vma->vm_start;
+       unsigned long pfn, offset = address - vma->vm_start;
+
        offset += vma->vm_pgoff << PAGE_SHIFT;
 
+       if (offset >= LS_SIZE)
+               return NOPFN_SIGBUS;
+
        spu_acquire(ctx);
 
        if (ctx->state == SPU_STATE_SAVED) {
                vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                                        & ~_PAGE_NO_CACHE);
-               page = vmalloc_to_page(ctx->csa.lscsa->ls + offset);
+               pfn = vmalloc_to_pfn(ctx->csa.lscsa->ls + offset);
        } else {
                vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
-                                                       | _PAGE_NO_CACHE);
-               page = pfn_to_page((ctx->spu->local_store_phys + offset)
-                                  >> PAGE_SHIFT);
+                                            | _PAGE_NO_CACHE);
+               pfn = (ctx->spu->local_store_phys + offset) >> PAGE_SHIFT;
        }
-       spu_release(ctx);
+       vm_insert_pfn(vma, address, pfn);
 
-       if (type)
-               *type = VM_FAULT_MINOR;
+       spu_release(ctx);
 
-       page_cache_get(page);
-       return page;
+       return NOPFN_REFAULT;
 }
 
+
 static struct vm_operations_struct spufs_mem_mmap_vmops = {
-       .nopage = spufs_mem_mmap_nopage,
+       .nopfn = spufs_mem_mmap_nopfn,
 };
 
 static int
@@ -136,7 +135,7 @@ spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_SHARED))
                return -EINVAL;
 
-       vma->vm_flags |= VM_IO;
+       vma->vm_flags |= VM_IO | VM_PFNMAP;
        vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                     | _PAGE_NO_CACHE);
 
@@ -152,49 +151,42 @@ static const struct file_operations spufs_mem_fops = {
        .mmap    = spufs_mem_mmap,
 };
 
-static struct page *spufs_ps_nopage(struct vm_area_struct *vma,
+static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
                                    unsigned long address,
-                                   int *type, unsigned long ps_offs,
+                                   unsigned long ps_offs,
                                    unsigned long ps_size)
 {
-       struct page *page = NOPAGE_SIGBUS;
-       int fault_type = VM_FAULT_SIGBUS;
        struct spu_context *ctx = vma->vm_file->private_data;
-       unsigned long offset = address - vma->vm_start;
-       unsigned long area;
+       unsigned long area, offset = address - vma->vm_start;
        int ret;
 
        offset += vma->vm_pgoff << PAGE_SHIFT;
        if (offset >= ps_size)
-               goto out;
+               return NOPFN_SIGBUS;
 
-       ret = spu_acquire_runnable(ctx);
+       /* error here usually means a signal.. we might want to test
+        * the error code more precisely though
+        */
+       ret = spu_acquire_runnable(ctx, 0);
        if (ret)
-               goto out;
+               return NOPFN_REFAULT;
 
        area = ctx->spu->problem_phys + ps_offs;
-       page = pfn_to_page((area + offset) >> PAGE_SHIFT);
-       fault_type = VM_FAULT_MINOR;
-       page_cache_get(page);
-
+       vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
        spu_release(ctx);
 
-      out:
-       if (type)
-               *type = fault_type;
-
-       return page;
+       return NOPFN_REFAULT;
 }
 
 #if SPUFS_MMAP_4K
-static struct page *spufs_cntl_mmap_nopage(struct vm_area_struct *vma,
-                                          unsigned long address, int *type)
+static unsigned long spufs_cntl_mmap_nopfn(struct vm_area_struct *vma,
+                                          unsigned long address)
 {
-       return spufs_ps_nopage(vma, address, type, 0x4000, 0x1000);
+       return spufs_ps_nopfn(vma, address, 0x4000, 0x1000);
 }
 
 static struct vm_operations_struct spufs_cntl_mmap_vmops = {
-       .nopage = spufs_cntl_mmap_nopage,
+       .nopfn = spufs_cntl_mmap_nopfn,
 };
 
 /*
@@ -205,7 +197,7 @@ static int spufs_cntl_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_SHARED))
                return -EINVAL;
 
-       vma->vm_flags |= VM_IO;
+       vma->vm_flags |= VM_IO | VM_PFNMAP;
        vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
@@ -243,8 +235,8 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
        struct spu_context *ctx = i->i_ctx;
 
        file->private_data = ctx;
-       file->f_mapping = inode->i_mapping;
        ctx->cntl = inode->i_mapping;
+       smp_wmb();
        return simple_attr_open(inode, file, spufs_cntl_get,
                                        spufs_cntl_set, "0x%08lx");
 }
@@ -728,8 +720,8 @@ static int spufs_signal1_open(struct inode *inode, struct file *file)
        struct spufs_inode_info *i = SPUFS_I(inode);
        struct spu_context *ctx = i->i_ctx;
        file->private_data = ctx;
-       file->f_mapping = inode->i_mapping;
        ctx->signal1 = inode->i_mapping;
+       smp_wmb();
        return nonseekable_open(inode, file);
 }
 
@@ -791,23 +783,23 @@ static ssize_t spufs_signal1_write(struct file *file, const char __user *buf,
        return 4;
 }
 
-static struct page *spufs_signal1_mmap_nopage(struct vm_area_struct *vma,
-                                             unsigned long address, int *type)
+static unsigned long spufs_signal1_mmap_nopfn(struct vm_area_struct *vma,
+                                             unsigned long address)
 {
 #if PAGE_SIZE == 0x1000
-       return spufs_ps_nopage(vma, address, type, 0x14000, 0x1000);
+       return spufs_ps_nopfn(vma, address, 0x14000, 0x1000);
 #elif PAGE_SIZE == 0x10000
        /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
         * signal 1 and 2 area
         */
-       return spufs_ps_nopage(vma, address, type, 0x10000, 0x10000);
+       return spufs_ps_nopfn(vma, address, 0x10000, 0x10000);
 #else
 #error unsupported page size
 #endif
 }
 
 static struct vm_operations_struct spufs_signal1_mmap_vmops = {
-       .nopage = spufs_signal1_mmap_nopage,
+       .nopfn = spufs_signal1_mmap_nopfn,
 };
 
 static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
@@ -815,7 +807,7 @@ static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_SHARED))
                return -EINVAL;
 
-       vma->vm_flags |= VM_IO;
+       vma->vm_flags |= VM_IO | VM_PFNMAP;
        vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
@@ -835,8 +827,8 @@ static int spufs_signal2_open(struct inode *inode, struct file *file)
        struct spufs_inode_info *i = SPUFS_I(inode);
        struct spu_context *ctx = i->i_ctx;
        file->private_data = ctx;
-       file->f_mapping = inode->i_mapping;
        ctx->signal2 = inode->i_mapping;
+       smp_wmb();
        return nonseekable_open(inode, file);
 }
 
@@ -899,23 +891,23 @@ static ssize_t spufs_signal2_write(struct file *file, const char __user *buf,
 }
 
 #if SPUFS_MMAP_4K
-static struct page *spufs_signal2_mmap_nopage(struct vm_area_struct *vma,
-                                             unsigned long address, int *type)
+static unsigned long spufs_signal2_mmap_nopfn(struct vm_area_struct *vma,
+                                             unsigned long address)
 {
 #if PAGE_SIZE == 0x1000
-       return spufs_ps_nopage(vma, address, type, 0x1c000, 0x1000);
+       return spufs_ps_nopfn(vma, address, 0x1c000, 0x1000);
 #elif PAGE_SIZE == 0x10000
        /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
         * signal 1 and 2 area
         */
-       return spufs_ps_nopage(vma, address, type, 0x10000, 0x10000);
+       return spufs_ps_nopfn(vma, address, 0x10000, 0x10000);
 #else
 #error unsupported page size
 #endif
 }
 
 static struct vm_operations_struct spufs_signal2_mmap_vmops = {
-       .nopage = spufs_signal2_mmap_nopage,
+       .nopfn = spufs_signal2_mmap_nopfn,
 };
 
 static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
@@ -923,7 +915,7 @@ static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_SHARED))
                return -EINVAL;
 
-       vma->vm_flags |= VM_IO;
+       vma->vm_flags |= VM_IO | VM_PFNMAP;
        vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
@@ -1000,14 +992,14 @@ DEFINE_SIMPLE_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get,
                                        spufs_signal2_type_set, "%llu");
 
 #if SPUFS_MMAP_4K
-static struct page *spufs_mss_mmap_nopage(struct vm_area_struct *vma,
-                                          unsigned long address, int *type)
+static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma,
+                                         unsigned long address)
 {
-       return spufs_ps_nopage(vma, address, type, 0x0000, 0x1000);
+       return spufs_ps_nopfn(vma, address, 0x0000, 0x1000);
 }
 
 static struct vm_operations_struct spufs_mss_mmap_vmops = {
-       .nopage = spufs_mss_mmap_nopage,
+       .nopfn = spufs_mss_mmap_nopfn,
 };
 
 /*
@@ -1018,7 +1010,7 @@ static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_SHARED))
                return -EINVAL;
 
-       vma->vm_flags |= VM_IO;
+       vma->vm_flags |= VM_IO | VM_PFNMAP;
        vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
@@ -1032,8 +1024,11 @@ static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma)
 static int spufs_mss_open(struct inode *inode, struct file *file)
 {
        struct spufs_inode_info *i = SPUFS_I(inode);
+       struct spu_context *ctx = i->i_ctx;
 
        file->private_data = i->i_ctx;
+       ctx->mss = inode->i_mapping;
+       smp_wmb();
        return nonseekable_open(inode, file);
 }
 
@@ -1042,14 +1037,14 @@ static const struct file_operations spufs_mss_fops = {
        .mmap    = spufs_mss_mmap,
 };
 
-static struct page *spufs_psmap_mmap_nopage(struct vm_area_struct *vma,
-                                          unsigned long address, int *type)
+static unsigned long spufs_psmap_mmap_nopfn(struct vm_area_struct *vma,
+                                           unsigned long address)
 {
-       return spufs_ps_nopage(vma, address, type, 0x0000, 0x20000);
+       return spufs_ps_nopfn(vma, address, 0x0000, 0x20000);
 }
 
 static struct vm_operations_struct spufs_psmap_mmap_vmops = {
-       .nopage = spufs_psmap_mmap_nopage,
+       .nopfn = spufs_psmap_mmap_nopfn,
 };
 
 /*
@@ -1060,7 +1055,7 @@ static int spufs_psmap_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_SHARED))
                return -EINVAL;
 
-       vma->vm_flags |= VM_IO;
+       vma->vm_flags |= VM_IO | VM_PFNMAP;
        vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
@@ -1071,8 +1066,11 @@ static int spufs_psmap_mmap(struct file *file, struct vm_area_struct *vma)
 static int spufs_psmap_open(struct inode *inode, struct file *file)
 {
        struct spufs_inode_info *i = SPUFS_I(inode);
+       struct spu_context *ctx = i->i_ctx;
 
        file->private_data = i->i_ctx;
+       ctx->psmap = inode->i_mapping;
+       smp_wmb();
        return nonseekable_open(inode, file);
 }
 
@@ -1083,14 +1081,14 @@ static const struct file_operations spufs_psmap_fops = {
 
 
 #if SPUFS_MMAP_4K
-static struct page *spufs_mfc_mmap_nopage(struct vm_area_struct *vma,
-                                          unsigned long address, int *type)
+static unsigned long spufs_mfc_mmap_nopfn(struct vm_area_struct *vma,
+                                         unsigned long address)
 {
-       return spufs_ps_nopage(vma, address, type, 0x3000, 0x1000);
+       return spufs_ps_nopfn(vma, address, 0x3000, 0x1000);
 }
 
 static struct vm_operations_struct spufs_mfc_mmap_vmops = {
-       .nopage = spufs_mfc_mmap_nopage,
+       .nopfn = spufs_mfc_mmap_nopfn,
 };
 
 /*
@@ -1101,7 +1099,7 @@ static int spufs_mfc_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_SHARED))
                return -EINVAL;
 
-       vma->vm_flags |= VM_IO;
+       vma->vm_flags |= VM_IO | VM_PFNMAP;
        vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
                                     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
@@ -1125,6 +1123,8 @@ static int spufs_mfc_open(struct inode *inode, struct file *file)
                return -EBUSY;
 
        file->private_data = ctx;
+       ctx->mfc = inode->i_mapping;
+       smp_wmb();
        return nonseekable_open(inode, file);
 }
 
@@ -1309,7 +1309,7 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
        if (ret)
                goto out;
 
-       spu_acquire_runnable(ctx);
+       spu_acquire_runnable(ctx, 0);
        if (file->f_flags & O_NONBLOCK) {
                ret = ctx->ops->send_mfc_command(ctx, &cmd);
        } else {
index 1acc2ffef8c8ac67749be5dbf1a43ef176648304..353a8fa07ab87797694de155d6ba50f65ebc06d3 100644 (file)
@@ -133,7 +133,7 @@ out_drop_priv:
        spu_mfc_sr1_set(ctx->spu, sr1);
 
 out_unlock:
-       spu_release_exclusive(ctx);
+       spu_release(ctx);
 out:
        return ret;
 }
@@ -143,7 +143,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
        int ret;
        unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
 
-       ret = spu_acquire_runnable(ctx);
+       ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
        if (ret)
                return ret;
 
@@ -155,7 +155,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
                        spu_release(ctx);
                        ret = spu_setup_isolated(ctx);
                        if (!ret)
-                               ret = spu_acquire_runnable(ctx);
+                               ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
                }
 
                /* if userspace has set the runcntrl register (eg, to issue an
@@ -164,8 +164,10 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
                        (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE);
                if (runcntl == 0)
                        runcntl = SPU_RUNCNTL_RUNNABLE;
-       } else
+       } else {
+               spu_start_tick(ctx);
                ctx->ops->npc_write(ctx, *npc);
+       }
 
        ctx->ops->runcntl_write(ctx, runcntl);
        return ret;
@@ -176,6 +178,7 @@ static inline int spu_run_fini(struct spu_context *ctx, u32 * npc,
 {
        int ret = 0;
 
+       spu_stop_tick(ctx);
        *status = ctx->ops->status_read(ctx);
        *npc = ctx->ops->npc_read(ctx);
        spu_release(ctx);
@@ -329,8 +332,10 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
                }
                if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
                        ret = spu_reacquire_runnable(ctx, npc, &status);
-                       if (ret)
+                       if (ret) {
+                               spu_stop_tick(ctx);
                                goto out2;
+                       }
                        continue;
                }
                ret = spu_process_events(ctx);
@@ -361,4 +366,3 @@ out:
        up(&ctx->run_sema);
        return ret;
 }
-
index bd6fe4b7a84baab84face56b2d8ca5f5c263db2e..2f25e68b4bac1c5c8eb95160ba73d1ebfec44b81 100644 (file)
 #include <asm/spu_priv1.h>
 #include "spufs.h"
 
-#define SPU_MIN_TIMESLICE      (100 * HZ / 1000)
+#define SPU_TIMESLICE  (HZ)
 
-#define SPU_BITMAP_SIZE (((MAX_PRIO+BITS_PER_LONG)/BITS_PER_LONG)+1)
 struct spu_prio_array {
-       unsigned long bitmap[SPU_BITMAP_SIZE];
-       wait_queue_head_t waitq[MAX_PRIO];
+       DECLARE_BITMAP(bitmap, MAX_PRIO);
+       struct list_head runq[MAX_PRIO];
+       spinlock_t runq_lock;
        struct list_head active_list[MAX_NUMNODES];
        struct mutex active_mutex[MAX_NUMNODES];
 };
 
 static struct spu_prio_array *spu_prio;
+static struct workqueue_struct *spu_sched_wq;
 
 static inline int node_allowed(int node)
 {
@@ -68,6 +69,64 @@ static inline int node_allowed(int node)
        return 1;
 }
 
+void spu_start_tick(struct spu_context *ctx)
+{
+       if (ctx->policy == SCHED_RR)
+               queue_delayed_work(spu_sched_wq, &ctx->sched_work, SPU_TIMESLICE);
+}
+
+void spu_stop_tick(struct spu_context *ctx)
+{
+       if (ctx->policy == SCHED_RR)
+               cancel_delayed_work(&ctx->sched_work);
+}
+
+void spu_sched_tick(struct work_struct *work)
+{
+       struct spu_context *ctx =
+               container_of(work, struct spu_context, sched_work.work);
+       struct spu *spu;
+       int rearm = 1;
+
+       mutex_lock(&ctx->state_mutex);
+       spu = ctx->spu;
+       if (spu) {
+               int best = sched_find_first_bit(spu_prio->bitmap);
+               if (best <= ctx->prio) {
+                       spu_deactivate(ctx);
+                       rearm = 0;
+               }
+       }
+       mutex_unlock(&ctx->state_mutex);
+
+       if (rearm)
+               spu_start_tick(ctx);
+}
+
+/**
+ * spu_add_to_active_list - add spu to active list
+ * @spu:       spu to add to the active list
+ */
+static void spu_add_to_active_list(struct spu *spu)
+{
+       mutex_lock(&spu_prio->active_mutex[spu->node]);
+       list_add_tail(&spu->list, &spu_prio->active_list[spu->node]);
+       mutex_unlock(&spu_prio->active_mutex[spu->node]);
+}
+
+/**
+ * spu_remove_from_active_list - remove spu from active list
+ * @spu:       spu to remove from the active list
+ */
+static void spu_remove_from_active_list(struct spu *spu)
+{
+       int node = spu->node;
+
+       mutex_lock(&spu_prio->active_mutex[node]);
+       list_del_init(&spu->list);
+       mutex_unlock(&spu_prio->active_mutex[node]);
+}
+
 static inline void mm_needs_global_tlbie(struct mm_struct *mm)
 {
        int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1;
@@ -94,8 +153,12 @@ int spu_switch_event_unregister(struct notifier_block * n)
        return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
 }
 
-
-static inline void bind_context(struct spu *spu, struct spu_context *ctx)
+/**
+ * spu_bind_context - bind spu context to physical spu
+ * @spu:       physical spu to bind to
+ * @ctx:       context to bind
+ */
+static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
 {
        pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid,
                 spu->number, spu->node);
@@ -104,7 +167,6 @@ static inline void bind_context(struct spu *spu, struct spu_context *ctx)
        ctx->spu = spu;
        ctx->ops = &spu_hw_ops;
        spu->pid = current->pid;
-       spu->prio = current->prio;
        spu->mm = ctx->owner;
        mm_needs_global_tlbie(spu->mm);
        spu->ibox_callback = spufs_ibox_callback;
@@ -118,12 +180,21 @@ static inline void bind_context(struct spu *spu, struct spu_context *ctx)
        spu->timestamp = jiffies;
        spu_cpu_affinity_set(spu, raw_smp_processor_id());
        spu_switch_notify(spu, ctx);
+       spu_add_to_active_list(spu);
+       ctx->state = SPU_STATE_RUNNABLE;
 }
 
-static inline void unbind_context(struct spu *spu, struct spu_context *ctx)
+/**
+ * spu_unbind_context - unbind spu context from physical spu
+ * @spu:       physical spu to unbind from
+ * @ctx:       context to unbind
+ */
+static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
 {
        pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__,
                 spu->pid, spu->number, spu->node);
+
+       spu_remove_from_active_list(spu);
        spu_switch_notify(spu, NULL);
        spu_unmap_mappings(ctx);
        spu_save(&ctx->csa, spu);
@@ -136,95 +207,98 @@ static inline void unbind_context(struct spu *spu, struct spu_context *ctx)
        spu->dma_callback = NULL;
        spu->mm = NULL;
        spu->pid = 0;
-       spu->prio = MAX_PRIO;
        ctx->ops = &spu_backing_ops;
        ctx->spu = NULL;
        spu->flags = 0;
        spu->ctx = NULL;
 }
 
-static inline void spu_add_wq(wait_queue_head_t * wq, wait_queue_t * wait,
-                             int prio)
+/**
+ * spu_add_to_rq - add a context to the runqueue
+ * @ctx:       context to add
+ */
+static void spu_add_to_rq(struct spu_context *ctx)
 {
-       prepare_to_wait_exclusive(wq, wait, TASK_INTERRUPTIBLE);
-       set_bit(prio, spu_prio->bitmap);
+       spin_lock(&spu_prio->runq_lock);
+       list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]);
+       set_bit(ctx->prio, spu_prio->bitmap);
+       spin_unlock(&spu_prio->runq_lock);
 }
 
-static inline void spu_del_wq(wait_queue_head_t * wq, wait_queue_t * wait,
-                             int prio)
+/**
+ * spu_del_from_rq - remove a context from the runqueue
+ * @ctx:       context to remove
+ */
+static void spu_del_from_rq(struct spu_context *ctx)
 {
-       u64 flags;
-
-       __set_current_state(TASK_RUNNING);
-
-       spin_lock_irqsave(&wq->lock, flags);
+       spin_lock(&spu_prio->runq_lock);
+       list_del_init(&ctx->rq);
+       if (list_empty(&spu_prio->runq[ctx->prio]))
+               clear_bit(ctx->prio, spu_prio->bitmap);
+       spin_unlock(&spu_prio->runq_lock);
+}
 
-       remove_wait_queue_locked(wq, wait);
-       if (list_empty(&wq->task_list))
-               clear_bit(prio, spu_prio->bitmap);
+/**
+ * spu_grab_context - remove one context from the runqueue
+ * @prio:      priority of the context to be removed
+ *
+ * This function removes one context from the runqueue for priority @prio.
+ * If there is more than one context with the given priority the first
+ * task on the runqueue will be taken.
+ *
+ * Returns the spu_context it just removed.
+ *
+ * Must be called with spu_prio->runq_lock held.
+ */
+static struct spu_context *spu_grab_context(int prio)
+{
+       struct list_head *rq = &spu_prio->runq[prio];
 
-       spin_unlock_irqrestore(&wq->lock, flags);
+       if (list_empty(rq))
+               return NULL;
+       return list_entry(rq->next, struct spu_context, rq);
 }
 
-static void spu_prio_wait(struct spu_context *ctx, u64 flags)
+static void spu_prio_wait(struct spu_context *ctx)
 {
-       int prio = current->prio;
-       wait_queue_head_t *wq = &spu_prio->waitq[prio];
        DEFINE_WAIT(wait);
 
-       if (ctx->spu)
-               return;
-
-       spu_add_wq(wq, &wait, prio);
-
+       set_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
+       prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE);
        if (!signal_pending(current)) {
-               up_write(&ctx->state_sema);
-               pr_debug("%s: pid=%d prio=%d\n", __FUNCTION__,
-                        current->pid, current->prio);
+               mutex_unlock(&ctx->state_mutex);
                schedule();
-               down_write(&ctx->state_sema);
+               mutex_lock(&ctx->state_mutex);
        }
-
-       spu_del_wq(wq, &wait, prio);
+       __set_current_state(TASK_RUNNING);
+       remove_wait_queue(&ctx->stop_wq, &wait);
+       clear_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
 }
 
-static void spu_prio_wakeup(void)
+/**
+ * spu_reschedule - try to find a runnable context for a spu
+ * @spu:       spu available
+ *
+ * This function is called whenever a spu becomes idle.  It looks for the
+ * most suitable runnable spu context and schedules it for execution.
+ */
+static void spu_reschedule(struct spu *spu)
 {
-       int best = sched_find_first_bit(spu_prio->bitmap);
-       if (best < MAX_PRIO) {
-               wait_queue_head_t *wq = &spu_prio->waitq[best];
-               wake_up_interruptible_nr(wq, 1);
-       }
-}
+       int best;
 
-static int get_active_spu(struct spu *spu)
-{
-       int node = spu->node;
-       struct spu *tmp;
-       int rc = 0;
+       spu_free(spu);
 
-       mutex_lock(&spu_prio->active_mutex[node]);
-       list_for_each_entry(tmp, &spu_prio->active_list[node], list) {
-               if (tmp == spu) {
-                       list_del_init(&spu->list);
-                       rc = 1;
-                       break;
-               }
+       spin_lock(&spu_prio->runq_lock);
+       best = sched_find_first_bit(spu_prio->bitmap);
+       if (best < MAX_PRIO) {
+               struct spu_context *ctx = spu_grab_context(best);
+               if (ctx && test_bit(SPU_SCHED_WAKE, &ctx->sched_flags))
+                       wake_up(&ctx->stop_wq);
        }
-       mutex_unlock(&spu_prio->active_mutex[node]);
-       return rc;
-}
-
-static void put_active_spu(struct spu *spu)
-{
-       int node = spu->node;
-
-       mutex_lock(&spu_prio->active_mutex[node]);
-       list_add_tail(&spu->list, &spu_prio->active_list[node]);
-       mutex_unlock(&spu_prio->active_mutex[node]);
+       spin_unlock(&spu_prio->runq_lock);
 }
 
-static struct spu *spu_get_idle(struct spu_context *ctx, u64 flags)
+static struct spu *spu_get_idle(struct spu_context *ctx)
 {
        struct spu *spu = NULL;
        int node = cpu_to_node(raw_smp_processor_id());
@@ -241,87 +315,154 @@ static struct spu *spu_get_idle(struct spu_context *ctx, u64 flags)
        return spu;
 }
 
-static inline struct spu *spu_get(struct spu_context *ctx, u64 flags)
+/**
+ * find_victim - find a lower priority context to preempt
+ * @ctx:       canidate context for running
+ *
+ * Returns the freed physical spu to run the new context on.
+ */
+static struct spu *find_victim(struct spu_context *ctx)
 {
-       /* Future: spu_get_idle() if possible,
-        * otherwise try to preempt an active
-        * context.
+       struct spu_context *victim = NULL;
+       struct spu *spu;
+       int node, n;
+
+       /*
+        * Look for a possible preemption candidate on the local node first.
+        * If there is no candidate look at the other nodes.  This isn't
+        * exactly fair, but so far the whole spu schedule tries to keep
+        * a strong node affinity.  We might want to fine-tune this in
+        * the future.
         */
-       return spu_get_idle(ctx, flags);
+ restart:
+       node = cpu_to_node(raw_smp_processor_id());
+       for (n = 0; n < MAX_NUMNODES; n++, node++) {
+               node = (node < MAX_NUMNODES) ? node : 0;
+               if (!node_allowed(node))
+                       continue;
+
+               mutex_lock(&spu_prio->active_mutex[node]);
+               list_for_each_entry(spu, &spu_prio->active_list[node], list) {
+                       struct spu_context *tmp = spu->ctx;
+
+                       if (tmp->rt_priority < ctx->rt_priority &&
+                           (!victim || tmp->rt_priority < victim->rt_priority))
+                               victim = spu->ctx;
+               }
+               mutex_unlock(&spu_prio->active_mutex[node]);
+
+               if (victim) {
+                       /*
+                        * This nests ctx->state_mutex, but we always lock
+                        * higher priority contexts before lower priority
+                        * ones, so this is safe until we introduce
+                        * priority inheritance schemes.
+                        */
+                       if (!mutex_trylock(&victim->state_mutex)) {
+                               victim = NULL;
+                               goto restart;
+                       }
+
+                       spu = victim->spu;
+                       if (!spu) {
+                               /*
+                                * This race can happen because we've dropped
+                                * the active list mutex.  No a problem, just
+                                * restart the search.
+                                */
+                               mutex_unlock(&victim->state_mutex);
+                               victim = NULL;
+                               goto restart;
+                       }
+                       spu_unbind_context(spu, victim);
+                       mutex_unlock(&victim->state_mutex);
+                       return spu;
+               }
+       }
+
+       return NULL;
 }
 
-/* The three externally callable interfaces
- * for the scheduler begin here.
+/**
+ * spu_activate - find a free spu for a context and execute it
+ * @ctx:       spu context to schedule
+ * @flags:     flags (currently ignored)
  *
- *     spu_activate    - bind a context to SPU, waiting as needed.
- *     spu_deactivate  - unbind a context from its SPU.
- *     spu_yield       - yield an SPU if others are waiting.
+ * Tries to find a free spu to run @ctx.  If no free spu is availble
+ * add the context to the runqueue so it gets woken up once an spu
+ * is available.
  */
-
-int spu_activate(struct spu_context *ctx, u64 flags)
+int spu_activate(struct spu_context *ctx, unsigned long flags)
 {
-       struct spu *spu;
-       int ret = 0;
 
-       for (;;) {
-               if (ctx->spu)
+       if (ctx->spu)
+               return 0;
+
+       do {
+               struct spu *spu;
+
+               spu = spu_get_idle(ctx);
+               /*
+                * If this is a realtime thread we try to get it running by
+                * preempting a lower priority thread.
+                */
+               if (!spu && ctx->rt_priority)
+                       spu = find_victim(ctx);
+               if (spu) {
+                       spu_bind_context(spu, ctx);
                        return 0;
-               spu = spu_get(ctx, flags);
-               if (spu != NULL) {
-                       if (ctx->spu != NULL) {
-                               spu_free(spu);
-                               spu_prio_wakeup();
-                               break;
-                       }
-                       bind_context(spu, ctx);
-                       put_active_spu(spu);
-                       break;
                }
-               spu_prio_wait(ctx, flags);
-               if (signal_pending(current)) {
-                       ret = -ERESTARTSYS;
-                       spu_prio_wakeup();
-                       break;
-               }
-       }
-       return ret;
+
+               spu_add_to_rq(ctx);
+               if (!(flags & SPU_ACTIVATE_NOWAKE))
+                       spu_prio_wait(ctx);
+               spu_del_from_rq(ctx);
+       } while (!signal_pending(current));
+
+       return -ERESTARTSYS;
 }
 
+/**
+ * spu_deactivate - unbind a context from it's physical spu
+ * @ctx:       spu context to unbind
+ *
+ * Unbind @ctx from the physical spu it is running on and schedule
+ * the highest priority context to run on the freed physical spu.
+ */
 void spu_deactivate(struct spu_context *ctx)
 {
-       struct spu *spu;
-       int needs_idle;
+       struct spu *spu = ctx->spu;
 
-       spu = ctx->spu;
-       if (!spu)
-               return;
-       needs_idle = get_active_spu(spu);
-       unbind_context(spu, ctx);
-       if (needs_idle) {
-               spu_free(spu);
-               spu_prio_wakeup();
+       if (spu) {
+               spu_unbind_context(spu, ctx);
+               spu_reschedule(spu);
        }
 }
 
+/**
+ * spu_yield -  yield a physical spu if others are waiting
+ * @ctx:       spu context to yield
+ *
+ * Check if there is a higher priority context waiting and if yes
+ * unbind @ctx from the physical spu and schedule the highest
+ * priority context to run on the freed physical spu instead.
+ */
 void spu_yield(struct spu_context *ctx)
 {
        struct spu *spu;
        int need_yield = 0;
 
-       if (down_write_trylock(&ctx->state_sema)) {
+       if (mutex_trylock(&ctx->state_mutex)) {
                if ((spu = ctx->spu) != NULL) {
                        int best = sched_find_first_bit(spu_prio->bitmap);
                        if (best < MAX_PRIO) {
                                pr_debug("%s: yielding SPU %d NODE %d\n",
                                         __FUNCTION__, spu->number, spu->node);
                                spu_deactivate(ctx);
-                               ctx->state = SPU_STATE_SAVED;
                                need_yield = 1;
-                       } else {
-                               spu->prio = MAX_PRIO;
                        }
                }
-               up_write(&ctx->state_sema);
+               mutex_unlock(&ctx->state_mutex);
        }
        if (unlikely(need_yield))
                yield();
@@ -331,14 +472,19 @@ int __init spu_sched_init(void)
 {
        int i;
 
+       spu_sched_wq = create_singlethread_workqueue("spusched");
+       if (!spu_sched_wq)
+               return 1;
+
        spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL);
        if (!spu_prio) {
                printk(KERN_WARNING "%s: Unable to allocate priority queue.\n",
                       __FUNCTION__);
+                      destroy_workqueue(spu_sched_wq);
                return 1;
        }
        for (i = 0; i < MAX_PRIO; i++) {
-               init_waitqueue_head(&spu_prio->waitq[i]);
+               INIT_LIST_HEAD(&spu_prio->runq[i]);
                __clear_bit(i, spu_prio->bitmap);
        }
        __set_bit(MAX_PRIO, spu_prio->bitmap);
@@ -346,6 +492,7 @@ int __init spu_sched_init(void)
                mutex_init(&spu_prio->active_mutex[i]);
                INIT_LIST_HEAD(&spu_prio->active_list[i]);
        }
+       spin_lock_init(&spu_prio->runq_lock);
        return 0;
 }
 
@@ -364,4 +511,5 @@ void __exit spu_sched_exit(void)
                mutex_unlock(&spu_prio->active_mutex[node]);
        }
        kfree(spu_prio);
+       destroy_workqueue(spu_sched_wq);
 }
index 56864469215e5b6b75fd46ae07ca62f483821d10..0c437891dfd5cf6b25af3cc1248b033192627ea1 100644 (file)
@@ -23,7 +23,7 @@
 #define SPUFS_H
 
 #include <linux/kref.h>
-#include <linux/rwsem.h>
+#include <linux/mutex.h>
 #include <linux/spinlock.h>
 #include <linux/fs.h>
 
@@ -37,11 +37,13 @@ enum {
 };
 
 struct spu_context_ops;
-
-#define SPU_CONTEXT_PREEMPT          0UL
-
 struct spu_gang;
 
+/* ctx->sched_flags */
+enum {
+       SPU_SCHED_WAKE = 0,
+};
+
 struct spu_context {
        struct spu *spu;                  /* pointer to a physical SPU */
        struct spu_state csa;             /* SPU context save area. */
@@ -51,10 +53,12 @@ struct spu_context {
        struct address_space *cntl;        /* 'control' area mappings. */
        struct address_space *signal1;     /* 'signal1' area mappings. */
        struct address_space *signal2;     /* 'signal2' area mappings. */
+       struct address_space *mss;         /* 'mss' area mappings. */
+       struct address_space *psmap;       /* 'psmap' area mappings. */
        u64 object_id;             /* user space pointer for oprofile */
 
        enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state;
-       struct rw_semaphore state_sema;
+       struct mutex state_mutex;
        struct semaphore run_sema;
 
        struct mm_struct *owner;
@@ -75,6 +79,14 @@ struct spu_context {
 
        struct list_head gang_list;
        struct spu_gang *gang;
+
+       /* scheduler fields */
+       struct list_head rq;
+       struct delayed_work sched_work;
+       unsigned long sched_flags;
+       unsigned long rt_priority;
+       int policy;
+       int prio;
 };
 
 struct spu_gang {
@@ -159,6 +171,16 @@ void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx);
 void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
 
 /* context management */
+static inline void spu_acquire(struct spu_context *ctx)
+{
+       mutex_lock(&ctx->state_mutex);
+}
+
+static inline void spu_release(struct spu_context *ctx)
+{
+       mutex_unlock(&ctx->state_mutex);
+}
+
 struct spu_context * alloc_spu_context(struct spu_gang *gang);
 void destroy_spu_context(struct kref *kref);
 struct spu_context * get_spu_context(struct spu_context *ctx);
@@ -166,20 +188,18 @@ int put_spu_context(struct spu_context *ctx);
 void spu_unmap_mappings(struct spu_context *ctx);
 
 void spu_forget(struct spu_context *ctx);
-void spu_acquire(struct spu_context *ctx);
-void spu_release(struct spu_context *ctx);
-int spu_acquire_runnable(struct spu_context *ctx);
+int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
 void spu_acquire_saved(struct spu_context *ctx);
 int spu_acquire_exclusive(struct spu_context *ctx);
-
-static inline void spu_release_exclusive(struct spu_context *ctx)
-{
-       up_write(&ctx->state_sema);
-}
-
-int spu_activate(struct spu_context *ctx, u64 flags);
+enum {
+       SPU_ACTIVATE_NOWAKE = 1,
+};
+int spu_activate(struct spu_context *ctx, unsigned long flags);
 void spu_deactivate(struct spu_context *ctx);
 void spu_yield(struct spu_context *ctx);
+void spu_start_tick(struct spu_context *ctx);
+void spu_stop_tick(struct spu_context *ctx);
+void spu_sched_tick(struct work_struct *work);
 int __init spu_sched_init(void);
 void __exit spu_sched_exit(void);
 
index ffa7c2c2030d27fa595ce744fa51f6925560168c..279d7339e1701a1678babb99801373485c299fbb 100644 (file)
@@ -95,7 +95,6 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
        unsigned long lpar_rc;
        unsigned long slot;
        unsigned long hpte_v, hpte_r;
-       unsigned long flags;
 
        /* same as iseries */
        if (vflags & HPTE_V_SECONDARY)
@@ -115,17 +114,17 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
        if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE))
                hpte_r &= ~_PAGE_COHERENT;
 
-       spin_lock_irqsave(&beat_htab_lock, flags);
+       spin_lock(&beat_htab_lock);
        if ((lpar_rc = beat_read_mask(hpte_group)) == 0) {
                if (!(vflags & HPTE_V_BOLTED))
                        DBG_LOW(" full\n");
-               spin_unlock_irqrestore(&beat_htab_lock, flags);
+               spin_unlock(&beat_htab_lock);
                return -1;
        }
 
        lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48,
                hpte_v, hpte_r, &slot);
-       spin_unlock_irqrestore(&beat_htab_lock, flags);
+       spin_unlock(&beat_htab_lock);
 
        /*
         * Since we try and ioremap PHBs we don't own, the pte insert
@@ -189,7 +188,6 @@ static long beat_lpar_hpte_updatepp(unsigned long slot,
 {
        unsigned long lpar_rc;
        unsigned long dummy0, dummy1, want_v;
-       unsigned long flags;
 
        want_v = hpte_encode_v(va, psize);
 
@@ -197,17 +195,17 @@ static long beat_lpar_hpte_updatepp(unsigned long slot,
                "avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ",
                want_v & HPTE_V_AVPN, slot, psize, newpp);
 
-       spin_lock_irqsave(&beat_htab_lock, flags);
+       spin_lock(&beat_htab_lock);
        dummy0 = beat_lpar_hpte_getword0(slot);
        if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) {
                DBG_LOW("not found !\n");
-               spin_unlock_irqrestore(&beat_htab_lock, flags);
+               spin_unlock(&beat_htab_lock);
                return -1;
        }
 
        lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0,
                                        &dummy1);
-       spin_unlock_irqrestore(&beat_htab_lock, flags);
+       spin_unlock(&beat_htab_lock);
        if (lpar_rc != 0 || dummy0 == 0) {
                DBG_LOW("not found !\n");
                return -1;
@@ -256,18 +254,17 @@ static void beat_lpar_hpte_updateboltedpp(unsigned long newpp,
                                          int psize)
 {
        unsigned long lpar_rc, slot, vsid, va, dummy0, dummy1;
-       unsigned long flags;
 
        vsid = get_kernel_vsid(ea);
        va = (vsid << 28) | (ea & 0x0fffffff);
 
-       spin_lock_irqsave(&beat_htab_lock, flags);
+       spin_lock(&beat_htab_lock);
        slot = beat_lpar_hpte_find(va, psize);
        BUG_ON(slot == -1);
 
        lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7,
                &dummy0, &dummy1);
-       spin_unlock_irqrestore(&beat_htab_lock, flags);
+       spin_unlock(&beat_htab_lock);
 
        BUG_ON(lpar_rc != 0);
 }
index 61599d919ea8c7f623c61449f750af31bece6ae4..3f6c4114f908c392a27e2b1d92b6691b875782de 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/initrd.h>
-#include <linux/root_dev.h>
 #include <linux/mtd/physmap.h>
 
 #include <asm/time.h>
@@ -91,17 +90,6 @@ static void __init linkstation_setup_arch(void)
                               ARRAY_SIZE(linkstation_physmap_partitions));
 #endif
 
-#ifdef CONFIG_BLK_DEV_INITRD
-       if (initrd_start)
-               ROOT_DEV = Root_RAM0;
-       else
-#endif
-#ifdef CONFIG_ROOT_NFS
-               ROOT_DEV = Root_NFS;
-#else
-               ROOT_DEV = Root_HDA1;
-#endif
-
        /* Lookup PCI host bridges */
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
                add_bridge(np);
index d1929721b0e47be7d868b64e07443190605616f3..a397e4e17c13ca93230f2a33977b4627170c3f21 100644 (file)
@@ -170,31 +170,6 @@ static int __init construct_spu(struct spu *spu)
        return result;
 }
 
-static int __init add_spu_pages(unsigned long start_addr, unsigned long size)
-{
-       int result;
-       unsigned long start_pfn;
-       unsigned long nr_pages;
-       struct pglist_data *pgdata;
-       struct zone *zone;
-
-       BUG_ON(!mem_init_done);
-
-       start_pfn = start_addr >> PAGE_SHIFT;
-       nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
-
-       pgdata = NODE_DATA(0);
-       zone = pgdata->node_zones;
-
-       result = __add_pages(zone, start_pfn, nr_pages);
-
-       if (result)
-               pr_debug("%s:%d: __add_pages failed: (%d)\n",
-                       __func__, __LINE__, result);
-
-       return result;
-}
-
 static void spu_unmap(struct spu *spu)
 {
        iounmap(spu->priv2);
@@ -206,19 +181,6 @@ static void spu_unmap(struct spu *spu)
 static int __init setup_areas(struct spu *spu)
 {
        struct table {char* name; unsigned long addr; unsigned long size;};
-       int result;
-
-       /* setup pages */
-
-       result = add_spu_pages(spu->local_store_phys, LS_SIZE);
-       if (result)
-               goto fail_add;
-
-       result = add_spu_pages(spu->problem_phys, sizeof(struct spu_problem));
-       if (result)
-               goto fail_add;
-
-       /* ioremap */
 
        spu_pdata(spu)->shadow = __ioremap(
                spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),
@@ -260,8 +222,8 @@ static int __init setup_areas(struct spu *spu)
 
 fail_ioremap:
        spu_unmap(spu);
-fail_add:
-       return result;
+
+       return -ENOMEM;
 }
 
 static int __init setup_interrupts(struct spu *spu)
index 69590fbf83daef9ba3a246c7e9f9a14b0d8261b5..dc0583bdbc637ec769e817cab5ad68f8216f37ca 100644 (file)
@@ -9,6 +9,7 @@ obj-$(CONFIG_SMP)       += smp.o
 obj-$(CONFIG_XICS)     += xics.o
 obj-$(CONFIG_SCANLOG)  += scanlog.o
 obj-$(CONFIG_EEH)      += eeh.o eeh_cache.o eeh_driver.o eeh_event.o
+obj-$(CONFIG_KEXEC)    += kexec.o
 
 obj-$(CONFIG_HOTPLUG_CPU)      += hotplug-cpu.o
 
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h
deleted file mode 100644 (file)
index 714f56f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * 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 */
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
new file mode 100644 (file)
index 0000000..af26856
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ *  Copyright 2006 Michael Ellerman, 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.
+ */
+
+#include <asm/machdep.h>
+#include <asm/page.h>
+#include <asm/firmware.h>
+#include <asm/kexec.h>
+#include <asm/mpic.h>
+
+#include "pseries.h"
+#include "xics.h"
+#include "plpar_wrappers.h"
+
+static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
+{
+       /* Don't risk a hypervisor call if we're crashing */
+       if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
+               unsigned long addr;
+
+               addr = __pa(get_slb_shadow());
+               if (unregister_slb_shadow(hard_smp_processor_id(), addr))
+                       printk("SLB shadow buffer deregistration of "
+                              "cpu %u (hw_cpu_id %d) failed\n",
+                              smp_processor_id(),
+                              hard_smp_processor_id());
+
+               addr = __pa(get_lppaca());
+               if (unregister_vpa(hard_smp_processor_id(), addr)) {
+                       printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
+                                       "failed\n", smp_processor_id(),
+                                       hard_smp_processor_id());
+               }
+       }
+}
+
+static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
+{
+       pseries_kexec_cpu_down(crash_shutdown, secondary);
+       mpic_teardown_this_cpu(secondary);
+}
+
+void __init setup_kexec_cpu_down_mpic(void)
+{
+       ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
+}
+
+static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
+{
+       pseries_kexec_cpu_down(crash_shutdown, secondary);
+       xics_teardown_cpu(secondary);
+}
+
+void __init setup_kexec_cpu_down_xics(void)
+{
+       ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
+}
+
+static int __init pseries_kexec_setup(void)
+{
+       ppc_md.machine_kexec = default_machine_kexec;
+       ppc_md.machine_kexec_prepare = default_machine_kexec_prepare;
+       ppc_md.machine_crash_shutdown = default_machine_crash_shutdown;
+
+       return 0;
+}
+__initcall(pseries_kexec_setup);
index c69bd15ced9c1497b8ec645e1ee11dbc8142464d..fa59124ce3febe98fe6c8015f071cb12e003b5bd 100644 (file)
@@ -98,6 +98,10 @@ static void fixup_winbond_82c105(struct pci_dev* dev)
                if (dev->resource[i].flags & IORESOURCE_IO
                    && dev->bus->number == 0 && dev->devfn == 0x81)
                        dev->resource[i].flags &= ~IORESOURCE_IO;
+               if (dev->resource[i].start == 0 && dev->resource[i].end) {
+                       dev->resource[i].flags = 0;
+                       dev->resource[i].end = 0;
+               }
        }
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
new file mode 100644 (file)
index 0000000..b43f139
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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_PSERIES_H
+#define _PSERIES_PSERIES_H
+
+extern void __init fw_feature_init(void);
+
+struct pt_regs;
+
+extern int pSeries_system_reset_exception(struct pt_regs *regs);
+extern int pSeries_machine_check_exception(struct pt_regs *regs);
+
+#ifdef CONFIG_SMP
+extern void smp_init_pseries_mpic(void);
+extern void smp_init_pseries_xics(void);
+#else
+static inline smp_init_pseries_mpic(void) { };
+static inline smp_init_pseries_xics(void) { };
+#endif
+
+#ifdef CONFIG_KEXEC
+extern void setup_kexec_cpu_down_xics(void);
+extern void setup_kexec_cpu_down_mpic(void);
+#else
+static inline setup_kexec_cpu_down_xics(void) { };
+static inline setup_kexec_cpu_down_mpic(void) { };
+#endif
+
+#endif /* _PSERIES_PSERIES_H */
index b1d3d161249ec4724a4b14a685ad38c8d9ba6009..edc0388731132f7c1daa63940591ac79dc39d428 100644 (file)
@@ -51,7 +51,7 @@
 #include <asm/udbg.h>
 #include <asm/firmware.h>
 
-#include "ras.h"
+#include "pseries.h"
 
 static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
 static DEFINE_SPINLOCK(ras_log_buf_lock);
diff --git a/arch/powerpc/platforms/pseries/ras.h b/arch/powerpc/platforms/pseries/ras.h
deleted file mode 100644 (file)
index 0e66b0d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _PSERIES_RAS_H
-#define _PSERIES_RAS_H
-
-struct pt_regs;
-
-extern int pSeries_system_reset_exception(struct pt_regs *regs);
-extern int pSeries_machine_check_exception(struct pt_regs *regs);
-
-#endif /* _PSERIES_RAS_H */
index 042ecae107ac89066c5596ab0ccafe58161539d9..435a045965261fec6bff86d23bdfe8c5212f6440 100644 (file)
@@ -55,7 +55,6 @@
 #include <asm/dma.h>
 #include <asm/machdep.h>
 #include <asm/irq.h>
-#include <asm/kexec.h>
 #include <asm/time.h>
 #include <asm/nvram.h>
 #include "xics.h"
 #include <asm/i8259.h>
 #include <asm/udbg.h>
 #include <asm/smp.h>
+#include <asm/firmware.h>
 
 #include "plpar_wrappers.h"
-#include "ras.h"
-#include "firmware.h"
+#include "pseries.h"
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
@@ -77,8 +76,6 @@
 #endif
 
 /* move those away to a .h */
-extern void smp_init_pseries_mpic(void);
-extern void smp_init_pseries_xics(void);
 extern void find_udbg_vterm(void);
 
 int fwnmi_active;  /* TRUE if an FWNMI handler is present */
@@ -221,42 +218,6 @@ static void pseries_lpar_enable_pmcs(void)
                get_lppaca()->pmcregs_in_use = 1;
 }
 
-#ifdef CONFIG_KEXEC
-static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
-{
-       /* Don't risk a hypervisor call if we're crashing */
-       if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
-               unsigned long addr;
-
-               addr = __pa(get_slb_shadow());
-               if (unregister_slb_shadow(hard_smp_processor_id(), addr))
-                       printk("SLB shadow buffer deregistration of "
-                              "cpu %u (hw_cpu_id %d) failed\n",
-                              smp_processor_id(),
-                              hard_smp_processor_id());
-
-               addr = __pa(get_lppaca());
-               if (unregister_vpa(hard_smp_processor_id(), addr)) {
-                       printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
-                                       "failed\n", smp_processor_id(),
-                                       hard_smp_processor_id());
-               }
-       }
-}
-
-static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
-{
-       pseries_kexec_cpu_down(crash_shutdown, secondary);
-       mpic_teardown_this_cpu(secondary);
-}
-
-static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
-{
-       pseries_kexec_cpu_down(crash_shutdown, secondary);
-       xics_teardown_cpu(secondary);
-}
-#endif /* CONFIG_KEXEC */
-
 static void __init pseries_discover_pic(void)
 {
        struct device_node *np;
@@ -269,21 +230,13 @@ static void __init pseries_discover_pic(void)
                        pSeries_mpic_node = of_node_get(np);
                        ppc_md.init_IRQ       = pseries_mpic_init_IRQ;
                        ppc_md.get_irq        = mpic_get_irq;
-#ifdef CONFIG_KEXEC
-                       ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
-#endif
-#ifdef CONFIG_SMP
+                       setup_kexec_cpu_down_mpic();
                        smp_init_pseries_mpic();
-#endif
                        return;
                } else if (strstr(typep, "ppc-xicp")) {
                        ppc_md.init_IRQ       = xics_init_IRQ;
-#ifdef CONFIG_KEXEC
-                       ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
-#endif
-#ifdef CONFIG_SMP
+                       setup_kexec_cpu_down_xics();
                        smp_init_pseries_xics();
-#endif
                        return;
                }
        }
@@ -554,9 +507,4 @@ define_machine(pseries) {
        .check_legacy_ioport    = pSeries_check_legacy_ioport,
        .system_reset_exception = pSeries_system_reset_exception,
        .machine_check_exception = pSeries_machine_check_exception,
-#ifdef CONFIG_KEXEC
-       .machine_kexec          = default_machine_kexec,
-       .machine_kexec_prepare  = default_machine_kexec_prepare,
-       .machine_crash_shutdown = default_machine_crash_shutdown,
-#endif
 };
index 4408518eaebe4afe76d6a1b3f354a4a6cc0a0421..116305b22a2bf209721e12bfca19666e6a293432 100644 (file)
@@ -48,6 +48,7 @@
 #include <asm/vdso_datapage.h>
 
 #include "plpar_wrappers.h"
+#include "pseries.h"
 
 #ifdef DEBUG
 #include <asm/udbg.h>
index 9f2a9a444bfbce7cf8aa1dc5713f1b0ca11db625..34161bc5a02f6384e7baf33e24de303325025872 100644 (file)
@@ -441,7 +441,8 @@ static int __init fsl_usb_of_init(void)
 {
        struct device_node *np;
        unsigned int i;
-       struct platform_device *usb_dev_mph = NULL, *usb_dev_dr = NULL;
+       struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
+               *usb_dev_dr_client = NULL;
        int ret;
 
        for (np = NULL, i = 0;
@@ -507,33 +508,72 @@ static int __init fsl_usb_of_init(void)
 
                of_irq_to_resource(np, 0, &r[1]);
 
-               usb_dev_dr =
-                   platform_device_register_simple("fsl-ehci", i, r, 2);
-               if (IS_ERR(usb_dev_dr)) {
-                       ret = PTR_ERR(usb_dev_dr);
+               prop = get_property(np, "dr_mode", NULL);
+
+               if (!prop || !strcmp(prop, "host")) {
+                       usb_data.operating_mode = FSL_USB2_DR_HOST;
+                       usb_dev_dr_host = platform_device_register_simple(
+                                       "fsl-ehci", i, r, 2);
+                       if (IS_ERR(usb_dev_dr_host)) {
+                               ret = PTR_ERR(usb_dev_dr_host);
+                               goto err;
+                       }
+               } else if (prop && !strcmp(prop, "peripheral")) {
+                       usb_data.operating_mode = FSL_USB2_DR_DEVICE;
+                       usb_dev_dr_client = platform_device_register_simple(
+                                       "fsl-usb2-udc", i, r, 2);
+                       if (IS_ERR(usb_dev_dr_client)) {
+                               ret = PTR_ERR(usb_dev_dr_client);
+                               goto err;
+                       }
+               } else if (prop && !strcmp(prop, "otg")) {
+                       usb_data.operating_mode = FSL_USB2_DR_OTG;
+                       usb_dev_dr_host = platform_device_register_simple(
+                                       "fsl-ehci", i, r, 2);
+                       if (IS_ERR(usb_dev_dr_host)) {
+                               ret = PTR_ERR(usb_dev_dr_host);
+                               goto err;
+                       }
+                       usb_dev_dr_client = platform_device_register_simple(
+                                       "fsl-usb2-udc", i, r, 2);
+                       if (IS_ERR(usb_dev_dr_client)) {
+                               ret = PTR_ERR(usb_dev_dr_client);
+                               goto err;
+                       }
+               } else {
+                       ret = -EINVAL;
                        goto err;
                }
 
-               usb_dev_dr->dev.coherent_dma_mask = 0xffffffffUL;
-               usb_dev_dr->dev.dma_mask = &usb_dev_dr->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_dr, &usb_data,
-                                            sizeof(struct
-                                                   fsl_usb2_platform_data));
-               if (ret)
-                       goto unreg_dr;
+               if (usb_dev_dr_host) {
+                       usb_dev_dr_host->dev.coherent_dma_mask = 0xffffffffUL;
+                       usb_dev_dr_host->dev.dma_mask = &usb_dev_dr_host->
+                               dev.coherent_dma_mask;
+                       if ((ret = platform_device_add_data(usb_dev_dr_host,
+                                               &usb_data, sizeof(struct
+                                               fsl_usb2_platform_data))))
+                               goto unreg_dr;
+               }
+               if (usb_dev_dr_client) {
+                       usb_dev_dr_client->dev.coherent_dma_mask = 0xffffffffUL;
+                       usb_dev_dr_client->dev.dma_mask = &usb_dev_dr_client->
+                               dev.coherent_dma_mask;
+                       if ((ret = platform_device_add_data(usb_dev_dr_client,
+                                               &usb_data, sizeof(struct
+                                               fsl_usb2_platform_data))))
+                               goto unreg_dr;
+               }
        }
        return 0;
 
 unreg_dr:
-       if (usb_dev_dr)
-               platform_device_unregister(usb_dev_dr);
+       if (usb_dev_dr_host)
+               platform_device_unregister(usb_dev_dr_host);
+       if (usb_dev_dr_client)
+               platform_device_unregister(usb_dev_dr_client);
 unreg_mph:
        if (usb_dev_mph)
                platform_device_unregister(usb_dev_mph);
@@ -699,7 +739,7 @@ static int __init fs_enet_of_init(void)
                                if (ret)
                                        goto unreg;
                        }
-                       
+
                        of_node_put(phy);
                        of_node_put(mdio);
 
index aa701cc27ecc5e20af599e4d66c28ca0c81f097c..4e54a09dd33b1fc0c197ad77fa4c47123ba6b0a5 100644 (file)
@@ -1395,4 +1395,25 @@ void smp_mpic_message_pass(int target, int msg)
                break;
        }
 }
+
+int __init smp_mpic_probe(void)
+{
+       int nr_cpus;
+
+       DBG("smp_mpic_probe()...\n");
+
+       nr_cpus = cpus_weight(cpu_possible_map);
+
+       DBG("nr_cpus: %d\n", nr_cpus);
+
+       if (nr_cpus > 1)
+               mpic_request_ipis();
+
+       return nr_cpus;
+}
+
+void __devinit smp_mpic_setup_cpu(int cpu)
+{
+       mpic_setup_this_cpu();
+}
 #endif /* CONFIG_SMP */
index 47b56203f47ee0017656ba1d654f831b8dd2e74d..0e97e5c94f8ac98e318eee16ceade00f23aac308 100644 (file)
@@ -179,7 +179,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
        uccs->us_info = us_info;
        uccs->saved_uccm = 0;
        uccs->p_rx_frame = 0;
-       uccs->us_regs = us_info->us_regs;
+       uccs->us_regs = us_info->regs;
        us_regs = uccs->us_regs;
        uccs->p_ucce = (u16 *) & (us_regs->ucce);
        uccs->p_uccm = (u16 *) & (us_regs->uccm);
@@ -206,7 +206,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
        uccs->us_pram = qe_muram_addr(uccs->us_pram_offset);
 
        /* Init Guemr register */
-       if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->us_regs)))) {
+       if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->regs)))) {
                uccs_err("ucc_slow_init: Could not init the guemr register.");
                ucc_slow_free(uccs);
                return ret;
@@ -214,7 +214,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
 
        /* Set UCC to slow type */
        if ((ret = ucc_set_type(us_info->ucc_num,
-                               (struct ucc_common *) (us_info->us_regs),
+                               (struct ucc_common *) (us_info->regs),
                                UCC_SPEED_TYPE_SLOW))) {
                uccs_err("ucc_slow_init: Could not init the guemr register.");
                ucc_slow_free(uccs);
index 77540a2f77040734396570889e6127230d965404..0183e5fbaf46bc7ccb7b159b0035a94c72b23c3c 100644 (file)
@@ -2811,7 +2811,6 @@ static void dump_spu_fields(struct spu *spu)
        DUMP_FIELD(spu, "0x%lx", irqs[2]);
        DUMP_FIELD(spu, "0x%x", slb_replace);
        DUMP_FIELD(spu, "%d", pid);
-       DUMP_FIELD(spu, "%d", prio);
        DUMP_FIELD(spu, "0x%p", mm);
        DUMP_FIELD(spu, "0x%p", ctx);
        DUMP_FIELD(spu, "0x%p", rq);
diff --git a/arch/ppc/configs/taishan_defconfig b/arch/ppc/configs/taishan_defconfig
new file mode 100644 (file)
index 0000000..1ca0204
--- /dev/null
@@ -0,0 +1,1077 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20
+# Mon Feb 12 11:11:58 2007
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=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_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_HOTPLUG is not set
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=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 is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF 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"
+
+#
+# Processor
+#
+# CONFIG_6xx is not set
+# CONFIG_40x is not set
+CONFIG_44x=y
+# CONFIG_8xx is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+CONFIG_PPC_DCR_NATIVE=y
+CONFIG_PPC_DCR=y
+CONFIG_BOOKE=y
+CONFIG_PTE_64BIT=y
+CONFIG_PHYS_64BIT=y
+# CONFIG_MATH_EMULATION is not set
+# CONFIG_KEXEC is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_4xx=y
+CONFIG_WANT_EARLY_SERIAL=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_BAMBOO is not set
+# CONFIG_EBONY is not set
+# CONFIG_LUAN is not set
+# CONFIG_YUCCA is not set
+# CONFIG_OCOTEA is not set
+CONFIG_TAISHAN=y
+CONFIG_440GX=y
+CONFIG_440A=y
+CONFIG_IBM_OCP=y
+CONFIG_IBM_EMAC4=y
+CONFIG_PPC4xx_DMA=y
+CONFIG_PPC4xx_EDMA=y
+CONFIG_PPC_GEN550=y
+CONFIG_NOT_COHERENT_CACHE=y
+
+#
+# Platform options
+#
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# 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_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="ip=on console=ttyS0,115200"
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+# CONFIG_PPC_I8259 is not set
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_DEBUG is not set
+
+#
+# PCCARD (PCMCIA/CardBus) 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_CONSISTENT_START=0xff100000
+CONFIG_CONSISTENT_SIZE=0x00200000
+CONFIG_BOOT_LOAD=0x01000000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_MULTIPLE_TABLES is not set
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+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_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_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK 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
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+CONFIG_BRIDGE=y
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+CONFIG_LLC=y
+# 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
+# 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 is not set
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PCI is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_NAND_CAFE is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND 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_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM 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_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=65536
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE 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
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA 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
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+# CONFIG_MAC_EMUMOUSEBTN is not set
+# 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
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+CONFIG_IBM_EMAC=y
+CONFIG_IBM_EMAC_RXB=128
+CONFIG_IBM_EMAC_TXB=128
+CONFIG_IBM_EMAC_POLL_WEIGHT=32
+CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
+CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
+CONFIG_IBM_EMAC_PHY_RX_CLK_FIX=y
+# CONFIG_IBM_EMAC_DEBUG is not set
+CONFIG_IBM_EMAC_ZMII=y
+CONFIG_IBM_EMAC_RGMII=y
+CONFIG_IBM_EMAC_TAH=y
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=y
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_SC92031 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PPP=y
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+# CONFIG_PPP_ASYNC is not set
+# CONFIG_PPP_SYNC_TTY is not set
+# CONFIG_PPP_DEFLATE is not set
+# CONFIG_PPP_BSDCOMP is not set
+# CONFIG_PPP_MPPE is not set
+CONFIG_PPPOE=y
+# CONFIG_SLIP is not set
+CONFIG_SLHC=y
+# 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 is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW 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_PCI=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+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_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_IBM_IIC=y
+# CONFIG_I2C_MPC is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+CONFIG_SENSORS_EEPROM=y
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_M41T00 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP 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=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB 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
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# Auxiliary Display support
+#
+
+#
+# Virtualization
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT2_FS_XIP=y
+CONFIG_FS_XIP=y
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+CONFIG_JBD_DEBUG=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_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_INOTIFY_USER=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_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# 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_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN 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 is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK 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_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+CONFIG_BDI_SWITCH=y
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+CONFIG_PPC_OCP=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
index 66877bdfe0b7b8c5a20d2d0bdc7df02b4594152c..1f155d399d576859ab502f0149bf2032285f3e49 100644 (file)
@@ -206,7 +206,8 @@ skpinv:     addi    r6,r6,1                         /* Increment */
        rlwimi  r7,r3,16,4,15   /* Setup MAS0 = TLBSEL | ESEL(r3) */
        mtspr   SPRN_MAS0,r7
        tlbre
-       li      r6,0
+       mfspr   r6,SPRN_MAS1
+       rlwinm  r6,r6,0,2,0     /* clear IPROT */
        mtspr   SPRN_MAS1,r6
        tlbwe
        /* Invalidate TLB1 */
@@ -248,6 +249,8 @@ skpinv:     addi    r6,r6,1                         /* Increment */
        rlwimi  r7,r5,16,4,15   /* Setup MAS0 = TLBSEL | ESEL(r5) */
        mtspr   SPRN_MAS0,r7
        tlbre
+       mfspr   r8,SPRN_MAS1
+       rlwinm  r8,r8,0,2,0     /* clear IPROT */
        mtspr   SPRN_MAS1,r8
        tlbwe
        /* Invalidate TLB1 */
@@ -889,7 +892,6 @@ load_up_spe:
        REST_GPR(9, r11)
        REST_GPR(12, r11)
        lwz     r11,GPR11(r11)
-       SYNC
        rfi
 
 /*
@@ -953,7 +955,6 @@ _GLOBAL(giveup_altivec)
 _GLOBAL(giveup_spe)
        mfmsr   r5
        oris    r5,r5,MSR_SPE@h
-       SYNC
        mtmsr   r5                      /* enable use of SPE now */
        isync
        cmpi    0,r3,0
index 1f49503317cb424789a78bdbcd5668ec9dbbc10e..1318b6f4c3df5f96d5d02d276af582f1807bae93 100644 (file)
@@ -271,7 +271,7 @@ EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
 extern long *intercept_table;
 EXPORT_SYMBOL(intercept_table);
 #endif /* CONFIG_PPC_STD_MMU */
-#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
+#ifdef CONFIG_PPC_DCR_NATIVE
 EXPORT_SYMBOL(__mtdcr);
 EXPORT_SYMBOL(__mfdcr);
 #endif
index 82b06a1ef95d6e532415bfb238d43311e5778e28..c023b7298809b282639168eb2125f4e9d3218de0 100644 (file)
@@ -314,7 +314,7 @@ void __init mapin_ram(void)
 }
 
 /* is x a power of 4? */
-#define is_power_of_4(x)       is_power_of_2(x) && (ffs(x) & 1))
+#define is_power_of_4(x)       is_power_of_2(x) && (ffs(x) & 1)
 
 /*
  * Set up a mapping for a block of I/O.
index 6980de420e920af1000a692ba9ef63ef29faab02..705ae56016f002e7f17e55eb1364bdc10063822e 100644 (file)
@@ -98,6 +98,12 @@ config OCOTEA
        help
          This option enables support for the IBM PPC440GX evaluation board.
 
+config TAISHAN
+       bool "Taishan"
+       select WANT_EARLY_SERIAL
+       help
+         This option enables support for the AMCC PPC440GX evaluation board.
+
 endchoice
 
 config EP405PC
@@ -126,7 +132,7 @@ config 440GP
 
 config 440GX
        bool
-       depends on OCOTEA
+       depends on OCOTEA || TAISHAN
        default y
 
 config 440SP
@@ -173,7 +179,7 @@ config BOOKE
 
 config IBM_OCP
        bool
-       depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
+       depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || TAISHAN || WALNUT
        default y
 
 config IBM_EMAC4
index a04a0d0a0f5cd6b7670e0af81890a76b6e0bf2aa..fa6610bccaf9872fa6be6af592d025f51652f56e 100644 (file)
@@ -12,6 +12,7 @@ obj-$(CONFIG_OCOTEA)          += ocotea.o
 obj-$(CONFIG_REDWOOD_5)                += redwood5.o
 obj-$(CONFIG_REDWOOD_6)                += redwood6.o
 obj-$(CONFIG_SYCAMORE)         += sycamore.o
+obj-$(CONFIG_TAISHAN)          += taishan.o
 obj-$(CONFIG_WALNUT)           += walnut.o
 obj-$(CONFIG_XILINX_ML300)     += xilinx_ml300.o
 obj-$(CONFIG_XILINX_ML403)     += xilinx_ml403.o
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
new file mode 100644 (file)
index 0000000..bb0253e
--- /dev/null
@@ -0,0 +1,395 @@
+/*
+ * arch/ppc/platforms/4xx/taishan.c
+ *
+ * AMCC Taishan board specific routines
+ *
+ * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
+ *
+ * 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/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/types.h>
+#include <linux/major.h>
+#include <linux/blkdev.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/ide.h>
+#include <linux/initrd.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+#include <linux/tty.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/ndfc.h>
+#include <linux/mtd/physmap.h>
+
+#include <asm/machdep.h>
+#include <asm/ocp.h>
+#include <asm/bootinfo.h>
+#include <asm/ppcboot.h>
+
+#include <syslib/gen550.h>
+#include <syslib/ibm440gx_common.h>
+
+extern bd_t __res;
+
+static struct ibm44x_clocks clocks __initdata;
+
+/*
+ * NOR FLASH configuration (using mtd physmap driver)
+ */
+
+/* start will be added dynamically, end is always fixed */
+static struct resource taishan_nor_resource = {
+       .start = TAISHAN_FLASH_ADDR,
+       .end   = 0x1ffffffffULL,
+       .flags = IORESOURCE_MEM,
+};
+
+#define RW_PART0_OF    0
+#define RW_PART0_SZ    0x180000
+#define RW_PART1_SZ    0x200000
+/* Partition 2 will be autosized dynamically... */
+#define RW_PART3_SZ    0x80000
+#define RW_PART4_SZ    0x40000
+
+static struct mtd_partition taishan_nor_parts[] = {
+       {
+               .name = "kernel",
+               .offset = 0,
+               .size = RW_PART0_SZ
+       },
+       {
+               .name = "root",
+               .offset = MTDPART_OFS_APPEND,
+               .size = RW_PART1_SZ,
+       },
+       {
+               .name = "user",
+               .offset = MTDPART_OFS_APPEND,
+/*             .size = RW_PART2_SZ */ /* will be adjusted dynamically */
+       },
+       {
+               .name = "env",
+               .offset = MTDPART_OFS_APPEND,
+               .size = RW_PART3_SZ,
+       },
+       {
+               .name = "u-boot",
+               .offset = MTDPART_OFS_APPEND,
+               .size = RW_PART4_SZ,
+       }
+};
+
+static struct physmap_flash_data taishan_nor_data = {
+       .width          = 4,
+       .parts          = taishan_nor_parts,
+       .nr_parts       = ARRAY_SIZE(taishan_nor_parts),
+};
+
+static struct platform_device taishan_nor_device = {
+       .name           = "physmap-flash",
+       .id             = 0,
+       .dev = {
+                       .platform_data = &taishan_nor_data,
+               },
+       .num_resources  = 1,
+       .resource       = &taishan_nor_resource,
+};
+
+static int taishan_setup_flash(void)
+{
+       /*
+        * Adjust partition 2 to flash size
+        */
+       taishan_nor_parts[2].size = __res.bi_flashsize -
+               RW_PART0_SZ - RW_PART1_SZ - RW_PART3_SZ - RW_PART4_SZ;
+
+       platform_device_register(&taishan_nor_device);
+
+       return 0;
+}
+arch_initcall(taishan_setup_flash);
+
+static void __init
+taishan_calibrate_decr(void)
+{
+       unsigned int freq;
+
+       if (mfspr(SPRN_CCR1) & CCR1_TCS)
+               freq = TAISHAN_TMR_CLK;
+       else
+               freq = clocks.cpu;
+
+       ibm44x_calibrate_decr(freq);
+}
+
+static int
+taishan_show_cpuinfo(struct seq_file *m)
+{
+       seq_printf(m, "vendor\t\t: AMCC\n");
+       seq_printf(m, "machine\t\t: PPC440GX EVB (Taishan)\n");
+       ibm440gx_show_cpuinfo(m);
+       return 0;
+}
+
+static inline int
+taishan_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+       static char pci_irq_table[][4] =
+       /*
+        *      PCI IDSEL/INTPIN->INTLINE
+        *         A   B   C   D
+        */
+       {
+               { 23, 24, 25, 26 },     /* IDSEL 1 - PCI Slot 0 */
+               { 24, 25, 26, 23 },     /* IDSEL 2 - PCI Slot 1 */
+       };
+
+       const long min_idsel = 1, max_idsel = 2, irqs_per_slot = 4;
+       return PCI_IRQ_TABLE_LOOKUP;
+}
+
+static void __init taishan_set_emacdata(void)
+{
+       struct ocp_def *def;
+       struct ocp_func_emac_data *emacdata;
+       int i;
+
+       /* Set phy_map, phy_mode, and mac_addr for each EMAC */
+       for (i=2; i<4; i++) {
+               def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, i);
+               emacdata = def->additions;
+               if (i < 2) {
+                       emacdata->phy_map = 0x00000001; /* Skip 0x00 */
+                       emacdata->phy_mode = PHY_MODE_SMII;
+               } else {
+                       emacdata->phy_map = 0x00000001; /* Skip 0x00 */
+                       emacdata->phy_mode = PHY_MODE_RGMII;
+               }
+               if (i == 0)
+                       memcpy(emacdata->mac_addr, "\0\0\0\0\0\0", 6);
+               else if (i == 1)
+                       memcpy(emacdata->mac_addr, "\0\0\0\0\0\0", 6);
+               else if (i == 2)
+                       memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6);
+               else if (i == 3)
+                       memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6);
+       }
+}
+
+#define PCIX_READW(offset) \
+       (readw(pcix_reg_base+offset))
+
+#define PCIX_WRITEW(value, offset) \
+       (writew(value, pcix_reg_base+offset))
+
+#define PCIX_WRITEL(value, offset) \
+       (writel(value, pcix_reg_base+offset))
+
+/*
+ * FIXME: This is only here to "make it work".  This will move
+ * to a ibm_pcix.c which will contain a generic IBM PCIX bridge
+ * configuration library. -Matt
+ */
+static void __init
+taishan_setup_pcix(void)
+{
+       void *pcix_reg_base;
+
+       pcix_reg_base = ioremap64(PCIX0_REG_BASE, PCIX_REG_SIZE);
+
+       /* Enable PCIX0 I/O, Mem, and Busmaster cycles */
+       PCIX_WRITEW(PCIX_READW(PCIX0_COMMAND) | PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, PCIX0_COMMAND);
+
+       /* Disable all windows */
+       PCIX_WRITEL(0, PCIX0_POM0SA);
+       PCIX_WRITEL(0, PCIX0_POM1SA);
+       PCIX_WRITEL(0, PCIX0_POM2SA);
+       PCIX_WRITEL(0, PCIX0_PIM0SA);
+       PCIX_WRITEL(0, PCIX0_PIM0SAH);
+       PCIX_WRITEL(0, PCIX0_PIM1SA);
+       PCIX_WRITEL(0, PCIX0_PIM2SA);
+       PCIX_WRITEL(0, PCIX0_PIM2SAH);
+
+       /* Setup 2GB PLB->PCI outbound mem window (3_8000_0000->0_8000_0000) */
+       PCIX_WRITEL(0x00000003, PCIX0_POM0LAH);
+       PCIX_WRITEL(0x80000000, PCIX0_POM0LAL);
+       PCIX_WRITEL(0x00000000, PCIX0_POM0PCIAH);
+       PCIX_WRITEL(0x80000000, PCIX0_POM0PCIAL);
+       PCIX_WRITEL(0x80000001, PCIX0_POM0SA);
+
+       /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */
+       PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH);
+       PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL);
+       PCIX_WRITEL(0xe0000007, PCIX0_PIM0SA);
+       PCIX_WRITEL(0xffffffff, PCIX0_PIM0SAH);
+
+       iounmap(pcix_reg_base);
+
+       eieio();
+}
+
+static void __init
+taishan_setup_hose(void)
+{
+       struct pci_controller *hose;
+
+       /* Configure windows on the PCI-X host bridge */
+       taishan_setup_pcix();
+
+       hose = pcibios_alloc_controller();
+
+       if (!hose)
+               return;
+
+       hose->first_busno = 0;
+       hose->last_busno = 0xff;
+
+       hose->pci_mem_offset = TAISHAN_PCI_MEM_OFFSET;
+
+       pci_init_resource(&hose->io_resource,
+                       TAISHAN_PCI_LOWER_IO,
+                       TAISHAN_PCI_UPPER_IO,
+                       IORESOURCE_IO,
+                       "PCI host bridge");
+
+       pci_init_resource(&hose->mem_resources[0],
+                       TAISHAN_PCI_LOWER_MEM,
+                       TAISHAN_PCI_UPPER_MEM,
+                       IORESOURCE_MEM,
+                       "PCI host bridge");
+
+       hose->io_space.start = TAISHAN_PCI_LOWER_IO;
+       hose->io_space.end = TAISHAN_PCI_UPPER_IO;
+       hose->mem_space.start = TAISHAN_PCI_LOWER_MEM;
+       hose->mem_space.end = TAISHAN_PCI_UPPER_MEM;
+       hose->io_base_virt = ioremap64(TAISHAN_PCI_IO_BASE, TAISHAN_PCI_IO_SIZE);
+       isa_io_base = (unsigned long) hose->io_base_virt;
+
+       setup_indirect_pci(hose,
+                       TAISHAN_PCI_CFGA_PLB32,
+                       TAISHAN_PCI_CFGD_PLB32);
+       hose->set_cfg_type = 1;
+
+       hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
+
+       ppc_md.pci_swizzle = common_swizzle;
+       ppc_md.pci_map_irq = taishan_map_irq;
+}
+
+
+static void __init
+taishan_early_serial_map(void)
+{
+       struct uart_port port;
+
+       /* Setup ioremapped serial port access */
+       memset(&port, 0, sizeof(port));
+       port.membase = ioremap64(PPC440GX_UART0_ADDR, 8);
+       port.irq = UART0_INT;
+       port.uartclk = clocks.uart0;
+       port.regshift = 0;
+       port.iotype = UPIO_MEM;
+       port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
+       port.line = 0;
+
+       if (early_serial_setup(&port) != 0)
+               printk("Early serial init of port 0 failed\n");
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+       /* Configure debug serial access */
+       gen550_init(0, &port);
+
+       /* Purge TLB entry added in head_44x.S for early serial access */
+       _tlbie(UART0_IO_BASE);
+#endif
+
+       port.membase = ioremap64(PPC440GX_UART1_ADDR, 8);
+       port.irq = UART1_INT;
+       port.uartclk = clocks.uart1;
+       port.line = 1;
+
+       if (early_serial_setup(&port) != 0)
+               printk("Early serial init of port 1 failed\n");
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+       /* Configure debug serial access */
+       gen550_init(1, &port);
+#endif
+}
+
+static void __init
+taishan_setup_arch(void)
+{
+       taishan_set_emacdata();
+
+       ibm440gx_tah_enable();
+
+       /*
+        * Determine various clocks.
+        * To be completely correct we should get SysClk
+        * from FPGA, because it can be changed by on-board switches
+        * --ebs
+        */
+       ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200);
+       ocp_sys_info.opb_bus_freq = clocks.opb;
+
+       /* init to some ~sane value until calibrate_delay() runs */
+        loops_per_jiffy = 50000000/HZ;
+
+       /* Setup PCI host bridge */
+       taishan_setup_hose();
+
+#ifdef CONFIG_BLK_DEV_INITRD
+       if (initrd_start)
+               ROOT_DEV = Root_RAM0;
+       else
+#endif
+#ifdef CONFIG_ROOT_NFS
+               ROOT_DEV = Root_NFS;
+#else
+               ROOT_DEV = Root_HDA1;
+#endif
+
+       taishan_early_serial_map();
+
+       /* Identify the system */
+       printk("AMCC PowerPC 440GX Taishan Platform\n");
+}
+
+static void __init taishan_init(void)
+{
+       ibm440gx_l2c_setup(&clocks);
+}
+
+void __init platform_init(unsigned long r3, unsigned long r4,
+               unsigned long r5, unsigned long r6, unsigned long r7)
+{
+       ibm44x_platform_init(r3, r4, r5, r6, r7);
+
+       ppc_md.setup_arch = taishan_setup_arch;
+       ppc_md.show_cpuinfo = taishan_show_cpuinfo;
+       ppc_md.get_irq = NULL;          /* Set in ppc4xx_pic_init() */
+
+       ppc_md.calibrate_decr = taishan_calibrate_decr;
+
+#ifdef CONFIG_KGDB
+       ppc_md.early_serial_map = taishan_early_serial_map;
+#endif
+       ppc_md.init = taishan_init;
+}
+
diff --git a/arch/ppc/platforms/4xx/taishan.h b/arch/ppc/platforms/4xx/taishan.h
new file mode 100644 (file)
index 0000000..ea7561a
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * arch/ppc/platforms/4xx/taishan.h
+ *
+ * AMCC Taishan board definitions
+ *
+ * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
+ *
+ * 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.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_TAISHAN_H__
+#define __ASM_TAISHAN_H__
+
+#include <platforms/4xx/ibm440gx.h>
+
+/* External timer clock frequency */
+#define TAISHAN_TMR_CLK        25000000
+
+/* Flash */
+#define TAISHAN_FPGA_ADDR              0x0000000141000000ULL
+#define TAISHAN_LCM_ADDR               0x0000000142000000ULL
+#define TAISHAN_FLASH_ADDR             0x00000001fc000000ULL
+#define TAISHAN_FLASH_SIZE             0x4000000
+
+/*
+ * Serial port defines
+ */
+#define RS_TABLE_SIZE  2
+
+/* head_44x.S created UART mapping, used before early_serial_setup.
+ * We cannot use default OpenBIOS UART mappings because they
+ * don't work for configurations with more than 512M RAM.    --ebs
+ */
+#define UART0_IO_BASE  0xF0000200
+#define UART1_IO_BASE  0xF0000300
+
+#define BASE_BAUD      11059200/16
+#define STD_UART_OP(num)                                       \
+       { 0, BASE_BAUD, 0, UART##num##_INT,                     \
+               (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),        \
+               iomem_base: (void*)UART##num##_IO_BASE,         \
+               io_type: SERIAL_IO_MEM},
+
+#define SERIAL_PORT_DFNS       \
+       STD_UART_OP(0)          \
+       STD_UART_OP(1)
+
+/* PCI support */
+#define TAISHAN_PCI_LOWER_IO   0x00000000
+#define TAISHAN_PCI_UPPER_IO   0x0000ffff
+#define TAISHAN_PCI_LOWER_MEM  0x80000000
+#define TAISHAN_PCI_UPPER_MEM  0xffffefff
+
+#define TAISHAN_PCI_CFGA_PLB32 0x0ec00000
+#define TAISHAN_PCI_CFGD_PLB32 0x0ec00004
+
+#define TAISHAN_PCI_IO_BASE    0x0000000208000000ULL
+#define TAISHAN_PCI_IO_SIZE    0x00010000
+#define TAISHAN_PCI_MEM_OFFSET 0x00000000
+
+#endif                         /* __ASM_TAISHAN_H__ */
+#endif                         /* __KERNEL__ */
index d84f04666972d579ac15444566a20e9b2ba567d4..09911118c6750c4c7bda5a8999061afc8e89342b 100644 (file)
@@ -69,6 +69,7 @@ obj-$(CONFIG_SANDPOINT)               += pci_auto.o todc_time.o
 obj-$(CONFIG_SBC82xx)          += todc_time.o
 obj-$(CONFIG_SPRUCE)           += cpc700_pic.o pci_auto.o \
                                   todc_time.o
+obj-$(CONFIG_TAISHAN)          += pci_auto.o
 obj-$(CONFIG_8260)             += m8260_setup.o pq2_devices.o pq2_sys.o \
                                   ppc_sys.o
 obj-$(CONFIG_PCI_8260)         += m82xx_pci.o pci_auto.o
index 8338be0990bce2854078bfef18e45ccef0836ca2..bb54b6cdb30b8a1ed42bfe0f9b9f78cb3739ed2f 100644 (file)
@@ -340,6 +340,7 @@ static int acpi_ec_hc_add(struct acpi_device *device)
        smbus->adapter.owner = THIS_MODULE;
        smbus->adapter.algo = &acpi_ec_smbus_algorithm;
        smbus->adapter.algo_data = smbus;
+       smbus->adapter.dev.parent = &device->dev;
 
        if (i2c_add_adapter(&smbus->adapter)) {
                ACPI_DEBUG_PRINT((ACPI_DB_WARN,
index d7378df44970bb1856aa52af9af4014e67efcce3..29e1809e5ecf3ce9aea4c7899d3457b64ad4716b 100644 (file)
@@ -484,10 +484,8 @@ mpc52xx_ata_resume(struct of_device *op)
 
 static struct of_device_id mpc52xx_ata_of_match[] = {
        {
-               .compatible = "mpc5200-ata",
-       },
-       {
-               .compatible = "mpc52xx-ata",
+               .type           = "ata",
+               .compatible     = "mpc5200-ata",
        },
        {},
 };
index c654a3e0c697b36f008b934a8ed276bb6c110373..cb8d691576da5c30a084db075686c7286158b048 100644 (file)
@@ -596,7 +596,6 @@ static void fn_spawn_con(struct vc_data *vc)
 static void fn_SAK(struct vc_data *vc)
 {
        struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
-       PREPARE_WORK(SAK_work, vc_SAK);
        schedule_work(SAK_work);
 }
 
index 3757610b7835d4952e992563821293e6cc781fcd..be73c80d699d5edc4570a5e09c83af3727bc333d 100644 (file)
@@ -89,7 +89,6 @@ static struct sysrq_key_op sysrq_loglevel_op = {
 static void sysrq_handle_SAK(int key, struct tty_struct *tty)
 {
        struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
-       PREPARE_WORK(SAK_work, vc_SAK);
        schedule_work(SAK_work);
 }
 static struct sysrq_key_op sysrq_SAK_op = {
index 65672c57470b87282c3f4a73d261564310ca5565..5289254e7ab3f1e0d0fdfbf48e411e07fdc9c31a 100644 (file)
@@ -3442,7 +3442,6 @@ void do_SAK(struct tty_struct *tty)
 {
        if (!tty)
                return;
-       PREPARE_WORK(&tty->SAK_work, do_SAK_work);
        schedule_work(&tty->SAK_work);
 }
 
@@ -3568,7 +3567,7 @@ static void initialize_tty_struct(struct tty_struct *tty)
        mutex_init(&tty->atomic_write_lock);
        spin_lock_init(&tty->read_lock);
        INIT_LIST_HEAD(&tty->tty_files);
-       INIT_WORK(&tty->SAK_work, NULL);
+       INIT_WORK(&tty->SAK_work, do_SAK_work);
 }
 
 /*
index 94ce3e7fc9e419be797bcd46647586d30a4457b5..c3f8e383933bbb957ffd2f50982558eb5cf08b81 100644 (file)
@@ -2635,6 +2635,7 @@ static int __init con_init(void)
         */
        for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) {
                vc_cons[currcons].d = vc = alloc_bootmem(sizeof(struct vc_data));
+               INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
                visual_init(vc, currcons, 1);
                vc->vc_screenbuf = (unsigned short *)alloc_bootmem(vc->vc_screenbuf_size);
                vc->vc_kmalloced = 0;
index 154d67e591e5c928b6cd59b97a746e994c46b8d8..85269c365a101986d631cd6f0cabdb71272a6fa2 100644 (file)
  *             It can be 1, 2, 10, 20, 110 or 220 seconds.
  */
 
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/types.h>
-#include <linux/miscdevice.h>
-#include <linux/watchdog.h>
-#include <linux/fs.h>
-#include <linux/ioport.h>
-#include <linux/notifier.h>
-#include <linux/reboot.h>
-#include <linux/init.h>
-
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
+/*
+ *     Includes, defines, variables, module parameters, ...
+ */
 
+/* Includes */
+#include <linux/module.h>              /* For module specific items */
+#include <linux/moduleparam.h>         /* For new moduleparam's */
+#include <linux/types.h>               /* For standard types (like size_t) */
+#include <linux/errno.h>               /* For the -ENODEV/... values */
+#include <linux/kernel.h>              /* For printk/panic/... */
+#include <linux/miscdevice.h>          /* For MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR) */
+#include <linux/watchdog.h>            /* For the watchdog specific items */
+#include <linux/fs.h>                  /* For file operations */
+#include <linux/ioport.h>              /* For io-port access */
+#include <linux/platform_device.h>     /* For platform_driver framework */
+#include <linux/init.h>                        /* For __init/__exit/... */
+
+#include <asm/uaccess.h>               /* For copy_to_user/put_user/... */
+#include <asm/io.h>                    /* For inb/outb/... */
+
+/* Module information */
+#define DRV_NAME "acquirewdt"
+#define PFX DRV_NAME ": "
 #define WATCHDOG_NAME "Acquire WDT"
-#define PFX WATCHDOG_NAME ": "
 #define WATCHDOG_HEARTBEAT 0   /* There is no way to see what the correct time-out period is */
 
+/* internal variables */
+static struct platform_device *acq_platform_device;    /* the watchdog platform device */
 static unsigned long acq_is_open;
 static char expect_close;
 
-/*
- *     You must set these - there is no sane way to probe for this board.
- */
-
-static int wdt_stop = 0x43;
+/* module parameters */
+static int wdt_stop = 0x43;    /* You must set this - there is no sane way to probe for this board. */
 module_param(wdt_stop, int, 0);
 MODULE_PARM_DESC(wdt_stop, "Acquire WDT 'stop' io port (default 0x43)");
 
-static int wdt_start = 0x443;
+static int wdt_start = 0x443;  /* You must set this - there is no sane way to probe for this board. */
 module_param(wdt_start, int, 0);
 MODULE_PARM_DESC(wdt_start, "Acquire WDT 'start' io port (default 0x443)");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
- *     Kernel methods.
+ *     Watchdog Operations
  */
 
 static void acq_keepalive(void)
@@ -103,7 +109,7 @@ static void acq_stop(void)
 }
 
 /*
- *     /dev/watchdog handling.
+ *     /dev/watchdog handling
  */
 
 static ssize_t acq_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
@@ -143,7 +149,7 @@ static int acq_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        {
                .options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
                .firmware_version = 1,
-               .identity = "Acquire WDT",
+               .identity = WATCHDOG_NAME,
        };
 
        switch(cmd)
@@ -213,20 +219,6 @@ static int acq_close(struct inode *inode, struct file *file)
        return 0;
 }
 
-/*
- *     Notifier for system down
- */
-
-static int acq_notify_sys(struct notifier_block *this, unsigned long code,
-       void *unused)
-{
-       if(code==SYS_DOWN || code==SYS_HALT) {
-               /* Turn the WDT off */
-               acq_stop();
-       }
-       return NOTIFY_DONE;
-}
-
 /*
  *     Kernel Interfaces
  */
@@ -240,29 +232,20 @@ static const struct file_operations acq_fops = {
        .release        = acq_close,
 };
 
-static struct miscdevice acq_miscdev=
-{
-       .minor = WATCHDOG_MINOR,
-       .name = "watchdog",
-       .fops = &acq_fops,
+static struct miscdevice acq_miscdev = {
+       .minor  = WATCHDOG_MINOR,
+       .name   = "watchdog",
+       .fops   = &acq_fops,
 };
 
 /*
- *     The WDT card needs to learn about soft shutdowns in order to
- *     turn the timebomb registers off.
+ *     Init & exit routines
  */
 
-static struct notifier_block acq_notifier =
-{
-       .notifier_call = acq_notify_sys,
-};
-
-static int __init acq_init(void)
+static int __devinit acq_probe(struct platform_device *dev)
 {
        int ret;
 
-       printk(KERN_INFO "WDT driver for Acquire single board computer initialising.\n");
-
        if (wdt_stop != wdt_start) {
                if (!request_region(wdt_stop, 1, WATCHDOG_NAME)) {
                        printk (KERN_ERR PFX "I/O address 0x%04x already in use\n",
@@ -279,18 +262,11 @@ static int __init acq_init(void)
                goto unreg_stop;
        }
 
-       ret = register_reboot_notifier(&acq_notifier);
-       if (ret != 0) {
-               printk (KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
-                       ret);
-               goto unreg_regions;
-       }
-
        ret = misc_register(&acq_miscdev);
        if (ret != 0) {
                printk (KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
                        WATCHDOG_MINOR, ret);
-               goto unreg_reboot;
+               goto unreg_regions;
        }
 
        printk (KERN_INFO PFX "initialized. (nowayout=%d)\n",
@@ -298,8 +274,6 @@ static int __init acq_init(void)
 
        return 0;
 
-unreg_reboot:
-       unregister_reboot_notifier(&acq_notifier);
 unreg_regions:
        release_region(wdt_start, 1);
 unreg_stop:
@@ -309,13 +283,60 @@ out:
        return ret;
 }
 
-static void __exit acq_exit(void)
+static int __devexit acq_remove(struct platform_device *dev)
 {
        misc_deregister(&acq_miscdev);
-       unregister_reboot_notifier(&acq_notifier);
+       release_region(wdt_start,1);
        if(wdt_stop != wdt_start)
                release_region(wdt_stop,1);
-       release_region(wdt_start,1);
+
+       return 0;
+}
+
+static void acq_shutdown(struct platform_device *dev)
+{
+       /* Turn the WDT off if we have a soft shutdown */
+       acq_stop();
+}
+
+static struct platform_driver acquirewdt_driver = {
+       .probe          = acq_probe,
+       .remove         = __devexit_p(acq_remove),
+       .shutdown       = acq_shutdown,
+       .driver         = {
+               .owner  = THIS_MODULE,
+               .name   = DRV_NAME,
+       },
+};
+
+static int __init acq_init(void)
+{
+       int err;
+
+       printk(KERN_INFO "WDT driver for Acquire single board computer initialising.\n");
+
+       err = platform_driver_register(&acquirewdt_driver);
+       if (err)
+               return err;
+
+       acq_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0);
+       if (IS_ERR(acq_platform_device)) {
+               err = PTR_ERR(acq_platform_device);
+               goto unreg_platform_driver;
+       }
+
+       return 0;
+
+unreg_platform_driver:
+       platform_driver_unregister(&acquirewdt_driver);
+       return err;
+}
+
+static void __exit acq_exit(void)
+{
+       platform_device_unregister(acq_platform_device);
+       platform_driver_unregister(&acquirewdt_driver);
+       printk(KERN_INFO PFX "Watchdog Module Unloaded.\n");
 }
 
 module_init(acq_init);
index 9d732769ba0144bd36a720d4362185dc0bb651d1..8121cc247343a220f7f3a21cda05e0cdb6ea0650 100644 (file)
 #include <linux/watchdog.h>
 #include <linux/fs.h>
 #include <linux/ioport.h>
-#include <linux/notifier.h>
-#include <linux/reboot.h>
+#include <linux/platform_device.h>
 #include <linux/init.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
+#define DRV_NAME "advantechwdt"
+#define PFX DRV_NAME ": "
 #define WATCHDOG_NAME "Advantech WDT"
-#define PFX WATCHDOG_NAME ": "
 #define WATCHDOG_TIMEOUT 60            /* 60 sec default timeout */
 
+static struct platform_device *advwdt_platform_device; /* the watchdog platform device */
 static unsigned long advwdt_is_open;
 static char adv_expect_close;
 
@@ -75,10 +76,10 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=63, defaul
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
- *     Kernel methods.
+ *     Watchdog Operations
  */
 
 static void
@@ -94,6 +95,20 @@ advwdt_disable(void)
        inb_p(wdt_stop);
 }
 
+static int
+advwdt_set_heartbeat(int t)
+{
+       if ((t < 1) || (t > 63))
+               return -EINVAL;
+
+       timeout = t;
+       return 0;
+}
+
+/*
+ *     /dev/watchdog handling
+ */
+
 static ssize_t
 advwdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
@@ -126,7 +141,7 @@ advwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        static struct watchdog_info ident = {
                .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
                .firmware_version = 1,
-               .identity = "Advantech WDT",
+               .identity = WATCHDOG_NAME,
        };
 
        switch (cmd) {
@@ -146,9 +161,8 @@ advwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        case WDIOC_SETTIMEOUT:
          if (get_user(new_timeout, p))
                  return -EFAULT;
-         if ((new_timeout < 1) || (new_timeout > 63))
+         if (advwdt_set_heartbeat(new_timeout))
                  return -EINVAL;
-         timeout = new_timeout;
          advwdt_ping();
          /* Fall */
 
@@ -208,21 +222,6 @@ advwdt_close(struct inode *inode, struct file *file)
        return 0;
 }
 
-/*
- *     Notifier for system down
- */
-
-static int
-advwdt_notify_sys(struct notifier_block *this, unsigned long code,
-       void *unused)
-{
-       if (code == SYS_DOWN || code == SYS_HALT) {
-               /* Turn the WDT off */
-               advwdt_disable();
-       }
-       return NOTIFY_DONE;
-}
-
 /*
  *     Kernel Interfaces
  */
@@ -237,33 +236,20 @@ static const struct file_operations advwdt_fops = {
 };
 
 static struct miscdevice advwdt_miscdev = {
-       .minor = WATCHDOG_MINOR,
-       .name = "watchdog",
-       .fops = &advwdt_fops,
+       .minor  = WATCHDOG_MINOR,
+       .name   = "watchdog",
+       .fops   = &advwdt_fops,
 };
 
 /*
- *     The WDT needs to learn about soft shutdowns in order to
- *     turn the timebomb registers off.
+ *     Init & exit routines
  */
 
-static struct notifier_block advwdt_notifier = {
-       .notifier_call = advwdt_notify_sys,
-};
-
-static int __init
-advwdt_init(void)
+static int __devinit
+advwdt_probe(struct platform_device *dev)
 {
        int ret;
 
-       printk(KERN_INFO "WDT driver for Advantech single board computer initialising.\n");
-
-       if (timeout < 1 || timeout > 63) {
-               timeout = WATCHDOG_TIMEOUT;
-               printk (KERN_INFO PFX "timeout value must be 1<=x<=63, using %d\n",
-                       timeout);
-       }
-
        if (wdt_stop != wdt_start) {
                if (!request_region(wdt_stop, 1, WATCHDOG_NAME)) {
                        printk (KERN_ERR PFX "I/O address 0x%04x already in use\n",
@@ -280,18 +266,18 @@ advwdt_init(void)
                goto unreg_stop;
        }
 
-       ret = register_reboot_notifier(&advwdt_notifier);
-       if (ret != 0) {
-               printk (KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
-                       ret);
-               goto unreg_regions;
+       /* Check that the heartbeat value is within it's range ; if not reset to the default */
+       if (advwdt_set_heartbeat(timeout)) {
+               advwdt_set_heartbeat(WATCHDOG_TIMEOUT);
+               printk (KERN_INFO PFX "timeout value must be 1<=x<=63, using %d\n",
+                       timeout);
        }
 
        ret = misc_register(&advwdt_miscdev);
        if (ret != 0) {
                printk (KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
                        WATCHDOG_MINOR, ret);
-               goto unreg_reboot;
+               goto unreg_regions;
        }
 
        printk (KERN_INFO PFX "initialized. timeout=%d sec (nowayout=%d)\n",
@@ -299,8 +285,6 @@ advwdt_init(void)
 
 out:
        return ret;
-unreg_reboot:
-       unregister_reboot_notifier(&advwdt_notifier);
 unreg_regions:
        release_region(wdt_start, 1);
 unreg_stop:
@@ -309,14 +293,64 @@ unreg_stop:
        goto out;
 }
 
-static void __exit
-advwdt_exit(void)
+static int __devexit
+advwdt_remove(struct platform_device *dev)
 {
        misc_deregister(&advwdt_miscdev);
-       unregister_reboot_notifier(&advwdt_notifier);
+       release_region(wdt_start,1);
        if(wdt_stop != wdt_start)
                release_region(wdt_stop,1);
-       release_region(wdt_start,1);
+
+       return 0;
+}
+
+static void
+advwdt_shutdown(struct platform_device *dev)
+{
+       /* Turn the WDT off if we have a soft shutdown */
+       advwdt_disable();
+}
+
+static struct platform_driver advwdt_driver = {
+       .probe          = advwdt_probe,
+       .remove         = __devexit_p(advwdt_remove),
+       .shutdown       = advwdt_shutdown,
+       .driver         = {
+               .owner  = THIS_MODULE,
+               .name   = DRV_NAME,
+       },
+};
+
+static int __init
+advwdt_init(void)
+{
+       int err;
+
+       printk(KERN_INFO "WDT driver for Advantech single board computer initialising.\n");
+
+       err = platform_driver_register(&advwdt_driver);
+       if (err)
+               return err;
+
+       advwdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0);
+       if (IS_ERR(advwdt_platform_device)) {
+               err = PTR_ERR(advwdt_platform_device);
+               goto unreg_platform_driver;
+       }
+
+       return 0;
+
+unreg_platform_driver:
+       platform_driver_unregister(&advwdt_driver);
+       return err;
+}
+
+static void __exit
+advwdt_exit(void)
+{
+       platform_device_unregister(advwdt_platform_device);
+       platform_driver_unregister(&advwdt_driver);
+       printk(KERN_INFO PFX "Watchdog Module Unloaded.\n");
 }
 
 module_init(advwdt_init);
index 01b0d132ee41b3890b58cb3a983b87742bf69dff..e3f6a7d0c83d35a84732e2b59203ed3ff03cb234 100644 (file)
@@ -40,7 +40,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (0<timeout<18000, defaul
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  *     ali_start       -       start watchdog countdown
index e5b2c2ee292cb810470a55f71253fcdcb92c7a57..67aed9f8c362e7a9f87f50aedf93717bad7c345b 100644 (file)
@@ -69,7 +69,7 @@ module_param(use_gpio, int, 0);
 MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog.  (required by old cobalt boards)");
 
 static void wdt_timer_ping(unsigned long);
-static struct timer_list timer;
+static DEFINE_TIMER(timer, wdt_timer_ping, 0, 1);
 static unsigned long next_heartbeat;
 static unsigned long wdt_is_open;
 static char wdt_expect_close;
@@ -78,7 +78,7 @@ static struct pci_dev *alim7101_pmu;
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
-                __stringify(CONFIG_WATCHDOG_NOWAYOUT) ")");
+                __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  *     Whack the dog
@@ -108,8 +108,7 @@ static void wdt_timer_ping(unsigned long data)
                printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
        }
        /* Re-set the timer interval */
-       timer.expires = jiffies + WDT_INTERVAL;
-       add_timer(&timer);
+       mod_timer(&timer, jiffies + WDT_INTERVAL);
 }
 
 /*
@@ -147,9 +146,7 @@ static void wdt_startup(void)
        wdt_change(WDT_ENABLE);
 
        /* Start the timer */
-       timer.expires = jiffies + WDT_INTERVAL;
-       add_timer(&timer);
-
+       mod_timer(&timer, jiffies + WDT_INTERVAL);
 
        printk(KERN_INFO PFX "Watchdog timer is now enabled.\n");
 }
@@ -380,10 +377,6 @@ static int __init alim7101_wdt_init(void)
                        timeout);
        }
 
-       init_timer(&timer);
-       timer.function = wdt_timer_ping;
-       timer.data = 1;
-
        rc = misc_register(&wdt_miscdev);
        if (rc) {
                printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
index 00bdabb90f27b958a76ab7b8d39c4b505892411e..bcd7e36ca0aa67b8f9e6e3c461d2b3f12912d0ab 100644 (file)
@@ -80,10 +80,8 @@ static void cpu5wdt_trigger(unsigned long unused)
        outb(1, port + CPU5WDT_TRIGGER_REG);
 
        /* requeue?? */
-       if( cpu5wdt_device.queue && ticks ) {
-               cpu5wdt_device.timer.expires = jiffies + CPU5WDT_INTERVAL;
-               add_timer(&cpu5wdt_device.timer);
-       }
+       if (cpu5wdt_device.queue && ticks)
+               mod_timer(&cpu5wdt_device.timer, jiffies + CPU5WDT_INTERVAL);
        else {
                /* ticks doesn't matter anyway */
                complete(&cpu5wdt_device.stop);
@@ -109,8 +107,7 @@ static void cpu5wdt_start(void)
                outb(1, port + CPU5WDT_MODE_REG);
                outb(0, port + CPU5WDT_RESET_REG);
                outb(0, port + CPU5WDT_ENABLE_REG);
-               cpu5wdt_device.timer.expires = jiffies + CPU5WDT_INTERVAL;
-               add_timer(&cpu5wdt_device.timer);
+               mod_timer(&cpu5wdt_device.timer, jiffies + CPU5WDT_INTERVAL);
        }
        /* if process dies, counter is not decremented */
        cpu5wdt_device.running++;
@@ -245,9 +242,7 @@ static int __devinit cpu5wdt_init(void)
 
        clear_bit(0, &cpu5wdt_device.inuse);
 
-       init_timer(&cpu5wdt_device.timer);
-       cpu5wdt_device.timer.function = cpu5wdt_trigger;
-       cpu5wdt_device.timer.data = 0;
+       setup_timer(&cpu5wdt_device.timer, cpu5wdt_trigger, 0);
 
        cpu5wdt_device.default_ticks = ticks;
 
index e228d6e173cead6243232be6a137c6f275776caa..f70387f01b2b1880ffcbb26b9982d2ba68f55f48 100644 (file)
@@ -73,7 +73,7 @@ static char *ev = "int";
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  * Some symbolic names
index fb64df4d7c8720107f16e360047c93ef2deac0b4..c5982502c03d45a8def683ac7c06cf4d83ad3719 100644 (file)
@@ -91,7 +91,7 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<heartbeat<2046, d
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  * Some i6300ESB specific functions
index e0627d79707b27f6b91d8ccb47506a29f1fad451..a62ef48a15ae8f91c12bf27ba0bc0f2f8cc87fac 100644 (file)
@@ -109,7 +109,7 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<heartbeat<39, def
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  * Some TCO specific functions
index fd8a44a08cd3604c07d70d8cd4cef8cd7f757cd9..3c9684ccd2f936ff248c6efc69abdb6025d90b03 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     intel TCO Watchdog Driver (Used in i82801 and i6300ESB chipsets)
  *
- *     (c) Copyright 2006 Wim Van Sebroeck <wim@iguana.be>.
+ *     (c) Copyright 2006-2007 Wim Van Sebroeck <wim@iguana.be>.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -49,7 +49,7 @@
 /* Module and version information */
 #define DRV_NAME        "iTCO_wdt"
 #define DRV_VERSION     "1.01"
-#define DRV_RELDATE     "11-Nov-2006"
+#define DRV_RELDATE     "21-Jan-2007"
 #define PFX            DRV_NAME ": "
 
 /* Includes */
@@ -187,7 +187,7 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<heartbeat<39 (TCO
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /* iTCO Vendor Specific Support hooks */
 #ifdef CONFIG_ITCO_VENDOR_SUPPORT
index c1ed209a138ca3176313abcf3fa4bdcc2de33b9f..c3a60f52ccb97d26931e66ea29384ef43a80c464 100644 (file)
@@ -3,8 +3,8 @@
  *
  *     (c) Copyright 2001 Charles Howes <chowes@vsol.net>
  *
- *      Based on advantechwdt.c which is based on acquirewdt.c which
- *       is based on wdt.c.
+ *     Based on advantechwdt.c which is based on acquirewdt.c which
+ *     is based on wdt.c.
  *
  *     (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl>
  *
@@ -25,9 +25,9 @@
  *
  *     (c) Copyright 1995    Alan Cox <alan@redhat.com>
  *
- *      14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
- *           Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
- *           Added timeout module option to override default
+ *     14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
+ *          Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
+ *          Added timeout module option to override default
  *
  */
 
 #include <linux/miscdevice.h>
 #include <linux/watchdog.h>
 #include <linux/ioport.h>
-#include <linux/notifier.h>
 #include <linux/fs.h>
-#include <linux/reboot.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/moduleparam.h>
+#include <linux/platform_device.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
+static struct platform_device *ibwdt_platform_device;
 static unsigned long ibwdt_is_open;
 static spinlock_t ibwdt_lock;
 static char expect_close;
 
-#define PFX "ib700wdt: "
+/* Module information */
+#define DRV_NAME "ib700wdt"
+#define PFX DRV_NAME ": "
 
 /*
  *
@@ -118,20 +120,51 @@ static int wd_margin = WD_TIMO;
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 
 /*
- *     Kernel methods.
+ *     Watchdog Operations
  */
 
 static void
 ibwdt_ping(void)
 {
+       spin_lock(&ibwdt_lock);
+
        /* Write a watchdog value */
        outb_p(wd_margin, WDT_START);
+
+       spin_unlock(&ibwdt_lock);
 }
 
+static void
+ibwdt_disable(void)
+{
+       spin_lock(&ibwdt_lock);
+       outb_p(0, WDT_STOP);
+       spin_unlock(&ibwdt_lock);
+}
+
+static int
+ibwdt_set_heartbeat(int t)
+{
+       int i;
+
+       if ((t < 0) || (t > 30))
+               return -EINVAL;
+
+       for (i = 0x0F; i > -1; i--)
+               if (wd_times[i] > t)
+                       break;
+       wd_margin = i;
+       return 0;
+}
+
+/*
+ *     /dev/watchdog handling
+ */
+
 static ssize_t
 ibwdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
@@ -159,7 +192,7 @@ static int
 ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
          unsigned long arg)
 {
-       int i, new_margin;
+       int new_margin;
        void __user *argp = (void __user *)arg;
        int __user *p = argp;
 
@@ -176,6 +209,7 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
          break;
 
        case WDIOC_GETSTATUS:
+       case WDIOC_GETBOOTSTATUS:
          return put_user(0, p);
 
        case WDIOC_KEEPALIVE:
@@ -185,18 +219,33 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        case WDIOC_SETTIMEOUT:
          if (get_user(new_margin, p))
                  return -EFAULT;
-         if ((new_margin < 0) || (new_margin > 30))
+         if (ibwdt_set_heartbeat(new_margin))
                  return -EINVAL;
-         for (i = 0x0F; i > -1; i--)
-                 if (wd_times[i] > new_margin)
-                         break;
-         wd_margin = i;
          ibwdt_ping();
          /* Fall */
 
        case WDIOC_GETTIMEOUT:
          return put_user(wd_times[wd_margin], p);
-         break;
+
+       case WDIOC_SETOPTIONS:
+       {
+         int options, retval = -EINVAL;
+
+         if (get_user(options, p))
+           return -EFAULT;
+
+         if (options & WDIOS_DISABLECARD) {
+           ibwdt_disable();
+           retval = 0;
+         }
+
+         if (options & WDIOS_ENABLECARD) {
+           ibwdt_ping();
+           retval = 0;
+         }
+
+         return retval;
+       }
 
        default:
          return -ENOTTY;
@@ -207,9 +256,7 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 static int
 ibwdt_open(struct inode *inode, struct file *file)
 {
-       spin_lock(&ibwdt_lock);
        if (test_and_set_bit(0, &ibwdt_is_open)) {
-               spin_unlock(&ibwdt_lock);
                return -EBUSY;
        }
        if (nowayout)
@@ -217,40 +264,23 @@ ibwdt_open(struct inode *inode, struct file *file)
 
        /* Activate */
        ibwdt_ping();
-       spin_unlock(&ibwdt_lock);
        return nonseekable_open(inode, file);
 }
 
 static int
 ibwdt_close(struct inode *inode, struct file *file)
 {
-       spin_lock(&ibwdt_lock);
-       if (expect_close == 42)
-               outb_p(0, WDT_STOP);
-       else
+       if (expect_close == 42) {
+               ibwdt_disable();
+       } else {
                printk(KERN_CRIT PFX "WDT device closed unexpectedly.  WDT will not stop!\n");
-
+               ibwdt_ping();
+       }
        clear_bit(0, &ibwdt_is_open);
        expect_close = 0;
-       spin_unlock(&ibwdt_lock);
        return 0;
 }
 
-/*
- *     Notifier for system down
- */
-
-static int
-ibwdt_notify_sys(struct notifier_block *this, unsigned long code,
-       void *unused)
-{
-       if (code == SYS_DOWN || code == SYS_HALT) {
-               /* Turn the WDT off */
-               outb_p(0, WDT_STOP);
-       }
-       return NOTIFY_DONE;
-}
-
 /*
  *     Kernel Interfaces
  */
@@ -271,26 +301,14 @@ static struct miscdevice ibwdt_miscdev = {
 };
 
 /*
- *     The WDT needs to learn about soft shutdowns in order to
- *     turn the timebomb registers off.
+ *     Init & exit routines
  */
 
-static struct notifier_block ibwdt_notifier = {
-       .notifier_call = ibwdt_notify_sys,
-};
-
-static int __init ibwdt_init(void)
+static int __devinit ibwdt_probe(struct platform_device *dev)
 {
        int res;
 
-       printk(KERN_INFO PFX "WDT driver for IB700 single board computer initialising.\n");
-
        spin_lock_init(&ibwdt_lock);
-       res = misc_register(&ibwdt_miscdev);
-       if (res) {
-               printk (KERN_ERR PFX "failed to register misc device\n");
-               goto out_nomisc;
-       }
 
 #if WDT_START != WDT_STOP
        if (!request_region(WDT_STOP, 1, "IB700 WDT")) {
@@ -305,34 +323,78 @@ static int __init ibwdt_init(void)
                res = -EIO;
                goto out_nostartreg;
        }
-       res = register_reboot_notifier(&ibwdt_notifier);
+
+       res = misc_register(&ibwdt_miscdev);
        if (res) {
-               printk (KERN_ERR PFX "Failed to register reboot notifier.\n");
-               goto out_noreboot;
+               printk (KERN_ERR PFX "failed to register misc device\n");
+               goto out_nomisc;
        }
        return 0;
 
-out_noreboot:
+out_nomisc:
        release_region(WDT_START, 1);
 out_nostartreg:
 #if WDT_START != WDT_STOP
        release_region(WDT_STOP, 1);
 #endif
 out_nostopreg:
-       misc_deregister(&ibwdt_miscdev);
-out_nomisc:
        return res;
 }
 
-static void __exit
-ibwdt_exit(void)
+static int __devexit ibwdt_remove(struct platform_device *dev)
 {
        misc_deregister(&ibwdt_miscdev);
-       unregister_reboot_notifier(&ibwdt_notifier);
+       release_region(WDT_START,1);
 #if WDT_START != WDT_STOP
        release_region(WDT_STOP,1);
 #endif
-       release_region(WDT_START,1);
+       return 0;
+}
+
+static void ibwdt_shutdown(struct platform_device *dev)
+{
+       /* Turn the WDT off if we have a soft shutdown */
+       ibwdt_disable();
+}
+
+static struct platform_driver ibwdt_driver = {
+       .probe          = ibwdt_probe,
+       .remove         = __devexit_p(ibwdt_remove),
+       .shutdown       = ibwdt_shutdown,
+       .driver         = {
+               .owner  = THIS_MODULE,
+               .name   = DRV_NAME,
+       },
+};
+
+static int __init ibwdt_init(void)
+{
+       int err;
+
+       printk(KERN_INFO PFX "WDT driver for IB700 single board computer initialising.\n");
+
+       err = platform_driver_register(&ibwdt_driver);
+       if (err)
+               return err;
+
+       ibwdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0);
+       if (IS_ERR(ibwdt_platform_device)) {
+               err = PTR_ERR(ibwdt_platform_device);
+               goto unreg_platform_driver;
+       }
+
+       return 0;
+
+unreg_platform_driver:
+       platform_driver_unregister(&ibwdt_driver);
+       return err;
+}
+
+static void __exit ibwdt_exit(void)
+{
+       platform_device_unregister(ibwdt_platform_device);
+       platform_driver_unregister(&ibwdt_driver);
+       printk(KERN_INFO PFX "Watchdog Module Unloaded.\n");
 }
 
 module_init(ibwdt_init);
index dd6760f1a23ba43ecc40342cc9c1d9da3ef13e9c..8195f5023d853c23406f3cd0abe319b68e745d2c 100644 (file)
@@ -396,7 +396,7 @@ module_init(ibmasr_init);
 module_exit(ibmasr_exit);
 
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 MODULE_DESCRIPTION("IBM Automatic Server Restart driver");
 MODULE_AUTHOR("Andrey Panin");
index 0bc239308989d53dbf7adf8ad537ada06e086b12..788245bdaa7f88635593d4f70ac0d8ee164a4945 100644 (file)
@@ -32,7 +32,7 @@ static int indydog_alive;
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 static void indydog_start(void)
 {
index 4d730fdbd528cac4f84d78997045771a930d7b7b..81fb3dec180f5be0b5076568b3c140caa6393d4f 100644 (file)
@@ -95,7 +95,7 @@ MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 #define PFX "machzwd"
 
@@ -118,12 +118,14 @@ static int action = 0;
 module_param(action, int, 0);
 MODULE_PARM_DESC(action, "after watchdog resets, generate: 0 = RESET(*)  1 = SMI  2 = NMI  3 = SCI");
 
+static void zf_ping(unsigned long data);
+
 static int zf_action = GEN_RESET;
 static unsigned long zf_is_open;
 static char zf_expect_close;
 static spinlock_t zf_lock;
 static spinlock_t zf_port_lock;
-static struct timer_list zf_timer;
+static DEFINE_TIMER(zf_timer, zf_ping, 0, 0);
 static unsigned long next_heartbeat = 0;
 
 
@@ -220,9 +222,7 @@ static void zf_timer_on(void)
        next_heartbeat = jiffies + ZF_USER_TIMEO;
 
        /* start the timer for internal ping */
-       zf_timer.expires = jiffies + ZF_HW_TIMEO;
-
-       add_timer(&zf_timer);
+       mod_timer(&zf_timer, jiffies + ZF_HW_TIMEO);
 
        /* start watchdog timer */
        ctrl_reg = zf_get_control();
@@ -260,8 +260,7 @@ static void zf_ping(unsigned long data)
                zf_set_control(ctrl_reg);
                spin_unlock_irqrestore(&zf_port_lock, flags);
 
-               zf_timer.expires = jiffies + ZF_HW_TIMEO;
-               add_timer(&zf_timer);
+               mod_timer(&zf_timer, jiffies + ZF_HW_TIMEO);
        }else{
                printk(KERN_CRIT PFX ": I will reset your machine\n");
        }
@@ -465,11 +464,6 @@ static int __init zf_init(void)
        zf_set_status(0);
        zf_set_control(0);
 
-       /* this is the timer that will do the hard work */
-       init_timer(&zf_timer);
-       zf_timer.function = zf_ping;
-       zf_timer.data = 0;
-
        return 0;
 
 no_reboot:
index c2dac0aa1d6254906468a35dcbaea932197b416f..f35e2848aa3eb35fd4fb49fc5ade7ced904c2a45 100644 (file)
@@ -56,16 +56,18 @@ static int mixcomwd_ioports[] = { 0x180, 0x280, 0x380, 0x000 };
 #define FLASHCOM_WATCHDOG_OFFSET 0x4
 #define FLASHCOM_ID 0x18
 
+static void mixcomwd_timerfun(unsigned long d);
+
 static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */
 
 static int watchdog_port;
 static int mixcomwd_timer_alive;
-static DEFINE_TIMER(mixcomwd_timer, NULL, 0, 0);
+static DEFINE_TIMER(mixcomwd_timer, mixcomwd_timerfun, 0, 0);
 static char expect_close;
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 static void mixcomwd_ping(void)
 {
@@ -77,7 +79,7 @@ static void mixcomwd_timerfun(unsigned long d)
 {
        mixcomwd_ping();
 
-       mod_timer(&mixcomwd_timer,jiffies+ 5*HZ);
+       mod_timer(&mixcomwd_timer, jiffies + 5 * HZ);
 }
 
 /*
@@ -114,12 +116,8 @@ static int mixcomwd_release(struct inode *inode, struct file *file)
                        printk(KERN_ERR "mixcomwd: release called while internal timer alive");
                        return -EBUSY;
                }
-               init_timer(&mixcomwd_timer);
-               mixcomwd_timer.expires=jiffies + 5 * HZ;
-               mixcomwd_timer.function=mixcomwd_timerfun;
-               mixcomwd_timer.data=0;
                mixcomwd_timer_alive=1;
-               add_timer(&mixcomwd_timer);
+               mod_timer(&mixcomwd_timer, jiffies + 5 * HZ);
        } else {
                printk(KERN_CRIT "mixcomwd: WDT device closed unexpectedly.  WDT will not stop!\n");
        }
@@ -285,7 +283,7 @@ static void __exit mixcomwd_exit(void)
                if(mixcomwd_timer_alive) {
                        printk(KERN_WARNING "mixcomwd: I quit now, hardware will"
                               " probably reboot!\n");
-                       del_timer(&mixcomwd_timer);
+                       del_timer_sync(&mixcomwd_timer);
                        mixcomwd_timer_alive=0;
                }
        }
index a77a90717ad21cca1f2c553c4cbc2d3bac7f14ec..3d3deae0d64ba0668f28fb275a082531a7e62e1c 100644 (file)
@@ -631,5 +631,5 @@ module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "Watchdog timeout in minutes (default=" __MODULE_STRING(timeout) ").");
 
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
index 8e1e6e48e0a70733f8768a95cce8901409a8d9e0..6e8b5705b5b78f94f77071217b01494c035f5b34 100644 (file)
@@ -2,7 +2,7 @@
  * PC Watchdog Driver
  * by Ken Hollis (khollis@bitgate.com)
  *
- * Permission granted from Simon Machell (73244.1270@compuserve.com)
+ * Permission granted from Simon Machell (smachell@berkprod.com)
  * Written for the Linux Kernel, and GPLed by Ken Hollis
  *
  * 960107      Added request_region routines, modulized the whole thing.
@@ -70,8 +70,8 @@
 #include <asm/io.h>            /* For inb/outb/... */
 
 /* Module and version information */
-#define WATCHDOG_VERSION "1.17"
-#define WATCHDOG_DATE "12 Feb 2006"
+#define WATCHDOG_VERSION "1.18"
+#define WATCHDOG_DATE "21 Jan 2007"
 #define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog"
 #define WATCHDOG_NAME "pcwd"
 #define PFX WATCHDOG_NAME ": "
 #define CMD_ISA_DELAY_TIME_8SECS       0x0C
 #define CMD_ISA_RESET_RELAYS           0x0D
 
+/* Watchdog's Dip Switch heartbeat values */
+static const int heartbeat_tbl [] = {
+       20,     /* OFF-OFF-OFF  = 20 Sec  */
+       40,     /* OFF-OFF-ON   = 40 Sec  */
+       60,     /* OFF-ON-OFF   =  1 Min  */
+       300,    /* OFF-ON-ON    =  5 Min  */
+       600,    /* ON-OFF-OFF   = 10 Min  */
+       1800,   /* ON-OFF-ON    = 30 Min  */
+       3600,   /* ON-ON-OFF    =  1 Hour */
+       7200,   /* ON-ON-ON     =  2 hour */
+};
+
 /*
  * We are using an kernel timer to do the pinging of the watchdog
  * every ~500ms. We try to set the internal heartbeat of the
@@ -167,14 +179,14 @@ static int debug = QUIET;
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level: 0=Quiet, 1=Verbose, 2=Debug (default=0)");
 
-#define WATCHDOG_HEARTBEAT 60          /* 60 sec default heartbeat */
+#define WATCHDOG_HEARTBEAT 0           /* default heartbeat = delay-time from dip-switches */
 static int heartbeat = WATCHDOG_HEARTBEAT;
 module_param(heartbeat, int, 0);
-MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<=heartbeat<=7200, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<=heartbeat<=7200 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  *     Internal functions
@@ -831,9 +843,7 @@ static int __devinit pcwatchdog_init(int base_addr)
        /* clear the "card caused reboot" flag */
        pcwd_clear_status();
 
-       init_timer(&pcwd_private.timer);
-       pcwd_private.timer.function = pcwd_timer_ping;
-       pcwd_private.timer.data = 0;
+       setup_timer(&pcwd_private.timer, pcwd_timer_ping, 0);
 
        /*  Disable the board  */
        pcwd_stop();
@@ -844,6 +854,10 @@ static int __devinit pcwatchdog_init(int base_addr)
        /* Show info about the card itself */
        pcwd_show_card_info();
 
+       /* If heartbeat = 0 then we use the heartbeat from the dip-switches */
+       if (heartbeat == 0)
+               heartbeat = heartbeat_tbl[(pcwd_get_option_switches() & 0x07)];
+
        /* Check that the heartbeat value is within it's range ; if not reset to the default */
        if (pcwd_set_heartbeat(heartbeat)) {
                pcwd_set_heartbeat(WATCHDOG_HEARTBEAT);
index f4872c87106393786bf1d5be663877a8bbe61fca..61a89e9596421376d2047686f7177e32b073ca41 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Berkshire PCI-PC Watchdog Card Driver
  *
- *     (c) Copyright 2003-2005 Wim Van Sebroeck <wim@iguana.be>.
+ *     (c) Copyright 2003-2007 Wim Van Sebroeck <wim@iguana.be>.
  *
  *     Based on source code of the following authors:
  *       Ken Hollis <kenji@bitgate.com>,
@@ -51,8 +51,8 @@
 #include <asm/io.h>            /* For inb/outb/... */
 
 /* Module and version information */
-#define WATCHDOG_VERSION "1.02"
-#define WATCHDOG_DATE "03 Sep 2005"
+#define WATCHDOG_VERSION "1.03"
+#define WATCHDOG_DATE "21 Jan 2007"
 #define WATCHDOG_DRIVER_NAME "PCI-PC Watchdog"
 #define WATCHDOG_NAME "pcwd_pci"
 #define PFX WATCHDOG_NAME ": "
 #define CMD_WRITE_WATCHDOG_TIMEOUT             0x19
 #define CMD_GET_CLEAR_RESET_COUNT              0x84
 
+/* Watchdog's Dip Switch heartbeat values */
+static const int heartbeat_tbl [] = {
+       5,      /* OFF-OFF-OFF  =  5 Sec  */
+       10,     /* OFF-OFF-ON   = 10 Sec  */
+       30,     /* OFF-ON-OFF   = 30 Sec  */
+       60,     /* OFF-ON-ON    =  1 Min  */
+       300,    /* ON-OFF-OFF   =  5 Min  */
+       600,    /* ON-OFF-ON    = 10 Min  */
+       1800,   /* ON-ON-OFF    = 30 Min  */
+       3600,   /* ON-ON-ON     =  1 hour */
+};
+
 /* We can only use 1 card due to the /dev/watchdog restriction */
 static int cards_found;
 
@@ -119,14 +131,14 @@ static int debug = QUIET;
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level: 0=Quiet, 1=Verbose, 2=Debug (default=0)");
 
-#define WATCHDOG_HEARTBEAT 2   /* 2 sec default heartbeat */
+#define WATCHDOG_HEARTBEAT 0   /* default heartbeat = delay-time from dip-switches */
 static int heartbeat = WATCHDOG_HEARTBEAT;
 module_param(heartbeat, int, 0);
-MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  *     Internal functions
@@ -286,7 +298,9 @@ static int pcipcwd_stop(void)
 static int pcipcwd_keepalive(void)
 {
        /* Re-trigger watchdog by writing to port 0 */
+       spin_lock(&pcipcwd_private.io_lock);
        outb_p(0x42, pcipcwd_private.io_addr);  /* send out any data */
+       spin_unlock(&pcipcwd_private.io_lock);
 
        if (debug >= DEBUG)
                printk(KERN_DEBUG PFX "Watchdog keepalive signal send\n");
@@ -373,7 +387,9 @@ static int pcipcwd_get_temperature(int *temperature)
        if (!pcipcwd_private.supports_temp)
                return -ENODEV;
 
+       spin_lock(&pcipcwd_private.io_lock);
        *temperature = inb_p(pcipcwd_private.io_addr);
+       spin_unlock(&pcipcwd_private.io_lock);
 
        /*
         * Convert celsius to fahrenheit, since this was
@@ -711,6 +727,10 @@ static int __devinit pcipcwd_card_init(struct pci_dev *pdev,
        /* Show info about the card itself */
        pcipcwd_show_card_info();
 
+       /* If heartbeat = 0 then we use the heartbeat from the dip-switches */
+       if (heartbeat == 0)
+               heartbeat = heartbeat_tbl[(pcipcwd_get_option_switches() & 0x07)];
+
        /* Check that the heartbeat value is within it's range ; if not reset to the default */
        if (pcipcwd_set_heartbeat(heartbeat)) {
                pcipcwd_set_heartbeat(WATCHDOG_HEARTBEAT);
@@ -798,6 +818,8 @@ static int __init pcipcwd_init_module(void)
 static void __exit pcipcwd_cleanup_module(void)
 {
        pci_unregister_driver(&pcipcwd_driver);
+
+       printk(KERN_INFO PFX "Watchdog Module Unloaded.\n");
 }
 
 module_init(pcipcwd_init_module);
index 2da5ac99687c60fba0660c713fc34370d6762c5c..31037f9c9ffe8b7a2b41e79f512bfeb3eadf202b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Berkshire USB-PC Watchdog Card Driver
  *
- *     (c) Copyright 2004 Wim Van Sebroeck <wim@iguana.be>.
+ *     (c) Copyright 2004-2007 Wim Van Sebroeck <wim@iguana.be>.
  *
  *     Based on source code of the following authors:
  *       Ken Hollis <kenji@bitgate.com>,
  *     http://www.berkprod.com/ or http://www.pcwatchdog.com/
  */
 
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/types.h>
-#include <linux/delay.h>
-#include <linux/miscdevice.h>
-#include <linux/watchdog.h>
-#include <linux/notifier.h>
-#include <linux/reboot.h>
-#include <linux/fs.h>
-#include <linux/smp_lock.h>
-#include <linux/completion.h>
-#include <asm/uaccess.h>
-#include <linux/usb.h>
-#include <linux/mutex.h>
+#include <linux/module.h>      /* For module specific items */
+#include <linux/moduleparam.h> /* For new moduleparam's */
+#include <linux/types.h>       /* For standard types (like size_t) */
+#include <linux/errno.h>       /* For the -ENODEV/... values */
+#include <linux/kernel.h>      /* For printk/panic/... */
+#include <linux/delay.h>       /* For mdelay function */
+#include <linux/miscdevice.h>  /* For MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR) */
+#include <linux/watchdog.h>    /* For the watchdog specific items */
+#include <linux/notifier.h>    /* For notifier support */
+#include <linux/reboot.h>      /* For reboot_notifier stuff */
+#include <linux/init.h>                /* For __init/__exit/... */
+#include <linux/fs.h>          /* For file operations */
+#include <linux/usb.h>         /* For USB functions */
+#include <linux/slab.h>                /* For kmalloc, ... */
+#include <linux/mutex.h>       /* For mutex locking */
 #include <linux/hid.h>         /* For HID_REQ_SET_REPORT & HID_DT_REPORT */
 
+#include <asm/uaccess.h>       /* For copy_to_user/put_user/... */
+
 
 #ifdef CONFIG_USB_DEBUG
        static int debug = 1;
@@ -57,8 +56,8 @@
 
 
 /* Module and Version Information */
-#define DRIVER_VERSION "1.01"
-#define DRIVER_DATE "15 Mar 2005"
+#define DRIVER_VERSION "1.02"
+#define DRIVER_DATE "21 Jan 2007"
 #define DRIVER_AUTHOR "Wim Van Sebroeck <wim@iguana.be>"
 #define DRIVER_DESC "Berkshire USB-PC Watchdog driver"
 #define DRIVER_LICENSE "GPL"
@@ -75,14 +74,14 @@ MODULE_ALIAS_MISCDEV(TEMP_MINOR);
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug enabled or not");
 
-#define WATCHDOG_HEARTBEAT 2   /* 2 sec default heartbeat */
+#define WATCHDOG_HEARTBEAT 0   /* default heartbeat = delay-time from dip-switches */
 static int heartbeat = WATCHDOG_HEARTBEAT;
 module_param(heartbeat, int, 0);
-MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /* The vendor and product id's for the USB-PC Watchdog card */
 #define USB_PCWD_VENDOR_ID     0x0c98
@@ -110,6 +109,18 @@ MODULE_DEVICE_TABLE (usb, usb_pcwd_table);
 #define CMD_ENABLE_WATCHDOG            0x30    /* Enable / Disable Watchdog */
 #define CMD_DISABLE_WATCHDOG           CMD_ENABLE_WATCHDOG
 
+/* Watchdog's Dip Switch heartbeat values */
+static const int heartbeat_tbl [] = {
+       5,      /* OFF-OFF-OFF  =  5 Sec  */
+       10,     /* OFF-OFF-ON   = 10 Sec  */
+       30,     /* OFF-ON-OFF   = 30 Sec  */
+       60,     /* OFF-ON-ON    =  1 Min  */
+       300,    /* ON-OFF-OFF   =  5 Min  */
+       600,    /* ON-OFF-ON    = 10 Min  */
+       1800,   /* ON-ON-OFF    = 30 Min  */
+       3600,   /* ON-ON-ON     =  1 hour */
+};
+
 /* We can only use 1 card due to the /dev/watchdog restriction */
 static int cards_found;
 
@@ -682,6 +693,10 @@ static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_devi
                ((option_switches & 0x10) ? "ON" : "OFF"),
                ((option_switches & 0x08) ? "ON" : "OFF"));
 
+       /* If heartbeat = 0 then we use the heartbeat from the dip-switches */
+       if (heartbeat == 0)
+               heartbeat = heartbeat_tbl[(option_switches & 0x07)];
+
        /* Check that the heartbeat value is within it's range ; if not reset to the default */
        if (usb_pcwd_set_heartbeat(usb_pcwd, heartbeat)) {
                usb_pcwd_set_heartbeat(usb_pcwd, WATCHDOG_HEARTBEAT);
index ff6f1ca1e5e7119b48ace7d55843b0b6871367c6..5991add702b00e32efaf83711ebdb2a60dc8b832 100644 (file)
@@ -283,7 +283,8 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
        wdt_base = (void __iomem *)IO_ADDRESS(res->start);
 
        wdt_clk = clk_get(&pdev->dev, "wdt_ck");
-       if (!wdt_clk) {
+       if (IS_ERR(wdt_clk)) {
+               ret = PTR_ERR(wdt_clk);
                release_resource(wdt_mem);
                kfree(wdt_mem);
                goto out;
index 18cb050c38624b6eb76bc658849c8cecd107c950..dff6cb5dc9a7a0700c6dc09f2110736505701b06 100644 (file)
@@ -78,7 +78,7 @@ MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" __MODULE
 
 MODULE_PARM_DESC(tmr_atboot, "Watchdog is started at boot time if set to 1, default=" __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT));
 
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default depends on ONLY_TESTING)");
 
@@ -366,13 +366,15 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
        wdt_mem = request_mem_region(res->start, size, pdev->name);
        if (wdt_mem == NULL) {
                printk(KERN_INFO PFX "failed to get memory region\n");
-               return -ENOENT;
+               ret = -ENOENT;
+               goto err_req;
        }
 
        wdt_base = ioremap(res->start, size);
        if (wdt_base == 0) {
                printk(KERN_INFO PFX "failed to ioremap() region\n");
-               return -EINVAL;
+               ret = -EINVAL;
+               goto err_req;
        }
 
        DBG("probe: mapped wdt_base=%p\n", wdt_base);
@@ -380,22 +382,21 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
        res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
        if (res == NULL) {
                printk(KERN_INFO PFX "failed to get irq resource\n");
-               iounmap(wdt_base);
-               return -ENOENT;
+               ret = -ENOENT;
+               goto err_map;
        }
 
        ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, pdev);
        if (ret != 0) {
                printk(KERN_INFO PFX "failed to install irq (%d)\n", ret);
-               iounmap(wdt_base);
-               return ret;
+               goto err_map;
        }
 
        wdt_clock = clk_get(&pdev->dev, "watchdog");
-       if (wdt_clock == NULL) {
+       if (IS_ERR(wdt_clock)) {
                printk(KERN_INFO PFX "failed to find watchdog clock source\n");
-               iounmap(wdt_base);
-               return -ENOENT;
+               ret = PTR_ERR(wdt_clock);
+               goto err_irq;
        }
 
        clk_enable(wdt_clock);
@@ -418,8 +419,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
        if (ret) {
                printk (KERN_ERR PFX "cannot register miscdev on minor=%d (%d)\n",
                        WATCHDOG_MINOR, ret);
-               iounmap(wdt_base);
-               return ret;
+               goto err_clk;
        }
 
        if (tmr_atboot && started == 0) {
@@ -434,26 +434,36 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
        }
 
        return 0;
+
+ err_clk:
+       clk_disable(wdt_clock);
+       clk_put(wdt_clock);
+
+ err_irq:
+       free_irq(wdt_irq->start, pdev);
+
+ err_map:
+       iounmap(wdt_base);
+
+ err_req:
+       release_resource(wdt_mem);
+       kfree(wdt_mem);
+
+       return ret;
 }
 
 static int s3c2410wdt_remove(struct platform_device *dev)
 {
-       if (wdt_mem != NULL) {
-               release_resource(wdt_mem);
-               kfree(wdt_mem);
-               wdt_mem = NULL;
-       }
+       release_resource(wdt_mem);
+       kfree(wdt_mem);
+       wdt_mem = NULL;
 
-       if (wdt_irq != NULL) {
-               free_irq(wdt_irq->start, dev);
-               wdt_irq = NULL;
-       }
+       free_irq(wdt_irq->start, dev);
+       wdt_irq = NULL;
 
-       if (wdt_clock != NULL) {
-               clk_disable(wdt_clock);
-               clk_put(wdt_clock);
-               wdt_clock = NULL;
-       }
+       clk_disable(wdt_clock);
+       clk_put(wdt_clock);
+       wdt_clock = NULL;
 
        iounmap(wdt_base);
        misc_deregister(&s3c2410wdt_miscdev);
index c7b2045bc76b5196f6aa04c732c2dd95a4912704..b6282039198c6cdcef656098d31a4570125c721e 100644 (file)
@@ -100,10 +100,10 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, defau
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 static void wdt_timer_ping(unsigned long);
-static struct timer_list timer;
+static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
 static unsigned long next_heartbeat;
 static unsigned long wdt_is_open;
 static char wdt_expect_close;
@@ -122,8 +122,7 @@ static void wdt_timer_ping(unsigned long data)
                /* Ping the WDT by reading from wdt_start */
                inb_p(wdt_start);
                /* Re-set the timer interval */
-               timer.expires = jiffies + WDT_INTERVAL;
-               add_timer(&timer);
+               mod_timer(&timer, jiffies + WDT_INTERVAL);
        } else {
                printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
        }
@@ -138,8 +137,7 @@ static void wdt_startup(void)
        next_heartbeat = jiffies + (timeout * HZ);
 
        /* Start the timer */
-       timer.expires = jiffies + WDT_INTERVAL;
-       add_timer(&timer);
+       mod_timer(&timer, jiffies + WDT_INTERVAL);
        printk(KERN_INFO PFX "Watchdog timer is now enabled.\n");
 }
 
@@ -363,10 +361,6 @@ static int __init sbc60xxwdt_init(void)
                }
        }
 
-       init_timer(&timer);
-       timer.function = wdt_timer_ping;
-       timer.data = 0;
-
        rc = misc_register(&wdt_miscdev);
        if (rc)
        {
index 41fc6f80c493bef6c83052f8fd44121ec974e483..67ae42685e752f94d5feb19c7c4684467fa296af 100644 (file)
@@ -204,7 +204,7 @@ module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout,
-                "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+                "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  *     Kernel methods.
index 8882b427d24f44d988bd2682fee1559a305eecec..82cbd8809a69b0cc863752f43f8fad58a3164bcf 100644 (file)
@@ -35,7 +35,7 @@ static int epx_c3_alive;
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 #define EPXC3_WATCHDOG_CTL_REG 0x1ee /* write 1 to enable, 0 to disable */
 #define EPXC3_WATCHDOG_PET_REG 0x1ef /* write anything to pet once enabled */
index e3239833e4b0be839bb0223c2fce7f55a34309d6..1e4a8d751a71e8513e8bd23c42f253813bb92447 100644 (file)
@@ -92,7 +92,7 @@ MODULE_PARM_DESC(timeout, "range is 0-255 minutes, default is 1");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 
 
index caec37ba750a6810e7ea54abb6f73a6e72ef8e69..2676a43895a71f640c19f5120a0d8ff7f2523dbb 100644 (file)
@@ -97,7 +97,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, defau
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  * AMD Elan SC520 - Watchdog Timer Registers
@@ -121,7 +121,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON
 static __u16 __iomem *wdtmrctl;
 
 static void wdt_timer_ping(unsigned long);
-static struct timer_list timer;
+static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
 static unsigned long next_heartbeat;
 static unsigned long wdt_is_open;
 static char wdt_expect_close;
@@ -145,8 +145,7 @@ static void wdt_timer_ping(unsigned long data)
                spin_unlock(&wdt_spinlock);
 
                /* Re-set the timer interval */
-               timer.expires = jiffies + WDT_INTERVAL;
-               add_timer(&timer);
+               mod_timer(&timer, jiffies + WDT_INTERVAL);
        } else {
                printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
        }
@@ -179,8 +178,7 @@ static int wdt_startup(void)
        next_heartbeat = jiffies + (timeout * HZ);
 
        /* Start the timer */
-       timer.expires = jiffies + WDT_INTERVAL;
-       add_timer(&timer);
+       mod_timer(&timer, jiffies + WDT_INTERVAL);
 
        /* Start the watchdog */
        wdt_config(WDT_ENB | WDT_WRST_ENB | WDT_EXP_SEL_04);
@@ -389,10 +387,6 @@ static int __init sc520_wdt_init(void)
 
        spin_lock_init(&wdt_spinlock);
 
-       init_timer(&timer);
-       timer.function = wdt_timer_ping;
-       timer.data = 0;
-
        /* Check that the timeout value is within it's range ; if not reset to the default */
        if (wdt_set_heartbeat(timeout)) {
                wdt_set_heartbeat(WATCHDOG_TIMEOUT);
index dc403629aeb3d79a4e112798fe4ababfd2751070..cecbedd473a4392436ea150e1446b66c0a4c4601 100644 (file)
@@ -65,10 +65,12 @@ static int clock_division_ratio = WTCSR_CKS_4096;
 
 #define next_ping_period(cks)  msecs_to_jiffies(cks - 4)
 
+static void sh_wdt_ping(unsigned long data);
+
 static unsigned long shwdt_is_open;
 static struct watchdog_info sh_wdt_info;
 static char shwdt_expect_close;
-static struct timer_list timer;
+static DEFINE_TIMER(timer, sh_wdt_ping, 0, 0);
 static unsigned long next_heartbeat;
 
 #define WATCHDOG_HEARTBEAT 30                  /* 30 sec default heartbeat */
@@ -433,10 +435,6 @@ static int __init sh_wdt_init(void)
                       "be 1<=x<=3600, using %d\n", heartbeat);
        }
 
-       init_timer(&timer);
-       timer.function = sh_wdt_ping;
-       timer.data = 0;
-
        rc = register_reboot_notifier(&sh_wdt_notifier);
        if (unlikely(rc)) {
                printk(KERN_ERR PFX "Can't register reboot notifier (err=%d)\n",
index a9681d580dd355dbb2753202fead86fec358e695..d3cb0a76602036a679e5f242ecaffb026bc93f51 100644 (file)
@@ -624,4 +624,4 @@ module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "range is 1-255 units, default is 60");
 
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
index 4067e1f8a36878c7fa6665175051231b2710542f..9c3694909243e80c6877cde927722c260dd246c5 100644 (file)
@@ -59,7 +59,7 @@ MODULE_PARM_DESC(soft_margin, "Watchdog soft_margin in seconds. (0<soft_margin<6
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 #ifdef ONLY_TESTING
 static int soft_noboot = 1;
index 07d4bff27226b378a6d88d3c1fb0abe9f9f8172a..337ee42c90dd757644913cd5a42330f3c20330cc 100644 (file)
@@ -58,7 +58,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=63, defaul
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  *     Kernel methods.
index c960ec110dd7c07c0464c840234f1f4957eb81da..d9e821d08deb3b7ea21b36be0ec4682389e807e5 100644 (file)
@@ -60,7 +60,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255, defau
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  *     Kernel methods.
index b0e5f84d6bafdc24fb9c21742f35b3b0bcdcc965..3c88fe18f4f437e01e88264e340ddea12fe0d207 100644 (file)
@@ -87,10 +87,10 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, defau
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 static void wdt_timer_ping(unsigned long);
-static struct timer_list timer;
+static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
 static unsigned long next_heartbeat;
 static unsigned long wdt_is_open;
 static char wdt_expect_close;
@@ -114,8 +114,7 @@ static void wdt_timer_ping(unsigned long data)
                inb_p(WDT_PING);
 
                /* Re-set the timer interval */
-               timer.expires = jiffies + WDT_INTERVAL;
-               add_timer(&timer);
+               mod_timer(&timer, jiffies + WDT_INTERVAL);
 
                spin_unlock(&wdt_spinlock);
 
@@ -155,8 +154,7 @@ static void wdt_startup(void)
        next_heartbeat = jiffies + (timeout * HZ);
 
        /* Start the timer */
-       timer.expires = jiffies + WDT_INTERVAL;
-       add_timer(&timer);
+       mod_timer(&timer, jiffies + WDT_INTERVAL);
 
        wdt_change(WDT_ENABLE);
 
@@ -377,10 +375,6 @@ static int __init w83877f_wdt_init(void)
                goto err_out_region1;
        }
 
-       init_timer(&timer);
-       timer.function = wdt_timer_ping;
-       timer.data = 0;
-
        rc = misc_register(&wdt_miscdev);
        if (rc)
        {
index 2c8d5d8bd4e85303750274d1e9b2907b66c0bdad..15796844289121d9ed3bc2833a6cd6eecb2c9b81 100644 (file)
@@ -59,7 +59,7 @@ MODULE_PARM_DESC(testmode,"Watchdog testmode (1 = no reboot), default=0");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  * Start the watchdog
index 163e028ef9ed6cee052ee4aa643d8659e17e5bc8..950905d3c39f298ae00b1094b17ddec60231d331 100644 (file)
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255, defau
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 static void wafwdt_ping(void)
 {
index 517fbd8643f8f00a2b1970f8b7a63fb023f1fc38..0a3de6a024420b52369b00f19a55ba3844a8b12e 100644 (file)
@@ -64,7 +64,7 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536,
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /* You must set these - there is no sane way to probe for this board. */
 static int io=0x240;
index 6253041b235bb2ae0c1260e772f86b659bd799cb..7d300ff7ab07ed65df9ce6e8006a449c01dd4600 100644 (file)
@@ -68,7 +68,7 @@ MODULE_PARM_DESC(testmode,"Watchdog testmode (1 = no reboot), default=0");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  * Start the watchdog
index ce1261c5cbce9a7423ad0b0d3babcf74cc69dd59..6baf4ae42c9d0e831cfa87e4470c72a7b2b15a4d 100644 (file)
@@ -90,7 +90,7 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536,
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 #ifdef CONFIG_WDT_501_PCI
 /* Support for the Fan Tachometer on the PCI-WDT501 */
index 93f93d4fb8aec2126e86131e9077703c4e1e171d..a6a4aa0eee166d3ac029d2e7c49c8a4c714fe2bf 100644 (file)
@@ -727,7 +727,6 @@ int vt8231_detect(struct i2c_adapter *adapter)
        client->addr = isa_address;
        client->adapter = adapter;
        client->driver = &vt8231_driver;
-       client->dev.parent = &adapter->dev;
 
        /* Fill in the remaining client fields and put into the global list */
        strlcpy(client->name, "vt8231", I2C_NAME_SIZE);
index 9367c4cfe936f533f9500cd10f73a2b293dfd538..4d44a2db29ddca1bb0964100d995091b37f26b91 100644 (file)
@@ -183,6 +183,7 @@ config I2C_PIIX4
            ATI IXP200
            ATI IXP300
            ATI IXP400
+           ATI SB600
            Serverworks OSB4
            Serverworks CSB5
            Serverworks CSB6
@@ -341,6 +342,13 @@ config I2C_PARPORT_LIGHT
          This support is also available as a module.  If so, the module 
          will be called i2c-parport-light.
 
+config I2C_PASEMI
+       tristate "PA Semi SMBus interface"
+#      depends on PPC_PASEMI && I2C && PCI
+       depends on I2C && PCI
+       help
+         Supports the PA Semi PWRficient on-chip SMBus interfaces.
+
 config I2C_PROSAVAGE
        tristate "S3/VIA (Pro)Savage"
        depends on I2C && PCI
@@ -499,11 +507,11 @@ config I2C_VIA
          will be called i2c-via.
 
 config I2C_VIAPRO
-       tristate "VIA 82C596/82C686/82xx"
+       tristate "VIA VT82C596/82C686/82xx and CX700"
        depends on I2C && PCI
        help
          If you say yes to this option, support will be included for the VIA
-         82C596/82C686/82xx I2C interfaces.  Specifically, the following
+         VT82C596 and later SMBus interface.  Specifically, the following
          chipsets are supported:
            VT82C596A/B
            VT82C686A/B
@@ -512,6 +520,7 @@ config I2C_VIAPRO
            VT8235
            VT8237R/A
            VT8251
+           CX700
 
          This driver can also be built as a module.  If so, the module
          will be called i2c-viapro.
index 37196c1d0794e830b34b7c16f41ea68774a38940..03505aa44bbf0a8590dbb71f2e78584c3660a992 100644 (file)
@@ -27,6 +27,7 @@ obj-$(CONFIG_I2C_OCORES)      += i2c-ocores.o
 obj-$(CONFIG_I2C_OMAP)         += i2c-omap.o
 obj-$(CONFIG_I2C_PARPORT)      += i2c-parport.o
 obj-$(CONFIG_I2C_PARPORT_LIGHT)        += i2c-parport-light.o
+obj-$(CONFIG_I2C_PASEMI)       += i2c-pasemi.o
 obj-$(CONFIG_I2C_PCA_ISA)      += i2c-pca-isa.o
 obj-$(CONFIG_I2C_PIIX4)                += i2c-piix4.o
 obj-$(CONFIG_I2C_PNX)          += i2c-pnx.o
index e75d339a3481e9dcd03acb7dda20d14ba73352ae..0b0a87b8d1079f2755a3bfd902d1cb6e4a130f53 100644 (file)
@@ -475,6 +475,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter ali1535_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_ALI1535,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 8e1e3f8e40a41faff644d63072271edf409dba25..6b68074e518a072d1239c1e1f8ba61287cc4b456 100644 (file)
@@ -314,35 +314,11 @@ static u32 ali1563_func(struct i2c_adapter * a)
 }
 
 
-static void ali1563_enable(struct pci_dev * dev)
-{
-       u16 ctrl;
-
-       pci_read_config_word(dev,ALI1563_SMBBA,&ctrl);
-       ctrl |= 0x7;
-       pci_write_config_word(dev,ALI1563_SMBBA,ctrl);
-}
-
 static int __devinit ali1563_setup(struct pci_dev * dev)
 {
        u16 ctrl;
 
        pci_read_config_word(dev,ALI1563_SMBBA,&ctrl);
-       printk("ali1563: SMBus control = %04x\n",ctrl);
-
-       /* Check if device is even enabled first */
-       if (!(ctrl & ALI1563_SMB_IOEN)) {
-               dev_warn(&dev->dev,"I/O space not enabled, trying manually\n");
-               ali1563_enable(dev);
-       }
-       if (!(ctrl & ALI1563_SMB_IOEN)) {
-               dev_warn(&dev->dev,"I/O space still not enabled, giving up\n");
-               goto Err;
-       }
-       if (!(ctrl & ALI1563_SMB_HOSTEN)) {
-               dev_warn(&dev->dev,"Host Controller not enabled\n");
-               goto Err;
-       }
 
        /* SMB I/O Base in high 12 bits and must be aligned with the
         * size of the I/O space. */
@@ -351,11 +327,31 @@ static int __devinit ali1563_setup(struct pci_dev * dev)
                dev_warn(&dev->dev,"ali1563_smba Uninitialized\n");
                goto Err;
        }
+
+       /* Check if device is enabled */
+       if (!(ctrl & ALI1563_SMB_HOSTEN)) {
+               dev_warn(&dev->dev, "Host Controller not enabled\n");
+               goto Err;
+       }
+       if (!(ctrl & ALI1563_SMB_IOEN)) {
+               dev_warn(&dev->dev, "I/O space not enabled, trying manually\n");
+               pci_write_config_word(dev, ALI1563_SMBBA,
+                                     ctrl | ALI1563_SMB_IOEN);
+               pci_read_config_word(dev, ALI1563_SMBBA, &ctrl);
+               if (!(ctrl & ALI1563_SMB_IOEN)) {
+                       dev_err(&dev->dev, "I/O space still not enabled, "
+                               "giving up\n");
+                       goto Err;
+               }
+       }
+
        if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE,
                            ali1563_pci_driver.name)) {
-               dev_warn(&dev->dev,"Could not allocate I/O space");
+               dev_err(&dev->dev, "Could not allocate I/O space at 0x%04x\n",
+                       ali1563_smba);
                goto Err;
        }
+       dev_info(&dev->dev, "Found ALi1563 SMBus at 0x%04x\n", ali1563_smba);
 
        return 0;
 Err:
@@ -374,6 +370,7 @@ static const struct i2c_algorithm ali1563_algorithm = {
 
 static struct i2c_adapter ali1563_adapter = {
        .owner  = THIS_MODULE,
+       .id     = I2C_HW_SMBUS_ALI1563,
        .class  = I2C_CLASS_HWMON,
        .algo   = &ali1563_algorithm,
 };
@@ -384,13 +381,18 @@ static int __devinit ali1563_probe(struct pci_dev * dev,
        int error;
 
        if ((error = ali1563_setup(dev)))
-               return error;
+               goto exit;
        ali1563_adapter.dev.parent = &dev->dev;
        sprintf(ali1563_adapter.name,"SMBus ALi 1563 Adapter @ %04x",
                ali1563_smba);
        if ((error = i2c_add_adapter(&ali1563_adapter)))
-               ali1563_shutdown(dev);
-       printk("%s: Returning %d\n",__FUNCTION__,error);
+               goto exit_shutdown;
+       return 0;
+
+exit_shutdown:
+       ali1563_shutdown(dev);
+exit:
+       dev_warn(&dev->dev, "ALi1563 SMBus probe failed (%d)\n", error);
        return error;
 }
 
index 3f11b6e1a3418c5bc5dad86681b7eae67c429af7..c537441ac0383ca825ca60b15bfae9d8bcd08b47 100644 (file)
@@ -470,6 +470,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter ali15x3_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_ALI15X3,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 08e915730caf94505e44bd27845c193c50dd394f..e5e96c8175660b15f006d9517a2866248e5a4a62 100644 (file)
@@ -184,12 +184,14 @@ static int __init amd756_s4882_init(void)
        s4882_algo[0].smbus_xfer = amd756_access_virt0;
        s4882_adapter[0] = amd756_smbus;
        s4882_adapter[0].algo = s4882_algo;
+       s4882_adapter[0].dev.parent = amd756_smbus.dev.parent;
        for (i = 1; i < 5; i++) {
                s4882_algo[i] = *(amd756_smbus.algo);
                s4882_adapter[i] = amd756_smbus;
                sprintf(s4882_adapter[i].name,
                        "SMBus 8111 adapter (CPU%d)", i-1);
                s4882_adapter[i].algo = s4882_algo+i;
+               s4882_adapter[i].dev.parent = amd756_smbus.dev.parent;
        }
        s4882_algo[1].smbus_xfer = amd756_access_virt1;
        s4882_algo[2].smbus_xfer = amd756_access_virt2;
index 2d21afdc5b1cc7f3961c3e4f480de0444ec4292f..91fbc0ee439cc85b94b30fb3818b53790a164bb3 100644 (file)
@@ -301,6 +301,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 struct i2c_adapter amd756_smbus = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_AMD756,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 0fbc7186c91ab63f8ac8f6b32365db3a850efc6f..14ad9912f204550e88624e7b643c782f1e2f6af8 100644 (file)
@@ -76,7 +76,8 @@ static unsigned int amd_ec_wait_write(struct amd_smbus *smbus)
                udelay(1);
 
        if (!timeout) {
-               dev_warn(&smbus->dev->dev, "Timeout while waiting for IBF to clear\n");
+               dev_warn(&smbus->dev->dev,
+                        "Timeout while waiting for IBF to clear\n");
                return -1;
        }
 
@@ -91,14 +92,16 @@ static unsigned int amd_ec_wait_read(struct amd_smbus *smbus)
                udelay(1);
 
        if (!timeout) {
-               dev_warn(&smbus->dev->dev, "Timeout while waiting for OBF to set\n");
+               dev_warn(&smbus->dev->dev,
+                        "Timeout while waiting for OBF to set\n");
                return -1;
        }
 
        return 0;
 }
 
-static unsigned int amd_ec_read(struct amd_smbus *smbus, unsigned char address, unsigned char *data)
+static unsigned int amd_ec_read(struct amd_smbus *smbus, unsigned char address,
+               unsigned char *data)
 {
        if (amd_ec_wait_write(smbus))
                return -1;
@@ -115,7 +118,8 @@ static unsigned int amd_ec_read(struct amd_smbus *smbus, unsigned char address,
        return 0;
 }
 
-static unsigned int amd_ec_write(struct amd_smbus *smbus, unsigned char address, unsigned char data)
+static unsigned int amd_ec_write(struct amd_smbus *smbus, unsigned char address,
+               unsigned char data)
 {
        if (amd_ec_wait_write(smbus))
                return -1;
@@ -175,18 +179,19 @@ static unsigned int amd_ec_write(struct amd_smbus *smbus, unsigned char address,
 #define AMD_SMB_PRTCL_PEC              0x80
 
 
-static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short flags,
-               char read_write, u8 command, int size, union i2c_smbus_data * data)
+static s32 amd8111_access(struct i2c_adapter * adap, u16 addr,
+               unsigned short flags, char read_write, u8 command, int size,
+               union i2c_smbus_data * data)
 {
        struct amd_smbus *smbus = adap->algo_data;
        unsigned char protocol, len, pec, temp[2];
        int i;
 
-       protocol = (read_write == I2C_SMBUS_READ) ? AMD_SMB_PRTCL_READ : AMD_SMB_PRTCL_WRITE;
+       protocol = (read_write == I2C_SMBUS_READ) ? AMD_SMB_PRTCL_READ
+                                                 : AMD_SMB_PRTCL_WRITE;
        pec = (flags & I2C_CLIENT_PEC) ? AMD_SMB_PRTCL_PEC : 0;
 
        switch (size) {
-
                case I2C_SMBUS_QUICK:
                        protocol |= AMD_SMB_PRTCL_QUICK;
                        read_write = I2C_SMBUS_WRITE;
@@ -208,8 +213,10 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
                case I2C_SMBUS_WORD_DATA:
                        amd_ec_write(smbus, AMD_SMB_CMD, command);
                        if (read_write == I2C_SMBUS_WRITE) {
-                               amd_ec_write(smbus, AMD_SMB_DATA, data->word);
-                               amd_ec_write(smbus, AMD_SMB_DATA + 1, data->word >> 8);
+                               amd_ec_write(smbus, AMD_SMB_DATA,
+                                            data->word & 0xff);
+                               amd_ec_write(smbus, AMD_SMB_DATA + 1,
+                                            data->word >> 8);
                        }
                        protocol |= AMD_SMB_PRTCL_WORD_DATA | pec;
                        break;
@@ -217,27 +224,31 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
                case I2C_SMBUS_BLOCK_DATA:
                        amd_ec_write(smbus, AMD_SMB_CMD, command);
                        if (read_write == I2C_SMBUS_WRITE) {
-                               len = min_t(u8, data->block[0], 32);
+                               len = min_t(u8, data->block[0],
+                                           I2C_SMBUS_BLOCK_MAX);
                                amd_ec_write(smbus, AMD_SMB_BCNT, len);
                                for (i = 0; i < len; i++)
-                                       amd_ec_write(smbus, AMD_SMB_DATA + i, data->block[i + 1]);
+                                       amd_ec_write(smbus, AMD_SMB_DATA + i,
+                                                    data->block[i + 1]);
                        }
                        protocol |= AMD_SMB_PRTCL_BLOCK_DATA | pec;
                        break;
 
                case I2C_SMBUS_I2C_BLOCK_DATA:
-                       len = min_t(u8, data->block[0], 32);
+                       len = min_t(u8, data->block[0],
+                                   I2C_SMBUS_BLOCK_MAX);
                        amd_ec_write(smbus, AMD_SMB_CMD, command);
                        amd_ec_write(smbus, AMD_SMB_BCNT, len);
                        if (read_write == I2C_SMBUS_WRITE)
                                for (i = 0; i < len; i++)
-                                       amd_ec_write(smbus, AMD_SMB_DATA + i, data->block[i + 1]);
+                                       amd_ec_write(smbus, AMD_SMB_DATA + i,
+                                                    data->block[i + 1]);
                        protocol |= AMD_SMB_PRTCL_I2C_BLOCK_DATA;
                        break;
 
                case I2C_SMBUS_PROC_CALL:
                        amd_ec_write(smbus, AMD_SMB_CMD, command);
-                       amd_ec_write(smbus, AMD_SMB_DATA, data->word);
+                       amd_ec_write(smbus, AMD_SMB_DATA, data->word & 0xff);
                        amd_ec_write(smbus, AMD_SMB_DATA + 1, data->word >> 8);
                        protocol = AMD_SMB_PRTCL_PROC_CALL | pec;
                        read_write = I2C_SMBUS_READ;
@@ -248,7 +259,8 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
                        amd_ec_write(smbus, AMD_SMB_CMD, command);
                        amd_ec_write(smbus, AMD_SMB_BCNT, len);
                        for (i = 0; i < len; i++)
-                               amd_ec_write(smbus, AMD_SMB_DATA + i, data->block[i + 1]);
+                               amd_ec_write(smbus, AMD_SMB_DATA + i,
+                                            data->block[i + 1]);
                        protocol = AMD_SMB_PRTCL_BLOCK_PROC_CALL | pec;
                        read_write = I2C_SMBUS_READ;
                        break;
@@ -280,7 +292,6 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
                return 0;
 
        switch (size) {
-
                case I2C_SMBUS_BYTE:
                case I2C_SMBUS_BYTE_DATA:
                        amd_ec_read(smbus, AMD_SMB_DATA, &data->byte);
@@ -296,10 +307,11 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
                case I2C_SMBUS_BLOCK_DATA:
                case I2C_SMBUS_BLOCK_PROC_CALL:
                        amd_ec_read(smbus, AMD_SMB_BCNT, &len);
-                       len = min_t(u8, len, 32);
+                       len = min_t(u8, len, I2C_SMBUS_BLOCK_MAX);
                case I2C_SMBUS_I2C_BLOCK_DATA:
                        for (i = 0; i < len; i++)
-                               amd_ec_read(smbus, AMD_SMB_DATA + i, data->block + i + 1);
+                               amd_ec_read(smbus, AMD_SMB_DATA + i,
+                                           data->block + i + 1);
                        data->block[0] = len;
                        break;
        }
@@ -310,7 +322,8 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
 
 static u32 amd8111_func(struct i2c_adapter *adapter)
 {
-       return  I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA |
+       return  I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
+               I2C_FUNC_SMBUS_BYTE_DATA |
                I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_BLOCK_DATA |
                I2C_FUNC_SMBUS_PROC_CALL | I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
                I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_HWPEC_CALC;
@@ -329,12 +342,13 @@ static struct pci_device_id amd8111_ids[] = {
 
 MODULE_DEVICE_TABLE (pci, amd8111_ids);
 
-static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_id *id)
+static int __devinit amd8111_probe(struct pci_dev *dev,
+               const struct pci_device_id *id)
 {
        struct amd_smbus *smbus;
-       int error = -ENODEV;
+       int error;
 
-       if (~pci_resource_flags(dev, 0) & IORESOURCE_IO)
+       if (!(pci_resource_flags(dev, 0) & IORESOURCE_IO))
                return -ENODEV;
 
        smbus = kzalloc(sizeof(struct amd_smbus), GFP_KERNEL);
@@ -345,12 +359,15 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
        smbus->base = pci_resource_start(dev, 0);
        smbus->size = pci_resource_len(dev, 0);
 
-       if (!request_region(smbus->base, smbus->size, amd8111_driver.name))
+       if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) {
+               error = -EBUSY;
                goto out_kfree;
+       }
 
        smbus->adapter.owner = THIS_MODULE;
        snprintf(smbus->adapter.name, I2C_NAME_SIZE,
                "SMBus2 AMD8111 adapter at %04x", smbus->base);
+       smbus->adapter.id = I2C_HW_SMBUS_AMD8111;
        smbus->adapter.class = I2C_CLASS_HWMON;
        smbus->adapter.algo = &smbus_algorithm;
        smbus->adapter.algo_data = smbus;
@@ -358,11 +375,11 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
        /* set up the driverfs linkage to our parent device */
        smbus->adapter.dev.parent = &dev->dev;
 
+       pci_write_config_dword(smbus->dev, AMD_PCI_MISC, 0);
        error = i2c_add_adapter(&smbus->adapter);
        if (error)
                goto out_release_region;
 
-       pci_write_config_dword(smbus->dev, AMD_PCI_MISC, 0);
        pci_set_drvdata(dev, smbus);
        return 0;
 
@@ -370,10 +387,9 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
        release_region(smbus->base, smbus->size);
  out_kfree:
        kfree(smbus);
-       return -1;
+       return error;
 }
 
-
 static void __devexit amd8111_remove(struct pci_dev *dev)
 {
        struct amd_smbus *smbus = pci_get_drvdata(dev);
@@ -395,7 +411,6 @@ static int __init i2c_amd8111_init(void)
        return pci_register_driver(&amd8111_driver);
 }
 
-
 static void __exit i2c_amd8111_exit(void)
 {
        pci_unregister_driver(&amd8111_driver);
index ae625b85447074ee958e734ece3c3761bc4022a2..8c3569a9775b79d1d9cb935c505abd07856a3669 100644 (file)
@@ -123,7 +123,7 @@ static int i801_transaction(void)
                        dev_dbg(&I801_dev->dev, "Failed! (%02x)\n", temp);
                        return -1;
                } else {
-                       dev_dbg(&I801_dev->dev, "Successfull!\n");
+                       dev_dbg(&I801_dev->dev, "Successful!\n");
                }
        }
 
@@ -442,6 +442,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter i801_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_I801,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 10c98bc88aa6c57465299165f245eaf5270f6469..42e8d94c276fde7e278016aef70d6ffdf23e2baa 100644 (file)
@@ -171,6 +171,7 @@ static struct i2c_algo_bit_data i810_i2c_bit_data = {
 
 static struct i2c_adapter i810_i2c_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_I810,
        .name           = "I810/I815 I2C Adapter",
        .algo_data      = &i810_i2c_bit_data,
 };
@@ -186,6 +187,7 @@ static struct i2c_algo_bit_data i810_ddc_bit_data = {
 
 static struct i2c_adapter i810_ddc_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_I810,
        .name           = "I810/I815 DDC Adapter",
        .algo_data      = &i810_ddc_bit_data,
 };
index 1898e9987021606c78af90c3b97869066355aa7d..8b14d14e60cad3e3cd1099df6d221dc6ab1b475e 100644 (file)
@@ -727,6 +727,7 @@ static int __devinit iic_probe(struct ocp_device *ocp){
        
        /* Register it with i2c layer */
        adap = &dev->adap;
+       adap->dev.parent = &ocp->dev;
        strcpy(adap->name, "IBM IIC");
        i2c_set_adapdata(adap, dev);
        adap->id = I2C_HW_OCP;
index 8ed59a2dff532124afc6e899f1df3d6a4622f106..5f33bc9c1e02ba7c134121c5beb8880c51f79eb3 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c-isa.h>
 #include <linux/platform_device.h>
+#include <linux/completion.h>
 
 static u32 isa_func(struct i2c_adapter *adapter);
 
index 490173611d6b615013b2d87a7984af9aec7b04d2..a3283b907eb87a947fe30979e27867c34811cfaf 100644 (file)
@@ -520,6 +520,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
                rc = -ENXIO;
                goto exit_unmap_regs;
        }
+       drv_data->adapter.dev.parent = &pd->dev;
        drv_data->adapter.id = I2C_HW_MV64XXX;
        drv_data->adapter.algo = &mv64xxx_i2c_algo;
        drv_data->adapter.owner = THIS_MODULE;
index ad37c10e7fec38aaea6e2103647f5c0ca895e5ab..653555184a6467d19db716ca7cd4ff97a8ef71dc 100644 (file)
@@ -57,7 +57,6 @@ MODULE_DESCRIPTION("nForce2/3/4/5xx SMBus driver");
 
 
 struct nforce2_smbus {
-       struct pci_dev *dev;
        struct i2c_adapter adapter;
        int base;
        int size;
@@ -230,7 +229,6 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar,
                smbus->base = iobase & PCI_BASE_ADDRESS_IO_MASK;
                smbus->size = 64;
        }
-       smbus->dev = dev;
 
        if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) {
                dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n",
@@ -238,6 +236,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar,
                return -1;
        }
        smbus->adapter.owner = THIS_MODULE;
+       smbus->adapter.id = I2C_HW_SMBUS_NFORCE2;
        smbus->adapter.class = I2C_CLASS_HWMON;
        smbus->adapter.algo = &smbus_algorithm;
        smbus->adapter.algo_data = smbus;
index 9ddd816d5d0f6609eec3ecddf640f15e2839e24e..ed69d846cb950c18248c5b5d1a3d4335f872efc3 100644 (file)
@@ -88,6 +88,13 @@ static struct adapter_parm adapter_parm[] = {
                .getscl = { 0x40, STAT, 0 },
                .init   = { 0xfc, DATA, 0 },
        },
+       /* type 7: One For All JP1 parallel port adapter */
+       {
+               .setsda = { 0x01, DATA, 0 },
+               .setscl = { 0x02, DATA, 0 },
+               .getsda = { 0x80, STAT, 1 },
+               .init   = { 0x04, DATA, 1 },
+       },
 };
 
 static int type = -1;
@@ -101,4 +108,5 @@ MODULE_PARM_DESC(type,
        " 4 = ADM1032 evaluation board\n"
        " 5 = ADM1025, ADM1030 and ADM1031 evaluation boards\n"
        " 6 = Barco LPT->DVI (K5800236) adapter\n"
+       " 7 = One For All JP1 parallel port adapter\n"
 );
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c
new file mode 100644 (file)
index 0000000..f54fb5d
--- /dev/null
@@ -0,0 +1,426 @@
+/*
+ * Copyright (C) 2006-2007 PA Semi, Inc
+ *
+ * SMBus host driver for PA Semi PWRficient
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/stddef.h>
+#include <linux/sched.h>
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <asm/io.h>
+
+static struct pci_driver pasemi_smb_driver;
+
+struct pasemi_smbus {
+       struct pci_dev          *dev;
+       struct i2c_adapter       adapter;
+       unsigned long            base;
+       int                      size;
+};
+
+/* Register offsets */
+#define REG_MTXFIFO    0x00
+#define REG_MRXFIFO    0x04
+#define REG_SMSTA      0x14
+#define REG_CTL                0x1c
+
+/* Register defs */
+#define MTXFIFO_READ   0x00000400
+#define MTXFIFO_STOP   0x00000200
+#define MTXFIFO_START  0x00000100
+#define MTXFIFO_DATA_M 0x000000ff
+
+#define MRXFIFO_EMPTY  0x00000100
+#define MRXFIFO_DATA_M 0x000000ff
+
+#define SMSTA_XEN      0x08000000
+
+#define CTL_MRR                0x00000400
+#define CTL_MTR                0x00000200
+#define CTL_CLK_M      0x000000ff
+
+#define CLK_100K_DIV   84
+#define CLK_400K_DIV   21
+
+static inline void reg_write(struct pasemi_smbus *smbus, int reg, int val)
+{
+       dev_dbg(&smbus->dev->dev, "smbus write reg %lx val %08x\n",
+               smbus->base + reg, val);
+       outl(val, smbus->base + reg);
+}
+
+static inline int reg_read(struct pasemi_smbus *smbus, int reg)
+{
+       int ret;
+       ret = inl(smbus->base + reg);
+       dev_dbg(&smbus->dev->dev, "smbus read reg %lx val %08x\n",
+               smbus->base + reg, ret);
+       return ret;
+}
+
+#define TXFIFO_WR(smbus, reg)  reg_write((smbus), REG_MTXFIFO, (reg))
+#define RXFIFO_RD(smbus)       reg_read((smbus), REG_MRXFIFO)
+
+static void pasemi_smb_clear(struct pasemi_smbus *smbus)
+{
+       unsigned int status;
+
+       status = reg_read(smbus, REG_SMSTA);
+       reg_write(smbus, REG_SMSTA, status);
+}
+
+static unsigned int pasemi_smb_waitready(struct pasemi_smbus *smbus)
+{
+       int timeout = 10;
+       unsigned int status;
+
+       status = reg_read(smbus, REG_SMSTA);
+
+       while (!(status & SMSTA_XEN) && timeout--) {
+               msleep(1);
+               status = reg_read(smbus, REG_SMSTA);
+       }
+
+       if (timeout < 0) {
+               dev_warn(&smbus->dev->dev, "Timeout, status 0x%08x\n", status);
+               reg_write(smbus, REG_SMSTA, status);
+               return -ETIME;
+       }
+
+       /* Clear XEN */
+       reg_write(smbus, REG_SMSTA, SMSTA_XEN);
+
+       return 0;
+}
+
+static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter,
+                              struct i2c_msg *msg, int stop)
+{
+       struct pasemi_smbus *smbus = adapter->algo_data;
+       int read, i, err;
+       u32 rd;
+
+       read = msg->flags & I2C_M_RD ? 1 : 0;
+
+       TXFIFO_WR(smbus, MTXFIFO_START | (msg->addr << 1) | read);
+
+       if (read) {
+               TXFIFO_WR(smbus, msg->len | MTXFIFO_READ |
+                                (stop ? MTXFIFO_STOP : 0));
+
+               err = pasemi_smb_waitready(smbus);
+               if (err)
+                       goto reset_out;
+
+               for (i = 0; i < msg->len; i++) {
+                       rd = RXFIFO_RD(smbus);
+                       if (rd & MRXFIFO_EMPTY) {
+                               err = -ENODATA;
+                               goto reset_out;
+                       }
+                       msg->buf[i] = rd & MRXFIFO_DATA_M;
+               }
+       } else {
+               for (i = 0; i < msg->len - 1; i++)
+                       TXFIFO_WR(smbus, msg->buf[i]);
+
+               TXFIFO_WR(smbus, msg->buf[msg->len] |
+                         (stop ? MTXFIFO_STOP : 0));
+       }
+
+       return 0;
+
+ reset_out:
+       reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR |
+                 (CLK_100K_DIV & CTL_CLK_M)));
+       return err;
+}
+
+static int pasemi_i2c_xfer(struct i2c_adapter *adapter,
+                          struct i2c_msg *msgs, int num)
+{
+       struct pasemi_smbus *smbus = adapter->algo_data;
+       int ret, i;
+
+       pasemi_smb_clear(smbus);
+
+       ret = 0;
+
+       for (i = 0; i < num && !ret; i++)
+               ret = pasemi_i2c_xfer_msg(adapter, &msgs[i], (i == (num - 1)));
+
+       return ret ? ret : num;
+}
+
+static int pasemi_smb_xfer(struct i2c_adapter *adapter,
+               u16 addr, unsigned short flags, char read_write, u8 command,
+               int size, union i2c_smbus_data *data)
+{
+       struct pasemi_smbus *smbus = adapter->algo_data;
+       unsigned int rd;
+       int read_flag, err;
+       int len = 0, i;
+
+       /* All our ops take 8-bit shifted addresses */
+       addr <<= 1;
+       read_flag = read_write == I2C_SMBUS_READ;
+
+       pasemi_smb_clear(smbus);
+
+       switch (size) {
+       case I2C_SMBUS_QUICK:
+               TXFIFO_WR(smbus, addr | read_flag | MTXFIFO_START |
+                         MTXFIFO_STOP);
+               break;
+       case I2C_SMBUS_BYTE:
+               TXFIFO_WR(smbus, addr | read_flag | MTXFIFO_START);
+               if (read_write)
+                       TXFIFO_WR(smbus, 1 | MTXFIFO_STOP | MTXFIFO_READ);
+               else
+                       TXFIFO_WR(smbus, MTXFIFO_STOP | command);
+               break;
+       case I2C_SMBUS_BYTE_DATA:
+               TXFIFO_WR(smbus, addr | MTXFIFO_START);
+               TXFIFO_WR(smbus, command);
+               if (read_write) {
+                       TXFIFO_WR(smbus, addr | I2C_SMBUS_READ | MTXFIFO_START);
+                       TXFIFO_WR(smbus, 1 | MTXFIFO_READ | MTXFIFO_STOP);
+               } else {
+                       TXFIFO_WR(smbus, MTXFIFO_STOP | data->byte);
+               }
+               break;
+       case I2C_SMBUS_WORD_DATA:
+               TXFIFO_WR(smbus, addr | MTXFIFO_START);
+               TXFIFO_WR(smbus, command);
+               if (read_write) {
+                       TXFIFO_WR(smbus, addr | I2C_SMBUS_READ | MTXFIFO_START);
+                       TXFIFO_WR(smbus, 2 | MTXFIFO_READ | MTXFIFO_STOP);
+               } else {
+                       TXFIFO_WR(smbus, data->word & MTXFIFO_DATA_M);
+                       TXFIFO_WR(smbus, MTXFIFO_STOP | (data->word >> 8));
+               }
+               break;
+       case I2C_SMBUS_BLOCK_DATA:
+               TXFIFO_WR(smbus, addr | MTXFIFO_START);
+               TXFIFO_WR(smbus, command);
+               if (read_write) {
+                       TXFIFO_WR(smbus, addr | I2C_SMBUS_READ | MTXFIFO_START);
+                       TXFIFO_WR(smbus, 1 | MTXFIFO_READ);
+                       rd = RXFIFO_RD(smbus);
+                       len = min_t(u8, (rd & MRXFIFO_DATA_M),
+                                   I2C_SMBUS_BLOCK_MAX);
+                       TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ |
+                                        MTXFIFO_STOP);
+               } else {
+                       len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX);
+                       TXFIFO_WR(smbus, len);
+                       for (i = 1; i < len; i++)
+                               TXFIFO_WR(smbus, data->block[i]);
+                       TXFIFO_WR(smbus, data->block[len] | MTXFIFO_STOP);
+               }
+               break;
+       case I2C_SMBUS_PROC_CALL:
+               read_write = I2C_SMBUS_READ;
+               TXFIFO_WR(smbus, addr | MTXFIFO_START);
+               TXFIFO_WR(smbus, command);
+               TXFIFO_WR(smbus, data->word & MTXFIFO_DATA_M);
+               TXFIFO_WR(smbus, (data->word >> 8) & MTXFIFO_DATA_M);
+               TXFIFO_WR(smbus, addr | I2C_SMBUS_READ | MTXFIFO_START);
+               TXFIFO_WR(smbus, 2 | MTXFIFO_STOP | MTXFIFO_READ);
+               break;
+       case I2C_SMBUS_BLOCK_PROC_CALL:
+               len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX - 1);
+               read_write = I2C_SMBUS_READ;
+               TXFIFO_WR(smbus, addr | MTXFIFO_START);
+               TXFIFO_WR(smbus, command);
+               TXFIFO_WR(smbus, len);
+               for (i = 1; i <= len; i++)
+                       TXFIFO_WR(smbus, data->block[i]);
+               TXFIFO_WR(smbus, addr | I2C_SMBUS_READ);
+               TXFIFO_WR(smbus, MTXFIFO_READ | 1);
+               rd = RXFIFO_RD(smbus);
+               len = min_t(u8, (rd & MRXFIFO_DATA_M),
+                           I2C_SMBUS_BLOCK_MAX - len);
+               TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | MTXFIFO_STOP);
+               break;
+
+       default:
+               dev_warn(&adapter->dev, "Unsupported transaction %d\n", size);
+               return -EINVAL;
+       }
+
+       err = pasemi_smb_waitready(smbus);
+       if (err)
+               goto reset_out;
+
+       if (read_write == I2C_SMBUS_WRITE)
+               return 0;
+
+       switch (size) {
+       case I2C_SMBUS_BYTE:
+       case I2C_SMBUS_BYTE_DATA:
+               rd = RXFIFO_RD(smbus);
+               if (rd & MRXFIFO_EMPTY) {
+                       err = -ENODATA;
+                       goto reset_out;
+               }
+               data->byte = rd & MRXFIFO_DATA_M;
+               break;
+       case I2C_SMBUS_WORD_DATA:
+       case I2C_SMBUS_PROC_CALL:
+               rd = RXFIFO_RD(smbus);
+               if (rd & MRXFIFO_EMPTY) {
+                       err = -ENODATA;
+                       goto reset_out;
+               }
+               data->word = rd & MRXFIFO_DATA_M;
+               rd = RXFIFO_RD(smbus);
+               if (rd & MRXFIFO_EMPTY) {
+                       err = -ENODATA;
+                       goto reset_out;
+               }
+               data->word |= (rd & MRXFIFO_DATA_M) << 8;
+               break;
+       case I2C_SMBUS_BLOCK_DATA:
+       case I2C_SMBUS_BLOCK_PROC_CALL:
+               data->block[0] = len;
+               for (i = 1; i <= len; i ++) {
+                       rd = RXFIFO_RD(smbus);
+                       if (rd & MRXFIFO_EMPTY) {
+                               err = -ENODATA;
+                               goto reset_out;
+                       }
+                       data->block[i] = rd & MRXFIFO_DATA_M;
+               }
+               break;
+       }
+
+       return 0;
+
+ reset_out:
+       reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR |
+                 (CLK_100K_DIV & CTL_CLK_M)));
+       return err;
+}
+
+static u32 pasemi_smb_func(struct i2c_adapter *adapter)
+{
+       return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
+              I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
+              I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_PROC_CALL |
+              I2C_FUNC_SMBUS_BLOCK_PROC_CALL | I2C_FUNC_I2C;
+}
+
+static const struct i2c_algorithm smbus_algorithm = {
+       .master_xfer    = pasemi_i2c_xfer,
+       .smbus_xfer     = pasemi_smb_xfer,
+       .functionality  = pasemi_smb_func,
+};
+
+static int __devinit pasemi_smb_probe(struct pci_dev *dev,
+                                     const struct pci_device_id *id)
+{
+       struct pasemi_smbus *smbus;
+       int error;
+
+       if (!(pci_resource_flags(dev, 0) & IORESOURCE_IO))
+               return -ENODEV;
+
+       smbus = kzalloc(sizeof(struct pasemi_smbus), GFP_KERNEL);
+       if (!smbus)
+               return -ENOMEM;
+
+       smbus->dev = dev;
+       smbus->base = pci_resource_start(dev, 0);
+       smbus->size = pci_resource_len(dev, 0);
+
+       if (!request_region(smbus->base, smbus->size,
+                           pasemi_smb_driver.name)) {
+               error = -EBUSY;
+               goto out_kfree;
+       }
+
+       smbus->adapter.owner = THIS_MODULE;
+       snprintf(smbus->adapter.name, I2C_NAME_SIZE,
+                "PA Semi SMBus adapter at 0x%lx", smbus->base);
+       smbus->adapter.class = I2C_CLASS_HWMON;
+       smbus->adapter.algo = &smbus_algorithm;
+       smbus->adapter.algo_data = smbus;
+
+       /* set up the driverfs linkage to our parent device */
+       smbus->adapter.dev.parent = &dev->dev;
+
+       reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR |
+                 (CLK_100K_DIV & CTL_CLK_M)));
+
+       error = i2c_add_adapter(&smbus->adapter);
+       if (error)
+               goto out_release_region;
+
+       pci_set_drvdata(dev, smbus);
+
+       return 0;
+
+ out_release_region:
+       release_region(smbus->base, smbus->size);
+ out_kfree:
+       kfree(smbus);
+       return error;
+}
+
+static void __devexit pasemi_smb_remove(struct pci_dev *dev)
+{
+       struct pasemi_smbus *smbus = pci_get_drvdata(dev);
+
+       i2c_del_adapter(&smbus->adapter);
+       release_region(smbus->base, smbus->size);
+       kfree(smbus);
+}
+
+static struct pci_device_id pasemi_smb_ids[] = {
+       { PCI_DEVICE(0x1959, 0xa003) },
+       { 0, }
+};
+
+MODULE_DEVICE_TABLE(pci, pasemi_smb_ids);
+
+static struct pci_driver pasemi_smb_driver = {
+       .name           = "i2c-pasemi",
+       .id_table       = pasemi_smb_ids,
+       .probe          = pasemi_smb_probe,
+       .remove         = __devexit_p(pasemi_smb_remove),
+};
+
+static int __init pasemi_smb_init(void)
+{
+       return pci_register_driver(&pasemi_smb_driver);
+}
+
+static void __exit pasemi_smb_exit(void)
+{
+       pci_unregister_driver(&pasemi_smb_driver);
+}
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
+MODULE_DESCRIPTION("PA Semi PWRficient SMBus driver");
+
+module_init(pasemi_smb_init);
+module_exit(pasemi_smb_exit);
index 30c7a1b38cbd7e5202106b8f060bb55a83f29e5d..03d0aeea0189baadf42de61c5fecc44cb5de9087 100644 (file)
@@ -23,6 +23,7 @@
    Supports:
        Intel PIIX4, 440MX
        Serverworks OSB4, CSB5, CSB6, HT-1000
+       ATI IXP200, IXP300, IXP400, SB600
        SMSC Victory66
 
    Note: we assume there can only be one device, with one SMBus interface.
@@ -383,6 +384,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter piix4_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_PIIX4,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
@@ -396,6 +398,8 @@ static struct pci_device_id piix4_ids[] = {
          .driver_data = 0 },
        { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS),
          .driver_data = 0 },
+       { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SMBUS),
+         .driver_data = 0 },
        { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4),
          .driver_data = 0 },
        { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5),
index 648d55533d87e1a53a9b1d6a58bd21a7f17a77ab..1425d2245c827f8f9a103a3f74dfb3a7cfb70df3 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/types.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
-#include <linux/completion.h>
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <asm/prom.h>
index 844b4ff908934895d5be8e8f58162b1e3b28f6ca..b7fb65c301124eb54e786bc5ef33153737028f06 100644 (file)
@@ -145,6 +145,7 @@ static struct i2c_algo_bit_data sav_i2c_bit_data = {
 
 static struct i2c_adapter savage4_i2c_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_SAVAGE,
        .name           = "I2C Savage4 adapter",
        .algo_data      = &sav_i2c_bit_data,
 };
index 38bbfd840b6b181c51aab35856ceebfdfb737cdf..d333babe4ad36161a860967e5624519f4c1ec4ba 100644 (file)
@@ -365,6 +365,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter sis5595_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_SIS5595,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index dec0bafb52ab5cd5f241b7675800048a790c7cd8..172bacf932a6807c21333f2cb3b594b8ed47b855 100644 (file)
@@ -457,6 +457,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter sis630_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_SIS630,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 7fd07fbac33681c3f81f49e66acad11660aa3533..869a635d37e9d5d3a6da7e93f777609a61bc5f4a 100644 (file)
@@ -249,6 +249,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter sis96x_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_SIS96X,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 15d7e00e47e6a7b3edb93d9321eefdcee01f6847..bbcc62151f7c4cf542478bcf6ee8768254aaba64 100644 (file)
@@ -86,6 +86,7 @@ static struct i2c_algo_bit_data bit_data = {
 
 static struct i2c_adapter vt586b_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_VIA,
        .class          = I2C_CLASS_HWMON,
        .name           = "VIA i2c",
        .algo_data      = &bit_data,
index efc6bbf0cc0a49818b569208f92f92062acefaf2..03c5fc868548d3d121aca6d879b06e13031594c2 100644 (file)
@@ -4,7 +4,7 @@
     Copyright (c) 1998 - 2002  Frodo Looijaard <frodol@dds.nl>,
     Philip Edelbrock <phil@netroedge.com>, Kyösti Mälkki <kmalkki@cc.hut.fi>,
     Mark D. Studebaker <mdsxyz123@yahoo.com>
-    Copyright (C) 2005  Jean Delvare <khali@linux-fr.org>
+    Copyright (C) 2005 - 2007  Jean Delvare <khali@linux-fr.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
@@ -36,6 +36,7 @@
    VT8237R            0x3227             yes
    VT8237A            0x3337             yes
    VT8251             0x3287             yes
+   CX700              0x8324             yes
 
    Note: we assume there can only be one device, with one SMBus interface.
 */
@@ -306,6 +307,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter vt596_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_VIA2,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
@@ -383,6 +385,7 @@ found:
        dev_dbg(&pdev->dev, "VT596_smba = 0x%X\n", vt596_smba);
 
        switch (pdev->device) {
+       case PCI_DEVICE_ID_VIA_CX700:
        case PCI_DEVICE_ID_VIA_8251:
        case PCI_DEVICE_ID_VIA_8237:
        case PCI_DEVICE_ID_VIA_8237A:
@@ -442,6 +445,8 @@ static struct pci_device_id vt596_ids[] = {
          .driver_data = SMBBA1 },
        { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8251),
          .driver_data = SMBBA3 },
+       { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_CX700),
+         .driver_data = SMBBA3 },
        { 0, }
 };
 
index b0377b81744bcc4d525460b9a8ca8e2eb839d8e2..88a3447e11e1eaf47fb9ddc0b29fc0ab8fb0048f 100644 (file)
@@ -165,6 +165,7 @@ static struct i2c_algo_bit_data voo_i2c_bit_data = {
 
 static struct i2c_adapter voodoo3_i2c_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_VOO,
        .class          = I2C_CLASS_TV_ANALOG, 
        .name           = "I2C Voodoo3/Banshee adapter",
        .algo_data      = &voo_i2c_bit_data,
@@ -181,6 +182,7 @@ static struct i2c_algo_bit_data voo_ddc_bit_data = {
 
 static struct i2c_adapter voodoo3_ddc_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_VOO,
        .class          = I2C_CLASS_DDC, 
        .name           = "DDC Voodoo3/Banshee adapter",
        .algo_data      = &voo_ddc_bit_data,
index 714bae780953c821792ec410597411f722c7df87..0b082c5a01956d7e98b52329ad920b69693793e3 100644 (file)
@@ -428,7 +428,7 @@ static __init int scx200_acb_probe(struct scx200_acb_iface *iface)
 }
 
 static __init struct scx200_acb_iface *scx200_create_iface(const char *text,
-               int index)
+               struct device *dev, int index)
 {
        struct scx200_acb_iface *iface;
        struct i2c_adapter *adapter;
@@ -446,6 +446,7 @@ static __init struct scx200_acb_iface *scx200_create_iface(const char *text,
        adapter->id = I2C_HW_SMBUS_SCX200;
        adapter->algo = &scx200_acb_algorithm;
        adapter->class = I2C_CLASS_HWMON;
+       adapter->dev.parent = dev;
 
        mutex_init(&iface->mutex);
 
@@ -486,7 +487,7 @@ static __init int scx200_create_pci(const char *text, struct pci_dev *pdev,
        struct scx200_acb_iface *iface;
        int rc;
 
-       iface = scx200_create_iface(text, 0);
+       iface = scx200_create_iface(text, &pdev->dev, 0);
 
        if (iface == NULL)
                return -ENOMEM;
@@ -524,7 +525,7 @@ static int __init scx200_create_isa(const char *text, unsigned long base,
        struct scx200_acb_iface *iface;
        int rc;
 
-       iface = scx200_create_iface(text, index);
+       iface = scx200_create_iface(text, NULL, index);
 
        if (iface == NULL)
                return -ENOMEM;
index 6cd96e43aa72a9d50ebbc8eb8a66c327bca761dc..c3022a023449ec2012b7911c0be94d8f7446869b 100644 (file)
@@ -81,6 +81,7 @@ static struct i2c_algo_bit_data scx200_i2c_data = {
 
 static struct i2c_adapter scx200_i2c_ops = {
        .owner             = THIS_MODULE,
+       .id                = I2C_HW_B_SCX200,
        .algo_data         = &scx200_i2c_data,
        .name   = "NatSemi SCx200 I2C",
 };
index b05378a3d673fb67de094c3c0e4c33e9c7836d87..21fe1406c8b4276b6c0faca6c0ba00826464664c 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/seq_file.h>
 #include <linux/platform_device.h>
 #include <linux/mutex.h>
+#include <linux/completion.h>
 #include <asm/uaccess.h>
 
 
@@ -40,49 +41,72 @@ static LIST_HEAD(drivers);
 static DEFINE_MUTEX(core_lists);
 static DEFINE_IDR(i2c_adapter_idr);
 
+
+/* ------------------------------------------------------------------------- */
+
 /* match always succeeds, as we want the probe() to tell if we really accept this match */
 static int i2c_device_match(struct device *dev, struct device_driver *drv)
 {
        return 1;
 }
 
-static int i2c_bus_suspend(struct device * dev, pm_message_t state)
+static int i2c_device_probe(struct device *dev)
 {
-       int rc = 0;
+       return -ENODEV;
+}
 
-       if (dev->driver && dev->driver->suspend)
-               rc = dev->driver->suspend(dev, state);
-       return rc;
+static int i2c_device_remove(struct device *dev)
+{
+       return 0;
 }
 
-static int i2c_bus_resume(struct device * dev)
+static void i2c_device_shutdown(struct device *dev)
 {
-       int rc = 0;
-       
-       if (dev->driver && dev->driver->resume)
-               rc = dev->driver->resume(dev);
-       return rc;
+       struct i2c_driver *driver;
+
+       if (!dev->driver)
+               return;
+       driver = to_i2c_driver(dev->driver);
+       if (driver->shutdown)
+               driver->shutdown(to_i2c_client(dev));
 }
 
-static int i2c_device_probe(struct device *dev)
+static int i2c_device_suspend(struct device * dev, pm_message_t mesg)
 {
-       return -ENODEV;
+       struct i2c_driver *driver;
+
+       if (!dev->driver)
+               return 0;
+       driver = to_i2c_driver(dev->driver);
+       if (!driver->suspend)
+               return 0;
+       return driver->suspend(to_i2c_client(dev), mesg);
 }
 
-static int i2c_device_remove(struct device *dev)
+static int i2c_device_resume(struct device * dev)
 {
-       return 0;
+       struct i2c_driver *driver;
+
+       if (!dev->driver)
+               return 0;
+       driver = to_i2c_driver(dev->driver);
+       if (!driver->resume)
+               return 0;
+       return driver->resume(to_i2c_client(dev));
 }
 
 struct bus_type i2c_bus_type = {
-       .name =         "i2c",
-       .match =        i2c_device_match,
-       .probe =        i2c_device_probe,
-       .remove =       i2c_device_remove,
-       .suspend =      i2c_bus_suspend,
-       .resume =       i2c_bus_resume,
+       .name           = "i2c",
+       .match          = i2c_device_match,
+       .probe          = i2c_device_probe,
+       .remove         = i2c_device_remove,
+       .shutdown       = i2c_device_shutdown,
+       .suspend        = i2c_device_suspend,
+       .resume         = i2c_device_resume,
 };
 
+/* ------------------------------------------------------------------------- */
+
 void i2c_adapter_dev_release(struct device *dev)
 {
        struct i2c_adapter *adap = dev_to_i2c_adapter(dev);
@@ -193,9 +217,8 @@ int i2c_add_adapter(struct i2c_adapter *adap)
         */
        if (adap->dev.parent == NULL) {
                adap->dev.parent = &platform_bus;
-               printk(KERN_WARNING "**WARNING** I2C adapter driver [%s] "
-                      "forgot to specify physical device; fix it!\n",
-                      adap->name);
+               pr_debug("I2C adapter driver [%s] forgot to specify "
+                        "physical device\n", adap->name);
        }
        sprintf(adap->dev.bus_id, "i2c-%d", adap->nr);
        adap->dev.driver = &i2c_adapter_driver;
index fbb7f14ec5097455c628e08c0b4b4910d557af5e..0742befe92270f0d9557072dc59a6b2771e5197c 100644 (file)
@@ -1434,6 +1434,7 @@ static int __devinit add_card(struct pci_dev *dev,
                 i2c_adapter_data = bit_data;
                 i2c_ad->algo_data = &i2c_adapter_data;
                 i2c_adapter_data.data = lynx;
+               i2c_ad->dev.parent = &dev->dev;
 
                PRINTD(KERN_DEBUG, lynx->id,"original eeprom control: %d",
                       reg_read(lynx, SERIAL_EEPROM_CONTROL));
index 1c7d6f221b557bfad36b42d4014c2fb7dc6ba4bd..b77ef5187d6d0e6488217e9a38c9000ada5d8716 100644 (file)
@@ -574,8 +574,8 @@ static struct adb_request led_request;
 static int leds_pending[16];
 static int leds_req_pending;
 static int pending_devs[16];
-static int pending_led_start=0;
-static int pending_led_end=0;
+static int pending_led_start;
+static int pending_led_end;
 static DEFINE_SPINLOCK(leds_lock);
 
 static void leds_done(struct adb_request *req)
index a6d50f4fabd7a9b3bf557af01c2b1c040c10c925..c5e4d43f97fcbe89c4bf69853cb618d3c5bab578 100644 (file)
@@ -102,7 +102,7 @@ static struct pmu_sleep_notifier apm_sleep_notifier = {
        SLEEP_LEVEL_USERLAND,
 };
 
-static char                    driver_version[] = "0.5";       /* no spaces */
+static const char driver_version[] = "0.5";    /* no spaces */
 
 #ifdef DEBUG
 static char *  apm_event_name[] = {
index ee6b4ca691308e4724bf395564b234780bc8f124..f632cec9ce45eab7ac136408c683b6f7f1d97d60 100644 (file)
 
 static struct input_dev *emumousebtn;
 static int emumousebtn_input_register(void);
-static int mouse_emulate_buttons = 0;
+static int mouse_emulate_buttons;
 static int mouse_button2_keycode = KEY_RIGHTCTRL;      /* right control key */
 static int mouse_button3_keycode = KEY_RIGHTALT;       /* right option key */
-static int mouse_last_keycode = 0;
+static int mouse_last_keycode;
 
 #if defined(CONFIG_SYSCTL)
 /* file(s) in /proc/sys/dev/mac_hid */
index 3d3bf1643e73ff98fc863cdd5d2ec6b8b5965291..a7ce559266380596a045657ed14ae12efd4f5bb6 100644 (file)
@@ -48,11 +48,11 @@ static u8 FAN_SPD_SET[2] = {0x30, 0x31};
 
 static u8 default_limits_local[3] = {70, 50, 70};    /* local, sensor1, sensor2 */
 static u8 default_limits_chip[3] = {80, 65, 80};    /* local, sensor1, sensor2 */
-static const char *sensor_location[3] = {NULL, NULL, NULL};
+static const char *sensor_location[3];
 
-static int limit_adjust = 0;
+static int limit_adjust;
 static int fan_speed = -1;
-static int verbose = 0;
+static int verbose;
 
 MODULE_AUTHOR("Colin Leroy <colin@colino.net>");
 MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and "
index df66291b1322651a2053637dfa41a9b6818732fc..3797f503cd6cfdf9ad006af706d3472d42743586 100644 (file)
@@ -86,7 +86,7 @@ static int data_index;
 #ifdef CONFIG_PPC
 static struct device_node *vias;
 #endif
-static int cuda_fully_inited = 0;
+static int cuda_fully_inited;
 
 #ifdef CONFIG_ADB
 static int cuda_probe(void);
index 5d88d5b0ad9931c3f400efbe5c2ec6c48d6ec0c2..175b3e56e37541f1131acba6cf5912871bd0894f 100644 (file)
@@ -107,10 +107,10 @@ static enum macii_state {
        awaiting_reply
 } macii_state;
 
-static int need_poll    = 0;
-static int command_byte = 0;
-static int last_reply   = 0;
-static int last_active  = 0;
+static int need_poll;
+static int command_byte;
+static int last_reply;
+static int last_active;
 
 static struct adb_request *current_req;
 static struct adb_request *last_req;
@@ -124,7 +124,7 @@ static int first_byte;
 static int prefix_len;
 static int status = ST_IDLE|TREQ;
 static int last_status;
-static int driver_running = 0;
+static int driver_running;
 
 /* debug level 10 required for ADB logging (should be && debug_adb, ideally) */
 
index 1f0aa5dc9aa576eac1060a6ba3e1da55a9ec24b6..10051db48d2323a8b828f6271f4f8d1732a6c35f 100644 (file)
@@ -63,10 +63,10 @@ static volatile unsigned char *via;
 
 #undef DEBUG_MACIISI_ADB
 
-static struct adb_request* current_req = NULL;
-static struct adb_request* last_req = NULL;
+static struct adb_request* current_req;
+static struct adb_request* last_req;
 static unsigned char maciisi_rbuf[16];
-static unsigned char *reply_ptr = NULL;
+static unsigned char *reply_ptr;
 static int data_index;
 static int reading_reply;
 static int reply_len;
index 96bea4b62c43e21fd14cb0bd1fef03d533510ddc..b6073bdb50c36a73b73e6851ebe6ba2f414801fb 100644 (file)
@@ -141,13 +141,13 @@ static volatile int adb_int_pending;
 static volatile int disable_poll;
 static struct device_node *vias;
 static int pmu_kind = PMU_UNKNOWN;
-static int pmu_fully_inited = 0;
+static int pmu_fully_inited;
 static int pmu_has_adb;
 static struct device_node *gpio_node;
-static unsigned char __iomem *gpio_reg = NULL;
+static unsigned char __iomem *gpio_reg;
 static int gpio_irq = NO_IRQ;
 static int gpio_irq_enabled = -1;
-static volatile int pmu_suspended = 0;
+static volatile int pmu_suspended;
 static spinlock_t pmu_lock;
 static u8 pmu_intr_mask;
 static int pmu_version;
@@ -169,7 +169,7 @@ static int option_server_mode;
 
 int pmu_battery_count;
 int pmu_cur_battery;
-unsigned int pmu_power_flags;
+unsigned int pmu_power_flags = PMU_PWR_AC_PRESENT;
 struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES];
 static int query_batt_timer = BATTERY_POLLING_COUNT;
 static struct adb_request batt_req;
@@ -180,7 +180,7 @@ int asleep;
 BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
 
 #ifdef CONFIG_ADB
-static int adb_dev_map = 0;
+static int adb_dev_map;
 static int pmu_adb_flags;
 
 static int pmu_probe(void);
@@ -2776,7 +2776,7 @@ pmu_polled_request(struct adb_request *req)
 
 #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
 
-static int pmu_sys_suspended = 0;
+static int pmu_sys_suspended;
 
 static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state)
 {
@@ -2816,7 +2816,6 @@ static struct sysdev_class pmu_sysclass = {
 };
 
 static struct sys_device device_pmu = {
-       .id             = 0,
        .cls            = &pmu_sysclass,
 };
 
index 4f5b6fa196c562e38160bdcc9aa0c885faa75d6f..54baee57d2f8bec36cbc9977d301896dbb558d30 100644 (file)
@@ -96,10 +96,10 @@ static int data_index;
 static int data_len;
 static int adb_int_pending;
 static int pmu_adb_flags;
-static int adb_dev_map = 0;
+static int adb_dev_map;
 static struct adb_request bright_req_1, bright_req_2, bright_req_3;
 static int pmu_kind = PMU_UNKNOWN;
-static int pmu_fully_inited = 0;
+static int pmu_fully_inited;
 
 int asleep;
 BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
index e0bd2d8f0f0c92e08235aa9e15db650d43723f21..5347a406fff7e0e73abe885eff3562ca747a10a6 100644 (file)
@@ -190,6 +190,7 @@ int flexcop_i2c_init(struct flexcop_device *fc)
        fc->i2c_adap.class          = I2C_CLASS_TV_DIGITAL;
        fc->i2c_adap.algo       = &flexcop_algo;
        fc->i2c_adap.algo_data  = NULL;
+       fc->i2c_adap.dev.parent = fc->dev;
 
        if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0)
                return ret;
index 55ba020386c97d32db99f288250c5d603a382789..70df31b0a8a9cdecfae95d3f4dea2efc07ad0b5f 100644 (file)
@@ -27,6 +27,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d)
 #endif
        d->i2c_adap.algo      = d->props.i2c_algo;
        d->i2c_adap.algo_data = NULL;
+       d->i2c_adap.dev.parent = &d->udev->dev;
 
        i2c_set_adapdata(&d->i2c_adap, d);
 
index 60820deb900b3958e2cc0c43faaa1b5360eab34f..b60cdc93d6dbddab7031a69128acb3114c5f9852 100644 (file)
@@ -1690,6 +1690,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
 #endif
        ttusb->i2c_adap.algo              = &ttusb_dec_algo;
        ttusb->i2c_adap.algo_data         = NULL;
+       ttusb->i2c_adap.dev.parent        = &udev->dev;
 
        result = i2c_add_adapter(&ttusb->i2c_adap);
        if (result) {
index fb1410c6f864be4d89e8dd9573787554d68f8e49..4dae8925667f77cd2cbfb9919321b3d00d87d265 100644 (file)
@@ -549,6 +549,7 @@ static int cafe_smbus_setup(struct cafe_camera *cam)
        adap->client_unregister = cafe_smbus_detach;
        adap->algo = &cafe_smbus_algo;
        strcpy(adap->name, "cafe_ccic");
+       adap->dev.parent = &cam->pdev->dev;
        i2c_set_adapdata(adap, cam);
        ret = i2c_add_adapter(adap);
        if (ret)
index f9bb41d8f4f3375896fe3580ad8ac815a6c3b172..62a7cfca837dae7846a5faf299f88ccb4977527e 100644 (file)
@@ -977,6 +977,7 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw)
        memcpy(&hdw->i2c_adap,&pvr2_i2c_adap_template,sizeof(hdw->i2c_adap));
        memcpy(&hdw->i2c_algo,&pvr2_i2c_algo_template,sizeof(hdw->i2c_algo));
        strlcpy(hdw->i2c_adap.name,hdw->name,sizeof(hdw->i2c_adap.name));
+       hdw->i2c_adap.dev.parent = &hdw->usb_dev->dev;
        hdw->i2c_adap.algo = &hdw->i2c_algo;
        hdw->i2c_adap.algo_data = hdw;
        hdw->i2c_pend_mask = 0;
index 858252c15084a3d562d3cb1c981e4c8853c6823f..a242b76aea894c8b0b7e16282c063b5733f0fe0d 100644 (file)
@@ -258,6 +258,7 @@ int usbvision_init_i2c(struct usb_usbvision *usbvision)
        sprintf(usbvision->i2c_adap.name + strlen(usbvision->i2c_adap.name),
                " #%d", usbvision->vdev->minor & 0x1f);
        PDEBUG(DBG_I2C,"Adaptername: %s", usbvision->i2c_adap.name);
+       usbvision->i2c_adap.dev.parent = &usbvision->dev->dev;
 
        i2c_set_adapdata(&usbvision->i2c_adap, usbvision);
        i2c_set_clientdata(&usbvision->i2c_client, usbvision);
index 6e64af293be58e905b266b12845161f1f7be55d3..8f31613b9903897b52fe42f12c9533559d120a5f 100644 (file)
@@ -1573,6 +1573,7 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam)
 
        memcpy(&cam->i2c_adapter, &adap, sizeof(struct i2c_adapter));
        strcpy(cam->i2c_adapter.name, "w9968cf");
+       cam->i2c_adapter.dev.parent = &cam->usbdev->dev;
        i2c_set_adapdata(&cam->i2c_adapter, cam);
 
        DBG(6, "Registering I2C adapter with kernel...")
index 4d1eb2fba34a8c7d5ec8edd30d76adf1376645fc..73162a3a61dd4182c03921c76595fbdcc53b93ec 100644 (file)
@@ -843,6 +843,7 @@ zoran_register_i2c (struct zoran *zr)
                sizeof(I2C_NAME(&zr->i2c_adapter)) - 1);
        i2c_set_adapdata(&zr->i2c_adapter, zr);
        zr->i2c_adapter.algo_data = &zr->i2c_algo;
+       zr->i2c_adapter.dev.parent = &zr->pci_dev->dev;
        return i2c_bit_add_bus(&zr->i2c_adapter);
 }
 
index 205fa28593b769820f966ec25e5f122a6745bdaa..dfef1637bfb8a1a69dc1848d75e2b490a458ddaf 100644 (file)
@@ -199,7 +199,7 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind)
        struct i2c_client *client;
        struct rtc_device *rtc;
 
-       dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__);
+       dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
                err = -ENODEV;
index 038118bbfaea3f512c756414a68e5f27818a1d9c..0242d803ebe5b21d43c42d6954d601ed05372194 100644 (file)
@@ -279,7 +279,7 @@ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind)
 
        int err = 0;
 
-       dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__);
+       dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
                err = -ENODEV;
index e7851e3739abd11030cdf0a724da2436315164dd..09bbe575647b09bd9a5acdfb94cd78c97807fe94 100644 (file)
@@ -499,7 +499,7 @@ static int rs5c372_probe(struct i2c_adapter *adapter, int address, int kind)
        struct rs5c372 *rs5c372;
        struct rtc_time tm;
 
-       dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__);
+       dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
                err = -ENODEV;
index 019ae255b0c8b2d143aae18a6d5ebbdb05b135d2..513d1a611aaba46edb1343ae0bb2ceab58683680 100644 (file)
@@ -506,7 +506,7 @@ static int x1205_probe(struct i2c_adapter *adapter, int address, int kind)
        struct i2c_client *client;
        struct rtc_device *rtc;
 
-       dev_dbg(adapter->class_dev.dev, "%s\n", __FUNCTION__);
+       dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
                err = -ENODEV;
index 5cc6b91f8408d0c0fbc2e3bc00c7279643d71e84..d0edbaacb1f7a8b6277a566f0d5ed2c15c389ba8 100644 (file)
@@ -999,4 +999,14 @@ config SERIAL_NETX_CONSOLE
          If you have enabled the serial port on the Motorola IMX
          CPU you can make it the console by answering Y to this option.
 
+config SERIAL_OF_PLATFORM
+       tristate "Serial port on Open Firmware platform bus"
+       depends on PPC_OF
+       depends on SERIAL_8250
+       help
+         If you have a PowerPC based system that has serial ports
+         on a platform specific bus, you should enable this option.
+         Currently, only 8250 compatible ports are supported, but
+         others can easily be added.
+
 endmenu
index df3632cd7df92e449cdc90bc61dcddc06d692209..f3f82587b5fa2389a4ae5a4cc31a36e9b9191930 100644 (file)
@@ -58,3 +58,4 @@ obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o
 obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o
 obj-$(CONFIG_SERIAL_UARTLITE) += uartlite.o
 obj-$(CONFIG_SERIAL_NETX) += netx-serial.o
+obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o
index 3c4b6c24371254b1a8a6bcfa27fa922a6069fc9d..955bbd653e22c0c94764c1503c7f3c1818bcdb9a 100644 (file)
@@ -127,8 +127,7 @@ static irqreturn_t mpc52xx_uart_int(int irq,void *dev_id);
 
 #if defined(CONFIG_PPC_MERGE)
 static struct of_device_id mpc52xx_uart_of_match[] = {
-       { .type = "serial", .compatible = "mpc52xx-psc-uart", },
-       { .type = "serial", .compatible = "mpc5200-psc", }, /* Efika only! */
+       { .type = "serial", .compatible = "mpc5200-psc-uart", },
        {},
 };
 #endif
@@ -1068,7 +1067,7 @@ mpc52xx_uart_of_enumerate(void)
                        continue;
 
                /* Is a particular device number requested? */
-               devno = get_property(np, "device_no", NULL);
+               devno = get_property(np, "port-number", NULL);
                mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1);
        }
 
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
new file mode 100644 (file)
index 0000000..09b0b73
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ *  Serial Port driver for Open Firmware platform devices
+ *
+ *    Copyright (C) 2006 Arnd Bergmann <arnd@arndb.de>, 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.
+ *
+ */
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/serial_core.h>
+#include <linux/serial_8250.h>
+
+#include <asm/of_platform.h>
+#include <asm/prom.h>
+
+/*
+ * Fill a struct uart_port for a given device node
+ */
+static int __devinit of_platform_serial_setup(struct of_device *ofdev,
+                                       int type, struct uart_port *port)
+{
+       struct resource resource;
+       struct device_node *np = ofdev->node;
+       const unsigned int *clk, *spd;
+       int ret;
+
+       memset(port, 0, sizeof *port);
+       spd = get_property(np, "current-speed", NULL);
+       clk = get_property(np, "clock-frequency", NULL);
+       if (!clk) {
+               dev_warn(&ofdev->dev, "no clock-frequency property set\n");
+               return -ENODEV;
+       }
+
+       ret = of_address_to_resource(np, 0, &resource);
+       if (ret) {
+               dev_warn(&ofdev->dev, "invalid address\n");
+               return ret;
+       }
+
+       spin_lock_init(&port->lock);
+       port->mapbase = resource.start;
+       port->irq = irq_of_parse_and_map(np, 0);
+       port->iotype = UPIO_MEM;
+       port->type = type;
+       port->uartclk = *clk;
+       port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP;
+       port->dev = &ofdev->dev;
+       port->custom_divisor = *clk / (16 * (*spd));
+
+       return 0;
+}
+
+/*
+ * Try to register a serial port
+ */
+static int __devinit of_platform_serial_probe(struct of_device *ofdev,
+                                               const struct of_device_id *id)
+{
+       struct uart_port port;
+       int port_type;
+       int ret;
+
+       if (of_find_property(ofdev->node, "used-by-rtas", NULL))
+               return -EBUSY;
+
+       port_type = (unsigned long)id->data;
+       ret = of_platform_serial_setup(ofdev, port_type, &port);
+       if (ret)
+               goto out;
+
+       switch (port_type) {
+       case PORT_UNKNOWN:
+               dev_info(&ofdev->dev, "Unknown serial port found, "
+                       "attempting to use 8250 driver\n");
+               /* fallthrough */
+       case PORT_8250 ... PORT_MAX_8250:
+               ret = serial8250_register_port(&port);
+               break;
+       default:
+               /* need to add code for these */
+               ret = -ENODEV;
+               break;
+       }
+       if (ret < 0)
+               goto out;
+
+       ofdev->dev.driver_data = (void *)(unsigned long)ret;
+       return 0;
+out:
+       irq_dispose_mapping(port.irq);
+       return ret;
+}
+
+/*
+ * Release a line
+ */
+static int of_platform_serial_remove(struct of_device *ofdev)
+{
+       int line = (unsigned long)ofdev->dev.driver_data;
+       serial8250_unregister_port(line);
+       return 0;
+}
+
+/*
+ * A few common types, add more as needed.
+ */
+static struct of_device_id __devinitdata of_platform_serial_table[] = {
+       { .type = "serial", .compatible = "ns8250",   .data = (void *)PORT_8250, },
+       { .type = "serial", .compatible = "ns16450",  .data = (void *)PORT_16450, },
+       { .type = "serial", .compatible = "ns16550",  .data = (void *)PORT_16550, },
+       { .type = "serial", .compatible = "ns16750",  .data = (void *)PORT_16750, },
+       { .type = "serial",                           .data = (void *)PORT_UNKNOWN, },
+       { /* end of list */ },
+};
+
+static struct of_platform_driver __devinitdata of_platform_serial_driver = {
+       .owner = THIS_MODULE,
+       .name = "of_serial",
+       .probe = of_platform_serial_probe,
+       .remove = of_platform_serial_remove,
+       .match_table = of_platform_serial_table,
+};
+
+static int __init of_platform_serial_init(void)
+{
+       return of_register_platform_driver(&of_platform_serial_driver);
+}
+module_init(of_platform_serial_init);
+
+static void __exit of_platform_serial_exit(void)
+{
+       return of_unregister_platform_driver(&of_platform_serial_driver);
+};
+module_exit(of_platform_serial_exit);
+
+MODULE_AUTHOR("Arnd Bergmann <arnd@arndb.de>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Serial Port driver for Open Firmware platform devices");
index f64c4a0984cd22857eb81f56eb9195b4f86d20bf..5ec718a5fe2257c093ccaf74f550ba9100bf4c27 100644 (file)
@@ -115,6 +115,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo,
                minfo->fbcon.node);
        i2c_set_adapdata(&b->adapter, b);
        b->adapter.algo_data = &b->bac;
+       b->adapter.dev.parent = &ACCESS_FBINFO(pcidev)->dev;
        b->bac = matrox_i2c_algo_template;
        b->bac.data = b;
        err = i2c_bit_add_bus(&b->adapter);
index b5f613932912436da57d062d6ffbe91c2c5e139a..d68631f18df122824a0d36a307c647f15931c7bd 100644 (file)
@@ -1739,41 +1739,45 @@ shouldnt_be_hashed:
  * @rootmnt: vfsmnt to which the root dentry belongs
  * @buffer: buffer to return value in
  * @buflen: buffer length
- * @fail_deleted: what to return for deleted files
  *
- * Convert a dentry into an ASCII path name. If the entry has been deleted,
- * then if @fail_deleted is true, ERR_PTR(-ENOENT) is returned. Otherwise,
- * the the string " (deleted)" is appended. Note that this is ambiguous.
+ * Convert a dentry into an ASCII path name. If the entry has been deleted
+ * the string " (deleted)" is appended. Note that this is ambiguous.
  *
- * Returns the buffer or an error code.
+ * Returns the buffer or an error code if the path was too long.
+ *
+ * "buflen" should be positive. Caller holds the dcache_lock.
  */
-static char *__d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
-                     struct dentry *root, struct vfsmount *rootmnt,
-                     char *buffer, int buflen, int fail_deleted)
+static char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt,
+                       struct dentry *root, struct vfsmount *rootmnt,
+                       char *buffer, int buflen)
 {
-       int namelen, is_slash;
-
-       if (buflen < 2)
-               return ERR_PTR(-ENAMETOOLONG);
-       buffer += --buflen;
-       *buffer = '\0';
+       char * end = buffer+buflen;
+       char * retval;
+       int namelen;
 
-       spin_lock(&dcache_lock);
+       *--end = '\0';
+       buflen--;
        if (!IS_ROOT(dentry) && d_unhashed(dentry)) {
-               if (fail_deleted) {
-                       buffer = ERR_PTR(-ENOENT);
-                       goto out;
-               }
-               if (buflen < 10)
-                       goto Elong;
                buflen -= 10;
-               buffer -= 10;
-               memcpy(buffer, " (deleted)", 10);
+               end -= 10;
+               if (buflen < 0)
+                       goto Elong;
+               memcpy(end, " (deleted)", 10);
        }
-       while (dentry != root || vfsmnt != rootmnt) {
+
+       if (buflen < 1)
+               goto Elong;
+       /* Get '/' right */
+       retval = end-1;
+       *retval = '/';
+
+       for (;;) {
                struct dentry * parent;
 
+               if (dentry == root && vfsmnt == rootmnt)
+                       break;
                if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
+                       /* Global root? */
                        spin_lock(&vfsmount_lock);
                        if (vfsmnt->mnt_parent == vfsmnt) {
                                spin_unlock(&vfsmount_lock);
@@ -1787,60 +1791,33 @@ static char *__d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
                parent = dentry->d_parent;
                prefetch(parent);
                namelen = dentry->d_name.len;
-               if (buflen <= namelen)
-                       goto Elong;
                buflen -= namelen + 1;
-               buffer -= namelen;
-               memcpy(buffer, dentry->d_name.name, namelen);
-               *--buffer = '/';
+               if (buflen < 0)
+                       goto Elong;
+               end -= namelen;
+               memcpy(end, dentry->d_name.name, namelen);
+               *--end = '/';
+               retval = end;
                dentry = parent;
        }
-       /* Get '/' right */
-       if (*buffer != '/')
-               *--buffer = '/';
 
-out:
-       spin_unlock(&dcache_lock);
-       return buffer;
+       return retval;
 
 global_root:
-       /*
-        * We went past the (vfsmount, dentry) we were looking for and have
-        * either hit a root dentry, a lazily unmounted dentry, an
-        * unconnected dentry, or the file is on a pseudo filesystem.
-        */
        namelen = dentry->d_name.len;
-       is_slash = (namelen == 1 && *dentry->d_name.name == '/');
-       if (is_slash || (dentry->d_sb->s_flags & MS_NOUSER)) {
-               /*
-                * Make sure we won't return a pathname starting with '/'.
-                *
-                * Historically, we also glue together the root dentry and
-                * remaining name for pseudo filesystems like pipefs, which
-                * have the MS_NOUSER flag set. This results in pathnames
-                * like "pipe:[439336]".
-                */
-               if (*buffer == '/') {
-                       buffer++;
-                       buflen++;
-               }
-               if (is_slash)
-                       goto out;
-       }
-       if (buflen < namelen)
+       buflen -= namelen;
+       if (buflen < 0)
                goto Elong;
-       buffer -= namelen;
-       memcpy(buffer, dentry->d_name.name, namelen);
-       goto out;
-
+       retval -= namelen-1;    /* hit the slash */
+       memcpy(retval, dentry->d_name.name, namelen);
+       return retval;
 Elong:
-       buffer = ERR_PTR(-ENAMETOOLONG);
-       goto out;
+       return ERR_PTR(-ENAMETOOLONG);
 }
 
 /* write full pathname into buffer and return start of pathname */
-char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt, char *buf,
-            int buflen)
+char * d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
+                               char *buf, int buflen)
 {
        char *res;
        struct vfsmount *rootmnt;
@@ -1850,7 +1827,9 @@ char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt, char *buf,
        rootmnt = mntget(current->fs->rootmnt);
        root = dget(current->fs->root);
        read_unlock(&current->fs->lock);
-       res = __d_path(dentry, vfsmnt, root, rootmnt, buf, buflen, 0);
+       spin_lock(&dcache_lock);
+       res = __d_path(dentry, vfsmnt, root, rootmnt, buf, buflen);
+       spin_unlock(&dcache_lock);
        dput(root);
        mntput(rootmnt);
        return res;
@@ -1876,10 +1855,10 @@ char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt, char *buf,
  */
 asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
 {
-       int error, len;
+       int error;
        struct vfsmount *pwdmnt, *rootmnt;
        struct dentry *pwd, *root;
-       char *page = (char *) __get_free_page(GFP_USER), *cwd;
+       char *page = (char *) __get_free_page(GFP_USER);
 
        if (!page)
                return -ENOMEM;
@@ -1891,18 +1870,29 @@ asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
        root = dget(current->fs->root);
        read_unlock(&current->fs->lock);
 
-       cwd = __d_path(pwd, pwdmnt, root, rootmnt, page, PAGE_SIZE, 1);
-       error = PTR_ERR(cwd);
-       if (IS_ERR(cwd))
-               goto out;
+       error = -ENOENT;
+       /* Has the current directory has been unlinked? */
+       spin_lock(&dcache_lock);
+       if (pwd->d_parent == pwd || !d_unhashed(pwd)) {
+               unsigned long len;
+               char * cwd;
 
-       error = -ERANGE;
-       len = PAGE_SIZE + page - cwd;
-       if (len <= size) {
-               error = len;
-               if (copy_to_user(buf, cwd, len))
-                       error = -EFAULT;
-       }
+               cwd = __d_path(pwd, pwdmnt, root, rootmnt, page, PAGE_SIZE);
+               spin_unlock(&dcache_lock);
+
+               error = PTR_ERR(cwd);
+               if (IS_ERR(cwd))
+                       goto out;
+
+               error = -ERANGE;
+               len = PAGE_SIZE + page - cwd;
+               if (len <= size) {
+                       error = len;
+                       if (copy_to_user(buf, cwd, len))
+                               error = -EFAULT;
+               }
+       } else
+               spin_unlock(&dcache_lock);
 
 out:
        dput(pwd);
index c1a2409bb52a171fc1c1c0b9070b7791f350e812..8578869a8bcfb4556d3e50a62312b0c5abc3f8ee 100644 (file)
@@ -69,7 +69,10 @@ static __inline__ void atomic_add(int i, atomic_t * v)
                "1:     ll      %0, %1          # atomic_add            \n"
                "       addu    %0, %2                                  \n"
                "       sc      %0, %1                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter));
@@ -111,7 +114,10 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
                "1:     ll      %0, %1          # atomic_sub            \n"
                "       subu    %0, %2                                  \n"
                "       sc      %0, %1                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter));
@@ -155,8 +161,11 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
                "1:     ll      %1, %2          # atomic_add_return     \n"
                "       addu    %0, %1, %3                              \n"
                "       sc      %0, %2                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
                "       addu    %0, %1, %3                              \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
@@ -204,8 +213,11 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
                "1:     ll      %1, %2          # atomic_sub_return     \n"
                "       subu    %0, %1, %3                              \n"
                "       sc      %0, %2                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
                "       subu    %0, %1, %3                              \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
@@ -267,10 +279,13 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
                "       bltz    %0, 1f                                  \n"
                "       sc      %0, %2                                  \n"
                "       .set    noreorder                               \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
                "        subu   %0, %1, %3                              \n"
                "       .set    reorder                                 \n"
                "1:                                                     \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
@@ -429,7 +444,10 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
                "1:     lld     %0, %1          # atomic64_add          \n"
                "       addu    %0, %2                                  \n"
                "       scd     %0, %1                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter));
@@ -471,7 +489,10 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
                "1:     lld     %0, %1          # atomic64_sub          \n"
                "       subu    %0, %2                                  \n"
                "       scd     %0, %1                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter));
@@ -515,8 +536,11 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
                "1:     lld     %1, %2          # atomic64_add_return   \n"
                "       addu    %0, %1, %3                              \n"
                "       scd     %0, %2                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
                "       addu    %0, %1, %3                              \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
@@ -564,8 +588,11 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
                "1:     lld     %1, %2          # atomic64_sub_return   \n"
                "       subu    %0, %1, %3                              \n"
                "       scd     %0, %2                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
                "       subu    %0, %1, %3                              \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
@@ -627,10 +654,13 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
                "       bltz    %0, 1f                                  \n"
                "       scd     %0, %2                                  \n"
                "       .set    noreorder                               \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
                "        dsubu  %0, %1, %3                              \n"
                "       .set    reorder                                 \n"
                "1:                                                     \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
index 06445de1324bd3c058a507d08d0c747d6ab571ae..06c08228a5256cbb3fa9320b102b09eb6e21774d 100644 (file)
@@ -68,7 +68,10 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
                "1:     " __LL "%0, %1                  # set_bit       \n"
                "       or      %0, %2                                  \n"
                "       " __SC  "%0, %1                                 \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (temp), "=m" (*m)
                : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m));
@@ -116,7 +119,10 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
                "1:     " __LL "%0, %1                  # clear_bit     \n"
                "       and     %0, %2                                  \n"
                "       " __SC "%0, %1                                  \n"
-               "       beqz    %0, 1b                                  \n"
+               "       beqz    %0, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (temp), "=m" (*m)
                : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m));
@@ -166,7 +172,10 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
                "1:     " __LL "%0, %1          # change_bit    \n"
                "       xor     %0, %2                          \n"
                "       " __SC  "%0, %1                         \n"
-               "       beqz    %0, 1b                          \n"
+               "       beqz    %0, 2f                          \n"
+               "       .subsection 2                           \n"
+               "2:     b       1b                              \n"
+               "       .previous                               \n"
                "       .set    mips0                           \n"
                : "=&r" (temp), "=m" (*m)
                : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m));
@@ -222,8 +231,12 @@ static inline int test_and_set_bit(unsigned long nr,
                "1:     " __LL "%0, %1          # test_and_set_bit      \n"
                "       or      %2, %0, %3                              \n"
                "       " __SC  "%2, %1                                 \n"
-               "       beqz    %2, 1b                                  \n"
+               "       beqz    %2, 2f                                  \n"
                "        and    %2, %0, %3                              \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    pop                                     \n"
                : "=&r" (temp), "=m" (*m), "=&r" (res)
                : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m)
@@ -290,8 +303,12 @@ static inline int test_and_clear_bit(unsigned long nr,
                "       or      %2, %0, %3                              \n"
                "       xor     %2, %3                                  \n"
                "       " __SC  "%2, %1                                 \n"
-               "       beqz    %2, 1b                                  \n"
+               "       beqz    %2, 2f                                  \n"
                "        and    %2, %0, %3                              \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    pop                                     \n"
                : "=&r" (temp), "=m" (*m), "=&r" (res)
                : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m)
@@ -356,8 +373,12 @@ static inline int test_and_change_bit(unsigned long nr,
                "1:     " __LL  "%0, %1         # test_and_change_bit   \n"
                "       xor     %2, %0, %3                              \n"
                "       " __SC  "\t%2, %1                               \n"
-               "       beqz    %2, 1b                                  \n"
+               "       beqz    %2, 2f                                  \n"
                "        and    %2, %0, %3                              \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    pop                                     \n"
                : "=&r" (temp), "=m" (*m), "=&r" (res)
                : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m)
diff --git a/include/asm-mips/compat-signal.h b/include/asm-mips/compat-signal.h
new file mode 100644 (file)
index 0000000..6720770
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef __ASM_COMPAT_SIGNAL_H
+#define __ASM_COMPAT_SIGNAL_H
+
+#include <linux/bug.h>
+#include <linux/compat.h>
+#include <linux/compiler.h>
+
+static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d,
+       const sigset_t *s)
+{
+       int err;
+
+       BUG_ON(sizeof(*d) != sizeof(*s));
+       BUG_ON(_NSIG_WORDS != 2);
+
+       err  = __put_user(s->sig[0],       &d->sig[0]);
+       err |= __put_user(s->sig[0] >> 32, &d->sig[1]);
+       err |= __put_user(s->sig[1],       &d->sig[2]);
+       err |= __put_user(s->sig[1] >> 32, &d->sig[3]);
+
+       return err;
+}
+
+static inline int __copy_conv_sigset_from_user(sigset_t *d,
+       const compat_sigset_t __user *s)
+{
+       int err;
+       union sigset_u {
+               sigset_t        s;
+               compat_sigset_t c;
+       } *u = (union sigset_u *) d;
+
+       BUG_ON(sizeof(*d) != sizeof(*s));
+       BUG_ON(_NSIG_WORDS != 2);
+
+       if (unlikely(!access_ok(VERIFY_READ, d, sizeof(*d))))
+               return -EFAULT;
+
+#ifdef CONFIG_CPU_BIG_ENDIAN
+       err  = __get_user(u->c.sig[1], &s->sig[0]);
+       err |= __get_user(u->c.sig[0], &s->sig[1]);
+       err |= __get_user(u->c.sig[3], &s->sig[2]);
+       err |= __get_user(u->c.sig[2], &s->sig[3]);
+#endif
+#ifdef CONFIG_CPU_LITTLE_ENDIAN
+       err  = __get_user(u->c.sig[0], &s->sig[0]);
+       err |= __get_user(u->c.sig[1], &s->sig[1]);
+       err |= __get_user(u->c.sig[2], &s->sig[2]);
+       err |= __get_user(u->c.sig[3], &s->sig[3]);
+#endif
+
+       return err;
+}
+
+#endif /* __ASM_COMPAT_SIGNAL_H */
index 236d1a467cc7fb49ae8dd028c8b66c1d2e3cd471..230b3f1b69b1015b3d639691200f97ebad45052e 100644 (file)
@@ -68,6 +68,7 @@ extern int dma_is_consistent(struct device *dev, dma_addr_t dma_addr);
 extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
               enum dma_data_direction direction);
 
+#if 0
 #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
 
 extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
@@ -75,5 +76,6 @@ extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
 extern void dma_release_declared_memory(struct device *dev);
 extern void * dma_mark_declared_memory_occupied(struct device *dev,
        dma_addr_t device_addr, size_t size);
+#endif
 
 #endif /* _ASM_DMA_MAPPING_H */
diff --git a/include/asm-mips/mach-generic/dma-coherence.h b/include/asm-mips/mach-generic/dma-coherence.h
new file mode 100644 (file)
index 0000000..df71822
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2006  Ralf Baechle <ralf@linux-mips.org>
+ *
+ */
+#ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H
+#define __ASM_MACH_GENERIC_DMA_COHERENCE_H
+
+struct device;
+
+static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size)
+{
+       return virt_to_phys(addr);
+}
+
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+{
+       return page_to_phys(page);
+}
+
+static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)
+{
+       return dma_addr;
+}
+
+static void plat_unmap_dma_mem(dma_addr_t dma_addr)
+{
+}
+
+static inline int plat_device_is_coherent(struct device *dev)
+{
+#ifdef CONFIG_DMA_COHERENT
+       return 1;
+#endif
+#ifdef CONFIG_DMA_NONCOHERENT
+       return 0;
+#endif
+}
+
+#endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */
index 410ab5f6c5636b519c6ecc8c56932e4abcf08d95..b8e6deba352fd90f6685e736a25df7ac5689c912 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef CONFIG_DMA_COHERENT
 /*
  * Total overkill for most systems but need as a safe default.
+ * Set this one if any device in the system might do non-coherent DMA.
  */
 #define ARCH_KMALLOC_MINALIGN  128
 #endif
diff --git a/include/asm-mips/mach-ip27/dma-coherence.h b/include/asm-mips/mach-ip27/dma-coherence.h
new file mode 100644 (file)
index 0000000..659816e
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2006  Ralf Baechle <ralf@linux-mips.org>
+ *
+ */
+#ifndef __ASM_MACH_IP27_DMA_COHERENCE_H
+#define __ASM_MACH_IP27_DMA_COHERENCE_H
+
+#include <asm/pci/bridge.h>
+
+#define pdev_to_baddr(pdev, addr) \
+       (BRIDGE_CONTROLLER(pdev->bus)->baddr + (addr))
+#define dev_to_baddr(dev, addr) \
+       pdev_to_baddr(to_pci_dev(dev), (addr))
+
+struct device;
+
+static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size)
+{
+       dma_addr_t pa = dev_to_baddr(dev, virt_to_phys(addr));
+
+       return pa;
+}
+
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+{
+       dma_addr_t pa = dev_to_baddr(dev, page_to_phys(page));
+
+       return pa;
+}
+
+static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)
+{
+       return dma_addr & (0xffUL << 56);
+}
+
+static void plat_unmap_dma_mem(dma_addr_t dma_addr)
+{
+}
+
+static inline int plat_device_is_coherent(struct device *dev)
+{
+       return 1;               /* IP27 non-cohernet mode is unsupported */
+}
+
+#endif /* __ASM_MACH_IP27_DMA_COHERENCE_H */
diff --git a/include/asm-mips/mach-ip32/dma-coherence.h b/include/asm-mips/mach-ip32/dma-coherence.h
new file mode 100644 (file)
index 0000000..950be17
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2006  Ralf Baechle <ralf@linux-mips.org>
+ *
+ */
+#ifndef __ASM_MACH_IP35_DMA_COHERENCE_H
+#define __ASM_MACH_IP35_DMA_COHERENCE_H
+
+#include <asm/ip32/crime.h>
+
+struct device;
+
+/*
+ * Few notes.
+ * 1. CPU sees memory as two chunks: 0-256M@0x0, and the rest @0x40000000+256M
+ * 2. PCI sees memory as one big chunk @0x0 (or we could use 0x40000000 for
+ *    native-endian)
+ * 3. All other devices see memory as one big chunk at 0x40000000
+ * 4. Non-PCI devices will pass NULL as struct device*
+ *
+ * Thus we translate differently, depending on device.
+ */
+
+#define RAM_OFFSET_MASK 0x3fffffffUL
+
+static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size)
+{
+       dma_addr_t pa = virt_to_phys(addr) & RAM_OFFSET_MASK;
+
+       if (dev == NULL)
+               pa += CRIME_HI_MEM_BASE;
+
+       return pa;
+}
+
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+{
+       dma_addr_t pa;
+
+       pa = page_to_phys(page) & RAM_OFFSET_MASK;
+
+       if (dev == NULL)
+               pa += CRIME_HI_MEM_BASE;
+
+       return pa;
+}
+
+/* This is almost certainly wrong but it's what dma-ip32.c used to use  */
+static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)
+{
+       unsigned long addr = dma_addr & RAM_OFFSET_MASK;
+
+       if (dma_addr >= 256*1024*1024)
+               addr += CRIME_HI_MEM_BASE;
+
+       return addr;
+}
+
+static void plat_unmap_dma_mem(dma_addr_t dma_addr)
+{
+}
+
+static inline int plat_device_is_coherent(struct device *dev)
+{
+       return 0;               /* IP32 is non-cohernet */
+}
+
+#endif /* __ASM_MACH_IP35_DMA_COHERENCE_H */
diff --git a/include/asm-mips/mach-jazz/dma-coherence.h b/include/asm-mips/mach-jazz/dma-coherence.h
new file mode 100644 (file)
index 0000000..d66979a
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2006  Ralf Baechle <ralf@linux-mips.org>
+ */
+#ifndef __ASM_MACH_JAZZ_DMA_COHERENCE_H
+#define __ASM_MACH_JAZZ_DMA_COHERENCE_H
+
+#include <asm/jazzdma.h>
+
+struct device;
+
+static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size)
+{
+       return vdma_alloc(virt_to_phys(addr), size);
+}
+
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+{
+       return vdma_alloc(page_to_phys(page), PAGE_SIZE);
+}
+
+static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)
+{
+       return vdma_log2phys(dma_addr);
+}
+
+static void plat_unmap_dma_mem(dma_addr_t dma_addr)
+{
+       vdma_free(dma_addr);
+}
+
+static inline int plat_device_is_coherent(struct device *dev)
+{
+       return 0;
+}
+
+#endif /* __ASM_MACH_JAZZ_DMA_COHERENCE_H */
index fc3217fc1118deabd9c4c40cb3442cdf1573c2ab..f1755d28a36a6f3a44f44bebd3f2f061617e8695 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1999, 2000, 06 by Ralf Baechle
+ * Copyright (C) 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org)
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  */
 #ifndef _ASM_SPINLOCK_H
@@ -49,11 +49,18 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
                __asm__ __volatile__(
                "       .set    noreorder       # __raw_spin_lock       \n"
                "1:     ll      %1, %2                                  \n"
-               "       bnez    %1, 1b                                  \n"
+               "       bnez    %1, 2f                                  \n"
                "        li     %1, 1                                   \n"
                "       sc      %1, %0                                  \n"
-               "       beqz    %1, 1b                                  \n"
+               "       beqz    %1, 2f                                  \n"
                "        nop                                            \n"
+               "       .subsection 2                                   \n"
+               "2:     ll      %1, %2                                  \n"
+               "       bnez    %1, 2b                                  \n"
+               "        li     %1, 1                                   \n"
+               "       b       1b                                      \n"
+               "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    reorder                                 \n"
                : "=m" (lock->lock), "=&r" (tmp)
                : "m" (lock->lock)
@@ -99,8 +106,12 @@ static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock)
                "1:     ll      %0, %3                                  \n"
                "       ori     %2, %0, 1                               \n"
                "       sc      %2, %1                                  \n"
-               "       beqz    %2, 1b                                  \n"
+               "       beqz    %2, 2f                                  \n"
                "        andi   %2, %0, 1                               \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    reorder"
                : "=&r" (temp), "=m" (lock->lock), "=&r" (res)
                : "m" (lock->lock)
@@ -154,11 +165,18 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
                __asm__ __volatile__(
                "       .set    noreorder       # __raw_read_lock       \n"
                "1:     ll      %1, %2                                  \n"
-               "       bltz    %1, 1b                                  \n"
+               "       bltz    %1, 2f                                  \n"
                "        addu   %1, 1                                   \n"
                "       sc      %1, %0                                  \n"
                "       beqz    %1, 1b                                  \n"
                "        nop                                            \n"
+               "       .subsection 2                                   \n"
+               "2:     ll      %1, %2                                  \n"
+               "       bltz    %1, 2b                                  \n"
+               "        addu   %1, 1                                   \n"
+               "       b       1b                                      \n"
+               "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    reorder                                 \n"
                : "=m" (rw->lock), "=&r" (tmp)
                : "m" (rw->lock)
@@ -192,8 +210,12 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
                "1:     ll      %1, %2                                  \n"
                "       sub     %1, 1                                   \n"
                "       sc      %1, %0                                  \n"
-               "       beqz    %1, 1b                                  \n"
+               "       beqz    %1, 2f                                  \n"
+               "        nop                                            \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
                "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    reorder                                 \n"
                : "=m" (rw->lock), "=&r" (tmp)
                : "m" (rw->lock)
@@ -222,11 +244,18 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
                __asm__ __volatile__(
                "       .set    noreorder       # __raw_write_lock      \n"
                "1:     ll      %1, %2                                  \n"
-               "       bnez    %1, 1b                                  \n"
+               "       bnez    %1, 2f                                  \n"
                "        lui    %1, 0x8000                              \n"
                "       sc      %1, %0                                  \n"
-               "       beqz    %1, 1b                                  \n"
+               "       beqz    %1, 2f                                  \n"
+               "        nop                                            \n"
+               "       .subsection 2                                   \n"
+               "2:     ll      %1, %2                                  \n"
+               "       bnez    %1, 2b                                  \n"
+               "        lui    %1, 0x8000                              \n"
+               "       b       1b                                      \n"
                "        nop                                            \n"
+               "       .previous                                       \n"
                "       .set    reorder                                 \n"
                : "=m" (rw->lock), "=&r" (tmp)
                : "m" (rw->lock)
@@ -322,12 +351,15 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
                "       bnez    %1, 2f                                  \n"
                "       lui     %1, 0x8000                              \n"
                "       sc      %1, %0                                  \n"
-               "       beqz    %1, 1b                                  \n"
-               "        nop                                            \n"
+               "       beqz    %1, 3f                                  \n"
+               "        li     %2, 1                                   \n"
+               "2:                                                     \n"
                __WEAK_ORDERING_MB
-               "       li      %2, 1                                   \n"
+               "       .subsection 2                                   \n"
+               "3:     b       1b                                      \n"
+               "        li     %2, 0                                   \n"
+               "       .previous                                       \n"
                "       .set    reorder                                 \n"
-               "2:                                                     \n"
                : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret)
                : "m" (rw->lock)
                : "memory");
index 5e1289c85ed958f414ec673a535e48b1c056e221..597a3743f6a1896aedf1369afabeb11ebe632c6d 100644 (file)
@@ -110,7 +110,10 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
                "       move    %2, %z4                                 \n"
                "       .set    mips3                                   \n"
                "       sc      %2, %1                                  \n"
-               "       beqz    %2, 1b                                  \n"
+               "       beqz    %2, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (retval), "=m" (*m), "=&r" (dummy)
                : "R" (*m), "Jr" (val)
@@ -155,7 +158,10 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val)
                "1:     lld     %0, %3                  # xchg_u64      \n"
                "       move    %2, %z4                                 \n"
                "       scd     %2, %1                                  \n"
-               "       beqz    %2, 1b                                  \n"
+               "       beqz    %2, 2f                                  \n"
+               "       .subsection 2                                   \n"
+               "2:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    mips0                                   \n"
                : "=&r" (retval), "=m" (*m), "=&r" (dummy)
                : "R" (*m), "Jr" (val)
@@ -232,8 +238,11 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
                "       move    $1, %z4                                 \n"
                "       .set    mips3                                   \n"
                "       sc      $1, %1                                  \n"
-               "       beqz    $1, 1b                                  \n"
+               "       beqz    $1, 3f                                  \n"
                "2:                                                     \n"
+               "       .subsection 2                                   \n"
+               "3:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    pop                                     \n"
                : "=&r" (retval), "=R" (*m)
                : "R" (*m), "Jr" (old), "Jr" (new)
@@ -283,8 +292,11 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
                "       bne     %0, %z3, 2f                             \n"
                "       move    $1, %z4                                 \n"
                "       scd     $1, %1                                  \n"
-               "       beqz    $1, 1b                                  \n"
+               "       beqz    $1, 3f                                  \n"
                "2:                                                     \n"
+               "       .subsection 2                                   \n"
+               "3:     b       1b                                      \n"
+               "       .previous                                       \n"
                "       .set    pop                                     \n"
                : "=&r" (retval), "=R" (*m)
                : "R" (*m), "Jr" (old), "Jr" (new)
index 825fcbd9eabd30e0924002bc3a039ae2ace4d5ab..3eff8d8fe28a1fff10417fba1518a5d63fac9d48 100644 (file)
@@ -265,10 +265,14 @@ do {                                                                      \
  */
 #define __get_user_asm_ll32(val, addr)                                 \
 {                                                                      \
+       union {                                                         \
+               unsigned long long      l;                              \
+               __typeof__(*(addr))     t;                              \
+       } __gu_tmp;                                                     \
+                                                                       \
        __asm__ __volatile__(                                           \
        "1:     lw      %1, (%3)                                \n"     \
        "2:     lw      %D1, 4(%3)                              \n"     \
-       "       move    %0, $0                                  \n"     \
        "3:     .section        .fixup,\"ax\"                   \n"     \
        "4:     li      %0, %4                                  \n"     \
        "       move    %1, $0                                  \n"     \
@@ -279,8 +283,10 @@ do {                                                                       \
        "       " __UA_ADDR "   1b, 4b                          \n"     \
        "       " __UA_ADDR "   2b, 4b                          \n"     \
        "       .previous                                       \n"     \
-       : "=r" (__gu_err), "=&r" (val)                                  \
+       : "=r" (__gu_err), "=&r" (__gu_tmp.l)                           \
        : "0" (0), "r" (addr), "i" (-EFAULT));                          \
+                                                                       \
+       (val) = __gu_tmp.t;                                             \
 }
 
 /*
index e8c2ebd3dddac8998c92547c7f08e18302af6fa0..35b95773746c7c80c049ed9743a86ce3f6c06676 100644 (file)
 #define CBE_PM_CTR_POLARITY                0x01000000
 #define CBE_PM_CTR_COUNT_CYCLES            0x00800000
 #define CBE_PM_CTR_ENABLE                  0x00400000
+#define PM07_CTR_INPUT_MUX(x)              (((x) & 0x3F) << 26)
+#define PM07_CTR_INPUT_CONTROL(x)          (((x) & 1) << 25)
+#define PM07_CTR_POLARITY(x)               (((x) & 1) << 24)
+#define PM07_CTR_COUNT_CYCLES(x)           (((x) & 1) << 23)
+#define PM07_CTR_ENABLE(x)                 (((x) & 1) << 22)
 
 /* Macros for the pm_status register. */
 #define CBE_PM_CTR_OVERFLOW_INTR(ctr)      (1 << (31 - ((ctr) & 7)))
@@ -89,8 +94,7 @@ extern void cbe_read_trace_buffer(u32 cpu, u64 *buf);
 
 extern void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask);
 extern void cbe_disable_pm_interrupts(u32 cpu);
-extern u32  cbe_query_pm_interrupts(u32 cpu);
-extern u32  cbe_clear_pm_interrupts(u32 cpu);
+extern u32  cbe_get_and_clear_pm_interrupts(u32 cpu);
 extern void cbe_sync_irq(int node);
 
 /* Utility functions, macros */
@@ -103,11 +107,4 @@ extern u32 cbe_get_hw_thread_id(int cpu);
 #define CBE_COUNT_PROBLEM_MODE          2
 #define CBE_COUNT_ALL_MODES             3
 
-/* Macros for the pm07_control registers. */
-#define PM07_CTR_INPUT_MUX(x)                    (((x) & 0x3F) << 26)
-#define PM07_CTR_INPUT_CONTROL(x)                (((x) & 1) << 25)
-#define PM07_CTR_POLARITY(x)                     (((x) & 1) << 24)
-#define PM07_CTR_COUNT_CYCLES(x)                 (((x) & 1) << 23)
-#define PM07_CTR_ENABLE(x)                       (((x) & 1) << 22)
-
 #endif /* __ASM_CELL_PMU_H__ */
index fd242a22331c622ad141cf1bb4adc098f6b7add3..a0f14eea1da5b7fb7d213e6be8a7abcc1083d138 100644 (file)
 #define fd_outb(value,port)    outb_p(value,port)
 
 #define fd_enable_dma()         enable_dma(FLOPPY_DMA)
-#define fd_disable_dma()        disable_dma(FLOPPY_DMA)
-#define fd_request_dma()        request_dma(FLOPPY_DMA, "floppy")
-#define fd_free_dma()           free_dma(FLOPPY_DMA)
+#define fd_disable_dma()        fd_ops->_disable_dma(FLOPPY_DMA)
+#define fd_free_dma()           fd_ops->_free_dma(FLOPPY_DMA)
 #define fd_clear_dma_ff()       clear_dma_ff(FLOPPY_DMA)
 #define fd_set_dma_mode(mode)   set_dma_mode(FLOPPY_DMA, mode)
 #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count)
+#define fd_get_dma_residue()    fd_ops->_get_dma_residue(FLOPPY_DMA)
 #define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
 #define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
 #define fd_cacheflush(addr,size) /* nothing */
-#define fd_request_irq()        request_irq(FLOPPY_IRQ, floppy_interrupt, \
-                                           IRQF_DISABLED, "floppy", NULL)
 #define fd_free_irq()           free_irq(FLOPPY_IRQ, NULL);
 
-#ifdef CONFIG_PCI
-
 #include <linux/pci.h>
 #include <asm/ppc-pci.h>       /* for ppc64_isabridge_dev */
 
-#define fd_dma_setup(addr,size,mode,io) powerpc_fd_dma_setup(addr,size,mode,io)
+#define fd_dma_setup(addr,size,mode,io) fd_ops->_dma_setup(addr,size,mode,io)
+
+static int fd_request_dma(void);
+
+struct fd_dma_ops {
+       void (*_disable_dma)(unsigned int dmanr);
+       void (*_free_dma)(unsigned int dmanr);
+       int (*_get_dma_residue)(unsigned int dummy);
+       int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
+};
+
+static int virtual_dma_count;
+static int virtual_dma_residue;
+static char *virtual_dma_addr;
+static int virtual_dma_mode;
+static int doing_vdma;
+static struct fd_dma_ops *fd_ops;
+
+static irqreturn_t floppy_hardint(int irq, void *dev_id)
+{
+       unsigned char st;
+       int lcount;
+       char *lptr;
+
+       if (!doing_vdma)
+               return floppy_interrupt(irq, dev_id);
+
+
+       st = 1;
+       for (lcount=virtual_dma_count, lptr=virtual_dma_addr;
+            lcount; lcount--, lptr++) {
+               st=inb(virtual_dma_port+4) & 0xa0 ;
+               if (st != 0xa0)
+                       break;
+               if (virtual_dma_mode)
+                       outb_p(*lptr, virtual_dma_port+5);
+               else
+                       *lptr = inb_p(virtual_dma_port+5);
+       }
+       virtual_dma_count = lcount;
+       virtual_dma_addr = lptr;
+       st = inb(virtual_dma_port+4);
+
+       if (st == 0x20)
+               return IRQ_HANDLED;
+       if (!(st & 0x20)) {
+               virtual_dma_residue += virtual_dma_count;
+               virtual_dma_count=0;
+               doing_vdma = 0;
+               floppy_interrupt(irq, dev_id);
+               return IRQ_HANDLED;
+       }
+       return IRQ_HANDLED;
+}
 
-static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size,
-                                          int mode, int io)
+static void vdma_disable_dma(unsigned int dummy)
+{
+       doing_vdma = 0;
+       virtual_dma_residue += virtual_dma_count;
+       virtual_dma_count=0;
+}
+
+static void vdma_nop(unsigned int dummy)
+{
+}
+
+
+static int vdma_get_dma_residue(unsigned int dummy)
+{
+       return virtual_dma_count + virtual_dma_residue;
+}
+
+
+static int fd_request_irq(void)
+{
+       if (can_use_virtual_dma)
+               return request_irq(FLOPPY_IRQ, floppy_hardint,
+                                  IRQF_DISABLED, "floppy", NULL);
+       else
+               return request_irq(FLOPPY_IRQ, floppy_interrupt,
+                                  IRQF_DISABLED, "floppy", NULL);
+}
+
+static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
+{
+       doing_vdma = 1;
+       virtual_dma_port = io;
+       virtual_dma_mode = (mode  == DMA_MODE_WRITE);
+       virtual_dma_addr = addr;
+       virtual_dma_count = size;
+       virtual_dma_residue = 0;
+       return 0;
+}
+
+static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
 {
        static unsigned long prev_size;
        static dma_addr_t bus_addr = 0;
@@ -46,6 +133,7 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size,
        static int prev_dir;
        int dir;
 
+       doing_vdma = 0;
        dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE;
 
        if (bus_addr 
@@ -74,11 +162,32 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size,
        return 0;
 }
 
-#endif /* CONFIG_PCI */
+static struct fd_dma_ops real_dma_ops =
+{
+       ._disable_dma = disable_dma,
+       ._free_dma = free_dma,
+       ._get_dma_residue = get_dma_residue,
+       ._dma_setup = hard_dma_setup
+};
+
+static struct fd_dma_ops virt_dma_ops =
+{
+       ._disable_dma = vdma_disable_dma,
+       ._free_dma = vdma_nop,
+       ._get_dma_residue = vdma_get_dma_residue,
+       ._dma_setup = vdma_dma_setup
+};
 
-__inline__ void virtual_dma_init(void)
+static int fd_request_dma()
 {
-       /* Nothing to do on PowerPC */
+       if (can_use_virtual_dma & 1) {
+               fd_ops = &virt_dma_ops;
+               return 0;
+       }
+       else {
+               fd_ops = &real_dma_ops;
+               return request_dma(FLOPPY_DMA, "floppy");
+       }
 }
 
 static int FDC1 = 0x3f0;
index b634e16575f2e5586f9e42ecf22dac4dd987ced5..0f9f2dd24a79a651771796536c7a97340c087ae5 100644 (file)
@@ -129,7 +129,6 @@ struct spu {
        struct spu_runqueue *rq;
        unsigned long long timestamp;
        pid_t pid;
-       int prio;
        int class_0_pending;
        spinlock_t register_lock;
 
index 97b4354841774c1b8700252800b49154fcb47723..418e5c7e972cda46d21f686496c3b4bfcbc75f9b 100644 (file)
@@ -305,3 +305,4 @@ SYSCALL_SPU(faccessat)
 COMPAT_SYS_SPU(get_robust_list)
 COMPAT_SYS_SPU(set_robust_list)
 COMPAT_SYS(move_pages)
+SYSCALL_SPU(getcpu)
index ca93bc99237e6e9182bfa3ea4e4879d3f07b85fe..1babad99c719ba908919f97389479b248585fd8e 100644 (file)
@@ -150,7 +150,7 @@ struct ucc_slow_info {
        int ucc_num;
        enum qe_clock rx_clock;
        enum qe_clock tx_clock;
-       struct ucc_slow *us_regs;
+       struct ucc_slow *regs;
        int irq;
        u16 uccm_mask;
        int data_mem_part;
index 4cbc313aa02a10dedf3d0ae0503504bba8b37860..d03d8557f7069891cc06289024c15cb3bc09178d 100644 (file)
@@ -46,6 +46,7 @@ extern void __init udbg_init_iseries(void);
 extern void __init udbg_init_rtas_panel(void);
 extern void __init udbg_init_rtas_console(void);
 extern void __init udbg_init_debug_beat(void);
+extern void __init udbg_init_btext(void);
 
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_UDBG_H */
index b9f9118b1607e667ebbc6df2f1145c18494180fe..26fc449bd9899cda5d760a0a5d63f8b112f7563b 100644 (file)
 
 #ifndef __ASSEMBLY__
 
-extern unsigned int vdso64_pages;
-extern unsigned int vdso32_pages;
-
 /* Offsets relative to thread->vdso_base */
 extern unsigned long vdso64_rt_sigtramp;
 extern unsigned long vdso32_sigtramp;
 extern unsigned long vdso32_rt_sigtramp;
 
-extern void vdso_init(void);
-
 #else /* __ASSEMBLY__ */
 
 #ifdef __VDSO64__
index 7a64ede53bb6fd7ec5efde9852b7619b2d96e96a..92fd02d7b17766604a6a74214e378a86ebb10f99 100644 (file)
@@ -109,6 +109,10 @@ void ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
 #include <platforms/4xx/ocotea.h>
 #endif
 
+#if defined(CONFIG_TAISHAN)
+#include <platforms/4xx/taishan.h>
+#endif
+
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_40x
 /*
index 6e7ec4c76178d9bd535de52762bc9017496c7797..9c21dc793d7b160d525a78841ecdc98f6cf89dca 100644 (file)
 #define I2C_HW_SMBUS_PIIX4     0x040000
 #define I2C_HW_SMBUS_ALI15X3   0x040001
 #define I2C_HW_SMBUS_VIA2      0x040002
-#define I2C_HW_SMBUS_VOODOO3   0x040003
 #define I2C_HW_SMBUS_I801      0x040004
 #define I2C_HW_SMBUS_AMD756    0x040005
 #define I2C_HW_SMBUS_SIS5595   0x040006
 #define I2C_HW_SMBUS_OV519     0x040010 /* OV519 USB 1.1 webcam IC */
 #define I2C_HW_SMBUS_OVFX2     0x040011 /* Cypress/OmniVision FX2 webcam */
 #define I2C_HW_SMBUS_CAFE      0x040012 /* Marvell 88ALP01 "CAFE" cam  */
+#define I2C_HW_SMBUS_ALI1563   0x040013
 
 /* --- ISA pseudo-adapter                                              */
 #define I2C_HW_ISA             0x050000
 
-/* --- IPMI pseudo-adapter                                             */
-#define I2C_HW_IPMI            0x0b0000
-
 /* --- IPMB adapter                                            */
 #define I2C_HW_IPMB            0x0c0000
 
index 71e50d3e492f2ccd1ed852ae959c759c67ed8830..9428092017e346dea02ca6442da258859ff39342 100644 (file)
@@ -125,7 +125,12 @@ struct i2c_driver {
         * it must be freed here.
         */
        int (*detach_client)(struct i2c_client *);
-       
+
+       /* driver model interfaces that don't relate to enumeration  */
+       void (*shutdown)(struct i2c_client *);
+       int (*suspend)(struct i2c_client *, pm_message_t mesg);
+       int (*resume)(struct i2c_client *);
+
        /* a ioctl like command that can be used to perform specific functions
         * with the device.
         */
index 8fb9c3e06eefa62e778a3d09f2f54b94c58003e2..182a96f77c8437d28987bd93a12dcb2eccef98ab 100644 (file)
 #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
 #define PCI_DEVICE_ID_ATI_IXP600_SATA  0x4380
 #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381
+#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385
 #define PCI_DEVICE_ID_ATI_IXP600_IDE   0x438c
 
 #define PCI_VENDOR_ID_VLSI             0x1004