diff -Nru a/CREDITS b/CREDITS
--- a/CREDITS	Wed Jan  8 20:04:44 2003
+++ b/CREDITS	Wed Jan  8 20:04:44 2003
@@ -2440,7 +2440,6 @@
 D: modularized BSD Unix domain sockets
 
 N: Martin Kasper Petersen
-E: mkp@linuxcare.com
 E: mkp@mkp.net
 D: PA-RISC port
 D: XFS file system
@@ -3466,14 +3465,10 @@
 S: Germany
 
 N: Leonard N. Zubkoff
-E: lnz@dandelion.com
 W: http://www.dandelion.com/Linux/
 D: BusLogic SCSI driver
 D: Mylex DAC960 PCI RAID driver
 D: Miscellaneous kernel fixes
-S: 3078 Sulphur Spring Court
-S: San Jose, California 95148
-S: USA
 
 N: Alessandro Zummo
 E: azummo@ita.flashnet.it
diff -Nru a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
--- a/Documentation/DocBook/Makefile	Wed Jan  8 20:04:44 2003
+++ b/Documentation/DocBook/Makefile	Wed Jan  8 20:04:44 2003
@@ -90,7 +90,7 @@
 EPS-parportbook := $(patsubst %.fig,%.eps, $(IMG-parportbook2))
 PNG-parportbook := $(patsubst %.fig,%.png, $(IMG-parportbook2))
 $(obj)/parportbook.html: $(PNG-parportbook)
-$(obj)/parportbook.ps $(obj)/parportbook.pdf: $(EPS-parportbook)
+$(obj)/parportbook.ps $(obj)/parportbook.pdf: $(EPS-parportbook) $(PNG-parportbook)
 
 ###
 # Rules to generate postscript, PDF and HTML
diff -Nru a/Documentation/DocBook/journal-api.tmpl b/Documentation/DocBook/journal-api.tmpl
--- a/Documentation/DocBook/journal-api.tmpl	Wed Jan  8 20:04:32 2003
+++ b/Documentation/DocBook/journal-api.tmpl	Wed Jan  8 20:04:32 2003
@@ -206,6 +206,7 @@
 	journal_unlock_updates() // carry on with filesystem use.
 </programlisting>
 
+<para>
 The opportunities for abuse and DOS attacks with this should be obvious,
 if you allow unprivileged userspace to trigger codepaths containing these
 calls.
@@ -250,7 +251,6 @@
    }
    journal_destroy(my_jrnl);
 </programlisting>
-</para>
 </sect1>
 
 </chapter>
diff -Nru a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
--- a/Documentation/DocBook/kernel-api.tmpl	Wed Jan  8 20:04:31 2003
+++ b/Documentation/DocBook/kernel-api.tmpl	Wed Jan  8 20:04:31 2003
@@ -150,7 +150,12 @@
 !Ekernel/kmod.c
      </sect1>
      <sect1><title>Inter Module support</title>
-!Ekernel/module.c
+        <para>
+           Refer to the file kernel/module.c for more information.
+        </para>
+<!-- FIXME: Removed for now since no structured comments in source
+X!Ekernel/module.c
+-->
      </sect1>
   </chapter>
 
@@ -172,7 +177,12 @@
      </sect1>
      <sect1><title>MCA Architecture</title>
 	<sect2><title>MCA Device Functions</title>
-!Earch/i386/kernel/mca.c
+           <para>
+              Refer to the file arch/i386/kernel/mca.c for more information.
+           </para>
+<!-- FIXME: Removed for now since no structured comments in source
+X!Earch/i386/kernel/mca.c
+-->
 	</sect2>
 	<sect2><title>MCA Bus DMA</title>
 !Iinclude/asm-i386/mca_dma.h
@@ -213,7 +223,9 @@
   <chapter id="snddev">
      <title>Sound Devices</title>
 !Esound/sound_core.c
-!Isound/sound_firmware.c
+<!-- FIXME: Removed for now since no structured comments in source
+X!Isound/sound_firmware.c
+-->
   </chapter>
 
   <chapter id="usb">
@@ -292,7 +304,9 @@
 
     <sect1><title>USB Core APIs</title>
 !Edrivers/usb/core/urb.c
-!Edrivers/usb/core/config.c
+<!-- FIXME: Removed for now since no structured comments in source
+X!Edrivers/usb/core/config.c
+-->
 !Edrivers/usb/core/message.c
 !Edrivers/usb/core/file.c
 !Edrivers/usb/core/usb.c
@@ -385,7 +399,12 @@
 !Idrivers/video/macmodes.c
      </sect1>
      <sect1><title>Frame Buffer Fonts</title>
-!Idrivers/video/console/fonts.c
+        <para>
+           Refer to the file drivers/video/console/fonts.c for more information.
+        </para>
+<!-- FIXME: Removed for now since no structured comments in source
+X!Idrivers/video/console/fonts.c
+-->
      </sect1>
   </chapter>
 <!-- Needs ksyms to list additional exported symbols, but no specific doc.
diff -Nru a/Documentation/DocBook/scsidrivers.tmpl b/Documentation/DocBook/scsidrivers.tmpl
--- a/Documentation/DocBook/scsidrivers.tmpl	Wed Jan  8 20:04:31 2003
+++ b/Documentation/DocBook/scsidrivers.tmpl	Wed Jan  8 20:04:31 2003
@@ -52,7 +52,7 @@
   </para>
 <para>
 This document can been found in an ASCII text file in the linux kernel 
-source: <filename>drivers/scsi/scsi_mid_low_api.txt</filename> .
+source: <filename>Documentation/scsi/scsi_mid_low_api.txt</filename> .
 It currently hold a little more information than this document. The
 <filename>drivers/scsi/hosts.h</filename> and <filename>
 drivers/scsi/scsi.h</filename> headers contain descriptions of members
@@ -107,7 +107,7 @@
 
   <chapter id="intfunctions">
      <title>Interface Functions</title>
-!Edrivers/scsi/scsi_mid_low_api.txt
+!EDocumentation/scsi/scsi_mid_low_api.txt
   </chapter>
 
   <chapter id="locks">
diff -Nru a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl
--- a/Documentation/DocBook/videobook.tmpl	Wed Jan  8 20:04:45 2003
+++ b/Documentation/DocBook/videobook.tmpl	Wed Jan  8 20:04:45 2003
@@ -146,16 +146,17 @@
 
 int __init myradio_init(struct video_init *v)
 {
-        if(check_region(io, MY_IO_SIZE))
+        if(!request_region(io, MY_IO_SIZE, "myradio"))
         {
                 printk(KERN_ERR 
                     "myradio: port 0x%03X is in use.\n", io);
                 return -EBUSY;
         }
 
-        if(video_device_register(&amp;my_radio, VFL_TYPE_RADIO)==-1)
+        if(video_device_register(&amp;my_radio, VFL_TYPE_RADIO)==-1) {
+                release_region(io, MY_IO_SIZE);
                 return -EINVAL;
-        request_region(io, MY_IO_SIZE, "myradio");
+        }		
         return 0;
 }
 
@@ -920,7 +921,7 @@
 
 int __init mycamera_init(struct video_init *v)
 {
-        if(check_region(io, MY_IO_SIZE))
+        if(!request_region(io, MY_IO_SIZE, "mycamera"))
         {
                 printk(KERN_ERR 
                       "mycamera: port 0x%03X is in use.\n", io);
@@ -928,9 +929,10 @@
         }
 
         if(video_device_register(&amp;my_camera, 
-            VFL_TYPE_GRABBER)==-1)
+            VFL_TYPE_GRABBER)==-1) {
+                release_region(io, MY_IO_SIZE);
                 return -EINVAL;
-        request_region(io, MY_IO_SIZE, "mycamera");
+        }
         return 0;
 }
 
diff -Nru a/Documentation/kobject.txt b/Documentation/kobject.txt
--- a/Documentation/kobject.txt	Wed Jan  8 20:04:43 2003
+++ b/Documentation/kobject.txt	Wed Jan  8 20:04:43 2003
@@ -1,29 +1,61 @@
-kobjects - Simple, Generic Kernel Objects
+The kobject Infrastructure
 
 Patrick Mochel <mochel@osdl.org>
 
-30 October 2002
+7 January 2003
+
+
+0. Introduction
+
+The kobject infrastructure performs basic object managment that larger
+data structures and subsystems can leverage, rather than reimplement
+similar functionality. This functionality consists primarily concerns:
+
+- Object reference counting.
+- Maintaining lists (sets) of objects.
+- Object set locking.
+- Userspace representation. 
+
+The infrastructure consists of a number of object types to support
+this functionality. Their programming interfaces are described below
+in detail, and briefly here:
+
+- kobjects	a simple object.
+- kset		a set of objects of a certain type.
+- ktype		a set of helpers for objects of a common type. 
+- subsystem	a controlling object for a number of ksets.
+
+
+The kobject infrastructure maintains a close relationship with the
+sysfs filesystem. Each kobject that is registered with the kobject
+core receives a directory in sysfs. Attributes about the kobject can
+then be exported. Please see Documentation/filesystems/sysfs.txt for
+more information. 
+
+The kobject infrastructure provides a flexible programming interface,
+and allows kobjects and ksets to be used without being registered
+(i.e. with no sysfs representation). This is also described later. 
 
 
 1. kobjects
 
 1.1 Description
 
-struct kobject introduces a simple, intregral datatype and a simple
-set of semantics for operating on the device. kobjects are intended to
-be embedded in larger data structures and replace fields it
-duplicates. A set of library functions has been developed to assist in
-the manipulation of kobjects.
 
+struct kobject is a simple data type that provides a foundation for
+more complex object types. It provides a set of basic fields that
+almost all complex data types share. kobjects are intended to be
+embedded in larger data structures and replace fields it duplicates. 
 
 1.2 Defintion
 
 struct kobject {
-	char			name[16];
+	char			name[KOBJ_NAME_LEN];
 	atomic_t		refcount;
 	struct list_head	entry;
 	struct kobject		* parent;
-	struct subsystem	* subsys;
+	struct kset		* kset;
+	struct kobj_type	* ktype;
 	struct dentry		* dentry;
 };
 
@@ -32,204 +64,276 @@
 int kobject_register(struct kobject *);
 
 void kobject_del(struct kobject *);
-void kobject_cleanup(struct kobject *);
 void kobject_unregister(struct kobject *);
 
 struct kobject * kobject_get(struct kobject *);
 void kobject_put(struct kobject *);
 
 
+1.3 kobject Programming Interface
 
-2. subsystems
+kobjects may be dynamically added and removed from the kobject core
+using kobject_register() and kobject_unregister(). Registration
+includes inserting the kobject in the list of its dominant kset and
+creating a directory for it in sysfs.
 
-2.1 Description
+Alternatively, one may use a kobject without adding to its kset's list
+or exporting it via sysfs, by simply calling kobject_init(). An
+initialized kobject may later be added to the object hierarchy by
+calling kobject_add(). An initialized kobject may be used for
+reference counting.
 
-struct subsystem is introduced to describe a collection of objects of
-a certain type. subsystems are kobjects themselves, though they
-contain lists of kobjects that belong to that subsystem. Objects of a
-subsystem (the embedder objects in which kobjects live) are all of the
-same type. 
+Note: calling kobject_init(), then kobject_add() is functionally
+equivalent to calling kobject_register().
 
-2.2 Definition
+When a kobject is unregistered, it is removed from its kset's list,
+removed from the sysfs filesystem, and its reference decremented. List
+and sysfs removal happen in kobject_del(), and may be called
+manually. kobject_put() decrements the reference count, and may also
+be called manually. 
 
-struct subsystem {
-	struct kobject		kobj;
+A kobject's reference count may be incremented with kobject_get(),
+which returns a valid reference to a kobject; and decremented with 
+kobject_put(). An object's reference count may only be incremented if
+it is already positive. 
+
+When a kobject's reference count reaches 0, the method struct
+ktype::release() (which the kobject's kset points to) is called. This
+allows any memory allocated for the object to be freed.
+
+
+1.4 sysfs
+
+Each kobject receives a directory in sysfs. This directory is created
+under the kobject's parent directory. 
+
+If a kobject does not have a parent when it is registered, its parent
+becomes its dominant kset. 
+
+If a kobject does not have a parent nor a dominant kset, its directory
+is created at the top-level of the sysfs partition. This should only
+happen for kobjects that are embedded in a struct subsystem. 
+
+
+
+2. ksets
+
+2.1 Desecription
+
+A kset is a set of kobjects that are embedded in the same type. 
+
+
+struct kset {
+	struct subsystem	* subsys;
+	struct kobj_type	* ktype;
 	struct list_head	list;
-	struct rw_semaphore	rwsem;
-	struct subsystem	* parent;
+	struct kobject		kobj;
+};
+
+
+void kset_init(struct kset * k);
+int kset_add(struct kset * k);
+int kset_register(struct kset * k);
+void kset_unregister(struct kset * k);
+
+struct kset * kset_get(struct kset * k);
+void kset_put(struct kset * k);
+
+struct kobject * kset_find_obj(struct kset *, char *);
+
+
+The type that the kobjects are embedded in is described by the ktype
+pointer. The subsystem that the kobject belongs to is pointed to by
+subsys pointer. 
+
+A kset contains a kobject itself, meaning that it may be registered in
+the kobject hierarchy and exported via sysfs. More importantly, the
+kset may be embedded in a larger data type, and may be part of another
+kset (of that object type). 
+
+For example, a block device is an object (struct gendisk) that is
+contained in a set of block devices. It may also contain a set of
+partitions (struct hd_struct) that have been found on the device. The
+following code snippet illustrates how to properly express this.
+
+	 struct gendisk * disk;
+	 ...
+	 disk->kset.kobj.kset = &block_kset;
+	 disk->kset.ktype = &partition_ktype;
+	 kset_register(&disk->kset);
+
+- The kset that the disk's embedded object belongs to is the
+  block_kset, and is pointed to disk->kset.kobj.kset. 
+
+- The type of object of the disk's _subordinate_ list are partitions, 
+  and is set in disk->kset.ktype. 
+
+- The kset is then registered, which handles initializing and adding
+  the embedded kobject to the hierarchy. 
+
+
+2.2 kset Programming Interface 
+
+All kset functions, except kset_find_obj(), eventually forward the
+calls to their embedded kobjects after performing kset-specific
+operations. ksets offer a similar programming model to kobjects: they
+may be used after they are initialized, without registering them in
+the hierarchy. 
+
+kset_find_obj() may be used to locate a kobject with a particular
+name. The kobject, if found, is returned. 
+
+
+2.3 sysfs
+
+ksets are represented in sysfs when their embedded kobjects are
+registered. They follow the same rules of parenting, with one
+exception. If a kset does not have a parent, nor is its embedded
+kobject part of another kset, the kset's parent becomes it's dominant
+subsystem. 
+
+If the kset does not have a parent, its directory is created at the
+sysfs root. This should only happen when the kset registered is
+embedded in a subsystem itself. 
+
+
+3. struct ktype
+
+3.1. Description
+
+struct kobj_type {
 	void (*release)(struct kobject *);
 	struct sysfs_ops	* sysfs_ops;
 	struct attribute	** default_attrs;
 };
 
-void subsystem_init(struct subsystem *);
-int subsystem_register(struct subsystem *);
-void subsystem_unregister(struct subsystem *);
 
-struct subsystem * subsys_get(struct subsystem * s);
-void subsys_put(struct subsystem * s);
+Object types require specific functions for converting between the
+generic object and the more complex type. struct kobj_type provides
+the object-specific fields, which include:
+
+- release: Called when the kobject's reference count reaches 0. This
+  should convert the object to the more complex type and free it. 
+
+- sysfs_ops: Provides conversion functions for sysfs access. Please
+  see the sysfs documentation for more information. 
 
+- default_attrs: Default attributes to exported via sysfs when the
+  object is registered. 
 
-3. The Interface
 
-The kobject API provides a symmeticral interface that may be used in
-one of two ways: by using the default front-end registration
-interface, or by directly using the backend helpers the registration
-interface uses. 
+Instances of struct kobj_type are not registered; only referenced by
+the kset. A kobj_type may be referenced by an arbitrary number of
+ksets, as their may be disparate sets of identical objects. 
 
-3.1 Default Usage
 
-The default usage is to use kobjet_register() to add a device to the
-object hierarchy, and kobject_unregister() to remove it. 
 
-kobject_register() will call kobject_init() and kobject_add()
-consecutively. kobject_init() will initialize the object and increment
-the reference count of the subsystem the object belongs to. It will
-leave the reference count of the object at 1.
+4. subsystems
 
-kobject_add() will insert it into the object hierarchy and create
-a sysfs directory for the object. This will increment the reference
-count of the object, leaving it at 2.
+4.1 Description
 
-kobject_unregister() will call kobject_del() and kobject_put()
-consecutively. kobject_del() will remove the object from the hierarchy
-and the sysfs directory for the object. It will decrement the
-reference count for the object. Assuming there are no other users of
-the object, it will be left at 1.
+A subsystem represents a significant entity of code that maintains an
+arbitrary number of sets of objects of various types. Since the number
+of ksets, and the type of objects they contain, are variable, a
+generic representation of a subsystem is minimal. 
 
-kobject_put() will decrement the reference count of the object, and
-when it reaches 0, call kobject_cleanup(). This will happen
-immediately if there are no other users of the object. 
-kobject_cleanup() will call  the subsystem's release() method
-for the object, and decrement the subsystem's reference count. 
 
-Because kobject_unregister() calls kobject_put(), instead of
-kobject_cleanup() directly, when an object is unregistered, the
-pointer to the object is guaranteed to remain valid until the last
-reference to the object has gone away.
+struct subsystem {
+	struct kset		kset;
+	struct rw_semaphore	rwsem;
+};
+
+int subsystem_register(struct subsystem *);
+void subsystem_unregister(struct subsystem *);
 
-Users of objects should call kobject_get() to obtain a reference to
-the object that they are using. If the object passed to it is a valid
-object (i.e. still present in the system), it will return a pointer to
-the object. Otherwise, it will return NULL.
+struct subsystem * subsys_get(struct subsystem * s);
+void subsys_put(struct subsystem * s);
 
-When users are done using an object, they should call kobject_put() to
-decrement the reference count on the object. As explained above, when
-the reference count for the object reaches 0, kobject_cleanup() will
-be called for the object.
 
+A subsystem contains an embedded kset so:
 
-3.2 Backend Usage
+- It can be represented in the object hierarchy via the kset's
+  embedded kobject. 
 
-Users of the kobject infrastructure may use the backend functions
-directly. In order to maintain consistency and reduce confusion, users
-of the interface should use only the front end registration-oriented
-interface, or the backend helpers. 
+- It can maintain a default list of objects of one type. 
 
-Using the backend helpers allows code to use the kobjects solely for
-the reference counting and garbage collection mechanisms, and
-optionally adding them to the object hierarchy or exporting them via
-sysfs. 
+Additional ksets may attach to the subsystem simply by referencing the
+subsystem before they are registered. (This one-way reference means
+that there is no way to determine the ksets that are attached to the
+subsystem.) 
 
-To take advantage of this side of the interface, users should call
-kobject_init() to initialize the object. As stated above, this will
-leave the reference count of the object at 1, and will enable the
-subsystem to use the reference count of the object.
+All ksets that are attached to a subsystem share the subsystem's R/W
+semaphore. 
 
-When the life of the object is ending, the kobject_put() should be
-called to decrement the reference count of the object. Just like
-above, this will call kobject_cleanup() when the reference count
-reaches 0, and release() method of the object's subsystem will be
-called. 
 
-During the lifetime of the object, kobject_add() and kobject_del() may
-be called to add the object to the hierarchy and export it via
-sysfs. kobject_del() must always be called if kobject_add() has
-previously been called. Care should be taken to ensure kobject_del()
-is called before the final kobject_put() is called, though not doing
-so will not cause catastrophe, only confusion when reading the source
-code. Fatal results are avoided by having kobject_add() increment the
-reference count of the object, for kobject_del() to decrement. 
+4.2 Programming Interface.
 
+The subsystem programming interface is simple and does not offer the
+flexibility that the kset and kobject programming interfaces do. They
+may be registered and unregistered, as well as reference counted. Each
+call forwards the calls to their embedded ksets (which forward the
+calls to their embedded kobjects).
 
-3.3 Summary
 
-Using either interface, users should obtain the same results. The
-registration interface does the same actions as the backend interface,
-though it guarantees that initialization and addition, and deletion
-and cleanup, happen consecutively.
+4.3 Helpers
 
+A number of macros are available to make dealing with subsystems, and
+their embedded objects easier. 
 
-Familial Relations
 
-kobjects and subsystems intersect and intertwine in several ways. Each
-is well-defined (though maybe they could be made simpler). Each kobject
-belongs to a subsystem. Since subsystems are kobjects themselves, they
-also belong to a controlling subsystem. This implies that subsystems
-are hierarchial. 
+decl_subsys(name,type)
 
-Many kobjects are hierarchial in nature, which is represented by
-including a pointer to its parent kobject in struct kobject. Many
-different types of kobject-embedding objects may all point to the same
-parent. 
+Declares a subsystem named '<name>_subsys', with an embedded kset of
+type <type>. For example, 
 
-The ancestral hierarchy of kobjects should not be confused with
-membership in a subsystem, or the ancestral relationship of
-subsystems. A set of kobjects may all belong to a subsystem, but all
-have different parents. 
+decl_subsys(devices,&ktype_devices);
 
-kobjects may be orphans and have no explicit parent. In that case, the
-subsystem to which the object belongs becomes its parent. 
+is equivalent to doing:
 
+struct subsystem device_subsys = {
+       .kset = {
+	     .kobj = {
+		   .name = "devices",
+	     },
+	     .ktype = &ktype_devices,
+	}
+}; 
 
-Sysfs
 
-These rules force a complete kobject hierarchy, which Suprise! maps
-very well onto a filesystem.
+The objects that are registered with a subsystem that use the
+subsystem's default list must have their kset ptr set properly. These
+objects may have embedded kobjects, ksets, or other subsystems. The
+following helpers make setting the kset easier: 
 
-driverfs was recently cloned, and there now exists sysfs. All driverfs
-operations operate on a separate data type: struct driver_dir_entry,
-which all objects that are represented in driverfs must have. driverfs
-also allowed rogue directory creation that had no explicit objects
-associated with them.
 
-struct kobject is intended to be the common data type which sysfs
-operates on. This gives the filesystem the ability to directly access
-more fields of the object, including the reference count. This also
-forces each directory in the filesystem to be tied directly to a
-kobject. 
+kobj_set_kset_s(obj,subsys)
 
+- Assumes that obj->kobj exists, and is a struct kobject. 
+- Sets the kset of that kobject to the subsystem's embedded kset.
 
-Directory Placement
 
-Parental relationships are determined in the kobject/subsystem layer,
-and the kobject is then passed off to the sysfs layer. kobjects with
-no parent have directories created for them in the sysfs root
-directory. Per the rules above, the only kobjects that remain orphans
-are subsystems without parent subsystems (since leaf objects either
-have an explicit parent, or are assigned their controlling subsystem
-as their foster parent). 
+kset_set_kset_s(obj,subsys)
 
+- Assumes that obj->kset exists, and is a struct kset.
+- Sets the kset of the embedded kobject to the subsystem's 
+  embedded kset. 
 
-File Callbacks
+subsys_set_kset(obj,subsys)
 
-Previously, each driverfs directory contained a pointer to a list of file
-operations for reading and writing driverfs files. These callbacks
-received a struct driver_dir_entry, when they performed a
-container_of() transform on to receive the specific object type for
-which the call was meant. 
+- Assumes obj->subsys exists, and is a struct subsystem.
+- Sets obj->subsys.kset.kobj.kset to the subsystem's embedded kset.
 
-These callbacks have been converted to accept a struct kobject instead
-of struct driver_dir_entry. Since all kobjects belong to a subsystem
-that contains kobjects all of the same type, the sysfs operations
-have been moved to reside in the subsystem, since they are common for
-all kobjects.
 
+4.4 sysfs
 
-Default Attributes
+subsystems are represented in sysfs via their embedded kobjects. They
+follow the same rules as previously mentioned with no exceptions. They
+typically receive a top-level directory in sysfs, except when their
+embedded kobject is part of another kset, or the parent of the
+embedded kobject is explicitly set. 
 
-Most subsystems have a set of default attributes associated with an
-object that registers with them. A subsystem definition may contain a
-NULL-terminated array of attributes that will be exported when an
-object is registered with the subsystem. 
+Note that the subsystem's embedded kset must be 'attached' to the
+subsystem itself in order to use its rwsem. This is done after
+kset_add() has been called. (Not before, because kset_add() uses its
+subsystem for a default parent if it doesn't already have one).
 
diff -Nru a/Documentation/video4linux/bttv/CARDLIST b/Documentation/video4linux/bttv/CARDLIST
--- a/Documentation/video4linux/bttv/CARDLIST	Wed Jan  8 20:04:43 2003
+++ b/Documentation/video4linux/bttv/CARDLIST	Wed Jan  8 20:04:43 2003
@@ -69,7 +69,7 @@
   card=67 - IODATA GV-BCTV4/PCI
   card=68 - 3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)
   card=69 - Active Imaging AIMMS
-  card=70 - Prolink Pixelview PV-BT878P+ (Rev.4C)
+  card=70 - Prolink Pixelview PV-BT878P+ (Rev.4C,8E)
   card=71 - Lifeview FlyVideo 98EZ (capture only) LR51
   card=72 - Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)
   card=73 - Sensoray 311
diff -Nru a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards
--- a/Documentation/video4linux/bttv/Cards	Wed Jan  8 20:04:43 2003
+++ b/Documentation/video4linux/bttv/Cards	Wed Jan  8 20:04:43 2003
@@ -4,25 +4,27 @@
 
 
 Suppported cards:
-
-
 Bt848/Bt848a/Bt849/Bt878/Bt879 cards
 ------------------------------------
 
-All cards with Bt848/Bt848a/Bt849/Bt878/Bt879 and normal Composite/S-VHS inputs
-are supported.
-Teletext and Intercast support (PAL only) for ALL cards via VBI sample decoding
-in software.
+All cards with Bt848/Bt848a/Bt849/Bt878/Bt879 and normal
+Composite/S-VHS inputs are supported.  Teletext and Intercast support
+(PAL only) for ALL cards via VBI sample decoding in software.
+
+Some cards with additional multiplexing of inputs or other additional
+fancy chips are only partially supported (unless specifications by the
+card manufacturer are given).  When a card is listed here it isn't
+necessarily fully supported.
 
-Some cards with additional multiplexing of inputs are only partially 
-supported (unless specifications by the card manufacturer are given).
+All other cards only differ by additional components as tuners, sound
+decoders, EEPROMs, teletext decoders ...
 
-All other cards only differ by additional components as tuners, sound decoders,
-EEPROMs, teletext decoders ...
 
 Unsupported Cards: 
 ------------------
-Cards with Zoran (ZR) or Philips (SAA) or ISA are not supported by this driver. 
+
+Cards with Zoran (ZR) or Philips (SAA) or ISA are not supported by
+this driver.
 
 
 MATRIX Vision
@@ -197,7 +199,7 @@
   50686 "TV Tuner"                       = KNC1 TV Station
   50687 "TV Tuner stereo"                = KNC1 TV Station pro
   50688 "TV Tuner RDS" (black package)   = KNC1 TV Station RDS
-  50689  TV SAT DVB-S CARD CI PCI (SAA7146AH)
+  50689  TV SAT DVB-S CARD CI PCI (SAA7146AH, SU1278?) = "KNC1 TV Station DVB-S"
   50692 "TV/FM Tuner" (small PCB)
   50694  TV TUNER CARD RDS (PHILIPS CHIPSET SAA7134HL)
   50696  TV TUNER STEREO (PHILIPS CHIPSET SAA7134HL, MK3ME Tuner)
@@ -234,10 +236,20 @@
    PixelView PowerStudio PAK - (Model: PV-M3600 REV 4E)
    PixelView DigitalVCR PAK -  (Model: PV-M2400 REV 4C / 8D / 10A )
 
+   PixelView PlayTV PAK II (TV/FM card + usb camera)  PV-M3800 
+   PixelView PlayTV XP PV-M4700,PV-M4700(w/FM)
+   PixelView PlayTV DVR PV-M4600  package contents:PixelView PlayTV pro, windvr & videoMail s/w
+
    Further Cards:
    PV-BT878P+rev.9B (Play TV Pro, opt. w/FM w/NICAM)
    PV-BT878P+rev.2F
    PV-BT878P Rev.1D (bt878, capture only)
+
+   XCapture PV-CX881P (cx23881)
+   PlayTV HD PV-CX881PL+, PV-CX881PL+(w/FM) (cx23881)
+
+   DTV3000 PV-DTV3000P+ DVB-S CI = Twinhan VP-1030
+   DTV2000 DVB-S = Twinhan VP-1020
    
    Video Conferencing:
    PixelView Meeting PAK - (Model: PV-BT878P)
@@ -245,6 +257,9 @@
    PixelView Meeting PAK plus - (Model: PV-BT878P+rev 4C/8D/10A)
    PixelView Capture - (Model: PV-BT848P)
 
+   PixelView PlayTV USB pro
+   Model No. PV-NT1004+, PV-NT1004+ (w/FM) = NT1004 USB decoder chip + SAA7113 video decoder chip
+
 Dynalink
 --------
    These are CPH series.
@@ -284,6 +299,8 @@
    TV-Station pro (+TV stereo)
    TV-Station FM (+Radio)
    TV-Station RDS (+RDS)
+   TV Station SAT (analog satellite)
+   TV-Station DVB-S
 
    newer Cards have saa7134, but model name stayed the same?
 
@@ -296,8 +313,23 @@
    3DeMon PV951
    MediaForte TV-Vision PV951
    Yoko PV951
-  )
+   Vivanco Tuner Card PCI Art.-Nr.: 68404
+  ) now named PV-951T
+
+  Surveillance Series
+  PV-141
+  PV-143
+  PV-147
   PV-148 (capture only)
+  PV-150
+  PV-151
+
+  TV-FM Tuner Series
+  PV-951TDV (tv tuner + 1394)
+  PV-951T/TF
+  PV-951PT/TF
+  PV-956T/TF Low Profile
+  PV-911
 
 Highscreen
 ----------
@@ -372,9 +404,9 @@
 
 IXMicro (former: IMS=Integrated Micro Solutions)
 -------
-   IXTV BT848
+   IXTV BT848 (=TurboTV)
    IXTV BT878
-   TurboTV (Bt848)
+   IMS TurboTV (Bt848)
 
 Lifetec/Medion/Tevion/Aldi
 --------------------------
@@ -386,8 +418,10 @@
 Modular Technologies (www.modulartech.com) UK
 ---------------------------------------------
    MM100 PCTV (Bt848)
+   MM201 PCTV (Bt878, Bt832) w/ Quartzsight camera
+   MM202 PCTV (Bt878, Bt832, tda9874)
    MM205 PCTV (Bt878)
-   MM210 PCTV (Bt878) (Galaxy TV)
+   MM210 PCTV (Bt878) (Galaxy TV, Galaxymedia ?)
 
 Terratec
 --------
@@ -399,6 +433,7 @@
    Terra TValue Version BT878,    "80-CP2830110-0 TTTV4" printed on the PCB, 
 				     "CPH011-D83" on back
    Terra TValue Version 1.0       "ceb105.PCB" (really identical to Terra TV+ Version 1.0)
+   Terra TValue New Revision	  "LR102 Rec.C"
    Terra Active Radio Upgrade (tea5757h, saa6588t)
 
    LR74 is a newer PCB revision of ceb105 (both incl. connector for Active Radio Upgrade)
@@ -446,7 +481,7 @@
    Studio PCTV Pro  (Bt878 stereo w/ FM)
    Pinnacle PCTV    (Bt878, MT2032)
    Pinnacle PCTV Pro (Bt878, MT2032)
-   Pinncale PCTV Sat
+   Pinncale PCTV Sat (bt878a, HM1821/1221)
 
    M(J)PEG capture and playback:
    DC1+ (ISA)
@@ -519,7 +554,7 @@
 ------
    iProTV (Card for iMac Mezzanine slot, Bt848+SCSI)
    ProTV (Bt848)
-   ProTV II = ProTV Stereo (Bt878)
+   ProTV II = ProTV Stereo (Bt878) ["stereo" means FM stereo, tv is still mono]
 
 ATI
 ---
@@ -544,7 +579,7 @@
 
 STB
 ---
-   STB bt878 == Gateway 6000704 
+   STB Gateway 6000704 (bt878)
    STB Gateway 6000699 (bt848)
    STB Gateway 6000402 (bt848)
    STB TV130 PCI
@@ -558,13 +593,14 @@
 ------------
    TT-SAT PCI (PCB "Sat-PCI Rev.:1.3.1"; zr36125, vpx3225d, stc0056a, Tuner:BSKE6-155A
    TT-DVB-Sat
+    revisions 1.1, 1.3, 1.5, 1.6 and 2.1
     This card is sold as OEM from:
 	Siemens DVB-s Card
 	Hauppauge WinTV DVB-S
 	Technisat SkyStar 1 DVB
 	Galaxis DVB Sat
     Now this card is called TT-PCline Premium Family
-   TT-Budget
+   TT-Budget (saa7146, bsru6-701a)
     This card is sold as OEM from:
 	Hauppauge WinTV Nova
 	Satelco Standard PCI (DVB-S)
@@ -603,18 +639,71 @@
    Galaxis DVB Card C CI
    Galaxis DVB Card S
    Galaxis DVB Card C
+   Galaxis plug.in S [neuer Name: Galaxis DVB Card S CI
 
 Hauppauge
 ---------
    many many WinTV models ...
-   WinTV DVBs = Tehcnotrend Premium
-   WinTV NOVA = Technotrend Budget
-   WinTV NOVA-CI
-   WinTV-Nexus-s
+   WinTV DVBs = Technotrend Premium 1.3
+   WinTV NOVA = Technotrend Budget 1.1 "S-DVB DATA"
+   WinTV NOVA-CI "SDVBACI"
+   WinTV Nova USB (=Technotrend USB 1.0)
+   WinTV-Nexus-s (=Technotrend Premium 2.1 or 2.2)
    WinTV PVR
    WinTV PVR 250
    WinTV PVR 450
 
+  US models
+  990 WinTV-PVR-350 (249USD)
+  980 WinTV-PVR-250 (149USD)
+  880 WinTV-PVR-PCI (199USD)
+  881 WinTV-PVR-USB
+  190 WinTV-GO
+  191 WinTV-GO-FM
+  404 WinTV
+  401 WinTV-radio
+  495 WinTV-Theater
+  602 WinTV-USB
+  621 WinTV-USB-FM
+  600 USB-Live
+  698 WinTV-HD
+  697 WinTV-D
+  564 WinTV-Nexus-S
+
+  Deutsche Modelle
+  603 WinTV GO
+  719 WinTV Primio-FM
+  718 WinTV PCI-FM
+  497 WinTV Theater
+  569 WinTV USB
+  568 WinTV USB-FM
+  882 WinTV PVR
+  981 WinTV PVR 250
+  891 WinTV-PVR-USB
+  541 WinTV Nova
+  488 WinTV Nova-Ci
+  564 WinTV-Nexus-s
+  727 WinTV-DVB-c
+  545 Common Interface
+  898 WinTV-Nova-USB
+
+  UK models
+  607 WinTV Go
+  693,793 WinTV Primio FM
+  647,747 WinTV PCI FM
+  498 WinTV Theater
+  883 WinTV PVR
+  893 WinTV PVR USB  (Duplicate entry)
+  566 WinTV USB (UK)
+  573 WinTV USB FM
+  429 Impact VCB (bt848)
+  600 USB Libe (Video-In 1x Comp, 1xSVHS)
+  542 WinTV Nova
+  717 WinTV DVB-S
+  909 Nova-t PCI
+  893 Nova-t USB   (Duplicate entry)
+  
+
 Matrix-Vision
 -------------
    MATRIX-Vision MV-Delta
@@ -699,7 +788,7 @@
    HS-878 Mini PCI Capture Add-on Card
    HS-879 Mini PCI 3D Audio and Capture Add-on Card (w/ ES1938 Solo-1)
 
-Satelco
+Satelco www.citycom-gmbh.de, www.satelco.de
 -------
    TV-FM =KNC1 saa7134
    Standard PCI (DVB-S) = Technotrend Budget
@@ -724,7 +813,8 @@
 
 AITech
 ------
-   AITech WaveWatcher TV-PCI = LR26
+   Wavewatcher TV (ISA)
+   AITech WaveWatcher TV-PCI = can be LR26 (Bt848) or LR50 (BT878)
    WaveWatcher TVR-202 TV/FM Radio Card (ISA)
 
 MAXRON
@@ -750,3 +840,42 @@
    CyberMail AV Video Email Kit w/ PCI Capture Card (capture only)
    CyberMail Xtreme
   These are Flyvideo
+
+VCR (http://www.vcrinc.com/) 
+---
+  Video Catcher 16
+
+Twinhan
+-------
+   DST Card/DST-IP (bt878, twinhan asic) VP-1020
+    Sold as:
+     KWorld DVBS Satellite TV-Card
+     Powercolor DSTV Satellite Tuner Card
+     Prolink Pixelview DTV2000
+     Provideo PV-911 Digital Satellite TV Tuner Card With Common Interface ?
+   DST-CI Card (DVB Satellite) VP-1030
+   DCT Card (DVB cable)
+
+MSI
+---
+    MSI TV@nywhere Tuner Card (MS-8876) (CX23881/883) Not Bt878 compatible.
+    MS-8401 DVB-S
+
+Focus www.focusinfo.com
+-----
+    InVideo PCI (bt878)
+
+Sdisilk www.sdisilk.com/
+-------
+    SDI Silk 100
+    SDI Silk 200 SDI Input Card
+
+www.euresys.com
+    PICOLO series 
+
+PMC/Pace
+www.pacecom.co.uk website closed
+
+Mercury www.kobian.com (UK and FR)
+    LR50
+    LR138RBG-Rx  == LR138
diff -Nru a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS	Wed Jan  8 20:04:44 2003
+++ b/MAINTAINERS	Wed Jan  8 20:04:44 2003
@@ -1133,6 +1133,12 @@
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
+MODULE SUPPORT
+P:	Rusty Russell
+M:	rusty@rustcorp.com.au
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+
 MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER
 P:	Stelian Pop
 M:	stelian@popies.net
diff -Nru a/Makefile b/Makefile
--- a/Makefile	Wed Jan  8 20:04:43 2003
+++ b/Makefile	Wed Jan  8 20:04:43 2003
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 5
-SUBLEVEL = 54
+SUBLEVEL = 55
 EXTRAVERSION =
 
 # *DOCUMENTATION*
diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig
--- a/arch/alpha/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/alpha/Kconfig	Wed Jan  8 20:04:44 2003
@@ -7,9 +7,8 @@
 	default y
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
-	  marketed by the Digital Equipment Corporation of blessed memory, now
-	  Compaq.  Alpha Linux dates from 1995-1996 and was the first non-x86
-	  port. The Alpha Linux project has a home page at
+	  marketed by the Digital Equipment Corporation of blessed memory,
+	  now Hewlett-Packard.  The Alpha Linux project has a home page at
 	  <http://www.alphalinux.org/>.
 
 config MMU
@@ -42,9 +41,6 @@
 choice
 	prompt "Alpha system type"
 	default ALPHA_GENERIC
-
-config ALPHA_GENERIC
-	bool "Generic"
 	---help---
 	  This is the system type of your hardware.  A "generic" kernel will
 	  run on any supported Alpha system. However, if you configure a
@@ -84,6 +80,11 @@
 
 	  If you don't know what to do, choose "generic".
 
+config ALPHA_GENERIC
+	bool "Generic"
+	help
+	  A generic kernel will run on all supported Alpha hardware.
+
 config ALPHA_ALCOR
 	bool "Alcor/Alpha-XLT"
 	help
@@ -809,47 +810,6 @@
 source "drivers/ieee1394/Kconfig"
 
 source "net/Kconfig"
-
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
 
 source "net/ax25/Kconfig"
 
diff -Nru a/arch/alpha/Makefile b/arch/alpha/Makefile
--- a/arch/alpha/Makefile	Wed Jan  8 20:04:44 2003
+++ b/arch/alpha/Makefile	Wed Jan  8 20:04:44 2003
@@ -10,13 +10,17 @@
 
 NM := $(NM) -B
 
-LDFLAGS_vmlinux = -static -N #-relax
-CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8
-LDFLAGS_BLOB := --format binary --oformat elf64-alpha
+LDFLAGS_vmlinux	:= -static -N #-relax
+LDFLAGS_BLOB	:= --format binary --oformat elf64-alpha
+cflags-y	:= -pipe -mno-fp-regs -ffixed-8
 
 # Determine if we can use the BWX instructions with GAS.
 old_gas := $(shell if $(AS) --version 2>&1 | grep 'version 2.7' > /dev/null; then echo y; else echo n; fi)
 
+ifeq ($(old_gas),y)
+$(error The assembler '$(AS)' does not support the BWX instruction)
+endif
+
 # Determine if GCC understands the -mcpu= option.
 have_mcpu := $(shell if $(CC) -mcpu=ev5 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
 
@@ -27,68 +31,64 @@
 have_mcpu_ev67 := $(shell if $(CC) -mcpu=ev67 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
 
 have_msmall_data := $(shell if $(CC) -msmall-data -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
-ifeq ($(have_msmall_data),y)
-  CFLAGS := $(CFLAGS) -msmall-data
-endif
+
+cflags-$(have_msmall_data) += -msmall-data
 
 # Turn on the proper cpu optimizations.
 ifeq ($(have_mcpu),y)
+  mcpu_done := n
   # If GENERIC, make sure to turn off any instruction set extensions that
   # the host compiler might have on by default.  Given that EV4 and EV5
   # have the same instruction set, prefer EV5 because an EV5 schedule is
   # more likely to keep an EV4 processor busy than vice-versa.
-  mcpu_done := n
   ifeq ($(CONFIG_ALPHA_GENERIC),y)
-    CFLAGS := $(CFLAGS) -mcpu=ev5
+    mcpu := ev5
     mcpu_done := y
   endif
   ifeq ($(mcpu_done)$(CONFIG_ALPHA_SX164)$(have_mcpu_pca56),nyy)
-    CFLAGS := $(CFLAGS) -mcpu=pca56
+    mcpu := pca56
     mcpu_done := y
   endif
   ifeq ($(mcpu_done)$(CONFIG_ALPHA_POLARIS)$(have_mcpu_pca56),nyy)
-    CFLAGS := $(CFLAGS) -mcpu=pca56
+    mcpu := pca56
     mcpu_done := y
   endif
   ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV4),ny)
-    CFLAGS := $(CFLAGS) -mcpu=ev4
+    mcpu := ev4
     mcpu_done := y
   endif
   ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV56),ny)
-    CFLAGS := $(CFLAGS) -mcpu=ev56
+    mcpu := ev56
     mcpu_done := y
   endif
   ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV5),ny)
-    CFLAGS := $(CFLAGS) -mcpu=ev5
+    mcpu := ev5
     mcpu_done := y
   endif
   ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV67)$(have_mcpu_ev67),nyy)
-    CFLAGS := $(CFLAGS) -mcpu=ev67
+    mcpu := ev67
     mcpu_done := y
   endif
   ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV6),ny)
     ifeq ($(have_mcpu_ev6),y)
-      CFLAGS := $(CFLAGS) -mcpu=ev6
+      mcpu := ev6
     else
       ifeq ($(have_mcpu_pca56),y)
-        CFLAGS := $(CFLAGS) -mcpu=pca56
+        mcpu := pca56
       else
-        CFLAGS := $(CFLAGS) -mcpu=ev56
+        mcpu=ev56
       endif
     endif
     mcpu_done := y
   endif
+  cflags-$(mcpu_done) += -mcpu=$(mcpu)
 endif
 
+
 # For TSUNAMI, we must have the assembler not emulate our instructions.
 # The same is true for IRONGATE, POLARIS, PYXIS.
 # BWX is most important, but we don't really want any emulation ever.
-
-ifeq ($(old_gas),y)
-  # How do we do #error in make?
-  CFLAGS := --error-please-upgrade-your-assembler
-endif
-CFLAGS := $(CFLAGS) -Wa,-mev6
+CFLAGS += $(cflags-y) -Wa,-mev6
 
 HEAD := arch/alpha/kernel/head.o
 
@@ -96,37 +96,16 @@
 core-$(CONFIG_MATHEMU)  += arch/alpha/math-emu/
 libs-y			+= arch/alpha/lib/
 
-export libs-y
-
-MAKEBOOT = $(MAKE) -C arch/alpha/boot
-
-rawboot:	vmlinux
-	@$(MAKEBOOT) rawboot
+boot := arch/alpha/boot
 
-boot:	vmlinux
-	@$(MAKEBOOT)
+#Default target when executing make with no arguments
+all boot: $(boot)/vmlinux.gz
 
-#
-# My boot writes directly to a specific disk partition, I doubt most
-# people will want to do that without changes..
-#
-msb my-special-boot:	vmlinux
-	@$(MAKEBOOT) msb
+$(boot)/vmlinux.gz: vmlinux
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(boot) $@
 
-bootimage:	vmlinux
-	@$(MAKEBOOT) bootimage
-
-srmboot:	vmlinux
-	@$(MAKEBOOT) srmboot
-
-archclean:
-	@$(MAKEBOOT) clean
-
-archmrproper:
-	rm -f include/asm-alpha/asm_offsets.h
-
-bootpfile:	vmlinux
-	@$(MAKEBOOT) bootpfile
+bootimage bootpfile: vmlinux
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(boot) $(boot)/$@
 
 
 prepare: include/asm-$(ARCH)/asm_offsets.h
@@ -134,12 +113,21 @@
 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 				   include/config/MARKER
 
-include/asm-$(ARCH)/asm_offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
-	@$(generate-asm-offsets.h) < $< > $@
-
-include/asm-$(ARCH)/asm_offsets.h: include/asm-$(ARCH)/asm_offsets.h.tmp
+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 	@echo -n '  Generating $@'
+	@$(generate-asm-offsets.h) < $< > $@.tmp
 	@$(update-if-changed)
 
-CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
-	       include/asm-$(ARCH)/offset.h
+archclean:
+	$(Q)$(MAKE) -f scripts/Makefile.clean obj=$(boot)
+
+archmrproper:
+
+CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h.tmp \
+	       include/asm-$(ARCH)/asm_offsets.h
+
+define archhelp
+  echo '* boot		- Compressed kernel image (arch/alpha/boot/vmlinux.gz)'
+  echo '  bootimage	- SRM bootable image (arch/alpha/boot/bootimage)'
+  echo '  bootpfile	- BOOTP bootable image (arch/alpha/boot/bootpfile)'
+endef
diff -Nru a/arch/alpha/boot/Makefile b/arch/alpha/boot/Makefile
--- a/arch/alpha/boot/Makefile	Wed Jan  8 20:04:43 2003
+++ b/arch/alpha/boot/Makefile	Wed Jan  8 20:04:43 2003
@@ -8,58 +8,35 @@
 # Copyright (C) 1994 by Linus Torvalds
 #
 
-LINKFLAGS = -static -T bootloader.lds -uvsprintf #-N -relax
-
-CFLAGS := $(CFLAGS) -I$(TOPDIR)/include
-
-.S.s:
-	$(CPP) $(AFLAGS) -traditional -o $*.o $<
-.S.o:
-	$(CC) $(AFLAGS) -traditional -c -o $*.o $<
-
-OBJECTS = head.o main.o
-BPOBJECTS = head.o bootp.o
-TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo
-VMLINUX = $(TOPDIR)/vmlinux
-OBJSTRIP = tools/objstrip
-LIBS := $(addprefix $(TOPDIR)/,$(libs-y))
-
-all:	$(TARGETS)
-	@echo Ready to install kernel in $(shell pwd)/vmlinux.gz
-
-# normally no need to build these:
-rawboot: vmlinux.nh tools/lxboot tools/bootlx
-
-msb:	tools/lxboot tools/bootlx vmlinux.nh
-	( cat tools/lxboot tools/bootlx vmlinux.nh ) > /dev/rz0a
-	disklabel -rw rz0 'linux' tools/lxboot tools/bootlx
-
-bootimage:	tools/mkbb tools/lxboot tools/bootlx vmlinux.nh
-	( cat tools/lxboot tools/bootlx vmlinux.nh ) > bootimage
-	tools/mkbb bootimage tools/lxboot
-
-bootpfile:	tools/bootph vmlinux.nh
-	cat tools/bootph vmlinux.nh > bootpfile
+host-progs	:= tools/mkbb tools/objstrip
+EXTRA_TARGETS	:= vmlinux.gz vmlinux \
+		   vmlinux.nh tools/lxboot tools/bootlx tools/bootph \
+		   bootloader bootpheader 
+OBJSTRIP	:= $(obj)/tools/objstrip
+
+# SRM bootable image.  Copy to offset 512 of a partition.
+$(obj)/bootimage: $(addprefix $(obj)/tools/,mkbb lxboot bootlx) $(obj)/vmlinux.nh
+	( cat $(obj)/tools/lxboot $(obj)/tools/bootlx $(obj)/vmlinux.nh ) > $@ 
+	$(obj)/tools/mkbb $@ $(obj)/tools/lxboot
+	@echo '  Bootimage $@ is ready'
+
+# BOOTP bootable image.  Define INITRD during make to append initrd image.
+$(obj)/bootpfile: $(obj)/tools/bootph $(obj)/vmlinux.nh
+	cat $(obj)/tools/bootph $(obj)/vmlinux.nh > $@
 ifdef INITRD
-	cat $(INITRD) >> bootpfile
+	cat $(INITRD) >> $@
 endif
 
-srmboot:	bootdevice bootimage
-	dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1
-	tools/mkbb $(BOOTDEV) tools/lxboot
-
-bootdevice:
-	@test "$(BOOTDEV)" != ""  || (echo You must specify BOOTDEV ; exit -1)
+# Compressed kernel image
+$(obj)/vmlinux.gz: $(obj)/vmlinux FORCE
+	$(call if_changed,gzip)
+	@echo '  Kernel $@ is ready'
 
-vmlinux.gz: vmlinux
-	gzip -fv9 vmlinux
+$(obj)/main.o: $(obj)/ksize.h
+$(obj)/bootp.o: $(obj)/ksize.h
 
-main.o: ksize.h
-
-bootp.o: ksize.h
-
-ksize.h: vmlinux.nh FORCE
-	echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T
+$(obj)/ksize.h: $(obj)/vmlinux.nh FORCE
+	echo "#define KERNEL_SIZE `ls -l $(obj)/vmlinux.nh | awk '{print $$5}'`" > $@T
 ifdef INITRD
 	[ -f $(INITRD) ] || exit 1
 	echo "#define INITRD_IMAGE_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T
@@ -67,36 +44,36 @@
 	cmp -s $@T $@ || mv -f $@T $@
 	rm -f $@T
 
-vmlinux.nh: $(VMLINUX) $(OBJSTRIP)
-	$(OBJSTRIP) -v $(VMLINUX) vmlinux.nh
-
-vmlinux: $(TOPDIR)/vmlinux
-	$(STRIP) -o vmlinux $(VMLINUX)
-
-tools/lxboot: $(OBJSTRIP) bootloader
-	$(OBJSTRIP) -p bootloader tools/lxboot
-
-tools/bootlx: bootloader $(OBJSTRIP)
-	$(OBJSTRIP) -vb bootloader tools/bootlx
-
-tools/bootph: bootpheader $(OBJSTRIP)
-	$(OBJSTRIP) -vb bootpheader tools/bootph
-
-$(OBJSTRIP): $(OBJSTRIP).c
-	$(HOSTCC) $(HOSTCFLAGS) $< -o $@
-
-tools/mkbb: tools/mkbb.c
-	$(HOSTCC) tools/mkbb.c -o tools/mkbb
-
-bootloader: $(OBJECTS)
-	$(LD) $(LINKFLAGS) $(OBJECTS) $(LIBS) -o bootloader
+quiet_cmd_strip = STRIP  $@
+      cmd_strip = $(STRIP) -o $@ $<
+$(obj)/vmlinux: vmlinux FORCE
+	$(call if_changed,strip)
+
+quiet_cmd_objstrip = OBJSTRIP $@
+      cmd_objstrip = $(OBJSTRIP) $(OSFLAGS_$(@F)) $< $@
+
+OSFLAGS_vmlinux.nh	:= -v
+OSFLAGS_lxboot		:= -p
+OSFLAGS_bootlx		:= -vb
+OSFLAGS_bootph		:= -vb
+
+$(obj)/vmlinux.nh: vmlinux $(OBJSTRIP) FORCE
+	$(call if_changed,objstrip)
+	
+$(obj)/tools/lxboot: $(obj)/bootloader $(OBJSTRIP) FORCE
+	$(call if_changed,objstrip)
+
+$(obj)/tools/bootlx: $(obj)/bootloader $(OBJSTRIP) FORCE
+	$(call if_changed,objstrip)
+
+$(obj)/tools/bootph: $(obj)/bootpheader $(OBJSTRIP) FORCE
+	$(call if_changed,objstrip)
 
-bootpheader: $(BPOBJECTS)
-	$(LD) $(LINKFLAGS) $(BPOBJECTS) $(LIBS) -o bootpheader
+LDFLAGS_bootloader  := -static -uvsprintf -T  #-N -relax
+LDFLAGS_bootpheader := -static -uvsprintf -T  #-N -relax
 
-clean:
-	rm -f $(TARGETS) bootloader bootimage bootpfile bootpheader
-	rm -f tools/mkbb tools/bootlx tools/lxboot tools/bootph
-	rm -f vmlinux.nh ksize.h
+$(obj)/bootloader: $(obj)/bootloader.lds $(obj)/head.o $(obj)/main.o FORCE
+	$(call if_changed,ld)
 
-FORCE:
+$(obj)/bootpheader: $(obj)/bootloader.lds $(obj)/head.o $(obj)/bootp.o FORCE
+	$(call if_changed,ld)
diff -Nru a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
--- a/arch/alpha/kernel/Makefile	Wed Jan  8 20:04:43 2003
+++ b/arch/alpha/kernel/Makefile	Wed Jan  8 20:04:43 2003
@@ -12,83 +12,78 @@
 	    irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \
 	    alpha_ksyms.o systbls.o err_common.o
 
-#
-# FIXME!
-# These should be made conditional on the stuff that needs them!
-#
-obj-y	 += irq_i8259.o irq_srm.o \
-	    es1888.o smc37c669.o smc37c93x.o ns87312.o
-
-ifdef CONFIG_VGA_HOSE
-obj-y	 += console.o
-endif
-
-obj-$(CONFIG_SMP)    += smp.o
-obj-$(CONFIG_PCI)    += pci.o pci_iommu.o
+obj-$(CONFIG_VGA_HOSE)	+= console.o
+obj-$(CONFIG_SMP)	+= smp.o
+obj-$(CONFIG_PCI)	+= pci.o pci_iommu.o
 obj-$(CONFIG_SRM_ENV)	+= srm_env.o
+obj-$(CONFIG_MODULES)	+= module.o
 
 ifdef CONFIG_ALPHA_GENERIC
 
-obj-y 	 += core_apecs.o core_cia.o core_irongate.o core_lca.o core_mcpcia.o \
-	    core_polaris.o core_t2.o core_tsunami.o core_titan.o \
-	    sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o sys_eiger.o \
+obj-y 	 += core_apecs.o core_cia.o core_irongate.o core_lca.o \
+	    core_mcpcia.o core_polaris.o core_t2.o core_tsunami.o \
+	    core_titan.o core_wildfire.o
+
+obj-y	 += sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o sys_eiger.o \
 	    sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o sys_titan.o \
 	    sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \
 	    sys_sable.o sys_sio.o sys_sx164.o sys_takara.o \
-	    sys_wildfire.o core_wildfire.o irq_pyxis.o
+	    sys_wildfire.o
+
+obj-y	 += irq_pyxis.o irq_i8259.o irq_srm.o
+
+obj-y	 += es1888.o smc37c669.o smc37c93x.o ns87312.o
 
 else
 
 # Core logic support
-obj-$(CONFIG_ALPHA_APECS) += core_apecs.o
-obj-$(CONFIG_ALPHA_CIA) += core_cia.o
-
-obj-$(CONFIG_ALPHA_IRONGATE) += core_irongate.o
-obj-$(CONFIG_ALPHA_LCA) += core_lca.o
-obj-$(CONFIG_ALPHA_MCPCIA) += core_mcpcia.o
-obj-$(CONFIG_ALPHA_T2) += core_t2.o
-obj-$(CONFIG_ALPHA_TSUNAMI) += core_tsunami.o
-obj-$(CONFIG_ALPHA_TITAN) += core_titan.o
-obj-$(CONFIG_ALPHA_POLARIS) += core_polaris.o
-obj-$(CONFIG_ALPHA_WILDFIRE) += core_wildfire.o
+obj-$(CONFIG_ALPHA_APECS)	+= core_apecs.o
+obj-$(CONFIG_ALPHA_CIA)		+= core_cia.o
+obj-$(CONFIG_ALPHA_IRONGATE)	+= core_irongate.o
+obj-$(CONFIG_ALPHA_LCA)		+= core_lca.o
+obj-$(CONFIG_ALPHA_MCPCIA)	+= core_mcpcia.o
+obj-$(CONFIG_ALPHA_POLARIS)	+= core_polaris.o
+obj-$(CONFIG_ALPHA_T2)		+= core_t2.o
+obj-$(CONFIG_ALPHA_TSUNAMI)	+= core_tsunami.o
+obj-$(CONFIG_ALPHA_TITAN)	+= core_titan.o
+obj-$(CONFIG_ALPHA_WILDFIRE)	+= core_wildfire.o
 
 # Board support
-ifneq ($(CONFIG_ALPHA_ALCOR)$(CONFIG_ALPHA_XLT),)
-obj-y    += sys_alcor.o
-endif
-ifneq ($(CONFIG_ALPHA_CABRIOLET)$(CONFIG_ALPHA_EB164)$(CONFIG_ALPHA_EB66P)$(CONFIG_ALPHA_LX164)$(CONFIG_ALPHA_PC164),)
-obj-y    += sys_cabriolet.o
-endif
-
-obj-$(CONFIG_ALPHA_DP264) += sys_dp264.o
-obj-$(CONFIG_ALPHA_SHARK) += sys_dp264.o
-obj-$(CONFIG_ALPHA_TITAN) += sys_titan.o
-
-ifneq ($(CONFIG_ALPHA_EB64P)$(CONFIG_ALPHA_EB66),)
-obj-y    += sys_eb64p.o
-endif
-
-obj-$(CONFIG_ALPHA_EIGER) += sys_eiger.o
-obj-$(CONFIG_ALPHA_JENSEN) += sys_jensen.o pci-noop.o
-obj-$(CONFIG_ALPHA_MIATA) += sys_miata.o
-obj-$(CONFIG_ALPHA_MIKASA) += sys_mikasa.o
-obj-$(CONFIG_ALPHA_NAUTILUS) += sys_nautilus.o
-obj-$(CONFIG_ALPHA_NORITAKE) += sys_noritake.o
-obj-$(CONFIG_ALPHA_RAWHIDE) += sys_rawhide.o
-obj-$(CONFIG_ALPHA_RUFFIAN) += sys_ruffian.o
-obj-$(CONFIG_ALPHA_RX164) += sys_rx164.o
-obj-$(CONFIG_ALPHA_SABLE) += sys_sable.o
-
-ifneq ($(CONFIG_ALPHA_BOOK1)$(CONFIG_ALPHA_AVANTI)$(CONFIG_ALPHA_NONAME)$(CONFIG_ALPHA_P2K)$(CONFIG_ALPHA_XL),)
-obj-y    += sys_sio.o
-endif
-
-obj-$(CONFIG_ALPHA_SX164) += sys_sx164.o
-obj-$(CONFIG_ALPHA_TAKARA) += sys_takara.o
-obj-$(CONFIG_ALPHA_WILDFIRE) += sys_wildfire.o
-
-ifneq ($(CONFIG_ALPHA_MIATA)$(CONFIG_ALPHA_RUFFIAN)$(CONFIG_ALPHA_SX164),)
-obj-y    += irq_pyxis.o
-endif
+obj-$(CONFIG_ALPHA_ALCOR)	+= sys_alcor.o irq_i8259.o irq_srm.o
+obj-$(CONFIG_ALPHA_CABRIOLET)	+= sys_cabriolet.o irq_i8259.o irq_srm.o \
+				   ns87312.o
+obj-$(CONFIG_ALPHA_EB164)	+= sys_cabriolet.o irq_i8259.o irq_srm.o \
+				   ns87312.o
+obj-$(CONFIG_ALPHA_EB66P)	+= sys_cabriolet.o irq_i8259.o irq_srm.o \
+				   ns87312.o
+obj-$(CONFIG_ALPHA_LX164)	+= sys_cabriolet.o irq_i8259.o irq_srm.o \
+				   smc37c93x.o
+obj-$(CONFIG_ALPHA_PC164)	+= sys_cabriolet.o irq_i8259.o irq_srm.o \
+				   smc37c93x.o
+obj-$(CONFIG_ALPHA_DP264)	+= sys_dp264.o irq_i8259.o es1888.o smc37c669.o
+obj-$(CONFIG_ALPHA_SHARK)	+= sys_dp264.o irq_i8259.o es1888.o smc37c669.o
+obj-$(CONFIG_ALPHA_TITAN)	+= sys_titan.o irq_i8259.o smc37c669.o
+obj-$(CONFIG_ALPHA_EB64P)	+= sys_eb64p.o irq_i8259.o
+obj-$(CONFIG_ALPHA_EB66)	+= sys_eb64p.o irq_i8259.o
+obj-$(CONFIG_ALPHA_EIGER)	+= sys_eiger.o irq_i8259.o
+obj-$(CONFIG_ALPHA_JENSEN)	+= sys_jensen.o pci-noop.o irq_i8259.o
+obj-$(CONFIG_ALPHA_MIATA)	+= sys_miata.o irq_pyxis.o irq_i8259.o \
+				   es1888.o smc37c669.o
+obj-$(CONFIG_ALPHA_MIKASA)	+= sys_mikasa.o irq_i8259.o irq_srm.o
+obj-$(CONFIG_ALPHA_NAUTILUS)	+= sys_nautilus.o irq_i8259.o irq_srm.o
+obj-$(CONFIG_ALPHA_NORITAKE)	+= sys_noritake.o irq_i8259.o
+obj-$(CONFIG_ALPHA_RAWHIDE)	+= sys_rawhide.o irq_i8259.o
+obj-$(CONFIG_ALPHA_RUFFIAN)	+= sys_ruffian.o irq_pyxis.o irq_i8259.o
+obj-$(CONFIG_ALPHA_RX164)	+= sys_rx164.o irq_i8259.o
+obj-$(CONFIG_ALPHA_SABLE)	+= sys_sable.o
+obj-$(CONFIG_ALPHA_BOOK1)	+= sys_sio.o irq_i8259.o irq_srm.o ns87312.o
+obj-$(CONFIG_ALPHA_AVANTI)	+= sys_sio.o irq_i8259.o irq_srm.o ns87312.o
+obj-$(CONFIG_ALPHA_NONAME)	+= sys_sio.o irq_i8259.o irq_srm.o ns87312.o
+obj-$(CONFIG_ALPHA_P2K)		+= sys_sio.o irq_i8259.o irq_srm.o ns87312.o
+obj-$(CONFIG_ALPHA_XL)		+= sys_sio.o irq_i8259.o irq_srm.o ns87312.o
+obj-$(CONFIG_ALPHA_SX164)	+= sys_sx164.o irq_pyxis.o irq_i8259.o \
+				   irq_srm.o smc37c669.o
+obj-$(CONFIG_ALPHA_TAKARA)	+= sys_takara.o irq_i8259.o ns87312.o
+obj-$(CONFIG_ALPHA_WILDFIRE)	+= sys_wildfire.o irq_i8259.o
 
 endif # GENERIC
diff -Nru a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c
--- a/arch/alpha/kernel/alpha_ksyms.c	Wed Jan  8 20:04:43 2003
+++ b/arch/alpha/kernel/alpha_ksyms.c	Wed Jan  8 20:04:43 2003
@@ -33,6 +33,7 @@
 #include <asm/semaphore.h>
 #include <asm/tlbflush.h>
 #include <asm/cacheflush.h>
+#include <asm/vga.h>
 
 #define __KERNEL_SYSCALLS__
 #include <asm/unistd.h>
@@ -90,6 +91,7 @@
 EXPORT_SYMBOL(_memcpy_fromio);
 EXPORT_SYMBOL(_memcpy_toio);
 EXPORT_SYMBOL(_memset_c_io);
+EXPORT_SYMBOL(scr_memcpyw);
 EXPORT_SYMBOL(insb);
 EXPORT_SYMBOL(insw);
 EXPORT_SYMBOL(insl);
diff -Nru a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c
--- a/arch/alpha/kernel/irq_i8259.c	Wed Jan  8 20:04:44 2003
+++ b/arch/alpha/kernel/irq_i8259.c	Wed Jan  8 20:04:44 2003
@@ -130,11 +130,11 @@
 # define IACK_SC	TITAN_IACK_SC
 #elif defined(CONFIG_ALPHA_TSUNAMI)
 # define IACK_SC	TSUNAMI_IACK_SC
-#elif defined(CONFIG_ALPHA_POLARIS)
-# define IACK_SC	POLARIS_IACK_SC
 #elif defined(CONFIG_ALPHA_IRONGATE)
 # define IACK_SC        IRONGATE_IACK_SC
 #endif
+/* Note that CONFIG_ALPHA_POLARIS is intentionally left out here, since
+   sys_rx164 wants to use isa_no_iack_sc_device_interrupt for some reason.  */
 
 #if defined(IACK_SC)
 void
diff -Nru a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/alpha/kernel/module.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,305 @@
+/*  Kernel module help for Alpha.
+    Copyright (C) 2002 Richard Henderson.
+
+    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.
+
+    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/moduleloader.h>
+#include <linux/elf.h>
+#include <linux/vmalloc.h>
+#include <linux/fs.h>
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+
+#if 0
+#define DEBUGP printk
+#else
+#define DEBUGP(fmt...)
+#endif
+
+void *
+module_alloc(unsigned long size)
+{
+	if (size == 0)
+		return NULL;
+	return vmalloc(size);
+}
+
+void
+module_free(struct module *mod, void *module_region)
+{
+	vfree(module_region);
+}
+
+/* Allocate the GOT at the end of the core sections.  */
+
+struct got_entry {
+	struct got_entry *next;
+	Elf64_Addr r_offset;
+	int got_offset;
+};
+
+static inline void
+process_reloc_for_got(Elf64_Rela *rela,
+		      struct got_entry *chains, Elf64_Xword *poffset)
+{
+	unsigned long r_sym = ELF64_R_SYM (rela->r_info);
+	unsigned long r_type = ELF64_R_TYPE (rela->r_info);
+	Elf64_Addr r_offset = rela->r_offset;
+	struct got_entry *g;
+
+	if (r_type != R_ALPHA_LITERAL)
+		return;
+
+	for (g = chains + r_sym; g ; g = g->next)
+		if (g->r_offset == r_offset) {
+			if (g->got_offset == 0) {
+				g->got_offset = *poffset;
+				*poffset += 8;
+			}
+			goto found_entry;
+		}
+
+	g = kmalloc (sizeof (*g), GFP_KERNEL);
+	g->next = chains[r_sym].next;
+	g->r_offset = r_offset;
+	g->got_offset = *poffset;
+	*poffset += 8;
+	chains[r_sym].next = g;
+
+ found_entry:
+	/* Trick: most of the ELF64_R_TYPE field is unused.  There are
+	   42 valid relocation types, and a 32-bit field.  Co-opt the
+	   bits above 256 to store the got offset for this reloc.  */
+	rela->r_info |= g->got_offset << 8;
+}
+
+int
+module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs,
+			  char *secstrings, struct module *me)
+{
+	struct got_entry *chains;
+	Elf64_Rela *rela;
+	Elf64_Shdr *esechdrs, *symtab, *s, *got;
+	unsigned long nsyms, nrela, i;
+
+	esechdrs = sechdrs + hdr->e_shnum;
+	symtab = got = NULL;
+
+	/* Find out how large the symbol table is.  Allocate one got_entry
+	   head per symbol.  Normally this will be enough, but not always.
+	   We'll chain different offsets for the symbol down each head.  */
+	for (s = sechdrs; s < esechdrs; ++s)
+		if (s->sh_type == SHT_SYMTAB)
+			symtab = s;
+		else if (!strcmp(".got", secstrings + s->sh_name)) {
+			got = s;
+			me->arch.gotsecindex = s - sechdrs;
+		}
+
+	if (!symtab) {
+		printk(KERN_ERR "module %s: no symbol table\n", me->name);
+		return -ENOEXEC;
+	}
+	if (!got) {
+		printk(KERN_ERR "module %s: no got section\n", me->name);
+		return -ENOEXEC;
+	}
+
+	nsyms = symtab->sh_size / sizeof(Elf64_Sym);
+	chains = kmalloc(nsyms * sizeof(struct got_entry), GFP_KERNEL);
+	memset(chains, 0, nsyms * sizeof(struct got_entry));
+
+	got->sh_size = 0;
+	got->sh_addralign = 8;
+	got->sh_type = SHT_NOBITS;
+
+	/* Examine all LITERAL relocations to find out what GOT entries
+	   are required.  This sizes the GOT section as well.  */
+	for (s = sechdrs; s < esechdrs; ++s)
+		if (s->sh_type == SHT_RELA) {
+			nrela = s->sh_size / sizeof(Elf64_Rela);
+			rela = (void *)hdr + s->sh_offset;
+			for (i = 0; i < nrela; ++i)
+				process_reloc_for_got(rela+i, chains,
+						      &got->sh_size);
+		}
+
+	/* Free the memory we allocated.  */
+	for (i = 0; i < nsyms; ++i) {
+		struct got_entry *g, *n;
+		for (g = chains[i].next; g ; g = n) {
+			n = g->next;
+			kfree(g);
+		}
+	}
+	kfree(chains);
+
+	return 0;
+}
+
+int
+apply_relocate(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex,
+	       unsigned int relsec, struct module *me)
+{
+	printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name);
+	return -ENOEXEC;
+}
+
+int
+apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
+		   unsigned int symindex, unsigned int relsec,
+		   struct module *me)
+{
+	Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr;
+	unsigned long i, n = sechdrs[relsec].sh_size / sizeof(*rela);
+	Elf64_Sym *symtab, *sym;
+	void *base, *location;
+	unsigned long got, gp;
+
+	DEBUGP("Applying relocate section %u to %u\n", relsec,
+	       sechdrs[relsec].sh_info);
+
+	base = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr;
+	symtab = (Elf64_Sym *)sechdrs[symindex].sh_addr;
+
+	/* The small sections were sorted to the end of the segment.
+	   The following should definitely cover them.  */
+	gp = (u64)me->module_core + me->core_size - 0x8000;
+	got = sechdrs[me->arch.gotsecindex].sh_addr;
+
+	for (i = 0; i < n; i++) {
+		unsigned long r_sym = ELF64_R_SYM (rela[i].r_info);
+		unsigned long r_type = ELF64_R_TYPE (rela[i].r_info);
+		unsigned long r_got_offset = r_type >> 8;
+		unsigned long value, hi, lo;
+		r_type &= 0xff;
+
+		/* This is where to make the change.  */
+		location = base + rela[i].r_offset;
+
+		/* This is the symbol it is referring to.  */
+		sym = symtab + r_sym;
+		value = sym->st_value;
+		if (!value) {
+			printk(KERN_ERR "module %s: Unknown symbol %s\n",
+			       me->name, strtab + sym->st_name);
+			return -ENOENT;
+		}
+		value += rela[i].r_addend;
+
+		switch (r_type) {
+		case R_ALPHA_NONE:
+			break;
+		case R_ALPHA_REFQUAD:
+			*(u64 *)location = value;
+			break;
+		case R_ALPHA_GPREL32:
+			value -= gp;
+			if ((int)value != value)
+				goto reloc_overflow;
+			*(u32 *)location = value;
+			break;
+		case R_ALPHA_LITERAL:
+			hi = got + r_got_offset;
+			lo = hi - gp;
+			if ((short)lo != lo)
+				goto reloc_overflow;
+			*(u16 *)location = lo;
+			*(u64 *)hi = value;
+			break;
+		case R_ALPHA_LITUSE:
+			break;
+		case R_ALPHA_GPDISP:
+			value = gp - (u64)location;
+			lo = (short)value;
+			hi = (int)(value - lo);
+			if (hi + lo != value)
+				goto reloc_overflow;
+			*(u16 *)location = hi >> 16;
+			*(u16 *)(location + rela[i].r_addend) = lo;
+			break;
+		case R_ALPHA_BRSGP:
+			/* BRSGP is only allowed to bind to local symbols.
+			   If the section is undef, this means that the
+			   value was resolved from somewhere else.  */
+			if (sym->st_shndx == SHN_UNDEF)
+				goto reloc_overflow;
+			/* FALLTHRU */
+		case R_ALPHA_BRADDR:
+			value -= (u64)location + 4;
+			if (value & 3)
+				goto reloc_overflow;
+			value = (long)value >> 2;
+			if (value + (1<<21) >= 1<<22)
+				goto reloc_overflow;
+			value &= 0x1fffff;
+			value |= *(u32 *)location & ~0x1fffff;
+			*(u32 *)location = value;
+			break;
+		case R_ALPHA_HINT:
+			break;
+		case R_ALPHA_SREL32:
+			value -= (u64)location;
+			if ((int)value != value)
+				goto reloc_overflow;
+			*(u32 *)location = value;
+			break;
+		case R_ALPHA_SREL64:
+			value -= (u64)location;
+			*(u64 *)location = value;
+			break;
+		case R_ALPHA_GPRELHIGH:
+			value = (value - gp + 0x8000) >> 16;
+			if ((short) value != value)
+				goto reloc_overflow;
+			*(u16 *)location = value;
+			break;
+		case R_ALPHA_GPRELLOW:
+			value -= gp;
+			*(u16 *)location = value;
+			break;
+		case R_ALPHA_GPREL16:
+			value -= gp;
+			if ((short) value != value)
+				goto reloc_overflow;
+			*(u16 *)location = value;
+			break;
+		default:
+			printk(KERN_ERR "module %s: Unknown relocation: %lu\n",
+			       me->name, r_type);
+			return -ENOEXEC;
+		reloc_overflow:
+			if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION)
+			  printk(KERN_ERR
+			         "module %s: Relocation overflow vs section %d\n",
+			         me->name, sym->st_shndx);
+			else
+			  printk(KERN_ERR
+			         "module %s: Relocation overflow vs %s\n",
+			         me->name, strtab + sym->st_name);
+			return -ENOEXEC;
+		}
+	}
+
+	return 0;
+}
+
+int
+module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
+		struct module *me)
+{
+	return 0;
+}
diff -Nru a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c
--- a/arch/alpha/kernel/sys_alcor.c	Wed Jan  8 20:04:45 2003
+++ b/arch/alpha/kernel/sys_alcor.c	Wed Jan  8 20:04:45 2003
@@ -245,7 +245,6 @@
  * The System Vectors
  */
 
-#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_ALCOR)
 struct alpha_machine_vector alcor_mv __initmv = {
 	.vector_name		= "Alcor",
 	DO_EV5_MMU,
@@ -273,9 +272,7 @@
 	}}
 };
 ALIAS_MV(alcor)
-#endif
 
-#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_XLT)
 struct alpha_machine_vector xlt_mv __initmv = {
 	.vector_name		= "XLT",
 	DO_EV5_MMU,
@@ -302,5 +299,6 @@
 	    .gru_int_req_bits	= XLT_GRU_INT_REQ_BITS
 	}}
 };
-ALIAS_MV(xlt)
-#endif
+
+/* No alpha_mv alias for XLT, since we compile it in unconditionally
+   with ALCOR; setup_arch knows how to cope.  */
diff -Nru a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
--- a/arch/alpha/kernel/traps.c	Wed Jan  8 20:04:45 2003
+++ b/arch/alpha/kernel/traps.c	Wed Jan  8 20:04:45 2003
@@ -14,6 +14,7 @@
 #include <linux/tty.h>
 #include <linux/delay.h>
 #include <linux/smp_lock.h>
+#include <linux/module.h>
 
 #include <asm/gentrap.h>
 #include <asm/uaccess.h>
@@ -465,7 +466,7 @@
 {
 	long error, tmp1, tmp2, tmp3, tmp4;
 	unsigned long pc = regs.pc - 4;
-	unsigned fixup;
+	const struct exception_table_entry *fixup;
 
 	unaligned[0].count++;
 	unaligned[0].va = (unsigned long) va;
@@ -638,7 +639,7 @@
 got_exception:
 	/* Ok, we caught the exception, but we don't want it.  Is there
 	   someone to pass it along to?  */
-	if ((fixup = search_exception_table(pc)) != 0) {
+	if ((fixup = search_exception_tables(pc)) != 0) {
 		unsigned long newpc;
 		newpc = fixup_exception(una_reg, fixup, pc);
 
diff -Nru a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile
--- a/arch/alpha/lib/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/alpha/lib/Makefile	Wed Jan  8 20:04:45 2003
@@ -7,58 +7,53 @@
 
 # Many of these routines have implementations tuned for ev6.
 # Choose them iff we're targeting ev6 specifically.
-ev6 :=
-ifeq ($(CONFIG_ALPHA_EV6),y)
-  ev6 := ev6-
-endif
+ev6-$(CONFIG_ALPHA_EV6) := ev6-
 
 # Several make use of the cttz instruction introduced in ev67.
-ev67 :=
-ifeq ($(CONFIG_ALPHA_EV67),y)
-  ev67 := ev67-
-endif
+ev67-$(CONFIG_ALPHA_EV67) := ev67-
 
 obj-y =	__divqu.o __remqu.o __divlu.o __remlu.o \
 	udelay.o \
-	$(ev6)memset.o \
-	$(ev6)memcpy.o \
+	$(ev6-y)memset.o \
+	$(ev6-y)memcpy.o \
 	memmove.o \
 	io.o \
 	checksum.o \
 	csum_partial_copy.o \
-	$(ev67)strlen.o \
-	$(ev67)strcat.o \
+	$(ev67-y)strlen.o \
+	$(ev67-y)strcat.o \
 	strcpy.o \
-	$(ev67)strncat.o \
+	$(ev67-y)strncat.o \
 	strncpy.o \
-	$(ev6)stxcpy.o \
-	$(ev6)stxncpy.o \
-	$(ev67)strchr.o \
-	$(ev67)strrchr.o \
-	$(ev6)memchr.o \
-	$(ev6)copy_user.o \
-	$(ev6)clear_user.o \
-	$(ev6)strncpy_from_user.o \
-	$(ev67)strlen_user.o \
-	$(ev6)csum_ipv6_magic.o \
-	$(ev6)clear_page.o \
-	$(ev6)copy_page.o \
+	$(ev6-y)stxcpy.o \
+	$(ev6-y)stxncpy.o \
+	$(ev67-y)strchr.o \
+	$(ev67-y)strrchr.o \
+	$(ev6-y)memchr.o \
+	$(ev6-y)copy_user.o \
+	$(ev6-y)clear_user.o \
+	$(ev6-y)strncpy_from_user.o \
+	$(ev67-y)strlen_user.o \
+	$(ev6-y)csum_ipv6_magic.o \
+	$(ev6-y)clear_page.o \
+	$(ev6-y)copy_page.o \
 	strcasecmp.o \
 	fpreg.o \
 	callback_srm.o srm_puts.o srm_printk.o
 
 obj-$(CONFIG_SMP) += dec_and_lock.o
 
-$(obj)/__divqu.o: $(obj)/$(ev6)divide.S
-	$(CC) $(AFLAGS) -DDIV -c -o $(obj)/__divqu.o $(obj)/$(ev6)divide.S
-
-$(obj)/__remqu.o: $(obj)/$(ev6)divide.S
-	$(CC) $(AFLAGS) -DREM -c -o $(obj)/__remqu.o $(obj)/$(ev6)divide.S
-
-$(obj)/__divlu.o: $(obj)/$(ev6)divide.S
-	$(CC) $(AFLAGS) -DDIV -DINTSIZE \
-		-c -o $(obj)/__divlu.o $(obj)/$(ev6)divide.S
-
-$(obj)/__remlu.o: $(obj)/$(ev6)divide.S
-	$(CC) $(AFLAGS) -DREM -DINTSIZE \
-		-c -o $(obj)/__remlu.o $(obj)/$(ev6)divide.S
+# The division routines are built from single source, with different defines.
+AFLAGS___divqu.o = -DDIV
+AFLAGS___remqu.o =       -DREM
+AFLAGS___divlu.o = -DDIV       -DINTSIZE
+AFLAGS___remlu.o =       -DREM -DINTSIZE
+
+$(obj)/__divqu.o: $(obj)/$(ev6-y)divide.S
+	$(cmd_as_o_S)
+$(obj)/__remqu.o: $(obj)/$(ev6-y)divide.S
+	$(cmd_as_o_S)
+$(obj)/__divlu.o: $(obj)/$(ev6-y)divide.S
+	$(cmd_as_o_S)
+$(obj)/__remlu.o: $(obj)/$(ev6-y)divide.S
+	$(cmd_as_o_S)
diff -Nru a/arch/alpha/math-emu/Makefile b/arch/alpha/math-emu/Makefile
--- a/arch/alpha/math-emu/Makefile	Wed Jan  8 20:04:44 2003
+++ b/arch/alpha/math-emu/Makefile	Wed Jan  8 20:04:44 2003
@@ -2,6 +2,6 @@
 # Makefile for the FPU instruction emulation.
 #
 
-CFLAGS += -I. -I$(TOPDIR)/include/math-emu -w
+CFLAGS += -Iinclude/math-emu -w
 
 obj-$(CONFIG_MATHEMU) += math.o qrnnd.o
diff -Nru a/arch/alpha/mm/extable.c b/arch/alpha/mm/extable.c
--- a/arch/alpha/mm/extable.c	Wed Jan  8 20:04:32 2003
+++ b/arch/alpha/mm/extable.c	Wed Jan  8 20:04:32 2003
@@ -6,13 +6,10 @@
 #include <linux/module.h>
 #include <asm/uaccess.h>
 
-extern const struct exception_table_entry __start___ex_table[];
-extern const struct exception_table_entry __stop___ex_table[];
-
-static inline unsigned
-search_one_table(const struct exception_table_entry *first,
-		 const struct exception_table_entry *last,
-		 unsigned long value)
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value)
 {
         while (first <= last) {
 		const struct exception_table_entry *mid;
@@ -21,40 +18,12 @@
 		mid = (last - first) / 2 + first;
 		mid_value = (unsigned long)&mid->insn + mid->insn;
                 if (mid_value == value)
-                        return mid->fixup.unit;
+                        return mid;
                 else if (mid_value < value)
                         first = mid+1;
                 else
                         last = mid-1;
         }
-        return 0;
-}
-
-unsigned
-search_exception_table(unsigned long addr)
-{
-	unsigned ret;
-
-#ifndef CONFIG_MODULES
-	ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
-#else
-	extern spinlock_t modlist_lock;
-	unsigned long flags;
-	/* The kernel is the last "module" -- no need to treat it special. */
-	struct module *mp;
-
-	ret = 0;
-	spin_lock_irqsave(&modlist_lock, flags);
-	for (mp = module_list; mp ; mp = mp->next) {
-		if (!mp->ex_table_start || !(mp->flags&(MOD_RUNNING|MOD_INITIALIZING)))
-			continue;
-		ret = search_one_table(mp->ex_table_start,
-				       mp->ex_table_end - 1, addr);
-		if (ret)
-			break;
-	}
-	spin_unlock_irqrestore(&modlist_lock, flags);
-#endif
 
-	return ret;
+        return NULL;
 }
diff -Nru a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
--- a/arch/alpha/mm/fault.c	Wed Jan  8 20:04:43 2003
+++ b/arch/alpha/mm/fault.c	Wed Jan  8 20:04:43 2003
@@ -24,6 +24,7 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -88,7 +89,7 @@
 {
 	struct vm_area_struct * vma;
 	struct mm_struct *mm = current->mm;
-	unsigned int fixup;
+	const struct exception_table_entry *fixup;
 	int fault, si_code = SEGV_MAPERR;
 	siginfo_t info;
 
@@ -176,7 +177,7 @@
 
  no_context:
 	/* Are we prepared to handle this fault as an exception?  */
-	if ((fixup = search_exception_table(regs->pc)) != 0) {
+	if ((fixup = search_exception_tables(regs->pc)) != 0) {
 		unsigned long newpc;
 		newpc = fixup_exception(dpf_reg, fixup, regs->pc);
 		regs->pc = newpc;
diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig
--- a/arch/arm/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/arm/Kconfig	Wed Jan  8 20:04:44 2003
@@ -898,45 +898,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-endmenu
-
 #   source net/ax25/Config.in
 source "net/irda/Kconfig"
 
diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile
--- a/arch/arm/Makefile	Wed Jan  8 20:04:43 2003
+++ b/arch/arm/Makefile	Wed Jan  8 20:04:43 2003
@@ -210,7 +210,6 @@
 
 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 				   include/config/MARKER
-	@:
 
 include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
 	@echo -n '  Generating $@'
diff -Nru a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
--- a/arch/arm/boot/compressed/Makefile	Wed Jan  8 20:04:43 2003
+++ b/arch/arm/boot/compressed/Makefile	Wed Jan  8 20:04:43 2003
@@ -9,7 +9,7 @@
 
 HEAD	= head.o
 OBJS	= misc.o
-FONTC	= drivers/video/font_acorn_8x8.c
+FONTC	= drivers/video/console/font_acorn_8x8.c
 
 #
 # Architecture dependencies
diff -Nru a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
--- a/arch/arm/kernel/armksyms.c	Wed Jan  8 20:04:43 2003
+++ b/arch/arm/kernel/armksyms.c	Wed Jan  8 20:04:43 2003
@@ -127,7 +127,8 @@
 EXPORT_SYMBOL(disable_irq);
 EXPORT_SYMBOL(probe_irq_mask);
 EXPORT_SYMBOL(set_irq_type);
-EXPORT_SYMBOL(set_irq_wake);
+EXPORT_SYMBOL(enable_irq_wake);
+EXPORT_SYMBOL(disable_irq_wake);
 EXPORT_SYMBOL(pm_idle);
 EXPORT_SYMBOL(pm_power_off);
 EXPORT_SYMBOL(fp_init);
@@ -201,7 +202,6 @@
 EXPORT_SYMBOL(__arch_strnlen_user);
 
 	/* consistent area handling */
-EXPORT_SYMBOL(pci_alloc_consistent);
 EXPORT_SYMBOL(consistent_alloc);
 EXPORT_SYMBOL(consistent_free);
 EXPORT_SYMBOL(consistent_sync);
diff -Nru a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
--- a/arch/arm/kernel/bios32.c	Wed Jan  8 20:04:43 2003
+++ b/arch/arm/kernel/bios32.c	Wed Jan  8 20:04:43 2003
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 
 #include <asm/page.h> /* for BUG() */
+#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <asm/mach/pci.h>
diff -Nru a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
--- a/arch/arm/kernel/calls.S	Wed Jan  8 20:04:45 2003
+++ b/arch/arm/kernel/calls.S	Wed Jan  8 20:04:45 2003
@@ -14,7 +14,7 @@
 #else
 
 __syscall_start:
-/* 0 */		.long	sys_ni_syscall
+/* 0 */		.long	sys_restart_syscall
 		.long	sys_exit
 		.long	sys_fork_wrapper
 		.long	sys_read
diff -Nru a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
--- a/arch/arm/kernel/irq.c	Wed Jan  8 20:04:31 2003
+++ b/arch/arm/kernel/irq.c	Wed Jan  8 20:04:31 2003
@@ -129,6 +129,31 @@
 	spin_unlock_irqrestore(&irq_controller_lock, flags);
 }
 
+/*
+ * Enable wake on selected irq
+ */
+void enable_irq_wake(unsigned int irq)
+{
+	struct irqdesc *desc = irq_desc + irq;
+	unsigned long flags;
+
+	spin_lock_irqsave(&irq_controller_lock, flags);
+	if (desc->chip->wake)
+		desc->chip->wake(irq, 1);
+	spin_unlock_irqrestore(&irq_controller_lock, flags);
+}
+
+void disable_irq_wake(unsigned int irq)
+{
+	struct irqdesc *desc = irq_desc + irq;
+	unsigned long flags;
+
+	spin_lock_irqsave(&irq_controller_lock, flags);
+	if (desc->chip->wake)
+		desc->chip->wake(irq, 0);
+	spin_unlock_irqrestore(&irq_controller_lock, flags);
+}
+
 int show_interrupts(struct seq_file *p, void *v)
 {
 	int i;
diff -Nru a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
--- a/arch/arm/kernel/module.c	Wed Jan  8 20:04:32 2003
+++ b/arch/arm/kernel/module.c	Wed Jan  8 20:04:32 2003
@@ -67,9 +67,9 @@
 	vfree(region);
 }
 
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod)
 {
 	return 0;
diff -Nru a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
--- a/arch/arm/kernel/signal.c	Wed Jan  8 20:04:32 2003
+++ b/arch/arm/kernel/signal.c	Wed Jan  8 20:04:32 2003
@@ -603,7 +603,7 @@
 			case SIGQUIT: case SIGILL: case SIGTRAP:
 			case SIGABRT: case SIGFPE: case SIGSEGV:
 			case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
-				if (do_coredump(signr, regs))
+				if (do_coredump(signr, exit_code, regs))
 					exit_code |= 0x80;
 				/* FALLTHRU */
 
@@ -615,7 +615,11 @@
 
 		/* Are we from a system call? */
 		if (syscall) {
+			/* If so, check system call restarting.. */
 			switch (regs->ARM_r0) {
+			case -ERESTART_RESTARTBLOCK:
+				current_thread_info()->restart_block.fn =
+					do_no_restart_syscall;
 			case -ERESTARTNOHAND:
 				regs->ARM_r0 = -EINTR;
 				break;
@@ -638,12 +642,35 @@
 		return 1;
 	}
 
-	if (syscall &&
-	    (regs->ARM_r0 == -ERESTARTNOHAND ||
-	     regs->ARM_r0 == -ERESTARTSYS ||
-	     regs->ARM_r0 == -ERESTARTNOINTR)) {
-		regs->ARM_r0 = regs->ARM_ORIG_r0;
-		regs->ARM_pc -= 4;
+	/*
+	 * No signal to deliver to the process - restart the syscall.
+	 */
+	if (syscall) {
+		if (regs->ARM_r0 == -ERESTART_RESTARTBLOCK) {
+			if (thumb_mode(regs)) {
+				regs->ARM_r7 = __NR_restart_syscall;
+				regs->ARM_pc -= 2;
+			} else {
+				u32 *usp;
+
+				regs->ARM_sp -= 12;
+				usp = (u32 *)regs->ARM_sp;
+
+				put_user(regs->ARM_pc, &usp[0]);
+				/* swi __NR_restart_syscall */
+				put_user(0xef000000 | __NR_restart_syscall, &usp[1]);
+				/* ldr	pc, [sp], #12 */
+				put_user(0xe49df00c, &usp[2]);
+
+				regs->ARM_pc = regs->ARM_sp + 4;
+			}
+		}
+		if (regs->ARM_r0 == -ERESTARTNOHAND ||
+		    regs->ARM_r0 == -ERESTARTSYS ||
+		    regs->ARM_r0 == -ERESTARTNOINTR) {
+			regs->ARM_r0 = regs->ARM_ORIG_r0;
+			regs->ARM_pc -= 4;
+		}
 	}
 	if (single_stepping)
 		ptrace_set_bpt(current);
diff -Nru a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c
--- a/arch/arm/mach-integrator/cpu.c	Wed Jan  8 20:04:44 2003
+++ b/arch/arm/mach-integrator/cpu.c	Wed Jan  8 20:04:44 2003
@@ -148,9 +148,11 @@
 static struct cpufreq_policy integrator_policy = {
 	.cpu		= 0,
 	.policy		= CPUFREQ_POLICY_POWERSAVE,
-	.cpuinfo.max_cpu_freq	= 160000,
-	.cpuinfo.min_cpu_freq   = 12000,
-	.cpuinfo.transition_latency  = CPUFREQ_ETERNAL,
+	.cpuinfo	= {
+		.max_cpu_freq		= 160000,
+		.min_cpu_freq		= 12000,
+		.transition_latency	= CPUFREQ_ETERNAL,
+	},
 };
 
 static struct cpufreq_driver integrator_driver = {
diff -Nru a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile
--- a/arch/arm/mach-sa1100/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/arm/mach-sa1100/Makefile	Wed Jan  8 20:04:45 2003
@@ -21,8 +21,7 @@
 endif
 
 # Next, the SA1111 stuff.
-obj-$(CONFIG_SA1111)			+= sa1111.o
-obj-$(CONFIG_USB_OHCI_HCD)		+= sa1111-pcibuf.o pcipool.o
+obj-$(CONFIG_SA1111)			+= sa1111.o sa1111-pcibuf.o pcipool.o
 
 # Specific board support
 obj-$(CONFIG_SA1100_ADSBITSY)		+= adsbitsy.o
diff -Nru a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c
--- a/arch/arm/mach-sa1100/cpu-sa1100.c	Wed Jan  8 20:04:43 2003
+++ b/arch/arm/mach-sa1100/cpu-sa1100.c	Wed Jan  8 20:04:43 2003
@@ -203,9 +203,11 @@
 static struct cpufreq_policy sa1100_policy = {
 	.cpu		= 0,
 	.policy		= CPUFREQ_POLICY_POWERSAVE,
-	.cpuinfo.max_freq	= 287000,
-	.cpuinfo.min_freq	= 59000,
-	.cpuinfo.transition_latency	= CPUFREQ_ETERNAL,
+	.cpuinfo	= {
+		.max_freq		= 287000,
+		.min_freq		= 59000,
+		.transition_latency	= CPUFREQ_ETERNAL,
+	},
 };
 
 static struct cpufreq_driver sa1100_driver = {
diff -Nru a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
--- a/arch/arm/mach-sa1100/cpu-sa1110.c	Wed Jan  8 20:04:32 2003
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c	Wed Jan  8 20:04:32 2003
@@ -298,9 +298,11 @@
 static struct cpufreq_policy sa1110_policy = {
 	.cpu		= 0,
 	.policy		= CPUFREQ_POLICY_POWERSAVE,
-	.cpuinfo.max_freq	= 287000,
-	.cpuinfo.min_freq	= 59000,
-	.cpuinfo.transition_latency	= CPUFREQ_ETERNAL,
+	.cpuinfo	= {
+		.max_freq		= 287000,
+		.min_freq		= 59000,
+		.transition_latency	= CPUFREQ_ETERNAL,
+	},
 };
 
 static struct cpufreq_driver sa1110_driver = {
diff -Nru a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
--- a/arch/arm/mach-sa1100/irq.c	Wed Jan  8 20:04:45 2003
+++ b/arch/arm/mach-sa1100/irq.c	Wed Jan  8 20:04:45 2003
@@ -92,12 +92,22 @@
 	ICMR |= 1 << irq;
 }
 
+static int sa1100_low_gpio_wake(unsigned int irq, unsigned int on)
+{
+	if (on)
+		PWER |= 1 << irq;
+	else
+		PWER &= ~(1 << irq);
+	return 0;
+}
+
 static struct irqchip sa1100_low_gpio_chip = {
 	.ack		= sa1100_low_gpio_ack,
 	.mask		= sa1100_low_gpio_mask,
 	.unmask		= sa1100_low_gpio_unmask,
 	.rerun		= sa1100_manual_rerun,
 	.type		= sa1100_gpio_type,
+	.wake		= sa1100_low_gpio_wake,
 };
 
 /*
@@ -166,12 +176,22 @@
 	GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask;
 }
 
+static int sa1100_high_gpio_wake(unsigned int irq, unsigned int on)
+{
+	if (on)
+		PWER |= GPIO11_27_MASK(irq);
+	else
+		PWER &= ~GPIO11_27_MASK(irq);
+	return 0;
+}
+
 static struct irqchip sa1100_high_gpio_chip = {
 	.ack		= sa1100_high_gpio_ack,
 	.mask		= sa1100_high_gpio_mask,
 	.unmask		= sa1100_high_gpio_unmask,
 	.rerun		= sa1100_manual_rerun,
 	.type		= sa1100_gpio_type,
+	.wake		= sa1100_high_gpio_wake,
 };
 
 /*
@@ -252,5 +272,5 @@
 	 * We generally don't want the LCD IRQ being
 	 * enabled as soon as we request it.
 	 */
-	set_irq_flags(IRQ_LCD, IRQF_VALID | IRQF_NOAUTOEN);
+	set_irq_flags(IRQ_LCD, IRQF_VALID/* | IRQF_NOAUTOEN*/);
 }
diff -Nru a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
--- a/arch/arm/mach-sa1100/jornada720.c	Wed Jan  8 20:04:45 2003
+++ b/arch/arm/mach-sa1100/jornada720.c	Wed Jan  8 20:04:45 2003
@@ -6,9 +6,13 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
+#include <linux/device.h>
 #include <linux/ioport.h>
 
 #include <asm/hardware.h>
+#include <asm/hardware/sa1111.h>
+#include <asm/irq.h>
+#include <asm/mach-types.h>
 #include <asm/setup.h>
 
 #include <asm/mach/arch.h>
@@ -19,33 +23,29 @@
 
 
 #define JORTUCR_VAL	0x20000400
-#define JORSKCR_INIT	0x00002081	/* Turn off VCO to enable PLL, set Ready En and enable nOE assertion from DC */
-#define JORSKCR_RCLK	0x00002083	/* Add turning on RCLK to above */
-#define JORSKCR_VAL	0x0000001B	/* sets the 1101 control register to on */
 
 static int __init jornada720_init(void)
 {
-	GPDR |= GPIO_GPIO20;
-	TUCR = JORTUCR_VAL;	/* set the oscillator out to the SA-1101 */
+	int ret = -ENODEV;
 
-	GPSR = GPIO_GPIO20;
-	udelay(1);
-	GPCR = GPIO_GPIO20;
-	udelay(1);
-	GPSR = GPIO_GPIO20;
-	udelay(20);
-	SKCR = JORSKCR_INIT;	/* Turn on the PLL, enable Ready and enable nOE assertion from DC */
-	mdelay(100);
-
-	SBI_SKCR = JORSKCR_RCLK;/* turn on the RCLOCK */
-	SBI_SMCR = 0x35;	/* initialize the SMC (debug SA-1111 reset */
-	PCCR = 0;		/* initialize the S2MC (debug SA-1111 reset) */
-
-	/* LDD4 is speaker, LDD3 is microphone */
-	PPSR &= ~(PPC_LDD3 | PPC_LDD4);
-	PPDR |= PPC_LDD3 | PPC_LDD4;
-
-	return sa1111_init(0x40000000, IRQ_GPIO1);
+	if (machine_is_jornada720()) {
+		GPDR |= GPIO_GPIO20;
+		TUCR = JORTUCR_VAL;	/* set the oscillator out to the SA-1101 */
+
+		GPSR = GPIO_GPIO20;
+		udelay(1);
+		GPCR = GPIO_GPIO20;
+		udelay(1);
+		GPSR = GPIO_GPIO20;
+		udelay(20);
+
+		/* LDD4 is speaker, LDD3 is microphone */
+		PPSR &= ~(PPC_LDD3 | PPC_LDD4);
+		PPDR |= PPC_LDD3 | PPC_LDD4;
+
+		ret = sa1111_init(0x40000000, IRQ_GPIO1);
+	}
+	return ret;
 }
 
 arch_initcall(jornada720_init);
diff -Nru a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
--- a/arch/arm/mach-sa1100/neponset.c	Wed Jan  8 20:04:44 2003
+++ b/arch/arm/mach-sa1100/neponset.c	Wed Jan  8 20:04:44 2003
@@ -88,6 +88,15 @@
 	set_irq_chained_handler(IRQ_GPIO25, neponset_irq_handler);
 
 	/*
+	 * We would set IRQ_GPIO25 to be a wake-up IRQ, but
+	 * unfortunately something on the Neponset activates
+	 * this IRQ on sleep (ethernet?)
+	 */
+#if 0
+	enable_irq_wake(IRQ_GPIO25);
+#endif
+
+	/*
 	 * Setup other Neponset IRQs.  SA1111 will be done by the
 	 * generic SA1111 code.
 	 */
@@ -191,7 +200,7 @@
 }
 
 static struct device_driver neponset_device_driver = {
-	.name		= "NEPONSET",
+	.name		= "neponset",
 	.bus		= &system_bus_type,
 	.suspend	= neponset_suspend,
 	.resume		= neponset_resume,
diff -Nru a/arch/arm/mach-sa1100/pcipool.c b/arch/arm/mach-sa1100/pcipool.c
--- a/arch/arm/mach-sa1100/pcipool.c	Wed Jan  8 20:04:44 2003
+++ b/arch/arm/mach-sa1100/pcipool.c	Wed Jan  8 20:04:44 2003
@@ -56,7 +56,7 @@
 	if (pdev == 0)
 		return "[0]";
 
-	else if (dev_is_sa1111(pdev))
+	else if (pcidev_is_sa1111(pdev))
 		return "[SA-1111]";
 	else
 		return pdev->slot_name;
diff -Nru a/arch/arm/mach-sa1100/sa1111-pcibuf.c b/arch/arm/mach-sa1100/sa1111-pcibuf.c
--- a/arch/arm/mach-sa1100/sa1111-pcibuf.c	Wed Jan  8 20:04:32 2003
+++ b/arch/arm/mach-sa1100/sa1111-pcibuf.c	Wed Jan  8 20:04:32 2003
@@ -124,7 +124,7 @@
 
 /* allocate a 'safe' buffer and keep track of it */
 static struct safe_buffer *
-alloc_safe_buffer(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
+alloc_safe_buffer(void *ptr, size_t size, int direction)
 {
 	struct safe_buffer *buf;
 	struct pci_pool *pool;
@@ -254,7 +254,7 @@
 #endif
 
 static dma_addr_t
-map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
+map_single(void *ptr, size_t size, int direction)
 {
 	dma_addr_t dma_addr;
 
@@ -267,7 +267,7 @@
 
 		DO_STATS ( bounce_count++ ) ;
 
-		buf = alloc_safe_buffer(hwdev, ptr, size, direction);
+		buf = alloc_safe_buffer(ptr, size, direction);
 		if (buf == 0) {
 			printk(KERN_ERR
 			       "%s: unable to map unsafe buffer %p!\n",
@@ -302,8 +302,7 @@
 }
 
 static void
-unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
-	     size_t size, int direction)
+unmap_single(dma_addr_t dma_addr, size_t size, int direction)
 {
 	struct safe_buffer *buf;
 
@@ -332,8 +331,7 @@
 }
 
 static void
-sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
-		       size_t size, int direction)
+sync_single(dma_addr_t dma_addr, size_t size, int direction)
 {
 	struct safe_buffer *buf;
 
@@ -381,20 +379,19 @@
  * (basically move the buffer from an unsafe area to a safe one)
  */
 dma_addr_t
-sa1111_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
+sa1111_map_single(void *ptr, size_t size, int direction)
 {
 	unsigned long flags;
 	dma_addr_t dma_addr;
 
-	DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
-	       __func__, hwdev, ptr, size, direction);
+	DPRINTK("%s(ptr=%p,size=%d,dir=%x)\n",
+	       __func__, ptr, size, direction);
 
-	BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
 	BUG_ON(direction == PCI_DMA_NONE);
 
 	local_irq_save(flags);
 
-	dma_addr = map_single(hwdev, ptr, size, direction);
+	dma_addr = map_single(ptr, size, direction);
 
 	local_irq_restore(flags);
 
@@ -409,35 +406,31 @@
  */
 
 void
-sa1111_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
-		    size_t size, int direction)
+sa1111_unmap_single(dma_addr_t dma_addr, size_t size, int direction)
 {
 	unsigned long flags;
 
-	DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
-		__func__, hwdev, (void *) dma_addr, size, direction);
+	DPRINTK("%s(ptr=%p,size=%d,dir=%x)\n",
+		__func__, (void *) dma_addr, size, direction);
 
-	BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
 	BUG_ON(direction == PCI_DMA_NONE);
 
 	local_irq_save(flags);
 
-	unmap_single(hwdev, dma_addr, size, direction);
+	unmap_single(dma_addr, size, direction);
 
 	local_irq_restore(flags);
 }
 
 int
-sa1111_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
-	      int nents, int direction)
+sa1111_map_sg(struct scatterlist *sg, int nents, int direction)
 {
 	unsigned long flags;
 	int i;
 
-	DPRINTK("%s(hwdev=%p,sg=%p,nents=%d,dir=%x)\n",
-		__func__, hwdev, sg, nents, direction);
+	DPRINTK("%s(sg=%p,nents=%d,dir=%x)\n",
+		__func__, sg, nents, direction);
 
-	BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
 	BUG_ON(direction == PCI_DMA_NONE);
 
 	local_irq_save(flags);
@@ -449,7 +442,7 @@
 		void *ptr = page_address(page) + offset;
 
 		sg->dma_address =
-			map_single(hwdev, ptr, length, direction);
+			map_single(ptr, length, direction);
 	}
 
 	local_irq_restore(flags);
@@ -458,16 +451,14 @@
 }
 
 void
-sa1111_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
-	     int direction)
+sa1111_unmap_sg(struct scatterlist *sg, int nents, int direction)
 {
 	unsigned long flags;
 	int i;
 
-	DPRINTK("%s(hwdev=%p,sg=%p,nents=%d,dir=%x)\n",
-		__func__, hwdev, sg, nents, direction);
+	DPRINTK("%s(sg=%p,nents=%d,dir=%x)\n",
+		__func__, sg, nents, direction);
 
-	BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
 	BUG_ON(direction == PCI_DMA_NONE);
 
 	local_irq_save(flags);
@@ -476,41 +467,36 @@
 		dma_addr_t dma_addr = sg->dma_address;
 		unsigned int length = sg->length;
 
-		unmap_single(hwdev, dma_addr, length, direction);
+		unmap_single(dma_addr, length, direction);
 	}
 
 	local_irq_restore(flags);
 }
 
 void
-sa1111_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
-		       size_t size, int direction)
+sa1111_dma_sync_single(dma_addr_t dma_addr, size_t size, int direction)
 {
 	unsigned long flags;
 
-	DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
-		__func__, hwdev, (void *) dma_addr, size, direction);
-
-	BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
+	DPRINTK("%s(ptr=%p,size=%d,dir=%x)\n",
+		__func__, (void *) dma_addr, size, direction);
 
 	local_irq_save(flags);
 
-	sync_single(hwdev, dma_addr, size, direction);
+	sync_single(dma_addr, size, direction);
 
 	local_irq_restore(flags);
 }
 
 void
-sa1111_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg,
-		   int nents, int direction)
+sa1111_dma_sync_sg(struct scatterlist *sg, int nents, int direction)
 {
 	unsigned long flags;
 	int i;
 
-	DPRINTK("%s(hwdev=%p,sg=%p,nents=%d,dir=%x)\n",
-		__func__, hwdev, sg, nents, direction);
+	DPRINTK("%s(sg=%p,nents=%d,dir=%x)\n",
+		__func__, sg, nents, direction);
 
-	BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
 	BUG_ON(direction == PCI_DMA_NONE);
 
 	local_irq_save(flags);
@@ -519,7 +505,7 @@
 		dma_addr_t dma_addr = sg->dma_address;
 		unsigned int length = sg->length;
 
-		sync_single(hwdev, dma_addr, length, direction);
+		sync_single(dma_addr, length, direction);
 	}
 
 	local_irq_restore(flags);
diff -Nru a/arch/arm/mach-sa1100/sa1111.c b/arch/arm/mach-sa1100/sa1111.c
--- a/arch/arm/mach-sa1100/sa1111.c	Wed Jan  8 20:04:45 2003
+++ b/arch/arm/mach-sa1100/sa1111.c	Wed Jan  8 20:04:45 2003
@@ -249,6 +249,19 @@
 		INTPOL0 &= ~mask;
 	else
 		INTPOL0 |= mask;
+	WAKE_POL0 = INTPOL0;
+
+	return 0;
+}
+
+static int sa1111_wake_lowirq(unsigned int irq, unsigned int on)
+{
+	unsigned int mask = SA1111_IRQMASK_LO(irq);
+
+	if (on)
+		WAKE_EN0 |= mask;
+	else
+		WAKE_EN0 &= ~mask;
 
 	return 0;
 }
@@ -259,6 +272,7 @@
 	.unmask		= sa1111_unmask_lowirq,
 	.rerun		= sa1111_rerun_lowirq,
 	.type		= sa1111_type_lowirq,
+	.wake		= sa1111_wake_lowirq,
 };
 
 static void sa1111_mask_highirq(unsigned int irq)
@@ -309,6 +323,19 @@
 		INTPOL1 &= ~mask;
 	else
 		INTPOL1 |= mask;
+	WAKE_POL1 = INTPOL1;
+
+	return 0;
+}
+
+static int sa1111_wake_highirq(unsigned int irq, unsigned int on)
+{
+	unsigned int mask = SA1111_IRQMASK_HI(irq);
+
+	if (on)
+		WAKE_EN1 |= mask;
+	else
+		WAKE_EN1 &= ~mask;
 
 	return 0;
 }
@@ -319,6 +346,7 @@
 	.unmask		= sa1111_unmask_highirq,
 	.rerun		= sa1111_rerun_highirq,
 	.type		= sa1111_type_highirq,
+	.wake		= sa1111_wake_highirq,
 };
 
 static void __init sa1111_init_irq(struct sa1111_dev *sadev)
@@ -854,7 +882,7 @@
  *	PXA250/SA1110 machine classes.
  */
 static struct device_driver sa1111_device_driver = {
-	.name		= "SA1111",
+	.name		= "sa1111",
 	.bus		= &system_bus_type,
 	.probe		= sa1111_probe,
 	.remove		= sa1111_remove,
diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
--- a/arch/arm/mm/consistent.c	Wed Jan  8 20:04:44 2003
+++ b/arch/arm/mm/consistent.c	Wed Jan  8 20:04:44 2003
@@ -94,17 +94,6 @@
 	return NULL;
 }
 
-void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *handle)
-{
-	int gfp = GFP_KERNEL;
-
-	if (hwdev == NULL || dev_is_sa1111(hwdev) ||
-	    hwdev->dma_mask != 0xffffffff)
-		gfp |= GFP_DMA;
-
-	return consistent_alloc(gfp, size, handle);
-}
-
 /*
  * free a page as defined by the above mapping.  We expressly forbid
  * calling this from interrupt context.
diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
--- a/arch/arm/tools/mach-types	Wed Jan  8 20:04:44 2003
+++ b/arch/arm/tools/mach-types	Wed Jan  8 20:04:44 2003
@@ -6,7 +6,7 @@
 # To add an entry into this database, please see Documentation/arm/README,
 # or contact rmk@arm.linux.org.uk
 #
-# Last update: Sat Nov 16 15:57:50 2002
+# Last update: Mon Dec 23 18:49:04 2002
 #
 # machine_is_xxx	CONFIG_xxxx		MACH_TYPE_xxx		number
 #
@@ -154,7 +154,7 @@
 sbcamelot		SA1100_SBCAMELOT	SBCAMELOT		143
 kings			SA1100_KINGS		KINGS			144
 smdk2400		ARCH_SMDK2400		SMDK2400		145
-collie			ARCH_COLLIE		COLLIE			146
+collie			SA1100_COLLIE		COLLIE			146
 idr			ARCH_IDR		IDR			147
 badge4			SA1100_BADGE4		BADGE4			148
 webnet			ARCH_WEBNET		WEBNET			149
@@ -258,3 +258,18 @@
 stork_nest		ARCH_STORK_NEST		STORK_NEST		247
 stork_egg		ARCH_STORK_EGG		STORK_EGG		248
 wismo			SA1100_WISMO		WISMO			249
+ezlinx			ARCH_EZLINX		EZLINX			250
+at91rm9200		ARCH_AT91		AT91			251
+orion			ARCH_ORION		ORION			252
+neptune			ARCH_NEPTUNE		NEPTUNE			253
+hackkit			SA1100_HACKKIT		HACKKIT			254
+pxa_wins30		ARCH_PXA_WINS30		PXA_WINS30		255
+lavinna			SA1100_LAVINNA		LAVINNA			256
+pxa_uengine		ARCH_PXA_UENGINE	PXA_UENGINE		257
+innokom			ARCH_INNOKOM		INNOKOM			258
+bms			ARCH_BMS		BMS			259
+ixcdp1100		ARCH_IXCDP1100		IXCDP1100		260
+prpmc1100		ARCH_PRPMC1100		PRPMC1100		261
+at91rm9200dk		ARCH_AT91RM9200DK	AT91RM9200DK		262
+armstick		ARCH_ARMSTICK		ARMSTICK		263
+armonie			ARCH_ARMONIE		ARMONIE			264
diff -Nru a/arch/arm/vmlinux-armv.lds.in b/arch/arm/vmlinux-armv.lds.in
--- a/arch/arm/vmlinux-armv.lds.in	Wed Jan  8 20:04:43 2003
+++ b/arch/arm/vmlinux-armv.lds.in	Wed Jan  8 20:04:43 2003
@@ -26,6 +26,9 @@
 		__setup_start = .;
 			*(.init.setup)
 		__setup_end = .;
+		__start___param = .;
+			*(__param)
+		__stop___param = .;
 		__initcall_start = .;
 			*(.initcall1.init)
 			*(.initcall2.init)
diff -Nru a/arch/cris/Kconfig b/arch/cris/Kconfig
--- a/arch/cris/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/cris/Kconfig	Wed Jan  8 20:04:45 2003
@@ -603,47 +603,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
--- a/arch/i386/Kconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/Kconfig	Wed Jan  8 20:04:43 2003
@@ -303,11 +303,6 @@
 	depends on !M386
 	default y
 
-config X86_USE_STRING_486
-	bool
-	depends on MELAN || M586MMX || M586TSC || M586 || M486
-	default y
-
 config X86_ALIGNMENT_16
 	bool
 	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486
@@ -345,11 +340,11 @@
 
 config X86_PREFETCH
 	bool
-	depends on MPENTIUMIII || MP4
+	depends on MPENTIUMIII || MPENTIUM4
 	default y
 
 config X86_SSE2
-        bool
+	bool
 	depends on MK8 || MPENTIUM4
 	default y
 
@@ -456,11 +451,6 @@
 	  This is purely to save memory - each supported CPU adds
 	  approximately eight kilobytes to the kernel image.
 
-config CLUSTERED_APIC
-	bool
-	depends on X86_NUMAQ || X86_SUMMIT
-	default y
-
 # Common NUMA Features
 config NUMA
 	bool "Numa Memory Allocation Support"
@@ -1435,47 +1425,6 @@
 source "drivers/message/i2o/Kconfig"
 
 source "net/Kconfig"
-
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
 
 source "net/ax25/Kconfig"
 
diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
--- a/arch/i386/kernel/apm.c	Wed Jan  8 20:04:32 2003
+++ b/arch/i386/kernel/apm.c	Wed Jan  8 20:04:32 2003
@@ -331,12 +331,6 @@
 #define DEFAULT_BOUNCE_INTERVAL		(3 * HZ)
 
 /*
- * Save a segment register away
- */
-#define savesegment(seg, where) \
-		__asm__ __volatile__("movl %%" #seg ",%0" : "=m" (where))
-
-/*
  * Maximum number of events stored
  */
 #define APM_MAX_EVENTS		20
@@ -724,7 +718,7 @@
  *	same format.
  */
 
-static int __init apm_driver_version(u_short *val)
+static int apm_driver_version(u_short *val)
 {
 	u32	eax;
 
diff -Nru a/arch/i386/kernel/cpu/cpufreq/elanfreq.c b/arch/i386/kernel/cpu/cpufreq/elanfreq.c
--- a/arch/i386/kernel/cpu/cpufreq/elanfreq.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/kernel/cpu/cpufreq/elanfreq.c	Wed Jan  8 20:04:43 2003
@@ -31,8 +31,6 @@
 #define REG_CSCIR 0x22 		/* Chip Setup and Control Index Register    */
 #define REG_CSCDR 0x23		/* Chip Setup and Control Data  Register    */
 
-#define SAFE_FREQ 33000		/* every Elan CPU can run at 33 MHz         */
-
 static struct cpufreq_driver *elanfreq_driver;
 
 /* Module parameter */
@@ -184,7 +182,7 @@
 
 	cpufreq_verify_within_limits(policy, 1000, max_freq);
 
-	for (i=(sizeof(elan_multiplier)/sizeof(struct s_elan_multiplier) - 1); i>=0; i--)
+	for (i=7; i>=0; i--)
 		if ((elan_multiplier[i].clock >= policy->min) &&
 		    (elan_multiplier[i].clock <= policy->max))
 			number_states++;
@@ -192,57 +190,46 @@
 	if (number_states)
 		return 0;
 
-	for (i=(sizeof(elan_multiplier)/sizeof(struct s_elan_multiplier) - 1); i>=0; i--)
+	for (i=7; i>=0; i--)
 		if (elan_multiplier[i].clock < policy->max)
 			break;
 
 	policy->max = elan_multiplier[i+1].clock;
 
+	cpufreq_verify_within_limits(policy, 1000, max_freq);
+
 	return 0;
 }
 
 static int elanfreq_setpolicy (struct cpufreq_policy *policy)
 {
-	unsigned int    number_states = 0;
-	unsigned int    i, j=4;
+	unsigned int    i;
+	unsigned int    optimal = 8;
 
 	if (!elanfreq_driver)
 		return -EINVAL;
 
-	for (i=(sizeof(elan_multiplier)/sizeof(struct s_elan_multiplier) - 1); i>=0; i--)
-		if ((elan_multiplier[i].clock >= policy->min) &&
-		    (elan_multiplier[i].clock <= policy->max))
-		{
-			number_states++;
-			j = i;
+	for (i=0; i<8; i++) {
+		if ((elan_multiplier[i].clock > policy->max) ||
+		    (elan_multiplier[i].clock < policy->min))
+			continue;
+		switch(policy->policy) {
+		case CPUFREQ_POLICY_POWERSAVE:
+			if (optimal == 8)
+				optimal = i;
+			break;
+		case CPUFREQ_POLICY_PERFORMANCE:
+			optimal = i;
+			break;
+		default:
+			return -EINVAL;
 		}
-
-	if (number_states == 1) {
-		elanfreq_set_cpu_state(j);
-		return 0;
 	}
-
-	switch (policy->policy) {
-	case CPUFREQ_POLICY_POWERSAVE:
-		for (i=(sizeof(elan_multiplier)/sizeof(struct s_elan_multiplier) - 1); i>=0; i--)
-			if ((elan_multiplier[i].clock >= policy->min) &&
-			    (elan_multiplier[i].clock <= policy->max))
-				j = i;
-		break;
-	case CPUFREQ_POLICY_PERFORMANCE:
-		for (i=0; i<(sizeof(elan_multiplier)/sizeof(struct s_elan_multiplier) - 1); i++)
-			if ((elan_multiplier[i].clock >= policy->min) &&
-			    (elan_multiplier[i].clock <= policy->max))
-				j = i;
-		break;
-	default:
+	if ((optimal == 8) || (elan_multiplier[optimal].clock > max_freq))
 		return -EINVAL;
-	}
 
-	if (elan_multiplier[j].clock > max_freq)
-		return -EINVAL;
+	elanfreq_set_cpu_state(optimal);
 
-	elanfreq_set_cpu_state(j);
 	return 0;
 }
 
@@ -307,7 +294,7 @@
 	driver->policy[0].max    = max_freq;
 	driver->policy[0].policy = CPUFREQ_POLICY_PERFORMANCE;
 	driver->policy[0].cpuinfo.max_freq = max_freq;
-	driver->policy[0].cpuinfo.min_freq = min_freq;
+	driver->policy[0].cpuinfo.min_freq = 1000;
 	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
 	elanfreq_driver = driver;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
--- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	Wed Jan  8 20:04:45 2003
+++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	Wed Jan  8 20:04:45 2003
@@ -82,12 +82,17 @@
 
 	/* get current state */
 	rdmsr(MSR_IA32_THERM_CONTROL, l, h);
-	l = l >> 1;
-	l &= 0x7;
-
+	if (l & 0x10) {
+		l = l >> 1;
+		l &= 0x7;
+	} else
+		l = DC_DISABLE;
+	
 	if (l == newstate) {
 		set_cpus_allowed(current, cpus_allowed);
 		return 0;
+	} else if (l == DC_RESV) {
+		printk(KERN_ERR PFX "BIG FAT WARNING: currently in invalid setting\n");
 	}
 
 	/* notifiers */
@@ -141,13 +146,18 @@
 	unsigned int    i;
 	unsigned int    newstate = 0;
 	unsigned int    number_states = 0;
+	unsigned int    minstate = 1;
 
-	if (!cpufreq_p4_driver || !stock_freq || !policy)
+	if (!cpufreq_p4_driver || !stock_freq || 
+	    !policy || !cpu_online(policy->cpu))
 		return -EINVAL;
 
+	if (has_N44_O17_errata)
+		minstate = 3;
+
 	if (policy->policy == CPUFREQ_POLICY_POWERSAVE)
 	{
-		for (i=8; i>0; i--)
+		for (i=8; i>=minstate; i--)
 			if ((policy->min <= ((stock_freq / 8) * i)) &&
 			    (policy->max >= ((stock_freq / 8) * i))) 
 			{
@@ -155,7 +165,7 @@
 				number_states++;
 			}
 	} else {
-		for (i=1; i<=8; i++)
+		for (i=minstate; i<=8; i++)
 			if ((policy->min <= ((stock_freq / 8) * i)) &&
 			    (policy->max >= ((stock_freq / 8) * i))) 
 			{
@@ -164,25 +174,8 @@
 			}
 	}
 
-	/* if (number_states == 1) */
-	{
-		if (policy->cpu == CPUFREQ_ALL_CPUS) {
-			for (i=0; i<NR_CPUS; i++)
-				if (cpu_online(i))
-					cpufreq_p4_setdc(i, newstate);
-		} else {
-			cpufreq_p4_setdc(policy->cpu, newstate);
-		}
-	}
-	/* else {
-		if (policy->policy == CPUFREQ_POLICY_POWERSAVE) {
-			min_state = newstate;
-			max_state = newstate + (number_states - 1);
-		} else {
-			max_state = newstate;
-			min_state = newstate - (number_states - 1);
-		}
-	} */
+	cpufreq_p4_setdc(policy->cpu, newstate);
+
 	return 0;
 }
 
@@ -190,17 +183,21 @@
 static int cpufreq_p4_verify(struct cpufreq_policy *policy)
 {
 	unsigned int    number_states = 0;
-	unsigned int    i;
+	unsigned int    i = 1;
 
-	if (!cpufreq_p4_driver || !stock_freq || !policy)
+	if (!cpufreq_p4_driver || !stock_freq || 
+	    !policy || !cpu_online(policy->cpu))
 		return -EINVAL;
 
-	if (!cpu_online(policy->cpu))
-		policy->cpu = CPUFREQ_ALL_CPUS;
-	cpufreq_verify_within_limits(policy, (stock_freq / 8), stock_freq);
+	cpufreq_verify_within_limits(policy, 
+				     policy->cpuinfo.min_freq, 
+				     policy->cpuinfo.max_freq);
 
-	/* is there at least one state within limit? */
-	for (i=1; i<=8; i++)
+	if (has_N44_O17_errata)
+		i = 3;
+
+	/* is there at least one state within the limit? */
+	for (; i<=8; i++)
 		if ((policy->min <= ((stock_freq / 8) * i)) &&
 		    (policy->max >= ((stock_freq / 8) * i)))
 			number_states++;
@@ -209,11 +206,14 @@
 		return 0;
 
 	policy->max = (stock_freq / 8) * (((unsigned int) ((policy->max * 8) / stock_freq)) + 1);
+	cpufreq_verify_within_limits(policy, 
+				     policy->cpuinfo.min_freq, 
+				     policy->cpuinfo.max_freq);
 	return 0;
 }
 
 
-int __init cpufreq_p4_init(void)
+static int __init cpufreq_p4_init(void)
 {	
 	struct cpuinfo_x86 *c = cpu_data;
 	int cpuid;
@@ -245,6 +245,16 @@
 	}
 
 	printk(KERN_INFO PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n");
+
+	if (!stock_freq) {
+		if (cpu_khz)
+			stock_freq = cpu_khz;
+		else {
+			printk(KERN_INFO PFX "unknown core frequency - please use module parameter 'stock_freq'\n");
+			return -EINVAL;
+		}
+	}
+
 	driver = kmalloc(sizeof(struct cpufreq_driver) +
 			 NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL);
 	if (!driver)
@@ -252,9 +262,6 @@
 
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
-	if (!stock_freq)
-		stock_freq = cpu_khz;
-
 #ifdef CONFIG_CPU_FREQ_24_API
 	for (i=0;i<NR_CPUS;i++) {
 		driver->cpu_cur_freq[i] = stock_freq;
@@ -290,15 +297,16 @@
 }
 
 
-void __exit cpufreq_p4_exit(void)
+static void __exit cpufreq_p4_exit(void)
 {
-	u32 l, h;
+	unsigned int i;
 
 	if (cpufreq_p4_driver) {
+		for (i=0; i<NR_CPUS; i++) {
+			if (cpu_online(i)) 
+				cpufreq_p4_setdc(i, DC_DISABLE);
+		}
 		cpufreq_unregister();
-		/* return back to a non modulated state */
-		rdmsr(MSR_IA32_THERM_CONTROL, l, h);
-		wrmsr(MSR_IA32_THERM_CONTROL, l & ~(1<<4), h);
 		kfree(cpufreq_p4_driver);
 	}
 }
diff -Nru a/arch/i386/kernel/edd.c b/arch/i386/kernel/edd.c
--- a/arch/i386/kernel/edd.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/kernel/edd.c	Wed Jan  8 20:04:43 2003
@@ -419,8 +419,8 @@
 		return 0;
 	}
 
-	if (info->params.info_flags & EDD_INFO_DMA_BOUNDRY_ERROR_TRANSPARENT)
-		p += snprintf(p, left, "DMA boundry error transparent\n");
+	if (info->params.info_flags & EDD_INFO_DMA_BOUNDARY_ERROR_TRANSPARENT)
+		p += snprintf(p, left, "DMA boundary error transparent\n");
 	if (info->params.info_flags & EDD_INFO_GEOMETRY_VALID)
 		p += snprintf(p, left, "geometry valid\n");
 	if (info->params.info_flags & EDD_INFO_REMOVABLE)
@@ -597,12 +597,14 @@
 	NULL,
 };
 
-static struct subsystem edd_subsys = {
-	.kobj	= { .name = "edd" },
+static struct kobj_type ktype_edd = {
 	.sysfs_ops	= &edd_attr_ops,
 	.default_attrs	= def_attrs,
 };
 
+static decl_subsys(edd,&ktype_edd);
+
+
 
 /**
  * edd_dev_is_type() - is this EDD device a 'type' device?
@@ -793,7 +795,7 @@
 	edd_dev_set_info(edev, &edd[i]);
 	snprintf(edev->kobj.name, EDD_DEVICE_NAME_SIZE, "int13_dev%02x",
 		 edd[i].device);
-	edev->kobj.subsys = &edd_subsys;
+	kobj_set_kset_s(edev,edd_subsys);
 	error = kobject_register(&edev->kobj);
 	if (!error)
 		populate_dir(edev);
diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
--- a/arch/i386/kernel/entry.S	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/kernel/entry.S	Wed Jan  8 20:04:43 2003
@@ -253,11 +253,11 @@
  * Careful about security.
  */
 	cmpl $__PAGE_OFFSET-3,%ebp
-	jae syscall_badsys
+	jae syscall_fault
 1:	movl (%ebp),%ebp
 .section __ex_table,"a"
 	.align 4
-	.long 1b,syscall_badsys
+	.long 1b,syscall_fault
 .previous
 
 	pushl %eax
@@ -364,6 +364,14 @@
 	movl %esp, %eax
 	movl $1, %edx
 	call do_syscall_trace
+	jmp resume_userspace
+
+	ALIGN
+syscall_fault:
+	pushl %eax			# save orig_eax
+	SAVE_ALL
+	GET_THREAD_INFO(%ebx)
+	movl $-EFAULT,EAX(%esp)
 	jmp resume_userspace
 
 	ALIGN
diff -Nru a/arch/i386/kernel/ioport.c b/arch/i386/kernel/ioport.c
--- a/arch/i386/kernel/ioport.c	Wed Jan  8 20:04:44 2003
+++ b/arch/i386/kernel/ioport.c	Wed Jan  8 20:04:44 2003
@@ -124,6 +124,6 @@
 	}
 	regs->eflags = (regs->eflags & 0xffffcfff) | (level << 12);
 	/* Make sure we return the long way (not sysenter) */
-	set_thread_flag(TIF_SIGPENDING);
+	set_thread_flag(TIF_IRET);
 	return 0;
 }
diff -Nru a/arch/i386/kernel/module.c b/arch/i386/kernel/module.c
--- a/arch/i386/kernel/module.c	Wed Jan  8 20:04:44 2003
+++ b/arch/i386/kernel/module.c	Wed Jan  8 20:04:44 2003
@@ -45,9 +45,9 @@
 }
 
 /* We don't need anything special. */
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod)
 {
 	return 0;
diff -Nru a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c
--- a/arch/i386/kernel/pci-dma.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/kernel/pci-dma.c	Wed Jan  8 20:04:43 2003
@@ -19,7 +19,7 @@
 	void *ret;
 	int gfp = GFP_ATOMIC;
 
-	if (dev == NULL || ((u32)*dev->dma_mask != 0xffffffff))
+	if (dev == NULL || (*dev->dma_mask < 0xffffffff))
 		gfp |= GFP_DMA;
 	ret = (void *)__get_free_pages(gfp, get_order(size));
 
diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
--- a/arch/i386/kernel/process.c	Wed Jan  8 20:04:31 2003
+++ b/arch/i386/kernel/process.c	Wed Jan  8 20:04:31 2003
@@ -274,12 +274,6 @@
 	release_x86_irqs(dead_task);
 }
 
-/*
- * Save a segment.
- */
-#define savesegment(seg,value) \
-	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
-
 int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
 	unsigned long unused,
 	struct task_struct * p, struct pt_regs * regs)
@@ -561,7 +555,7 @@
 	if (error == 0) {
 		current->ptrace &= ~PT_DTRACE;
 		/* Make sure we don't return using sysenter.. */
-		set_thread_flag(TIF_SIGPENDING);
+		set_thread_flag(TIF_IRET);
 	}
 	putname(filename);
 out:
diff -Nru a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
--- a/arch/i386/kernel/signal.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/kernel/signal.c	Wed Jan  8 20:04:43 2003
@@ -378,17 +378,19 @@
 	if (err)
 		goto give_sigsegv;
 
-	/* Set up to return from userspace.  If provided, use a stub
-	   already in userspace.  */
-	if (ka->sa.sa_flags & SA_RESTORER) {
-		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
-	} else {
-		err |= __put_user(frame->retcode, &frame->pretcode);
-		/* This is popl %eax ; movl $,%eax ; int $0x80 */
-		err |= __put_user(0xb858, (short *)(frame->retcode+0));
-		err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
-		err |= __put_user(0x80cd, (short *)(frame->retcode+6));
-	}
+	/* Set up to return from userspace.  */
+	err |= __put_user(fix_to_virt(FIX_VSYSCALL) + 32, &frame->pretcode);
+	 
+	/*
+	 * This is popl %eax ; movl $,%eax ; int $0x80
+	 *
+	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
+	 * reasons and because gdb uses it as a signature to notice
+	 * signal handler stack frames.
+	 */
+	err |= __put_user(0xb858, (short *)(frame->retcode+0));
+	err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
+	err |= __put_user(0x80cd, (short *)(frame->retcode+6));
 
 	if (err)
 		goto give_sigsegv;
@@ -453,17 +455,19 @@
 	if (err)
 		goto give_sigsegv;
 
-	/* Set up to return from userspace.  If provided, use a stub
-	   already in userspace.  */
-	if (ka->sa.sa_flags & SA_RESTORER) {
-		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
-	} else {
-		err |= __put_user(frame->retcode, &frame->pretcode);
-		/* This is movl $,%eax ; int $0x80 */
-		err |= __put_user(0xb8, (char *)(frame->retcode+0));
-		err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
-		err |= __put_user(0x80cd, (short *)(frame->retcode+5));
-	}
+	/* Set up to return from userspace.  */
+	err |= __put_user(fix_to_virt(FIX_VSYSCALL) + 64, &frame->pretcode);
+	 
+	/*
+	 * This is movl $,%eax ; int $0x80
+	 *
+	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
+	 * reasons and because gdb uses it as a signature to notice
+	 * signal handler stack frames.
+	 */
+	err |= __put_user(0xb8, (char *)(frame->retcode+0));
+	err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
+	err |= __put_user(0x80cd, (short *)(frame->retcode+5));
 
 	if (err)
 		goto give_sigsegv;
@@ -617,4 +621,6 @@
 	/* deal with pending signal delivery */
 	if (thread_info_flags & _TIF_SIGPENDING)
 		do_signal(regs,oldset);
+	
+	clear_thread_flag(TIF_IRET);
 }
diff -Nru a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
--- a/arch/i386/kernel/smp.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/kernel/smp.c	Wed Jan  8 20:04:43 2003
@@ -23,7 +23,6 @@
 #include <asm/mtrr.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
-#include <asm/smpboot.h>
 #include <mach_ipi.h>
 
 /*
diff -Nru a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
--- a/arch/i386/kernel/smpboot.c	Wed Jan  8 20:04:44 2003
+++ b/arch/i386/kernel/smpboot.c	Wed Jan  8 20:04:44 2003
@@ -47,12 +47,12 @@
 #include <linux/mc146818rtc.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
-#include <asm/smpboot.h>
 #include <asm/desc.h>
 #include <asm/arch_hooks.h>
 #include "smpboot_hooks.h"
 
 #include <mach_apic.h>
+#include <mach_wakecpu.h>
 
 /* Set if we find a B stepping CPU */
 static int __initdata smp_b_stepping;
@@ -348,8 +348,7 @@
 	 * our local APIC.  We have to wait for the IPI or we'll
 	 * lock up on an APIC access.
 	 */
-	if (!clustered_apic_mode) 
-		while (!atomic_read(&init_deasserted));
+	wait_for_init_deassert(&init_deasserted);
 
 	/*
 	 * (This works even if the APIC is not enabled.)
@@ -398,13 +397,9 @@
 	 */
 
 	Dprintk("CALLIN, before setup_local_APIC().\n");
-	/*
-	 * Because we use NMIs rather than the INIT-STARTUP sequence to
-	 * bootstrap the CPUs, the APIC may be in a weird state. Kick it.
-	 */
-	if (clustered_apic_mode)
-		clear_local_APIC();
+	smp_callin_clear_local_apic();
 	setup_local_APIC();
+	map_cpu_to_logical_apicid();
 
 	local_irq_enable();
 
@@ -503,63 +498,58 @@
 	return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
 }
 
-/* which physical APIC ID maps to which logical CPU number */
-volatile int physical_apicid_2_cpu[MAX_APICID];
-/* which logical CPU number maps to which physical APIC ID */
-volatile int cpu_2_physical_apicid[NR_CPUS];
-
-/* which logical APIC ID maps to which logical CPU number */
-volatile int logical_apicid_2_cpu[MAX_APICID];
-/* which logical CPU number maps to which logical APIC ID */
-volatile int cpu_2_logical_apicid[NR_CPUS];
+#ifdef CONFIG_NUMA
+
+/* which logical CPUs are on which nodes */
+volatile unsigned long node_2_cpu_mask[MAX_NR_NODES] = 
+						{ [0 ... MAX_NR_NODES-1] = 0 };
+/* which node each logical CPU is on */
+volatile int cpu_2_node[NR_CPUS] = { [0 ... NR_CPUS-1] = 0 };
 
-static inline void init_cpu_to_apicid(void)
-/* Initialize all maps between cpu number and apicids */
+/* set up a mapping between cpu and node. */
+static inline void map_cpu_to_node(int cpu, int node)
 {
-	int apicid, cpu;
+	printk("Mapping cpu %d to node %d\n", cpu, node);
+	node_2_cpu_mask[node] |= (1 << cpu);
+	cpu_2_node[cpu] = node;
+}
 
-	for (apicid = 0; apicid < MAX_APICID; apicid++) {
-		physical_apicid_2_cpu[apicid] = -1;
-		logical_apicid_2_cpu[apicid] = -1;
-	}
-	for (cpu = 0; cpu < NR_CPUS; cpu++) {
-		cpu_2_physical_apicid[cpu] = -1;
-		cpu_2_logical_apicid[cpu] = -1;
-	}
+/* undo a mapping between cpu and node. */
+static inline void unmap_cpu_to_node(int cpu)
+{
+	int node;
+
+	printk("Unmapping cpu %d from all nodes\n", cpu);
+	for (node = 0; node < MAX_NR_NODES; node ++)
+		node_2_cpu_mask[node] &= ~(1 << cpu);
+	cpu_2_node[cpu] = -1;
 }
+#else /* !CONFIG_NUMA */
 
-static inline void map_cpu_to_boot_apicid(int cpu, int apicid)
-/* 
- * set up a mapping between cpu and apicid. Uses logical apicids for multiquad,
- * else physical apic ids
- */
+#define map_cpu_to_node(cpu, node)	({})
+#define unmap_cpu_to_node(cpu)	({})
+
+#endif /* CONFIG_NUMA */
+
+volatile u8 cpu_2_logical_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
+
+void map_cpu_to_logical_apicid(void)
 {
-	if (clustered_apic_mode) {
-		logical_apicid_2_cpu[apicid] = cpu;	
-		cpu_2_logical_apicid[cpu] = apicid;
-	} else {
-		physical_apicid_2_cpu[apicid] = cpu;	
-		cpu_2_physical_apicid[cpu] = apicid;
-	}
+	int cpu = smp_processor_id();
+	int apicid = logical_smp_processor_id();
+
+	cpu_2_logical_apicid[cpu] = apicid;
+	map_cpu_to_node(cpu, apicid_to_node(apicid));
 }
 
-static inline void unmap_cpu_to_boot_apicid(int cpu, int apicid)
-/* 
- * undo a mapping between cpu and apicid. Uses logical apicids for multiquad,
- * else physical apic ids
- */
+void unmap_cpu_to_logical_apicid(int cpu)
 {
-	if (clustered_apic_mode) {
-		logical_apicid_2_cpu[apicid] = -1;	
-		cpu_2_logical_apicid[cpu] = -1;
-	} else {
-		physical_apicid_2_cpu[apicid] = -1;	
-		cpu_2_physical_apicid[cpu] = -1;
-	}
+	cpu_2_logical_apicid[cpu] = BAD_APICID;
+	unmap_cpu_to_node(cpu);
 }
 
 #if APIC_DEBUG
-static inline void inquire_remote_apic(int apicid)
+static inline void __inquire_remote_apic(int apicid)
 {
 	int i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
 	char *names[] = { "ID", "VERSION", "SPIV" };
@@ -654,6 +644,15 @@
 	unsigned long send_status = 0, accept_status = 0;
 	int maxlvt, timeout, num_starts, j;
 
+	/*
+	 * Be paranoid about clearing APIC errors.
+	 */
+	if (APIC_INTEGRATED(apic_version[phys_apicid])) {
+		apic_read_around(APIC_SPIV);
+		apic_write(APIC_ESR, 0);
+		apic_read(APIC_ESR);
+	}
+
 	Dprintk("Asserting INIT.\n");
 
 	/*
@@ -775,17 +774,18 @@
 
 extern unsigned long cpu_initialized;
 
-static void __init do_boot_cpu (int apicid) 
+static int __init do_boot_cpu(int apicid)
 /*
  * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad
  * (ie clustered apic addressing mode), this is a LOGICAL apic ID.
+ * Returns zero if CPU booted OK, else error code from wakeup_secondary_cpu.
  */
 {
 	struct task_struct *idle;
-	unsigned long boot_error = 0;
+	unsigned long boot_error;
 	int timeout, cpu;
 	unsigned long start_eip;
-	unsigned short nmi_high, nmi_low;
+	unsigned short nmi_high = 0, nmi_low = 0;
 
 	cpu = ++cpucount;
 	/*
@@ -802,8 +802,6 @@
 	 */
 	init_idle(idle, cpu);
 
-	map_cpu_to_boot_apicid(cpu, apicid);
-
 	idle->thread.eip = (unsigned long) start_secondary;
 
 	unhash_process(idle);
@@ -813,7 +811,8 @@
 
 	/* So we see what's up   */
 	printk("Booting processor %d/%d eip %lx\n", cpu, apicid, start_eip);
-	stack_start.esp = (void *) (1024 + PAGE_SIZE + (char *)idle->thread_info);
+	/* Stack for startup_32 can be just as for start_secondary onwards */
+	stack_start.esp = (void *) idle->thread.esp;
 
 	/*
 	 * This grunge runs the startup process for
@@ -824,11 +823,7 @@
 
 	Dprintk("Setting warm reset code and vector.\n");
 
-	if (clustered_apic_mode) {
-		/* stash the current NMI vector, so we can put things back */
-		nmi_high = *((volatile unsigned short *) TRAMPOLINE_HIGH);
-		nmi_low = *((volatile unsigned short *) TRAMPOLINE_LOW);
-	} 
+	store_NMI_vector(&nmi_high, &nmi_low);
 
 	CMOS_WRITE(0xa, 0xf);
 	local_flush_tlb();
@@ -839,23 +834,9 @@
 	Dprintk("3.\n");
 
 	/*
-	 * Be paranoid about clearing APIC errors.
-	 */
-	if (!clustered_apic_mode && APIC_INTEGRATED(apic_version[apicid])) {
-		apic_read_around(APIC_SPIV);
-		apic_write(APIC_ESR, 0);
-		apic_read(APIC_ESR);
-	}
-
-	/*
-	 * Status is now clean
-	 */
-	boot_error = 0;
-
-	/*
 	 * Starting actual IPI sequence...
 	 */
-	wakeup_secondary_cpu(apicid, start_eip);
+	boot_error = wakeup_secondary_cpu(apicid, start_eip);
 
 	if (!boot_error) {
 		/*
@@ -882,35 +863,28 @@
 			Dprintk("CPU has booted.\n");
 		} else {
 			boot_error= 1;
-			if (*((volatile unsigned char *)phys_to_virt(8192))
+			if (*((volatile unsigned char *)trampoline_base)
 					== 0xA5)
 				/* trampoline started but...? */
 				printk("Stuck ??\n");
 			else
 				/* trampoline code not run */
 				printk("Not responding.\n");
-#if APIC_DEBUG
-			if (!clustered_apic_mode)
-				inquire_remote_apic(apicid);
-#endif
+			inquire_remote_apic(apicid);
 		}
 	}
 	if (boot_error) {
 		/* Try to put things back the way they were before ... */
-		unmap_cpu_to_boot_apicid(cpu, apicid);
+		unmap_cpu_to_logical_apicid(cpu);
 		clear_bit(cpu, &cpu_callout_map); /* was set here (do_boot_cpu()) */
 		clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */
 		cpucount--;
 	}
 
 	/* mark "stuck" area as not stuck */
-	*((volatile unsigned long *)phys_to_virt(8192)) = 0;
+	*((volatile unsigned long *)trampoline_base) = 0;
 
-	if(clustered_apic_mode) {
-		printk("Restoring NMI vector\n");
-		*((volatile unsigned short *) TRAMPOLINE_HIGH) = nmi_high;
-		*((volatile unsigned short *) TRAMPOLINE_LOW) = nmi_low;
-	}
+	return boot_error;
 }
 
 cycles_t cacheflush_time;
@@ -986,8 +960,6 @@
 		prof_multiplier[cpu] = 1;
 	}
 
-	init_cpu_to_apicid();
-
 	/*
 	 * Setup boot CPU information
 	 */
@@ -996,7 +968,6 @@
 	print_cpu_info(&cpu_data[0]);
 
 	boot_cpu_logical_apicid = logical_smp_processor_id();
-	map_cpu_to_boot_apicid(0, boot_cpu_apicid);
 
 	current_thread_info()->cpu = 0;
 	smp_tune_scheduling();
@@ -1020,10 +991,9 @@
 	 * CPU too, but we do it for the sake of robustness anyway.
 	 * Makes no sense to do this check in clustered apic mode, so skip it
 	 */
-	if (!clustered_apic_mode && 
-	    !test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map)) {
+	if (!check_phys_apicid_present(boot_cpu_physical_apicid)) {
 		printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
-							boot_cpu_physical_apicid);
+				boot_cpu_physical_apicid);
 		phys_cpu_present_map |= (1 << hard_smp_processor_id());
 	}
 
@@ -1054,6 +1024,7 @@
 
 	connect_bsp_APIC();
 	setup_local_APIC();
+	map_cpu_to_logical_apicid();
 
 	if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_physical_apicid)
 		BUG();
@@ -1082,13 +1053,7 @@
 		if (max_cpus <= cpucount+1)
 			continue;
 
-		do_boot_cpu(apicid);
-
-		/*
-		 * Make sure we unmap all failed CPUs
-		 */
-		if ((boot_apicid_to_cpu(apicid) == -1) &&
-				(phys_cpu_present_map & (1 << bit)))
+		if (do_boot_cpu(apicid))
 			printk("CPU #%d not responding - cannot use it.\n",
 								apicid);
 	}
diff -Nru a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
--- a/arch/i386/kernel/sysenter.c	Wed Jan  8 20:04:45 2003
+++ b/arch/i386/kernel/sysenter.c	Wed Jan  8 20:04:45 2003
@@ -16,6 +16,7 @@
 #include <asm/cpufeature.h>
 #include <asm/msr.h>
 #include <asm/pgtable.h>
+#include <asm/unistd.h>
 
 extern asmlinkage void sysenter_entry(void);
 
@@ -73,10 +74,23 @@
 		0x59,			/* pop %ecx */
 		0xc3			/* ret */
 	};
+	static const char sigreturn[] = {
+	/* 32: sigreturn point */
+		0x58,				/* popl %eax */
+		0xb8, __NR_sigreturn, 0, 0, 0,	/* movl $__NR_sigreturn, %eax */
+		0xcd, 0x80,			/* int $0x80 */
+	};
+	static const char rt_sigreturn[] = {
+	/* 64: rt_sigreturn point */
+		0xb8, __NR_rt_sigreturn, 0, 0, 0,	/* movl $__NR_rt_sigreturn, %eax */
+		0xcd, 0x80,			/* int $0x80 */
+	};
 	unsigned long page = get_zeroed_page(GFP_ATOMIC);
 
 	__set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY);
 	memcpy((void *) page, int80, sizeof(int80));
+	memcpy((void *)(page + 32), sigreturn, sizeof(sigreturn));
+	memcpy((void *)(page + 64), rt_sigreturn, sizeof(rt_sigreturn));
 	if (!boot_cpu_has(X86_FEATURE_SEP))
 		return 0;
 
diff -Nru a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c
--- a/arch/i386/kernel/timers/timer_tsc.c	Wed Jan  8 20:04:44 2003
+++ b/arch/i386/kernel/timers/timer_tsc.c	Wed Jan  8 20:04:44 2003
@@ -189,39 +189,38 @@
 
 
 #ifdef CONFIG_CPU_FREQ
+static unsigned int  ref_freq = 0;
+static unsigned long loops_per_jiffy_ref = 0;
+
+#ifndef CONFIG_SMP
+static unsigned long fast_gettimeoffset_ref = 0;
+static unsigned long cpu_khz_ref = 0;
+#endif
 
 static int
 time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
 		       void *data)
 {
 	struct cpufreq_freqs *freq = data;
-	unsigned int i;
 
-	if (!cpu_has_tsc)
-		return 0;
+	if (!ref_freq) {
+		ref_freq = freq->old;
+		loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy;
+#ifndef CONFIG_SMP
+		fast_gettimeoffset_ref = fast_gettimeoffset_quotient;
+		cpu_khz_ref = cpu_khz;
+#endif
+	}
 
-	switch (val) {
-	case CPUFREQ_PRECHANGE:
-		if ((freq->old < freq->new) &&
-		((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == 0)))  {
-			cpu_khz = cpufreq_scale(cpu_khz, freq->old, freq->new);
-		        fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_quotient, freq->new, freq->old);
-		}
-		for (i=0; i<NR_CPUS; i++)
-			if ((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == i))
-				cpu_data[i].loops_per_jiffy = cpufreq_scale(cpu_data[i].loops_per_jiffy, freq->old, freq->new);
-		break;
-
-	case CPUFREQ_POSTCHANGE:
-		if ((freq->new < freq->old) &&
-		((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == 0)))  {
-			cpu_khz = cpufreq_scale(cpu_khz, freq->old, freq->new);
-		        fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_quotient, freq->new, freq->old);
+	if ((val == CPUFREQ_PRECHANGE  && freq->old < freq->new) ||
+	    (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
+		cpu_data[freq->cpu].loops_per_jiffy = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
+#ifndef CONFIG_SMP
+		if (use_tsc) {
+			fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq);
+			cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new);
 		}
-		for (i=0; i<NR_CPUS; i++)
-			if ((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == i))
-				cpu_data[i].loops_per_jiffy = cpufreq_scale(cpu_data[i].loops_per_jiffy, freq->old, freq->new);
-		break;
+#endif
 	}
 
 	return 0;
@@ -260,6 +259,10 @@
  	 *	moaned if you have the only one in the world - you fix it!
  	 */
  
+#ifdef CONFIG_CPU_FREQ
+	cpufreq_register_notifier(&time_cpufreq_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
+#endif
+
 	if (cpu_has_tsc) {
 		unsigned long tsc_quotient = calibrate_tsc();
 		if (tsc_quotient) {
@@ -282,9 +285,6 @@
 	                	"0" (eax), "1" (edx));
 				printk("Detected %lu.%03lu MHz processor.\n", cpu_khz / 1000, cpu_khz % 1000);
 			}
-#ifdef CONFIG_CPU_FREQ
-			cpufreq_register_notifier(&time_cpufreq_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
-#endif
 			return 0;
 		}
 	}
diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
--- a/arch/i386/kernel/traps.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/kernel/traps.c	Wed Jan  8 20:04:43 2003
@@ -87,50 +87,6 @@
 
 static int kstack_depth_to_print = 24;
 
-
-/*
- * If the address is either in the .text section of the
- * kernel, or in the vmalloc'ed module regions, it *may* 
- * be the address of a calling routine
- */
-
-#ifdef CONFIG_MODULES
-
-/* FIXME: Accessed without a lock --RR */
-extern struct list_head modules;
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	int retval = 0;
-	struct module *mod;
-
-	if (addr >= (unsigned long) &_stext &&
-	    addr <= (unsigned long) &_etext)
-		return 1;
-
-	list_for_each_entry(mod, &modules, list) {
-		/* mod_bound tests for addr being inside the vmalloc'ed
-		 * module area. Of course it'd be better to test only
-		 * for the .text subset... */
-		if (mod_bound((void *)addr, 0, mod)) {
-			retval = 1;
-			break;
-		}
-	}
-
-	return retval;
-}
-
-#else
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	return (addr >= (unsigned long) &_stext &&
-		addr <= (unsigned long) &_etext);
-}
-
-#endif
-
 void show_trace(unsigned long * stack)
 {
 	int i;
@@ -320,8 +276,11 @@
 static inline void do_trap(int trapnr, int signr, char *str, int vm86,
 			   struct pt_regs * regs, long error_code, siginfo_t *info)
 {
-	if (vm86 && regs->eflags & VM_MASK)
-		goto vm86_trap;
+	if (regs->eflags & VM_MASK) {
+		if (vm86)
+			goto vm86_trap;
+		goto trap_signal;
+	}
 
 	if (!(regs->xcs & 3))
 		goto kernel_trap;
@@ -338,7 +297,7 @@
 	}
 
 	kernel_trap: {
-		unsigned long fixup;
+		const struct exception_table_entry *fixup;
 #ifdef CONFIG_PNPBIOS
 		if (unlikely((regs->xcs | 8) == 0x88)) /* 0x80 or 0x88 */
 		{
@@ -354,9 +313,9 @@
 		}
 #endif	
 		
-		fixup = search_exception_table(regs->eip);
+		fixup = search_exception_tables(regs->eip);
 		if (fixup)
-			regs->eip = fixup;
+			regs->eip = fixup->fixup;
 		else	
 			die(str, regs, error_code);
 		return;
@@ -435,10 +394,10 @@
 
 gp_in_kernel:
 	{
-		unsigned long fixup;
-		fixup = search_exception_table(regs->eip);
+		const struct exception_table_entry *fixup;
+		fixup = search_exception_tables(regs->eip);
 		if (fixup) {
-			regs->eip = fixup;
+			regs->eip = fixup->fixup;
 			return;
 		}
 		die("general protection fault", regs, error_code);
diff -Nru a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
--- a/arch/i386/mach-voyager/voyager_smp.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/mach-voyager/voyager_smp.c	Wed Jan  8 20:04:43 2003
@@ -28,7 +28,6 @@
 #include <asm/mtrr.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
-#include <asm/smpboot.h>
 #include <asm/desc.h>
 #include <asm/arch_hooks.h>
 
diff -Nru a/arch/i386/mm/extable.c b/arch/i386/mm/extable.c
--- a/arch/i386/mm/extable.c	Wed Jan  8 20:04:45 2003
+++ b/arch/i386/mm/extable.c	Wed Jan  8 20:04:45 2003
@@ -7,13 +7,11 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 
-extern const struct exception_table_entry __start___ex_table[];
-extern const struct exception_table_entry __stop___ex_table[];
-
-static inline unsigned long
-search_one_table(const struct exception_table_entry *first,
-		 const struct exception_table_entry *last,
-		 unsigned long value)
+/* Simple binary search */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value)
 {
         while (first <= last) {
 		const struct exception_table_entry *mid;
@@ -22,43 +20,11 @@
 		mid = (last - first) / 2 + first;
 		diff = mid->insn - value;
                 if (diff == 0)
-                        return mid->fixup;
+                        return mid;
                 else if (diff < 0)
                         first = mid+1;
                 else
                         last = mid-1;
         }
-        return 0;
-}
-
-extern spinlock_t modlist_lock;
-
-unsigned long
-search_exception_table(unsigned long addr)
-{
-	unsigned long ret = 0;
-	
-#ifndef CONFIG_MODULES
-	/* There is only the kernel to search.  */
-	ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
-	return ret;
-#else
-	unsigned long flags;
-	struct list_head *i;
-
-	/* The kernel is the last "module" -- no need to treat it special.  */
-	spin_lock_irqsave(&modlist_lock, flags);
-	list_for_each(i, &extables) {
-		struct exception_table *ex
-			= list_entry(i, struct exception_table, list);
-		if (ex->num_entries == 0)
-			continue;
-		ret = search_one_table(ex->entry,
-				       ex->entry + ex->num_entries - 1, addr);
-		if (ret)
-			break;
-	}
-	spin_unlock_irqrestore(&modlist_lock, flags);
-	return ret;
-#endif
+        return NULL;
 }
diff -Nru a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
--- a/arch/i386/mm/fault.c	Wed Jan  8 20:04:32 2003
+++ b/arch/i386/mm/fault.c	Wed Jan  8 20:04:32 2003
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/tty.h>
 #include <linux/vt_kern.h>		/* For unblank_screen() */
+#include <linux/module.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -154,7 +155,7 @@
 	struct vm_area_struct * vma;
 	unsigned long address;
 	unsigned long page;
-	unsigned long fixup;
+	const struct exception_table_entry *fixup;
 	int write;
 	siginfo_t info;
 
@@ -310,8 +311,8 @@
 
 no_context:
 	/* Are we prepared to handle this kernel fault?  */
-	if ((fixup = search_exception_table(regs->eip)) != 0) {
-		regs->eip = fixup;
+	if ((fixup = search_exception_tables(regs->eip)) != NULL) {
+		regs->eip = fixup->fixup;
 		return;
 	}
 
diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
--- a/arch/i386/mm/hugetlbpage.c	Wed Jan  8 20:04:45 2003
+++ b/arch/i386/mm/hugetlbpage.c	Wed Jan  8 20:04:45 2003
@@ -234,8 +234,12 @@
 				ret = -ENOMEM;
 				goto out;
 			}
-			add_to_page_cache(page, mapping, idx);
+			ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC);
 			unlock_page(page);
+			if (ret) {
+				free_huge_page(page);
+				goto out;
+			}
 		}
 		set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE);
 	}
diff -Nru a/arch/i386/mm/init.c b/arch/i386/mm/init.c
--- a/arch/i386/mm/init.c	Wed Jan  8 20:04:44 2003
+++ b/arch/i386/mm/init.c	Wed Jan  8 20:04:44 2003
@@ -438,6 +438,16 @@
 	
 	bad_ppro = ppro_with_ram_bug();
 
+#ifdef CONFIG_HIGHMEM
+	/* check that fixmap and pkmap do not overlap */
+	if (PKMAP_BASE+LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
+		printk(KERN_ERR "fixmap and kmap areas overlap - this will crash\n");
+		printk(KERN_ERR "pkstart: %lxh pkend: %lxh fixstart %lxh\n",
+				PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE, FIXADDR_START);
+		BUG();
+	}
+#endif
+ 
 	set_max_mapnr_init();
 
 #ifdef CONFIG_HIGHMEM
diff -Nru a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c
--- a/arch/i386/pci/numa.c	Wed Jan  8 20:04:43 2003
+++ b/arch/i386/pci/numa.c	Wed Jan  8 20:04:43 2003
@@ -127,7 +127,7 @@
 		return 0;
 
 	pci_root_bus = pcibios_scan_root(0);
-	if (clustered_apic_mode && (numnodes > 1)) {
+	if (numnodes > 1) {
 		for (quad = 1; quad < numnodes; ++quad) {
 			printk("Scanning PCI bus %d for quad %d\n", 
 				QUADLOCAL2BUS(quad,0), quad);
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
--- a/arch/ia64/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ia64/Kconfig	Wed Jan  8 20:04:45 2003
@@ -655,44 +655,6 @@
 
 if !IA64_HP_SIM
 
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local systems) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "drivers/isdn/Kconfig"
diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
--- a/arch/ia64/ia32/sys_ia32.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ia64/ia32/sys_ia32.c	Wed Jan  8 20:04:44 2003
@@ -3017,38 +3017,6 @@
 	return ret;
 }
 
-static inline int
-get_flock32(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-
-	if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)))
-		return -EFAULT;
-
-	err = __get_user(kfl->l_type, &ufl->l_type);
-	err |= __get_user(kfl->l_whence, &ufl->l_whence);
-	err |= __get_user(kfl->l_start, &ufl->l_start);
-	err |= __get_user(kfl->l_len, &ufl->l_len);
-	err |= __get_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
-static inline int
-put_flock32(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-
-	if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)))
-		return -EFAULT;
-
-	err = __put_user(kfl->l_type, &ufl->l_type);
-	err |= __put_user(kfl->l_whence, &ufl->l_whence);
-	err |= __put_user(kfl->l_start, &ufl->l_start);
-	err |= __put_user(kfl->l_len, &ufl->l_len);
-	err |= __put_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
 extern asmlinkage long sys_fcntl (unsigned int fd, unsigned int cmd, unsigned long arg);
 
 asmlinkage long
@@ -3062,13 +3030,13 @@
 	      case F_GETLK:
 	      case F_SETLK:
 	      case F_SETLKW:
-		if (get_flock32(&f, (struct flock32 *) A(arg)))
+		if (get_compat_flock(&f, (struct compat_flock *) A(arg)))
 			return -EFAULT;
 		old_fs = get_fs();
 		set_fs(KERNEL_DS);
 		ret = sys_fcntl(fd, cmd, (unsigned long) &f);
 		set_fs(old_fs);
-		if (cmd == F_GETLK && put_flock32(&f, (struct flock32 *) A(arg)))
+		if (cmd == F_GETLK && put_compat_flock(&f, (struct compat_flock *) A(arg)))
 			return -EFAULT;
 		return ret;
 
diff -Nru a/arch/m68k/Kconfig b/arch/m68k/Kconfig
--- a/arch/m68k/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/m68k/Kconfig	Wed Jan  8 20:04:44 2003
@@ -1152,496 +1152,6 @@
 source "net/Kconfig"
 
 
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-#
-# Network device configuration
-#
-config DUMMY
-	tristate "Dummy net driver support"
-	depends on NETDEVICES
-	---help---
-	  This is essentially a bit-bucket device (i.e. traffic you send to
-	  this device is consigned into oblivion) with a configurable IP
-	  address. It is most commonly used in order to make your currently
-	  inactive SLIP address seem like a real address for local programs.
-	  If you use SLIP or PPP, you might want to say Y here. Since this
-	  thing often comes in handy, the default is Y. It won't enlarge your
-	  kernel either. What a deal. Read about it in the Network
-	  Administrator's Guide, available from
-	  <http://www.linuxdoc.org/docs.html#guide>.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt>.  The module
-	  will be called dummy.o.  If you want to use more than one dummy
-	  device at a time, you need to compile this driver as a module.
-	  Instead of 'dummy', the devices will then be called 'dummy0',
-	  'dummy1' etc.
-
-config SLIP
-	tristate "SLIP (serial line) support"
-	depends on NETDEVICES
-	---help---
-	  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
-	  connect to your Internet service provider or to connect to some
-	  other local Unix box or if you want to configure your Linux box as a
-	  Slip/CSlip server for other people to dial in. SLIP (Serial Line
-	  Internet Protocol) is a protocol used to send Internet traffic over
-	  serial connections such as telephone lines or null modem cables;
-	  nowadays, the protocol PPP is more commonly used for this same
-	  purpose.
-
-	  Normally, your access provider has to support SLIP in order for you
-	  to be able to use it, but there is now a SLIP emulator called SLiRP
-	  around (available from
-	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-	  allows you to use SLIP over a regular dial up shell connection. If
-	  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
-	  NET-3-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>, explains how to
-	  configure SLIP. Note that you don't need this option if you just
-	  want to run term (term is a program which gives you almost full
-	  Internet connectivity if you have a regular dial up shell account on
-	  some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
-	  support will enlarge your kernel by about 4 KB. If unsure, say N.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>. The module will be
-	  called slip.o.
-
-config SLIP_COMPRESSED
-	bool "CSLIP compressed headers"
-	depends on SLIP
-	---help---
-	  This protocol is faster than SLIP because it uses compression on the
-	  TCP/IP headers (not on the data itself), but it has to be supported
-	  on both ends. Ask your access provider if you are not sure and
-	  answer Y, just in case. You will still be able to use plain SLIP. If
-	  you plan to use SLiRP, the SLIP emulator (available from
-	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-	  allows you to use SLIP over a regular dial up shell connection, you
-	  definitely want to say Y here. The NET-3-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
-	  CSLIP. This won't enlarge your kernel.
-
-config SLIP_SMART
-	bool "Keepalive and linefill"
-	depends on SLIP
-	help
-	  Adds additional capabilities to the SLIP driver to support the
-	  RELCOM line fill and keepalive monitoring. Ideal on poor quality
-	  analogue lines.
-
-config SLIP_MODE_SLIP6
-	bool "Six bit SLIP encapsulation"
-	depends on SLIP
-	help
-	  Just occasionally you may need to run IP over hostile serial
-	  networks that don't pass all control characters or are only seven
-	  bit. Saying Y here adds an extra mode you can use with SLIP:
-	  "slip6". In this mode, SLIP will only send normal ASCII symbols over
-	  the serial device. Naturally, this has to be supported at the other
-	  end of the link as well. It's good enough, for example, to run IP
-	  over the async ports of a Camtec JNT Pad. If unsure, say N.
-
-config PPP
-	tristate "PPP (point-to-point protocol) support"
-	depends on NETDEVICES
-	---help---
-	  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
-	  the same purpose: sending Internet traffic over telephone (and other
-	  serial) lines.  Ask your access provider if they support it, because
-	  otherwise you can't use it; most Internet access providers these
-	  days support PPP rather than SLIP.
-
-	  To use PPP, you need an additional program called pppd as described
-	  in the PPP-HOWTO, available at
-	  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
-	  the version of pppd recommended in <file:Documentation/Changes>.
-	  The PPP option enlarges your kernel by about 16 KB.
-
-	  There are actually two versions of PPP: the traditional PPP for
-	  asynchronous lines, such as regular analog phone lines, and
-	  synchronous PPP which can be used over digital ISDN lines for
-	  example.  If you want to use PPP over phone lines or other
-	  asynchronous serial lines, you need to say Y (or M) here and also to
-	  the next option, "PPP support for async serial ports".  For PPP over
-	  synchronous lines, you should say Y (or M) here and to "Support
-	  synchronous PPP", below.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  If you said Y to "Version information on all symbols" above, then
-	  you cannot compile the PPP driver into the kernel; you can then only
-	  compile it as a module.  The module will be called ppp_generic.o.
-	  If you want to compile it as a module, say M here and read
-	  <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>.
-
-config PPP_MULTILINK
-	bool "PPP multilink support (EXPERIMENTAL)"
-	depends on PPP && EXPERIMENTAL
-
-config PPP_FILTER
-	bool "PPP filtering"
-	depends on PPP && FILTER
-
-config PPP_ASYNC
-	tristate "PPP support for async serial ports"
-	depends on PPP
-
-config PPP_SYNC_TTY
-	tristate "PPP support for sync tty ports"
-	depends on PPP
-
-config PPP_DEFLATE
-	tristate "PPP Deflate compression"
-	depends on PPP
-
-config PPP_BSDCOMP
-	tristate "PPP BSD-Compress compression"
-	depends on PPP
-
-config PPPOE
-	tristate "PPP over Ethernet (EXPERIMENTAL)"
-	depends on EXPERIMENTAL && PPP
-
-config EQUALIZER
-	tristate "EQL (serial line load balancing) support"
-	depends on NETDEVICES
-	---help---
-	  If you have two serial connections to some other computer (this
-	  usually requires two modems and two telephone lines) and you use
-	  SLIP (the protocol for sending Internet traffic over telephone
-	  lines) or PPP (a better SLIP) on them, you can make them behave like
-	  one double speed connection using this driver.  Naturally, this has
-	  to be supported at the other end as well, either with a similar EQL
-	  Linux driver or with a Livingston Portmaster 2e.
-
-	  Say Y if you want this and read
-	  <file:Documentation/networking/eql.txt>.  You may also want to read
-	  section 6.2 of the NET-3-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called eql.o.  If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt>.  If
-	  unsure, say N.
-
-config ARIADNE
-	tristate "Ariadne support"
-	depends on NETDEVICES && ZORRO
-	help
-	  If you have a Village Tronic Ariadne Ethernet adapter, say Y.
-	  Otherwise, say N.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you
-	  want). The module is called ariadne.o. If you want to compile it as
-	  a module, say M here and read <file:Documentation/modules.txt>.
-
-config ARIADNE2
-	tristate "Ariadne II support"
-	depends on NETDEVICES && ZORRO
-	help
-	  This driver is for the Village Tronic Ariadne II and the Individual
-	  Computers X-Surf Ethernet cards. If you have such a card, say Y.
-	  Otherwise, say N.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called ariadne2.o. If you want to compile it as
-	  a module, say M here and read <file:Documentation/modules.txt>.
-
-config A2065
-	tristate "A2065 support"
-	depends on NETDEVICES && ZORRO
-	help
-	  If you have a Commodore A2065 Ethernet adapter, say Y. Otherwise,
-	  say N.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you
-	  want). The module is called a2065.o. If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt>.
-
-config HYDRA
-	tristate "Hydra support"
-	depends on NETDEVICES && ZORRO
-	help
-	  If you have a Hydra Ethernet adapter, say Y. Otherwise, say N.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you
-	  want). The module is called hydra.o. If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt>.
-
-config APNE
-	tristate "PCMCIA NE2000 support"
-	depends on NETDEVICES && AMIGA_PCMCIA
-	help
-	  If you have a PCMCIA NE2000 compatible adapter, say Y.  Otherwise,
-	  say N.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you
-	  want). The module is called apne.o. If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt>.
-
-config APOLLO_ELPLUS
-	tristate "Apollo 3c505 support"
-	depends on NETDEVICES && APOLLO
-	help
-	  Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card.
-	  If you don't have one made for Apollos, you can use one from a PC,
-	  except that your Apollo won't be able to boot from it (because the
-	  code in the ROM will be for a PC).
-
-config MAC8390
-	bool "Macintosh NS 8390 based ethernet cards"
-	depends on NETDEVICES && MAC
-	help
-	  If you want to include a driver to support Nubus or LC-PDS
-	  Ethernet cards using an NS8390 chipset or its equivalent, say Y
-	  and read the Ethernet-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
-config MACSONIC
-	tristate "Macintosh SONIC based ethernet (onboard, NuBus, LC, CS)"
-	depends on NETDEVICES && MAC
-	---help---
-	  Support for NatSemi SONIC based Ethernet devices.  This includes
-	  the onboard Ethernet in many Quadras as well as some LC-PDS,
-	  a few Nubus and all known Comm Slot Ethernet cards.  If you have
-	  one of these say Y and read the Ethernet-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>.  This module will
-	  be called macsonic.o.
-
-config SMC9194
-	tristate "Macintosh SMC 9194 based ethernet cards"
-	depends on NETDEVICES && MAC
-	---help---
-	  This is support for the SMC9xxx based Ethernet cards. Choose this
-	  option if you have a DELL laptop with the docking station, or
-	  another SMC9192/9194 based chipset.  Say Y if you want it compiled
-	  into the kernel, and read the file
-	  <file:Documentation/networking/smc9.txt> and the Ethernet-HOWTO,
-	  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called smc9194.o.  If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt> as well
-	  as <file:Documentation/networking/net-modules.txt>.
-
-config MAC89x0
-	tristate "Macintosh CS89x0 based ethernet cards"
-	depends on NETDEVICES && MAC
-	---help---
-	  Support for CS89x0 chipset based Ethernet cards.  If you have a
-	  Nubus or LC-PDS network (Ethernet) card of this type, say Y and
-	  read the Ethernet-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>.  This module will
-	  be called mac89x0.o.
-
-config MACMACE
-	bool "Macintosh (AV) onboard MACE ethernet (EXPERIMENTAL)"
-	depends on NETDEVICES && MAC && EXPERIMENTAL
-	help
-	  Support for the onboard AMD 79C940 MACE Ethernet controller used in
-	  the 660AV and 840AV Macintosh.  If you have one of these Macintoshes
-	  say Y and read the Ethernet-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
-config MVME147_NET
-	tristate "MVME147 (Lance) Ethernet support"
-	depends on NETDEVICES && MVME147
-	help
-	  Support for the on-board Ethernet interface on the Motorola MVME147
-	  single-board computer.  Say Y here to include the
-	  driver for this chip in your kernel.   If you want to compile it as
-	  a module, say M here and read <file:Documentation/modules.txt>.
-
-config MVME16x_NET
-	tristate "MVME16x Ethernet support"
-	depends on NETDEVICES && MVME16x
-	help
-	  This is the driver for the Ethernet interface on the Motorola
-	  MVME162, 166, 167, 172 and 177 boards.  Say Y here to include the
-	  driver for this chip in your kernel.   If you want to compile it as
-	  a module, say M here and read <file:Documentation/modules.txt>.
-
-config BVME6000_NET
-	tristate "BVME6000 Ethernet support"
-	depends on NETDEVICES && BVME6000
-	help
-	  This is the driver for the Ethernet interface on BVME4000 and
-	  BVME6000 VME boards.  Say Y here to include the driver for this chip
-	  in your kernel.   If you want to compile it as a module, say M here
-	  and read <file:Documentation/modules.txt>.
-
-config ATARILANCE
-	tristate "Atari Lance support"
-	depends on NETDEVICES && ATARI
-	help
-	  Say Y to include support for several Atari Ethernet adapters based
-	  on the AMD Lance chipset: RieblCard (with or without battery), or
-	  PAMCard VME (also the version by Rhotron, with different addresses).
-
-config ATARI_BIONET
-	tristate "BioNet-100 support"
-	depends on NETDEVICES && ATARI && ATARI_ACSI!=n
-	help
-	  Say Y to include support for BioData's BioNet-100 Ethernet adapter
-	  for the ACSI port. The driver works (has to work...) with a polled
-	  I/O scheme, so it's rather slow :-(
-
-config ATARI_PAMSNET
-	tristate "PAMsNet support"
-	depends on NETDEVICES && ATARI && ATARI_ACSI!=n
-	help
-	  Say Y to include support for the PAMsNet Ethernet adapter for the
-	  ACSI port ("ACSI node"). The driver works (has to work...) with a
-	  polled I/O scheme, so it's rather slow :-(
-
-config SUN3LANCE
-	tristate "Sun3/Sun3x on-board LANCE support"
-	depends on NETDEVICES && (SUN3 || SUN3X)
-	help
-	  Most Sun3 and Sun3x motherboards (including the 3/50, 3/60 and 3/80)
-	  featured an AMD Lance 10Mbit Ethernet controller on board; say Y
-	  here to compile in the Linux driver for this and enable Ethernet.
-	  General Linux information on the Sun 3 and 3x series (now
-	  discontinued) is at
-	  <http://www.angelfire.com/ca2/tech68k/sun3.html>.
-
-	  If you're not building a kernel for a Sun 3, say N.
-
-config SUN3_82586
-	tristate "Sun3 on-board Intel 82586 support"
-	depends on NETDEVICES && SUN3
-	help
-	  This driver enables support for the on-board Intel 82586 based
-	  Ethernet adapter found on Sun 3/1xx and 3/2xx motherboards.  Note
-	  that this driver does not support 82586-based adapters on additional
-	  VME boards.
-
-config HPLANCE
-	bool "HP on-board LANCE support"
-	depends on NETDEVICES && HP300
-	help
-	  If you want to use the builtin "LANCE" Ethernet controller on an
-	  HP300 machine, say Y here.
-
-config PLIP
-	tristate "PLIP (parallel port) support"
-	depends on NETDEVICES && Q40 && PARPORT
-	---help---
-	  PLIP (Parallel Line Internet Protocol) is used to create a
-	  reasonably fast mini network consisting of two (or, rarely, more)
-	  local machines.  A PLIP link from a Linux box is a popular means to
-	  install a Linux distribution on a machine which doesn't have a
-	  CD-ROM drive (a minimal system has to be transferred with floppies
-	  first). The kernels on both machines need to have this PLIP option
-	  enabled for this to work.
-
-	  The PLIP driver has two modes, mode 0 and mode 1.  The parallel
-	  ports (the connectors at the computers with 25 holes) are connected
-	  with "null printer" or "Turbo Laplink" cables which can transmit 4
-	  bits at a time (mode 0) or with special PLIP cables, to be used on
-	  bidirectional parallel ports only, which can transmit 8 bits at a
-	  time (mode 1); you can find the wiring of these cables in
-	  <file:Documentation/networking/PLIP.txt>.  The cables can be up to
-	  15m long.  Mode 0 works also if one of the machines runs DOS/Windows
-	  and has some PLIP software installed, e.g. the Crynwr PLIP packet
-	  driver (<http://oak.oakland.edu/simtel.net/msdos/pktdrvr-pre.html>)
-	  and winsock or NCSA's telnet.
-
-	  If you want to use PLIP, say Y and read the PLIP mini-HOWTO as well
-	  as the NET-3-HOWTO, both available from
-	  <http://www.linuxdoc.org/docs.html#howto>.  Note that the PLIP
-	  protocol has been changed and this PLIP driver won't work together
-	  with the PLIP support in Linux versions 1.0.x.  This option enlarges
-	  your kernel by about 8 KB.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>.  The module will be
-	  called plip.o.  If unsure, say Y or M, in case you buy a laptop
-	  later.
-
-config NE2000
-	tristate "NE2000/NE1000 support"
-	depends on NETDEVICES && Q40 && m
-	---help---
-	  If you have a network (Ethernet) card of this type, say Y and read
-	  the Ethernet-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.  Many Ethernet cards
-	  without a specific driver are compatible with NE2000.
-
-	  If you have a PCI NE2000 card however, say N here and Y to "PCI
-	  NE2000 support", above. If you have a NE2000 card and are running on
-	  an MCA system (a bus system used on some IBM PS/2 computers and
-	  laptops), say N here and Y to "NE/2 (ne2000 MCA version) support",
-	  below.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called ne.o.  If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt> as well
-	  as <file:Documentation/networking/net-modules.txt>.
-
-endmenu
-
-
 menu "Character devices"
 
 config SERIAL
diff -Nru a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
--- a/arch/m68k/kernel/traps.c	Wed Jan  8 20:04:45 2003
+++ b/arch/m68k/kernel/traps.c	Wed Jan  8 20:04:45 2003
@@ -821,42 +821,6 @@
 
 static int kstack_depth_to_print = 48;
 
-extern char _stext, _etext;
-
-#ifdef CONFIG_MODULES
-
-/* FIXME: Accessed without a lock --RR */
-extern struct list_head modules;
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	struct module *mod;
-
-	if (addr >= (unsigned long) &_stext &&
-	    addr <= (unsigned long) &_etext)
-		return 1;
-
-	list_for_each_entry(mod, &modules, list) {
-		/* mod_bound tests for addr being inside the vmalloc'ed
-		 * module area. Of course it'd be better to test only
-		 * for the .text subset... */
-		if (mod_bound((void *)addr, 0, mod))
-			return 1;
-	}
-
-	return 0;
-}
-
-#else // !CONFIG_MODULES
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	return (addr >= (unsigned long) &_stext &&
-		addr <= (unsigned long) &_etext);
-}
-
-#endif // !CONFIG_MODULES
-
 void show_trace(unsigned long *stack)
 {
 	unsigned long *endstack;
diff -Nru a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
--- a/arch/m68knommu/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/m68knommu/Kconfig	Wed Jan  8 20:04:44 2003
@@ -611,47 +611,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/mips/Kconfig b/arch/mips/Kconfig
--- a/arch/mips/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/mips/Kconfig	Wed Jan  8 20:04:44 2003
@@ -919,47 +919,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/mips/kernel/pci.c b/arch/mips/kernel/pci.c
--- a/arch/mips/kernel/pci.c	Wed Jan  8 20:04:44 2003
+++ b/arch/mips/kernel/pci.c	Wed Jan  8 20:04:44 2003
@@ -3,7 +3,7 @@
  * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
  *
  * Modified to be mips generic, ppopov@mvista.com
- * arch/mips/kernl/pci.c
+ * arch/mips/kernel/pci.c
  *     Common MIPS PCI routines.
  *
  * This program is free software; you can redistribute  it and/or modify it
diff -Nru a/arch/mips64/Kconfig b/arch/mips64/Kconfig
--- a/arch/mips64/Kconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/mips64/Kconfig	Wed Jan  8 20:04:43 2003
@@ -504,47 +504,6 @@
 #source drivers/message/i2o/Config.in
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/mips64/sgi-ip27/ip27-rtc.c b/arch/mips64/sgi-ip27/ip27-rtc.c
--- a/arch/mips64/sgi-ip27/ip27-rtc.c	Wed Jan  8 20:04:44 2003
+++ b/arch/mips64/sgi-ip27/ip27-rtc.c	Wed Jan  8 20:04:44 2003
@@ -202,9 +202,15 @@
 	    KL_CONFIG_CH_CONS_INFO(nid)->memory_base + IOC3_BYTEBUS_DEV0;
 
 	printk(KERN_INFO "Real Time Clock Driver v%s\n", RTC_VERSION);
-	if (misc_register(&rtc_dev))
+	if (misc_register(&rtc_dev)) {
+		printk(KERN_ERR "rtc: cannot register misc device.\n");
 		return -ENODEV;
-	create_proc_read_entry ("rtc", 0, NULL, rtc_read_proc, NULL);
+	}
+	if (!create_proc_read_entry ("rtc", 0, NULL, rtc_read_proc, NULL)) {
+		printk(KERN_ERR "rtc: cannot create /proc/rtc.\n");
+		misc_deregister(&rtc_dev);
+		return -ENOENT;
+	}
 
 	save_flags(flags);
 	cli();
diff -Nru a/arch/parisc/Kconfig b/arch/parisc/Kconfig
--- a/arch/parisc/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/parisc/Kconfig	Wed Jan  8 20:04:44 2003
@@ -276,46 +276,6 @@
 
 source "net/Kconfig"
 
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 #source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
--- a/arch/parisc/kernel/perf.c	Wed Jan  8 20:04:43 2003
+++ b/arch/parisc/kernel/perf.c	Wed Jan  8 20:04:43 2003
@@ -500,6 +500,8 @@
  */
 static int __init perf_init(void)
 {
+	int retval;
+
 	/* Determine correct processor interface to use */
 	bitmask_array = perf_bitmasks;
 
@@ -518,11 +520,17 @@
 		return -ENODEV;
 	}
 
+	retval = misc_register(&perf_dev);
+	if (retval < 0) {
+		printk(KERN_ERR "Performance monitoring counters: "
+			"cannot register misc device.\n");
+		return retval;
+	}
+
 	/* Patch the images to match the system */
     	perf_patch_images();
 
 	spin_lock_init(&perf_lock);
-	misc_register(&perf_dev);
 
 	/* TODO: this only lets us access the first cpu.. what to do for SMP? */
 	cpu_device = cpu_data[0].dev;
diff -Nru a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
--- a/arch/parisc/kernel/traps.c	Wed Jan  8 20:04:45 2003
+++ b/arch/parisc/kernel/traps.c	Wed Jan  8 20:04:45 2003
@@ -123,31 +123,6 @@
 
 
 static int kstack_depth_to_print = 48;
-extern struct module kernel_module;
-
-static inline int kernel_text_address(unsigned long addr)
-{
-#ifdef CONFIG_MODULES
-	struct module *mod;
-#endif
-	extern char _stext, _etext;
-
-	if (addr >= (unsigned long) &_stext &&
-	    addr <= (unsigned long) &_etext)
-		return 1;
-
-#ifdef CONFIG_MODULES
-	for (mod = module_list; mod != &kernel_module; mod = mod->next) {
-		/* mod_bound tests for addr being inside the vmalloc'ed
-		 * module area. Of course it'd be better to test only
-		 * for the .text subset... */
-		if (mod_bound(addr, 0, mod))
-			return 1;
-	}
-#endif
-
-	return 0;
-}
 
 void show_stack(unsigned long *sp)
 {
diff -Nru a/arch/ppc/8xx_io/Kconfig b/arch/ppc/8xx_io/Kconfig
--- a/arch/ppc/8xx_io/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/8xx_io/Kconfig	Wed Jan  8 20:04:44 2003
@@ -51,6 +51,22 @@
 	  all MII code can be omitted. Say N here if unsure or if you don't
 	  need link status reports.
 
+config  FEC_AM79C874
+	bool "Support AMD79C874 PHY"
+	depends on USE_MDIO
+
+config FEC_LXT970
+	bool "Support LXT970 PHY"
+	depends on USE_MDIO
+
+config FEC_LXT971
+	bool "Support LXT971 PHY"
+	depends on USE_MDIO
+	
+config FEC_QS6612
+	bool "Support QS6612 PHY"
+	depends on USE_MDIO
+	
 config ENET_BIG_BUFFERS
 	bool "Use Big CPM Ethernet Buffers"
 	depends on NET_ETHERNET
diff -Nru a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
--- a/arch/ppc/8xx_io/fec.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/8xx_io/fec.c	Wed Jan  8 20:04:45 2003
@@ -22,15 +22,12 @@
  *
  * Make use of MII for PHY control configurable.
  * Some fixes.
- * Copyright (c) 2000 Wolfgang Denk, DENX Software Engineering.
+ * Copyright (c) 2000-2002 Wolfgang Denk, DENX Software Engineering.
+ *
+ * Support for AMD AM79C874 added.
+ * Thomas Lange, thomas@corelatus.com
  */
 
-/* List of PHYs we wish to support.
-*/
-#undef	CONFIG_FEC_LXT970
-#define	CONFIG_FEC_LXT971
-#undef	CONFIG_FEC_QS6612
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -1137,9 +1134,74 @@
 	},
 };
 
-
 #endif /* CONFIG_FEC_QS6612 */
 
+/* ------------------------------------------------------------------------- */
+/* The Advanced Micro Devices AM79C874 is used on the ICU862		     */
+
+#ifdef CONFIG_FEC_AM79C874
+
+/* register definitions for the 79C874 */
+
+#define MII_AM79C874_MFR	16  /* Miscellaneous Features Register      */
+#define MII_AM79C874_ICSR	17  /* Interrupt Control/Status Register    */
+#define MII_AM79C874_DR		18  /* Diagnostic Register		    */
+#define MII_AM79C874_PMLR	19  /* Power Management & Loopback Register */
+#define MII_AM79C874_MCR	21  /* Mode Control Register		    */
+#define MII_AM79C874_DC		23  /* Disconnect Counter		    */
+#define MII_AM79C874_REC	24  /* Receiver Error Counter		    */
+
+static void mii_parse_amd79c874_dr(uint mii_reg, struct net_device *dev, uint data)
+{
+	volatile struct fec_enet_private *fep = dev->priv;
+	uint s = fep->phy_status;
+
+	s &= ~(PHY_STAT_SPMASK);
+
+	/* Register 18: Bit 10 is data rate, 11 is Duplex */
+	switch ((mii_reg >> 10) & 3) {
+	case 0:	s |= PHY_STAT_10HDX;	break;
+	case 1:	s |= PHY_STAT_100HDX;	break;
+	case 2:	s |= PHY_STAT_10FDX;	break;
+	case 3:	s |= PHY_STAT_100FDX;	break;
+	}
+
+	fep->phy_status = s;
+}
+
+static phy_info_t phy_info_amd79c874 = {
+	0x00022561,
+	"AM79C874",
+
+	(const phy_cmd_t []) {  /* config */
+//		{ mk_mii_write(MII_REG_ANAR, 0x021), NULL }, /* 10  Mbps, HD */
+		{ mk_mii_read(MII_REG_CR), mii_parse_cr },
+		{ mk_mii_read(MII_REG_ANAR), mii_parse_anar },
+		{ mk_mii_end, }
+	},
+	(const phy_cmd_t []) {  /* startup - enable interrupts */
+		{ mk_mii_write(MII_AM79C874_ICSR, 0xff00), NULL },
+		{ mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */
+		{ mk_mii_end, }
+	},
+	(const phy_cmd_t []) { /* ack_int */
+		/* find out the current status */
+
+		{ mk_mii_read(MII_REG_SR), mii_parse_sr },
+		{ mk_mii_read(MII_AM79C874_DR), mii_parse_amd79c874_dr },
+
+		/* we only need to read ICSR to acknowledge */
+
+		{ mk_mii_read(MII_AM79C874_ICSR), NULL },
+		{ mk_mii_end, }
+	},
+	(const phy_cmd_t []) {  /* shutdown - disable interrupts */
+		{ mk_mii_write(MII_AM79C874_ICSR, 0x0000), NULL },
+		{ mk_mii_end, }
+	},
+};
+
+#endif /* CONFIG_FEC_AM79C874 */
 
 static phy_info_t *phy_info[] = {
 
@@ -1153,7 +1215,11 @@
 
 #ifdef CONFIG_FEC_QS6612
 	&phy_info_qs6612,
-#endif /* CONFIG_FEC_LXT971 */
+#endif /* CONFIG_FEC_QS6612 */
+
+#ifdef CONFIG_FEC_AM79C874
+	&phy_info_amd79c874,
+#endif /* CONFIG_FEC_AM79C874 */
 
 	NULL
 };
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/Kconfig	Wed Jan  8 20:04:45 2003
@@ -6,10 +6,6 @@
 	bool
 	default y
 
-config SWAP
-	bool
-	default y
-
 config UID16
 	bool
 
@@ -29,7 +25,6 @@
 
 source "init/Kconfig"
 
-
 menu "Platform support"
 
 config PPC
@@ -77,15 +72,9 @@
 config 8xx
 	bool "8xx"
 
-config PPC_ISERIES
-	bool "iSeries"
-
 endchoice
 
-config 4xx
-	bool
-	depends on 40x
-	default y
+source arch/ppc/platforms/4xx/Kconfig
 
 config 8260
 	bool "MPC8260 CPM Support"
@@ -105,7 +94,7 @@
 
 config PPC64BRIDGE
 	bool
-	depends on PPC_ISERIES || POWER3
+	depends on POWER3
 	default y
 
 config ALL_PPC
@@ -143,25 +132,6 @@
 	bool
 	depends on 8xx || 8260
 	default y
-	---help---
-	  If you say Y here, it will be possible to use a serial port as the
-	  system console (the system console is the device which receives all
-	  kernel messages and warnings and which allows logins in single user
-	  mode). This could be useful if some terminal or printer is connected
-	  to that serial port.
-
-	  Even if you say Y here, the currently visible virtual console
-	  (/dev/tty0) will still be used as the system console by default, but
-	  you can alter that using a kernel command line option such as
-	  "console=ttyS1". (Try "man bootparam" or see the documentation of
-	  your boot loader (lilo or loadlin) about how to pass options to the
-	  kernel at boot time.)
-
-	  If you don't have a graphics card installed and you say Y here, the
-	  kernel will automatically use the first serial line, /dev/ttyS0, as
-	  system console.
-
-	  If unsure, say N.
 
 choice
 	prompt "Machine Type"
@@ -216,56 +186,9 @@
 
 endchoice
 
-choice
-	prompt "Machine Type"
-	depends on 40x
-	default WALNUT
-
-config ASH
-	bool "Ash"
-
-config CEDER
-	bool "Ceder"
-
-config CPCI405
-	bool "CPCI405"
-
-config EP405
-	bool "EP405/EP405PC"
-
-config OAK
-	bool "Oak"
-	help
-	  Select Oak if you have an IBM 403GCX "Oak" Evaluation Board.
-
-	  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
-
-	  More information on these boards is available at:
-	  <http://www.chips.ibm.com/products/powerpc/tools/evk_pn.html#GCX>.
-
-config REDWOOD_4
-	bool "Redwood-4"
-
-config REDWOOD_5
-	bool "Redwood-5"
-
-config TIVO
-	bool "Tivo"
-
-config WALNUT
-	bool "Walnut"
-	help
-	  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
-
-endchoice
-
-config EP405PC
-	bool "EP405PC Support"
-	depends on EP405
-
 config NOT_COHERENT_CACHE
 	bool
-	depends on 40x || 8xx
+	depends on 4xx || 8xx
 	default y
 
 choice
@@ -497,6 +420,10 @@
 	depends on 8xx && (TQM823L || TQM850L || FPS850L || TQM855L || TQM860L || SM850)
 	default y
 
+config EMBEDDEDBOOT
+	bool
+	depends on 8xx || 8260
+	default y
 choice
 	prompt "Machine Type"
 	depends on 6xx && !8260
@@ -739,88 +666,8 @@
 	  here.  Saying Y here will not hurt performance (on any machine) but
 	  will increase the size of the kernel.
 
-# It's often necessary to know the specific 4xx processor type.
-# Fortunately, it is impled (so far) from the board type, so we
-# don't need to ask more redundant questions.
-config NP405H
-	bool
-	depends on ASH
-	default y
-
-config TREEBOOT
-	bool
-	depends on 40x && (WALNUT || REDWOOD_5 || REDWOOD_4 || OAK || TIVO || CEDER || ASH)
-	default y
-
-config IBM405_ERR77
-	bool
-	depends on 40x && (WALNUT || REDWOOD_5 || REDWOOD_4 || EP405 || CPCI405 || CEDER || ASH)
-	default y
-
-config IBM_OCP
-	bool
-	depends on 40x && (WALNUT || REDWOOD_5 || REDWOOD_4 || EP405 || CPCI405 || CEDER || ASH)
-	default y
-
-config NP405L
-	bool
-	depends on CEDER
-	default y
-
-config BIOS_FIXUP
-	bool
-	depends on 40x && (WALNUT || EP405 || CEDER)
-	default y
-
-config 405GP
-	bool
-	depends on 40x && (WALNUT || EP405 || CPCI405)
-	default y
-
-config EMBEDDEDBOOT
-	bool
-	depends on 8xx || 8260 || 40x && EP405
-	default y
-
-config 403GCX
-	bool
-	depends on 40x && (OAK || TIVO)
-	default y
-
-config STB03xxx
-	bool
-	depends on 40x && (REDWOOD_5 || REDWOOD_4)
-	default y
-
-config 405_DMA
-	bool "Blue Logic DMA"
-	depends on 40x
-
-config PM
-	bool "Power Management support (EXPERIMENTAL)"
-	depends on 40x && EXPERIMENTAL
-
-choice
-	prompt "TTYS0 device and default console"
-	depends on 40x
-	default UART0_TTYS0
-
-config UART0_TTYS0
-	bool "UART0"
-
-config UART0_TTYS1
-	bool "UART1"
-
-endchoice
-
-config IBM405_ERR51
-	bool
-	depends on 40x
-	default y
-
 endmenu
 
-
 menu "General setup"
 
 config HIGHMEM
@@ -855,8 +702,7 @@
 
 config PCI
 	bool "PCI support" if 4xx || 8260
-	default y if !4xx && !8260 && !8xx && !APUS && !PPC_ISERIES
-	default PCI_ISERIES if !4xx && !8260 && !8xx && !APUS && PPC_ISERIES
+	default y if !4xx && !8260 && !8xx && !APUS
 	default PCI_PERMEDIA if !4xx && !8260 && !8xx && APUS
 	default PCI_QSPAN if !4xx && !8260 && 8xx
 	help
@@ -880,10 +726,6 @@
 	bool "PCI for Permedia2"
 	depends on !4xx && !8xx && APUS
 
-config PCI_ISERIES
-	bool "IBM iSeries Native I/O Support"
-	depends on !4xx && !8260 && !8xx && !APUS && PPC_ISERIES
-
 # only elf supported, a.out is not -- Cort
 config KCORE_ELF
 	bool
@@ -977,7 +819,7 @@
 
 config PROC_DEVICETREE
 	bool "Support for Open Firmware device tree in /proc"
-	depends on ALL_PPC
+	depends on ALL_PPC && PROC_FS
 	help
 	  This option adds a device-tree directory under /proc which contains
 	  an image of the device tree that the kernel copies from Open
@@ -985,7 +827,7 @@
 
 config PPC_RTAS
 	bool "Support for RTAS (RunTime Abstraction Services) in /proc"
-	depends on ALL_PPC
+	depends on ALL_PPC && PROC_FS
 	---help---
 	  When you use this option, you will be able to use RTAS from
 	  userspace.
@@ -1030,7 +872,7 @@
 
 config PROC_PREPRESIDUAL
 	bool "Support for reading of PReP Residual Data in /proc"
-	depends on PREP_RESIDUAL
+	depends on PREP_RESIDUAL && PROC_FS
 	help
 	  Enabling this option will create a /proc/residual file which allows
 	  you to get at the residual data on PReP systems.  You will need a tool
@@ -1218,13 +1060,7 @@
 	  Say N here unless you know what you are doing.
 
 config HIGHMEM_START
-	hex "Virtual start address of high memory pool"
-	depends on HIGHMEM_START_BOOL
-	default "0xfe000000"
-
-config HIGHMEM_START
-	hex
-	depends on !HIGHMEM_START_BOOL
+	hex "Virtual start address of high memory pool" if HIGHMEM_START_BOOL
 	default "0xfe000000"
 
 config LOWMEM_SIZE_BOOL
@@ -1240,13 +1076,7 @@
 	  Say N here unless you know what you are doing.
 
 config LOWMEM_SIZE
-	hex "Maximum low memory size (in bytes)"
-	depends on LOWMEM_SIZE_BOOL
-	default "0x20000000"
-
-config LOWMEM_SIZE
-	hex
-	depends on !LOWMEM_SIZE_BOOL
+	hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
 	default "0x20000000"
 
 config KERNEL_START_BOOL
@@ -1261,13 +1091,7 @@
 	  Say N here unless you know what you are doing.
 
 config KERNEL_START
-	hex "Virtual address of kernel base"
-	depends on KERNEL_START_BOOL
-	default "0xc0000000"
-
-config KERNEL_START
-	hex
-	depends on !KERNEL_START_BOOL
+	hex "Virtual address of kernel base" if KERNEL_START_BOOL
 	default "0xc0000000"
 
 config TASK_SIZE_BOOL
@@ -1281,19 +1105,9 @@
 	  Say N here unless you know what you are doing.
 
 config TASK_SIZE
-	hex "Size of user task space"
-	depends on TASK_SIZE_BOOL
-	default "0x80000000"
-
-config TASK_SIZE
-	hex
-	depends on !TASK_SIZE_BOOL
+	hex "Size of user task space" if TASK_SIZE_BOOL
 	default "0x80000000"
 
-config PIN_TLB
-	bool "Pinned Kernel TLBs (860 ONLY)"
-	depends on ADVANCED_OPTIONS && 8xx
-
 config BOOT_LOAD_BOOL
 	bool "Set the boot link/load address"
 	depends on ADVANCED_OPTIONS && !ALL_PPC
@@ -1305,20 +1119,28 @@
 	  Say N here unless you know what you are doing.
 
 config BOOT_LOAD
-	hex "Link/load address for booting"
-	depends on BOOT_LOAD_BOOL
-	default "0x00400000"
+	hex "Link/load address for booting" if BOOT_LOAD_BOOL
+	default "0x00400000" if 40x || 8xx || 8260
+	default "0x00800000"
 
-# If we don't have a custom load, we define one here depending.
-config BOOT_LOAD
-	hex
-	depends on !BOOT_LOAD_BOOL && (40x || 8xx || 8260)
-	default "0x00400000"
+config PIN_TLB
+	bool "Pinned Kernel TLBs (860 ONLY)"
+	depends on ADVANCED_OPTIONS && 8xx
 
-config BOOT_LOAD
-	hex
-	depends on !BOOT_LOAD_BOOL
-	default "0x00800000"
+config SWAP
+	bool "Enable support for swap"
+	depends on ADVANCED_OPTIONS
+	help
+	  This option allows you to turn off support for swapfiles in
+	  the kernel.  This can be useful if you know that your system
+	  will never have swap.
+
+	  Say Y here unless you know what you are doing.
+
+config SWAP
+	bool
+	depends on !ADVANCED_OPTIONS
+	default y
 
 endmenu
 
@@ -1415,47 +1237,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
@@ -1464,78 +1245,7 @@
 
 source "drivers/video/Kconfig"
 
-menu "iSeries device drivers"
-	depends on PPC_ISERIES
-
-config VIOCONS
-	tristate "iSeries Virtual Console Support"
-
-config VIODASD
-	tristate "iSeries Virtual I/O disk support"
-
-config VIODASD_IDE
-	bool "iSeries Virtual disk IDE emulation"
-	depends on VIODASD
-
-config VIOCD
-	tristate "iSeries Virtual I/O CD support"
-
-config VIOCD_AZTECH
-	bool "iSeries Virtual CD Aztech emulation"
-	depends on VIOCD
-
-config VIOTAPE
-	tristate "iSeries Virtual Tape Support"
-
-config VETH
-	tristate "iSeries Virtual Ethernet driver support"
-
-config VIOPATH
-	bool
-	depends on VIOCONS || VIODASD || VIOTAPE || VIOCD
-	default y
-
-config CD_NO_IDESCSI
-	bool
-	depends on VIOCD=y
-	default y
-	---help---
-	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-	  here, otherwise N. Read the CD-ROM-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
-	  Note that the answer to this question doesn't directly affect the
-	  kernel: saying N will just cause the configurator to skip all
-	  the questions about these CD-ROM drives. If you are unsure what you
-	  have, say Y and find out whether you have one of the following
-	  drives.
-
-	  For each of these drivers, a file Documentation/cdrom/{driver_name}
-	  exists. Especially in cases where you do not know exactly which kind
-	  of drive you have you should read there. Most of these drivers use a
-	  file drivers/cdrom/{driver_name}.h where you can define your
-	  interface parameters and switch some internal goodies.
-
-	  All these CD-ROM drivers are also usable as a module ( = code which
-	  can be inserted in and removed from the running kernel whenever you
-	  want). If you want to compile them as module, say M instead of Y and
-	  read <file:Documentation/modules.txt>.
-
-	  If you want to use any of these CD-ROM drivers, you also have to
-	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-	  answer will get "defaulted" for you if you enable any of the Linux
-	  CD-ROM drivers).
-
-config BLK_DEV_IDECD
-	tristate
-	depends on VIOCD=y
-	default y
-
-endmenu
-
-
 menu "Old CD-ROM drivers (not SCSI, not IDE)"
-	depends on !PPC_ISERIES
 
 config CD_NO_IDESCSI
 	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
@@ -1795,10 +1505,23 @@
 config DEBUG_HIGHMEM
 	bool "Highmem debugging"
 	depends on DEBUG_KERNEL && HIGHMEM
+	help
+	  This options enables additional error checking for high memory
+	  systems.  Disable for production systems.
 
 config KALLSYMS
 	bool "Load all symbols for debugging/kksymoops"
+	help
+	  Say Y here to let the kernel print out symbolic crash information and
+	  symbolic stack backtraces. This increases the size of the kernel
+	  somewhat, as all symbols have to be loaded into the kernel image.
+
+config DEBUG_SPINLOCK_SLEEP
+	bool "Sleep-inside-spinlock checking"
 	depends on DEBUG_KERNEL
+	help
+	  If you say Y here, various routines which may sleep will become very
+	  noisy if they are called with a spinlock held.	
 
 config KGDB
 	bool "Include kgdb kernel debugger"
@@ -1866,9 +1589,13 @@
 	bool "Support for early boot texts over serial port"
 	depends on 4xx || GT64260 || LOPEC || MCPN765 || PPLUS || PRPMC800 || SANDPOINT || ZX4500
 
+config OCP
+	bool
+	depends on IBM_OCP
+	default y
+	
 endmenu
 
 source "security/Kconfig"
 
 source "crypto/Kconfig"
-
diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile
--- a/arch/ppc/Makefile	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/Makefile	Wed Jan  8 20:04:32 2003
@@ -37,12 +37,14 @@
 endif
 
 head-y				:= head.o
-head-$(CONFIG_PPC_ISERIES)	:= iSeries_head.o
 head-$(CONFIG_8xx)		:= head_8xx.o
 head-$(CONFIG_4xx)		:= head_4xx.o
 head-$(CONFIG_440)		:= head_44x.o
 
 HEAD := arch/ppc/kernel/$(head-y)
+ifdef CONFIG_6xx
+  HEAD += arch/ppc/kernel/idle_6xx.o
+endif
 
 core-y				+= arch/ppc/kernel/ arch/ppc/platforms/ \
 				   arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/
@@ -50,13 +52,10 @@
 core-$(CONFIG_MATH_EMULATION)	+= arch/ppc/math-emu/
 core-$(CONFIG_XMON)		+= arch/ppc/xmon/
 core-$(CONFIG_APUS)		+= arch/ppc/amiga/
-core-$(CONFIG_PPC_ISERIES)	+= arch/ppc/iSeries/
 drivers-$(CONFIG_8xx)		+= arch/ppc/8xx_io/
 drivers-$(CONFIG_4xx)		+= arch/ppc/4xx_io/
 drivers-$(CONFIG_8260)		+= arch/ppc/8260_io/
 
-makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ppc/boot $(1)
-
 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd pImage vmlinux.sm
 
 .PHONY: $(BOOT_TARGETS) clean archclean archmrproper
@@ -69,14 +68,14 @@
 bzImage: zImage
 
 $(BOOT_TARGETS): vmlinux
-	@$(call makeboot,$@)
+	$(Q)$(MAKE) $(build)=arch/ppc/boot $@
 
 %_config: arch/ppc/configs/%_defconfig
 	rm -f .config arch/ppc/defconfig
 	cp -f arch/ppc/configs/$(@:config=defconfig) .config
 
 archclean:
-	+$(MAKE) -f scripts/Makefile.clean obj=arch/ppc/boot
+	$(Q)$(MAKE) $(clean)=arch/ppc/boot
 
 archmrproper:
 
@@ -113,5 +112,4 @@
 
 CLEAN_FILES +=	include/asm-$(ARCH)/offsets.h.tmp \
 		include/asm-$(ARCH)/offsets.h \
-		arch/$(ARCH)/kernel/asm-offsets.s \
-		arch/$(ARCH)/iSeries/ReleaseData.h
+		arch/$(ARCH)/kernel/asm-offsets.s
diff -Nru a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile
--- a/arch/ppc/boot/Makefile	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/boot/Makefile	Wed Jan  8 20:04:44 2003
@@ -11,6 +11,7 @@
 #
 
 CFLAGS	+= -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
+HOSTCFLAGS += -I$(TOPDIR)/arch/$(ARCH)/boot/include
 
 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
 
@@ -41,5 +42,6 @@
 
 $(BOOT_TARGETS): $(bootdir-y)
 
-$(bootdir-y): $(addprefix $(obj)/,$(subdir-y))
-	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/$@ $(MAKECMDGOALS)
+$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
+		$(addprefix $(obj)/,$(host-progs))
+	$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
diff -Nru a/arch/ppc/boot/common/ofcommon.c b/arch/ppc/boot/common/ofcommon.c
--- a/arch/ppc/boot/common/ofcommon.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,180 +0,0 @@
-/*
- * Copyright (C) Paul Mackerras 1997.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include "zlib.h"
-#include "nonstdio.h"
-#include <asm/bootinfo.h>
-#include <asm/page.h>
-
-/* Information from the linker */
-extern char __sysmap_begin, __sysmap_end;
-
-extern int strcmp(const char *s1, const char *s2);
-extern char *avail_ram, *avail_high;
-extern char *end_avail;
-extern void claim(unsigned int virt, unsigned int size, unsigned int align);
-extern void pause(void);
-
-unsigned int heap_use, heap_max;
-
-struct memchunk {
-    unsigned int size;
-    struct memchunk *next;
-};
-
-static struct memchunk *freechunks;
-
-static void *zalloc(void *x, unsigned items, unsigned size)
-{
-    void *p;
-    struct memchunk **mpp, *mp;
-
-    size *= items;
-    size = (size + 7) & -8;
-    heap_use += size;
-    if (heap_use > heap_max)
-	heap_max = heap_use;
-    for (mpp = &freechunks; (mp = *mpp) != 0; mpp = &mp->next) {
-	if (mp->size == size) {
-	    *mpp = mp->next;
-	    return mp;
-	}
-    }
-    p = avail_ram;
-    avail_ram += size;
-    if (avail_ram > avail_high)
-	avail_high = avail_ram;
-    if (avail_ram > end_avail) {
-	printf("oops... out of memory\n\r");
-	pause();
-    }
-    return p;
-}
-
-static void zfree(void *x, void *addr, unsigned nb)
-{
-    struct memchunk *mp = addr;
-
-    nb = (nb + 7) & -8;
-    heap_use -= nb;
-    if (avail_ram == addr + nb) {
-	avail_ram = addr;
-	return;
-    }
-    mp->size = nb;
-    mp->next = freechunks;
-    freechunks = mp;
-}
-
-#define HEAD_CRC	2
-#define EXTRA_FIELD	4
-#define ORIG_NAME	8
-#define COMMENT		0x10
-#define RESERVED	0xe0
-
-#define DEFLATED	8
-
-void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp)
-{
-    z_stream s;
-    int r, i, flags;
-
-    /* skip header */
-    i = 10;
-    flags = src[3];
-    if (src[2] != DEFLATED || (flags & RESERVED) != 0) {
-	printf("bad gzipped data\n\r");
-	exit();
-    }
-    if ((flags & EXTRA_FIELD) != 0)
-	i = 12 + src[10] + (src[11] << 8);
-    if ((flags & ORIG_NAME) != 0)
-	while (src[i++] != 0)
-	    ;
-    if ((flags & COMMENT) != 0)
-	while (src[i++] != 0)
-	    ;
-    if ((flags & HEAD_CRC) != 0)
-	i += 2;
-    if (i >= *lenp) {
-	printf("gunzip: ran out of data in header\n\r");
-	exit();
-    }
-
-    s.zalloc = zalloc;
-    s.zfree = zfree;
-    r = inflateInit2(&s, -MAX_WBITS);
-    if (r != Z_OK) {
-	printf("inflateInit2 returned %d\n\r", r);
-	exit();
-    }
-    s.next_in = src + i;
-    s.avail_in = *lenp - i;
-    s.next_out = dst;
-    s.avail_out = dstlen;
-    r = inflate(&s, Z_FINISH);
-    if (r != Z_OK && r != Z_STREAM_END) {
-	printf("inflate returned %d msg: %s\n\r", r, s.msg);
-	exit();
-    }
-    *lenp = s.next_out - (unsigned char *) dst;
-    inflateEnd(&s);
-}
-
-/* Make a bi_rec in OF.  We need to be passed a name for BI_BOOTLOADER_ID,
- * a machine type for BI_MACHTYPE, and the location where the end of the
- * bootloader is (PROG_START + PROG_SIZE)
- */
-void make_bi_recs(unsigned long addr, char *name, unsigned int mach,
-		unsigned long progend)
-{
-	unsigned long sysmap_size;
-	struct bi_record *rec;
-
-	/* FIgure out the size of a possible System.map we're going to
-	 * pass along.
-	 * */
-	sysmap_size = (unsigned long)(&__sysmap_end) -
-		(unsigned long)(&__sysmap_begin);
-
-	/* leave a 1MB gap then align to the next 1MB boundary */
-	addr = _ALIGN(addr+ (1<<20) - 1, (1<<20));
-	/* oldworld machine seem very unhappy about this. -- Tom */
-	if (addr >= progend)
-		claim(addr, 0x1000, 0);
-
-	rec = (struct bi_record *)addr;
-	rec->tag = BI_FIRST;
-	rec->size = sizeof(struct bi_record);
-	rec = (struct bi_record *)((unsigned long)rec + rec->size);
-
-	rec->tag = BI_BOOTLOADER_ID;
-	sprintf( (char *)rec->data, name);
-	rec->size = sizeof(struct bi_record) + strlen(name) + 1;
-	rec = (struct bi_record *)((unsigned long)rec + rec->size);
-
-	rec->tag = BI_MACHTYPE;
-	rec->data[0] = mach;
-	rec->data[1] = 1;
-	rec->size = sizeof(struct bi_record) + 2 * sizeof(unsigned long);
-	rec = (struct bi_record *)((unsigned long)rec + rec->size);
-
-	if (sysmap_size) {
-		rec->tag = BI_SYSMAP;
-		rec->data[0] = (unsigned long)(&__sysmap_begin);
-		rec->data[1] = sysmap_size;
-		rec->size = sizeof(struct bi_record) + 2 *
-			sizeof(unsigned long);
-		rec = (struct bi_record *)((unsigned long)rec + rec->size);
-	}
-
-	rec->tag = BI_LAST;
-	rec->size = sizeof(struct bi_record);
-	rec = (struct bi_record *)((unsigned long)rec + rec->size);
-}
diff -Nru a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile
--- a/arch/ppc/boot/openfirmware/Makefile	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/boot/openfirmware/Makefile	Wed Jan  8 20:04:43 2003
@@ -143,7 +143,9 @@
 	$(ADDNOTE) $@
 
 zImage: $(images)/vmlinux.coff $(images)/vmlinux.elf-pmac \
-		$(images)/zImage.chrp $(images)/miboot.image
+		$(images)/zImage.chrp $(images)/zImage.chrp-rs6k \
+		$(images)/miboot.image
 
 zImage.initrd: $(images)/vmlinux.initrd.coff $(images)/vmlinux.initrd.elf-pmac\
-		$(images)/zImage.initrd.chrp $(images)/miboot.initrd.image
+		$(images)/zImage.initrd.chrp $(images)/zImage.initrd.chrp-rs6k\
+		$(images)/miboot.initrd.image
diff -Nru a/arch/ppc/boot/prep/misc.c b/arch/ppc/boot/prep/misc.c
--- a/arch/ppc/boot/prep/misc.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/boot/prep/misc.c	Wed Jan  8 20:04:44 2003
@@ -316,9 +316,31 @@
 
 	{
 		struct bi_record *rec;
-		
-		rec = (struct bi_record *)_ALIGN((unsigned long)(zimage_size) +
+		unsigned long initrd_loc;
+		unsigned long rec_loc = _ALIGN((unsigned long)(zimage_size) +
 				(1 << 20) - 1, (1 << 20));
+		
+		rec = (struct bi_record *)rec_loc;
+
+		/* We need to make sure that the initrd and bi_recs do not
+		 * overlap. */
+		if ( initrd_size ) {
+			initrd_loc = (unsigned long)(&__ramdisk_begin);
+			/* If the bi_recs are in the middle of the current
+			 * initrd, move the initrd to the next MB
+			 * boundary. */
+			if ((rec_loc > initrd_loc) &&
+					((initrd_loc + initrd_size)
+					 > rec_loc)) {
+				initrd_loc = _ALIGN((unsigned long)(zimage_size)
+						+ (2 << 20) - 1, (2 << 20));
+			 	memmove((void *)initrd_loc, &__ramdisk_begin,
+					 initrd_size);
+		         	puts("initrd moved:  "); puthex(initrd_loc);
+			 	puts(" "); puthex(initrd_loc + initrd_size);
+			 	puts("\n");
+			}
+		}
 
 		rec->tag = BI_FIRST;
 		rec->size = sizeof(struct bi_record);
@@ -348,7 +370,7 @@
 
 		if ( initrd_size ) {
 			rec->tag = BI_INITRD;
-			rec->data[0] = (unsigned long)(&__ramdisk_begin);
+			rec->data[0] = initrd_loc;
 			rec->data[1] = initrd_size;
 			rec->size = sizeof(struct bi_record) + 2 *
 				sizeof(unsigned long);
diff -Nru a/arch/ppc/boot/prep/of1275.c b/arch/ppc/boot/prep/of1275.c
--- a/arch/ppc/boot/prep/of1275.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,427 +0,0 @@
-/* Open Firmware Client Interface */
-
-
-#include "of1275.h"
-
-
-static int (*of_server)(void *) = (int(*)(void*))-1;
-
-void
-of_init(void *handler)
-{
-	of_server = (int(*)(void*))handler;
-}
-
-
-/* 6.3.2.1 Client interface */
-
-
-int
-of_test(const char *name, int *missing)
-{
-	int result;
-	static of_test_service s;
-	s.service = "test";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.name = name;
-	result = of_server(&s);
-	*missing = s.missing;
-	return result;
-}
-
-
-/* 6.3.2.2 Device tree */
-
-
-int
-of_peer(int phandle, int *sibling_phandle)
-{
-	int result;
-	static of_peer_service s;
-	s.service = "peer";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	result = of_server(&s);
-	*sibling_phandle = s.sibling_phandle;
-	return result;
-}
-
-int
-of_child(int phandle, int *child_phandle)
-{
-	int result;
-	static of_child_service s;
-	s.service = "child";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	result = of_server(&s);
-	*child_phandle = s.child_phandle;
-	return result;
-}
-
-int
-of_parent(int phandle, int *parent_phandle)
-{
-	int result;
-	static of_parent_service s;
-	s.service = "parent";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	result = of_server(&s);
-	*parent_phandle = s.parent_phandle;
-	return result;
-}
-
-int
-of_instance_to_package(int ihandle, int *phandle)
-{
-	int result;
-	static of_instance_to_package_service s;
-	s.service = "instance-to-package";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.ihandle = ihandle;
-	result = of_server(&s);
-	*phandle = s.phandle;
-	return result;
-}
-
-int
-of_getproplen(int phandle, const char *name, int *proplen)
-{
-	int result;
-	static of_getproplen_service s;
-	s.service = "getproplen";
-	s.n_args = 2;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	s.name = name;
-	result = of_server(&s);
-	*proplen = s.proplen;
-	return result;
-}
-
-int
-of_getprop(int phandle, const char *name, void *buf, int buflen, int *size)
-{
-	int result;
-	static of_getprop_service s;
-	s.service = "getprop";
-	s.n_args = 4;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	s.name = name;
-	s.buf = buf;
-	s.buflen = buflen;
-	result = of_server(&s);
-	*size = s.size;
-	return result;
-}
-
-int
-of_nextprop(int phandle, const char *previous, void *buf, int *flag)
-{
-	int result;
-	static of_nextprop_service s;
-	s.service = "nextprop";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	s.previous = previous;
-	s.buf = buf;
-	result = of_server(&s);
-	*flag = s.flag;
-	return result;
-}
-
-int
-of_setprop(int phandle, const char *name, void *buf, int len, int *size)
-{
-	int result;
-	static of_setprop_service s;
-	s.service = "setprop";
-	s.n_args = 4;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	s.name = name;
-	s.buf = buf;
-	s.len = len;
-	result = of_server(&s);
-	*size = s.size;
-	return result;
-}
-
-int
-of_canon(const char *device_specifier, void *buf, int buflen, int *length)
-{
-	int result;
-	static of_canon_service s;
-	s.service = "canon";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.device_specifier = device_specifier;
-	s.buf = buf;
-	s.buflen = buflen;
-	result = of_server(&s);
-	*length = s.length;
-	return result;
-}
-
-int
-of_finddevice(const char *device_specifier, int *phandle)
-{
-	int result;
-	static of_finddevice_service s;
-	s.service = "finddevice";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.device_specifier = device_specifier;
-	result = of_server(&s);
-	*phandle = s.phandle;
-	return result;
-}
-
-int
-of_instance_to_path(int ihandle, void *buf, int buflen, int *length)
-{
-	int result;
-	static of_instance_to_path_service s;
-	s.service = "instance-to-path";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.ihandle = ihandle;
-	s.buf = buf;
-	s.buflen = buflen;
-	result = of_server(&s);
-	*length = s.length;
-	return result;
-}
-
-int
-of_package_to_path(int phandle, void *buf, int buflen, int *length)
-{
-	int result;
-	static of_package_to_path_service s;
-	s.service = "package-to-path";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.phandle = phandle;
-	s.buf = buf;
-	s.buflen = buflen;
-	result = of_server(&s);
-	*length = s.length;
-	return result;
-}
-
-/* int of_call_method(const char *method, int ihandle, ...); */
-
-
-/* 6.3.2.3 Device I/O */
-
-
-int
-of_open(const char *device_specifier, int *ihandle)
-{
-	int result;
-	static of_open_service s;
-	s.service = "open";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.device_specifier = device_specifier;
-	result = of_server(&s);
-	*ihandle = s.ihandle;
-	return result;
-}
-
-int
-of_close(int ihandle)
-{
-	int result;
-	static of_close_service s;
-	s.service = "close";
-	s.n_args = 1;
-	s.n_returns = 0;
-	s.ihandle = ihandle;
-	result = of_server(&s);
-	return result;
-}
-
-int
-of_read(int ihandle, void *addr, int len, int *actual)
-{
-	int result;
-	static of_read_service s;
-	s.service = "read";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.ihandle = ihandle;
-	s.addr = addr;
-	s.len = len;
-	result = of_server(&s);
-	*actual = s.actual;
-	return result;
-}
-
-int
-of_write(int ihandle, void *addr, int len, int *actual)
-{
-	int result;
-	static of_write_service s;
-	s.service = "write";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.ihandle = ihandle;
-	s.addr = addr;
-	s.len = len;
-	result = of_server(&s);
-	*actual = s.actual;
-	return result;
-}
-
-int
-of_seek(int ihandle, int pos_hi, int pos_lo, int *status)
-{
-	int result;
-	static of_seek_service s;
-	s.service = "seek";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.ihandle = ihandle;
-	s.pos_hi = pos_hi;
-	s.pos_lo = pos_lo;
-	result = of_server(&s);
-	*status = s.status;
-	return result;
-}
-
-
-/* 6.3.2.4 Memory */
-
-
-int
-of_claim(void *virt, int size, int align, void **baseaddr)
-{
-	int result;
-	static of_claim_service s;
-	s.service = "claim";
-	s.n_args = 3;
-	s.n_returns = 1;
-	s.virt = virt;
-	s.size = size;
-	s.align = align;
-	result = of_server(&s);
-	*baseaddr = s.baseaddr;
-	return result;
-}
-
-int
-of_release(void *virt, int size)
-{
-	int result;
-	static of_release_service s;
-	s.service = "release";
-	s.n_args = 2;
-	s.n_returns = 0;
-	s.virt = virt;
-	s.size = size;
-	result = of_server(&s);
-	return result;
-}
-
-
-/* 6.3.2.5 Control transfer */
-
-
-int
-of_boot(const char *bootspec)
-{
-	int result;
-	static of_boot_service s;
-	s.service = "boot";
-	s.n_args = 1;
-	s.n_returns = 0;
-	s.bootspec = bootspec;
-	result = of_server(&s);
-	return result;
-}
-
-int
-of_enter(void)
-{
-	int result;
-	static of_enter_service s;
-	s.service = "enter";
-	s.n_args = 0;
-	s.n_returns = 0;
-	result = of_server(&s);
-	return result;
-}
-
-int
-of_exit(void)
-{
-	int result;
-	static of_exit_service s;
-	s.service = "exit";
-	s.n_args = 0;
-	s.n_returns = 0;
-	result = of_server(&s);
-	return result;
-}
-
-/* int of_chain(void *virt, int size, void *entry, void *args, int len); */
-
-
-/* 6.3.2.6 User interface */
-
-
-/* int of_interpret(const char *arg, ...); */
-
-int
-of_set_callback(void *newfunc, void **oldfunc)
-{
-	int result;
-	static of_set_callback_service s;
-	s.service = "set-callback";
-	s.n_args = 1;
-	s.n_returns = 1;
-	s.newfunc = newfunc;
-	result = of_server(&s);
-	*oldfunc = s.oldfunc;
-	return result;
-}
-
-int
-of_set_symbol_lookup(void *sym_to_value, void *value_to_sym)
-{
-	int result;
-	static of_set_symbol_lookup_service s;
-	s.service = "set-symbol-lookup";
-	s.n_args = 2;
-	s.n_returns = 0;
-	s.sym_to_value = sym_to_value;
-	s.value_to_sym = s.value_to_sym;
-	result = of_server(&s);
-	return result;
-}
-
-
-/* 6.3.2.7 Time */
-
-
-int
-of_milliseconds(int *ms)
-{
-	int result;
-	static of_milliseconds_service s;
-	s.service = "milliseconds";
-	s.n_args = 0;
-	s.n_returns = 1;
-	result = of_server(&s);
-	*ms = s.ms;
-	return result;
-}
diff -Nru a/arch/ppc/boot/prep/of1275.h b/arch/ppc/boot/prep/of1275.h
--- a/arch/ppc/boot/prep/of1275.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,421 +0,0 @@
-/* 6.3.2.1 Client interface */
-
-
-typedef struct _of_test_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	const char *name;
-	/*out*/
-	int missing;
-} of_test_service;
-
-int of_test(const char *name, int *missing);
-
-
-/* 6.3.2.2 Device tree */
-
-
-typedef struct _of_peer_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	/*out*/
-	int sibling_phandle;
-} of_peer_service;
-
-int of_peer(int phandle, int *sibling_phandle);
-
-
-typedef struct _of_child_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	/*out*/
-	int child_phandle;
-} of_child_service;
-
-int of_child(int phandle, int *child_phandle);
-
-
-typedef struct _of_parent_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	/*out*/
-	int parent_phandle;
-} of_parent_service;
-
-int of_child(int phandle, int *parent_phandle);
-
-
-typedef struct _of_instance_to_package_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int ihandle;
-	/*out*/
-	int phandle;
-} of_instance_to_package_service;
-
-int of_instance_to_package(int ihandle, int *phandle);
-
-
-typedef struct _of_getproplen_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	const char *name;
-	/*out*/
-	int proplen;
-} of_getproplen_service;
-
-int of_getproplen(int phandle, const char *name, int *proplen);
-
-
-typedef struct _of_getprop_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	const char *name;
-	void *buf;
-	int buflen;
-	/*out*/
-	int size;
-} of_getprop_service;
-
-int of_getprop(int phandle, const char *name, void *buf, int buflen,
-	       int *size);
-
-
-typedef struct _of_nextprop_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	const char *previous;
-	void *buf;
-	/*out*/
-	int flag;
-} of_nextprop_service;
-
-int of_nextprop(int phandle, const char *previous, void *buf, int *flag);
-
-
-typedef struct _of_setprop_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	const char *name;
-	void *buf;
-	int len;
-	/*out*/
-	int size;
-} of_setprop_service;
-
-int of_setprop(int phandle, const char *name, void *buf, int len, int *size);
-
-
-typedef struct _of_canon_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	const char *device_specifier;
-	void *buf;
-	int buflen;
-	/*out*/
-	int length;
-} of_canon_service;
-
-int of_canon(const char *device_specifier, void *buf, int buflen, int *length);
-
-
-typedef struct _of_finddevice_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	const char *device_specifier;
-	/*out*/
-	int phandle;
-} of_finddevice_service;
-
-int of_finddevice(const char *device_specifier, int *phandle);
-
-
-typedef struct _of_instance_to_path_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int ihandle;
-	void *buf;
-	int buflen;
-	/*out*/
-	int length;
-} of_instance_to_path_service;
-
-int of_instance_to_path(int ihandle, void *buf, int buflen, int *length);
-
-
-typedef struct _of_package_to_path_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int phandle;
-	void *buf;
-	int buflen;
-	/*out*/
-	int length;
-} of_package_to_path_service;
-
-int of_package_to_path(int phandle, void *buf, int buflen, int *length);
-
-
-typedef struct _of_call_method_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	const char *method;
-	int ihandle;
-	/*...*/
-	int args[0]; 
-} of_call_method_service;
-
-int of_call_method(const char *method, int ihandle, ...);
-
-
-/* 6.3.2.3 Device I/O */
-
-
-typedef struct _of_open_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	const char *device_specifier;
-	/*out*/
-	int ihandle;
-} of_open_service;
-
-int of_open(const char *device_specifier,
-	    int *ihandle);
-
-
-typedef struct _of_close_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int ihandle;
-	/*out*/
-} of_close_service;
-
-int of_close(int ihandle);
-
-
-typedef struct _of_read_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int ihandle;
-	void *addr;
-	int len;
-	/*out*/
-	int actual;
-} of_read_service;
-
-int of_read(int ihandle, void *addr, int len, int *actual);
-
-
-typedef struct _of_write_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int ihandle;
-	void *addr;
-	int len;
-	/*out*/
-	int actual;
-} of_write_service;
-
-int of_write(int ihandle, void *addr, int len, int *actual);
-
-
-typedef struct _of_seek_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	int ihandle;
-	int pos_hi;
-	int pos_lo;
-	/*out*/
-	int status;
-} of_seek_service;
-
-int of_seek(int ihandle, int pos_hi, int pos_lo, int *status);
-
-
-/* 6.3.2.4 Memory */
-
-
-typedef struct _of_claim_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	void *virt;
-	int size;
-	int align;
-	/*out*/
-	void *baseaddr;
-} of_claim_service;
-
-int of_claim(void *virt, int size, int align, void **baseaddr);
-
-
-typedef struct _of_release_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	void *virt;
-	int size;
-	int align;
-	/*out*/
-} of_release_service;
-
-int of_release(void *virt, int size);
-
-
-/* 6.3.2.5 Control transfer */
-
-
-typedef struct _of_boot_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	const char *bootspec;
-	/*out*/
-} of_boot_service;
-
-int of_boot(const char *bootspec);
-
-
-typedef struct _of_enter_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	/*out*/
-} of_enter_service;
-
-int of_enter(void);
-
-
-typedef struct _of_exit_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	/*out*/
-} of_exit_service;
-
-int of_exit(void);
-
-
-typedef struct _of_chain_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	void *virt;
-	int size;
-	void *entry;
-	void *args;
-	int len;
-	/*out*/
-} of_chain_service;
-
-int of_chain(void *virt, int size, void *entry, void *args, int len);
-
-
-/* 6.3.2.6 User interface */
-
-
-typedef struct _of_interpret_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	const char *cmd;
-	int args[0];
-	/*...*/
-	/*out*/
-	/*...*/
-} of_interpret_service;
-
-int of_interpret(const char *arg, ...);
-
-
-typedef struct _of_set_callback_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	void *newfunc;
-	/*out*/
-	void *oldfunc;
-} of_set_callback_service;
-
-int of_set_callback(void *newfunc, void **oldfunc);
-
-
-typedef struct _of_set_symbol_lookup_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	void *sym_to_value;
-	void *value_to_sym;
-	/*out*/
-} of_set_symbol_lookup_service;
-
-int of_set_symbol_lookup(void *sym_to_value, void *value_to_sym);
-
-
-/* 6.3.2.7 Time */
-
-
-typedef struct _of_milliseconds_service {
-	const char *service;
-	int n_args;
-	int n_returns;
-	/*in*/
-	/*out*/
-	int ms;
-} of_milliseconds_service;
-
-int of_milliseconds(int *ms);
diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
--- a/arch/ppc/boot/simple/Makefile	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/boot/simple/Makefile	Wed Jan  8 20:04:32 2003
@@ -217,17 +217,17 @@
 	dd if=$(obj)/zvmlinux.initrd of=$(images)/zImage.initrd.$(END) \
 		skip=64 bs=1k
 
-$(images)/zImage-TREE: $(obj)/zvmlinux
+$(images)/zImage-TREE: $(obj)/zvmlinux $(MKTREE)
 	$(MKTREE) $(obj)/zvmlinux $(images)/zImage.$(END) $(ENTRYPOINT)
 
-$(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd
+$(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE)
 	$(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(END) \
 		$(ENTRYPOINT)
 
-$(images)/zImage-MENF1: $(obj)/zvmlinux
+$(images)/zImage-MENF1: $(obj)/zvmlinux $(MKPREP)
 	$(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.menf1
 
-$(images)/zImage.initrd-MENF1: $(obj)/zvmlinux.initrd
+$(images)/zImage.initrd-MENF1: $(obj)/zvmlinux.initrd $(MKPREP)
 	$(MKPREP) -pbp $(obj)/zvmlinux.initrd $(images)/zImage.initrd.menf1
 
 $(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT)
diff -Nru a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c
--- a/arch/ppc/boot/simple/embed_config.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/boot/simple/embed_config.c	Wed Jan  8 20:04:43 2003
@@ -655,6 +655,7 @@
 }
 #endif /* WILLOW */
 
+#ifdef CONFIG_XILINX_ML300
 void
 embed_config(bd_t ** bdp)
 {
@@ -688,6 +689,7 @@
 	bd->bi_intfreq = XPAR_CORE_CLOCK_FREQ_HZ;
 	bd->bi_busfreq = XPAR_PLB_CLOCK_FREQ_HZ;
 }
+#endif /* CONFIG_XILINX_ML300 */
 
 #ifdef CONFIG_IBM_OPENBIOS
 /* This could possibly work for all treeboot roms.
@@ -801,7 +803,7 @@
 	 * just to be sure. */
 	mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR);     /* 1st reset MAL */
 	while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {}; /* wait for the reset */	
-	out_be32(EMAC0_BASE,0x20000000);        /* then reset EMAC */
+	out_be32((unsigned *)EMAC0_BASE,0x20000000);        /* then reset EMAC */
 
 	bd = &bdinfo;
 	*bdp = bd;
diff -Nru a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c
--- a/arch/ppc/boot/simple/misc-embedded.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/boot/simple/misc-embedded.c	Wed Jan  8 20:04:43 2003
@@ -9,6 +9,7 @@
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/elf.h>
+#include <linux/string.h>
 #include <asm/bootinfo.h>
 #include <asm/ibm4xx.h>
 #include <asm/mmu.h>
@@ -208,9 +209,30 @@
 	puts("done.\n");
 	{
 		struct bi_record *rec;
+		unsigned long initrd_loc;
+		unsigned long rec_loc = _ALIGN((unsigned long)(zimage_size) +
+				(1 << 20) - 1, (1 << 20));
+		rec = (struct bi_record *)rec_loc;
 
-		rec = (struct bi_record *)_ALIGN((unsigned long)zimage_size +
-				(1 << 20) - 1,(1 << 20));
+		/* We need to make sure that the initrd and bi_recs do not
+		 * overlap. */
+		if ( initrd_size ) {
+			initrd_loc = (unsigned long)(&__ramdisk_begin);
+			/* If the bi_recs are in the middle of the current
+			 * initrd, move the initrd to the next MB
+			 * boundary. */
+			if ((rec_loc > initrd_loc) &&
+					((initrd_loc + initrd_size)
+					 > rec_loc)) {
+				initrd_loc = _ALIGN((unsigned long)(zimage_size)
+						+ (2 << 20) - 1, (2 << 20));
+			 	memmove((void *)initrd_loc, &__ramdisk_begin,
+					 initrd_size);
+		         	puts("initrd moved:  "); puthex(initrd_loc);
+			 	puts(" "); puthex(initrd_loc + initrd_size);
+			 	puts("\n");
+			}
+		}
 
 		rec->tag = BI_FIRST;
 		rec->size = sizeof(struct bi_record);
@@ -223,7 +245,7 @@
 
 		if ( initrd_size ) {
 			rec->tag = BI_INITRD;
-			rec->data[0] = (unsigned long)(&__ramdisk_begin);
+			rec->data[0] = initrd_loc;
 			rec->data[1] = initrd_size;
 			rec->size = sizeof(struct bi_record) + 2 *
 				sizeof(unsigned long);
diff -Nru a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c
--- a/arch/ppc/boot/simple/misc-spruce.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/boot/simple/misc-spruce.c	Wed Jan  8 20:04:44 2003
@@ -396,9 +396,30 @@
 
 	{
 		struct bi_record *rec;
-
-		rec = (struct bi_record *)_ALIGN((ulong)zimage_size +
-							(1<<20)-1,(1<<20));
+		unsigned long initrd_loc;
+		unsigned long rec_loc = _ALIGN((unsigned long)(zimage_size) +
+				(1 << 20) - 1, (1 << 20));
+		rec = (struct bi_record *)rec_loc;
+  
+		/* We need to make sure that the initrd and bi_recs do not
+		 * overlap. */
+		if ( initrd_size ) {
+			initrd_loc = (unsigned long)(&__ramdisk_begin);
+			/* If the bi_recs are in the middle of the current
+			 * initrd, move the initrd to the next MB
+			 * boundary. */
+			if ((rec_loc > initrd_loc) &&
+					((initrd_loc + initrd_size)
+					 > rec_loc)) {
+				initrd_loc = _ALIGN((unsigned long)(zimage_size)
+						+ (2 << 20) - 1, (2 << 20));
+			 	memmove((void *)initrd_loc, &__ramdisk_begin,
+					 initrd_size);
+		         	puts("initrd moved:  "); puthex(initrd_loc);
+			 	puts(" "); puthex(initrd_loc + initrd_size);
+			 	puts("\n");
+			}
+		}
 
 		rec->tag = BI_FIRST;
         	rec->size = sizeof(struct bi_record);
@@ -421,7 +442,7 @@
 
 		if ( initrd_size ) {
 			rec->tag = BI_INITRD;
-			rec->data[0] = (unsigned long)(&__ramdisk_begin);
+			rec->data[0] = initrd_loc;
 			rec->data[1] = initrd_size;
 			rec->size = sizeof(struct bi_record) + 2 *
 				sizeof(unsigned long);
diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
--- a/arch/ppc/boot/simple/misc.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/boot/simple/misc.c	Wed Jan  8 20:04:45 2003
@@ -76,8 +76,8 @@
 {
 	int timer = 0;
 	char *cp, ch;
-	struct bi_record *rec, *birecs;
-	unsigned long TotalMemory = 0;
+	struct bi_record *rec;
+	unsigned long TotalMemory = 0, rec_loc, initrd_loc;
 
 	serial_fixups();
 	com_port = serial_init(0, NULL);
@@ -197,10 +197,29 @@
 	/*
 	 * Create bi_recs for cmd_line and initrds
 	 */
-	rec = (struct bi_record *)_ALIGN((unsigned long)(zimage_size) +
+	rec_loc = _ALIGN((unsigned long)(zimage_size) +
 			(1 << 20) - 1, (1 << 20));
-	birecs = rec;
+	rec = (struct bi_record *)rec_loc;
 
+	/* We need to make sure that the initrd and bi_recs do not
+	 * overlap. */
+	if ( initrd_size ) {
+		initrd_loc = (unsigned long)(&__ramdisk_begin);
+		/* If the bi_recs are in the middle of the current
+		 * initrd, move the initrd to the next MB
+		 * boundary. */
+		if ((rec_loc > initrd_loc) &&
+				((initrd_loc + initrd_size) > rec_loc)) {
+			initrd_loc = _ALIGN((unsigned long)(zimage_size)
+					+ (2 << 20) - 1, (2 << 20));
+		 	memmove((void *)initrd_loc, &__ramdisk_begin,
+				 initrd_size);
+	         	puts("initrd moved:  "); puthex(initrd_loc);
+		 	puts(" "); puthex(initrd_loc + initrd_size);
+		 	puts("\n");
+		}
+	}
+ 
 	rec->tag = BI_FIRST;
 	rec->size = sizeof(struct bi_record);
 	rec = (struct bi_record *)((unsigned long)rec + rec->size);
@@ -219,7 +238,7 @@
 
 	if ( initrd_size ) {
 		rec->tag = BI_INITRD;
-		rec->data[0] = (unsigned long)(&__ramdisk_begin);
+		rec->data[0] = initrd_loc;
 		rec->data[1] = initrd_size;
 		rec->size = sizeof(struct bi_record) + 2 *
 			sizeof(unsigned long);
@@ -233,5 +252,5 @@
 	puts("Now booting the kernel\n");
 	serial_close(com_port);
 
-	return birecs;
+	return (struct bi_record *)rec_loc;
 }
diff -Nru a/arch/ppc/configs/FADS_defconfig b/arch/ppc/configs/FADS_defconfig
--- a/arch/ppc/configs/FADS_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/FADS_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,10 +39,15 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
 CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
@@ -50,113 +71,129 @@
 # CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
-# CONFIG_PPC601_SYNC_FIX is not set
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_VIODASD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+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_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -169,26 +206,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -199,39 +220,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_ARM_AM79C961A is not set
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_NCR885E is not set
+# CONFIG_CRC32 is not set
 # CONFIG_OAKNET is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VETH is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -241,11 +235,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -266,7 +257,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -274,18 +277,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
 
 #
 # Macintosh device drivers
@@ -295,12 +304,22 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
-# CONFIG_VIOCONS is not set
 
 #
 # I2C support
@@ -308,33 +327,30 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_JOYSTICK is not set
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
-# CONFIG_VIOTAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
-# CONFIG_SONYPI is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -342,6 +358,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -355,65 +372,56 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_TMPFS is not set
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_EXT2_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -429,8 +437,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -461,7 +468,6 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
 
 #
 # Bluetooth support
@@ -469,9 +475,21 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/IVMS8_defconfig b/arch/ppc/configs/IVMS8_defconfig
--- a/arch/ppc/configs/IVMS8_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/IVMS8_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,11 +39,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 # CONFIG_RPXCLASSIC is not set
 # CONFIG_BSEIP is not set
@@ -37,119 +59,166 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 CONFIG_IVMS8=y
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_BLK_DEV_MPC8xx_IDE=y
+CONFIG_IDE_8xx_PCCARD=y
+# CONFIG_IDE_8xx_DIRECT is not set
+# CONFIG_IDE_EXT_DIRECT is not set
+CONFIG_BLK_DEV_IDE_MODES=y
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -162,59 +231,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_BLK_DEV_IDECS is not set
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-
-#
-# IDE chipset support/bugfixes
-#
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-CONFIG_BLK_DEV_MPC8xx_IDE=y
-CONFIG_IDE_8xx_PCCARD=y
-# CONFIG_IDE_8xx_DIRECT is not set
-# CONFIG_IDE_EXT_DIRECT is not set
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-CONFIG_BLK_DEV_IDE_MODES=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -225,35 +245,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -263,11 +260,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -288,7 +282,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -296,22 +302,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -321,9 +329,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
 
@@ -333,32 +352,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -369,6 +383,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -382,66 +397,59 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -457,8 +465,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -471,6 +478,10 @@
 # CONFIG_SCC_ENET is not set
 CONFIG_FEC_ENET=y
 CONFIG_USE_MDIO=y
+CONFIG_FEC_AM79C874=y
+CONFIG_FEC_LXT970=y
+CONFIG_FEC_LXT971=y
+CONFIG_FEC_QS6612=y
 CONFIG_ENET_BIG_BUFFERS=y
 # CONFIG_SMC2_UART is not set
 # CONFIG_USE_SCC_IO is not set
@@ -485,113 +496,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
 
 #
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/SM850_defconfig b/arch/ppc/configs/SM850_defconfig
--- a/arch/ppc/configs/SM850_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/SM850_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,11 +39,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 # CONFIG_RPXCLASSIC is not set
 # CONFIG_BSEIP is not set
@@ -37,120 +59,142 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 CONFIG_SM850=y
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
 CONFIG_TQM8xxL=y
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -163,26 +207,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -193,35 +221,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -231,11 +236,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -256,7 +258,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -264,22 +278,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -289,9 +305,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
 
@@ -301,32 +328,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -337,6 +359,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -350,66 +373,56 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_EXT2_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -425,8 +438,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -457,113 +469,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/SPD823TS_defconfig b/arch/ppc/configs/SPD823TS_defconfig
--- a/arch/ppc/configs/SPD823TS_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/SPD823TS_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,11 +39,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 # CONFIG_RPXCLASSIC is not set
 # CONFIG_BSEIP is not set
@@ -37,119 +59,141 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 CONFIG_SPD823TS=y
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -162,26 +206,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -192,35 +220,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -230,11 +235,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -255,7 +257,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -263,22 +277,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -288,9 +304,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
 
@@ -300,32 +327,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -336,6 +358,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -349,66 +372,56 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_EXT2_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -424,8 +437,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -456,113 +468,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/TQM823L_defconfig b/arch/ppc/configs/TQM823L_defconfig
--- a/arch/ppc/configs/TQM823L_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/TQM823L_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,11 +39,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 # CONFIG_RPXCLASSIC is not set
 # CONFIG_BSEIP is not set
@@ -37,120 +59,142 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
 CONFIG_TQM8xxL=y
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -163,26 +207,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -193,35 +221,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -231,11 +236,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -256,7 +258,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -264,22 +278,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -289,9 +305,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
 
@@ -301,32 +328,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -337,6 +359,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -350,66 +373,56 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_EXT2_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -425,8 +438,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -457,113 +469,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/TQM8260_defconfig b/arch/ppc/configs/TQM8260_defconfig
--- a/arch/ppc/configs/TQM8260_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/TQM8260_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,56 +11,86 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
 # Platform support
 #
 CONFIG_PPC=y
+CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_8260=y
+CONFIG_PPC_STD_MMU=y
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_EST8260 is not set
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX6 is not set
 CONFIG_TQM8260=y
-# CONFIG_PPC601_SYNC_FIX is not set
-# CONFIG_ALL_PPC is not set
+# CONFIG_WILLOW_1 is not set
 # CONFIG_SMP is not set
-CONFIG_MACH_SPECIFIC=y
-CONFIG_SASH=y
-CONFIG_SASH_PATH="/bin/sash"
+# CONFIG_PREEMPT is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PC_KEYBOARD is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
+# CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
 
 #
 # Memory Technology Devices (MTD)
@@ -68,20 +98,14 @@
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -92,48 +116,70 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -146,61 +192,26 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 # CONFIG_ETHERTAP is not set
-# CONFIG_NET_SB1000 is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_NCR885E is not set
+# CONFIG_CRC32 is not set
 # CONFIG_OAKNET is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -210,11 +221,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -235,29 +243,46 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
 
 #
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
+
+#
 # Macintosh device drivers
 #
 
@@ -265,9 +290,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
 
@@ -277,34 +313,30 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_JOYSTICK is not set
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
-CONFIG_FLASH=y
-CONFIG_AMD_FLASH=y
-# CONFIG_INTEL_FLASH is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -312,6 +344,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -325,65 +358,57 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_TMPFS is not set
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
-# CONFIG_SYSV_FS_WRITE is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -395,40 +420,58 @@
 # 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_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
 #
 # CONFIG_SOUND is not set
+# CONFIG_SCC_ENET is not set
+CONFIG_FEC_ENET=y
+# CONFIG_USE_MDIO is not set
 
 #
-# MPC8260 Communication Options
+# MPC8260 CPM Options
 #
-# CONFIG_SCC_ENET is not set
-CONFIG_FEC_ENET=y
+CONFIG_SCC_CONSOLE=y
 # CONFIG_FCC1_ENET is not set
 CONFIG_FCC2_ENET=y
 # CONFIG_FCC3_ENET is not set
-# CONFIG_USE_MDIO is not set
 
 #
-# Generic MPC82xx Options
+# Generic MPC8260 Options
 #
 CONFIG_DCACHE_DISABLE=y
 
 #
 # USB support
 #
-# CONFIG_USB is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
+# Library routines
+#
 
 #
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/TQM850L_defconfig b/arch/ppc/configs/TQM850L_defconfig
--- a/arch/ppc/configs/TQM850L_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/TQM850L_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,11 +39,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 # CONFIG_RPXCLASSIC is not set
 # CONFIG_BSEIP is not set
@@ -37,120 +59,142 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
 CONFIG_TQM8xxL=y
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -163,26 +207,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -193,35 +221,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -231,11 +236,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -256,7 +258,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -264,22 +278,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -289,9 +305,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
 
@@ -301,32 +328,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -337,6 +359,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -350,66 +373,56 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_EXT2_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -425,8 +438,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -457,113 +469,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/TQM860L_defconfig b/arch/ppc/configs/TQM860L_defconfig
--- a/arch/ppc/configs/TQM860L_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/TQM860L_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,11 +39,15 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
 CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
@@ -50,116 +70,156 @@
 # CONFIG_CCM is not set
 # CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
-# CONFIG_IDIF860 is not set
 # CONFIG_WINCEPT is not set
 CONFIG_TQM8xxL=y
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_VIODASD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_BLK_DEV_MPC8xx_IDE=y
+CONFIG_IDE_8xx_PCCARD=y
+# CONFIG_IDE_8xx_DIRECT is not set
+# CONFIG_IDE_EXT_DIRECT is not set
+CONFIG_BLK_DEV_IDE_MODES=y
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -172,59 +232,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
-# CONFIG_BLK_DEV_IDECD is not set
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-
-#
-# IDE chipset support/bugfixes
-#
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-CONFIG_BLK_DEV_MPC8xx_IDE=y
-CONFIG_IDE_8xx_PCCARD=y
-# CONFIG_IDE_8xx_DIRECT is not set
-# CONFIG_IDE_EXT_DIRECT is not set
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-CONFIG_BLK_DEV_IDE_MODES=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -235,36 +246,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VETH is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -274,11 +261,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -299,7 +283,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -307,22 +303,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -332,12 +330,22 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=32
-# CONFIG_VIOCONS is not set
 
 #
 # I2C support
@@ -345,33 +353,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
-# CONFIG_VIOTAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -382,6 +384,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -395,66 +398,57 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -474,8 +468,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -491,20 +484,10 @@
 # CONFIG_SCC3_ENET is not set
 # CONFIG_FEC_ENET is not set
 CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_SMC1_UART_RX_BDNUM=4
-CONFIG_SMC1_UART_RX_BDSIZE=32
-CONFIG_SMC1_UART_TX_BDNUM=4
-CONFIG_SMC1_UART_TX_BDSIZE=32
 CONFIG_SMC2_UART=y
 # CONFIG_ALTSMC2 is not set
 # CONFIG_CONS_SMC2 is not set
-CONFIG_UART_MAXIDL_SMC2=1
-CONFIG_SMC2_UART_RX_BDNUM=4
-CONFIG_SMC2_UART_RX_BDSIZE=32
-CONFIG_SMC2_UART_TX_BDNUM=4
-CONFIG_SMC2_UART_TX_BDSIZE=32
 # CONFIG_USE_SCC_IO is not set
-CONFIG_STATUS_LED=y
 
 #
 # Generic MPC8xx Options
@@ -516,114 +499,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
 
 #
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/adir_defconfig b/arch/ppc/configs/adir_defconfig
--- a/arch/ppc/configs/adir_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/adir_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,29 +39,39 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
 # CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
 CONFIG_ADIR=y
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
-# CONFIG_WILLOW is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -53,22 +79,13 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
@@ -79,38 +96,45 @@
 # CONFIG_PARPORT_SERIAL is not set
 CONFIG_PARPORT_PC_FIFO=y
 CONFIG_PARPORT_PC_SUPERIO=y
-# CONFIG_PARPORT_AMIGA is not set
-# CONFIG_PARPORT_MFC3 is not set
-# CONFIG_PARPORT_ATARI is not set
-# CONFIG_PARPORT_SUNBPP is not set
 # CONFIG_PARPORT_OTHER is not set
 CONFIG_PARPORT_1284=y
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=y
-# CONFIG_VIODASD is not set
-# CONFIG_BLK_DEV_XD is not set
 # CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -121,110 +145,32 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
-
-#
-#   IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_MIRROR=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
 #
 # CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI support
 #
 CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 CONFIG_CHR_DEV_ST=y
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=2
 CONFIG_CHR_DEV_SG=y
-# CONFIG_SCSI_DEBUG_QUEUES is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -232,13 +178,11 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
@@ -247,19 +191,19 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
 CONFIG_SCSI_NCR53C8XX=y
 CONFIG_SCSI_SYM53C8XX=y
 CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
@@ -269,29 +213,136 @@
 # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
 # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
 # CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
 #
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -308,60 +359,48 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_TULIP is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
+# CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_LAN_SAA9730 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PLIP is not set
@@ -374,9 +413,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -399,31 +437,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -433,15 +484,25 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 # CONFIG_PRINTER is not set
 # CONFIG_PPDEV is not set
-# CONFIG_VIOCONS is not set
+# CONFIG_TIPAR is not set
 
 #
 # I2C support
@@ -449,29 +510,30 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_INPUT_GAMEPORT is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
-# CONFIG_VIOTAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
-# CONFIG_SONYPI is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -479,6 +541,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -492,74 +555,63 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -571,37 +623,82 @@
 #
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
-CONFIG_USB_UHCI=y
-CONFIG_USB_OHCI=y
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
+CONFIG_USB_DYNAMIC_MINORS=y
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_EHCI_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_UHCI_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_BLUETOOTH_TTY is not set
+CONFIG_USB_ACM=m
+# CONFIG_USB_PRINTER is not set
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
 CONFIG_USB_STORAGE_FREECOM=y
 # CONFIG_USB_STORAGE_ISD200 is not set
 CONFIG_USB_STORAGE_DPCM=y
 # CONFIG_USB_STORAGE_HP8200e is not set
 # CONFIG_USB_STORAGE_SDDR09 is not set
-CONFIG_USB_ACM=m
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+
+#
+# USB Human Interface Devices (HID)
+#
+CONFIG_USB_HID=m
+
+#
+# Input core support is needed for USB HID input layer or HIDBP support
+#
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+
+#
+# USB Imaging devices
+#
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_SCANNER is not set
 # CONFIG_USB_MICROTEK is not set
 # CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_PWC is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_DSBR is not set
+
+#
+# USB Multimedia devices
+#
 # CONFIG_USB_DABUSB is not set
-# CONFIG_USB_PEGASUS is not set
+
+#
+# Video4Linux support is needed for USB Multimedia device support
+#
+
+#
+# USB Network adaptors
+#
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_CDCETHER is not set
 # CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
 # CONFIG_USB_USBNET is not set
+
+#
+# USB port drivers
+#
 # CONFIG_USB_USS720 is not set
 
 #
@@ -615,8 +712,10 @@
 # CONFIG_USB_SERIAL_EMPEG is not set
 # CONFIG_USB_SERIAL_FTDI_SIO is not set
 CONFIG_USB_SERIAL_VISOR=m
+# CONFIG_USB_SERIAL_IPAQ is not set
 # CONFIG_USB_SERIAL_IR is not set
 # CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
 # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
 CONFIG_USB_SERIAL_KEYSPAN=m
 CONFIG_USB_SERIAL_KEYSPAN_USA28=y
@@ -626,13 +725,28 @@
 CONFIG_USB_SERIAL_KEYSPAN_USA19=y
 CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
 CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
 CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_SAFE is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_TIGL is not set
+# CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
+# CONFIG_USB_BRLVGER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_TEST is not set
 
 #
 # Bluetooth support
@@ -640,9 +754,21 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-CONFIG_XMON=y
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/apus_defconfig b/arch/ppc/configs/apus_defconfig
--- a/arch/ppc/configs/apus_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/apus_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,15 +39,40 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_ALL_PPC_CH is not set
 CONFIG_APUS=y
+# CONFIG_WILLOW_2 is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_MENF1 is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
+# CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -39,23 +80,14 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-CONFIG_PCI_PERMEDIA=y
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_PCI_PERMEDIA=y
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_MISC=m
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
@@ -64,19 +96,12 @@
 # CONFIG_PARPORT_PC is not set
 CONFIG_PARPORT_AMIGA=m
 # CONFIG_PARPORT_MFC3 is not set
-# CONFIG_PARPORT_ATARI is not set
-# CONFIG_PARPORT_SUNBPP is not set
 # CONFIG_PARPORT_OTHER is not set
 # CONFIG_PARPORT_1284 is not set
-CONFIG_GEN_RTC=y
 # CONFIG_CMDLINE_BOOL is not set
-CONFIG_FB_CONSOLE=y
 CONFIG_AMIGA=y
 CONFIG_ZORRO=y
 CONFIG_ABSTRACT_CONSOLE=y
-CONFIG_FB=y
-CONFIG_MOUSE=y
-CONFIG_BUSMOUSE=y
 CONFIG_APUS_FAST_EXCEPT=y
 CONFIG_AMIGA_PCMCIA=y
 CONFIG_AMIGA_BUILTIN_SERIAL=y
@@ -87,21 +112,34 @@
 CONFIG_A2232=y
 CONFIG_WHIPPET_SERIAL=y
 CONFIG_APNE=y
-CONFIG_SERIAL_CONSOLE=y
 CONFIG_HEARTBEAT=y
 CONFIG_PROC_HARDWARE=y
 CONFIG_ZORRO_NAMES=y
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
@@ -109,11 +147,11 @@
 # CONFIG_BLK_DEV_FD is not set
 CONFIG_AMIGA_FLOPPY=y
 CONFIG_AMIGA_Z2RAM=m
-# CONFIG_BLK_DEV_XD is not set
 # CONFIG_PARIDE 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_LOOP=y
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
@@ -130,91 +168,7 @@
 CONFIG_MD_RAID1=m
 CONFIG_MD_RAID5=m
 # CONFIG_MD_MULTIPATH is not set
-CONFIG_BLK_DEV_LVM=m
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
-CONFIG_NETLINK_DEV=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_FILTER=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-
-#
-#   IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_MIRROR=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-CONFIG_KHTTPD=m
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
+CONFIG_BLK_DEV_DM=m
 
 #
 # ATA/IDE/MFM/RLL support
@@ -229,33 +183,22 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=y
-CONFIG_BLK_DEV_IDETAPE=m
 CONFIG_BLK_DEV_IDEFLOPPY=y
 CONFIG_BLK_DEV_IDESCSI=m
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
 # IDE chipset support/bugfixes
 #
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-# CONFIG_BLK_DEV_SL82C105 is not set
+# CONFIG_BLK_DEV_IDEPCI is not set
 CONFIG_BLK_DEV_GAYLE=y
 CONFIG_BLK_DEV_IDEDOUBLER=y
 CONFIG_BLK_DEV_BUDDHA=y
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
 
 #
 # SCSI support
@@ -266,19 +209,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 CONFIG_CHR_DEV_ST=m
 CONFIG_CHR_DEV_OSST=m
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=4
 CONFIG_CHR_DEV_SG=m
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 
@@ -286,13 +227,11 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
@@ -301,34 +240,29 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_NCR53C8XX is not set
 # CONFIG_SCSI_SYM53C8XX is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 CONFIG_A3000_SCSI=y
 CONFIG_A4000T_SCSI=y
@@ -345,13 +279,126 @@
 CONFIG_OKTAGON_SCSI=y
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_FILTER=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_DSCP=m
+CONFIG_IP_NF_TARGET_MARK=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
 #
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -368,38 +415,36 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 CONFIG_ARIADNE=y
+# CONFIG_ARIADNE2 is not set
 CONFIG_NE2K_ZORRO=y
 CONFIG_A2065=y
 CONFIG_HYDRA=y
-# CONFIG_SUNLANCE is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 # CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 CONFIG_PLIP=m
@@ -422,9 +467,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -447,24 +491,12 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Console drivers
-#
-# CONFIG_VGA_CONSOLE is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FB_RIVA is not set
 CONFIG_FB_CLGEN=y
 CONFIG_FB_PM2=y
 # CONFIG_FB_PM2_FIFO_DISCONNECT is not set
@@ -479,59 +511,88 @@
 CONFIG_FB_VIRGE=y
 CONFIG_FB_RETINAZ3=y
 CONFIG_FB_FM2=y
-# CONFIG_FB_OF is not set
-# CONFIG_FB_CONTROL is not set
-# CONFIG_FB_PLATINUM is not set
-# CONFIG_FB_VALKYRIE is not set
 # CONFIG_FB_CT65550 is not set
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_S3TRIO is not set
 # CONFIG_FB_VGA16 is not set
+# CONFIG_FB_RIVA is not set
 # CONFIG_FB_MATROX is not set
-# CONFIG_FB_ATY is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
 CONFIG_FBCON_ADVANCED=y
-# CONFIG_FBCON_MFB is not set
-# CONFIG_FBCON_CFB2 is not set
-# CONFIG_FBCON_CFB4 is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-CONFIG_FBCON_AFB=y
-CONFIG_FBCON_ILBM=y
-# CONFIG_FBCON_IPLAN2P2 is not set
-# CONFIG_FBCON_IPLAN2P4 is not set
-# CONFIG_FBCON_IPLAN2P8 is not set
-# CONFIG_FBCON_MAC is not set
-# CONFIG_FBCON_VGA_PLANES is not set
-# CONFIG_FBCON_VGA is not set
-# CONFIG_FBCON_HGA is not set
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-CONFIG_FBCON_FONTS=y
+# CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-CONFIG_FONT_SUN8x16=y
-CONFIG_FONT_SUN12x22=y
-CONFIG_FONT_6x11=y
 CONFIG_FONT_PEARL_8x8=y
-CONFIG_FONT_ACORN_8x8=y
 
 #
-# Input core support
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Input device support
 #
 CONFIG_INPUT=m
-CONFIG_INPUT_KEYBDEV=m
+
+#
+# Userland interfaces
+#
 CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_JOYDEV=m
+# CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_KEYBOARD_AMIGA=m
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_AMIGA=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+CONFIG_INPUT_UINPUT=m
 
 #
 # Macintosh device drivers
@@ -542,15 +603,23 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
-CONFIG_A2232=y
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 CONFIG_PRINTER=m
 # CONFIG_LP_CONSOLE is not set
 # CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
 
 #
 # I2C support
@@ -558,61 +627,27 @@
 # CONFIG_I2C is not set
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+
+#
 # Mice
 #
 CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-# CONFIG_PSMOUSE is not set
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_GAMEPORT is not set
-# CONFIG_INPUT_NS558 is not set
-# CONFIG_INPUT_LIGHTNING is not set
-# CONFIG_INPUT_PCIGAME is not set
-# CONFIG_INPUT_CS461X is not set
-# CONFIG_INPUT_EMU10K1 is not set
-# CONFIG_INPUT_SERIO is not set
-# CONFIG_INPUT_SERPORT is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_ANALOG is not set
-# CONFIG_INPUT_A3D is not set
-# CONFIG_INPUT_ADI is not set
-# CONFIG_INPUT_COBRA is not set
-# CONFIG_INPUT_GF2K is not set
-# CONFIG_INPUT_GRIP is not set
-# CONFIG_INPUT_INTERACT is not set
-# CONFIG_INPUT_TMDC is not set
-# CONFIG_INPUT_SIDEWINDER is not set
-# CONFIG_INPUT_IFORCE_USB is not set
-# CONFIG_INPUT_IFORCE_232 is not set
-# CONFIG_INPUT_WARRIOR is not set
-# CONFIG_INPUT_MAGELLAN is not set
-# CONFIG_INPUT_SPACEORB is not set
-# CONFIG_INPUT_SPACEBALL is not set
-# CONFIG_INPUT_STINGER is not set
-# CONFIG_INPUT_DB9 is not set
-# CONFIG_INPUT_GAMECON is not set
-# CONFIG_INPUT_TURBOGRAFX is not set
-# CONFIG_INPUT_AMIJOY is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -623,6 +658,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -636,68 +672,65 @@
 CONFIG_AUTOFS_FS=m
 CONFIG_AUTOFS4_FS=m
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 CONFIG_AFFS_FS=y
 CONFIG_HFS_FS=y
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 CONFIG_FAT_FS=y
 CONFIG_MSDOS_FS=y
-# CONFIG_UMSDOS_FS is not set
 CONFIG_VFAT_FS=y
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 CONFIG_CRAMFS=y
 CONFIG_TMPFS=y
-CONFIG_RAMFS=m
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 CONFIG_MINIX_FS=y
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 CONFIG_ROMFS_FS=y
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 CONFIG_CODA_FS=m
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
-# CONFIG_ROOT_NFS is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+# CONFIG_CIFS is not set
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -717,6 +750,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
 CONFIG_SMB_NLS=y
 CONFIG_NLS=y
 
@@ -745,6 +779,7 @@
 CONFIG_NLS_CODEPAGE_949=m
 CONFIG_NLS_CODEPAGE_874=m
 CONFIG_NLS_ISO8859_8=m
+# CONFIG_NLS_CODEPAGE_1250 is not set
 CONFIG_NLS_CODEPAGE_1251=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_2=m
@@ -767,10 +802,14 @@
 CONFIG_SOUND=y
 CONFIG_DMASOUND_PAULA=m
 CONFIG_DMASOUND=m
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
 # CONFIG_SOUND_BT878 is not set
 # CONFIG_SOUND_CMPCI is not set
 # CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_MIDI_EMU10K1 is not set
 # CONFIG_SOUND_FUSION is not set
 # CONFIG_SOUND_CS4281 is not set
 # CONFIG_SOUND_ES1370 is not set
@@ -785,7 +824,6 @@
 # CONFIG_SOUND_MSNDCLAS is not set
 # CONFIG_SOUND_MSNDPIN is not set
 # CONFIG_SOUND_VIA82CXXX is not set
-# CONFIG_MIDI_VIA82CXXX is not set
 CONFIG_SOUND_OSS=m
 CONFIG_SOUND_TRACEINIT=y
 CONFIG_SOUND_DMAP=y
@@ -803,7 +841,6 @@
 # CONFIG_SOUND_NM256 is not set
 # CONFIG_SOUND_MAD16 is not set
 # CONFIG_SOUND_PAS is not set
-# CONFIG_PAS_JOYSTICK is not set
 # CONFIG_SOUND_PSS is not set
 # CONFIG_SOUND_SB is not set
 # CONFIG_SOUND_AWE32_SYNTH is not set
@@ -813,122 +850,42 @@
 # CONFIG_SOUND_OPL3SA1 is not set
 # CONFIG_SOUND_OPL3SA2 is not set
 # CONFIG_SOUND_YMFPCI is not set
-# CONFIG_SOUND_YMFPCI_LEGACY is not set
 # CONFIG_SOUND_UART6850 is not set
 # CONFIG_SOUND_AEDSP16 is not set
-# CONFIG_SOUND_TVMIXER is not set
 
 #
-# USB support
+# Advanced Linux Sound Architecture
 #
-# CONFIG_USB is not set
+# CONFIG_SND is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-# CONFIG_USB_HID is not set
-# CONFIG_USB_HIDDEV is not set
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-# CONFIG_USB_WACOM is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
+# USB support
 #
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
+# CONFIG_USB is not set
 
 #
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/ash_defconfig b/arch/ppc/configs/ash_defconfig
--- a/arch/ppc/configs/ash_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/ash_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,8 +1,7 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,83 +39,97 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
 CONFIG_ASH=y
-# CONFIG_CEDER is not set
+# CONFIG_BEECH is not set
+# CONFIG_CEDAR is not set
 # CONFIG_CPCI405 is not set
 # CONFIG_EP405 is not set
 # CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
 # CONFIG_REDWOOD_4 is not set
 # CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
 # CONFIG_WALNUT is not set
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
+# CONFIG_XILINX_ML300 is not set
 CONFIG_NP405H=y
-CONFIG_BIOS_FIXUP=y
-CONFIG_TREEBOOT=y
 CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
 CONFIG_IBM_OCP=y
+CONFIG_IBM_OPENBIOS=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_OCP=y
 # CONFIG_405_DMA is not set
+# CONFIG_PM is not set
 CONFIG_UART0_TTYS0=y
 # CONFIG_UART0_TTYS1 is not set
-CONFIG_IBM405_ERR51=y
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -111,13 +140,35 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -127,11 +178,12 @@
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 # CONFIG_NET_IPIP is not set
@@ -140,29 +192,23 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
 
 #
-# Appletalk devices
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -175,44 +221,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_PCI is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -228,43 +239,32 @@
 #
 # Ethernet (10 or 100Mbit)
 #
-CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
+# CONFIG_NET_ETHERNET is not set
 CONFIG_IBM_OCP_ENET=y
 # CONFIG_IBM_OCP_ENET_ERROR_MSG is not set
 CONFIG_IBM_OCP_ENET_RX_BUFF=64
 CONFIG_IBM_OCP_ENET_TX_BUFF=8
 CONFIG_IBM_OCP_ENET_GAP=8
-# CONFIG_SUNLANCE is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+CONFIG_IBM_OCP_ENET_SKB_RES=0
+CONFIG_OCP_NET=y
+CONFIG_IBM_OCP_MAL_CNT=1
+CONFIG_IBM_OCP_ZMII=y
+CONFIG_CRC32=y
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -274,10 +274,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -299,7 +297,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -307,22 +317,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -332,10 +344,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -345,19 +367,23 @@
 CONFIG_I2C=y
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
+CONFIG_I2C_IBM_OCP_ALGO=y
+CONFIG_I2C_IBM_OCP_ADAP=y
 # CONFIG_I2C_CHARDEV is not set
 # CONFIG_I2C_PROC is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# Mice
 #
-# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
@@ -375,13 +401,14 @@
 # CONFIG_IB700_WDT is not set
 # CONFIG_I810_TCO is not set
 # CONFIG_MIXCOMWD is not set
+# CONFIG_SCx200_WDT is not set
 # CONFIG_60XX_WDT is not set
 # CONFIG_W83877F_WDT is not set
 # CONFIG_MACHZ_WDT is not set
-CONFIG_PPC405_WDT=y
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -392,6 +419,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -405,49 +433,35 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -456,31 +470,32 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -488,72 +503,13 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
 
 #
 # USB support
 #
 # CONFIG_USB is not set
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_RIO500 is not set
 
 #
 # Bluetooth support
@@ -561,10 +517,22 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/beech_defconfig b/arch/ppc/configs/beech_defconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/configs/beech_defconfig	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,625 @@
+#
+# Automatically generated make config: don't edit
+#
+# CONFIG_UID16 is not set
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODVERSIONS=y
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+CONFIG_PPC32=y
+# CONFIG_6xx is not set
+CONFIG_40x=y
+# CONFIG_440 is not set
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+# CONFIG_PPC_ISERIES is not set
+CONFIG_4xx=y
+# CONFIG_PPC_STD_MMU is not set
+# CONFIG_ASH is not set
+# CONFIG_CEDER is not set
+CONFIG_BEECH=y
+# CONFIG_CPCI405 is not set
+# CONFIG_EP405 is not set
+# CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
+# CONFIG_REDWOOD_4 is not set
+# CONFIG_REDWOOD_5 is not set
+# CONFIG_TIVO is not set
+# CONFIG_WALNUT is not set
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+# CONFIG_MATH_EMULATION is not set
+CONFIG_405LP=y
+CONFIG_IBM_OPENBIOS=y
+CONFIG_IBM405_ERR77=y
+CONFIG_IBM_OCP=y
+# CONFIG_PM is not set
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+CONFIG_IBM405_ERR51=y
+CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_OCP_PROC=y
+
+#
+# General setup
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_ISA is not set
+# CONFIG_EISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_MCA is not set
+# CONFIG_PCI is not set
+# CONFIG_PC_KEYBOARD is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+# CONFIG_PPC_RTC is not set
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL 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 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=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
+# CONFIG_MTD_AMDSTD is not set
+# CONFIG_MTD_SHARP is not set
+# CONFIG_MTD_JEDEC is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_DBOX2 is not set
+# CONFIG_MTD_CFI_FLAGADM is not set
+# CONFIG_MTD_PCI is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC1000 is not set
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOCPROBE is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_CISS_SCSI_TAPE is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+
+#
+#  
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+
+#
+# Appletalk devices
+#
+# CONFIG_DEV_APPLETALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_BOOT is not set
+# CONFIG_FUSION_ISENSE is not set
+# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LAN is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_MYRI_SBUS is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Backplane Networking
+#
+# CONFIG_NPNET is not set
+
+#
+# On-chip net devices
+#
+# CONFIG_IBM_OCP_ENET is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+CONFIG_FB=y
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S3TRIO is not set
+# CONFIG_FB_VESA is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_LYNX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FBCON_ADVANCED=y
+CONFIG_FBCON_MFB=y
+CONFIG_FBCON_CFB2=y
+CONFIG_FBCON_CFB4=y
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
+CONFIG_FBCON_CFB32=y
+# CONFIG_FBCON_AFB is not set
+# CONFIG_FBCON_ILBM is not set
+# CONFIG_FBCON_IPLAN2P2 is not set
+# CONFIG_FBCON_IPLAN2P4 is not set
+# CONFIG_FBCON_IPLAN2P8 is not set
+# CONFIG_FBCON_MAC is not set
+# CONFIG_FBCON_VGA_PLANES is not set
+# CONFIG_FBCON_VGA is not set
+# CONFIG_FBCON_HGA is not set
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+CONFIG_FBCON_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+
+#
+# Input core support
+#
+# CONFIG_INPUT is not set
+# CONFIG_INPUT_KEYBDEV is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Character devices
+#
+CONFIG_VT=y
+# CONFIG_VT_CONSOLE is not set
+CONFIG_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_IBM_OCP_ALGO is not set
+# CONFIG_I2C_CHARDEV is not set
+# CONFIG_I2C_PROC is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_INPUT_GAMEPORT is not set
+
+#
+# Input core support is needed for gameports
+#
+
+#
+# Input core support is needed for joysticks
+#
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+CONFIG_IBM_OCP_GPIO=y
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+CONFIG_TMPFS=y
+CONFIG_RAMFS=y
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_ZISOFS_FS is not set
+# CONFIG_ZLIB_FS_INFLATE is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SMB_NLS is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_CMPCI is not set
+# CONFIG_SOUND_EMU10K1 is not set
+# CONFIG_MIDI_EMU10K1 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_MAESTRO3 is not set
+# CONFIG_SOUND_ICH is not set
+# CONFIG_SOUND_RME96XX is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_VIA82CXXX is not set
+# CONFIG_MIDI_VIA82CXXX is not set
+# CONFIG_SOUND_OSS is not set
+# CONFIG_SOUND_TVMIXER is not set
+
+#
+# IBM 4xx options
+#
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BLUEZ is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
diff -Nru a/arch/ppc/configs/bseip_defconfig b/arch/ppc/configs/bseip_defconfig
--- a/arch/ppc/configs/bseip_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/bseip_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,6 +11,20 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 # CONFIG_MODULES is not set
@@ -21,11 +35,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 # CONFIG_RPXCLASSIC is not set
 CONFIG_BSEIP=y
@@ -35,65 +55,69 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -104,52 +128,71 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+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_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -162,26 +205,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -192,35 +219,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -230,11 +234,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -255,7 +256,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -263,22 +276,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -288,9 +303,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -300,32 +326,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -336,6 +357,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -349,66 +371,57 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -424,8 +437,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -456,113 +468,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/cedar_defconfig b/arch/ppc/configs/cedar_defconfig
--- a/arch/ppc/configs/cedar_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/cedar_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,81 +39,93 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
-CONFIG_CEDER=y
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_ASH is not set
+# CONFIG_BEECH is not set
+CONFIG_CEDAR=y
 # CONFIG_CPCI405 is not set
 # CONFIG_EP405 is not set
 # CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
 # CONFIG_REDWOOD_4 is not set
 # CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
 # CONFIG_WALNUT is not set
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_NP405=y
-CONFIG_BIOS_FIXUP=y
-CONFIG_TREEBOOT=y
+# CONFIG_XILINX_ML300 is not set
 CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
 CONFIG_IBM_OCP=y
+CONFIG_NP405L=y
+CONFIG_BIOS_FIXUP=y
+CONFIG_IBM_OPENBIOS=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_OCP=y
 # CONFIG_405_DMA is not set
+# CONFIG_PM is not set
 CONFIG_UART0_TTYS0=y
 # CONFIG_UART0_TTYS1 is not set
-CONFIG_IBM405_ERR51=y
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 # CONFIG_PCI is not set
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -109,13 +136,30 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -125,11 +169,12 @@
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 # CONFIG_NET_IPIP is not set
@@ -138,33 +183,23 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-
+# SCTP Configuration (EXPERIMENTAL)
 #
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -177,44 +212,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -224,41 +225,21 @@
 #
 # Ethernet (10 or 100Mbit)
 #
-CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
+# CONFIG_NET_ETHERNET is not set
 CONFIG_IBM_OCP_ENET=y
 # CONFIG_IBM_OCP_ENET_ERROR_MSG is not set
 CONFIG_IBM_OCP_ENET_RX_BUFF=64
 CONFIG_IBM_OCP_ENET_TX_BUFF=8
 CONFIG_IBM_OCP_ENET_GAP=8
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+CONFIG_IBM_OCP_ENET_SKB_RES=0
+CONFIG_OCP_NET=y
+CONFIG_IBM_OCP_MAL_CNT=1
+CONFIG_IBM_OCP_ZMII=y
+CONFIG_CRC32=y
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -268,11 +249,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -293,7 +271,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -301,22 +291,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -326,10 +318,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -339,27 +341,23 @@
 CONFIG_I2C=y
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
+CONFIG_I2C_IBM_OCP_ALGO=y
+CONFIG_I2C_IBM_OCP_ADAP=y
 # CONFIG_I2C_CHARDEV is not set
 # CONFIG_I2C_PROC is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
-#
-
-#
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
@@ -377,13 +375,13 @@
 # CONFIG_IB700_WDT is not set
 # CONFIG_I810_TCO is not set
 # CONFIG_MIXCOMWD is not set
+# CONFIG_SCx200_WDT is not set
 # CONFIG_60XX_WDT is not set
 # CONFIG_W83877F_WDT is not set
 # CONFIG_MACHZ_WDT is not set
-CONFIG_PPC405_WDT=y
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -394,6 +392,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -407,49 +406,35 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -458,31 +443,32 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -490,123 +476,35 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
 
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
 
 #
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/common_defconfig b/arch/ppc/configs/common_defconfig
--- a/arch/ppc/configs/common_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/common_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,30 +39,41 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_PM=y
 # CONFIG_8260 is not set
-CONFIG_PPC_STD_MMU=y
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_ALL_PPC=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_ALL_PPC_CH=y
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
 # CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
-# CONFIG_WILLOW is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_ALTIVEC=y
 CONFIG_TAU=y
 # CONFIG_TAU_INT is not set
@@ -58,14 +84,7 @@
 #
 # CONFIG_HIGHMEM is not set
 # CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
@@ -82,34 +101,48 @@
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_PPC601_SYNC_FIX=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PPC_RTAS=y
 CONFIG_PREP_RESIDUAL=y
+CONFIG_PROC_PREPRESIDUAL=y
+CONFIG_PPCBUG_NVRAM=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="console=ttyS0,9600 console=tty0 root=/dev/sda2"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=m
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -120,95 +153,6 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP 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_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-
-#
-#   IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_MIRROR=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-CONFIG_ATALK=m
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
@@ -223,62 +167,59 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
 CONFIG_BLK_DEV_IDESCSI=y
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
 # IDE chipset support/bugfixes
 #
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_BLK_DEV_GENERIC=y
 CONFIG_IDEPCI_SHARE_IRQ=y
 CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDE_TCQ is not set
 # CONFIG_BLK_DEV_OFFBOARD is not set
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
+# CONFIG_IDEDMA_PCI_WIP is not set
+CONFIG_BLK_DEV_ADMA=y
 # CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC62XX_TUNING is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_WDC_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_AMD74XX_OVERRIDE is not set
 CONFIG_BLK_DEV_CMD64X=y
 # CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
 # CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
 # CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_NFORCE is not set
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+CONFIG_BLK_DEV_PDC202XX_NEW=y
 # CONFIG_PDC202XX_FORCE is not set
 # CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
 CONFIG_BLK_DEV_SL82C105=y
 CONFIG_BLK_DEV_IDE_PMAC=y
 CONFIG_BLK_DEV_IDEDMA_PMAC=y
 CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDE_CHIPSETS is not set
 CONFIG_IDEDMA_AUTO=y
 # CONFIG_IDEDMA_IVB is not set
+CONFIG_BLK_DEV_PDC202XX=y
 CONFIG_BLK_DEV_IDE_MODES=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
 
 #
 # SCSI support
@@ -289,19 +230,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 CONFIG_CHR_DEV_ST=y
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=2
 CONFIG_CHR_DEV_SG=y
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -309,19 +248,18 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AACRAID is not set
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
 # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
+CONFIG_AIC7XXX_DEBUG_ENABLE=y
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 CONFIG_SCSI_AIC7XXX_OLD=m
-# CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT is not set
-CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8
-CONFIG_AIC7XXX_OLD_PROC_STATS=y
+# CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
 CONFIG_SCSI_ADVANSYS=m
 # CONFIG_SCSI_IN2000 is not set
@@ -330,61 +268,158 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 CONFIG_SCSI_MESH=y
 CONFIG_SCSI_MESH_SYNC_RATE=5
+CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
 CONFIG_SCSI_MAC53C94=y
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
 #
-CONFIG_NETDEVICES=y
+# CONFIG_I2O is not set
 
 #
-# ARCnet devices
+# Networking support
 #
-# CONFIG_ARCNET is not set
+CONFIG_NET=y
 
 #
-# Appletalk devices
+# Networking options
 #
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_IPDDP is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP 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_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+# CONFIG_IP_NF_ARPTABLES is not set
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -395,70 +430,62 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+# CONFIG_CRC32 is not set
 CONFIG_MACE=y
 # CONFIG_MACE_AAUI_PORT is not set
 CONFIG_BMAC=y
-CONFIG_GMAC=y
-# CONFIG_SUNLANCE is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
+CONFIG_SUNGEM=y
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=y
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_APRICOT is not set
-# CONFIG_CS89x0 is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=y
 CONFIG_TULIP=y
 # CONFIG_TULIP_MWI is not set
 CONFIG_TULIP_MMIO=y
 CONFIG_DE4X5=m
-# CONFIG_DGRS is not set
+# CONFIG_WINBOND_840 is not set
 # CONFIG_DM9102 is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=y
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_DGRS is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_VIA_RHINE_MMIO is not set
-# CONFIG_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 CONFIG_PPP=y
 CONFIG_PPP_MULTILINK=y
-# CONFIG_PPP_FILTER is not set
 CONFIG_PPP_ASYNC=y
 # CONFIG_PPP_SYNC_TTY is not set
 CONFIG_PPP_DEFLATE=y
@@ -471,21 +498,21 @@
 #
 CONFIG_NET_RADIO=y
 # CONFIG_STRIP is not set
-# CONFIG_WAVELAN is not set
-# CONFIG_ARLAN is not set
 # CONFIG_AIRONET4500 is not set
-# CONFIG_AIRONET4500_NONCS is not set
-# CONFIG_AIRONET4500_PROC is not set
+
+#
+# Wireless ISA/PCI cards support
+#
 # CONFIG_AIRO is not set
 CONFIG_HERMES=m
 CONFIG_APPLE_AIRPORT=m
 # CONFIG_PLX_HERMES is not set
+# CONFIG_PCI_HERMES is not set
 CONFIG_NET_WIRELESS=y
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -508,24 +535,12 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Console drivers
-#
-CONFIG_VGA_CONSOLE=y
-
-#
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FB_RIVA is not set
 # CONFIG_FB_CLGEN is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
@@ -537,48 +552,87 @@
 CONFIG_FB_IMSTT=y
 # CONFIG_FB_S3TRIO is not set
 # CONFIG_FB_VGA16 is not set
+# CONFIG_FB_RIVA is not set
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 CONFIG_FB_MATROX_MYSTIQUE=y
-# CONFIG_FB_MATROX_G100 is not set
-# CONFIG_FB_MATROX_I2C is not set
 # CONFIG_FB_MATROX_G450 is not set
+# CONFIG_FB_MATROX_G100A is not set
 # CONFIG_FB_MATROX_MULTIHEAD is not set
-CONFIG_FB_ATY=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_CT=y
 CONFIG_FB_RADEON=y
 CONFIG_FB_ATY128=y
+CONFIG_FB_ATY=y
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
 CONFIG_FB_3DFX=y
 # CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
 # CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-CONFIG_FBCON_FONTS=y
-# CONFIG_FONT_8x8 is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-CONFIG_FONT_SUN8x16=y
-CONFIG_FONT_SUN12x22=y
-# CONFIG_FONT_6x11 is not set
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
-# CONFIG_FB_COMPAT_XPMAC is not set
 
 #
-# Input core support
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Input device support
 #
 CONFIG_INPUT=y
-CONFIG_INPUT_KEYBDEV=y
+
+#
+# Userland interfaces
+#
 CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=m
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=y
+CONFIG_INPUT_UINPUT=m
 
 #
 # Macintosh device drivers
@@ -586,7 +640,6 @@
 CONFIG_ADB_CUDA=y
 CONFIG_ADB_PMU=y
 CONFIG_PMAC_PBOOK=y
-CONFIG_PM=y
 CONFIG_PMAC_APM_EMU=y
 CONFIG_PMAC_BACKLIGHT=y
 # CONFIG_MAC_FLOPPY is not set
@@ -594,9 +647,7 @@
 CONFIG_ADB=y
 CONFIG_ADB_MACIO=y
 CONFIG_INPUT_ADBHID=y
-CONFIG_MAC_ADBKEYCODES=y
 CONFIG_MAC_EMUMOUSEBTN=y
-CONFIG_MAC_HID=y
 # CONFIG_ANSLCD is not set
 
 #
@@ -604,9 +655,19 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=m
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=m
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -616,65 +677,35 @@
 CONFIG_I2C=m
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
-CONFIG_I2C_KEYWEST=m
 CONFIG_I2C_CHARDEV=m
 CONFIG_I2C_PROC=m
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+
+#
+# I2C Hardware Sensors Chip support
+#
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_LM75 is not set
+
+#
 # Mice
 #
 CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_GAMEPORT is not set
-# CONFIG_INPUT_NS558 is not set
-# CONFIG_INPUT_LIGHTNING is not set
-# CONFIG_INPUT_PCIGAME is not set
-# CONFIG_INPUT_CS461X is not set
-# CONFIG_INPUT_EMU10K1 is not set
-# CONFIG_INPUT_SERIO is not set
-# CONFIG_INPUT_SERPORT is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_ANALOG is not set
-# CONFIG_INPUT_A3D is not set
-# CONFIG_INPUT_ADI is not set
-# CONFIG_INPUT_COBRA is not set
-# CONFIG_INPUT_GF2K is not set
-# CONFIG_INPUT_GRIP is not set
-# CONFIG_INPUT_INTERACT is not set
-# CONFIG_INPUT_TMDC is not set
-# CONFIG_INPUT_SIDEWINDER is not set
-# CONFIG_INPUT_IFORCE_USB is not set
-# CONFIG_INPUT_IFORCE_232 is not set
-# CONFIG_INPUT_WARRIOR is not set
-# CONFIG_INPUT_MAGELLAN is not set
-# CONFIG_INPUT_SPACEORB is not set
-# CONFIG_INPUT_SPACEBALL is not set
-# CONFIG_INPUT_STINGER is not set
-# CONFIG_INPUT_DB9 is not set
-# CONFIG_INPUT_GAMECON is not set
-# CONFIG_INPUT_TURBOGRAFX is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 CONFIG_NVRAM=y
 # CONFIG_RTC 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_APPLICOM is not set
@@ -685,6 +716,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -698,34 +730,27 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 CONFIG_HFS_FS=m
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 CONFIG_FAT_FS=m
 CONFIG_MSDOS_FS=m
-# CONFIG_UMSDOS_FS is not set
 CONFIG_VFAT_FS=m
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 CONFIG_DEVFS_FS=y
@@ -733,14 +758,13 @@
 # CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -749,24 +773,19 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
-# CONFIG_ROOT_NFS is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
@@ -786,7 +805,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 CONFIG_NLS=y
 
 #
@@ -814,6 +833,7 @@
 # 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_ISO8859_1=m
 # CONFIG_NLS_ISO8859_2 is not set
@@ -834,31 +854,18 @@
 # Sound
 #
 CONFIG_SOUND=m
-CONFIG_DMASOUND_PMAC=m
+CONFIG_DMASOUND_AWACS=m
 CONFIG_DMASOUND=m
-CONFIG_I2C=m
-CONFIG_I2C_KEYWEST=m
-# CONFIG_SOUND_BT878 is not set
-# CONFIG_SOUND_CMPCI is not set
-# CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_MIDI_EMU10K1 is not set
-# CONFIG_SOUND_FUSION is not set
-# CONFIG_SOUND_CS4281 is not set
-# CONFIG_SOUND_ES1370 is not set
-# CONFIG_SOUND_ES1371 is not set
-# CONFIG_SOUND_ESSSOLO1 is not set
-# CONFIG_SOUND_MAESTRO is not set
-# CONFIG_SOUND_MAESTRO3 is not set
-# CONFIG_SOUND_ICH is not set
-# CONFIG_SOUND_RME96XX is not set
-# CONFIG_SOUND_SONICVIBES is not set
-# CONFIG_SOUND_TRIDENT is not set
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_VIA82CXXX is not set
-# CONFIG_MIDI_VIA82CXXX is not set
-# CONFIG_SOUND_OSS is not set
-# CONFIG_SOUND_TVMIXER is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
 
 #
 # USB support
@@ -871,20 +878,23 @@
 #
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_LONG_TIMEOUT is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
 
 #
-# USB Controllers
+# USB Host Controller Drivers
 #
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-CONFIG_USB_OHCI=y
+# CONFIG_USB_EHCI_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_UHCI_HCD is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
+# CONFIG_USB_BLUETOOTH_TTY is not set
+# CONFIG_USB_MIDI is not set
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_DATAFAB is not set
@@ -893,21 +903,24 @@
 CONFIG_USB_STORAGE_DPCM=y
 # CONFIG_USB_STORAGE_HP8200e 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_ACM=m
-CONFIG_USB_PRINTER=m
 
 #
 # USB Human Interface Devices (HID)
 #
 CONFIG_USB_HID=y
+CONFIG_USB_HIDINPUT=y
+# CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
+# CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_XPAD is not set
 
 #
 # USB Imaging devices
 #
-# CONFIG_USB_DC2XX is not set
 # CONFIG_USB_MDC800 is not set
 CONFIG_USB_SCANNER=m
 # CONFIG_USB_MICROTEK is not set
@@ -916,24 +929,25 @@
 #
 # USB Multimedia devices
 #
+# CONFIG_USB_DABUSB is not set
 
 #
-#   Video4Linux support is needed for USB Multimedia device support
+# Video4Linux support is needed for USB Multimedia device support
 #
 
 #
 # USB Network adaptors
 #
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_CDCETHER is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
 # CONFIG_USB_USBNET is not set
 
 #
 # USB port drivers
 #
-# CONFIG_USB_USS720 is not set
 
 #
 # USB Serial Converter support
@@ -946,8 +960,10 @@
 # CONFIG_USB_SERIAL_EMPEG is not set
 # CONFIG_USB_SERIAL_FTDI_SIO is not set
 CONFIG_USB_SERIAL_VISOR=m
+# CONFIG_USB_SERIAL_IPAQ is not set
 # CONFIG_USB_SERIAL_IR is not set
 # CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
 # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
 CONFIG_USB_SERIAL_KEYSPAN=m
 CONFIG_USB_SERIAL_KEYSPAN_USA28=y
@@ -957,17 +973,28 @@
 CONFIG_USB_SERIAL_KEYSPAN_USA19=y
 CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
 CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
 CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_SAFE is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
+CONFIG_USB_EZUSB=y
 
 #
 # USB Miscellaneous drivers
 #
+# CONFIG_USB_TIGL is not set
+# CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
+# CONFIG_USB_BRLVGER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_TEST is not set
 
 #
 # Bluetooth support
@@ -975,10 +1002,24 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+
+#
 # Kernel hacking
 #
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_KGDB is not set
-CONFIG_XMON=y
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_KALLSYMS=y
 CONFIG_BOOTX_TEXT=y
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/cpci405_defconfig b/arch/ppc/configs/cpci405_defconfig
--- a/arch/ppc/configs/cpci405_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/cpci405_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,81 +39,97 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
-# CONFIG_CEDER is not set
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_ASH is not set
+# CONFIG_BEECH is not set
+# CONFIG_CEDAR is not set
 CONFIG_CPCI405=y
 # CONFIG_EP405 is not set
 # CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
 # CONFIG_REDWOOD_4 is not set
 # CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
 # CONFIG_WALNUT is not set
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_405GP=y
+# CONFIG_XILINX_ML300 is not set
 CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
 CONFIG_IBM_OCP=y
+CONFIG_405GP=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_OCP=y
 # CONFIG_405_DMA is not set
+# CONFIG_PM is not set
 CONFIG_UART0_TTYS0=y
 # CONFIG_UART0_TTYS1 is not set
-CONFIG_IBM405_ERR51=y
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
@@ -108,72 +139,6 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-# CONFIG_PACKET is not set
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-# CONFIG_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
@@ -188,31 +153,18 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
-# CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
 # IDE chipset support/bugfixes
 #
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-# CONFIG_BLK_DEV_SL82C105 is not set
-CONFIG_BLK_DEV_CPCI405_IDE=y
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
+# CONFIG_BLK_DEV_IDEPCI is not set
 
 #
 # SCSI support
@@ -222,11 +174,6 @@
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
 
 #
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
@@ -237,15 +184,66 @@
 # I2O device support
 #
 # CONFIG_I2O is not set
-# CONFIG_I2O_PCI is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
 
 #
-# Network device support
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -261,43 +259,30 @@
 #
 # Ethernet (10 or 100Mbit)
 #
-CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
+# CONFIG_NET_ETHERNET is not set
 CONFIG_IBM_OCP_ENET=y
 # CONFIG_IBM_OCP_ENET_ERROR_MSG is not set
 CONFIG_IBM_OCP_ENET_RX_BUFF=64
 CONFIG_IBM_OCP_ENET_TX_BUFF=8
 CONFIG_IBM_OCP_ENET_GAP=8
-# CONFIG_SUNLANCE is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+CONFIG_IBM_OCP_ENET_SKB_RES=0
+CONFIG_OCP_NET=y
+CONFIG_CRC32=y
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -307,10 +292,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -332,7 +315,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -340,22 +335,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -365,10 +362,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_UNIX98_PTYS is not set
 
 #
@@ -377,40 +384,40 @@
 CONFIG_I2C=y
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
-# CONFIG_I2C_CHARDEV is not set
-# CONFIG_I2C_PROC is not set
-
-#
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
+CONFIG_I2C_IBM_OCP_ALGO=y
+CONFIG_I2C_IBM_OCP_ADAP=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_PROC=y
 
 #
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_LM75 is not set
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
-CONFIG_PPC405_GPIO=y
 
 #
 # Ftape, the floppy tape device driver
@@ -418,6 +425,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -431,49 +439,36 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
 # CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS is not set
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -481,32 +476,67 @@
 # CONFIG_CODA_FS is not set
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
-# CONFIG_NFS_V3 is not set
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+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_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
 
 #
 # Sound
@@ -514,7 +544,7 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
 
 #
@@ -523,114 +553,27 @@
 # CONFIG_USB is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/ep405_defconfig b/arch/ppc/configs/ep405_defconfig
--- a/arch/ppc/configs/ep405_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/ep405_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,82 +39,99 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
-# CONFIG_CEDER is not set
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_ASH is not set
+# CONFIG_BEECH is not set
+# CONFIG_CEDAR is not set
 # CONFIG_CPCI405 is not set
 CONFIG_EP405=y
 # CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
 # CONFIG_REDWOOD_4 is not set
 # CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
 # CONFIG_WALNUT is not set
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_405GP=y
-CONFIG_BIOS_FIXUP=y
-CONFIG_EMBEDDEDBOOT=y
+# CONFIG_XILINX_ML300 is not set
+# CONFIG_EP405PC is not set
 CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
 CONFIG_IBM_OCP=y
+CONFIG_BIOS_FIXUP=y
+CONFIG_405GP=y
+CONFIG_EMBEDDEDBOOT=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_OCP=y
 # CONFIG_405_DMA is not set
+# CONFIG_PM is not set
 CONFIG_UART0_TTYS0=y
 # CONFIG_UART0_TTYS1 is not set
-CONFIG_IBM405_ERR51=y
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -110,13 +142,35 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -126,11 +180,12 @@
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 # CONFIG_NET_IPIP is not set
@@ -139,33 +194,23 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -178,44 +223,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_PCI is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -232,42 +242,40 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
 CONFIG_IBM_OCP_ENET=y
 # CONFIG_IBM_OCP_ENET_ERROR_MSG is not set
 CONFIG_IBM_OCP_ENET_RX_BUFF=64
 CONFIG_IBM_OCP_ENET_TX_BUFF=8
 CONFIG_IBM_OCP_ENET_GAP=8
-# CONFIG_SUNLANCE is not set
+CONFIG_IBM_OCP_ENET_SKB_RES=0
+CONFIG_OCP_NET=y
+CONFIG_CRC32=y
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 # CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -277,10 +285,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -302,7 +308,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -310,22 +328,27 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -335,10 +358,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_UNIX98_PTYS is not set
 
 #
@@ -347,40 +380,35 @@
 CONFIG_I2C=y
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_IBM_OCP_ALGO is not set
 # CONFIG_I2C_CHARDEV is not set
 # CONFIG_I2C_PROC is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
-# CONFIG_PPC405_GPIO is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -388,6 +416,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -401,49 +430,34 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS is not set
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -452,31 +466,22 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -484,7 +489,7 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
 
 #
@@ -493,114 +498,27 @@
 # CONFIG_USB is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/est8260_defconfig b/arch/ppc/configs/est8260_defconfig
--- a/arch/ppc/configs/est8260_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/est8260_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,6 +11,20 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 # CONFIG_MODULES is not set
@@ -21,62 +35,73 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_8260=y
 CONFIG_PPC_STD_MMU=y
 CONFIG_SERIAL_CONSOLE=y
 CONFIG_EST8260=y
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX6 is not set
+# CONFIG_TQM8260 is not set
+# CONFIG_WILLOW_1 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PC_KEYBOARD is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -87,52 +112,71 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+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_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -145,26 +189,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -175,35 +203,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -213,11 +218,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -238,31 +240,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -272,9 +287,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -284,32 +310,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
-#
-
-#
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -320,6 +341,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -333,66 +355,57 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -408,132 +421,50 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
 #
 # CONFIG_SOUND is not set
-
-#
-# MPC8260 Communication Options
-#
 CONFIG_SCC_ENET=y
-CONFIG_SCC1_ENET=y
 # CONFIG_FEC_ENET is not set
-# CONFIG_DCACHE_DISABLE is not set
-
-#
-# USB support
-#
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
+# MPC8260 CPM Options
 #
+CONFIG_SCC_CONSOLE=y
 
 #
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
+# Generic MPC8260 Options
 #
+# CONFIG_DCACHE_DISABLE is not set
 
 #
-# USB Network adaptors
+# USB support
 #
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
 
 #
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/ev64260_defconfig b/arch/ppc/configs/ev64260_defconfig
--- a/arch/ppc/configs/ev64260_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/ev64260_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,8 +1,7 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -10,13 +9,28 @@
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
 
 #
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -25,15 +39,20 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_WILLOW is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
 CONFIG_EV64260=y
@@ -48,23 +67,13 @@
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 # CONFIG_ZX4500 is not set
 CONFIG_GT64260=y
 CONFIG_SERIAL_CONSOLE_BAUD=115200
-
-#
-# Galileo GT64260 Options
-#
-CONFIG_GT64260_ETH=y
-CONFIG_GT64260_ETH_0=y
-CONFIG_GT64260_ETH_0_MACADDR="feffff000000"
-CONFIG_GT64260_ETH_1=y
-CONFIG_GT64260_ETH_1_MACADDR="feffff000001"
-CONFIG_GT64260_ETH_2=y
-CONFIG_GT64260_ETH_2_MACADDR="feffff000002"
-# CONFIG_GT64260_MPSC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_ALTIVEC=y
 CONFIG_TAU=y
 # CONFIG_TAU_INT is not set
@@ -74,51 +83,54 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="console=ttyS0,115200 ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -129,13 +141,35 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -147,6 +181,7 @@
 # CONFIG_NETFILTER_DEBUG is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -160,38 +195,33 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 
 #
-#   IP: Netfilter Configuration
+# IP: Netfilter Configuration
 #
 # CONFIG_IP_NF_CONNTRACK is not set
 # CONFIG_IP_NF_QUEUE is not set
 # CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
 # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
 
 #
-# Appletalk devices
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -204,44 +234,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_PCI is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -258,67 +253,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_NEW_RX_RESET 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_VIA_RHINE_MMIO is not set
-# CONFIG_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -328,10 +306,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -353,31 +329,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -388,10 +377,21 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -405,24 +405,31 @@
 CONFIG_I2C_PROC=m
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+
+#
+# I2C Hardware Sensors Chip support
+#
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_LM75 is not set
 
 #
-# Joysticks
+# Mice
 #
-# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -433,6 +440,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -446,34 +454,23 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
 CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 CONFIG_DEVFS_FS=y
@@ -481,14 +478,13 @@
 # CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -497,32 +493,23 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -533,65 +520,6 @@
 # USB support
 #
 # CONFIG_USB is not set
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_RIO500 is not set
 
 #
 # Bluetooth support
@@ -599,10 +527,22 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/gemini_defconfig b/arch/ppc/configs/gemini_defconfig
--- a/arch/ppc/configs/gemini_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/gemini_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,15 +39,39 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
+# CONFIG_WILLOW_2 is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_MENF1 is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 CONFIG_GEMINI=y
+# CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_ALTIVEC=y
 CONFIG_TAU=y
 # CONFIG_TAU_INT is not set
@@ -42,50 +81,53 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -96,74 +138,11 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
-
-#
-#   IP: Netfilter Configuration
-#
-# CONFIG_IP_NF_CONNTRACK is not set
-# CONFIG_IP_NF_QUEUE is not set
-# CONFIG_IP_NF_IPTABLES is not set
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
 #
 # CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI support
@@ -174,19 +153,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 # CONFIG_CHR_DEV_ST is not set
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=2
 CONFIG_CHR_DEV_SG=y
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -194,13 +171,11 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
@@ -209,45 +184,113 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
 #
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -264,37 +307,33 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 # CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -304,9 +343,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -329,31 +367,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -364,10 +415,21 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -377,32 +439,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -413,6 +470,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -426,34 +484,25 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 CONFIG_DEVFS_FS=y
@@ -461,14 +510,13 @@
 # CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -477,23 +525,17 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
-# CONFIG_ROOT_NFS is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+CONFIG_EXPORTFS=y
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
@@ -513,8 +555,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -527,110 +568,26 @@
 # CONFIG_USB is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_KGDB is not set
-CONFIG_XMON=y
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/iSeries_defconfig b/arch/ppc/configs/iSeries_defconfig
--- a/arch/ppc/configs/iSeries_defconfig	Wed Jan  8 20:04:32 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,477 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-
-#
-# Platform support
-#
-CONFIG_PPC=y
-CONFIG_PPC32=y
-# CONFIG_6xx is not set
-# CONFIG_4xx is not set
-# CONFIG_POWER3 is not set
-# CONFIG_8xx is not set
-CONFIG_PPC_ISERIES=y
-CONFIG_PPC64BRIDGE=y
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-
-#
-# General setup
-#
-CONFIG_HIGHMEM=y
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_ISERIES is not set
-# CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_KCORE_ELF=y
-CONFIG_BINFMT_ELF=y
-CONFIG_KERNEL_ELF=y
-CONFIG_BINFMT_MISC=y
-# CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-# CONFIG_CMDLINE_BOOL is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Plug and Play configuration
-#
-# CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
-# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-# CONFIG_ETHERTAP 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_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
-# CONFIG_SHAPER is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-CONFIG_CD_NO_IDESCSI=y
-# CONFIG_AZTCD is not set
-# CONFIG_GSCD is not set
-# CONFIG_SBPCD is not set
-# CONFIG_MCD is not set
-# CONFIG_MCDX is not set
-# CONFIG_OPTCD is not set
-# CONFIG_CM206 is not set
-# CONFIG_SJCD is not set
-# CONFIG_ISP16_CDI is not set
-# CONFIG_CDU31A is not set
-# CONFIG_CDU535 is not set
-
-#
-# Console drivers
-#
-# CONFIG_VGA_CONSOLE is not set
-
-#
-# Frame-buffer support
-#
-# CONFIG_FB is not set
-
-#
-# iSeries device drivers
-#
-CONFIG_VIOCONS=y
-CONFIG_VIODASD=y
-# CONFIG_VIODASD_IDE is not set
-CONFIG_VIOCD=y
-# CONFIG_VIOCD_AZTECH is not set
-CONFIG_VIOTAPE=y
-CONFIG_VETH=y
-CONFIG_VIOPATH=y
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_BLK_DEV_IDECD=y
-
-#
-# Input core support
-#
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
-
-#
-# Macintosh device drivers
-#
-
-#
-# Character devices
-#
-# CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
-# CONFIG_SERIAL_NONSTANDARD is not set
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
-
-#
-# I2C support
-#
-# CONFIG_I2C is not set
-
-#
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_GAMEPORT is not set
-
-#
-# Input core support is needed for gameports
-#
-
-#
-# Input core support is needed for joysticks
-#
-# CONFIG_QIC02_TAPE is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
-# CONFIG_NVRAM is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# File systems
-#
-# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-CONFIG_REISERFS_FS=y
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
-CONFIG_CRAMFS=y
-# CONFIG_TMPFS is not set
-CONFIG_RAMFS=y
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-# CONFIG_MINIX_FS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-# CONFIG_HPFS_FS is not set
-CONFIG_PROC_FS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS=y
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_EXT2_FS=y
-# CONFIG_SYSV_FS is not set
-# CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
-# CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-# CONFIG_CODA_FS is not set
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_ROOT_NFS=y
-# CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
-CONFIG_SUNRPC=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-# CONFIG_SMB_FS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-
-#
-# Partition Types
-#
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-CONFIG_NLS=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-# CONFIG_USB is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
diff -Nru a/arch/ppc/configs/ibmchrp_defconfig b/arch/ppc/configs/ibmchrp_defconfig
--- a/arch/ppc/configs/ibmchrp_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/ibmchrp_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,15 +39,40 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
-CONFIG_PPC_STD_MMU=y
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_ALL_PPC=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_ALL_PPC_CH=y
 # CONFIG_APUS is not set
+# CONFIG_WILLOW_2 is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_MENF1 is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
+# CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -41,54 +81,58 @@
 #
 CONFIG_HIGHMEM=y
 # CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_PPC601_SYNC_FIX is not set
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PPC_RTAS=y
-# CONFIG_BOOTX_TEXT is not set
 # CONFIG_PREP_RESIDUAL is not set
+CONFIG_PPCBUG_NVRAM=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=y
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -99,13 +143,98 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=y
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_BLK_DEV_3W_XXXX_RAID 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_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_NCR53C7xx is not set
+CONFIG_SCSI_SYM53C8XX_2=y
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_MESH is not set
+# CONFIG_SCSI_MAC53C94 is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -117,6 +246,7 @@
 # CONFIG_NETFILTER_DEBUG is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -127,9 +257,12 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 
 #
-#   IP: Netfilter Configuration
+# IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_FTP=m
@@ -138,13 +271,19 @@
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_MAC=m
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
 CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
 CONFIG_IP_NF_MATCH_LENGTH=m
 CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
 CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_UNCLEAN=m
 CONFIG_IP_NF_MATCH_OWNER=m
 CONFIG_IP_NF_FILTER=m
@@ -154,30 +293,32 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
 # CONFIG_IP_NF_MANGLE is not set
 # CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -190,97 +331,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-CONFIG_SCSI=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
-CONFIG_CHR_DEV_ST=y
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=y
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=2
-CONFIG_CHR_DEV_SG=y
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_DEBUG_QUEUES is not set
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-# CONFIG_SCSI_LOGGING is not set
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_AM53C974 is not set
-# CONFIG_SCSI_MEGARAID is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_DMA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_NCR53C7xx is not set
-CONFIG_SCSI_SYM53C8XX_2=y
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PCI2000 is not set
-# CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_MESH is not set
-# CONFIG_SCSI_MAC53C94 is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -297,64 +350,52 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+# CONFIG_CRC32 is not set
 # CONFIG_MACE is not set
 # CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+# CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_APRICOT is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_TULIP is not set
-CONFIG_DE4X5=y
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_VIA_RHINE_MMIO is not set
-# CONFIG_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -364,12 +405,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-CONFIG_TR=y
-CONFIG_IBMOL=y
-# CONFIG_IBMLS is not set
-# CONFIG_TMS380TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -392,24 +429,12 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Console drivers
-#
-CONFIG_VGA_CONSOLE=y
-
-#
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FB_RIVA is not set
 # CONFIG_FB_CLGEN is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
@@ -421,45 +446,86 @@
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_S3TRIO is not set
 # CONFIG_FB_VGA16 is not set
+# CONFIG_FB_RIVA is not set
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G100=y
 # CONFIG_FB_MATROX_G450 is not set
+CONFIG_FB_MATROX_G100A=y
+CONFIG_FB_MATROX_G100=y
 # CONFIG_FB_MATROX_MULTIHEAD is not set
-# CONFIG_FB_ATY is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
 CONFIG_FB_3DFX=y
 # CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
 # CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-CONFIG_FBCON_FONTS=y
-# CONFIG_FONT_8x8 is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-CONFIG_FONT_SUN8x16=y
-CONFIG_FONT_SUN12x22=y
-# CONFIG_FONT_6x11 is not set
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
-# CONFIG_FB_COMPAT_XPMAC is not set
 
 #
-# Input core support
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Input device support
 #
 CONFIG_INPUT=y
-CONFIG_INPUT_KEYBDEV=y
+
+#
+# Userland interfaces
+#
 CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=y
+CONFIG_INPUT_UINPUT=y
 
 #
 # Macintosh device drivers
@@ -469,17 +535,26 @@
 # CONFIG_MAC_FLOPPY is not set
 # CONFIG_MAC_SERIAL is not set
 # CONFIG_ADB is not set
-CONFIG_MAC_HID=y
 
 #
 # Character devices
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_CONSOLE is not set
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -489,60 +564,27 @@
 # CONFIG_I2C is not set
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+
+#
 # Mice
 #
 CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_GAMEPORT is not set
-# CONFIG_INPUT_NS558 is not set
-# CONFIG_INPUT_LIGHTNING is not set
-# CONFIG_INPUT_PCIGAME is not set
-# CONFIG_INPUT_CS461X is not set
-# CONFIG_INPUT_EMU10K1 is not set
-# CONFIG_INPUT_SERIO is not set
-# CONFIG_INPUT_SERPORT is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_ANALOG is not set
-# CONFIG_INPUT_A3D is not set
-# CONFIG_INPUT_ADI is not set
-# CONFIG_INPUT_COBRA is not set
-# CONFIG_INPUT_GF2K is not set
-# CONFIG_INPUT_GRIP is not set
-# CONFIG_INPUT_INTERACT is not set
-# CONFIG_INPUT_TMDC is not set
-# CONFIG_INPUT_SIDEWINDER is not set
-# CONFIG_INPUT_IFORCE_USB is not set
-# CONFIG_INPUT_IFORCE_232 is not set
-# CONFIG_INPUT_WARRIOR is not set
-# CONFIG_INPUT_MAGELLAN is not set
-# CONFIG_INPUT_SPACEORB is not set
-# CONFIG_INPUT_SPACEBALL is not set
-# CONFIG_INPUT_STINGER is not set
-# CONFIG_INPUT_DB9 is not set
-# CONFIG_INPUT_GAMECON is not set
-# CONFIG_INPUT_TURBOGRAFX is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 CONFIG_NVRAM=y
 # CONFIG_RTC 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_APPLICOM is not set
@@ -553,6 +595,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -566,34 +609,27 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 CONFIG_FAT_FS=m
 CONFIG_MSDOS_FS=m
-# CONFIG_UMSDOS_FS is not set
 CONFIG_VFAT_FS=m
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 CONFIG_DEVFS_FS=y
@@ -601,14 +637,13 @@
 # CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -616,24 +651,12 @@
 # CONFIG_CODA_FS is not set
 # CONFIG_INTERMEZZO_FS is not set
 # CONFIG_NFS_FS is not set
-# CONFIG_NFS_V3 is not set
-# CONFIG_ROOT_NFS is not set
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
-# CONFIG_SUNRPC is not set
-# CONFIG_LOCKD is not set
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
@@ -653,7 +676,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 CONFIG_NLS=y
 
 #
@@ -681,6 +704,7 @@
 # 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_ISO8859_1=m
 # CONFIG_NLS_ISO8859_2 is not set
@@ -708,111 +732,27 @@
 # CONFIG_USB is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-# CONFIG_USB_HID is not set
-# CONFIG_USB_HIDDEV is not set
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-# CONFIG_USB_WACOM is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_BOOTX_TEXT is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_KGDB is not set
-CONFIG_XMON=y
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/k2_defconfig b/arch/ppc/configs/k2_defconfig
--- a/arch/ppc/configs/k2_defconfig	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/configs/k2_defconfig	Wed Jan  8 20:04:32 2003
@@ -1,8 +1,7 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,15 +39,20 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_WILLOW is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
 # CONFIG_EV64260 is not set
@@ -47,10 +67,12 @@
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 CONFIG_K2=y
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_CPC710_DATA_GATHERING is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -58,51 +80,54 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -113,26 +138,68 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_IDEPCI is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -142,11 +209,15 @@
 # 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_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 
 #
-#   IP: Netfilter Configuration
+# IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_FTP=m
@@ -155,13 +226,19 @@
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
 CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
 # CONFIG_IP_NF_MATCH_LENGTH is not set
 # CONFIG_IP_NF_MATCH_TTL is not set
 CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
 CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_UNCLEAN=m
 CONFIG_IP_NF_MATCH_OWNER=m
 CONFIG_IP_NF_FILTER=m
@@ -171,25 +248,31 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_FTP=m
 # CONFIG_IP_NF_MANGLE is not set
 # CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -202,76 +285,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
-CONFIG_BLK_DEV_IDE=y
-# CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
-# CONFIG_BLK_DEV_IDECD is not set
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC62XX_TUNING is not set
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_AMD74XX_OVERRIDE is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
-# CONFIG_PDC202XX_FORCE is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_BLK_DEV_SL82C105 is not set
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_BLK_DEV_IDE_MODES=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -288,63 +304,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_TULIP is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -354,10 +357,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -379,31 +380,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -413,10 +427,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -426,24 +450,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# Mice
 #
-# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -454,6 +481,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -467,49 +495,35 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -518,31 +532,22 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -553,63 +558,6 @@
 # USB support
 #
 # CONFIG_USB is not set
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_RIO500 is not set
 
 #
 # Bluetooth support
@@ -617,9 +565,21 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-CONFIG_XMON=y
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/lopec_defconfig b/arch/ppc/configs/lopec_defconfig
--- a/arch/ppc/configs/lopec_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/lopec_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -14,16 +13,24 @@
 #
 # General setup
 #
-CONFIG_NET=y
 CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
 
 #
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -33,14 +40,19 @@
 CONFIG_PPC32=y
 CONFIG_6xx=y
 # CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_WILLOW is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
 # CONFIG_EV64260 is not set
@@ -55,6 +67,7 @@
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 # CONFIG_ZX4500 is not set
 CONFIG_EPIC_SERIAL_MODE=y
@@ -67,12 +80,6 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_HIGHPTE is not set
-# CONFIG_ADVANCED_OPTIONS is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
@@ -90,102 +97,52 @@
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
+# CONFIG_PPCBUG_NVRAM is not set
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE is not set
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_CISS_SCSI_TAPE is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 CONFIG_BLK_DEV_LOOP=m
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=m
 CONFIG_BLK_DEV_RAM_SIZE=4096
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-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_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
@@ -193,73 +150,26 @@
 CONFIG_IDE=y
 
 #
-# ATA and ATAPI Block devices
+# IDE, ATA and ATAPI Block devices
 #
 CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_IDEDISK_STROKE is not set
-# CONFIG_BLK_DEV_IDECS is not set
 # CONFIG_BLK_DEV_IDECD is not set
-# CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
-# ATA host chip set support
+# IDE chipset support/bugfixes
 #
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-
-#
-#   PCI host chip set support
-#
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_IDEPCI_SHARE_IRQ is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_BLK_DEV_IDE_TCQ is not set
-# CONFIG_BLK_DEV_IDE_TCQ_DEFAULT is not set
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC6280_BURST is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
-# CONFIG_PDC202XX_FORCE is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-CONFIG_BLK_DEV_SL82C105=y
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_ATAPI=y
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
+# CONFIG_BLK_DEV_IDEPCI is not set
 
 #
 # SCSI support
@@ -270,7 +180,6 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 # CONFIG_CHR_DEV_ST is not set
 # CONFIG_CHR_DEV_OSST is not set
 # CONFIG_BLK_DEV_SR is not set
@@ -288,10 +197,11 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
@@ -300,34 +210,29 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
@@ -344,15 +249,67 @@
 # I2O device support
 #
 # CONFIG_I2O is not set
-# CONFIG_I2O_PCI is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
 
 #
-# Network device support
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_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_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
 #
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -369,47 +326,35 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
+# CONFIG_CRC32 is not set
 # CONFIG_OAKNET is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
 # CONFIG_EEPRO100 is not set
 CONFIG_E100=y
-# CONFIG_LNE390 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_NEW_RX_RESET 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_VIA_RHINE_MMIO is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -417,15 +362,14 @@
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
-# CONFIG_MYRI_SBUS is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -435,9 +379,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -448,11 +391,6 @@
 # CONFIG_WAN is not set
 
 #
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-
-#
 # Amateur Radio support
 #
 # CONFIG_HAMRADIO is not set
@@ -468,27 +406,12 @@
 # CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Console drivers
-#
-# CONFIG_VGA_CONSOLE is not set
-
-#
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
 # CONFIG_FB_CLGEN is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_OF is not set
-# CONFIG_FB_CONTROL is not set
-# CONFIG_FB_PLATINUM is not set
-# CONFIG_FB_VALKYRIE is not set
 # CONFIG_FB_CT65550 is not set
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_S3TRIO is not set
@@ -497,12 +420,13 @@
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 # CONFIG_FB_MATROX_MYSTIQUE is not set
-# CONFIG_FB_MATROX_G100 is not set
 # CONFIG_FB_MATROX_G450 is not set
+CONFIG_FB_MATROX_G100A=y
+CONFIG_FB_MATROX_G100=y
 # CONFIG_FB_MATROX_MULTIHEAD is not set
-# CONFIG_FB_ATY is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
 # CONFIG_FB_SIS is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_3DFX is not set
@@ -510,56 +434,57 @@
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
 # CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-# CONFIG_FBCON_FONTS is not set
+# CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
 
 #
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
 # Input device support
 #
 CONFIG_INPUT=m
-CONFIG_INPUT_KEYBDEV=m
+
+#
+# Userland interfaces
+#
 CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
 # CONFIG_GAMEPORT is not set
 CONFIG_SOUND_GAMEPORT=y
-# CONFIG_GAMEPORT_NS558 is not set
-# CONFIG_GAMEPORT_L4 is not set
-# CONFIG_INPUT_EMU10K1 is not set
-# CONFIG_GAMEPORT_PCIGAME is not set
-# CONFIG_GAMEPORT_FM801 is not set
-# CONFIG_GAMEPORT_CS461x is not set
 # CONFIG_SERIO is not set
-# CONFIG_SERIO_SERPORT is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_MOUSE=y
 # CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE_USB is not set
-# CONFIG_JOYSTICK_IFORCE_232 is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
 
 #
 # Macintosh device drivers
@@ -570,10 +495,21 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -583,17 +519,23 @@
 # CONFIG_I2C is not set
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+
+#
 # Mice
 #
 # CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 CONFIG_GEN_RTC=y
@@ -608,6 +550,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -618,22 +561,13 @@
 # Video For Linux
 #
 CONFIG_VIDEO_PROC_FS=y
-# CONFIG_I2C_PARPORT is not set
 
 #
 # Video Adapters
 #
 # CONFIG_VIDEO_PMS is not set
 # CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
 # CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_ZORAN_BUZ is not set
-# CONFIG_VIDEO_ZORAN_DC10 is not set
-# CONFIG_VIDEO_ZORAN_LML33 is not set
-# CONFIG_VIDEO_ZR36120 is not set
-# CONFIG_VIDEO_MEYE is not set
 
 #
 # Radio Adapters
@@ -643,60 +577,49 @@
 # CONFIG_RADIO_MAESTRO is not set
 
 #
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
 # File systems
 #
 # CONFIG_QUOTA is not set
-# CONFIG_QFMT_V1 is not set
-# CONFIG_QFMT_V2 is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
 CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
 # CONFIG_JFS_FS is not set
-# CONFIG_JFS_DEBUG is not set
-# CONFIG_JFS_STATISTICS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -705,33 +628,24 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 # CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -748,7 +662,6 @@
 # Miscellaneous USB options
 #
 CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_LONG_TIMEOUT is not set
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
 
@@ -758,37 +671,32 @@
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_UHCI_HCD is not set
-# CONFIG_USB_UHCI_HCD_ALT is not set
 
 #
 # USB Device Class drivers
 #
-# CONFIG_USB_AUDIO is not set
 # CONFIG_USB_BLUETOOTH_TTY is not set
-# CONFIG_USB_MIDI is not set
 CONFIG_USB_ACM=m
 # CONFIG_USB_PRINTER is not set
 # CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_SDDR55 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
 
 #
 # USB Human Interface Devices (HID)
 #
 CONFIG_USB_HID=m
 CONFIG_USB_HIDINPUT=y
+# CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV 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_POWERMATE is not set
+# CONFIG_USB_XPAD is not set
 
 #
 # USB Imaging devices
@@ -824,7 +732,6 @@
 #
 # USB port drivers
 #
-# CONFIG_USB_USS720 is not set
 
 #
 # USB Serial Converter support
@@ -840,23 +747,14 @@
 # CONFIG_USB_SERIAL_IPAQ is not set
 # CONFIG_USB_SERIAL_IR is not set
 # CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
 # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
 # CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
 # CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
 # CONFIG_USB_SERIAL_SAFE is not set
-# CONFIG_USB_SERIAL_SAFE_PADDED is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
@@ -864,11 +762,12 @@
 #
 # USB Miscellaneous drivers
 #
-# CONFIG_USB_EMI26 is not set
 # CONFIG_USB_TIGL is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_BRLVGER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_TEST is not set
 
 #
 # Bluetooth support
@@ -878,15 +777,20 @@
 #
 # Library routines
 #
-# CONFIG_CRC32 is not set
-# CONFIG_ZLIB_INFLATE is not set
-# CONFIG_ZLIB_DEFLATE is not set
 
 #
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/mbx_defconfig b/arch/ppc/configs/mbx_defconfig
--- a/arch/ppc/configs/mbx_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/mbx_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,6 +11,20 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_SYSCTL is not set
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 # CONFIG_MODULES is not set
@@ -21,11 +35,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 # CONFIG_RPXCLASSIC is not set
 # CONFIG_BSEIP is not set
@@ -35,116 +55,140 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 CONFIG_MBX=y
 # CONFIG_WINCEPT is not set
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-# CONFIG_SYSCTL is not set
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 # CONFIG_PACKET is not set
-# CONFIG_NETLINK is not set
+# CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+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_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -157,64 +201,26 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -224,11 +230,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -249,7 +252,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -257,22 +272,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -282,43 +299,49 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_UNIX98_PTYS is not set
 
 #
-# I2C support
+# Serial drivers
 #
-# CONFIG_I2C is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
-# Mice
+# Non-8250 serial port support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_UNIX98_PTYS is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -329,6 +352,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -342,66 +366,56 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS is not set
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -417,8 +431,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -449,113 +462,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/mcpn765_defconfig b/arch/ppc/configs/mcpn765_defconfig
--- a/arch/ppc/configs/mcpn765_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/mcpn765_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,6 +11,20 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 # CONFIG_MODULES is not set
@@ -21,29 +35,39 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
 # CONFIG_LOPEC is not set
 CONFIG_MCPN765=y
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
-# CONFIG_WILLOW is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_ALTIVEC=y
 # CONFIG_TAU is not set
 
@@ -51,53 +75,54 @@
 # General setup
 #
 CONFIG_HIGHMEM=y
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_VIODASD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -108,25 +133,46 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -136,18 +182,26 @@
 # 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_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -160,25 +214,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -195,64 +233,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
+# CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -262,10 +286,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -287,31 +309,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -321,18 +356,22 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_SERIAL_EXTENDED=y
-# CONFIG_SERIAL_MANY_PORTS is not set
-CONFIG_SERIAL_SHARE_IRQ=y
-CONFIG_SERIAL_DETECT_IRQ=y
-# CONFIG_SERIAL_MULTIPORT is not set
-# CONFIG_HUB6 is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
-# CONFIG_VIOCONS is not set
 
 #
 # I2C support
@@ -340,25 +379,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# Mice
 #
-# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
-# CONFIG_VIOTAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -369,6 +410,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -382,74 +424,58 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_TMPFS is not set
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_EXT2_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -467,10 +493,22 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_DEBUG_TEXT is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/menf1_defconfig b/arch/ppc/configs/menf1_defconfig
--- a/arch/ppc/configs/menf1_defconfig	Wed Jan  8 20:04:31 2003
+++ b/arch/ppc/configs/menf1_defconfig	Wed Jan  8 20:04:31 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,30 +39,40 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 CONFIG_MENF1=y
 # CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
-# CONFIG_WILLOW is not set
 # CONFIG_ZX4500 is not set
 CONFIG_MPC10X_STORE_GATHERING=y
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -54,81 +80,124 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_IDEPCI is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -139,23 +208,36 @@
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 
 #
-#   IP: Netfilter Configuration
+# IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
 # CONFIG_IP_NF_QUEUE is not set
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
 CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
 CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_UNCLEAN=m
 CONFIG_IP_NF_MATCH_OWNER=m
 CONFIG_IP_NF_FILTER=m
@@ -165,27 +247,32 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
 # CONFIG_IP_NF_MANGLE is not set
 # CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -198,83 +285,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-
-#
-# IDE chipset support/bugfixes
-#
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-# CONFIG_IDEPCI_SHARE_IRQ is not set
-# CONFIG_BLK_DEV_IDEDMA_PCI is not set
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
-# CONFIG_BLK_DEV_IDEDMA is not set
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC62XX_TUNING is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_AMD74XX_OVERRIDE is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
-# CONFIG_PDC202XX_FORCE is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_BLK_DEV_SL82C105 is not set
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -291,65 +304,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -359,10 +357,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -384,31 +380,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -418,10 +427,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -431,32 +450,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
-#
-
-#
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -467,7 +481,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -481,74 +495,65 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -561,111 +566,26 @@
 # CONFIG_USB is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/mvme5100_defconfig b/arch/ppc/configs/mvme5100_defconfig
--- a/arch/ppc/configs/mvme5100_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/mvme5100_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,25 +39,40 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
-# CONFIG_ALL_PPC is not set
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PPC_STD_MMU=y
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
+# CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 CONFIG_MVME5100=y
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_MVME5100_IPMC761_PRESENT is not set
-# CONFIG_PPC601_SYNC_FIX is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_ALTIVEC=y
 # CONFIG_TAU is not set
 
@@ -49,51 +80,54 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -104,92 +138,6 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_FILTER=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
-
-#
-#   IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_MIRROR=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
@@ -204,53 +152,19 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECD is not set
-# CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
 # IDE chipset support/bugfixes
 #
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-# CONFIG_IDEPCI_SHARE_IRQ is not set
-# CONFIG_BLK_DEV_IDEDMA_PCI is not set
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
-# CONFIG_BLK_DEV_IDEDMA is not set
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC62XX_TUNING is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD7409 is not set
-# CONFIG_AMD7409_OVERRIDE is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
-# CONFIG_BLK_DEV_OSB4 is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_BLK_DEV_SL82C105 is not set
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_IDEPCI is not set
 
 #
 # SCSI support
@@ -261,19 +175,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 # CONFIG_CHR_DEV_ST is not set
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 # CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_SR_EXTRA_DEVS=2
 # CONFIG_CHR_DEV_SG is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 
@@ -281,13 +193,12 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
 # CONFIG_SCSI_AM53C974 is not set
@@ -295,17 +206,17 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_NCR53C8XX is not set
 CONFIG_SCSI_SYM53C8XX=y
 CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
@@ -315,31 +226,137 @@
 # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
 # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
 # CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_MESH is not set
-# CONFIG_SCSI_MAC53C94 is not set
 
 #
-# IEEE 1394 (FireWire) support
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
 #
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_FILTER=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -351,62 +368,53 @@
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 # CONFIG_ETHERTAP is not set
-# CONFIG_NET_SB1000 is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_NCR885E is not set
+# CONFIG_CRC32 is not set
 # CONFIG_OAKNET is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_EEPRO100_PM is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
+# CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_NET_POCKET 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
@@ -418,9 +426,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -443,29 +450,46 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
 
 #
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
+
+#
 # Macintosh device drivers
 #
 
@@ -473,10 +497,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -486,28 +520,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_JOYSTICK is not set
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -518,6 +551,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -531,74 +565,59 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
-# CONFIG_SYSV_FS_WRITE is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -611,8 +630,26 @@
 # CONFIG_USB is not set
 
 #
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/oak_defconfig b/arch/ppc/configs/oak_defconfig
--- a/arch/ppc/configs/oak_defconfig	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/configs/oak_defconfig	Wed Jan  8 20:04:32 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,78 +39,88 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
-# CONFIG_CEDER is not set
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_ASH is not set
+# CONFIG_BEECH is not set
+# CONFIG_CEDAR is not set
 # CONFIG_CPCI405 is not set
 # CONFIG_EP405 is not set
 CONFIG_OAK=y
+# CONFIG_RAINIER is not set
 # CONFIG_REDWOOD_4 is not set
 # CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
 # CONFIG_WALNUT is not set
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
+# CONFIG_XILINX_ML300 is not set
+CONFIG_IBM405_ERR51=y
 CONFIG_403GCX=y
-CONFIG_TREEBOOT=y
+# CONFIG_PPC4xx_DMA is not set
 # CONFIG_405_DMA is not set
+# CONFIG_PM is not set
 CONFIG_UART0_TTYS0=y
 # CONFIG_UART0_TTYS1 is not set
-CONFIG_IBM405_ERR51=y
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 # CONFIG_PCI is not set
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -106,13 +131,30 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -122,6 +164,7 @@
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -135,33 +178,23 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -174,44 +207,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -222,36 +221,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
+# CONFIG_CRC32 is not set
 CONFIG_OAKNET=y
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -261,11 +236,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -286,7 +258,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -294,22 +278,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -319,44 +305,49 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_UNIX98_PTYS is not set
 
 #
-# I2C support
+# Serial drivers
 #
-# CONFIG_I2C is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
-# Mice
+# Non-8250 serial port support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_UNIX98_PTYS is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -367,6 +358,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -380,49 +372,34 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS is not set
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -431,31 +408,22 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -463,123 +431,35 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
 
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
 
 #
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/pcore_defconfig b/arch/ppc/configs/pcore_defconfig
--- a/arch/ppc/configs/pcore_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/pcore_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,25 +39,41 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
-# CONFIG_ALL_PPC is not set
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PPC_STD_MMU=y
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 CONFIG_PCORE=y
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
+# CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 # CONFIG_ZX4500 is not set
+CONFIG_FORCE=y
 # CONFIG_MPC10X_STORE_GATHERING is not set
-# CONFIG_PPC601_SYNC_FIX is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_ALTIVEC=y
 # CONFIG_TAU is not set
 
@@ -49,51 +81,54 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -104,99 +139,11 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
-
-#
-#   IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_MIRROR=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
 #
 # CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI support
@@ -207,19 +154,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 # CONFIG_CHR_DEV_ST is not set
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 # CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_SR_EXTRA_DEVS=2
 # CONFIG_CHR_DEV_SG is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -227,13 +172,12 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
 # CONFIG_SCSI_AM53C974 is not set
@@ -241,17 +185,17 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_NCR53C8XX is not set
 CONFIG_SCSI_SYM53C8XX=y
 CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
@@ -261,31 +205,137 @@
 # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
 # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
 # CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_MESH is not set
-# CONFIG_SCSI_MAC53C94 is not set
 
 #
-# IEEE 1394 (FireWire) support
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
 #
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -297,62 +347,53 @@
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 # CONFIG_ETHERTAP is not set
-# CONFIG_NET_SB1000 is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_NCR885E is not set
+# CONFIG_CRC32 is not set
 # CONFIG_OAKNET is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_EEPRO100_PM is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
+# CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_NET_POCKET 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
@@ -364,9 +405,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -389,29 +429,46 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
 
 #
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
+
+#
 # Macintosh device drivers
 #
 
@@ -419,10 +476,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -432,34 +499,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_JOYSTICK is not set
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+CONFIG_BUSMOUSE=y
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -470,6 +530,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -483,74 +544,63 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
-# CONFIG_SYSV_FS_WRITE is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -563,8 +613,26 @@
 # CONFIG_USB is not set
 
 #
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/pmac_defconfig b/arch/ppc/configs/pmac_defconfig
--- a/arch/ppc/configs/pmac_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/pmac_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,16 +39,42 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
-# CONFIG_POWER4 is not set
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_PM=y
 # CONFIG_8260 is not set
-CONFIG_PPC_STD_MMU=y
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_ALL_PPC=y
+CONFIG_PPC_STD_MMU=y
+# CONFIG_SERIAL_CONSOLE is not set
+CONFIG_ALL_PPC_CH=y
 # CONFIG_APUS is not set
+# CONFIG_WILLOW_2 is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_MENF1 is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
+# CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_ALTIVEC=y
 CONFIG_TAU=y
 # CONFIG_TAU_INT is not set
@@ -44,14 +85,7 @@
 #
 # CONFIG_HIGHMEM is not set
 # CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
@@ -64,42 +98,52 @@
 #
 CONFIG_PCMCIA=m
 CONFIG_CARDBUS=y
-CONFIG_I82092=y
-CONFIG_I82365=y
-CONFIG_TCIC=y
+CONFIG_I82092=m
+CONFIG_I82365=m
+CONFIG_TCIC=m
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_PPC601_SYNC_FIX=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PPC_RTAS=y
-CONFIG_BOOTX_TEXT=y
 # CONFIG_PREP_RESIDUAL is not set
+CONFIG_PPCBUG_NVRAM=y
 # CONFIG_CMDLINE_BOOL is not set
 
 #
+# Advanced setup
+#
+CONFIG_ADVANCED_OPTIONS=y
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+# CONFIG_KERNEL_START_BOOL is not set
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE_BOOL=y
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=m
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -110,95 +154,6 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_FILTER=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP 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_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-
-#
-#   IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_MIRROR=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-CONFIG_ATALK=m
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
@@ -213,62 +168,60 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECS=m
 CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
 CONFIG_BLK_DEV_IDESCSI=y
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
 # IDE chipset support/bugfixes
 #
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_BLK_DEV_GENERIC=y
 CONFIG_IDEPCI_SHARE_IRQ=y
 CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDE_TCQ is not set
 # CONFIG_BLK_DEV_OFFBOARD is not set
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
+# CONFIG_IDEDMA_PCI_WIP is not set
+CONFIG_BLK_DEV_ADMA=y
 # CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC62XX_TUNING is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_WDC_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_AMD74XX_OVERRIDE is not set
 CONFIG_BLK_DEV_CMD64X=y
 # CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
 # CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
 # CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_NFORCE is not set
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+CONFIG_BLK_DEV_PDC202XX_NEW=y
 # CONFIG_PDC202XX_FORCE is not set
 # CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
 CONFIG_BLK_DEV_SL82C105=y
 CONFIG_BLK_DEV_IDE_PMAC=y
 CONFIG_BLK_DEV_IDEDMA_PMAC=y
 CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDE_CHIPSETS is not set
 CONFIG_IDEDMA_AUTO=y
 # CONFIG_IDEDMA_IVB is not set
+CONFIG_BLK_DEV_PDC202XX=y
 CONFIG_BLK_DEV_IDE_MODES=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
 
 #
 # SCSI support
@@ -279,19 +232,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 CONFIG_CHR_DEV_ST=y
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=2
 CONFIG_CHR_DEV_SG=y
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -299,19 +250,18 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AACRAID is not set
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
 # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
+CONFIG_AIC7XXX_DEBUG_ENABLE=y
+CONFIG_AIC7XXX_DEBUG_MASK=0
+CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 CONFIG_SCSI_AIC7XXX_OLD=m
-# CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT is not set
-CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8
-CONFIG_AIC7XXX_OLD_PROC_STATS=y
+# CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
 CONFIG_SCSI_ADVANSYS=m
 # CONFIG_SCSI_IN2000 is not set
@@ -320,38 +270,33 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 CONFIG_SCSI_MESH=y
 CONFIG_SCSI_MESH_SYNC_RATE=5
+CONFIG_SCSI_MESH_RESET_DELAY_MS=1000
 CONFIG_SCSI_MAC53C94=y
 
 #
@@ -360,16 +305,28 @@
 # CONFIG_SCSI_PCMCIA is not set
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 CONFIG_IEEE1394=m
 
 #
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+# CONFIG_IEEE1394_OUI_DB is not set
+
+#
 # Device Drivers
 #
-CONFIG_IEEE1394_PCILYNX=m
-# CONFIG_IEEE1394_PCILYNX_LOCALRAM is not set
-# CONFIG_IEEE1394_PCILYNX_PORTS is not set
+
+#
+# Texas Instruments PCILynx requires I2C bit-banging
+#
 CONFIG_IEEE1394_OHCI1394=m
 
 #
@@ -377,25 +334,126 @@
 #
 CONFIG_IEEE1394_VIDEO1394=m
 CONFIG_IEEE1394_SBP2=m
+# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
+CONFIG_IEEE1394_ETH1394=m
+CONFIG_IEEE1394_DV1394=m
 CONFIG_IEEE1394_RAWIO=m
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+# CONFIG_IEEE1394_CMP is not set
 
 #
-# Network device support
+# I2O device support
 #
-CONFIG_NETDEVICES=y
+# CONFIG_I2O is not set
 
 #
-# ARCnet devices
+# Networking support
 #
-# CONFIG_ARCNET is not set
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_FILTER=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP 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_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
 
 #
-# Appletalk devices
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_IPDDP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -406,67 +464,53 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+# CONFIG_CRC32 is not set
 CONFIG_MACE=y
 # CONFIG_MACE_AAUI_PORT is not set
 CONFIG_BMAC=y
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 CONFIG_SUNGEM=y
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+# CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-CONFIG_DE4X5=m
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_VIA_RHINE_MMIO is not set
-# CONFIG_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 CONFIG_PPP=y
 CONFIG_PPP_MULTILINK=y
 # CONFIG_PPP_FILTER is not set
@@ -482,27 +526,29 @@
 #
 CONFIG_NET_RADIO=y
 # CONFIG_STRIP is not set
-# CONFIG_WAVELAN is not set
-# CONFIG_ARLAN is not set
 # CONFIG_AIRONET4500 is not set
-# CONFIG_AIRONET4500_NONCS is not set
-# CONFIG_AIRONET4500_PROC is not set
+
+#
+# Wireless ISA/PCI cards support
+#
 # CONFIG_AIRO is not set
 CONFIG_HERMES=m
 CONFIG_APPLE_AIRPORT=m
 # CONFIG_PLX_HERMES is not set
+# CONFIG_PCI_HERMES is not set
 
 #
-# Wireless Pcmcia cards support
+# Wireless Pcmcia/Cardbus cards support
 #
+# CONFIG_PCMCIA_NETWAVE is not set
+# CONFIG_PCMCIA_WAVELAN is not set
 CONFIG_PCMCIA_HERMES=m
 # CONFIG_AIRO_CS is not set
 CONFIG_NET_WIRELESS=y
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -520,19 +566,12 @@
 # CONFIG_PCMCIA_3C574 is not set
 # CONFIG_PCMCIA_FMVJ18X is not set
 # CONFIG_PCMCIA_PCNET is not set
-# CONFIG_PCMCIA_AXNET is not set
 # CONFIG_PCMCIA_NMCLAN is not set
 # CONFIG_PCMCIA_SMC91C92 is not set
 # CONFIG_PCMCIA_XIRC2PS is not set
-# CONFIG_ARCNET_COM20020_CS is not set
-# CONFIG_PCMCIA_IBMTR is not set
-# CONFIG_PCMCIA_XIRCOM is not set
-# CONFIG_PCMCIA_XIRTULIP is not set
+# CONFIG_PCMCIA_AXNET is not set
 CONFIG_NET_PCMCIA_RADIO=y
 # CONFIG_PCMCIA_RAYCS is not set
-# CONFIG_PCMCIA_NETWAVE is not set
-# CONFIG_PCMCIA_WAVELAN is not set
-# CONFIG_AIRONET4500_CS is not set
 
 #
 # Amateur Radio support
@@ -551,7 +590,13 @@
 CONFIG_IRNET=m
 CONFIG_IRCOMM=m
 # CONFIG_IRDA_ULTRA is not set
-# CONFIG_IRDA_OPTIONS is not set
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
 
 #
 # Infrared-port device drivers
@@ -561,7 +606,6 @@
 # SIR device drivers
 #
 CONFIG_IRTTY_SIR=m
-# CONFIG_IRPORT_SIR is not set
 
 #
 # Dongle support
@@ -569,11 +613,23 @@
 # CONFIG_DONGLE is not set
 
 #
+# Old SIR device drivers
+#
+# CONFIG_IRTTY_OLD is not set
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+# CONFIG_DONGLE_OLD is not set
+
+#
 # FIR device drivers
 #
 # CONFIG_USB_IRDA is not set
 # CONFIG_NSC_FIR is not set
 # CONFIG_WINBOND_FIR is not set
+# CONFIG_TOSHIBA_OLD is not set
 # CONFIG_TOSHIBA_FIR is not set
 # CONFIG_SMC_IRCC_FIR is not set
 # CONFIG_ALI_FIR is not set
@@ -582,24 +638,12 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Console drivers
-#
-# CONFIG_VGA_CONSOLE is not set
-
-#
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FB_RIVA is not set
 # CONFIG_FB_CLGEN is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
@@ -611,48 +655,77 @@
 CONFIG_FB_IMSTT=y
 # CONFIG_FB_S3TRIO is not set
 # CONFIG_FB_VGA16 is not set
+# CONFIG_FB_RIVA is not set
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 CONFIG_FB_MATROX_MYSTIQUE=y
-# CONFIG_FB_MATROX_G100 is not set
-# CONFIG_FB_MATROX_I2C is not set
 # CONFIG_FB_MATROX_G450 is not set
+CONFIG_FB_MATROX_G100A=y
+CONFIG_FB_MATROX_G100=y
 # CONFIG_FB_MATROX_MULTIHEAD is not set
-CONFIG_FB_ATY=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_CT=y
 CONFIG_FB_RADEON=y
 CONFIG_FB_ATY128=y
+CONFIG_FB_ATY=y
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GX=y
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
 CONFIG_FB_3DFX=y
 # CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
 # CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-CONFIG_FBCON_FONTS=y
-# CONFIG_FONT_8x8 is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-CONFIG_FONT_SUN8x16=y
-CONFIG_FONT_SUN12x22=y
-# CONFIG_FONT_6x11 is not set
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
-CONFIG_FB_COMPAT_XPMAC=y
 
 #
-# Input core support
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Input device support
 #
 CONFIG_INPUT=y
-CONFIG_INPUT_KEYBDEV=y
+
+#
+# Userland interfaces
+#
 CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
 
 #
 # Macintosh device drivers
@@ -660,18 +733,14 @@
 CONFIG_ADB_CUDA=y
 CONFIG_ADB_PMU=y
 CONFIG_PMAC_PBOOK=y
-CONFIG_PM=y
 CONFIG_PMAC_APM_EMU=y
 CONFIG_PMAC_BACKLIGHT=y
 CONFIG_MAC_FLOPPY=y
 CONFIG_MAC_SERIAL=y
-# CONFIG_SERIAL_CONSOLE is not set
 CONFIG_ADB=y
 CONFIG_ADB_MACIO=y
 CONFIG_INPUT_ADBHID=y
-CONFIG_MAC_ADBKEYCODES=y
 CONFIG_MAC_EMUMOUSEBTN=y
-CONFIG_MAC_HID=y
 # CONFIG_ANSLCD is not set
 
 #
@@ -679,9 +748,20 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=m
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=m
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -691,65 +771,35 @@
 CONFIG_I2C=m
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
-CONFIG_I2C_KEYWEST=m
 CONFIG_I2C_CHARDEV=m
 CONFIG_I2C_PROC=m
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+
+#
+# I2C Hardware Sensors Chip support
+#
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_LM75 is not set
+
+#
 # Mice
 #
 CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_GAMEPORT is not set
-# CONFIG_INPUT_NS558 is not set
-# CONFIG_INPUT_LIGHTNING is not set
-# CONFIG_INPUT_PCIGAME is not set
-# CONFIG_INPUT_CS461X is not set
-# CONFIG_INPUT_EMU10K1 is not set
-# CONFIG_INPUT_SERIO is not set
-# CONFIG_INPUT_SERPORT is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_ANALOG is not set
-# CONFIG_INPUT_A3D is not set
-# CONFIG_INPUT_ADI is not set
-# CONFIG_INPUT_COBRA is not set
-# CONFIG_INPUT_GF2K is not set
-# CONFIG_INPUT_GRIP is not set
-# CONFIG_INPUT_INTERACT is not set
-# CONFIG_INPUT_TMDC is not set
-# CONFIG_INPUT_SIDEWINDER is not set
-# CONFIG_INPUT_IFORCE_USB is not set
-# CONFIG_INPUT_IFORCE_232 is not set
-# CONFIG_INPUT_WARRIOR is not set
-# CONFIG_INPUT_MAGELLAN is not set
-# CONFIG_INPUT_SPACEORB is not set
-# CONFIG_INPUT_SPACEBALL is not set
-# CONFIG_INPUT_STINGER is not set
-# CONFIG_INPUT_DB9 is not set
-# CONFIG_INPUT_GAMECON is not set
-# CONFIG_INPUT_TURBOGRAFX is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 CONFIG_NVRAM=y
 # CONFIG_RTC 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_APPLICOM is not set
@@ -764,7 +814,8 @@
 #
 # PCMCIA character devices
 #
-# CONFIG_PCMCIA_SERIAL_CS is not set
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -778,34 +829,30 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 CONFIG_HFS_FS=m
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FAT_FS=m
 CONFIG_MSDOS_FS=m
-# CONFIG_UMSDOS_FS is not set
 CONFIG_VFAT_FS=m
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 CONFIG_DEVFS_FS=y
@@ -813,14 +860,13 @@
 # CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -829,24 +875,19 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
-# CONFIG_ROOT_NFS is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+CONFIG_EXPORTFS=y
+# CONFIG_CIFS is not set
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -866,6 +907,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
 CONFIG_SMB_NLS=y
 CONFIG_NLS=y
 
@@ -894,6 +936,7 @@
 # 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_ISO8859_1=m
 # CONFIG_NLS_ISO8859_2 is not set
@@ -914,31 +957,73 @@
 # Sound
 #
 CONFIG_SOUND=m
-CONFIG_DMASOUND_PMAC=m
+CONFIG_DMASOUND_AWACS=m
 CONFIG_DMASOUND=m
-CONFIG_I2C=m
-CONFIG_I2C_KEYWEST=m
-# CONFIG_SOUND_BT878 is not set
-# CONFIG_SOUND_CMPCI is not set
-# CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_MIDI_EMU10K1 is not set
-# CONFIG_SOUND_FUSION is not set
-# CONFIG_SOUND_CS4281 is not set
-# CONFIG_SOUND_ES1370 is not set
-# CONFIG_SOUND_ES1371 is not set
-# CONFIG_SOUND_ESSSOLO1 is not set
-# CONFIG_SOUND_MAESTRO is not set
-# CONFIG_SOUND_MAESTRO3 is not set
-# CONFIG_SOUND_ICH is not set
-# CONFIG_SOUND_RME96XX is not set
-# CONFIG_SOUND_SONICVIBES is not set
-# CONFIG_SOUND_TRIDENT is not set
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_VIA82CXXX is not set
-# CONFIG_MIDI_VIA82CXXX is not set
-# CONFIG_SOUND_OSS is not set
-# CONFIG_SOUND_TVMIXER is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_DUMMY=m
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# PCI devices
+#
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_YMFPCI is not set
+# CONFIG_SND_ALS4000 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_FM801 is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_VIA82XX is not set
+
+#
+# ALSA PowerMac devices
+#
+CONFIG_SND_POWERMAC=m
+
+#
+# ALSA USB devices
+#
+CONFIG_SND_USB_AUDIO=m
 
 #
 # USB support
@@ -951,43 +1036,40 @@
 #
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_LONG_TIMEOUT is not set
+CONFIG_USB_DYNAMIC_MINORS=y
 
 #
-# USB Controllers
+# USB Host Controller Drivers
 #
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-CONFIG_USB_OHCI=y
+# CONFIG_USB_EHCI_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_UHCI_HCD is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_BLUETOOTH_TTY is not set
+# CONFIG_USB_MIDI is not set
 CONFIG_USB_ACM=m
 CONFIG_USB_PRINTER=m
+# CONFIG_USB_STORAGE is not set
 
 #
 # USB Human Interface Devices (HID)
 #
 CONFIG_USB_HID=y
+CONFIG_USB_HIDINPUT=y
+# CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
+# CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_XPAD is not set
 
 #
 # USB Imaging devices
 #
-# CONFIG_USB_DC2XX is not set
 # CONFIG_USB_MDC800 is not set
 CONFIG_USB_SCANNER=m
 # CONFIG_USB_MICROTEK is not set
@@ -996,24 +1078,25 @@
 #
 # USB Multimedia devices
 #
+# CONFIG_USB_DABUSB is not set
 
 #
-#   Video4Linux support is needed for USB Multimedia device support
+# Video4Linux support is needed for USB Multimedia device support
 #
 
 #
 # USB Network adaptors
 #
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_CDCETHER is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
 # CONFIG_USB_USBNET is not set
 
 #
 # USB port drivers
 #
-# CONFIG_USB_USS720 is not set
 
 #
 # USB Serial Converter support
@@ -1026,20 +1109,17 @@
 # CONFIG_USB_SERIAL_EMPEG is not set
 # CONFIG_USB_SERIAL_FTDI_SIO is not set
 CONFIG_USB_SERIAL_VISOR=m
+# CONFIG_USB_SERIAL_IPAQ is not set
 # CONFIG_USB_SERIAL_IR is not set
 # CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
 # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
 # CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_SAFE is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
@@ -1047,7 +1127,12 @@
 #
 # USB Miscellaneous drivers
 #
+# CONFIG_USB_TIGL is not set
+# CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
+# CONFIG_USB_BRLVGER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_TEST is not set
 
 #
 # Bluetooth support
@@ -1055,8 +1140,24 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+
+#
 # Kernel hacking
 #
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_KGDB is not set
-CONFIG_XMON=y
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_KALLSYMS=y
+CONFIG_BOOTX_TEXT=y
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/power3_defconfig b/arch/ppc/configs/power3_defconfig
--- a/arch/ppc/configs/power3_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/power3_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+CONFIG_LOG_BUF_SHIFT_15=y
+# CONFIG_LOG_BUF_SHIFT_14 is not set
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=15
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,35 +39,34 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 CONFIG_POWER3=y
 # CONFIG_8xx is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC64BRIDGE=y
 CONFIG_ALL_PPC=y
 CONFIG_PPC_STD_MMU=y
 CONFIG_SMP=y
 # CONFIG_IRQ_ALL_CPUS is not set
+CONFIG_NR_CPUS=32
 
 #
 # General setup
 #
 CONFIG_HIGHMEM=y
 # CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
@@ -63,40 +77,48 @@
 # CONFIG_PARPORT_SERIAL is not set
 CONFIG_PARPORT_PC_FIFO=y
 # CONFIG_PARPORT_PC_SUPERIO is not set
-# CONFIG_PARPORT_AMIGA is not set
-# CONFIG_PARPORT_MFC3 is not set
-# CONFIG_PARPORT_ATARI is not set
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_SUNBPP is not set
 # CONFIG_PARPORT_OTHER is not set
 # CONFIG_PARPORT_1284 is not set
-# CONFIG_PPC_RTC is not set
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PPC_RTAS=y
-# CONFIG_BOOTX_TEXT is not set
 # CONFIG_PREP_RESIDUAL is not set
+CONFIG_PPCBUG_NVRAM=y
 # CONFIG_CMDLINE_BOOL is not set
 
 #
+# Advanced setup
+#
+CONFIG_ADVANCED_OPTIONS=y
+# CONFIG_HIGHMEM_START_BOOL is not set
+CONFIG_HIGHMEM_START=0xfe000000
+# CONFIG_LOWMEM_SIZE_BOOL is not set
+CONFIG_LOWMEM_SIZE=0x20000000
+# CONFIG_KERNEL_START_BOOL is not set
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE_BOOL=y
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=y
-# CONFIG_BLK_DEV_XD is not set
 # CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -113,59 +135,12 @@
 CONFIG_MD_RAID1=y
 CONFIG_MD_RAID5=y
 # CONFIG_MD_MULTIPATH is not set
-CONFIG_BLK_DEV_LVM=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP 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_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
+CONFIG_BLK_DEV_DM=y
 
 #
 # ATA/IDE/MFM/RLL support
 #
 # CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI support
@@ -176,19 +151,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 CONFIG_CHR_DEV_ST=y
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=2
 CONFIG_CHR_DEV_SG=y
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 
@@ -196,13 +169,11 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
@@ -211,49 +182,107 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
 CONFIG_SCSI_SYM53C8XX_2=y
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_MESH is not set
 # CONFIG_SCSI_MAC53C94 is not set
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
+#
+# CONFIG_I2O is not set
+
 #
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP 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_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -270,61 +299,51 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+# CONFIG_CRC32 is not set
 # CONFIG_MACE is not set
 # CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+# CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_APRICOT is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_TULIP is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_LNE390 is not set
+CONFIG_E100=y
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_VIA_RHINE_MMIO is not set
-# CONFIG_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
+CONFIG_E1000=y
+# CONFIG_E1000_NAPI is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PLIP is not set
@@ -337,12 +356,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-CONFIG_TR=y
-CONFIG_IBMOL=y
-# CONFIG_IBMLS is not set
-# CONFIG_TMS380TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -365,24 +380,12 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Console drivers
-#
-# CONFIG_VGA_CONSOLE is not set
-
-#
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FB_RIVA is not set
 # CONFIG_FB_CLGEN is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
@@ -394,47 +397,89 @@
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_S3TRIO is not set
 # CONFIG_FB_VGA16 is not set
+# CONFIG_FB_RIVA is not set
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 CONFIG_FB_MATROX_MYSTIQUE=y
+# CONFIG_FB_MATROX_G450 is not set
+CONFIG_FB_MATROX_G100A=y
 CONFIG_FB_MATROX_G100=y
 CONFIG_FB_MATROX_I2C=y
 # CONFIG_FB_MATROX_MAVEN is not set
-# CONFIG_FB_MATROX_G450 is not set
 CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_ATY is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
 # CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
-CONFIG_FBCON_FONTS=y
-# CONFIG_FONT_8x8 is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-CONFIG_FONT_SUN8x16=y
-CONFIG_FONT_SUN12x22=y
-# CONFIG_FONT_6x11 is not set
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
-# CONFIG_FB_COMPAT_XPMAC is not set
 
 #
-# Input core support
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Input device support
 #
 CONFIG_INPUT=y
-CONFIG_INPUT_KEYBDEV=y
+
+#
+# Userland interfaces
+#
 CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=y
+CONFIG_INPUT_UINPUT=y
 
 #
 # Macintosh device drivers
@@ -444,22 +489,33 @@
 # CONFIG_MAC_FLOPPY is not set
 # CONFIG_MAC_SERIAL is not set
 # CONFIG_ADB is not set
-CONFIG_MAC_HID=y
 
 #
 # Character devices
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=2048
 CONFIG_PRINTER=m
 # CONFIG_LP_CONSOLE is not set
 # CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
 
 #
 # I2C support
@@ -469,64 +525,34 @@
 # CONFIG_I2C_PHILIPSPAR is not set
 # CONFIG_I2C_ELV is not set
 # CONFIG_I2C_VELLEMAN is not set
+# CONFIG_SCx200_ACB is not set
 CONFIG_I2C_ALGOPCF=y
 # CONFIG_I2C_ELEKTOR is not set
-# CONFIG_I2C_KEYWEST is not set
 CONFIG_I2C_CHARDEV=y
 # CONFIG_I2C_PROC is not set
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+
+#
 # Mice
 #
 # CONFIG_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_GAMEPORT is not set
-# CONFIG_INPUT_NS558 is not set
-# CONFIG_INPUT_LIGHTNING is not set
-# CONFIG_INPUT_PCIGAME is not set
-# CONFIG_INPUT_CS461X is not set
-# CONFIG_INPUT_EMU10K1 is not set
-# CONFIG_INPUT_SERIO is not set
-# CONFIG_INPUT_SERPORT is not set
-
-#
-# Joysticks
-#
-# CONFIG_INPUT_ANALOG is not set
-# CONFIG_INPUT_A3D is not set
-# CONFIG_INPUT_ADI is not set
-# CONFIG_INPUT_COBRA is not set
-# CONFIG_INPUT_GF2K is not set
-# CONFIG_INPUT_GRIP is not set
-# CONFIG_INPUT_INTERACT is not set
-# CONFIG_INPUT_TMDC is not set
-# CONFIG_INPUT_SIDEWINDER is not set
-# CONFIG_INPUT_IFORCE_USB is not set
-# CONFIG_INPUT_IFORCE_232 is not set
-# CONFIG_INPUT_WARRIOR is not set
-# CONFIG_INPUT_MAGELLAN is not set
-# CONFIG_INPUT_SPACEORB is not set
-# CONFIG_INPUT_SPACEBALL is not set
-# CONFIG_INPUT_STINGER is not set
-# CONFIG_INPUT_DB9 is not set
-# CONFIG_INPUT_GAMECON is not set
-# CONFIG_INPUT_TURBOGRAFX is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 CONFIG_NVRAM=y
 # CONFIG_RTC 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_APPLICOM is not set
@@ -537,6 +563,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -550,49 +577,39 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 CONFIG_FAT_FS=y
 CONFIG_MSDOS_FS=y
-# CONFIG_UMSDOS_FS is not set
 CONFIG_VFAT_FS=y
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 CONFIG_JOLIET=y
 # CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -601,30 +618,23 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
-# CONFIG_ROOT_NFS is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+CONFIG_EXPORTFS=y
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
 CONFIG_NLS=y
 
 #
@@ -652,6 +662,7 @@
 # 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_ISO8859_1=y
 # CONFIG_NLS_ISO8859_2 is not set
@@ -672,169 +683,96 @@
 # Sound
 #
 CONFIG_SOUND=y
-# CONFIG_DMASOUND_PMAC is not set
-# CONFIG_SOUND_BT878 is not set
-# CONFIG_SOUND_CMPCI is not set
-# CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_MIDI_EMU10K1 is not set
-# CONFIG_SOUND_FUSION is not set
-# CONFIG_SOUND_CS4281 is not set
-# CONFIG_SOUND_ES1370 is not set
-# CONFIG_SOUND_ES1371 is not set
-# CONFIG_SOUND_ESSSOLO1 is not set
-# CONFIG_SOUND_MAESTRO is not set
-# CONFIG_SOUND_MAESTRO3 is not set
-# CONFIG_SOUND_ICH is not set
-# CONFIG_SOUND_RME96XX is not set
-# CONFIG_SOUND_SONICVIBES is not set
-# CONFIG_SOUND_TRIDENT is not set
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_VIA82CXXX is not set
-# CONFIG_MIDI_VIA82CXXX is not set
-CONFIG_SOUND_OSS=y
-CONFIG_SOUND_TRACEINIT=y
-# CONFIG_SOUND_DMAP is not set
-# CONFIG_SOUND_AD1816 is not set
-# CONFIG_SOUND_SGALAXY is not set
-# CONFIG_SOUND_ADLIB is not set
-# CONFIG_SOUND_ACI_MIXER is not set
-CONFIG_SOUND_CS4232=m
-# CONFIG_SOUND_SSCAPE is not set
-# CONFIG_SOUND_GUS is not set
-# CONFIG_SOUND_VMIDI is not set
-# CONFIG_SOUND_TRIX is not set
-CONFIG_SOUND_MSS=m
-# CONFIG_SOUND_MPU401 is not set
-# CONFIG_SOUND_NM256 is not set
-# CONFIG_SOUND_MAD16 is not set
-# CONFIG_SOUND_PAS is not set
-# CONFIG_PAS_JOYSTICK is not set
-# CONFIG_SOUND_PSS is not set
-# CONFIG_SOUND_SB is not set
-# CONFIG_SOUND_AWE32_SYNTH is not set
-# CONFIG_SOUND_WAVEFRONT is not set
-# CONFIG_SOUND_MAUI is not set
-# CONFIG_SOUND_YM3812 is not set
-# CONFIG_SOUND_OPL3SA1 is not set
-# CONFIG_SOUND_OPL3SA2 is not set
-# CONFIG_SOUND_YMFPCI is not set
-# CONFIG_SOUND_YMFPCI_LEGACY is not set
-# CONFIG_SOUND_UART6850 is not set
-# CONFIG_SOUND_AEDSP16 is not set
-CONFIG_SOUND_TVMIXER=y
-
-#
-# USB support
-#
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-# CONFIG_USB_HID is not set
-# CONFIG_USB_HIDDEV is not set
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-# CONFIG_USB_WACOM is not set
+# CONFIG_DMASOUND_AWACS is not set
 
 #
-# USB Imaging devices
+# Open Sound System
 #
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
+# CONFIG_SOUND_PRIME is not set
 
 #
-# USB Multimedia devices
-#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_DUMMY=m
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# PCI devices
+#
+# CONFIG_SND_ALI5451 is not set
+CONFIG_SND_CS46XX=m
+# CONFIG_SND_CS46XX_NEW_DSP is not set
+CONFIG_SND_CS4281=m
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_YMFPCI is not set
+# CONFIG_SND_ALS4000 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_FM801 is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_VIA82XX is not set
 
 #
-#   Video4Linux support is needed for USB Multimedia device support
+# ALSA PowerMac devices
 #
+# CONFIG_SND_POWERMAC is not set
 
 #
-# USB Network adaptors
+# USB support
 #
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
+# CONFIG_USB is not set
 
 #
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_KALLSYMS=y
+CONFIG_BOOTX_TEXT=y
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_KGDB is not set
-CONFIG_XMON=y
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/pplus_defconfig b/arch/ppc/configs/pplus_defconfig
--- a/arch/ppc/configs/pplus_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/pplus_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,15 +39,20 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_WILLOW is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
 # CONFIG_EV64260 is not set
@@ -47,9 +67,11 @@
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -57,152 +79,63 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
+# CONFIG_PPCBUG_NVRAM is not set
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 CONFIG_BLK_DEV_FD=y
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_INET_ECN is not set
-CONFIG_SYN_COOKIES=y
-
-#
-#   IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-# CONFIG_IP_NF_IRC is not set
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-# CONFIG_IP_NF_MATCH_LENGTH is not set
-# CONFIG_IP_NF_MATCH_TTL is not set
-# CONFIG_IP_NF_MATCH_TCPMSS is not set
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_UNCLEAN=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_MIRROR=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-# CONFIG_IP_NF_TARGET_TCPMSS is not set
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_LLC is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
@@ -217,58 +150,19 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
 CONFIG_BLK_DEV_IDESCSI=y
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
 # IDE chipset support/bugfixes
 #
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC62XX_TUNING is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_AMD74XX_OVERRIDE is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
-# CONFIG_PDC202XX_FORCE is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_SL82C105=y
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_BLK_DEV_IDE_MODES=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
+# CONFIG_BLK_DEV_IDEPCI is not set
 
 #
 # SCSI support
@@ -279,19 +173,17 @@
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
 CONFIG_CHR_DEV_ST=y
 # CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_SR_EXTRA_DEVS=2
 CONFIG_CHR_DEV_SG=y
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
-# CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -299,13 +191,11 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
@@ -314,16 +204,15 @@
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_NCR53C7xx is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_NCR53C8XX is not set
@@ -335,29 +224,136 @@
 # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
 # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
 # CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
-# CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SIM710 is not set
-# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
 
 #
-# Network device support
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+# CONFIG_IP_NF_IRC is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+# CONFIG_IP_NF_MATCH_LENGTH is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_FTP=m
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -374,65 +370,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -442,9 +423,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -467,31 +447,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -501,10 +494,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -514,38 +517,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
-#
-
-#
-# Input core support is needed for joysticks
+# Mice
 #
+CONFIG_BUSMOUSE=y
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -556,6 +548,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -569,49 +562,37 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_TMPFS is not set
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -620,31 +601,22 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -657,111 +629,27 @@
 # CONFIG_USB is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/prpmc750_defconfig b/arch/ppc/configs/prpmc750_defconfig
--- a/arch/ppc/configs/prpmc750_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/prpmc750_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,29 +39,39 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
 # CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 CONFIG_PRPMC750=y
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
-# CONFIG_WILLOW is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -53,52 +79,54 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -109,26 +137,47 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -139,23 +188,36 @@
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 
 #
-#   IP: Netfilter Configuration
+# IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
 # CONFIG_IP_NF_QUEUE is not set
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
 CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
 CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_UNCLEAN=m
 CONFIG_IP_NF_MATCH_OWNER=m
 CONFIG_IP_NF_FILTER=m
@@ -165,23 +227,32 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
 # CONFIG_IP_NF_MANGLE is not set
 # CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -194,25 +265,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -229,65 +284,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -297,10 +337,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -322,31 +360,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -357,10 +408,21 @@
 #
 CONFIG_VT=y
 # CONFIG_VT_CONSOLE is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -370,30 +432,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_INPUT_GAMEPORT is not set
+
+#
+# Mice
+#
+CONFIG_BUSMOUSE=y
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -404,7 +463,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -418,74 +477,63 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -496,63 +544,6 @@
 # USB support
 #
 # CONFIG_USB is not set
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_RIO500 is not set
 
 #
 # Bluetooth support
@@ -560,9 +551,21 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/prpmc800_defconfig b/arch/ppc/configs/prpmc800_defconfig
--- a/arch/ppc/configs/prpmc800_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/prpmc800_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,29 +39,39 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
 # CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 CONFIG_PRPMC800=y
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
-# CONFIG_WILLOW is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -53,53 +79,54 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_VIODASD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -110,26 +137,47 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -140,23 +188,36 @@
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 
 #
-#   IP: Netfilter Configuration
+# IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
 # CONFIG_IP_NF_QUEUE is not set
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
 CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
 CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_UNCLEAN=m
 CONFIG_IP_NF_MATCH_OWNER=m
 CONFIG_IP_NF_FILTER=m
@@ -166,27 +227,32 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
 # CONFIG_IP_NF_MANGLE is not set
 # CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_NAT_NEEDED=y
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -199,25 +265,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -234,65 +284,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
+# CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_LAN_SAA9730 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -302,10 +337,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -327,31 +360,44 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -362,13 +408,23 @@
 #
 CONFIG_VT=y
 # CONFIG_VT_CONSOLE is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
-# CONFIG_VIOCONS is not set
 
 #
 # I2C support
@@ -376,43 +432,30 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-CONFIG_BUSMOUSE=y
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_LOGIBUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+CONFIG_BUSMOUSE=y
 # CONFIG_QIC02_TAPE is not set
-# CONFIG_VIOTAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
-# CONFIG_SONYPI is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -420,6 +463,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -433,73 +477,63 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -517,10 +551,22 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_DEBUG_TEXT is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_SERIAL_TEXT_DEBUG=y
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/rainier_defconfig b/arch/ppc/configs/rainier_defconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/configs/rainier_defconfig	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,612 @@
+#
+# Automatically generated by make menuconfig: don't edit
+#
+# CONFIG_UID16 is not set
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODVERSIONS=y
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+CONFIG_PPC32=y
+# CONFIG_6xx is not set
+CONFIG_40x=y
+# CONFIG_POWER3 is not set
+# CONFIG_8xx is not set
+# CONFIG_PPC_ISERIES is not set
+# CONFIG_PPC_STD_MMU is not set
+# CONFIG_ASH is not set
+# CONFIG_CEDER is not set
+# CONFIG_CPCI405 is not set
+# CONFIG_EP405 is not set
+# CONFIG_OAK is not set
+CONFIG_RAINIER=y
+# CONFIG_REDWOOD_4 is not set
+# CONFIG_REDWOOD_5 is not set
+# CONFIG_TIVO is not set
+# CONFIG_WALNUT is not set
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+# CONFIG_MATH_EMULATION is not set
+CONFIG_NP405GS=y
+CONFIG_BIOS_FIXUP=y
+CONFIG_VXBOOT=y
+CONFIG_IBM405_ERR77=y
+CONFIG_IBM_OCP=y
+CONFIG_405_DMA=y
+# CONFIG_PM is not set
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+CONFIG_IBM405_ERR51=y
+CONFIG_NOT_COHERENT_CACHE=y
+
+#
+# General setup
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_ISA is not set
+# CONFIG_EISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_MCA is not set
+CONFIG_PCI=y
+# CONFIG_PC_KEYBOARD is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_PCI_NAMES=y
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+# CONFIG_PPC_RTC is not set
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE 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_LOOP=y
+CONFIG_BLK_DEV_NBD=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+
+#
+# Appletalk devices
+#
+# CONFIG_DEV_APPLETALK is not set
+# CONFIG_LTPC is not set
+# CONFIG_COPS is not set
+# CONFIG_COPS_DAYNA is not set
+# CONFIG_COPS_TANGENT is not set
+# CONFIG_IPDDP is not set
+# CONFIG_IPDDP_ENCAP is not set
+# CONFIG_IPDDP_DECAP is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_BOOT is not set
+# CONFIG_FUSION_ISENSE is not set
+# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LAN is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_PCI is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_IBM_OCP_ENET is not set
+# CONFIG_NP_NET is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=y
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_APRICOT is not set
+# CONFIG_CS89x0 is not set
+# CONFIG_TULIP is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_DGRS is not set
+# CONFIG_DM9102 is not set
+CONFIG_EEPRO100=y
+# CONFIG_LNE390 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_NE3210 is not set
+# CONFIG_ES3210 is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_NEW_RX_RESET 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_VIA_RHINE_MMIO is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_MYRI_SBUS is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP 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_PPPOE is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Input core support
+#
+# CONFIG_INPUT is not set
+# CONFIG_INPUT_KEYBDEV is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+CONFIG_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_PROC=m
+
+#
+# Mice
+#
+CONFIG_BUSMOUSE=y
+# CONFIG_ATIXL_BUSMOUSE is not set
+# CONFIG_LOGIBUSMOUSE is not set
+# CONFIG_MS_BUSMOUSE is not set
+CONFIG_MOUSE=y
+CONFIG_PSMOUSE=y
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
+
+#
+# Joysticks
+#
+# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_WDT is not set
+# CONFIG_WDTPCI is not set
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_ACQUIRE_WDT is not set
+# CONFIG_ADVANTECH_WDT is not set
+# CONFIG_EUROTECH_WDT is not set
+# CONFIG_IB700_WDT is not set
+# CONFIG_I810_TCO is not set
+# CONFIG_MIXCOMWD is not set
+# CONFIG_60XX_WDT is not set
+# CONFIG_W83877F_WDT is not set
+# CONFIG_MACHZ_WDT is not set
+CONFIG_PPC405_WDT=y
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_IBM_OCP_GPIO is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+CONFIG_AUTOFS_FS=y
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+CONFIG_TMPFS=y
+# CONFIG_RAMFS is not set
+CONFIG_ISO9660_FS=y
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=y
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_ZISOFS_FS is not set
+# CONFIG_ZLIB_FS_INFLATE is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SMB_NLS is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# MPC4xx Driver Options
+#
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+# CONFIG_USB_UHCI is not set
+# CONFIG_USB_UHCI_ALT is not set
+# CONFIG_USB_OHCI is not set
+# CONFIG_USB_AUDIO is not set
+# CONFIG_USB_BLUETOOTH is not set
+# CONFIG_USB_STORAGE is not set
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_HP8200e is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_DC2XX is not set
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_SCANNER is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_HPUSBSCSI is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_CDCETHER is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_USB_USS720 is not set
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+# CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_RIO500 is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BLUEZ is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
diff -Nru a/arch/ppc/configs/redwood5_defconfig b/arch/ppc/configs/redwood5_defconfig
--- a/arch/ppc/configs/redwood5_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/redwood5_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,8 +1,7 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,80 +39,93 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
-# CONFIG_CEDER is not set
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_ASH is not set
+# CONFIG_BEECH is not set
+# CONFIG_CEDAR is not set
 # CONFIG_CPCI405 is not set
 # CONFIG_EP405 is not set
 # CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
 # CONFIG_REDWOOD_4 is not set
 CONFIG_REDWOOD_5=y
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
 # CONFIG_WALNUT is not set
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_STB03xxx=y
-CONFIG_TREEBOOT=y
+# CONFIG_XILINX_ML300 is not set
 CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
 CONFIG_IBM_OCP=y
+CONFIG_STB03xxx=y
+CONFIG_IBM_OPENBIOS=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_OCP=y
 # CONFIG_405_DMA is not set
+# CONFIG_PM is not set
 CONFIG_UART0_TTYS0=y
 # CONFIG_UART0_TTYS1 is not set
-CONFIG_IBM405_ERR51=y
+# CONFIG_SERIAL_SICC is not set
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 # CONFIG_PCI is not set
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -108,13 +136,50 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -124,11 +189,12 @@
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 # CONFIG_NET_IPIP is not set
@@ -137,29 +203,23 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
 
 #
-# Appletalk devices
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -172,66 +232,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
-CONFIG_BLK_DEV_IDE=y
-# CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
-# CONFIG_BLK_DEV_IDECD is not set
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-CONFIG_IBM_OCP_IDE=y
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_AUTO is not set
-CONFIG_BLK_DEV_IDE_MODES=y
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -242,46 +246,13 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
 # CONFIG_IBM_OCP_ENET is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-CONFIG_NET_VENDOR_SMC=y
-# CONFIG_WD80x3 is not set
-# CONFIG_ULTRAMCA is not set
-# CONFIG_ULTRA is not set
-# CONFIG_ULTRA32 is not set
-# CONFIG_SMC9194 is not set
-CONFIG_SMC91111=y
-CONFIG_SMC91111_ADVANCED=y
-CONFIG_SMC91111_BYTE_SWAP=y
-# CONFIG_SMC91111_USE_8_BIT is not set
-# CONFIG_SMC91111_USE_32_BIT is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -291,11 +262,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -316,7 +284,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -324,22 +304,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -349,10 +331,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_UNIX98_PTYS is not set
 
 #
@@ -361,28 +353,33 @@
 CONFIG_I2C=y
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
+CONFIG_I2C_IBM_OCP_ALGO=y
+CONFIG_I2C_IBM_OCP_ADAP=y
 # CONFIG_I2C_CHARDEV is not set
 # CONFIG_I2C_PROC is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
+#
+
 #
-# CONFIG_INPUT_GAMEPORT is not set
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -393,6 +390,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -406,49 +404,34 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS is not set
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -457,31 +440,22 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -489,74 +463,12 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
-# CONFIG_STB_KB is not set
-# CONFIG_SERIAL_SICC is not set
 
 #
 # USB support
 #
-# CONFIG_USB is not set
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_RIO500 is not set
 
 #
 # Bluetooth support
@@ -564,10 +476,22 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/redwood_defconfig b/arch/ppc/configs/redwood_defconfig
--- a/arch/ppc/configs/redwood_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/redwood_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_UNLOAD is not set
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,77 +39,93 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_ASH is not set
+# CONFIG_BEECH is not set
+# CONFIG_CEDAR is not set
+# CONFIG_CPCI405 is not set
+# CONFIG_EP405 is not set
 # CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
 CONFIG_REDWOOD_4=y
 # CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
-# CONFIG_EP405 is not set
-# CONFIG_CPCI405 is not set
 # CONFIG_WALNUT is not set
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_STB03xxx=y
-CONFIG_TREEBOOT=y
+# CONFIG_XILINX_ML300 is not set
 CONFIG_IBM405_ERR77=y
-# CONFIG_405_DMA is not set
 CONFIG_IBM405_ERR51=y
+CONFIG_IBM_OCP=y
+CONFIG_STB03xxx=y
+CONFIG_IBM_OPENBIOS=y
+# CONFIG_PPC4xx_DMA is not set
+CONFIG_OCP=y
+# CONFIG_405_DMA is not set
+# CONFIG_PM is not set
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+# CONFIG_SERIAL_SICC is not set
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 # CONFIG_PCI is not set
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -104,48 +136,70 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 # CONFIG_PACKET is not set
-# CONFIG_NETLINK is not set
+# CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -158,65 +212,33 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
+CONFIG_IBM_OCP_ENET=y
+# CONFIG_IBM_OCP_ENET_ERROR_MSG is not set
+CONFIG_IBM_OCP_ENET_RX_BUFF=64
+CONFIG_IBM_OCP_ENET_TX_BUFF=8
+CONFIG_IBM_OCP_ENET_GAP=8
+CONFIG_IBM_OCP_ENET_SKB_RES=0
+CONFIG_OCP_NET=y
+CONFIG_CRC32=y
 CONFIG_OAKNET=y
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -226,11 +248,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -251,7 +270,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -259,22 +290,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -284,10 +317,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_UNIX98_PTYS is not set
 
 #
@@ -296,36 +339,32 @@
 CONFIG_I2C=y
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_IBM_OCP_ALGO is not set
 # CONFIG_I2C_CHARDEV is not set
 # CONFIG_I2C_PROC is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -336,7 +375,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -350,74 +389,62 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS is not set
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -425,123 +452,35 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
-# CONFIG_STB_KB is not set
-# CONFIG_SERIAL_SICC is not set
 
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
 
 #
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_SERIAL_TEXT_DEBUG=y
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_DEBUG_TEXT is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/rpxcllf_defconfig b/arch/ppc/configs/rpxcllf_defconfig
--- a/arch/ppc/configs/rpxcllf_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/rpxcllf_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,6 +11,20 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 # CONFIG_MODULES is not set
@@ -21,11 +35,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 # CONFIG_RPXLITE is not set
 CONFIG_RPXCLASSIC=y
 # CONFIG_BSEIP is not set
@@ -35,65 +55,69 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -104,52 +128,71 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+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_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -162,26 +205,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -192,35 +219,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -230,11 +234,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -255,7 +256,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -263,22 +276,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -288,9 +303,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -300,32 +326,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -336,6 +357,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -349,66 +371,57 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -424,8 +437,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -457,113 +469,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/rpxlite_defconfig b/arch/ppc/configs/rpxlite_defconfig
--- a/arch/ppc/configs/rpxlite_defconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/configs/rpxlite_defconfig	Wed Jan  8 20:04:44 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,6 +11,20 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 # CONFIG_MODULES is not set
@@ -21,11 +35,17 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 CONFIG_8xx=y
-# CONFIG_PPC_STD_MMU is not set
+
+#
+# IBM 4xx options
+#
+CONFIG_EMBEDDEDBOOT=y
 CONFIG_SERIAL_CONSOLE=y
+CONFIG_NOT_COHERENT_CACHE=y
 CONFIG_RPXLITE=y
 # CONFIG_RPXCLASSIC is not set
 # CONFIG_BSEIP is not set
@@ -35,65 +55,69 @@
 # CONFIG_TQM855L is not set
 # CONFIG_TQM860L is not set
 # CONFIG_FPS850L is not set
-# CONFIG_TQM860 is not set
 # CONFIG_SPD823TS is not set
 # CONFIG_IVMS8 is not set
 # CONFIG_IVML24 is not set
 # CONFIG_SM850 is not set
+# CONFIG_HERMES_PRO is not set
+# CONFIG_IP860 is not set
+# CONFIG_LWMON is not set
+# CONFIG_PCU_E is not set
+# CONFIG_CCM is not set
+# CONFIG_LANTEC is not set
 # CONFIG_MBX is not set
 # CONFIG_WINCEPT is not set
-# CONFIG_ALL_PPC is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 CONFIG_MATH_EMULATION=y
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
-# CONFIG_PCI_QSPAN is not set
 # CONFIG_PCI is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_PCI_QSPAN is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -104,52 +128,71 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+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_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -162,26 +205,10 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -192,35 +219,12 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NET_ISA is not set
-# CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -230,11 +234,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -255,7 +256,19 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -263,22 +276,24 @@
 # CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Console drivers
+# Input device support
 #
+# CONFIG_INPUT is not set
 
 #
-# Frame-buffer support
+# Userland interfaces
 #
-# CONFIG_FB is not set
 
 #
-# Input core support
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
 
 #
 # Macintosh device drivers
@@ -288,9 +303,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -300,32 +326,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -336,6 +357,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -349,66 +371,57 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
@@ -424,8 +437,7 @@
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -454,113 +466,28 @@
 #
 # USB support
 #
-# CONFIG_USB is not set
-
-#
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
 
 #
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/sandpoint_defconfig b/arch/ppc/configs/sandpoint_defconfig
--- a/arch/ppc/configs/sandpoint_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/sandpoint_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -14,16 +13,24 @@
 #
 # General setup
 #
-CONFIG_NET=y
 CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
 
 #
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -33,14 +40,19 @@
 CONFIG_PPC32=y
 CONFIG_6xx=y
 # CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_WILLOW is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
 # CONFIG_EV64260 is not set
@@ -70,11 +82,6 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ADVANCED_OPTIONS is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
@@ -95,26 +102,36 @@
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE is not set
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_CISS_SCSI_TAPE is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 CONFIG_BLK_DEV_LOOP=y
@@ -127,13 +144,56 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_IDEPCI is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -144,11 +204,12 @@
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
@@ -157,25 +218,23 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
 
 #
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-
+# SCTP Configuration (EXPERIMENTAL)
 #
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -188,103 +247,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-# CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
-CONFIG_ATAPI=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-# CONFIG_BLK_DEV_IDECS is not set
-
-#
-# ATA host controller support
-#
-# CONFIG_BLK_DEV_RZ1000 is not set
-# CONFIG_BLK_DEV_CMD640 is not set
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_ISAPNP is not set
-
-#
-#   PCI host controller support
-#
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_IDEDMA_PCI_AUTO is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_BLK_DEV_IDE_TCQ is not set
-# CONFIG_BLK_DEV_IDE_TCQ_DEFAULT is not set
-# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC6280_BURST is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_HPT34X_AUTODMA is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
-# CONFIG_PDC202XX_BURST is not set
-# CONFIG_PDC202XX_FORCE is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-CONFIG_BLK_DEV_SL82C105=y
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_PCI is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -301,54 +266,43 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
+# CONFIG_CRC32 is not set
 # CONFIG_OAKNET is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
 # CONFIG_SUNGEM is not set
 CONFIG_NET_VENDOR_3COM=y
-# CONFIG_EL1 is not set
-# CONFIG_EL2 is not set
-# CONFIG_ELPLUS is not set
-# CONFIG_EL16 is not set
-# CONFIG_ELMC is not set
-# CONFIG_ELMC_II is not set
 CONFIG_VORTEX=y
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL 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 is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
 # CONFIG_EEPRO100 is not set
 CONFIG_E100=y
-# CONFIG_LNE390 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_NEW_RX_RESET 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_VIA_RHINE_MMIO is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -356,18 +310,16 @@
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
-# CONFIG_MYRI_SBUS is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 CONFIG_PPP=m
 # CONFIG_PPP_MULTILINK is not set
-# CONFIG_PPP_FILTER is not set
 CONFIG_PPP_ASYNC=m
 CONFIG_PPP_SYNC_TTY=m
 CONFIG_PPP_DEFLATE=m
@@ -381,10 +333,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -394,18 +344,6 @@
 # CONFIG_WAN 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 is not set
-# CONFIG_DE4X5 is not set
-# CONFIG_WINBOND_840 is not set
-# CONFIG_DM9102 is not set
-
-#
 # Amateur Radio support
 #
 # CONFIG_HAMRADIO is not set
@@ -421,22 +359,12 @@
 # CONFIG_ISDN_BOOL is not set
 
 #
-# Console drivers
-#
-# CONFIG_VGA_CONSOLE is not set
-
-#
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
 # CONFIG_FB_CLGEN is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_OF is not set
-# CONFIG_FB_CONTROL is not set
-# CONFIG_FB_PLATINUM is not set
-# CONFIG_FB_VALKYRIE is not set
 # CONFIG_FB_CT65550 is not set
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_S3TRIO is not set
@@ -445,12 +373,12 @@
 CONFIG_FB_MATROX=y
 CONFIG_FB_MATROX_MILLENIUM=y
 # CONFIG_FB_MATROX_MYSTIQUE is not set
-# CONFIG_FB_MATROX_G100 is not set
 # CONFIG_FB_MATROX_G450 is not set
+# CONFIG_FB_MATROX_G100A is not set
 # CONFIG_FB_MATROX_MULTIHEAD is not set
-# CONFIG_FB_ATY is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
 # CONFIG_FB_SIS is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_3DFX is not set
@@ -458,13 +386,17 @@
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
 # CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-CONFIG_FBCON_FONTWIDTH8_ONLY=y
-# CONFIG_FBCON_FONTS is not set
+# CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
 
@@ -481,7 +413,6 @@
 #
 # Userland interfaces
 #
-CONFIG_INPUT_KEYBDEV=y
 CONFIG_INPUT_MOUSEDEV=y
 CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
@@ -490,27 +421,16 @@
 # CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=m
 # CONFIG_INPUT_EVBUG is not set
-CONFIG_INPUT_UINPUT=m
 
 #
 # Input I/O drivers
 #
 # CONFIG_GAMEPORT is not set
 CONFIG_SOUND_GAMEPORT=y
-# CONFIG_GAMEPORT_NS558 is not set
-# CONFIG_GAMEPORT_L4 is not set
-# CONFIG_GAMEPORT_EMU10K1 is not set
-# CONFIG_GAMEPORT_VORTEX is not set
-# CONFIG_GAMEPORT_FM801 is not set
-# CONFIG_GAMEPORT_CS461x is not set
 CONFIG_SERIO=y
 CONFIG_SERIO_I8042=y
-CONFIG_I8042_REG_BASE=60
-CONFIG_I8042_KBD_IRQ=1
-CONFIG_I8042_AUX_IRQ=12
 # CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
 
 #
 # Input Device Drivers
@@ -523,34 +443,11 @@
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
 # CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-# CONFIG_MOUSE_LOGIBM is not set
-# CONFIG_MOUSE_PC110PAD is not set
 # CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_TWIDDLER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-# CONFIG_INPUT_JOYDUMP is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_TOUCHSCREEN_GUNZE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+CONFIG_INPUT_UINPUT=m
 
 #
 # Macintosh device drivers
@@ -561,6 +458,7 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -568,13 +466,7 @@
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_CS is not set
 # CONFIG_SERIAL_8250_EXTENDED is not set
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-# CONFIG_SERIAL_8250_SHARE_IRQ is not set
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-# CONFIG_SERIAL_8250_MULTIPORT is not set
-# CONFIG_SERIAL_8250_RSA is not set
 
 #
 # Non-8250 serial port support
@@ -590,10 +482,17 @@
 # CONFIG_I2C is not set
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+
+#
 # Mice
 #
 # CONFIG_BUSMOUSE is not set
-CONFIG_PSMOUSE=y
 # CONFIG_QIC02_TAPE is not set
 
 #
@@ -631,15 +530,7 @@
 #
 # CONFIG_VIDEO_PMS is not set
 # CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
 # CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_ZORAN_BUZ is not set
-# CONFIG_VIDEO_ZORAN_DC10 is not set
-# CONFIG_VIDEO_ZORAN_LML33 is not set
-# CONFIG_VIDEO_ZR36120 is not set
-# CONFIG_VIDEO_MEYE is not set
 
 #
 # Radio Adapters
@@ -649,31 +540,26 @@
 # CONFIG_RADIO_MAESTRO is not set
 
 #
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
 # File systems
 #
 # CONFIG_QUOTA is not set
-# CONFIG_QFMT_V1 is not set
-# CONFIG_QFMT_V2 is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
 CONFIG_RAMFS=y
@@ -681,28 +567,21 @@
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
 # CONFIG_JFS_FS is not set
-# CONFIG_JFS_DEBUG is not set
-# CONFIG_JFS_STATISTICS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -711,25 +590,17 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 # CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
@@ -750,8 +621,6 @@
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -768,7 +637,6 @@
 # Miscellaneous USB options
 #
 CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_LONG_TIMEOUT is not set
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
 
@@ -777,30 +645,18 @@
 #
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_UHCI_HCD_ALT=m
+# CONFIG_USB_UHCI_HCD is not set
 
 #
 # USB Device Class drivers
 #
-# CONFIG_USB_AUDIO is not set
 # CONFIG_USB_BLUETOOTH_TTY is not set
-# CONFIG_USB_MIDI is not set
 CONFIG_USB_ACM=m
 # CONFIG_USB_PRINTER is not set
 
 #
-#   SCSI support is needed for USB Storage
+# SCSI support is needed for USB Storage
 #
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_SDDR55 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
 
 #
 # USB Human Interface Devices (HID)
@@ -808,8 +664,6 @@
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
 # CONFIG_HID_FF is not set
-# CONFIG_HID_PID is not set
-# CONFIG_LOGITECH_FF is not set
 CONFIG_USB_HIDDEV=y
 # CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
@@ -821,8 +675,6 @@
 #
 # CONFIG_USB_MDC800 is not set
 CONFIG_USB_SCANNER=m
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
 
 #
 # USB Multimedia devices
@@ -850,7 +702,6 @@
 #
 # USB port drivers
 #
-# CONFIG_USB_USS720 is not set
 
 #
 # USB Serial Converter support
@@ -869,21 +720,11 @@
 # CONFIG_USB_SERIAL_EDGEPORT_TI is not set
 # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
 # CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
 # CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
 # CONFIG_USB_SERIAL_SAFE is not set
-# CONFIG_USB_SERIAL_SAFE_PADDED is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
@@ -891,11 +732,12 @@
 #
 # USB Miscellaneous drivers
 #
-# CONFIG_USB_EMI26 is not set
 # CONFIG_USB_TIGL is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_BRLVGER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_TEST is not set
 
 #
 # Bluetooth support
@@ -905,21 +747,22 @@
 #
 # Library routines
 #
-# CONFIG_CRC32 is not set
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
 
 #
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
 # Security options
 #
-CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/spruce_defconfig b/arch/ppc/configs/spruce_defconfig
--- a/arch/ppc/configs/spruce_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/spruce_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,31 +39,40 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-CONFIG_SPRUCE=y
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+CONFIG_SPRUCE=y
 # CONFIG_MENF1 is not set
 # CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
 # CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
-# CONFIG_WILLOW is not set
 # CONFIG_ZX4500 is not set
 # CONFIG_SPRUCE_BAUD_33M is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -55,79 +80,102 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="ip=on"
 
 #
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -137,19 +185,26 @@
 # 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_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -162,25 +217,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -197,63 +236,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_SUNLANCE is not set
+# CONFIG_CRC32 is not set
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+# CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_APRICOT is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_TULIP is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -263,10 +289,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -288,31 +312,47 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+
+#
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+
+#
+# Input Device Drivers
+#
 
 #
 # Macintosh device drivers
@@ -322,10 +362,20 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -335,27 +385,27 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
 
 #
-# Joysticks
+# Mice
 #
-# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
@@ -366,6 +416,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -379,77 +430,65 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_TMPFS is not set
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -460,63 +499,6 @@
 # USB support
 #
 # CONFIG_USB is not set
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_RIO500 is not set
 
 #
 # Bluetooth support
@@ -524,9 +506,21 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/walnut_defconfig b/arch/ppc/configs/walnut_defconfig
--- a/arch/ppc/configs/walnut_defconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/configs/walnut_defconfig	Wed Jan  8 20:04:45 2003
@@ -1,8 +1,7 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 
@@ -12,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -24,82 +39,99 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 # CONFIG_6xx is not set
-CONFIG_4xx=y
+CONFIG_40x=y
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
-# CONFIG_PPC_STD_MMU is not set
-# CONFIG_CEDER is not set
+CONFIG_4xx=y
+
+#
+# IBM 4xx options
+#
+# CONFIG_ASH is not set
+# CONFIG_BEECH is not set
+# CONFIG_CEDAR is not set
 # CONFIG_CPCI405 is not set
 # CONFIG_EP405 is not set
 # CONFIG_OAK is not set
+# CONFIG_RAINIER is not set
 # CONFIG_REDWOOD_4 is not set
 # CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+# CONFIG_SYCAMORE is not set
 # CONFIG_TIVO is not set
 CONFIG_WALNUT=y
-# CONFIG_ALL_PPC is not set
-# CONFIG_SMP is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_405GP=y
-CONFIG_BIOS_FIXUP=y
-CONFIG_TREEBOOT=y
+# CONFIG_XILINX_ML300 is not set
 CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
 CONFIG_IBM_OCP=y
+CONFIG_BIOS_FIXUP=y
+CONFIG_405GP=y
+CONFIG_IBM_OPENBIOS=y
+CONFIG_PPC4xx_DMA=y
+CONFIG_PPC4xx_EDMA=y
+CONFIG_OCP=y
 # CONFIG_405_DMA is not set
+# CONFIG_PM is not set
 CONFIG_UART0_TTYS0=y
 # CONFIG_UART0_TTYS1 is not set
-CONFIG_IBM405_ERR51=y
 CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_MATH_EMULATION is not set
 
 #
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_PCI_NAMES is not set
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-CONFIG_PPC_RTC=y
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00400000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -110,13 +142,35 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_MD_MULTIPATH is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
@@ -126,11 +180,12 @@
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 # CONFIG_NET_IPIP is not set
@@ -139,33 +194,23 @@
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-
-#
-#  
-#
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
 
 #
-# Appletalk devices
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_COPS_DAYNA is not set
-# CONFIG_COPS_TANGENT is not set
-# CONFIG_IPDDP is not set
-# CONFIG_IPDDP_ENCAP is not set
-# CONFIG_IPDDP_DECAP is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -178,44 +223,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_BOOT is not set
-# CONFIG_FUSION_ISENSE is not set
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LAN is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-# CONFIG_I2O_PCI is not set
-# CONFIG_I2O_BLOCK is not set
-# CONFIG_I2O_LAN is not set
-# CONFIG_I2O_SCSI is not set
-# CONFIG_I2O_PROC is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -232,42 +242,40 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
 CONFIG_IBM_OCP_ENET=y
 # CONFIG_IBM_OCP_ENET_ERROR_MSG is not set
 CONFIG_IBM_OCP_ENET_RX_BUFF=64
 CONFIG_IBM_OCP_ENET_TX_BUFF=8
 CONFIG_IBM_OCP_ENET_GAP=8
-# CONFIG_SUNLANCE is not set
+CONFIG_IBM_OCP_ENET_SKB_RES=0
+CONFIG_OCP_NET=y
+CONFIG_CRC32=y
+# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
 # CONFIG_NET_PCI is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -277,10 +285,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -302,30 +308,54 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
 
 #
-# Input core support
+# Userland interfaces
 #
-# CONFIG_INPUT is not set
-# CONFIG_INPUT_KEYBDEV is not set
 # 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 I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO 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
 
 #
 # Macintosh device drivers
@@ -335,11 +365,22 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-# CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_UNIX98_PTYS is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
 
 #
 # I2C support
@@ -347,40 +388,35 @@
 CONFIG_I2C=y
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
+CONFIG_I2C_IBM_OCP_ALGO=y
+CONFIG_I2C_IBM_OCP_ADAP=y
 # CONFIG_I2C_CHARDEV is not set
 # CONFIG_I2C_PROC is not set
 
 #
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_INPUT_GAMEPORT is not set
 
 #
-# Input core support is needed for gameports
+# I2C Hardware Sensors Chip support
 #
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_PPC405_GPIO is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -388,6 +424,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -401,49 +438,35 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EXT3_FS is not set
 # CONFIG_JBD is not set
-# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 # CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS is not set
+CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
@@ -452,31 +475,32 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 # CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
-# CONFIG_ZLIB_FS_INFLATE is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
 #
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
 
 #
 # Sound
@@ -484,7 +508,7 @@
 # CONFIG_SOUND is not set
 
 #
-# MPC4xx Driver Options
+# IBM 40x options
 #
 
 #
@@ -493,114 +517,27 @@
 # CONFIG_USB is not set
 
 #
-# USB Controllers
-#
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-# CONFIG_USB_BLUETOOTH is not set
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_HP8200e is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# USB Human Interface Devices (HID)
-#
-
-#
-#   Input core support is needed for USB HID
-#
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_DC2XX is not set
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_SCANNER is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-
-#
-#   Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
+# Bluetooth support
 #
-# CONFIG_USB_USS720 is not set
+# CONFIG_BT is not set
 
 #
-# USB Serial Converter support
+# Library routines
 #
-# CONFIG_USB_SERIAL is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
 
 #
-# USB Miscellaneous drivers
+# Kernel hacking
 #
-# CONFIG_USB_RIO500 is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
-# Bluetooth support
+# Security options
 #
-# CONFIG_BT is not set
+# CONFIG_SECURITY is not set
 
 #
-# Kernel hacking
+# Cryptographic options
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/zx4500_defconfig b/arch/ppc/configs/zx4500_defconfig
--- a/arch/ppc/configs/zx4500_defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/configs/zx4500_defconfig	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,9 @@
 #
 # Automatically generated make config: don't edit
 #
-# CONFIG_UID16 is not set
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Code maturity level options
@@ -11,10 +11,26 @@
 CONFIG_EXPERIMENTAL=y
 
 #
+# General setup
+#
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_LOG_BUF_SHIFT_17 is not set
+# CONFIG_LOG_BUF_SHIFT_16 is not set
+# CONFIG_LOG_BUF_SHIFT_15 is not set
+CONFIG_LOG_BUF_SHIFT_14=y
+# CONFIG_LOG_BUF_SHIFT_13 is not set
+# CONFIG_LOG_BUF_SHIFT_12 is not set
+CONFIG_LOG_BUF_SHIFT=14
+
+#
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 
 #
@@ -23,27 +39,40 @@
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_6xx=y
-# CONFIG_4xx is not set
+# CONFIG_40x is not set
+# CONFIG_440 is not set
 # CONFIG_POWER3 is not set
 # CONFIG_8xx is not set
-# CONFIG_PPC_ISERIES is not set
+
+#
+# IBM 4xx options
+#
 # CONFIG_8260 is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PPC_STD_MMU=y
-# CONFIG_ALL_PPC is not set
+# CONFIG_ALL_PPC_CH is not set
 # CONFIG_APUS is not set
-# CONFIG_SPRUCE is not set
+# CONFIG_WILLOW_2 is not set
 # CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_SPRUCE is not set
 # CONFIG_MENF1 is not set
+# CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
 # CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 CONFIG_ZX4500=y
 # CONFIG_MPC10X_STORE_GATHERING is not set
-# CONFIG_PPC601_SYNC_FIX is not set
 # CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_ALTIVEC is not set
 # CONFIG_TAU is not set
 
@@ -51,51 +80,53 @@
 # General setup
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_ISA is not set
-# CONFIG_EISA is not set
-# CONFIG_SBUS is not set
-# CONFIG_MCA is not set
 CONFIG_PCI=y
-CONFIG_NET=y
-CONFIG_SYSCTL=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
-# CONFIG_PCMCIA is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
-# CONFIG_PPC_RTC is not set
 # CONFIG_CMDLINE_BOOL 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=0x20000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+CONFIG_SWAP=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_VIODASD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE 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_LOOP=y
 CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
@@ -106,49 +137,75 @@
 # Multi-device support (RAID and LVM)
 #
 # CONFIG_MD is not set
-# CONFIG_BLK_DEV_MD is not set
-# CONFIG_MD_LINEAR is not set
-# CONFIG_MD_RAID0 is not set
-# CONFIG_MD_RAID1 is not set
-# CONFIG_MD_RAID5 is not set
-# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
 
 #
 # Networking options
 #
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
-CONFIG_NETLINK=y
-# CONFIG_RTNETLINK is not set
 # CONFIG_NETLINK_DEV is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+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_ARPD is not set
 # CONFIG_INET_ECN is not set
 CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
 
 #
-#  
+# SCTP Configuration (EXPERIMENTAL)
 #
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_LLC is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -161,25 +218,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# ATA/IDE/MFM/RLL support
-#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# Network device support
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
 CONFIG_NETDEVICES=y
 
 #
@@ -196,68 +237,50 @@
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_ARM_AM79C961A is not set
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
-# CONFIG_GMAC is not set
-# CONFIG_NCR885E is not set
+# CONFIG_CRC32 is not set
 # CONFIG_OAKNET is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNBMAC is not set
-# CONFIG_SUNQE is not set
-# CONFIG_SUNLANCE is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_ISA 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_APRICOT is not set
-# CONFIG_CS89x0 is not set
-CONFIG_TULIP=y
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-# CONFIG_DE4X5 is not set
+# CONFIG_B44 is not set
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 CONFIG_EEPRO100=y
-# CONFIG_LNE390 is not set
+# CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_NE3210 is not set
-# CONFIG_ES3210 is not set
+# CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 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_WINBOND_840 is not set
-# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
 # CONFIG_DL2K is not set
-# CONFIG_MYRI_SBUS 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_SK98LIN is not set
-# CONFIG_VETH is not set
+# CONFIG_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -267,10 +290,8 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
-# CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
@@ -292,29 +313,46 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
-# Old CD-ROM drivers (not SCSI, not IDE)
+# Graphics support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_FB is not set
 
 #
-# Console drivers
+# Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
 
 #
-# Frame-buffer support
+# Old CD-ROM drivers (not SCSI, not IDE)
 #
-# CONFIG_FB is not set
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
-# Input core support
+# Input device support
 #
 # CONFIG_INPUT is not set
 
 #
+# Userland interfaces
+#
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
+
+#
 # Macintosh device drivers
 #
 
@@ -322,18 +360,22 @@
 # Character devices
 #
 # CONFIG_VT is not set
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_SERIAL_EXTENDED=y
-# CONFIG_SERIAL_MANY_PORTS is not set
-CONFIG_SERIAL_SHARE_IRQ=y
-CONFIG_SERIAL_DETECT_IRQ=y
-# CONFIG_SERIAL_MULTIPORT is not set
-# CONFIG_HUB6 is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
-# CONFIG_VIOCONS is not set
 
 #
 # I2C support
@@ -341,33 +383,30 @@
 # CONFIG_I2C is not set
 
 #
-# Mice
+# I2C Hardware Sensors Mainboard support
 #
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
 
 #
-# Joysticks
+# I2C Hardware Sensors Chip support
 #
-# CONFIG_JOYSTICK is not set
 
 #
-# Input core support is needed for joysticks
+# Mice
 #
+# CONFIG_BUSMOUSE is not set
 # CONFIG_QIC02_TAPE is not set
-# CONFIG_VIOTAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC 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_APPLICOM is not set
-# CONFIG_SONYPI is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -375,6 +414,7 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
@@ -388,28 +428,28 @@
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_REISERFS_CHECK is not set
 # CONFIG_ADFS_FS is not set
-# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 # CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
-# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
-# CONFIG_RAMFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 CONFIG_DEVFS_FS=y
@@ -417,44 +457,40 @@
 # CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
-# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UDF_FS is not set
-# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
-# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
 CONFIG_NFSD=y
 # CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+CONFIG_EXPORTFS=y
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
+CONFIG_FS_MBCACHE=y
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
 
 #
 # Sound
@@ -472,9 +508,22 @@
 # CONFIG_BT is not set
 
 #
+# Library routines
+#
+
+#
 # Kernel hacking
 #
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_KGDB is not set
-# CONFIG_XMON is not set
-# CONFIG_DEBUG_TEXT is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_SERIAL_TEXT_DEBUG=y
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/iSeries/HvCall.c b/arch/ppc/iSeries/HvCall.c
--- a/arch/ppc/iSeries/HvCall.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,127 +0,0 @@
-/*
- * HvCall.c
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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/stddef.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <asm/system.h>
-#include <asm/page.h>
-#include <asm/iSeries/HvCall.h>
-#include <asm/iSeries/HvCallEvent.h>
-#ifndef  _HVCALLSC_H
-#include <asm/iSeries/HvCallSc.h>
-#endif
-#include <asm/iSeries/LparData.h>
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-//=====================================================================
-// Note that this call takes at MOST one page worth of data
-int HvCall_readLogBuffer(HvLpIndex lpIndex, void *buffer, u64 bufLen)
-{
-  struct HvLpBufferList *bufList;
-  u64 bytesLeft = bufLen;
-  u64 leftThisPage;
-  u64 curPtr = (unsigned long) buffer;
-  u64 retVal;
-  int npages;
-  int i;
-
-  npages = 0;
-  while (bytesLeft)
-    {
-      npages++;
-      leftThisPage = ((curPtr & PAGE_MASK) + PAGE_SIZE) - curPtr;
-
-      if (leftThisPage > bytesLeft)
-	bytesLeft = 0;
-      else
-	bytesLeft -= leftThisPage;
-
-      curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
-    }
-
-  if (npages == 0)
-    return 0;
-
-  bufList = (struct HvLpBufferList *)kmalloc(npages * sizeof(struct HvLpBufferList), GFP_ATOMIC);
-  bytesLeft = bufLen;
-  curPtr = (unsigned long) buffer;
-  for(i=0; i<npages; i++)
-    {
-      bufList[i].addr = virt_to_absolute(curPtr);
-      
-      leftThisPage = ((curPtr & PAGE_MASK) + PAGE_SIZE) - curPtr;
-
-      if (leftThisPage > bytesLeft)
-	{
-	  bufList[i].len = bytesLeft;
-	  bytesLeft = 0;
-	}
-      else
-	{
-	  bufList[i].len = leftThisPage;
-	  bytesLeft -= leftThisPage;
-	}
-
-      curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
-    }
-
-
-  retVal = HvCall3(HvCallBaseReadLogBuffer,lpIndex, virt_to_absolute((unsigned long)bufList), bufLen);
-
-  kfree(bufList);
-
-  return (int)retVal;
-}
-
-//=====================================================================
-void HvCall_writeLogBuffer(const void *buffer, u64 bufLen)
-{
-  struct HvLpBufferList bufList;
-  u64 bytesLeft = bufLen;
-  u64 leftThisPage;
-  u64 curPtr = (unsigned long) buffer;
-
-  while (bytesLeft)
-    {
-      bufList.addr = virt_to_absolute( curPtr );
-      
-      leftThisPage = ((curPtr & PAGE_MASK) + PAGE_SIZE) - curPtr;
-
-      if (leftThisPage > bytesLeft)
-	{
-	  bufList.len = bytesLeft;
-	  bytesLeft = 0;
-	}
-      else
-	{
-	  bufList.len = leftThisPage;
-	  bytesLeft -= leftThisPage;
-	}
-
-      HvCall2(HvCallBaseWriteLogBuffer, virt_to_absolute((unsigned long)&bufList), bufList.len);
-
-      curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
-    }
-}
-
diff -Nru a/arch/ppc/iSeries/HvLpConfig.c b/arch/ppc/iSeries/HvLpConfig.c
--- a/arch/ppc/iSeries/HvLpConfig.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,27 +0,0 @@
-/*
- * HvLpConfig.c
- * Copyright (C) 2001  Kyle A. Lucke, 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.
- * 
- * 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
- */
-
-#ifndef _HVLPCONFIG_H
-#include <asm/iSeries/HvLpConfig.h>
-#endif
-
-HvLpIndex HvLpConfig_getLpIndex_outline(void)
-{
-    return HvLpConfig_getLpIndex();
-}
diff -Nru a/arch/ppc/iSeries/HvLpEvent.c b/arch/ppc/iSeries/HvLpEvent.c
--- a/arch/ppc/iSeries/HvLpEvent.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,87 +0,0 @@
-/*
- * HvLpEvent.c
- * Copyright (C) 2001 Mike Corrigan  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.
- * 
- * 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/stddef.h>
-#include <linux/kernel.h>
-#include <asm/system.h>
-#include <asm/iSeries/HvLpEvent.h>
-#include <asm/iSeries/HvCallEvent.h>
-#include <asm/iSeries/LparData.h>
-
-// Array of LpEvent handler functions
-LpEventHandler lpEventHandler[HvLpEvent_Type_NumTypes];
-unsigned lpEventHandlerPaths[HvLpEvent_Type_NumTypes];
-
-// Register a handler for an LpEvent type
-
-int HvLpEvent_registerHandler( HvLpEvent_Type eventType, LpEventHandler handler )
-{
-	int rc = 1;
-	if ( eventType < HvLpEvent_Type_NumTypes ) {
-		lpEventHandler[eventType] = handler;
-		rc = 0;
-	}
-	return rc;
-	
-}
-
-int HvLpEvent_unregisterHandler( HvLpEvent_Type eventType )
-{
-	int rc = 1;
-	if ( eventType < HvLpEvent_Type_NumTypes ) {
-		if ( !lpEventHandlerPaths[eventType] ) {
-			lpEventHandler[eventType] = NULL;
-			rc = 0;
-		}
-	}
-	return rc;
-}
-
-// (lpIndex is the partition index of the target partition.  
-// needed only for VirtualIo, VirtualLan and SessionMgr.  Zero
-// indicates to use our partition index - for the other types)
-int HvLpEvent_openPath( HvLpEvent_Type eventType, HvLpIndex lpIndex )
-{
-	int rc = 1;
-	if ( eventType < HvLpEvent_Type_NumTypes &&
-	     lpEventHandler[eventType] ) {
-		if ( lpIndex == 0 )
-			lpIndex = itLpNaca.xLpIndex;
-		HvCallEvent_openLpEventPath( lpIndex, eventType );
-		++lpEventHandlerPaths[eventType];
-		rc = 0;
-	}
-	return rc;
-}
-
-int HvLpEvent_closePath( HvLpEvent_Type eventType, HvLpIndex lpIndex )
-{
-	int rc = 1;
-	if ( eventType < HvLpEvent_Type_NumTypes &&
-	     lpEventHandler[eventType] &&
-	     lpEventHandlerPaths[eventType] ) {
-		if ( lpIndex == 0 )
-			lpIndex = itLpNaca.xLpIndex;
-		HvCallEvent_closeLpEventPath( lpIndex, eventType );
-		--lpEventHandlerPaths[eventType];
-		rc = 0;
-	}
-	return rc;
-}
-
diff -Nru a/arch/ppc/iSeries/ItLpQueue.c b/arch/ppc/iSeries/ItLpQueue.c
--- a/arch/ppc/iSeries/ItLpQueue.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,178 +0,0 @@
-/* 
- * ItLpQueue.c
- * Copyright (C) 2001 Mike Corrigan  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.
- * 
- * 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/stddef.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <asm/system.h>
-#include <asm/iSeries/ItLpQueue.h>
-#include <asm/iSeries/HvLpEvent.h>
-#include <asm/iSeries/HvCallEvent.h>
-#include <asm/iSeries/LparData.h>
-
-static __inline__ int set_inUse( struct ItLpQueue * lpQueue )
-{
-	int t;
-	u32 * inUseP = &(lpQueue->xInUseWord);
-
-	__asm__ __volatile__("\n\
-1:	lwarx	%0,0,%2		\n\
-	cmpi	0,%0,0		\n\
-	li	%0,0		\n\
-	bne-	2f		\n\
-	addi	%0,%0,1		\n\
-	stwcx.	%0,0,%2		\n\
-	bne-	1b		\n\
-2:	eieio"
-	: "=&r" (t), "=m" (lpQueue->xInUseWord)
-	: "r" (inUseP), "m" (lpQueue->xInUseWord)
-	: "cc");
-
-	return t;
-}
-
-static __inline__ void clear_inUse( struct ItLpQueue * lpQueue )
-{
-	lpQueue->xInUseWord = 0;
-}
-
-// Array of LpEvent handler functions
-extern LpEventHandler lpEventHandler[HvLpEvent_Type_NumTypes];
-unsigned long ItLpQueueInProcess = 0;
-
-struct HvLpEvent * ItLpQueue_getNextLpEvent( struct ItLpQueue * lpQueue )
-{
-	struct HvLpEvent * nextLpEvent = 
-		(struct HvLpEvent *)lpQueue->xSlicCurEventPtr;
-	if ( nextLpEvent->xFlags.xValid ) {
-		// Set pointer to next potential event 
-		lpQueue->xSlicCurEventPtr += ((nextLpEvent->xSizeMinus1 +
-				      LpEventAlign ) /
-				      LpEventAlign ) *
-				      LpEventAlign;
-		// Wrap to beginning if no room at end
-		if (lpQueue->xSlicCurEventPtr > lpQueue->xSlicLastValidEventPtr)
-			lpQueue->xSlicCurEventPtr = lpQueue->xSlicEventStackPtr;
-	}
-	else 
-		nextLpEvent = NULL;
-
-	return nextLpEvent;
-}
-
-int ItLpQueue_isLpIntPending( struct ItLpQueue * lpQueue )
-{
-	struct HvLpEvent * nextLpEvent =
-		(struct HvLpEvent *)lpQueue->xSlicCurEventPtr;
-	return ( nextLpEvent->xFlags.xValid |
-		 lpQueue->xPlicOverflowIntPending);
-}
-
-void ItLpQueue_clearValid( struct HvLpEvent * event )
-{
-	// Clear the valid bit of the event
-	// Also clear bits within this event that might
-	// look like valid bits (on 64-byte boundaries)
-	unsigned extra = (( event->xSizeMinus1 + LpEventAlign ) /
-						 LpEventAlign ) - 1;
-	switch ( extra ) {
-	  case 3:
-	   ((struct HvLpEvent*)((char*)event+3*LpEventAlign))->xFlags.xValid=0;
-	  case 2:
-	   ((struct HvLpEvent*)((char*)event+2*LpEventAlign))->xFlags.xValid=0;
-	  case 1:
-	   ((struct HvLpEvent*)((char*)event+1*LpEventAlign))->xFlags.xValid=0;
-	  case 0:
-	}
-	mb();
-	event->xFlags.xValid = 0;
-}
-
-// No lock is necessary when processing the Lp Queue because a single
-// processor is assigned to each lpqueue.  Interrupts are disabled
-// while processing events.
-// Some device drivers' interrupt handlers run with interrupts 
-// enabled.  This requires us to prevent being re-entered here.
-// We use the xInUse flag for that.
-
-unsigned lpQueue_proc_count[32] = {};
-
-unsigned ItLpQueue_process( struct ItLpQueue * lpQueue, struct pt_regs *regs )
-{
-	unsigned numIntsProcessed = 0;
-	struct HvLpEvent * nextLpEvent;
-
-	// If we have recursed, just return
-	if ( !set_inUse( lpQueue ) )
-		return 0;
-	
-	if (ItLpQueueInProcess == 0)
-	    ItLpQueueInProcess = 1;
-	else
-	    BUG();
-	
-	++lpQueue_proc_count[current->processor];
-	
-	for (;;) {
-		nextLpEvent = ItLpQueue_getNextLpEvent( lpQueue );
-		
-		if ( nextLpEvent ) {
-			// Count events to return to caller
-			// and count processed events in lpQueue
-			++numIntsProcessed;
-			lpQueue->xLpIntCount++;		
-			// Call appropriate handler here, passing 
-			// a pointer to the LpEvent.  The handler
-			// must make a copy of the LpEvent if it
-			// needs it in a bottom half. (perhaps for
-			// an ACK)
-			
-			//  Handlers are responsible for ACK processing 
-
-			// The Hypervisor guarantees that LpEvents will
-			// only be delivered with types that we have
-			// registered for, so no type check is necessary
-			// here!
-			if ( nextLpEvent->xType < HvLpEvent_Type_NumTypes )
-				lpQueue->xLpIntCountByType[nextLpEvent->xType]++;
-			if ( nextLpEvent->xType < HvLpEvent_Type_NumTypes &&
-			     lpEventHandler[nextLpEvent->xType] ) 
-				lpEventHandler[nextLpEvent->xType](nextLpEvent, regs);
-			else
-				printk(KERN_INFO "Unexpected Lp Event type=%d\n", nextLpEvent->xType );
-			
-			ItLpQueue_clearValid( nextLpEvent );
-		}
-		else 	// No more valid events
-			// If overflow events are pending
-			// process them
-			if ( lpQueue->xPlicOverflowIntPending ) {
-				HvCallEvent_getOverflowLpEvents( 
-						lpQueue->xIndex);
-			}
-			else	// If nothing left then we are done
-				break;
-	}
-
-	ItLpQueueInProcess = 0;
-	mb();
-	clear_inUse( lpQueue );
-
-	return numIntsProcessed;
-}
diff -Nru a/arch/ppc/iSeries/LparData.c b/arch/ppc/iSeries/LparData.c
--- a/arch/ppc/iSeries/LparData.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,331 +0,0 @@
-/*
- * LparData.c
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-#define __KERNEL__ 1
-#include <asm/types.h>
-#include <asm/page.h>
-#include <stddef.h>
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/ptrace.h>
-#include <asm/iSeries/Naca.h>
-#include <asm/iSeries/ItLpNaca.h>
-#include <asm/iSeries/ItLpPaca.h>
-#include <asm/iSeries/ItLpRegSave.h>
-#include <asm/iSeries/Paca.h>
-#include <asm/iSeries/HvReleaseData.h>
-#include <asm/iSeries/LparMap.h>
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/ItVpdAreas.h>
-#include <asm/iSeries/ItIplParmsReal.h>
-#include <asm/iSeries/ItLpQueue.h>
-#include <asm/iSeries/IoHriProcessorVpd.h>
-#include <asm/iSeries/ItSpCommArea.h>
-
-#include "ReleaseData.h"
-
-// maxProcessors is the number of physical processors
-// The number of logical processors is twice that 
-// number to support hardware multi-threading.
-// If CONFIG_SMP is not defined, then logical
-// processors will be defined, but the other threads
-// will spin forever in iSeries_head.S
-#define maxProcessors 16 
-
-extern char _start_boltedStacks[];
-unsigned maxPacas = maxProcessors * 2;
-
-// The LparMap is used by the hypervisor to map the load area.  
-// This indicates that the load area should be mapped to VSID 
-// 0x000000000000C and that this  should be made addressable at 
-// ESID 0x00000000C.  On 32-bit machines this is equivalent to 
-// loading segment register 12 with VSID 12.
-// 8192 indicates to map 8192 pages (32 MB) of the load area.
-
-struct LparMap xLparMap = { 	
-		.xNumberEsids =4,		// Number ESID/VSID pairs
-		.xNumberRanges =1,		// Number of memory ranges
-		.xSegmentTableOffs =0,		// Segment Table Page (unused)
-		.xKernelEsidC =0xC,		// ESID to map
-		.xKernelVsidC =0xCCC,		// VSID to map
-		.xKernelEsidD =0xD,		// ESID to map
-		.xKernelVsidD =0xDDD,		// VSID to map
-		.xKernelEsidE =0xE,		// ESID to map
-		.xKernelVsidE =0xEEE,		// VSID to map
-		.xKernelEsidF =0xF,		// ESID to map
-		.xKernelVsidF =0xFFF,		// VSID to map
-
-		.xPages =		HvPagesToMap,	// # of pages to map (8192)
-		.xOffset =	0,		// Offset into load area
-		.xVPN =	0xCCC0000	// VPN of first mapped page
-};					
-
-// The Naca has a pointer to the ItVpdAreas.  The hypervisor finds
-// the Naca via the HvReleaseData area.  The HvReleaseData has the
-// offset into the Naca of the pointer to the ItVpdAreas.
-
-extern struct ItVpdAreas itVpdAreas;
-
-struct Naca xNaca = {
-			 0, (void *)&itVpdAreas,
-			 0, 0,			// Ram Disk start
-			 0, 0			// Ram Disk size
-};
-
-// The LpQueue is used to pass event data from the hypervisor to
-// the partition.  This is where I/O interrupt events are communicated.
-// The ItLpQueue must be initialized (even though only to all zeros)
-// If it were uninitialized (in .bss) it would get zeroed after the
-// kernel gets control.  The hypervisor will have filled in some fields
-// before the kernel gets control.  By initializing it we keep it out
-// of the .bss
-
-struct ItLpQueue xItLpQueue = {};
-
-// The Paca is an array with one entry per processor.  Each contains an 
-// ItLpPaca, which contains the information shared between the 
-// hypervisor and Linux.  Each also contains an ItLpRegSave area which
-// is used by the hypervisor to save registers.
-// On systems with hardware multi-threading, there are two threads
-// per processor.  The Paca array must contain an entry for each thread.
-// The VPD Areas will give a max logical processors = 2 * max physical
-// processors.  The processor VPD array needs one entry per physical
-// processor (not thread).
-
-#define PacaInit( n, start, lpq ) \
-	{ 0, (struct ItLpPaca *)(((char *)(&xPaca[(n)]))+offsetof(struct Paca, xLpPaca)), \
-	  0, (struct ItLpRegSave *)(((char *)(&xPaca[(n)]))+offsetof(struct Paca, xRegSav)), \
-	  0, 0, 0, 		\
-	  (n), (start),  	\
-	  0,       		\
-	  0,	   		\
-	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0},\
-	  (lpq),		\
-	  0, 0, {0},		\
-	  { /* LpPaca */		\
-		.xDesc = 0xd397d781, /* "LpPa" */	\
-		.xSize = sizeof(struct ItLpPaca),	\
-		.xFPRegsInUse =1,		\
-		.xDynProcStatus = 2,		\
-		.xEndOfQuantum =0xffffffffffffffff	\
-	  },			\
-	  { /* LpRegSave */	\
-		0xd397d9e2,	/* "LpRS" */	\
-		sizeof(struct ItLpRegSave)	\
-	  }			\
-	}
-
-struct Paca xPaca[maxProcessors*2]  = {
-	 PacaInit(  0, 1, &xItLpQueue ) 
-	,PacaInit(  1, 0, 0 )
-	,PacaInit(  2, 0, 0 )
-	,PacaInit(  3, 0, 0 )
-	,PacaInit(  4, 0, 0 )
-	,PacaInit(  5, 0, 0 )
-	,PacaInit(  6, 0, 0 )
-	,PacaInit(  7, 0, 0 )
-	,PacaInit(  8, 0, 0 )
-	,PacaInit(  9, 0, 0 )
-	,PacaInit( 10, 0, 0 )
-	,PacaInit( 11, 0, 0 )
-	,PacaInit( 12, 0, 0 )
-	,PacaInit( 13, 0, 0 )
-	,PacaInit( 14, 0, 0 )
-	,PacaInit( 15, 0, 0 )
-	,PacaInit( 16, 0, 0 )
-	,PacaInit( 17, 0, 0 )
-	,PacaInit( 18, 0, 0 )
-	,PacaInit( 19, 0, 0 )
-	,PacaInit( 20, 0, 0 )
-	,PacaInit( 21, 0, 0 )
-	,PacaInit( 22, 0, 0 )
-	,PacaInit( 23, 0, 0 )
-	,PacaInit( 24, 0, 0 )
-	,PacaInit( 25, 0, 0 )
-	,PacaInit( 26, 0, 0 )
-	,PacaInit( 27, 0, 0 )
-	,PacaInit( 28, 0, 0 )
-	,PacaInit( 29, 0, 0 )
-	,PacaInit( 30, 0, 0 )
-	,PacaInit( 31, 0, 0 )
-};
-
-
-
-// The HvReleaseData is the root of the information shared between 
-// the hypervisor and Linux.  
-
-struct HvReleaseData 
-	   hvReleaseData = {	0xc8a5d9c4,	// desc = "HvRD" ebcdic
-		   		sizeof(struct HvReleaseData),
-				offsetof(struct Naca, xItVpdAreas64),
-				0, &xNaca,	// 64-bit Naca address
-				((u32)&xLparMap-KERNELBASE),
-				0,
-				1,	// tags inactive mode
-				1,	// 32-bit mode
-				0,	// shared processors
-				0,	// hardware multithreading
-				6,	// TEMP: set me back to 0
-					// this allows non-ga 450 driver
-				3,	// We are v5r1m0
-				3,	// Min supported PLIC = v5r1m0
-				3,	// Min usuable PLIC   = v5r1m0
-				RELEASEDATA,
-				{0}  
-			};
-
-	
-struct ItLpNaca itLpNaca = {    0xd397d581,	// desc = "LpNa" ebcdic
-				0x0400,		// size of ItLpNaca
-				0x0300, 19,	// offset to int array, # ents
-				0, 0, 0,	// Part # of primary, serv, me
-				0, 0x100,	// # of LP queues, offset
-				0, 0, 0,	// Piranha stuff
-				{ 0,0,0,0,0 },	// reserved
-				0,0,0,0,0,0,0,	// stuff
-				{ 0,0,0,0,0 },	// reserved
-				0,		// reserved
-				0,		// VRM index of PLIC
-				0, 0,		// min supported, compat SLIC
-				0,		// 64-bit addr of load area
-				0,		// chunks for load area
-				0,		// reserved
-				{ 0 },		// 72 reserved bytes
-				{ 0 }, 		// 128 reserved bytes
-				{ 0 }, 		// Old LP Queue
-				{ 0 }, 		// 384 reserved bytes
-				{
-				0xc0000100,	// int 0x100
-				0xc0000200,	// int 0x200
-				0xc0000300,	// int 0x300
-				0xc0000400,	// int 0x400
-				0xc0000500,	// int 0x500
-				0xc0000600,	// int 0x600
-				0xc0000700,	// int 0x700
-				0xc0000800,	// int 0x800
-				0xc0000900,	// int 0x900
-				0xc0000a00,	// int 0xa00
-				0xc0000b00,	// int 0xb00
-				0xc0000c00,	// int 0xc00
-				0xc0000d00,	// int 0xd00
-				0xc0000e00,	// int 0xe00
-				0xc0000f00,	// int 0xf00
-				0xc0001000,	// int 0x1000
-				0xc0001010,	// int 0x1010
-				0xc0001020,	// int 0x1020 CPU ctls
-				0xc0000500 	// SC Ret Hdlr
-						// int 0x380
-						// int 0x480
-				}
-		};
-
-// All of the data structures that will be filled in by the hypervisor
-// must be initialized (even if only to zeroes) to keep them out of 
-// the bss.  If in bss, they will be zeroed by the kernel startup code
-// after the hypervisor has filled them in.
-
-struct ItIplParmsReal xItIplParmsReal = {};
-
-struct IoHriProcessorVpd xIoHriProcessorVpd[maxProcessors] = {
-	{ 
-	.xTimeBaseFreq = 50000000
-	}
-};
-	
-
-u64    xMsVpd[3400] = {};		// Space for Main Store Vpd 27,200 bytes
-
-u64    xRecoveryLogBuffer[32] = {};	// Space for Recovery Log Buffer
-
-struct SpCommArea xSpCommArea = {
-    0xE2D7C3C2,
-    1,
-    {0},
-    0, 0, 0, 0, {0}
-};
-
-struct ItVpdAreas itVpdAreas = {
-		0xc9a3e5c1,	// "ItVA"
-		sizeof( struct ItVpdAreas ),
-		0, 0,
-		26,		// # VPD array entries
-		10,		// # DMA array entries
-		maxProcessors*2, maxProcessors,	// Max logical, physical procs
-		offsetof(struct ItVpdAreas,xPlicDmaToks),// offset to DMA toks
-		offsetof(struct ItVpdAreas,xSlicVpdAdrs),// offset to VPD addrs
-		offsetof(struct ItVpdAreas,xPlicDmaLens),// offset to DMA lens
-		offsetof(struct ItVpdAreas,xSlicVpdLens),// offset to VPD lens
-		0,		// max slot labels
-		1,		// max LP queues
-		{0}, {0},	// reserved
-		{0},		// DMA lengths
-		{0},		// DMA tokens
-		{		// VPD lengths
-		0,0,0,0,		//  0 -  3
-		sizeof(struct Paca),	//       4 length of Paca 
-		0,			//       5
-		sizeof(struct ItIplParmsReal),// 6 length of IPL parms
-		26992,			//	 7 length of MS VPD
-		0,			//       8
-		sizeof(struct ItLpNaca),//       9 length of LP Naca
-		0,			//	10 
-		256,			//	11 length of Recovery Log Buf
-		sizeof(struct SpCommArea), //   12 length of SP Comm area
-		0,0,0,			// 13 - 15 
-		sizeof(struct IoHriProcessorVpd),// 16 length of Proc Vpd
-		0,0,0,0,0,0,		// 17 - 22 
-		sizeof(struct ItLpQueue),//     23 length of Lp Queue
-		0,0			// 24 - 25
-		},
-		{		// VPD addresses
-		{0},{0},{0},{0},	//  0 -  3
-		{0, &xPaca[0]},		//       4 first Paca
-		{0},			//       5
-		{0, &xItIplParmsReal},	//       6 IPL parms
-		{0, &xMsVpd},		//	 7 MS Vpd
-		{0},			//       8
-		{0, &itLpNaca},		//       9 LpNaca
-		{0},			//	10
-		{0, &xRecoveryLogBuffer},//	11 Recovery Log Buffer
-		{0, &xSpCommArea}, 	//	12 Sp Comm Area
-		{0},{0},{0},		// 13 - 15 
-		{0, &xIoHriProcessorVpd},//     16 Proc Vpd
-		{0},{0},{0},{0},{0},{0},// 17 - 22
-		{0, &xItLpQueue},	//      23 Lp Queue
-		{0},{0}
-		}
-		
-};
-
-// The size of this array determines how much main store can be
-// configured for use in the partition.  16384 allows 16384 * 256KB
-// which is 4GB.  This is enough for the 32-bit
-// implementation, but the msChunks array will need to be dynamically
-// allocated for really big partitions.
-u32 msChunks[16384]  = {0};
-u32 totalLpChunks   = 0;
-
-// Data area used in flush_hash_page 
-long long flush_hash_page_hpte[2]  = {0,0};
-
-u64 virt_to_absolute_outline(u32 address)
-{
-    return virt_to_absolute(address);
-}
diff -Nru a/arch/ppc/iSeries/Makefile b/arch/ppc/iSeries/Makefile
--- a/arch/ppc/iSeries/Makefile	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,17 +0,0 @@
-#
-# Makefile for Linux arch/ppc/iSeries source directory
-#
-
-export-objs := iSeries_ksyms.o
-obj-y   += LparData.o ItLpQueue.o HvLpEvent.o HvCall.o mf.o iSeries_proc.o mf_proc.o iSeries_ksyms.o HvLpConfig.o pmc_proc.o rtc.o
-
-obj-$(CONFIG_PCI) += XmPciLpEvent.o iSeries_FlightRecorder.o iSeries_IoMmTable.o iSeries_VpdInfo.o iSeries_fixup.o iSeries_irq.o iSeries_pci.o iSeries_pci_proc.o iSeries_reset_device.o
-
-LparData.c:: ReleaseData.h
-
-ReleaseData.h: $(TOPDIR)/Makefile
-	/bin/bash ./createReleaseData $(KERNELRELEASE) > $@
-
-clean:
-	rm -f ReleaseData.h
-
diff -Nru a/arch/ppc/iSeries/XmPciLpEvent.c b/arch/ppc/iSeries/XmPciLpEvent.c
--- a/arch/ppc/iSeries/XmPciLpEvent.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,150 +0,0 @@
-/*
-   * File XmPciLpEvent.h created by Wayne Holm on Mon Jan 15 2001.
-   *
-   * This module handles PCI interrupt events sent by the AS400 Hypervisor.
-*/
-
-
-#include <linux/pci.h>
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/threads.h>
-#include <linux/smp.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/bootmem.h>
-#include <linux/blk.h>
-#include <linux/ide.h>
-
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/HvLpEvent.h>
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/XmPciLpEvent.h>
-
-
-enum XmPciLpEvent_Subtype {
-    XmPciLpEvent_BusCreated	= 0,		// PHB has been created
-    XmPciLpEvent_BusFailed	= 1,		// PHB has failed
-    XmPciLpEvent_BusRecovered	= 12,		// PHB has been recovered
-    XmPciLpEvent_NodeFailed	= 4,		// Multi-adapter bridge has failed
-    XmPciLpEvent_NodeRecovered	= 5,		// Multi-adapter bridge has recovered
-    XmPciLpEvent_SlotInterrupt	= 22		// Slot interrupt
-};
-
-struct XmPciLpEvent_BusInterrupt {
-    HvBusNumber		busNumber;
-    HvSubBusNumber	subBusNumber;
-};
-
-struct XmPciLpEvent_NodeInterrupt {
-    HvBusNumber		busNumber;
-    HvSubBusNumber	subBusNumber;
-    HvAgentId		deviceId;
-};
-
-struct XmPciLpEvent {
-    struct HvLpEvent hvLpEvent;
-
-    union {
-	u64 alignData;			// Align on an 8-byte boundary
-
-	struct {
-	    u32			fisr;
-	    HvBusNumber		busNumber;
-	    HvSubBusNumber	subBusNumber;
-	    HvAgentId		deviceId;
-	} slotInterrupt;
-
-	struct XmPciLpEvent_BusInterrupt busFailed;
-	struct XmPciLpEvent_BusInterrupt busRecovered;
-	struct XmPciLpEvent_BusInterrupt busCreated;
-
-	struct XmPciLpEvent_NodeInterrupt nodeFailed;
-	struct XmPciLpEvent_NodeInterrupt nodeRecovered;
-
-    } eventData;
-
-};
-
-static void intReceived(struct XmPciLpEvent* eventParm, struct pt_regs* regsParm);
-
-static void XmPciLpEvent_handler( struct HvLpEvent* eventParm, struct pt_regs* regsParm) {
-    if (eventParm && eventParm->xType == HvLpEvent_Type_PciIo) {
-	switch( eventParm->xFlags.xFunction ) {
-	    case HvLpEvent_Function_Int:
-		intReceived( (struct XmPciLpEvent*)eventParm, regsParm );
-		break;
-	    case HvLpEvent_Function_Ack:
-		printk(KERN_ERR "XmPciLpEvent.c: unexpected ack received\n");
-		break;
-	    default:
-		printk(KERN_ERR "XmPciLpEvent.c: unexpected event function %d\n",
-		       (int)eventParm->xFlags.xFunction);
-		break;
-	};
-    }
-    else {
-	if (event) {
-	    printk(KERN_ERR "XmPciLpEvent.c: unrecognized event type 0x%x\n",
-		   (int)eventParm->xType);
-	}
-	else {
-	    printk(KERN_ERR "XmPciLpEvent.c: NULL event received\n");
-	}
-    }
-}
-
-static void intReceived(struct XmPciLpEvent* eventParm, struct pt_regs* regsParm) {
-    int irq;
-
-    switch (eventParm->hvLpEvent.xSubtype) {
-	case XmPciLpEvent_SlotInterrupt:
-	    irq = eventParm->hvLpEvent.xCorrelationToken;
-	    /* Dispatch the interrupt handlers for this irq */
-	    ppc_irq_dispatch_handler(regsParm, irq);
-	    HvCallPci_eoi(eventParm->eventData.slotInterrupt.busNumber,
-			  eventParm->eventData.slotInterrupt.subBusNumber,
-			  eventParm->eventData.slotInterrupt.deviceId);
-	    break;
-	/* Ignore error recovery events for now */
-	case XmPciLpEvent_BusCreated:
-	    printk(KERN_INFO "XmPciLpEvent.c: system bus %d created\n", eventParm->eventData.busCreated.busNumber);
-	    break;
-	case XmPciLpEvent_BusFailed:
-	    printk(KERN_INFO "XmPciLpEvent.c: system bus %d failed\n", eventParm->eventData.busFailed.busNumber);
-	    break;
-	case XmPciLpEvent_BusRecovered:
-	    printk(KERN_INFO "XmPciLpEvent.c: system bus %d recovered\n", eventParm->eventData.busRecovered.busNumber);
-	    break;
-	case XmPciLpEvent_NodeFailed:
-	    printk(KERN_INFO "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d failed\n", eventParm->eventData.nodeFailed.busNumber, eventParm->eventData.nodeFailed.subBusNumber, eventParm->eventData.nodeFailed.deviceId);
-	    break;
-	case XmPciLpEvent_NodeRecovered:
-	    printk(KERN_INFO "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d recovered\n", eventParm->eventData.nodeRecovered.busNumber, eventParm->eventData.nodeRecovered.subBusNumber, eventParm->eventData.nodeRecovered.deviceId);
-	    break;
-	default:
-	    printk(KERN_ERR "XmPciLpEvent.c: unrecognized event subtype 0x%x\n",
-		   eventParm->hvLpEvent.xSubtype);
-	    break;
-    };
-}
-
-
-/* This should be called sometime prior to buswalk (init_IRQ would be good) */
-int XmPciLpEvent_init() {
-    int xRc;
-
-    xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, &XmPciLpEvent_handler);
-    if (xRc == 0) {
-	xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0);
-	if (xRc != 0) {
-	    printk(KERN_ERR "XmPciLpEvent.c: open event path failed with rc 0x%x\n", xRc);
-	}
-    }
-    else {
-	printk(KERN_ERR "XmPciLpEvent.c: register handler failed with rc 0x%x\n", xRc);
-    }
-
-    return xRc;
-}
-
diff -Nru a/arch/ppc/iSeries/createReleaseData b/arch/ppc/iSeries/createReleaseData
--- a/arch/ppc/iSeries/createReleaseData	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,115 +0,0 @@
-#!/bin/bash 
-####################################################
-# Build a hex ebcdic representation of the 
-# KERNELRELEASE for use in the iSeries
-# hvReleaseData structure
-####################################################
-
-if [ $# -ne 1 ]
-then
-   echo "Syntax: createReleaseData kernelversion"
-   exit 1
-fi
-
-len=${#1}
-
-rd=''
-####################################################
-# ReleaseData is maximum of 12 chars
-####################################################
-if [ $len -gt 12 ]
-then
-   len=12
-fi
-
-#for (( i=0 ; $i < $len ; i=$i+1 )) ;
-i=0
-while (($i<$len));
-do
-   char=${1:$i:1}
-   case $char in
-    'a') xchar='0x81';;
-    'b') xchar='0x82';;
-    'c') xchar='0x83';;
-    'd') xchar='0x84';;
-    'e') xchar='0x85';;
-    'f') xchar='0x86';;
-    'g') xchar='0x87';;
-    'h') xchar='0x88';;
-    'i') xchar='0x89';;
-    'j') xchar='0x91';;
-    'k') xchar='0x92';;
-    'l') xchar='0x93';;
-    'm') xchar='0x94';;
-    'n') xchar='0x95';;
-    'o') xchar='0x96';;
-    'p') xchar='0x97';;
-    'q') xchar='0x98';;
-    'r') xchar='0x99';;
-    's') xchar='0xA2';;
-    't') xchar='0xA3';;
-    'u') xchar='0xA4';;
-    'v') xchar='0xA5';;
-    'w') xchar='0xA6';;
-    'x') xchar='0xA7';;
-    'y') xchar='0xA8';;
-    'z') xchar='0xA9';;
-    'A') xchar='0xC1';;
-    'B') xchar='0xC2';;
-    'C') xchar='0xC3';;
-    'D') xchar='0xC4';;
-    'E') xchar='0xC5';;
-    'F') xchar='0xC6';;
-    'G') xchar='0xC7';;
-    'H') xchar='0xC8';;
-    'I') xchar='0xC9';;
-    'J') xchar='0xD1';;
-    'K') xchar='0xD2';;
-    'L') xchar='0xD3';;
-    'M') xchar='0xD4';;
-    'N') xchar='0xD5';;
-    'O') xchar='0xD6';;
-    'P') xchar='0xD7';;
-    'Q') xchar='0xD8';;
-    'R') xchar='0xD9';;
-    'S') xchar='0xE2';;
-    'T') xchar='0xE3';;
-    'U') xchar='0xE4';;
-    'V') xchar='0xE5';;
-    'W') xchar='0xE6';;
-    'X') xchar='0xE7';;
-    'Y') xchar='0xE8';;
-    'Z') xchar='0xE9';;
-    '0') xchar='0xF0';;
-    '1') xchar='0xF1';;
-    '2') xchar='0xF2';;
-    '3') xchar='0xF3';;
-    '4') xchar='0xF4';;
-    '5') xchar='0xF5';;
-    '6') xchar='0xF6';;
-    '7') xchar='0xF7';;
-    '8') xchar='0xF8';;
-    '9') xchar='0xF9';;
-    '.') xchar='0x4B';;
-    '-') xchar='0x60';;
-    '_') xchar='0x6D';;
-    '+') xchar='0x4E';;
-    '@') xchar='0x7C';;
-    '$') xchar='0x5B';;
-    '%') xchar='0x6C';;
-      *) xchar='';;
-   esac
-
-   rd=${rd}${xchar}
-   if [ $(($i+1)) -lt $len ]
-   then
-      rd=${rd}', '
-   fi
-   i=$i+1
-done
-
-#echo "#define RELEASEDATA { $rd }">ReleaseData.h
-
-echo "#define RELEASEDATA { $rd }"
-
-
diff -Nru a/arch/ppc/iSeries/iSeries_FlightRecorder.c b/arch/ppc/iSeries/iSeries_FlightRecorder.c
--- a/arch/ppc/iSeries/iSeries_FlightRecorder.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,89 +0,0 @@
-/************************************************************************/
-/* File iSeries_FlightRecorder.c created by Al Trautman on Jan 22 2001. */
-/************************************************************************/
-/* This code supports the pci interface on the IBM iSeries systems.     */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, Jan 22, 2001                                              */
-/*   Added Time Stamps, April 12, 2001                                  */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <asm/iSeries/iSeries_FlightRecorder.h>
-#include <linux/rtc.h>
-#include <asm/iSeries/mf.h>
-/************************************************************************/
-/* Log entry into buffer,                                               */
-/* ->If entry is going to wrap, log "WRAP" and start at the top.        */
-/************************************************************************/
-void iSeries_LogFr_Entry(FlightRecorder* Fr, char* LogText) {
-    int Residual, TextLen;
-    if(Fr->StartingPointer > 0) {	/* Initialized yet?             */
-	Residual  = FlightRecorderSize - (Fr->CurrentPointer - Fr->StartingPointer);
-	TextLen = strlen(LogText);	/* Length of Text               */
-	if(TextLen+16 > Residual) {	/* Room for text or need to wrap*/
-	    strcpy(Fr->CurrentPointer,"WRAP");
-	    ++Fr->WrapCount;		/* Increment Wraps              */
-	    Fr->CurrentPointer  = Fr->StartingPointer;
-	}
-	strcpy(Fr->CurrentPointer,LogText);
-	Fr->CurrentPointer += TextLen+1;
-	strcpy(Fr->CurrentPointer,"<=");
-    }
-}
-/************************************************************************/
-/* Log entry with time                                                  */
-/************************************************************************/
-void iSeries_LogFr_Time(FlightRecorder* Fr, char* LogText) {
-    struct   rtc_time  Rtc;
-    char     LogBuffer[256];
-    mf_getRtc(&Rtc);    
-    sprintf(LogBuffer,"%02d:%02d:%02d %s",
-            Rtc.tm_hour,Rtc.tm_min,Rtc.tm_sec,
-            LogText);
-    iSeries_LogFr_Entry(Fr,LogBuffer);
-}
-/************************************************************************/
-/* Log Entry with Date and call Time Log                                */
-/************************************************************************/
-void iSeries_LogFr_Date(FlightRecorder* Fr, char* LogText) {
-    struct   rtc_time  Rtc;
-    char     LogBuffer[256];
-    mf_getRtc(&Rtc);
-    sprintf(LogBuffer,"%02d.%02d.%02d %02d:%02d:%02d %s",
-            Rtc.tm_year+1900, Rtc.tm_mon, Rtc.tm_mday,
-            Rtc.tm_hour,Rtc.tm_min,Rtc.tm_sec,
-            LogText);
-    iSeries_LogFr_Entry(Fr,LogBuffer);
-}
-/************************************************************************/
-/* Initialized the Flight Recorder                                      */  
-/************************************************************************/
-void iSeries_Fr_Initialize(FlightRecorder* Fr, char* Signature) {
-    if(strlen(Signature) > 16) memcpy(Fr->Signature,Signature,16);
-    else                       strcpy(Fr->Signature,Signature);
-    Fr->StartingPointer = &Fr->Buffer[0];
-    Fr->CurrentPointer  = Fr->StartingPointer;
-    Fr->logEntry        = iSeries_LogFr_Entry;
-    Fr->logDate         = iSeries_LogFr_Date;
-    Fr->logTime         = iSeries_LogFr_Time;
-    Fr->logEntry(Fr,"FR Initialized."); /* Note, can't use time yet!   */
-}
diff -Nru a/arch/ppc/iSeries/iSeries_IoMmTable.c b/arch/ppc/iSeries/iSeries_IoMmTable.c
--- a/arch/ppc/iSeries/iSeries_IoMmTable.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,206 +0,0 @@
-/************************************************************************/
-/* This module supports the iSeries I/O Address translation mapping     */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, December 14, 2000                                         */
-/*   Added Bar table for IoMm performance.                              */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <asm/types.h>
-#include <asm/resource.h>
-#include <linux/pci.h>
-#include <linux/spinlock.h>
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/iSeries_FlightRecorder.h>
-
-#include "iSeries_IoMmTable.h"
-#include "iSeries_pci.h"
-
-void iSeries_allocateDeviceBars(struct pci_dev* PciDevPtr); 
-/*******************************************************************/
-/* Table defines                                                   */
-/* Entry size is 4 MB * 1024 Entries = 4GB.                        */
-/*******************************************************************/
-#define iSeries_IoMmTable_Entry_Size   0x00400000  
-#define iSeries_IoMmTable_Size         1024
-#define iSeries_Base_Io_Memory         0xFFFFFFFF
-
-/*******************************************************************/
-/* Static and Global variables                                     */
-/*******************************************************************/
-struct pci_dev*   iSeries_IoMmTable[iSeries_IoMmTable_Size];
-u8                iSeries_IoBarTable[iSeries_IoMmTable_Size];
-static int        iSeries_CurrentIndex;
-static char*      iSeriesPciIoText     = "iSeries PCI I/O";
-static spinlock_t iSeriesIoMmTableLock = SPIN_LOCK_UNLOCKED;
-/*******************************************************************/
-/* iSeries_IoMmTable_Initialize                                    */
-/*******************************************************************/
-/* - Initalizes the Address Translation Table and get it ready for */
-/*   use.  Must be called before any client calls any of the other */
-/*   methods.                                                      */
-/*******************************************************************/
-void iSeries_IoMmTable_Initialize(void) {
-    int Index;
-    spin_lock(&iSeriesIoMmTableLock);
-    for(Index=0;Index<iSeries_IoMmTable_Size ; ++Index) {
-	iSeries_IoMmTable[Index]  = NULL;
-	iSeries_IoBarTable[Index] = 0xFF;
-    }
-    spin_unlock(&iSeriesIoMmTableLock);
-    iSeries_CurrentIndex = iSeries_IoMmTable_Size-1;
-    ISERIES_PCI_FR("IoMmTable Init.");
-}
-/*******************************************************************/
-/* iSeries_allocateDeviceBars                                      */
-/*******************************************************************/
-/* - Allocates ALL pci_dev BAR's and updates the resources with the*/
-/*   BAR value.  BARS with zero length will have the resources     */
-/*   The HvCallPci_getBarParms is used to get the size of the BAR  */
-/*   space.  It calls iSeries_IoMmTable_AllocateEntry to allocate  */
-/*   each entry.                                                   */
-/* - Loops through The Bar resourses(0 - 5) including the the ROM  */
-/*   is resource(6).                                               */
-/*******************************************************************/
-void iSeries_allocateDeviceBars(struct pci_dev* PciDevPtr) {
-    struct resource* BarResource;
-    int              BarNumber = 0;	        /* Current Bar Number      */
-    if(PciTraceFlag > 0) {
-	printk("PCI: iSeries_allocateDeviceBars 0x%08X\n",(int)PciDevPtr);
-	sprintf(PciFrBuffer,"IoBars %08X",(int)PciDevPtr);
-	ISERIES_PCI_FR(PciFrBuffer);
-    }
-    for(BarNumber = 0; BarNumber <= PCI_ROM_RESOURCE; ++BarNumber) {
-	BarResource = &PciDevPtr->resource[BarNumber];
-	iSeries_IoMmTable_AllocateEntry(PciDevPtr, BarNumber);
-    }
-}
-
-/*******************************************************************/
-/* iSeries_IoMmTable_AllocateEntry                                 */
-/*******************************************************************/
-/* Adds pci_dev entry in address translation table                 */
-/*******************************************************************/
-/* - Allocates the number of entries required in table base on BAR */
-/*   size.                                                         */
-/* - This version, allocates top down, starting at 4GB.            */
-/* - The size is round up to be a multiple of entry size.          */
-/* - CurrentIndex is decremented to keep track of the last entry.  */
-/* - Builds the resource entry for allocated BARs.                 */
-/*******************************************************************/
-void iSeries_IoMmTable_AllocateEntry(struct pci_dev* PciDevPtr, u32 BarNumber) {
-    struct resource* BarResource  = &PciDevPtr->resource[BarNumber];
-    int              BarSize      = BarResource->end - BarResource->start;
-    u32              BarStartAddr;
-    u32              BarEndAddr;
-    /***************************************************************/
-    /* No space to allocate, skip Allocation.                      */
-    /***************************************************************/
-    if(BarSize == 0) return;		/* Quick stage exit        */
-
-    /***************************************************************/
-    /* Allocate the table entries needed.                          */
-    /***************************************************************/
-    spin_lock(&iSeriesIoMmTableLock);
-    while(BarSize > 0) {
-	iSeries_IoMmTable[iSeries_CurrentIndex]  = PciDevPtr;
-	iSeries_IoBarTable[iSeries_CurrentIndex] = BarNumber;
-	BarSize -= iSeries_IoMmTable_Entry_Size;
-	--iSeries_CurrentIndex;		/* Next Free entry         */
-    }
-    spin_unlock(&iSeriesIoMmTableLock);
-    BarStartAddr       = iSeries_IoMmTable_Entry_Size*(iSeries_CurrentIndex+1);
-    BarEndAddr         = BarStartAddr + (u32)(BarResource->end - BarResource->start);
-    /***************************************************************/
-    /* Build Resource info                                         */
-    /***************************************************************/
-    BarResource->name  = iSeriesPciIoText;
-    BarResource->start = (long)BarStartAddr;
-    BarResource->end   = (long)BarEndAddr;
-
-    /***************************************************************/
-    /* Tracing                                                     */
-    /***************************************************************/
-    if(PciTraceFlag > 0) {
-	printk("PCI: BarAloc %04X-%08X-%08X\n",iSeries_CurrentIndex+1,(int)BarStartAddr, (int)BarEndAddr);
-	sprintf(PciFrBuffer,"IoMmAloc %04X-%08X-%08X",
-		iSeries_CurrentIndex+1,(int)BarStartAddr, (int)BarEndAddr);
-	ISERIES_PCI_FR(PciFrBuffer);
-    }
-}
-/*******************************************************************/
-/* Translates an I/O Memory address to pci_dev*                    */
-/*******************************************************************/
-struct pci_dev* iSeries_xlateIoMmAddress(u32* IoAddress) {
-    int             PciDevIndex;
-    struct pci_dev* PciDevPtr;
-    PciDevIndex = (u32)IoAddress/iSeries_IoMmTable_Entry_Size;
-    PciDevPtr   = iSeries_IoMmTable[PciDevIndex];
-    if(PciDevPtr == 0) {
-	printk("PCI: Invalid I/O Address: 0x%08X\n",(int)IoAddress);
-	sprintf(PciFrBuffer,"Invalid MMIO Address 0x%08X",(int)IoAddress); 
-    	ISERIES_PCI_FR(PciFrBuffer);
-    }
-    return PciDevPtr;
-}
-/************************************************************************/
-/* Returns the Bar number of Address                                    */
-/************************************************************************/
-int  iSeries_IoMmTable_Bar(u32 *IoAddress) {
-    int BarIndex  = (u32)IoAddress/iSeries_IoMmTable_Entry_Size;
-    int BarNumber = iSeries_IoBarTable[BarIndex];
-    return BarNumber;
-}
-/************************************************************************/
-/* Return the Bar Base Address or 0.                                    */
-/************************************************************************/
-u32* iSeries_IoMmTable_BarBase(u32 *IoAddress) {
-    u32  BaseAddr  = -1;
-    pciDev* PciDev    = iSeries_xlateIoMmAddress(IoAddress);
-    if(PciDev != 0) { 
-	int BarNumber = iSeries_IoMmTable_Bar(IoAddress);
-	if(BarNumber != -1) {
-	    BaseAddr = (&PciDev->resource[BarNumber])->start;
-	}
-    }
-    return (u32*)BaseAddr;
-}
-/************************************************************************/
-/* Return the Bar offset within the Bar Space                           */
-/* Note: Assumes that address is valid.                                 */
-/************************************************************************/
-u32  iSeries_IoMmTable_BarOffset(u32* IoAddress) {
-    u32 BaseAddr  = (u32)iSeries_IoMmTable_BarBase(IoAddress);
-    return (u32)IoAddress-BaseAddr;
-}
-/************************************************************************/
-/* Return 0 if Address is valid I/O Address                             */
-/************************************************************************/
-int  iSeries_Is_IoMmAddress(unsigned long IoAddress) {
-    if( iSeries_IoMmTable_Bar((u32*)IoAddress) == -1) return 1;
-    else                                              return 0;
-}
-/************************************************************************/
-/* Helper Methods to get TableSize and TableSizeEntry.                  */
-/************************************************************************/
-u32  iSeries_IoMmTable_TableEntrySize(void)	{ return iSeries_IoMmTable_Entry_Size;	}
-u32  iSeries_IoMmTable_TableSize(void)	{ return iSeries_IoMmTable_Size;	}
-
-
diff -Nru a/arch/ppc/iSeries/iSeries_IoMmTable.h b/arch/ppc/iSeries/iSeries_IoMmTable.h
--- a/arch/ppc/iSeries/iSeries_IoMmTable.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,105 +0,0 @@
-#ifndef _ISERIES_IOMMTABLE_H
-#define _ISERIES_IOMMTABLE_H
-/************************************************************************/
-/* File iSeries_IoMmTable.h created by Allan Trautman on Dec 12 2001.   */
-/************************************************************************/
-/* Interfaces for the write/read Io address translation table.          */
-/* Copyright (C) 20yy  Allan H Trautman, 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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created December 12, 2000                                          */
-/* End Change Activity                                                  */
-/************************************************************************/
-
-/************************************************************************/
-/* iSeries_IoMmTable_Initialize                                         */
-/************************************************************************/
-/* - Initalizes the Address Translation Table and get it ready for use. */
-/*   Must be called before any client calls any of the other methods.   */
-/*                                                                      */
-/* Parameters: None.                                                    */
-/*                                                                      */
-/* Return: None.                                                        */  
-/************************************************************************/
-extern  void iSeries_IoMmTable_Initialize(void);
-
-/************************************************************************/
-/* iSeries_allocateDeviceBars                                           */
-/************************************************************************/
-/* - Allocates ALL pci_dev BAR's and updates the resources with the BAR */
-/*   value.  BARS with zero length will not have the resources.  The    */
-/*   HvCallPci_getBarParms is used to get the size of the BAR space.    */
-/*   It calls as400_IoMmTable_AllocateEntry to allocate each entry.     */
-/*                                                                      */
-/* Parameters:                                                          */
-/* pci_dev = Pointer to pci_dev structure that will be mapped to pseudo */
-/*           I/O Address.                                               */
-/*                                                                      */
-/* Return:                                                              */
-/*   The pci_dev I/O resources updated with pseudo I/O Addresses.       */
-/************************************************************************/
-extern  void iSeries_allocateDeviceBars(struct pci_dev* Device);
-
-/************************************************************************/
-/* iSeries_IoMmTable_AllocateEntry                                      */ 
-/************************************************************************/
-/* - Allocates(adds) the pci_dev entry in the Address Translation Table */
-/*   and updates the Resources for the device.                          */
-/*                                                                      */
-/* Parameters:                                                          */
-/* pci_dev = Pointer to pci_dev structure that will be mapped to pseudo */
-/*           I/O Address.                                               */
-/*                                                                      */
-/* BarNumber = Which Bar to be allocated.                               */
-/*                                                                      */
-/* Return:                                                              */
-/*   The pseudo I/O Address in the resources that will map to the       */
-/*   pci_dev on iSeries_xlateIoMmAddress call.                          */
-/************************************************************************/
-extern  void iSeries_IoMmTable_AllocateEntry(struct pci_dev* Device, u32 BarNumber);
-
-/************************************************************************/
-/* iSeries_xlateIoMmAddress                                             */
-/************************************************************************/
-/* - Translates an I/O Memory address to pci_dev that has been allocated*/
-/*   the psuedo I/O Address.                                            */
-/*                                                                      */
-/* Parameters:                                                          */
-/* IoAddress = I/O Memory Address.                                      */
-/*                                                                      */
-/* Return:                                                              */
-/*   A pci_dev pointer to the device mapped to the I/O address.         */
-/************************************************************************/
-extern  struct pci_dev* iSeries_xlateIoMmAddress(u32* IoAddress);
-
-/************************************************************************/
-/* Helper Methods                                                       */
-/************************************************************************/
-extern  int  iSeries_IoMmTable_Bar(u32 *IoAddress);
-extern  u32* iSeries_IoMmTable_BarBase(u32* IoAddress);
-extern  u32  iSeries_IoMmTable_BarOffset(u32* IoAddress);
-extern  int  iSeries_Is_IoMmAddress(unsigned long address);
-
-/************************************************************************/
-/* Helper Methods to get TableSize and TableSizeEntry.                  */
-/************************************************************************/
-extern  u32  iSeries_IoMmTable_TableEntrySize(void);
-extern  u32  iSeries_IoMmTable_TableSize(void);
-
-#endif /* _ISERIES_IOMMTABLE_H */
diff -Nru a/arch/ppc/iSeries/iSeries_VpdInfo.c b/arch/ppc/iSeries/iSeries_VpdInfo.c
--- a/arch/ppc/iSeries/iSeries_VpdInfo.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,339 +0,0 @@
-/************************************************************************/
-/* File iSeries_vpdInfo.c created by Allan Trautman on Fri Feb  2 2001. */
-/************************************************************************/
-/* This code gets the card location of the hardware                     */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, Feb 2, 2001                                               */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <asm/types.h>
-#include <asm/resource.h>
-
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/mf.h>
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/iSeries_VpdInfo.h>
-#include "iSeries_pci.h"
-
-/************************************************/
-/* Size of Bus VPD data                         */
-/************************************************/
-#define BUS_VPDSIZE      1024
-/************************************************/
-/* Bus Vpd Tags                                 */
-/************************************************/
-#define  VpdEndOfDataTag   0x78
-#define  VpdEndOfAreaTag   0x79
-#define  VpdIdStringTag    0x82
-#define  VpdVendorAreaTag  0x84
-/************************************************/
-/* Mfg Area Tags                                */
-/************************************************/
-#define  VpdAsmPartNumber 0x504E     // "PN"
-#define  VpdFruFlag       0x4647     // "FG"
-#define  VpdFruLocation   0x464C     // "FL"
-#define  VpdFruFrameId    0x4649     // "FI"
-#define  VpdFruPartNumber 0x464E     // "FN"
-#define  VpdFruPowerData  0x5052     // "PR"
-#define  VpdFruSerial     0x534E     // "SN"
-#define  VpdFruType       0x4343     // "CC"
-#define  VpdFruCcinExt    0x4345     // "CE"
-#define  VpdFruRevision   0x5256     // "RV"
-#define  VpdSlotMapFormat 0x4D46     // "MF"
-#define  VpdSlotMap       0x534D     // "SM"
-
-/************************************************/
-/* Structures of the areas                      */
-/************************************************/
-struct BusVpdAreaStruct {
-    u8  Tag;
-    u8  LowLength;
-    u8  HighLength;
-};
-typedef struct BusVpdAreaStruct BusVpdArea;
-#define BUS_ENTRY_SIZE   3
-
-struct MfgVpdAreaStruct {
-    u16 Tag;
-    u8  TagLength;
-};
-typedef struct MfgVpdAreaStruct MfgVpdArea;
-#define MFG_ENTRY_SIZE   3
-
-struct SlotMapFormatStruct {
-    u16 Tag;
-    u8  TagLength;
-    u16 Format;
-};
-
-struct FrameIdMapStruct{
-    u16 Tag;
-    u8  TagLength;
-    u8  FrameId;
-};
-typedef struct FrameIdMapStruct FrameIdMap;
-
-struct SlotMapStruct {
-    u8   AgentId;
-    u8   SecondaryAgentId;
-    u8   PhbId;
-    char CardLocation[3];
-    char Parms[8];
-    char Reserved[2];
-};
-typedef struct SlotMapStruct SlotMap;
-#define SLOT_ENTRY_SIZE   16
-
-/****************************************************************/
-/* Prototypes                                                   */
-/****************************************************************/
-static void  iSeries_Parse_Vpd(BusVpdArea*,    int, LocationData*);
-static void  iSeries_Parse_MfgArea(MfgVpdArea*,int, LocationData*);
-static void  iSeries_Parse_SlotArea(SlotMap*,  int, LocationData*);
-static void  iSeries_Parse_PhbId(BusVpdArea*,  int, LocationData*);
-
-/****************************************************************/
-/*                                                              */
-/*                                                              */
-/*                                                              */
-/****************************************************************/
-LocationData* iSeries_GetLocationData(struct pci_dev* PciDev) {
-    LocationData* LocationPtr = 0;
-    BusVpdArea*   BusVpdPtr   = 0;
-    int           BusVpdLen   = 0;
-    BusVpdPtr  = (BusVpdArea*)kmalloc(BUS_VPDSIZE, GFP_KERNEL);
-    BusVpdLen  = HvCallPci_getBusVpd(ISERIES_GET_LPAR_BUS(PciDev->bus->number),REALADDR(BusVpdPtr),BUS_VPDSIZE);
-    /* printk("PCI: VpdBuffer 0x%08X \n",(int)BusVpdPtr);          */
-    /***************************************************************/
-    /* Need to set Agent Id, Bus in location info before the call  */
-    /***************************************************************/
-    LocationPtr = (LocationData*)kmalloc(LOCATION_DATA_SIZE, GFP_KERNEL);
-    LocationPtr->Bus              = ISERIES_GET_LPAR_BUS(PciDev->bus->number);
-    LocationPtr->Board            = 0;
-    LocationPtr->FrameId          = 0;
-    iSeries_Parse_PhbId(BusVpdPtr,BusVpdLen,LocationPtr);
-    LocationPtr->Card             = PCI_SLOT(PciDev->devfn);
-    strcpy(LocationPtr->CardLocation,"Cxx");
-    LocationPtr->AgentId          = ISERIES_DECODE_DEVICE(PciDev->devfn);
-    LocationPtr->SecondaryAgentId = 0x10;
-    /* And for Reference only.                        */
-    LocationPtr->LinuxBus         = PciDev->bus->number;
-    LocationPtr->LinuxDevFn       = PciDev->devfn;
-    /***************************************************************/
-    /* Any data to process?                                        */
-    /***************************************************************/
-    if(BusVpdLen > 0) {
-	iSeries_Parse_Vpd(BusVpdPtr, BUS_VPDSIZE, LocationPtr);
-    }
-    else {
-	ISERIES_PCI_FR("No VPD Data....");
-    }
-    kfree(BusVpdPtr);
-
-    return LocationPtr;
-}
-/****************************************************************/
-/*                                                              */
-/****************************************************************/
-void  iSeries_Parse_Vpd(BusVpdArea* VpdData,int VpdLen, LocationData* LocationPtr) {
-    MfgVpdArea* MfgVpdPtr = 0;
-    int         BusTagLen = 0;
-    BusVpdArea* BusVpdPtr = VpdData;
-    int         BusVpdLen = VpdLen;
-    /*************************************************************/
-    /* Make sure this is what I think it is                      */
-    /*************************************************************/
-    if(BusVpdPtr->Tag != VpdIdStringTag) {            /*0x82     */
-	ISERIES_PCI_FR("Not 0x82 start.");
-	return;
-    }
-    BusTagLen  = (BusVpdPtr->HighLength*256)+BusVpdPtr->LowLength;
-    BusTagLen += BUS_ENTRY_SIZE;
-    BusVpdPtr  = (BusVpdArea*)((u32)BusVpdPtr+BusTagLen);
-    BusVpdLen -= BusTagLen;
-    /*************************************************************/
-    /* Parse the Data                                            */
-    /*************************************************************/
-    while(BusVpdLen > 0 ) {
-	BusTagLen = (BusVpdPtr->HighLength*256)+BusVpdPtr->LowLength;
-	/*********************************************************/
-	/* End of data Found                                     */
-	/*********************************************************/
-	if(BusVpdPtr->Tag == VpdEndOfAreaTag) {
-	    BusVpdLen = 0;		/* Done, Make sure       */
-	}
-	/*********************************************************/
-	/* Was Mfg Data Found                                    */
-	/*********************************************************/
-	else if(BusVpdPtr->Tag == VpdVendorAreaTag) {
-	    MfgVpdPtr = (MfgVpdArea*)((u32)BusVpdPtr+BUS_ENTRY_SIZE);
-	    iSeries_Parse_MfgArea(MfgVpdPtr,BusTagLen,LocationPtr);
-	}
-	/********************************************************/
-	/* On to the next tag.                                  */
-	/********************************************************/
-	if(BusVpdLen > 0) {
-	    BusTagLen += BUS_ENTRY_SIZE;
-	    BusVpdPtr  = (BusVpdArea*)((u32)BusVpdPtr+BusTagLen);
-	    BusVpdLen -= BusTagLen;
-	}
-    }
-}    
-
-/*****************************************************************/
-/* Parse the Mfg Area                                            */
-/*****************************************************************/
-void  iSeries_Parse_MfgArea(MfgVpdArea* VpdDataPtr,int VpdLen, LocationData* LocationPtr) {
-    SlotMap*    SlotMapPtr = 0;
-    u16         SlotMapFmt = 0;
-    int         MfgTagLen  = 0;
-    MfgVpdArea* MfgVpdPtr  = VpdDataPtr;
-    int         MfgVpdLen  = VpdLen;
-
-    /*************************************************************/
-    /* Parse Mfg Data                                            */
-    /*************************************************************/
-    while(MfgVpdLen > 0) {
-	MfgTagLen = MfgVpdPtr->TagLength;
-	if     (MfgVpdPtr->Tag == VpdFruFlag) {}	  /* FG  */
-	else if(MfgVpdPtr->Tag == VpdFruSerial) {}	  /* SN  */
-	else if(MfgVpdPtr->Tag == VpdAsmPartNumber){}     /* PN  */
-	/*********************************************************/
-	/* Frame ID                                              */
-	/*********************************************************/
-	if(MfgVpdPtr->Tag == VpdFruFrameId) {	        /* FI    */
-	    LocationPtr->FrameId = ((FrameIdMap*)MfgVpdPtr)->FrameId;
-	}
-	/*********************************************************/
-	/* Slot Map Format                                       */
-	/*********************************************************/
-	else if(MfgVpdPtr->Tag == VpdSlotMapFormat){       /* MF */
-	    SlotMapFmt = ((struct SlotMapFormatStruct*)MfgVpdPtr)->Format;
-        }  
-	/*********************************************************/
-	/* Slot Labels                                           */
-	/*********************************************************/
-	else if(MfgVpdPtr->Tag == VpdSlotMap){             /* SM */
- 	    if(SlotMapFmt == 0x1004) SlotMapPtr = (SlotMap*)((u32)MfgVpdPtr+MFG_ENTRY_SIZE+1);
- 	    else                     SlotMapPtr = (SlotMap*)((u32)MfgVpdPtr+MFG_ENTRY_SIZE);
-	    iSeries_Parse_SlotArea(SlotMapPtr,MfgTagLen, LocationPtr);
-	}
-	/*********************************************************/
-	/* Point to the next Mfg Area                            */
-	/* Use defined size, sizeof give wrong answer            */
-	/*********************************************************/
-	MfgTagLen += MFG_ENTRY_SIZE;
-	MfgVpdPtr  = (MfgVpdArea*)( (u32)MfgVpdPtr + MfgTagLen);
-	MfgVpdLen -= MfgTagLen;  
-    }	
-}
-/*****************************************************************/
-/* Look for "BUS" Tag to set the PhbId.                          */
-/*****************************************************************/
-void  iSeries_Parse_PhbId(BusVpdArea* VpdData,int VpdLen,LocationData* LocationPtr) {
-    int   PhbId   = 0xff;                    /* Not found flag   */
-    char* PhbPtr  = (char*)VpdData+3;        /* Skip over 82 tag */
-    int   DataLen = VpdLen;
-    while(DataLen > 0) {
-        if(*PhbPtr == 'B' && *(PhbPtr+1) == 'U' && *(PhbPtr+2) == 'S') {
-            if(*(PhbPtr+3) == ' ') PhbPtr += 4;/* Skip white spac*/	
-            else                   PhbPtr += 3;
-            if     (*PhbPtr == '0') PhbId = 0; /* Don't convert, */  
-            else if(*PhbPtr == '1') PhbId = 1; /* Sanity check   */
-            else if(*PhbPtr == '2') PhbId = 2; /*  values        */ 
-            DataLen = 0;                       /* Exit loop.     */ 
-        }
-    ++PhbPtr;
-    --DataLen;
-    }
-    LocationPtr->PhbId = PhbId;
-}
-/*****************************************************************/
-/* Parse the Slot Area                                           */
-/*****************************************************************/
-void  iSeries_Parse_SlotArea(SlotMap* MapPtr,int MapLen, LocationData* LocationPtr) {
-    int      SlotMapLen = MapLen;
-    SlotMap* SlotMapPtr = MapPtr;
-    /*************************************************************/
-    /* Parse Slot label until we find the one requrested         */
-    /*************************************************************/
-    while(SlotMapLen > 0) {
-	if(SlotMapPtr->AgentId          == LocationPtr->AgentId && 
-	   SlotMapPtr->SecondaryAgentId == LocationPtr->SecondaryAgentId) {
-	    /*****************************************************/
-            /* If Phb wasn't found, grab the first one found.    */ 
-	    /*****************************************************/
-            if(LocationPtr->PhbId == 0xff) LocationPtr->PhbId = SlotMapPtr->PhbId; 
-            if( SlotMapPtr->PhbId == LocationPtr->PhbId ) {
-	    /*****************************************************/
-	    /* Found what we were looking for, extract the data. */
-	    /*****************************************************/
-	        memcpy(&LocationPtr->CardLocation,&SlotMapPtr->CardLocation,3);
-	        LocationPtr->CardLocation[3]  = 0;  /* Null terminate*/
-	        SlotMapLen = 0;			/* We are done   */
-            }
-	}
-	/*********************************************************/
-	/* Point to the next Slot                                */
-	/* Use defined size, sizeof may give wrong answer        */
-	/*********************************************************/
-	SlotMapLen -= SLOT_ENTRY_SIZE;
-	SlotMapPtr = (SlotMap*)((u32)SlotMapPtr+SLOT_ENTRY_SIZE);
-    }	
-}
-/************************************************************************/
-/* Formats the device information.                                      */
-/* - Pass in pci_dev* pointer to the device.                            */
-/* - Pass in buffer to place the data.  Danger here is the buffer must  */
-/*   be as big as the client says it is.   Should be at least 128 bytes.*/
-/* Return will the length of the string data put in the buffer.         */
-/* Format:                                                              */
-/* PCI: Bus  0, Device 26, Vendor 0x12AE  iSeries: Bus  2, Device 34, Fr*/
-/* ame  1, Card  C10  Ethernet controller                               */
-/************************************************************************/
-int  iSeries_Device_Information(struct pci_dev* PciDev,char* Buffer, int BufferSize) {
-    LocationData*  LocationPtr;		/* VPD Information             */
-    char*          BufPtr  = Buffer;
-    int            LineLen = 0;
-    if(BufferSize >= 128) {
-	LineLen =  sprintf(BufPtr+LineLen,"PCI: Bus%3d, Device%3d, Vendor %04X  ",
-			   PciDev->bus->number, PCI_SLOT(PciDev->devfn),PciDev->vendor);
-
-	LocationPtr = iSeries_GetLocationData(PciDev);
-	LineLen += sprintf(BufPtr+LineLen,"iSeries: Bus%3d, Device%3d, Frame%3d, Card %4s  ",
-			   LocationPtr->Bus,LocationPtr->AgentId,
-			   LocationPtr->FrameId,LocationPtr->CardLocation);
-	kfree(LocationPtr);
-
-	if(pci_class_name(PciDev->class >> 8) == 0) {
-	    LineLen += sprintf(BufPtr+LineLen,"0x%04X  ",(int)(PciDev->class >> 8));
-	}
-	else {
-	    LineLen += sprintf(BufPtr+LineLen,"%s",pci_class_name(PciDev->class >> 8) );
-	}
-    }
-    return LineLen;
-}
diff -Nru a/arch/ppc/iSeries/iSeries_fixup.c b/arch/ppc/iSeries/iSeries_fixup.c
--- a/arch/ppc/iSeries/iSeries_fixup.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,255 +0,0 @@
-/************************************************************************/
-/* This module supports the iSeries PCI bus device detection            */
-/* Copyright (C) 20yy  <Robert L Holtorf> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, December 13, 2000 by Wayne Holm                           */ 
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <linux/pci.h>
-#include <linux/ide.h>
-#include <asm/pci-bridge.h>
-#include <asm/iSeries/HvCallXm.h>
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/iSeries_fixup.h>
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/iSeries_irq.h>
-#include <asm/iSeries/iSeries_dma.h>
-#include <asm/iSeries/iSeries_VpdInfo.h>
-#include <asm/iSeries/iSeries_pci.h>
-#include "iSeries_IoMmTable.h"
-#include "iSeries_pci.h"
-
-
-
-unsigned int __init iSeries_scan_slot(struct pci_dev* temp_dev,
-					   u16 hvBus, u8 slotSubBus, u8 maxAgents)
-{
-    u8 hvIdSel, hvFunction, hvAgentId;
-    u64 hvRc = 0;
-    u64 noConnectRc = 0xFFFF;
-    HvAgentId slotAgentId;
-    int irq;
-
-    slotAgentId = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(slotSubBus), ISERIES_GET_FUNCTION_FROM_SUBBUS(slotSubBus));
-    irq = iSeries_allocate_IRQ(hvBus, 0, slotAgentId);
-    for (hvIdSel = 1; hvIdSel <= maxAgents; ++hvIdSel) {
-	/* Connect all functions of any device found.  However, only call pci_scan_slot
-	   once for each idsel.  pci_scan_slot handles multifunction devices appropriately */
-	for (hvFunction = 0; hvFunction < 8 && hvRc == 0; ++hvFunction) {
-	    hvAgentId = ISERIES_PCI_AGENTID(hvIdSel, hvFunction);
-	    hvRc = HvCallXm_connectBusUnit(hvBus, slotSubBus, hvAgentId, irq);
-	    if (hvRc == 0) {
-		noConnectRc = 0;
-		HvCallPci_configStore8(hvBus, slotSubBus, hvAgentId, PCI_INTERRUPT_LINE, irq);  // Store the irq in the interrupt line register of the function config space
-	    }
-	}
-	if (noConnectRc == 0) {
-	    /* This assumes that the node slot is always on the primary bus! */
-	    temp_dev->devfn = ISERIES_ENCODE_SUBBUS(ISERIES_GET_DEVICE_FROM_SUBBUS(slotSubBus),
-						     ISERIES_GET_FUNCTION_FROM_SUBBUS(slotSubBus),
-						     0);
-	    iSeries_assign_IRQ(irq, hvBus, 0, slotAgentId);
-	    pci_scan_slot(temp_dev);
-	}
-    }
-    return 0;
-}
-	
-void __init iSeries_fixup_bus(struct pci_bus* bus)
-{
-    struct pci_dev temp_dev;
-    struct pci_controller* hose;
-    u16 hvBus;
-    u8 hvSubBus, hvIdSel, hvFunction, hvAgentId, maxAgents, irq;
-    u64 hvRc, devInfoRealAdd, bridgeInfoRealAdd;
-    struct HvCallPci_DeviceInfo* devInfo;
-    struct HvCallPci_BridgeInfo* bridgeInfo;
-    u64 noConnectRc = 0xFFFF;
-
-    hose = (struct pci_controller*)(bus->sysdata);
-    /* Get the hv bus number from the hose arch_data */
-    hvBus = ISERIES_GET_HOSE_HV_BUSNUM(hose);
-    /* Initialize the global bus number map for this bus */
-    iSeries_GlobalBusMap[bus->number][_HVBUSNUMBER_] = hvBus;
-    iSeries_GlobalBusMap[bus->number][_HVSUBBUSNUMBER_] = 0;
-    maxAgents = 7;
-    /* If not a primary bus, set the hypervisor subBus number of this bus into the map */
-    if (bus->parent != NULL) { 
-	bridgeInfo = kmalloc(sizeof(*bridgeInfo), GFP_KERNEL);
-	/* Perform linux virtual address to iSeries PLIC real address translation */
-	bridgeInfoRealAdd = virt_to_absolute((u32)bridgeInfo);
-	bridgeInfoRealAdd = bridgeInfoRealAdd | 0x8000000000000000;  
-	/* Find the Hypervisor address of the bridge which created this bus... */
-	if (ISERIES_IS_SUBBUS_ENCODED_IN_DEVFN(bus->self->devfn)) {  // This assumes that the bus passed to this function is connected to an EADS slot.  The subbus encoding algorithm only applies to bridge cards attached directly to EADS.  Future TODO is to allow for n levels of bridging.
-	    hvSubBus = ISERIES_DEVFN_DECODE_SUBBUS(bus->self->devfn);
-	    hvIdSel = 1;
-	}
-	else {
-	    /* The hose arch_data needs to map Linux bus number -> PHB bus/subBus number
-               Could also use a global table, might be cheaper for multiple PHBs */
-	    // hvSubBus = iSeries_GlobalBusMap[bus->parent->number][_HVSUBBUSNUMBER_];
-	    hvSubBus = 0;  // The bridge card devfn is not subbus encoded and is directly attached to the PCI primary bus.  Its subbus number is 0 and the card config space is accessed via type 0 config cycles.
-	    hvIdSel = PCI_SLOT(bus->self->devfn);
-	}
-	hvAgentId = ISERIES_PCI_AGENTID(hvIdSel, PCI_FUNC(bus->self->devfn));
-	/* Now we know the HV bus/subbus/agent of the bridge creating this bus,
-           go get the subbus number from HV */
-	hvRc = HvCallPci_getBusUnitInfo(hvBus, hvSubBus, hvAgentId,
-					bridgeInfoRealAdd, sizeof(*bridgeInfo));
-	if (hvRc != 0 || bridgeInfo->busUnitInfo.deviceType != HvCallPci_BridgeDevice) {
-	    kfree(bridgeInfo);
-	    // return -1;
-	}
-	iSeries_GlobalBusMap[bus->number][_HVSUBBUSNUMBER_] = bridgeInfo->subBusNumber;
-	maxAgents = bridgeInfo->maxAgents;
-	kfree(bridgeInfo);
-    }
-    /* Bus number mapping is complete, from here on cfgIos should result in HvCalls */
-
-    hvSubBus = iSeries_GlobalBusMap[bus->number][_HVSUBBUSNUMBER_];
-
-    devInfo = kmalloc(sizeof(*devInfo), GFP_KERNEL);
-    devInfoRealAdd = virt_to_absolute((u32)devInfo);
-    devInfoRealAdd = devInfoRealAdd | 0x8000000000000000;
-    memset(&temp_dev, 0, sizeof(temp_dev));
-    temp_dev.bus = bus;
-    temp_dev.sysdata = bus->sysdata;
-
-    for (hvIdSel=1; hvIdSel <= maxAgents; ++hvIdSel) {
-	hvRc = HvCallPci_getDeviceInfo(hvBus, hvSubBus, hvIdSel,
-				       devInfoRealAdd, sizeof(*devInfo));
-	if (hvRc == 0) {
-	    switch(devInfo->deviceType) {
-		case HvCallPci_NodeDevice:
-		    /* bridgeInfo = kmalloc(HvCallPci_MaxBusUnitInfoSize, GFP_KERNEL); */
-		    bridgeInfo = kmalloc(sizeof(*bridgeInfo), GFP_KERNEL);
-		    /* Loop through each node function to find usable bridges.  Scan
-		       the node bridge to create devices.  The devices will appear
-		       as if they were connected to the primary bus. */
-		    for (hvFunction=0; hvFunction < 8; ++hvFunction) {
-			hvAgentId = ISERIES_PCI_AGENTID(hvIdSel, hvFunction);
-			irq = 0;
-			/* Note: hvSubBus should always be 0 here! */
-			hvRc = HvCallXm_connectBusUnit(hvBus, hvSubBus, hvAgentId, irq);
-			if (hvRc == 0) {
-			    bridgeInfoRealAdd = virt_to_absolute((u32)bridgeInfo);
-			    bridgeInfoRealAdd = bridgeInfoRealAdd | 0x8000000000000000;
-			    hvRc = HvCallPci_getBusUnitInfo(hvBus, hvSubBus, hvAgentId,
-							    bridgeInfoRealAdd, sizeof(*bridgeInfo));
-			    if (hvRc == 0 && bridgeInfo->busUnitInfo.deviceType == HvCallPci_BridgeDevice)
-			    {
-				// scan any card plugged into this slot
-				iSeries_scan_slot(&temp_dev, hvBus, bridgeInfo->subBusNumber,
-						bridgeInfo->maxAgents);
-			    }
-			}
-		    }
-		    kfree(bridgeInfo);
-		    break;
-
-		case HvCallPci_MultiFunctionDevice:
-		    /* Attempt to connect each device function, then use architecture independent
-		       pci_scan_slot to build the device(s) */
-		    irq = bus->self->irq;  // Assume that this multi-function device is attached to a secondary bus.  Get the irq from the dev struct for the bus and pass to Hv on the function connects as well as write it into the interrupt line registers of each function
-		    for (hvFunction=0; hvFunction < 8 && hvRc == 0; ++hvFunction) {
-			hvAgentId = ISERIES_PCI_AGENTID(hvIdSel, hvFunction);
-			/* Try to connect each function. */
-			hvRc = HvCallXm_connectBusUnit(hvBus, hvSubBus, hvAgentId, irq);
-			if (hvRc == 0) {
-			    noConnectRc = 0;
-			    HvCallPci_configStore8(hvBus, hvSubBus, hvAgentId, PCI_INTERRUPT_LINE, irq);  // Store the irq in the interrupt line register of the function config space
-			}
-		    }
-		    if (noConnectRc == 0) {
-			noConnectRc = 0xFFFF;  // Reset to error value in case other multi-function devices are attached to this bus
-			// Note: using hvIdSel assumes this device is on a secondary bus!
-			temp_dev.devfn = PCI_DEVFN(hvIdSel, 0);
-			pci_scan_slot(&temp_dev);
-		    }
-		    break;
-
-		case HvCallPci_BridgeDevice:
-		case HvCallPci_IoaDevice:
-		    /* Single function devices, just try to connect and use pci_scan_slot to
-		       build the device */
-		    irq = bus->self->irq;
-		    hvAgentId = ISERIES_PCI_AGENTID(hvIdSel, 0);
-		    hvRc = HvCallXm_connectBusUnit(hvBus, hvSubBus, hvAgentId, irq);
-		    if (hvRc == 0) {
-			HvCallPci_configStore8(hvBus, hvSubBus, hvAgentId, PCI_INTERRUPT_LINE, irq);  // Store the irq in the interrupt line register of the device config space
-			// Note: using hvIdSel assumes this device is on a secondary bus!
-			temp_dev.devfn = PCI_DEVFN(hvIdSel, 0);
-			pci_scan_slot(&temp_dev);
-		    }
-		    break;
-
-		default :	/* Unrecognized device */
-		    break;
-
-	    };			/* end of switch */
-	}
-    }
-
-    kfree(devInfo);
-    // return 0;
-}
-/*  Initialize bar space base and limit addresses for each device in the tree   */
-void __init iSeries_fixup( void ) {
-    struct pci_dev *dev;
-    u8     LinuxBus, iSeriesBus, LastBusNumber;
-    char   DeviceInfoBuffer[256];
-
-    /*********************************************************/
-    /* PCI: Allocate Bars space for each device              */
-    /*********************************************************/
-    pci_for_each_dev(dev) {
-	iSeries_allocateDeviceBars(dev);
-    }
-    /*********************************************************/
-    /* Create the TCEs for each iSeries bus now that we know */
-    /* how many buses there are.  Need only create TCE for   */
-    /* for each iSeries bus.  Multiple linux buses could     */
-    /* be on the same iSeries bus.                       AHT */
-    /*********************************************************/
-    LastBusNumber = 0xFF;			/* Invalid   */
-    for( LinuxBus = 0; LinuxBus < 255; ++ LinuxBus) {
-	iSeriesBus = ISERIES_GET_LPAR_BUS(LinuxBus);
-	if(iSeriesBus == 0xFF) break;	        /* Done      */
-	else if(LastBusNumber != iSeriesBus ){	/* New Bus   */
-	    create_pci_bus_tce_table(iSeriesBus);
-	    LastBusNumber = iSeriesBus;		/* Remember  */
-	}
-    }
-    /*********************************************************/
-    /* List out all the PCI devices found... This will go    */
-    /* into the etc/proc/iSeries/pci info as well....        */
-    /* This is to help service figure out who is who......   */
-    /*********************************************************/
-    pci_for_each_dev(dev) {
-	struct resource* BarResource = &dev->resource[0];
-	iSeries_Device_Information(dev,DeviceInfoBuffer,256);
-	printk("%s\n",DeviceInfoBuffer);
-	printk("PCI: Bus%3d, Device%3d, %s at 0x%08x, irq %3d\n",
-	             dev->bus->number, PCI_SLOT(dev->devfn),dev->name,(int)BarResource->start,dev->irq);
-    }
-    /* */
-    iSeries_activate_IRQs();  // Unmask all device interrupts for assigned IRQs
-}
-
diff -Nru a/arch/ppc/iSeries/iSeries_irq.c b/arch/ppc/iSeries/iSeries_irq.c
--- a/arch/ppc/iSeries/iSeries_irq.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,256 +0,0 @@
-/************************************************************************/
-/* This module supports the iSeries PCI bus interrupt handling          */
-/* Copyright (C) 20yy  <Robert L Holtorf> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, December 13, 2000 by Wayne Holm                           */ 
-/* End Change Activity                                                  */
-/************************************************************************/
-
-#include <linux/pci.h>
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/threads.h>
-#include <linux/smp.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/bootmem.h>
-#include <linux/blk.h>
-#include <linux/ide.h>
-
-#include <linux/irq.h>
-#include <linux/spinlock.h>
-#include <linux/slab.h>
-
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/HvCallXm.h>
-#include <asm/iSeries/iSeries_irq.h>
-#include <asm/iSeries/XmPciLpEvent.h>
-
-
-hw_irq_controller iSeries_IRQ_handler = {
-    "iSeries irq controller",
-    iSeries_startup_IRQ,	/* startup */
-    iSeries_shutdown_IRQ,	/* shutdown */
-    iSeries_enable_IRQ,		/* enable */
-    iSeries_disable_IRQ,	/* disable */
-    NULL,			/* ack  */
-    iSeries_end_IRQ,		/* end  */
-    NULL			/* set_affinity */
-};
-
-
-struct iSeries_irqEntry {
-    u32 dsa;
-    struct iSeries_irqEntry* next;
-};
-
-struct iSeries_irqAnchor {
-    u8  valid : 1;
-    u8  reserved : 7;
-    u16  entryCount;
-    struct iSeries_irqEntry* head;
-};
-
-struct iSeries_irqAnchor iSeries_irqMap[NR_IRQS];
-
-void iSeries_init_irqMap(int irq);
-
-/*  This is called by init_IRQ.  set in ppc_md.init_IRQ by iSeries_setup.c */
-void __init iSeries_init_IRQ(void)
-{
-
-	int i;
-
-	for (i = 0; i < NR_IRQS; i++) {
-		irq_desc[i].handler = &iSeries_IRQ_handler;
-		irq_desc[i].status = 0;
-		irq_desc[i].status |= IRQ_DISABLED;
-		irq_desc[i].depth = 1;
-		iSeries_init_irqMap(i);
-	}
-
-	/* Register PCI event handler and open an event path */
-	XmPciLpEvent_init();
-
-	return;
-}
-
-/*  Called by iSeries_init_IRQ */
-void __init iSeries_init_irqMap(int irq) {
-   /* Prevent IRQs 0 and 255 from being used.  IRQ 0 appears in
-      uninitialized devices.  IRQ 255 appears in the PCI interrupt
-      line register if a PCI error occurs */
-    iSeries_irqMap[irq].valid = (irq == 0 || irq == 255)? 0 : 1;
-    iSeries_irqMap[irq].entryCount = 0;
-    iSeries_irqMap[irq].head = NULL;
-}
-
-/* This is called out of iSeries_scan_slot to allocate an IRQ for an EADS slot */
-int __init iSeries_allocate_IRQ(HvBusNumber busNumber, HvSubBusNumber subBusNumber, HvAgentId deviceId) {
-
-    u8 idsel = (deviceId >> 4);
-    u8 function = deviceId & 0x0F;
-    int irq = ((((busNumber-1)*16 + (idsel-1)*8 + function)*9/8) % 254) + 1; 
-    return irq;
-}
-
-/* This is called out of iSeries_scan_slot to assign the EADS slot to its IRQ number */
-int __init iSeries_assign_IRQ(int irq, HvBusNumber busNumber, HvSubBusNumber subBusNumber, HvAgentId deviceId) {
-
-    int rc;
-    u32 dsa = (busNumber << 16) | (subBusNumber << 8) | deviceId;
-    struct iSeries_irqEntry* newEntry;
-    unsigned long flags;
-
-    if (irq < 0 || irq >= NR_IRQS)
-	return -1;
-
-    newEntry = kmalloc(sizeof(*newEntry), GFP_KERNEL);
-    if (newEntry == NULL)
-	return -ENOMEM;
-    newEntry->dsa = dsa;
-    newEntry->next = NULL;
-
-    /* Probably not necessary to lock the irq since allocation is only
-       done during buswalk, but it should not hurt anything except a little
-       performance */
-    spin_lock_irqsave(&irq_desc[irq].lock, flags);
-
-    if (iSeries_irqMap[irq].valid) {
-        /* Push the new element onto the irq stack */
-	newEntry->next = iSeries_irqMap[irq].head;
-	iSeries_irqMap[irq].head = newEntry;
-	++iSeries_irqMap[irq].entryCount;
-	rc = 0;
-    }
-    else
-	rc = -1;
-
-    spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
-
-    if (rc != 0 && newEntry)
-	kfree(newEntry);
-
-    return rc;
-
-}
-
-
-/* This is called by iSeries_activate_IRQs */
-unsigned int iSeries_startup_IRQ(unsigned int irq) {
-    struct iSeries_irqEntry* entry;
-    u32 bus, subBus, deviceId, function, mask;
-
-    /* irq should be locked by the caller */
-
-    for(entry=iSeries_irqMap[irq].head; entry!=NULL; entry=entry->next) {
-	bus = (entry->dsa >> 16) & 0xFFFF;
-	subBus = (entry->dsa >> 8) & 0xFF;
-	deviceId = entry->dsa & 0xFF;
-	function = deviceId & 0x0F;
-	/* Link the IRQ number to the bridge */
-	HvCallXm_connectBusUnit(bus, subBus, deviceId, irq);
-        /* Unmask bridge interrupts in the FISR */
-	mask = 0x01010000 << function;
-	HvCallPci_unmaskFisr(bus, subBus, deviceId, mask);
-    }
-
-    return 0;
-}
-
-/* This is called out of iSeries_fixup to
-   activate interrupt generation for usable slots */
-void __init iSeries_activate_IRQs() {
-    int irq;
-    unsigned long flags;
-
-    for (irq=0; irq < NR_IRQS; irq++) {
-	spin_lock_irqsave(&irq_desc[irq].lock, flags);
-	irq_desc[irq].handler->startup(irq);
-	spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
-    }
-
-}
-
-/*  this is not called anywhere currently */
-void iSeries_shutdown_IRQ(unsigned int irq) {
-    struct iSeries_irqEntry* entry;
-    u32 bus, subBus, deviceId, function, mask;
-
-    /* irq should be locked by the caller */
-
-    for(entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {
-	bus = (entry->dsa >> 16) & 0xFFFF;
-	subBus = (entry->dsa >> 8) & 0xFF;
-	deviceId = entry->dsa & 0xFF;
-	function = deviceId & 0x0F;
-	/* Invalidate the IRQ number in the bridge */
-	HvCallXm_connectBusUnit(bus, subBus, deviceId, 0);
-        /* Mask bridge interrupts in the FISR */
-	mask = 0x01010000 << function;
-	HvCallPci_maskFisr(bus, subBus, deviceId, mask);
-    }
-
-}
-
-
-/* This will be called by device drivers (via disable_IRQ to disable
-   INTA in the bridge interrupt status register */
-void iSeries_disable_IRQ(unsigned int irq) {
-    struct iSeries_irqEntry* entry;
-    u32 bus, subBus, deviceId, mask;
-
-    /* The IRQ has already been locked by the caller */
-
-    for(entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {
-	bus = (entry->dsa >> 16) & 0xFFFF;
-	subBus = (entry->dsa >> 8) & 0xFF;
-	deviceId = entry->dsa & 0xFF;
-        /* Mask secondary INTA   */
-	mask = 0x80000000;
-	HvCallPci_maskInterrupts(bus, subBus, deviceId, mask);
-    }
-}
-
-/* This will be called by device drivers (via enable_IRQ to enable
-   INTA in the bridge interrupt status register */
-void iSeries_enable_IRQ(unsigned int irq) {
-    struct iSeries_irqEntry* entry;
-    u32 bus, subBus, deviceId, mask;
-
-    /* The IRQ has already been locked by the caller */
-
-    for(entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {
-	bus = (entry->dsa >> 16) & 0xFFFF;
-	subBus = (entry->dsa >> 8) & 0xFF;
-	deviceId = entry->dsa & 0xFF;
-	/* Unmask secondary INTA */
-	mask = 0x80000000;
-	HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask);
-    }
-}
-
-/* Need to define this so ppc_irq_dispatch_handler will NOT call
-   enable_IRQ at the end of interrupt handling.  However, this
-   does nothing because there is not enough information provided
-   to do the EOI HvCall.  This is done by XmPciLpEvent.c */
-void iSeries_end_IRQ(unsigned int irq) {
-}
-
diff -Nru a/arch/ppc/iSeries/iSeries_ksyms.c b/arch/ppc/iSeries/iSeries_ksyms.c
--- a/arch/ppc/iSeries/iSeries_ksyms.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,82 +0,0 @@
-/* File iSeries_ksyms.c created by root on Tue Feb 13 2001. */
-
-/* Change Activity: */
-/* End Change Activity */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <asm/iSeries/iSeries_dma.h>
-#include <asm/iSeries/mf.h>
-#include <asm/iSeries/HvCallSc.h>
-#include <asm/iSeries/HvLpEvent.h>
-#include <asm/iSeries/Naca.h>
-#include <asm/iSeries/iSeries_proc.h>
-#include <asm/iSeries/ItLpNaca.h>
-#include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/iSeries_io.h>
-#include <asm/iSeries/iSeries_FlightRecorder.h>
-#include <asm/iSeries/iSeries_pci.h>
-#include <asm/iSeries/iSeries_VpdInfo.h>
-#include <asm/delay.h> 
-
-EXPORT_SYMBOL(HvLpEvent_registerHandler);
-EXPORT_SYMBOL(HvLpEvent_unregisterHandler);
-EXPORT_SYMBOL(HvLpEvent_openPath);
-EXPORT_SYMBOL(HvLpEvent_closePath);
-
-EXPORT_SYMBOL(HvCall1);
-EXPORT_SYMBOL(HvCall2);
-EXPORT_SYMBOL(HvCall3);
-EXPORT_SYMBOL(HvCall4);
-EXPORT_SYMBOL(HvCall5);
-EXPORT_SYMBOL(HvCall6);
-EXPORT_SYMBOL(HvCall7);
-EXPORT_SYMBOL(HvCall0);
-EXPORT_SYMBOL(HvCall0Ret16);
-EXPORT_SYMBOL(HvCall1Ret16);
-EXPORT_SYMBOL(HvCall2Ret16);
-EXPORT_SYMBOL(HvCall3Ret16);
-EXPORT_SYMBOL(HvCall4Ret16);
-EXPORT_SYMBOL(HvCall5Ret16);
-EXPORT_SYMBOL(HvCall6Ret16);
-EXPORT_SYMBOL(HvCall7Ret16);
-
-EXPORT_SYMBOL(HvLpConfig_getLpIndex_outline);
-EXPORT_SYMBOL(virt_to_absolute_outline);
-
-EXPORT_SYMBOL(mf_allocateLpEvents);
-EXPORT_SYMBOL(mf_deallocateLpEvents);
-
-EXPORT_SYMBOL(iSeries_proc_callback);
-
-
-#ifdef CONFIG_PCI
-EXPORT_SYMBOL(pci_map_single);
-EXPORT_SYMBOL(pci_unmap_single);
-
-EXPORT_SYMBOL(iSeries_Readb);
-EXPORT_SYMBOL(iSeries_Readw);
-EXPORT_SYMBOL(iSeries_Readl);
-EXPORT_SYMBOL(iSeries_Writeb);
-EXPORT_SYMBOL(iSeries_Writew);
-EXPORT_SYMBOL(iSeries_Writel);
-
-EXPORT_SYMBOL(iSeries_memcpy_fromio);
-EXPORT_SYMBOL(iSeries_memcpy_toio);
-
-EXPORT_SYMBOL(iSeries_GetLocationData);
-
-EXPORT_SYMBOL(iSeries_Set_PciTraceFlag);
-EXPORT_SYMBOL(iSeries_Get_PciTraceFlag);
-
-EXPORT_SYMBOL(iSeries_Device_Reset_NoIrq);
-EXPORT_SYMBOL(iSeries_Device_Reset_Generic);
-EXPORT_SYMBOL(iSeries_Device_Reset);
-EXPORT_SYMBOL(iSeries_Device_RestoreConfigRegs);
-EXPORT_SYMBOL(iSeries_Device_SaveConfigRegs);
-EXPORT_SYMBOL(iSeries_Device_ToggleReset);
-#endif
-
-
-  
diff -Nru a/arch/ppc/iSeries/iSeries_pci.c b/arch/ppc/iSeries/iSeries_pci.c
--- a/arch/ppc/iSeries/iSeries_pci.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,587 +0,0 @@
-/************************************************************************/
-/* File iSeries_pci.c created by Allan Trautman on Tue Jan  9 2001.     */
-/************************************************************************/
-/* This code supports the pci interface on the IBM iSeries systems.     */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, Jan 9, 2001                                               */
-/*   August, 10, 2001  Added PCI Retry code.                            */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-
-/************************************************************************/
-/* Arch specific's                                                      */
-/************************************************************************/
-#include <asm/io.h>                /* Has Io Instructions.              */
-#include <asm/iSeries/iSeries_io.h>
-#include <asm/pci-bridge.h>
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/mf.h>
-#include <asm/iSeries/iSeries_proc.h>
-#include <asm/iSeries/iSeries_FlightRecorder.h>
-#include <asm/iSeries/iSeries_VpdInfo.h>
-#include "iSeries_IoMmTable.h"
-#include "iSeries_pci.h"
-
-extern int panic_timeout;		       /* Panic Timeout reference      */
-
-/************************************************************************/
-/* /proc/iSeries/pci initialization.                                    */
-/************************************************************************/
-extern void iSeries_pci_proc_init(struct proc_dir_entry *iSeries_proc);
-       void iSeries_pci_IoError(char* OpCode,iSeries_Device* Device);
-
-/************************************************************************/
-/* PCI Config Space Access functions for IBM iSeries Systems            */ 
-/*                                                                      */
-/* Modeled after the IBM Python                                         */
-/* int pci_read_config_word(struct pci_dev*, int Offset, u16* ValuePtr) */
-/************************************************************************/
-/* Note: Normal these routines are defined by a macro and branch        */
-/* table is created and stuffed in the pci_bus structure.               */
-/* The following is for reference, if it was done this way.  However for*/
-/* the first time out, the routines are individual coded.               */ 
-/************************************************************************/
-/* This is the low level architecture depend interface routines.        */     
-/* 1. They must be in specific order, see <linux/pci.h> for base        */
-/*    structure.                                                        */
-/* 2. The code in not inline here, it calls specific routines in        */
-/*    this module and HvCalls                                           */
-/* 3. The common convention is to put a pointer to the structure in     */
-/*    pci_bus->sysdata.                                                 */
-/* 4. Direct call is the same as in <linux/pci.h                        */  
-/************************************************************************/
-int iSeries_pci_read_config_byte(  struct pci_dev* PciDev, int Offset, u8* ValuePtr) {
-    iSeries_Device Device;
-    build_iSeries_Device(&Device, PciDev);
-    if(Device.BusNumber == 0xFF) Device.RCode = 0x301;	/* Trap out invalid bus. */
-    else {
-	Device.RCode = HvCallPci_configLoad8(Device.BusNumber, Device.SubBus, Device.DevFn, Offset, ValuePtr);
-	if(Device.RCode != 0 || PciTraceFlag > 0) {
-	    sprintf(PciFrBuffer,"RCB: %02X,%02X,%02X,%04X Rtn: %04X,%02X",
-		                 Device.BusNumber, Device.SubBus, Device.DevFn, Offset,
-		                 Device.RCode, *ValuePtr);
-	    ISERIES_PCI_FR(PciFrBuffer);
-	    if(Device.RCode != 0 ) printk("PCI: I/O Error %s",PciFrBuffer);
-	}
-    }
-    return Device.RCode;
-}                                                                            
-int iSeries_pci_read_config_word(  struct pci_dev* PciDev, int Offset, u16* ValuePtr) {
-    iSeries_Device Device;
-    build_iSeries_Device(&Device, PciDev);
-    if(Device.BusNumber == 0xFF) Device.RCode = 0x301;	/* Trap out invalid bus. */
-    else {
-	Device.RCode = HvCallPci_configLoad16(Device.BusNumber, Device.SubBus, Device.DevFn, Offset, ValuePtr);
-	if(Device.RCode != 0 || PciTraceFlag > 0) {
-	    sprintf(PciFrBuffer,"RCW: %02X,%02X,%02X,%04X Rtn: %04X,%04X",
-		                 Device.BusNumber, Device.SubBus, Device.DevFn, Offset,
-		                 Device.RCode, *ValuePtr);
-	    ISERIES_PCI_FR(PciFrBuffer);
-	    if(Device.RCode != 0 ) printk("PCI: I/O Error %s",PciFrBuffer);
-	}
-    }
-    return Device.RCode;
-}                                                                            
-int iSeries_pci_read_config_dword( struct pci_dev* PciDev, int Offset, u32* ValuePtr) {
-    iSeries_Device Device;
-    build_iSeries_Device(&Device, PciDev);
-    if(Device.BusNumber == 0xFF) Device.RCode = 0x301;	/* Trap out invalid bus. */
-    else {
-	Device.RCode = HvCallPci_configLoad32(Device.BusNumber, Device.SubBus, Device.DevFn, Offset, ValuePtr);
-	if(Device.RCode != 0 || PciTraceFlag > 0) {
-	    sprintf(PciFrBuffer,"RCL: %02X,%02X,%02X,%04X Rtn: %04X,%08X",
-		                 Device.BusNumber, Device.SubBus, Device.DevFn, Offset,
-		                 Device.RCode, *ValuePtr);
-	    ISERIES_PCI_FR(PciFrBuffer);
-	    if(Device.RCode != 0 ) printk("PCI: I/O Error %s",PciFrBuffer);
-	}
-    }
-    return Device.RCode;
-}                                                                            
-int iSeries_pci_write_config_byte( struct pci_dev* PciDev, int Offset,  u8  Value) {
-    iSeries_Device Device;
-    build_iSeries_Device(&Device, PciDev);
-    if(Device.BusNumber == 0xFF) Device.RCode = 0x301;	/* Trap out invalid bus. */
-    else {
-	Device.RCode = HvCallPci_configStore8(Device.BusNumber, Device.SubBus, Device.DevFn, Offset, Value);
-	if(Device.RCode != 0 || PciTraceFlag > 0) {
-	    sprintf(PciFrBuffer,"WCB: %02X,%02X,%02X,%04X Rtn: %04X,%02X",
-		                 Device.BusNumber, Device.SubBus, Device.DevFn, Offset,
-		                 Device.RCode, Value);
-	    ISERIES_PCI_FR(PciFrBuffer);
-	    if(Device.RCode != 0 ) printk("PCI: I/O Error %s",PciFrBuffer);
-	}
-    }
-    return Device.RCode;
-}                                                                            
-int iSeries_pci_write_config_word( struct pci_dev* PciDev, int Offset, u16  Value) {
-    iSeries_Device Device;
-    build_iSeries_Device(&Device, PciDev);
-    if(Device.BusNumber == 0xFF) Device.RCode = 0x301;	/* Trap out invalid bus. */
-    else {
-	Device.RCode = HvCallPci_configStore16(Device.BusNumber, Device.SubBus, Device.DevFn, Offset, Value);
-	if(Device.RCode != 0 || PciTraceFlag > 0) {
-	    sprintf(PciFrBuffer,"WCW: %02X,%02X,%02X,%04X Rtn: %04X,%04X",
-		                 Device.BusNumber, Device.SubBus, Device.DevFn, Offset,
-		                 Device.RCode, Value);
-	    ISERIES_PCI_FR(PciFrBuffer);
-	    if(Device.RCode != 0 ) printk("PCI: I/O Error %s",PciFrBuffer);
-	}
-    }
-    return Device.RCode;
-}                                                                            
-int iSeries_pci_write_config_dword(struct pci_dev* PciDev, int Offset, u32  Value) {
-    iSeries_Device Device;
-    build_iSeries_Device(&Device, PciDev);
-    if(Device.BusNumber == 0xFF) Device.RCode = 0x301;	/* Trap out invalid bus. */
-    else {
-	Device.RCode = HvCallPci_configStore32(Device.BusNumber, Device.SubBus, Device.DevFn, Offset, Value);
-	if(Device.RCode != 0 || PciTraceFlag > 0) {
-	    sprintf(PciFrBuffer,"WCL: %02X,%02X,%02X,%04X Rtn: %04X,%08X",
-		                 Device.BusNumber, Device.SubBus, Device.DevFn, Offset,
-		                 Device.RCode, Value);
-	    ISERIES_PCI_FR(PciFrBuffer);
-	    if(Device.RCode != 0 ) printk("PCI: I/O Error %s",PciFrBuffer);
-	}
-    }
-    return Device.RCode;
-}                                                                            
-/************************************************************************/
-/* Branch Table                                                         */
-/************************************************************************/
-struct pci_ops iSeries_pci_ops = {
-	iSeries_pci_read_config_byte,
-	iSeries_pci_read_config_word,
-	iSeries_pci_read_config_dword,
-	iSeries_pci_write_config_byte,
-	iSeries_pci_write_config_word,
-	iSeries_pci_write_config_dword
-};
-
-/************************************************************************/
-/* Dump the device info into the Flight Recorder                        */
-/* Call should have 3 char text to prefix FR Entry                      */
-/************************************************************************/
-void iSeries_DumpDevice(char* Text, iSeries_Device* Device) {
-	sprintf(PciFrBuffer,"%s:%02X%02X%02X %04X",Text,Device->BusNumber,Device->SubBus,Device->DevFn,Device->RCode);
-    ISERIES_PCI_FR(PciFrBuffer);
-    if(Device->BarNumber != 0xFF) {
-	sprintf(PciFrBuffer,"BAR:%02X %04X    ",Device->BarNumber,Device->BarOffset);
-	ISERIES_PCI_FR(PciFrBuffer);
-    }
-    if(Device->RCode != 0) {
-	/*****************************************************************/
-	/* PCI I/O ERROR RDL: Bus: 0x01 Device: 0x06 ReturnCode: 0x000B  */
-	/*****************************************************************/
-	printk("PCI: I/O ERROR %s: Bus: 0x%02X Device: 0x%02X ReturnCode: 0x%04X\n",
-	        Text,Device->PciDevPtr->bus->number,Device->PciDevPtr->devfn,Device->RCode);
-    }
-}
-
-int IoCounts    = 0;
-int RetryCounts = 0;
-int IoRetry     = 0;
-
-/************************************************************************
- * Check Return Code
- * -> On Failure, print and log information.
- *    Increment Retry Count, if exceeds max, panic partition.
- * -> If in retry, print and log success 
- ************************************************************************
- * PCI: ReadL: I/O Error( 0): 0x1234
- * PCI: Device..: 17:38.10  Bar: 0x00  Offset 0018
- * PCI: Device..: 17:38.10  Retry( 1) Operation ReadL:
- * PCI: Retry Successful on Device: 17:38.10
- ************************************************************************/
-int  CheckReturnCode(char* TextHdr, iSeries_Device* Device) {
-	++IoCounts;
-	if(Device->RCode != 0)  {
-
-		sprintf(PciFrBuffer,"%s: I/O Error(%2d): 0x%04X\n",	TextHdr, IoRetry,Device->RCode);
-		ISERIES_PCI_FR(PciFrBuffer);
-		printk("PCI: %s",PciFrBuffer);
-
-		sprintf(PciFrBuffer,"Device..: %02X:%02X.%02X  Bar: 0x%02X  Offset %04X\n",
-			                         Device->BusNumber, Device->SubBus, Device->DevFn,
-		                              Device->BarNumber, Device->BarOffset); 
-		ISERIES_PCI_FR(PciFrBuffer);
-		printk("PCI: %s",PciFrBuffer);
-
-		/* Bump the retry and check for max. */
-		++RetryCounts;
-		++IoRetry;
-
-		/* Retry Count exceeded or RIO Bus went down. */
-		if(IoRetry > 7 || Device->RCode == 0x206) {
-			mf_displaySrc(0xB6000103);
-			panic_timeout = 0; 
-			panic("PCI: Hardware I/O Error, SRC B6000103, Automatic Reboot Disabled.");
-		}
-		else {
-			sprintf(PciFrBuffer,"Device..: %02X:%02X.%02X  Retry(%2d) Operation: %s\n",
-			                         Device->BusNumber, Device->SubBus, Device->DevFn,
-			                         IoRetry,TextHdr);
-			ISERIES_PCI_FR(PciFrBuffer);
-			printk("PCI: %s\n",PciFrBuffer);
-		}
-	}
-	else {
-		if(IoRetry > 0 ) {
-			sprintf(PciFrBuffer,"Retry Successful on Device: %02X:%02X.%02X\n",
-			                         Device->BusNumber, Device->SubBus, Device->DevFn);
-			ISERIES_PCI_FR(PciFrBuffer);
-			printk("PCI: %s\n",PciFrBuffer);
-		}
-	}
-	return Device->RCode; 
-}
-
-/************************************************************************/
-/* Read MM I/O Instructions for the iSeries                             */
-/* On MM I/O error, all ones are returned and iSeries_pci_IoError is cal*/
-/* else, data is returned in big Endian format.                         */
-/************************************************************************/
-/* iSeries_Readb = Read Byte  ( 8 bit)                                  */
-/* iSeries_Readw = Read Word  (16 bit)                                  */
-/* iSeries_Readl = Read Long  (32 bit)                                  */
-/************************************************************************/
-u8   iSeries_Readb(u32* IoAddress)	{
-	iSeries_Device Device;
-	u8             IoData;
-	u8             Data   = -1;
-	IoRetry = 0;
-	if(build_iSeries_Device_From_IoAddress(&Device, IoAddress) == 0) {
-		do {
-			Device.RCode = HvCallPci_barLoad8 (Device.BusNumber, Device.SubBus,Device.DevFn,
-   	     	                                   Device.BarNumber, Device.BarOffset, &IoData);
-        		Data = IoData;
-			if(Device.RCode != 0) CheckReturnCode("ReadB",&Device);
-		} while(Device.RCode != 0); 
-    }
-	return Data;
-}
-u16 iSeries_Readw(u32* IoAddress)	{
-	iSeries_Device Device;
-	u16            IoData;
-    	u16            Data   = -1;
-	IoRetry = 0;
-	if(build_iSeries_Device_From_IoAddress(&Device, IoAddress) == 0) {
-		do {
-        		Device.RCode = HvCallPci_barLoad16(Device.BusNumber, Device.SubBus,Device.DevFn,
-    	     	                                   Device.BarNumber, Device.BarOffset, &IoData);
-			Data = swab16(IoData); 
-			if(Device.RCode != 0) CheckReturnCode("ReadW",&Device);
-		} while(Device.RCode != 0); 
-	}
-	return Data;
-}
-u32 iSeries_Readl(u32* IoAddress)	{
-    iSeries_Device Device;
-	u32            Data   = -1;
-	u32            IoData;          
-	IoRetry = 0;
-	if(build_iSeries_Device_From_IoAddress(&Device, IoAddress) == 0) {
-		IoRetry = 0;
-		do {
-			Device.RCode = HvCallPci_barLoad32(Device.BusNumber, Device.SubBus,Device.DevFn,
-                                                   Device.BarNumber, Device.BarOffset, &IoData);
-			Data = swab32(IoData);
-			if(Device.RCode != 0) CheckReturnCode("ReadL",&Device);
-		} while(Device.RCode != 0); 
-	}
-	return Data;
-}
-/************************************************************************/
-/* Write MM I/O Instructions for the iSeries                            */
-/* On MM I/O error, iSeries_pci_IoError is called                       */
-/* Data is in big Endian format.                                        */
-/************************************************************************/
-/* iSeries_Writeb = Write Byte (8 bit)                                  */
-/* iSeries_Writew = Write Word(16 bit)                                  */
-/* iSeries_Writel = Write Long(32 bit)                                  */
-/************************************************************************/
-void iSeries_Writeb(u8  Data,u32* IoAddress) {
-	iSeries_Device Device;
-	u8             IoData = Data;
-	IoRetry = 0;
-	if(build_iSeries_Device_From_IoAddress(&Device, IoAddress) == 0) {
-		do {
-			Device.RCode = HvCallPci_barStore8 (Device.BusNumber, Device.SubBus,Device.DevFn,
-                                                  Device.BarNumber, Device.BarOffset, IoData);
-			if(Device.RCode != 0) CheckReturnCode("WrteB",&Device);
-		} while(Device.RCode != 0); 
-    }
-}
-void iSeries_Writew(u16 Data,u32* IoAddress)	{
-	iSeries_Device Device;
-	u16            IoData = swab16(Data);
-	IoRetry = 0;
-	if(build_iSeries_Device_From_IoAddress(&Device, IoAddress) == 0) {
-		do {
-			Device.RCode = HvCallPci_barStore16(Device.BusNumber, Device.SubBus,Device.DevFn,
-     	                                       Device.BarNumber, Device.BarOffset, IoData);
-			if(Device.RCode != 0) CheckReturnCode("WrteW",&Device);
-		} while(Device.RCode != 0); 
-    	}
-}
-void iSeries_Writel(u32 Data,u32* IoAddress)     {
-	iSeries_Device Device;
-	u32            IoData = swab32(Data);
-	IoRetry = 0;
-	if(build_iSeries_Device_From_IoAddress(&Device, IoAddress) == 0) {
-		do {
-			Device.RCode = HvCallPci_barStore32(Device.BusNumber, Device.SubBus,Device.DevFn,
-			                                    Device.BarNumber, Device.BarOffset, IoData);
-			if(Device.RCode != 0) CheckReturnCode("WrteL",&Device);
-		} while(Device.RCode != 0); 
-	}
-}
-/************************************************************************/
-/* iSeries I/O Remap                                                    */
-/* -> Check to see if one of ours                                       */
-/* -> If not, return null to help find the bug.                         */
-/************************************************************************/
-void* iSeries_ioremap (unsigned long offset, unsigned long size) {
-    if(iSeries_xlateIoMmAddress((u32*)offset) != 0) {
-	return (void*)offset;
-    }
-    else {
-	return NULL;
-    }
-}    
-/************************************************************************/
-/* Routine to build the iSeries_Device for the pci device.              */
-/************************************************************************/
-void build_iSeries_Device(iSeries_Device* Device, struct pci_dev* DevPtr) {
-    Device->PciDevPtr = DevPtr; 
-    Device->BusNumber = ISERIES_GET_LPAR_BUS(DevPtr->bus->number);
-    if(ISERIES_GET_LPAR_SUBBUS(DevPtr->bus->number) == 0) {
-	Device->SubBus = ISERIES_DEVFN_DECODE_SUBBUS(DevPtr->devfn);
-	Device->DevFn  = 0x10 | ISERIES_DECODE_FUNCTION(DevPtr->devfn);
-    }
-    else {
-	Device->SubBus = ISERIES_GET_LPAR_SUBBUS(DevPtr->bus->number);
-	Device->DevFn  = ISERIES_44_FORMAT(DevPtr->devfn);
-    }
-    Device->BarNumber      = 0xFF;
-    Device->BarOffset      = 0;
-    Device->RCode          = 0;
-}
-/************************************************************************/
-/* Routine to build the iSeries_Device for the IoAddress.               */
-/************************************************************************/
-int  build_iSeries_Device_From_IoAddress(iSeries_Device* Device, u32* IoAddress) {
-    Device->PciDevPtr = iSeries_xlateIoMmAddress(IoAddress);
-    if(Device->PciDevPtr != 0) {        /* Valid pci_dev?              */
-		build_iSeries_Device(Device,Device->PciDevPtr);
-		Device->BarNumber = iSeries_IoMmTable_Bar(IoAddress);
-		if( Device->BarNumber != 0xFF) {
-			Device->BarOffset = iSeries_IoMmTable_BarOffset(IoAddress);
-			return 0;
-		}
-		else {
-			sprintf(PciFrBuffer,"I/O BAR Address: 0x%08X",(int)IoAddress);
-			ISERIES_PCI_FR(PciFrBuffer);
-			printk("PCI: Invalid I/O Address 0x%08X\n",(int)IoAddress);
-			return -1;
-		}
-	}
-	printk("PCI: Invalid I/O Address 0x%08X\n",(int)IoAddress);
-	return -1;
-}
-/************************************************************************/
-/* Returns the iSeries bus value                                        */
-/************************************************************************/
-u8   iSeries_Get_Bus(struct pci_dev* DevPtr) {
-    return iSeries_GlobalBusMap[DevPtr->bus->number][_HVBUSNUMBER_];
-}
-/************************************************************************/
-/* Returns the iSeries subbus value                                     */
-/************************************************************************/
-u8   iSeries_Get_SubBus(struct pci_dev* DevPtr) {
-    u8  SubBus = iSeries_GlobalBusMap[DevPtr->bus->number][_HVSUBBUSNUMBER_];
-    if     (SubBus == 0xFF) SubBus = 0xFF;
-    else if(SubBus == 0)    SubBus = ISERIES_DEVFN_DECODE_SUBBUS(DevPtr->devfn);
-    else                    SubBus = ISERIES_GET_LPAR_SUBBUS(DevPtr->bus->number);
-    return SubBus;
-}
-/************************************************************************/
-/* Returns the iSeries Device and Function Number                       */
-/************************************************************************/
-u8   iSeries_Get_DevFn(struct pci_dev* DevPtr) {
-    u8  SubBus = iSeries_GlobalBusMap[DevPtr->bus->number][_HVSUBBUSNUMBER_];
-    u8  DevFn;
-    if     (SubBus == 0xFF) DevFn  = 0;
-    else if(SubBus == 0)    DevFn  = 0x10 | ISERIES_DECODE_FUNCTION(DevPtr->devfn);
-    else                    DevFn  = ISERIES_44_FORMAT(DevPtr->devfn);
-    return DevFn;
-}
-
-/************************************************************************/
-/* This is provides the mapping from the Linux bus and devfn to ISeries */
-/* Bus and Subbus.                                                      */
-/* Initialize to all FFs, translations will fail if FF entry found.     */
-/************************************************************************/
-u8 iSeries_GlobalBusMap[256][2];	/* Global Bus Mapping           */	
-void __init iSeries_Initialize_GlobalBusMap(void) {
-    int Index;
-    for(Index = 0; Index < 256; ++Index) {
-	iSeries_GlobalBusMap[Index][_HVBUSNUMBER_]    = 0xFF;
-	iSeries_GlobalBusMap[Index][_HVSUBBUSNUMBER_] = 0xFF;
-    }
-    ISERIES_PCI_FR("IntGlobalBusMap");
-}
-/************************************************************************/
-/* Create the Flight Recorder                                           */
-/************************************************************************/
-FlightRecorder  PciFlightRecorder;		      /* Pci Flight Recorder  */
-FlightRecorder* PciFr;				           /* Pointer to Fr        */
-char            PciFrBufferData[128];		      /* Working buffer       */
-char*           PciFrBuffer;			      /* Pointer to buffer    */
-int             PciTraceFlag = 0;               /* Trace Level Flag     */
-struct pci_dev* PciDeviceTrace;                 /* Device Tracing       */
-
-void __init iSeries_Initialize_FlightRecorder(void) {
-    PciFr       = &PciFlightRecorder;
-    PciFrBuffer = &PciFrBufferData[0];
-    iSeries_Fr_Initialize(PciFr, "PciFlightRecord");
-    ISERIES_PCI_FR("August 10,2001.");
-    PciTraceFlag = 0;
-}
-/************************************************************************/
-/* Function to turn on and off the Flight Recorder Trace Flag           */
-/************************************************************************/
-int  iSeries_Set_PciTraceFlag(int TraceFlag) {
-    int TempFlag = PciTraceFlag;
-    PciTraceFlag = TraceFlag;
-    return TempFlag;
-}
-int  iSeries_Get_PciTraceFlag(void) {
-    return PciTraceFlag;
-}
-void iSeries_Set_PciFilter(struct pci_dev* PciDevice) {
-    PciDeviceTrace = PciDevice;
-}
-/************************************************************************/
-/* Initialize the I/O Tables and maps                                   */  
-/************************************************************************/
-void __init iSeries_pci_Initialize(void) {
-    iSeries_Initialize_FlightRecorder();	     /* Flight Recorder 1st. */
-    iSeries_Initialize_GlobalBusMap();		/* Global Bus Map       */
-    iSeries_IoMmTable_Initialize();		     /* Io Translate table.  */
-    iSeries_proc_callback(&iSeries_pci_proc_init);
-    iSeries_Set_PciErpFlag(4);			     /* Erp Level set to 4   */
-}    
-
-/************************************************************************/
-/* Erp level when PCI I/O Errors are detected.                          */
-/*  0 =  Be quiet about the errors.                                     */
-/*  1 >= Log error information and continue on.                         */
-/*  2 =  Printk the error information and continue on.                  */
-/*  3 =  Printk the error information and put task to sleep.            */
-/*  4 =  Printk the error information and panic the kernel with no reboo*/        
-/************************************************************************/
-int        iSeries_pci_ErpLevel = 0;
-/************************************************************************/
-/* Allows clients to set the Erp State                                  */
-/************************************************************************/
-int  iSeries_Set_PciErpFlag(int ErpFlag) {
-    int SavedState = iSeries_pci_ErpLevel;
-    printk("PCI: PciERPFlag set to %d.\n", ErpFlag);
-    iSeries_pci_ErpLevel = ErpFlag;
-    return SavedState;
-}
-extern int panic_timeout;		       /* Panic Timeout reference      */
-/************************************************************************/
-/* Fatal I/O Error, crash the system.                                   */
-/* PCI: Fatal I/O Error, Device 00/00, Error 0x0000, Status Reg 0x0000  */
-/* PCI: Kernel Panic called with reboot disabled.                       */
-/************************************************************************/
-void iSeries_pci_IoError(char* OpCode,iSeries_Device* Device) {
-    char            DeviceInfo[128];
-    char            ErrorInfo[128];
-    struct pci_dev* PciDev = Device->PciDevPtr;
-
-    sprintf(ErrorInfo,"I/O Error Detected.  Op: %s, Bus%3d, Device%3d  Error: 0x%04X\n",
-	                  OpCode,PciDev->bus->number, PCI_SLOT(PciDev->devfn),Device->RCode);
-    iSeries_Device_Information(PciDev,DeviceInfo,128);
-
-    /* Log the error in the flight recorder                            */
-    if(iSeries_pci_ErpLevel > 0) {
-	if( Device->RCode != 0x0102) {		/* Previous error      */
-	    ISERIES_PCI_FR(ErrorInfo);
-	    ISERIES_PCI_FR(DeviceInfo);
-	}
-    }
-    if(iSeries_pci_ErpLevel > 1) {
-	printk("PCI: %s",ErrorInfo);
-	printk("PCI: %s\n",DeviceInfo);
-    }
-    if(iSeries_pci_ErpLevel == 3) {
-	printk("PCI: Current process 0x%08X put to sleep for debug.\n",current->pid);
-	{
-	    DECLARE_WAITQUEUE(WaitQueue, current);
-	    add_wait_queue(&current->wait_chldexit,&WaitQueue);
-	    current->state = TASK_INTERRUPTIBLE;
-	    schedule();
-	    current->state = TASK_RUNNING;
-	    remove_wait_queue(&current->wait_chldexit,&WaitQueue);
-	}
-    }
-    else if(iSeries_pci_ErpLevel == 4) {
-	mf_displaySrc(0xB6000103);
-	panic_timeout = 0; /* Don't reboot. */
-	/* printk("PCI: Hardware I/O Error, SRC B6000103, Kernel Panic called.\n");*/
-	/* panic("Automatic Reboot Disabled.") */
-	panic("PCI: Hardware I/O Error, SRC B6000103, Automatic Reboot Disabled.");
-    }
-}
-
-/************************************************************************/
-/* I/0 Memory copy MUST use mmio commands on iSeries                    */
-/************************************************************************/
-void* iSeries_memcpy_toio(void *dest, void *source, int n)
-{
-    char *dst = dest;
-    char *src = source;
-
-    while (n--) {
-	writeb (*src++, dst++);
-    }
-
-    return dest;
-}
-
-void* iSeries_memcpy_fromio(void *dest, void *source, int n)
-{
-    char *dst = dest;
-    char *src = source;
-
-    while (n--) 
-	*dst++ = readb (src++);
-
-    return dest;
-}
diff -Nru a/arch/ppc/iSeries/iSeries_pci.h b/arch/ppc/iSeries/iSeries_pci.h
--- a/arch/ppc/iSeries/iSeries_pci.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,139 +0,0 @@
-#ifdef CONFIG_PPC_ISERIES 
-#ifndef _ISERIES_PCI_H
-#define _ISERIES_PCI_H
-/************************************************************************/
-/* File iSeries_pci.h created by Allan Trautman on Tue Jan  9 2001.     */
-/************************************************************************/
-/* Define some useful macros for the iseries pci routines.              */
-/* Copyright (C) 20yy  Allan H Trautman, 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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created December 28, 2000                                          */
-/*   Converted to iseries_pci.h Jan 25, 2001                            */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <linux/config.h>
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/iSeries_FlightRecorder.h>
-#include <asm/iSeries/iSeries_pci.h>
-
-/************************************************************************************/
-/* Define some useful macros.                                                       */
-/* These macros started with Wayne, Al renamed and refined.                         */
-/************************************************************************************/
-/* Encodes SubBus address(seddddfff), Works only for bridges under EADS 1 and 2.    */
-/************************************************************************************/
-/* #define ISERIES_ENCODE_SUBBUS(eads, bridge, device) \
-             (0x80 | ((eads-1 & 0x01) << 6) | ((bridge & 0x0F) << 3) | (device & 0x07)) */
-#define ISERIES_ENCODE_SUBBUS(e, ef, df) (((0x80 | ((e&0x02)<<5) | ((ef & 0x07)<<3)) & 0xF8) | (df & 0x03))  // Al - Please Review
-
-/************************************************************************************/
-/* Combines IdSel and Function into Iseries 4.4 format                              */
-/* For Linux, see PCI_DEVFN(slot,func) in include/linux/pci.h                       */
-/************************************************************************************/
-// #define ISERIES_PCI_AGENTID(idsel,func)	((idsel & 0x0F) << 4) | (func  & 0x07)
-#define ISERIES_PCI_AGENTID(idsel,func)	(((idsel & 0x0F) << 4) | (func & 0x0F))  // Al - Please Review
-
-/************************************************************************************/
-/* Converts DeviceFunction from Linux   5.3(dddddfff) to Iseries 4.4(dddd0fff)      */
-/* Converts DeviceFunction from Iseries 4.4(dddd0fff) to Linux   5.3(dddddfff)      */
-/************************************************************************************/
-#define ISERIES_44_FORMAT(devfn53)          (((devfn53 & 0xF8) << 1) | (devfn53 & 0x07))
-#define ISERIES_53_FORMAT(devfn44)          (((devfn44 & 0xF0) >> 1) | (devfn44 & 0x07))
-
-/************************************************************************************/
-/* Tests for encoded subbus.                                                        */
-/************************************************************************************/
-#define ISERIES_IS_SUBBUS_ENCODED_IN_DEVFN(devfn)   ((devfn & 0x80) == 0x80)
-
-/************************************************************************************/
-/* Decodes the Iseries subbus to devfn, ONLY Works for bus 0!! Use Table lookup.    */
-/************************************************************************************/
-/* #define ISERIES_DEVFN_DECODE_SUBBUS(devfn) \
-                             ((((devfn & 0x40) >> 1) + 0x20)  | ((devfn >> 1) & 0x1C)) */
-#define ISERIES_DEVFN_DECODE_SUBBUS(devfn) (((((devfn >> 6 ) & 0x1) + 1) << 5) | (((devfn >> 3) & 0x7) << 2))  // Al - Please Review
-
-/************************************************************************************/
-/* Decodes Linux DevFn to Iseries DevFn, bridge device, or function.                */
-/* For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h                      */
-/************************************************************************************/
-#define ISERIES_DECODE_DEVFN(linuxdevfn)  (((linuxdevfn & 0x71) << 1) | (linuxdevfn & 0x07))
-#define ISERIES_DECODE_DEVICE(linuxdevfn) (((linuxdevfn & 0x38) >> 3) |(((linuxdevfn & 0x40) >> 2) + 0x10))
-#define ISERIES_DECODE_FUNCTION(linuxdevfn) (linuxdevfn & 0x07)
-
-#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7)
-#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
-#define ISERIES_GET_HOSE_HV_BUSNUM(hose) (((struct iSeries_hose_arch_data *)(hose->arch_data))->hvBusNumber)
-
-/************************************************************************************/
-/* Retreives Iseries Bus and SubBus from GlobalBusMap                               */
-/************************************************************************************/
-#define ISERIES_GET_LPAR_BUS(linux_bus)    iSeries_GlobalBusMap[linux_bus][_HVBUSNUMBER_]
-#define ISERIES_GET_LPAR_SUBBUS(linux_bus) iSeries_GlobalBusMap[linux_bus][_HVSUBBUSNUMBER_]
-
-#define ISERIES_ADD_BUS_GLOBALBUSMAP(linuxbus, iseriesbus, iseriessubbus) \
-    iSeries_GlobalBusMap[linuxbus][_HVBUSNUMBER_]    = iseriesbus;      \
-    iSeries_GlobalBusMap[linuxbus][_HVSUBBUSNUMBER_] = iseriessubbus;       
-
-/************************************************************************************/
-/* Global Bus map                                                                   */
-/* Bus and Subbus index values into the global bus number map array.                */
-/************************************************************************************/
-#define ISERIES_GLOBALBUSMAP_SIZE 256
-#define _HVBUSNUMBER_    0
-#define _HVSUBBUSNUMBER_ 1
-extern u8 iSeries_GlobalBusMap[ISERIES_GLOBALBUSMAP_SIZE][2];
-void iSeries_Initialize_GlobalBusMap(void);
-#define pci_assign_all_buses() 1  // Al - NEW
-
-/************************************************************************************/
-/* Converts Virtual Address to Real Address for Hypervisor calls                    */
-/************************************************************************************/
-#define REALADDR(virtaddr)  (0x8000000000000000 | (virt_to_absolute((u32)virtaddr) ))
-
-/************************************************************************************/
-/* Define TRUE and FALSE Values for Al                                              */
-/************************************************************************************/
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-typedef struct pci_dev               pciDev; 
-/************************************************************************/
-/* Routines to build the iSeries_Device for the pci device.             */
-/************************************************************************/
-extern void build_iSeries_Device(iSeries_Device* Device, struct pci_dev* DevPtr);
-extern int  build_iSeries_Device_From_IoAddress(iSeries_Device* Device, u32* IoAddress);
-extern void iSeries_pci_Initialize(void);
-
-/************************************************************************/
-/* Flight Recorder Debug Support                                        */
-/************************************************************************/
-extern int          PciTraceFlag;               /* Conditional Trace    */
-void   iSeries_Initialize_FlightRecorder(void);
-int    iSeries_Set_PciTraceFlag(int Flag);	/* Sets flag, return old*/
-int    iSeries_Get_PciTraceFlag(void);	/* Gets Flag.           */
-void   iSeries_DumpDevice(char* Text, iSeries_Device* );
-
-#endif  /* _ISERIES_PCI_H */
-#endif  /*CONFIG_PPC_ISERIES  */
-
diff -Nru a/arch/ppc/iSeries/iSeries_pci_proc.c b/arch/ppc/iSeries/iSeries_pci_proc.c
--- a/arch/ppc/iSeries/iSeries_pci_proc.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,185 +0,0 @@
-/************************************************************************/
-/* File iSeries pci_proc.c created by Allan Trautman on Feb 27 2001.    */
-/************************************************************************/
-/* Create /proc/iSeries/pci file that contains iSeries card location.   */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, Feb 27, 2001                                              */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <asm/uaccess.h>
-#include <asm/iSeries/iSeries_VpdInfo.h>
-#include <asm/iSeries/iSeries_proc.h>
-#include <asm/iSeries/iSeries_pci.h>
-#include <asm/iSeries/iSeries_FlightRecorder.h>
-#include <linux/pci.h>
-#include <linux/netdevice.h>
-
-static struct proc_dir_entry *pci_proc_root   = NULL;
-static struct proc_dir_entry *pciFr_proc_root = NULL;
-
-int iSeries_proc_pci_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data);
-int iSeries_proc_pci_write_proc(struct file *file, const char *buffer, unsigned long count, void *data);
-int iSeries_proc_pciFr_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data);
-int iSeries_proc_pciFr_write_proc(struct file *file, const char *buffer, unsigned long count, void *data);
-
-
-void iSeries_pci_proc_init(struct proc_dir_entry *iSeries_proc) {
-    printk("PCI: Creating /proc/iSeries/pci\n");
-
-    /* Read = User,Group,Other, Write User */ 
-    pci_proc_root = create_proc_entry("pci",    S_IFREG | S_IRUGO | S_IWUSR, iSeries_proc);
-    if (!pci_proc_root) return;
-    pci_proc_root->nlink = 1;
-    pci_proc_root->data = (void *)0;
-    pci_proc_root->read_proc  = iSeries_proc_pci_read_proc;
-    pci_proc_root->write_proc = iSeries_proc_pci_write_proc;
-
-    /* Read = User,Group,Other, Write User */ 
-    printk("PCI: Creating /proc/iSeries/pciFr\n");
-    pciFr_proc_root = create_proc_entry("pciFr", S_IFREG | S_IRUGO | S_IWUSR, iSeries_proc);
-    if (!pciFr_proc_root) return;
-    pciFr_proc_root->nlink = 1;
-    pciFr_proc_root->data = (void *)0;
-    pciFr_proc_root->read_proc  = iSeries_proc_pciFr_read_proc;
-    pciFr_proc_root->write_proc = iSeries_proc_pciFr_write_proc;
-}
-
-/*******************************************************************************/
-/* Get called when client reads the /proc/iSeries/pci file.  The data returned */
-/* is the iSeries card locations for service.                                  */
-/*******************************************************************************/
-int iSeries_proc_pci_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) {
-    int               LineLen;			/* Size of new Data            */
-    struct  pci_dev*  PciDev;			/* Device pointer              */
-    struct net_device *dev;			/* net_device pointer          */
-    int               DeviceCount;              /* Device Number               */
-    /***************************************************************************/
-    /* ###        Bus  Device      Bus  Dev Frm Card                           */
-    /*   1. Linux:  0/ 28  iSeries: 24/ 36/  1/C14                             */
-    /*   2. Linux:  0/ 30  iSeries: 24/ 38/  2/C14                             */
-    /***************************************************************************/
-    DeviceCount = 1;			/* Count the devices listed.           */
-    LineLen     = 0;			/* Reset Length                        */
-
-    /***************************************************************************/
-    /* List the devices                                                        */
-    /***************************************************************************/
-    pci_for_each_dev(PciDev) {
-	LineLen += sprintf(page+LineLen,"%3d. ",DeviceCount);
-	LineLen += iSeries_Device_Information(PciDev,page+LineLen,count-LineLen);
-	for (dev = dev_base; dev != NULL; dev = dev->next) 
-	{
-	    if (dev->base_addr == PciDev->resource[0].start ) { /* Yep, a net_device */
-		LineLen += sprintf(page+LineLen, ", Net device: %s", dev->name);
-	    } /* if */
-	} /* for */
-	LineLen += sprintf(page+LineLen,"\n");
- 	++DeviceCount;			/* Add for the list.                    */
-        /************************************************************************/
-	/* Run out of room in system buffer.                                    */
-        /************************************************************************/
-	if(LineLen+80 >= count) {	/* Room for another line?  No. bail out */
-	    LineLen +=sprintf(page+LineLen,"/proc/pci file full!\n");
-	    break;
-	}
-    }
-    /***************************************************************************/
-    /* If no devices, tell user that instead                                   */
-    /***************************************************************************/
-    if(DeviceCount == 1) {
-	LineLen +=sprintf(page+LineLen,"No PCI devices found\n");
-    }
-    /***************************************************************************/
-    /* Update counts and return                                                */
-    /***************************************************************************/
-    *eof = LineLen;
-    return LineLen;			
-}
-
-/*******************************************************************************/
-/* Do nothing, Nothing to support for the write                                */
-/*******************************************************************************/
-int iSeries_proc_pci_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) {
-    return count;
-}
-
-/*******************************************************************************/
-/* Get called when client reads the /proc/iSeries/pci file.  The data returned */
-/* is the iSeries card locations for service.                                  */
-/*******************************************************************************/
-int iSeries_proc_pciFr_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) {
-    struct  pci_dev*  PciDev;			/* Device pointer              */
-    int               DeviceCount = 1;          /* Device Number               */
-    int               LineLen     = 0;		/* Size of new Data            */
-
-    printk("PCI: Dump Flight Recorder!\n");
-    /***************************************************************************/
-    /* List the devices                                                        */
-    /***************************************************************************/
-    pci_for_each_dev(PciDev) {
-	LineLen += sprintf(page+LineLen,"%3d. 0x%08X  ",DeviceCount,(int)PciDev);
-	LineLen += sprintf(page+LineLen,"Bus: %02X, Device: %02X ",PciDev->bus->number,PciDev->devfn);
-	LineLen += sprintf(page+LineLen,"\n");
-	++DeviceCount;			/* Add for the list.                    */
-    }
-    LineLen += sprintf(page+LineLen,"--\n");
-    /***************************************************************************/
-    /* The Flight Recorder                                                     */
-    /* Someday handle wrap                                                     */
-    /***************************************************************************/
-    if (PciFr->StartingPointer != NULL) {
-	char* StartEntry = (char*)PciFr->StartingPointer;
-	char* EndEntry   = (char*)PciFr->CurrentPointer;
-	while(EndEntry > StartEntry && LineLen+40 < count) {
-	    LineLen += sprintf(page+LineLen,"%s\n",StartEntry);
-	    StartEntry += strlen(StartEntry) + 1;
-	}
-	if(LineLen+40 >= count) {
-            printk("PCI: Max Count Hit %d and %d\n",LineLen,count);
-        }
-    }
-    /***************************************************************************/
-    /* Update counts and return                                                */
-    /***************************************************************************/
-    printk("PCI: End of File at %d\n",LineLen);
-    *eof = LineLen;
-    return LineLen;			
-}
-/*******************************************************************************/
-/* Flight Recorder Controls                                                    */
-/*******************************************************************************/
-int iSeries_proc_pciFr_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) {
-    if(buffer != 0 && strlen(buffer) > 0) {
-	if(     strstr(buffer,"trace on")  != NULL) {
-	    iSeries_Set_PciTraceFlag(1);
-            ISERIES_PCI_FR_DATE("PCI Trace turned on!");
-	}
-	else if(strstr(buffer,"trace off") != NULL) {
-	    iSeries_Set_PciTraceFlag(0);
-            ISERIES_PCI_FR_DATE("PCI Trace turned off!");
-	}
-        else {
-            ISERIES_PCI_FR_TIME("PCI Trace Option Invalid!");
-            readl(0x00000000);
-        }
-    }
-    return count;
-}
diff -Nru a/arch/ppc/iSeries/iSeries_proc.c b/arch/ppc/iSeries/iSeries_proc.c
--- a/arch/ppc/iSeries/iSeries_proc.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,154 +0,0 @@
-/*
-  * iSeries_proc.c
-  * Copyright (C) 2001  Kyle A. Lucke 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.
-  * 
-  * 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
-  */
-
-
-/* Change Activity: */
-/* End Change Activity */
-
-#include <linux/proc_fs.h>
-#include <linux/spinlock.h>
-#ifndef _ISERIES_PROC_H
-#include <asm/iSeries/iSeries_proc.h>
-#endif
-
-
-static struct proc_dir_entry * iSeries_proc_root = NULL;
-static int iSeries_proc_initializationDone = 0;
-static spinlock_t iSeries_proc_lock;
-
-struct iSeries_proc_registration
-{
-    struct iSeries_proc_registration *next;
-    iSeriesProcFunction functionMember;
-};
-
-
-struct iSeries_proc_registration preallocated[16];
-#define MYQUEUETYPE(T) struct MYQueue##T
-#define MYQUEUE(T) \
-MYQUEUETYPE(T) \
-{ \
-struct T *head; \
-struct T *tail; \
-}
-#define MYQUEUECTOR(q) do { (q)->head = NULL; (q)->tail = NULL; } while(0)
-#define MYQUEUEENQ(q, p) \
-do { \
-(p)->next = NULL; \
-if ((q)->head != NULL) \
-{ \
-(q)->head->next = (p); \
-(q)->head = (p); \
-} \
-else \
-{ \
-(q)->tail = (q)->head = (p); \
-} \
-} while(0)
-
-#define MYQUEUEDEQ(q,p) \
-do { \
-(p) = (q)->tail; \
-if ((p) != NULL) \
-{ \
-(q)->tail = (p)->next; \
-(p)->next = NULL; \
-} \
-if ((q)->tail == NULL) \
-(q)->head = NULL; \
-} while(0)
-MYQUEUE(iSeries_proc_registration);
-typedef MYQUEUETYPE(iSeries_proc_registration) aQueue;
-
-
-aQueue iSeries_free;
-aQueue iSeries_queued;
-
-void iSeries_proc_early_init(void)
-{
-    int i = 0;
-    unsigned long flags;
-    iSeries_proc_initializationDone = 0;
-    spin_lock_init(&iSeries_proc_lock);
-    MYQUEUECTOR(&iSeries_free);
-    MYQUEUECTOR(&iSeries_queued);
-
-    spin_lock_irqsave(&iSeries_proc_lock, flags);
-    for (i = 0; i < 16; ++i)
-    {
-	MYQUEUEENQ(&iSeries_free, preallocated+i);
-    }
-    spin_unlock_irqrestore(&iSeries_proc_lock, flags);
-}
-
-void iSeries_proc_create(void)
-{
-    unsigned long flags;
-    struct iSeries_proc_registration *reg = NULL;
-    spin_lock_irqsave(&iSeries_proc_lock, flags);
-    printk("iSeries_proc: Creating /proc/iSeries\n");
-
-    iSeries_proc_root = proc_mkdir("iSeries", 0);
-    if (!iSeries_proc_root) return;
-
-    MYQUEUEDEQ(&iSeries_queued, reg);
-
-    while (reg != NULL)
-    {
-	(*(reg->functionMember))(iSeries_proc_root);
-
-	MYQUEUEDEQ(&iSeries_queued, reg);
-    }
-
-    iSeries_proc_initializationDone = 1;
-    spin_unlock_irqrestore(&iSeries_proc_lock, flags);
-}
-
-void iSeries_proc_callback(iSeriesProcFunction initFunction)
-{
-    unsigned long flags;
-    spin_lock_irqsave(&iSeries_proc_lock, flags);
-
-    if (iSeries_proc_initializationDone)
-    {
-	(*initFunction)(iSeries_proc_root);
-    }
-    else
-    {
-	struct iSeries_proc_registration *reg = NULL;
-
-	MYQUEUEDEQ(&iSeries_free, reg);
-
-	if (reg != NULL)
-	{
-//	    printk("Registering %p in reg %p\n", initFunction, reg);
-	    reg->functionMember = initFunction;
-
-	    MYQUEUEENQ(&iSeries_queued, reg);
-	}
-	else
-	{
-	    printk("Couldn't get a queue entry\n");
-	}
-    }
-
-    spin_unlock_irqrestore(&iSeries_proc_lock, flags);
-}
-
-
diff -Nru a/arch/ppc/iSeries/iSeries_reset_device.c b/arch/ppc/iSeries/iSeries_reset_device.c
--- a/arch/ppc/iSeries/iSeries_reset_device.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,196 +0,0 @@
-/************************************************************************/
-/* File iSeries_reset_device.c created by Allan Trautman on Mar 21 2001.*/
-/************************************************************************/
-/* This code supports the pci interface on the IBM iSeries systems.     */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, March 20, 2001                                            */
-/*   April 30, 2001, Added return codes on functions.                   */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <linux/irq.h>
-/************************************************************************/
-/* Arch specific's                                                      */
-/************************************************************************/
-#include <asm/io.h>
-#include <asm/iSeries/HvCallPci.h>
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/mf.h>
-#include <asm/iSeries/iSeries_FlightRecorder.h>
-#include <asm/iSeries/iSeries_pci.h>
-#include "iSeries_pci.h"
-
-/************************************************************************/
-/* Interface to Reset Device, see .h for parms and flavors.             */
-/************************************************************************/
-int  iSeries_Device_Reset_NoIrq(struct pci_dev* PciDev) {
-    return iSeries_Device_Reset(PciDev,0,0,1);
-}
-int  iSeries_Device_Reset_Generic(struct pci_dev* PciDev) {
-    return iSeries_Device_Reset(PciDev,0,0,0);
-}
-int  iSeries_Device_Reset(struct pci_dev* PciDev, int AssertTime, int DelayTime, int IrqState) {
-    int              RCode       = 0;
-    PciReqsSaveArea* RegSaveArea = NULL;
-    if(PciDev != 0) {
-	if(IrqState == 0) disable_irq(PciDev->irq);
-	RegSaveArea = iSeries_Device_SaveConfigRegs(PciDev);
-	if(RegSaveArea != NULL) {
-	    RCode  = iSeries_Device_ToggleReset(PciDev, AssertTime, DelayTime);
-	    if(RCode == 0) {
-		RCode = iSeries_Device_RestoreConfigRegs(RegSaveArea);
-	    }
-	}
-        else {
-            RCode = -1;
-        }
-	if(IrqState == 0) enable_irq(PciDev->irq);
-    }
-    return RCode;
-}
-/************************************************************************/
-/* Interface to toggle the reset line                                   */
-/* Time is in .1 seconds, need for seconds.                             */
-/************************************************************************/
-int  iSeries_Device_ToggleReset(struct pci_dev* PciDev, int AssertTime, int DelayTime) {
-    unsigned long AssertDelay = AssertTime;
-    unsigned long WaitDelay   = DelayTime;
-    u16           Bus         = ISERIES_GET_LPAR_BUS(PciDev->bus->number);
-    u8            Slot        = ISERIES_DECODE_DEVICE(PciDev->devfn);
-    int           RCode       = 0;
-
-    /* Set defaults                                                     */
-    if(AssertTime < 5) AssertDelay = 5;        /* Default is .5 second  */
-    if(WaitDelay < 30) WaitDelay = 30;         /* Default is 3 seconds  */
-
-    /* Assert reset for time specified                                  */
-    AssertDelay  *= HZ;                       /* Convert to ticks.      */
-    AssertDelay  /= 10;                       /* Adjust to whole count  */
-    RCode  = HvCallPci_setSlotReset(Bus, 0x00, Slot, 1);
-    set_current_state(TASK_UNINTERRUPTIBLE);  /* Only Wait.             */
-    schedule_timeout(AssertDelay);            /* Sleep for the time     */
-    RCode += HvCallPci_setSlotReset(Bus, 0x00, Slot, 0);
-
-    /* Wait for device to reset                                         */
-    WaitDelay  *= HZ;                         /* Ticks                  */
-    WaitDelay  /= 10;                         /* Whole count            */
-    set_current_state(TASK_UNINTERRUPTIBLE);  /* Only Wait.             */
-    schedule_timeout(WaitDelay);              /* Sleep for the time     */
-
-    if(RCode == 0) {
-        sprintf(PciFrBuffer,"Slot Reset on Bus%3d, Device%3d!\n",Bus, Slot);
-    }
-    else {
-        sprintf(PciFrBuffer,"Slot Reset on Bus%3d, Device%3d Failed!  RCode: %04X\n",Bus, Slot, RCode);
-    }
-    ISERIES_PCI_FR_TIME(PciFrBuffer);
-    printk("PCI: %s\n",PciFrBuffer);
-    return RCode;
-}
-
-/************************************************************************/
-/* Allocates space and save the config registers for a device.          */
-/************************************************************************/
-/* Note: This does byte reads so the data may appear byte swapped       */
-/* when compared to read word or dword.                                 */
-/* The data returned is a structure and will be freed automatically on  */
-/* the restore of the data.  The is checking so if the save fails, the  */
-/* data will not be restore.  Yes I know, you are most likey toast.     */
-/************************************************************************/
-PciReqsSaveArea* iSeries_Device_SaveConfigRegs(struct pci_dev* DevPtr) {
-    int              Register    = 0;
-    struct pci_dev*  PciDev      = DevPtr;
-    PciReqsSaveArea* RegSaveArea = (PciReqsSaveArea*)kmalloc(sizeof(PciReqsSaveArea), GFP_KERNEL);
-    /*printk("PCI: Save Configuration Registers. 0x%08X\n",(int)RegSaveArea); */
-    if(RegSaveArea == 0) {
-	printk("PCI: Allocation failure in Save Configuration Registers.\n");
-    }
-    /********************************************************************/
-    /* Initialize Area.                                                 */
-    /********************************************************************/
-    else {
-	RegSaveArea->PciDev    = DevPtr;
-	RegSaveArea->Flags     = 0x01;
-	RegSaveArea->ByteCount = PCI_MAX_LAT+1;     /* Number of Bytes  */
-	RegSaveArea->RCode     = 0;
-	RegSaveArea->FailReg   = 0;
-	/****************************************************************/
-	/* Save All the Regs,  NOTE: restore skips the first 16 bytes.  */
-	/****************************************************************/
-	for(Register = 0;Register < RegSaveArea->ByteCount && RegSaveArea->RCode == 0; ++Register) {
-	    RegSaveArea->RCode = pci_read_config_byte(PciDev, Register, &RegSaveArea->Regs[Register]);
-	}
-	/* Check for error during the save.                             */
-	if(RegSaveArea->RCode != 0) {
-	    printk("PCI: I/O Failure in Save Configuration Registers. 0x%02X, 0x%04X\n",
-		                                              Register,RegSaveArea->RCode);
-	    RegSaveArea->Flags  |= 0x80;		/* Ouch Flag.           */
-	    RegSaveArea->FailReg = Register;	        /* Stuff this way       */
-	}
-    }
-    return  RegSaveArea;
-}
-/************************************************************************/
-/* Restores the registers saved via the save function.  See the save    */
-/* function for details.                                                */
-/************************************************************************/
-int  iSeries_Device_RestoreConfigRegs(PciReqsSaveArea* SaveArea) {
-    int RCode = 0;
-    if(SaveArea == 0 || SaveArea->PciDev == 0 ||
-      (SaveArea->Flags & 0x80) == 0x80 || SaveArea->RCode != 0) {
-	printk("PCI: Invalid SaveArea passed to Restore Configuration Registers. 0x%08X\n",(int)SaveArea);
-        RCode = -1;
-    }
-    else {
-	int    Register;
-	struct pci_dev* PciDev = SaveArea->PciDev;
-        /***************************************************************/
-	/* Don't touch the Cmd or BIST regs, user must restore those.  */
-	/* Restore PCI_CACHE_LINE_SIZE & PCI_LATENCY_TIMER             */
-        /* Restore Saved Regs from 0x10 to 0x3F                        */
-        /***************************************************************/
-	pci_write_config_byte(PciDev, PCI_CACHE_LINE_SIZE, SaveArea->Regs[PCI_CACHE_LINE_SIZE]);
-	pci_write_config_byte(PciDev, PCI_LATENCY_TIMER,   SaveArea->Regs[PCI_LATENCY_TIMER]);
-
-	for(Register = PCI_BASE_ADDRESS_0; Register < SaveArea->ByteCount && SaveArea->RCode == 0; ++Register) {
-	    SaveArea->RCode = pci_write_config_byte(PciDev, Register, SaveArea->Regs[Register]);
-	}
-	if(SaveArea->RCode != 0) {
-	    printk("PCI: I/O Failure in Restore Configuration Registers %d, %02X\n",Register,SaveArea->RCode);
-	    SaveArea->FailReg = Register;
-	    RCode = SaveArea->RCode;
-	}
-	else {
-	    RCode = 0;
-	}
-	/***************************************************************/
-        /* Is the Auto Free Flag on                                    */
-        /***************************************************************/
-	if(SaveArea->Flags && 0x01 == 0x01 ) {
-	    /* printk("PCI: Auto Free Register Save Area.  0x%08X\n",(int)SaveArea); */
-	    kfree(SaveArea);
-	}
-    }
-    return RCode;
-}
diff -Nru a/arch/ppc/iSeries/mf.c b/arch/ppc/iSeries/mf.c
--- a/arch/ppc/iSeries/mf.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1215 +0,0 @@
-/*
-  * mf.c
-  * Copyright (C) 2001 Troy D. Armstrong  IBM Corporation
-  *
-  * This modules exists as an interface between a Linux secondary partition
-  * running on an iSeries and the primary partition's Virtual Service
-  * Processor (VSP) object.  The VSP has final authority over powering on/off
-  * all partitions in the iSeries.  It also provides miscellaneous low-level
-  * machine facility type operations.
-  *
-  * 
-  * 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.
-  * 
-  * 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 <asm/iSeries/mf.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/mm.h>
-#include <asm/iSeries/HvLpConfig.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-#include <asm/nvram.h>
-#include <asm/time.h>
-#include <asm/iSeries/ItSpCommArea.h>
-#include <asm/iSeries/mf_proc.h>
-#include <asm/iSeries/iSeries_proc.h>
-#include <asm/uaccess.h>
-#include <linux/pci.h>
-#include <linux/bcd.h>
-
-
-/*
- * This is the structure layout for the Machine Facilites LPAR event
- * flows.
- */
-struct VspCmdData;
-struct CeMsgData;
-union SafeCast
-{
-    u64 ptrAsU64;
-    void *ptr;
-};
-
-
-typedef void (*CeMsgCompleteHandler)( void *token, struct CeMsgData *vspCmdRsp );
-
-struct CeMsgCompleteData
-{
-    CeMsgCompleteHandler xHdlr;
-    void *xToken;
-};
-
-struct VspRspData
-{
-    struct semaphore *xSemaphore;
-    struct VspCmdData *xResponse;
-};
-
-struct IoMFLpEvent
-{
-    struct HvLpEvent xHvLpEvent;
-
-    u16 xSubtypeRc;
-    u16 xRsvd1;
-    u32 xRsvd2;
-
-    union
-    {
-
-	struct AllocData
-	{
-	    u16 xSize;
-	    u16 xType;
-	    u32 xCount;
-	    u16 xRsvd3;
-	    u8 xRsvd4;
-	    HvLpIndex xTargetLp;
-	} xAllocData;
-
-	struct CeMsgData
-	{
-	    u8 xCEMsg[12];
-	    char xReserved[4];
-	    struct CeMsgCompleteData *xToken;
-	} xCEMsgData;
-
-	struct VspCmdData
-	{
-	    union SafeCast xTokenUnion;
-	    u16 xCmd;
-	    HvLpIndex xLpIndex;
-	    u8 xRc;
-	    u32 xReserved1;
-
-	    union VspCmdSubData
-	    {
-		struct
-		{
-		    u64 xState;
-		} xGetStateOut;
-
-		struct
-		{
-		    u64 xIplType;
-		} xGetIplTypeOut, xFunction02SelectIplTypeIn;
-
-		struct
-		{
-		    u64 xIplMode;
-		} xGetIplModeOut, xFunction02SelectIplModeIn;
-
-		struct
-		{
-		    u64 xPage[4];
-		} xGetSrcHistoryIn;
-
-		struct
-		{
-		    u64 xFlag;
-		} xGetAutoIplWhenPrimaryIplsOut, xSetAutoIplWhenPrimaryIplsIn, xWhiteButtonPowerOffIn, xFunction08FastPowerOffIn, xIsSpcnRackPowerIncompleteOut;
-
-		struct
-		{
-		    u64 xToken;
-		    u64 xAddressType;
-		    u64 xSide;
-		    u32 xTransferLength;
-		    u32 xOffset;
-		} xSetKernelImageIn, xGetKernelImageIn, xSetKernelCmdLineIn, xGetKernelCmdLineIn;
-
-		struct
-		{
-		    u32 xTransferLength;
-		} xGetKernelImageOut,xGetKernelCmdLineOut;
-
-
-		u8 xReserved2[80];
-
-	    } xSubData;
-	} xVspCmd;
-    } xUnion;
-};
-
-
-/*
- * All outgoing event traffic is kept on a FIFO queue.  The first
- * pointer points to the one that is outstanding, and all new
- * requests get stuck on the end.  Also, we keep a certain number of
- * preallocated stack elements so that we can operate very early in
- * the boot up sequence (before kmalloc is ready).
- */
-struct StackElement
-{
-    struct StackElement * next;
-    struct IoMFLpEvent event;
-    MFCompleteHandler hdlr;
-    char dmaData[72];
-    unsigned dmaDataLength;
-    unsigned remoteAddress;
-};
-static spinlock_t spinlock;
-static struct StackElement * head = NULL;
-static struct StackElement * tail = NULL;
-static struct StackElement * avail = NULL;
-static struct StackElement prealloc[16];
-
-/*
- * Put a stack element onto the available queue, so it can get reused.
- * Attention! You must have the spinlock before calling!
- */
-void free( struct StackElement * element )
-{
-    if( element != NULL )
-    {
-	element->next = avail;
-	avail = element;
-    }
-}
-
-/*
- * Enqueue the outbound event onto the stack.  If the queue was
- * empty to begin with, we must also issue it via the Hypervisor
- * interface.  There is a section of code below that will touch
- * the first stack pointer without the protection of the spinlock.
- * This is OK, because we know that nobody else will be modifying
- * the first pointer when we do this.
- */
-static int signalEvent( struct StackElement * newElement )
-{
-    int rc = 0;
-    unsigned long flags;
-    int go = 1;
-    struct StackElement * element;
-    HvLpEvent_Rc hvRc;
-
-    /* enqueue the event */
-    if( newElement != NULL )
-    {
-	spin_lock_irqsave( &spinlock, flags );
-	if( head == NULL )
-	    head = newElement;
-	else
-	{
-	    go = 0;
-	    tail->next = newElement;
-	}
-	newElement->next = NULL;
-	tail = newElement;
-	spin_unlock_irqrestore( &spinlock, flags );
-    }
-
-    /* send the event */
-    while( go )
-    {
-	go = 0;
-
-	/* any DMA data to send beforehand? */
-	if( head->dmaDataLength > 0 )
-	    HvCallEvent_dmaToSp( head->dmaData, head->remoteAddress, head->dmaDataLength, HvLpDma_Direction_LocalToRemote );
-
-	hvRc = HvCallEvent_signalLpEvent(&head->event.xHvLpEvent);
-	if( hvRc != HvLpEvent_Rc_Good )
-	{
-	    printk( KERN_ERR "mf.c: HvCallEvent_signalLpEvent() failed with %d\n", (int)hvRc );
-
-	    spin_lock_irqsave( &spinlock, flags );
-	    element = head;
-	    head = head->next;
-	    if( head != NULL )
-		go = 1;
-	    spin_unlock_irqrestore( &spinlock, flags );
-
-	    if( element == newElement )
-		rc = -EIO;
-	    else
-	    {
-		if( element->hdlr != NULL )
-		{
-		    union SafeCast mySafeCast;
-		    mySafeCast.ptrAsU64 = element->event.xHvLpEvent.xCorrelationToken;
-		    (*element->hdlr)( mySafeCast.ptr, -EIO );
-		}
-	    }
-
-	    spin_lock_irqsave( &spinlock, flags );
-	    free( element );
-	    spin_unlock_irqrestore( &spinlock, flags );
-	}
-    }
-
-    return rc;
-}
-
-/*
- * Allocate a new StackElement structure, and initialize it.
- */
-static struct StackElement * newStackElement( void )
-{
-    struct StackElement * newElement = NULL;
-    HvLpIndex primaryLp = HvLpConfig_getPrimaryLpIndex();
-    unsigned long flags;
-
-    if( newElement == NULL )
-    {
-	spin_lock_irqsave( &spinlock, flags );
-	if( avail != NULL )
-	{
-	    newElement = avail;
-	    avail = avail->next;
-	}
-	spin_unlock_irqrestore( &spinlock, flags );
-    }
-
-    if( newElement == NULL )
-	newElement = kmalloc(sizeof(struct StackElement),GFP_ATOMIC);
-
-    if( newElement == NULL )
-    {
-	printk( KERN_ERR "mf.c: unable to kmalloc %d bytes\n", sizeof(struct StackElement) );
-	return NULL;
-    }
-
-    memset( newElement, 0, sizeof(struct StackElement) );
-    newElement->event.xHvLpEvent.xFlags.xValid = 1;
-    newElement->event.xHvLpEvent.xFlags.xAckType = HvLpEvent_AckType_ImmediateAck;
-    newElement->event.xHvLpEvent.xFlags.xAckInd = HvLpEvent_AckInd_DoAck;
-    newElement->event.xHvLpEvent.xFlags.xFunction = HvLpEvent_Function_Int;
-    newElement->event.xHvLpEvent.xType = HvLpEvent_Type_MachineFac;
-    newElement->event.xHvLpEvent.xSourceLp = HvLpConfig_getLpIndex();
-    newElement->event.xHvLpEvent.xTargetLp = primaryLp;
-    newElement->event.xHvLpEvent.xSizeMinus1 = sizeof(newElement->event)-1;
-    newElement->event.xHvLpEvent.xRc = HvLpEvent_Rc_Good;
-    newElement->event.xHvLpEvent.xSourceInstanceId = HvCallEvent_getSourceLpInstanceId(primaryLp,HvLpEvent_Type_MachineFac);
-    newElement->event.xHvLpEvent.xTargetInstanceId = HvCallEvent_getTargetLpInstanceId(primaryLp,HvLpEvent_Type_MachineFac);
-
-    return newElement;
-}
-
-static int signalVspInstruction( struct VspCmdData *vspCmd )
-{
-    struct StackElement * newElement = newStackElement();
-    int rc = 0;
-    struct VspRspData response;
-    DECLARE_MUTEX_LOCKED(Semaphore);
-    response.xSemaphore = &Semaphore;
-    response.xResponse = vspCmd;
-
-    if( newElement == NULL )
-	rc = -ENOMEM;
-    else
-    {
-	newElement->event.xHvLpEvent.xSubtype = 6;
-	newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('V'<<8)+('I'<<0);
-	newElement->event.xUnion.xVspCmd.xTokenUnion.ptr = &response;
-	newElement->event.xUnion.xVspCmd.xCmd = vspCmd->xCmd;
-	newElement->event.xUnion.xVspCmd.xLpIndex = HvLpConfig_getLpIndex();
-	newElement->event.xUnion.xVspCmd.xRc = 0xFF;
-	newElement->event.xUnion.xVspCmd.xReserved1 = 0;
-	memcpy(&(newElement->event.xUnion.xVspCmd.xSubData),&(vspCmd->xSubData), sizeof(vspCmd->xSubData));
-	mb();
-
-	rc = signalEvent(newElement);
-    }
-
-    if (rc == 0)
-    {
-	down(&Semaphore);
-    }
-
-    return rc;
-}
-
-
-/*
- * Send a 12-byte CE message to the primary partition VSP object
- */
-static int signalCEMsg( char * ceMsg, void * token )
-{
-    struct StackElement * newElement = newStackElement();
-    int rc = 0;
-
-    if( newElement == NULL )
-	rc = -ENOMEM;
-    else
-    {
-	newElement->event.xHvLpEvent.xSubtype = 0;
-	newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('C'<<8)+('E'<<0);
-	memcpy( newElement->event.xUnion.xCEMsgData.xCEMsg, ceMsg, 12 );
-	newElement->event.xUnion.xCEMsgData.xToken = token;
-	rc = signalEvent(newElement);
-    }
-
-    return rc;
-}
-
-/*
- * Send a 12-byte CE message and DMA data to the primary partition VSP object
- */
-static int dmaAndSignalCEMsg( char * ceMsg, void * token, void * dmaData, unsigned dmaDataLength, unsigned remoteAddress )
-{
-    struct StackElement * newElement = newStackElement();
-    int rc = 0;
-
-    if( newElement == NULL )
-	rc = -ENOMEM;
-    else
-    {
-	newElement->event.xHvLpEvent.xSubtype = 0;
-	newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('C'<<8)+('E'<<0);
-	memcpy( newElement->event.xUnion.xCEMsgData.xCEMsg, ceMsg, 12 );
-	newElement->event.xUnion.xCEMsgData.xToken = token;
-	memcpy( newElement->dmaData, dmaData, dmaDataLength );
-	newElement->dmaDataLength = dmaDataLength;
-	newElement->remoteAddress = remoteAddress;
-	rc = signalEvent(newElement);
-    }
-
-    return rc;
-}
-
-/*
- * Initiate a nice (hopefully) shutdown of Linux.  We simply are
- * going to try and send the init process a SIGINT signal.  If
- * this fails (why?), we'll simply force it off in a not-so-nice
- * manner.
- */
-static int shutdown( void )
-{
-    int rc = kill_proc(1,SIGINT,1);
-
-    if( rc )
-    {
-	printk( KERN_ALERT "mf.c: SIGINT to init failed (%d), hard shutdown commencing\n", rc );
-	mf_powerOff();
-    }
-    else
-	printk( KERN_ALERT "mf.c: init has been successfully notified to proceed with shutdown\n" );
-
-    return rc;
-}
-
-/*
- * The primary partition VSP object is sending us a new
- * event flow.  Handle it...
- */
-static void intReceived( struct IoMFLpEvent * event )
-{
-    int freeIt = 0;
-    struct StackElement * two = NULL;
-    /* ack the interrupt */
-    event->xHvLpEvent.xRc = HvLpEvent_Rc_Good;
-    HvCallEvent_ackLpEvent( &event->xHvLpEvent );
-
-    /* process interrupt */
-    switch( event->xHvLpEvent.xSubtype )
-    {
-	case 0:	/* CE message */
-	    switch( event->xUnion.xCEMsgData.xCEMsg[3] )
-	    {
-		case 0x5B:	/* power control notification */
-		    if( (event->xUnion.xCEMsgData.xCEMsg[5]&0x20) != 0 )
-		    {
-			printk( KERN_ALERT "mf.c: Commencing partition shutdown\n" );
-			if( shutdown() == 0 )
-			    signalCEMsg( "\x00\x00\x00\xDB\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
-		    }
-		    break;
-		case 0xC0:	/* get time */
-		    {
-			if ( (head != NULL) && ( head->event.xUnion.xCEMsgData.xCEMsg[3] == 0x40 ) )
-			{
-			    freeIt = 1;
-			    if ( head->event.xUnion.xCEMsgData.xToken != 0 )
-			    {
-				CeMsgCompleteHandler xHdlr = head->event.xUnion.xCEMsgData.xToken->xHdlr;
-				void * token = head->event.xUnion.xCEMsgData.xToken->xToken;
-
-				if (xHdlr != NULL)
-				    (*xHdlr)( token, &(event->xUnion.xCEMsgData) );
-			    }
-			}
-		    }
-		    break;
-	    }
-
-	    /* remove from queue */
-	    if ( freeIt == 1 )
-	    {
-		unsigned long flags;
-		spin_lock_irqsave( &spinlock, flags );
-		if( head != NULL )
-		{
-		    struct StackElement *oldHead = head;
-		    head = head->next;
-		    two = head;
-		    free( oldHead );
-		}
-		spin_unlock_irqrestore( &spinlock, flags );
-	    }
-
-	    /* send next waiting event */
-	    if( two != NULL )
-		signalEvent( NULL );
-	    break;
-	case 1:	/* IT sys shutdown */
-	    printk( KERN_ALERT "mf.c: Commencing system shutdown\n" );
-	    shutdown();
-	    break;
-    }
-}
-
-/*
- * The primary partition VSP object is acknowledging the receipt
- * of a flow we sent to them.  If there are other flows queued
- * up, we must send another one now...
- */
-static void ackReceived( struct IoMFLpEvent * event )
-{
-    unsigned long flags;
-    struct StackElement * two = NULL;
-    unsigned long freeIt = 0;
-
-    /* handle current event */
-    if( head != NULL )
-    {
-	switch( event->xHvLpEvent.xSubtype )
-	{
-	    case 0:     /* CE msg */
-		if( event->xUnion.xCEMsgData.xCEMsg[3] == 0x40 )
-		{
-		    if ( event->xUnion.xCEMsgData.xCEMsg[2] != 0 )
-		    {
-			freeIt = 1;
-			if ( head->event.xUnion.xCEMsgData.xToken != 0 )
-			{
-			    CeMsgCompleteHandler xHdlr = head->event.xUnion.xCEMsgData.xToken->xHdlr;
-			    void * token = head->event.xUnion.xCEMsgData.xToken->xToken;
-
-			    if (xHdlr != NULL)
-				(*xHdlr)( token, &(event->xUnion.xCEMsgData) );
-			}
-		    }
-		}
-		else
-		{
-		    freeIt = 1;
-		}
-		break;
-	    case 4:	/* allocate */
-	    case 5:	/* deallocate */
-		if( head->hdlr != NULL )
-		{
-		    union SafeCast mySafeCast;
-		    mySafeCast.ptrAsU64 = event->xHvLpEvent.xCorrelationToken;
-		    (*head->hdlr)( mySafeCast.ptr, event->xUnion.xAllocData.xCount );
-		}
-		freeIt = 1;
-		break;
-	    case 6:
-		{
-		    struct VspRspData *rsp = (struct VspRspData *)event->xUnion.xVspCmd.xTokenUnion.ptr;
-
-		    if (rsp != NULL)
-		    {
-			if (rsp->xResponse != NULL)
-			    memcpy(rsp->xResponse, &(event->xUnion.xVspCmd), sizeof(event->xUnion.xVspCmd));
-			if (rsp->xSemaphore != NULL)
-			    up(rsp->xSemaphore);
-		    }
-		    else
-		    {
-			printk( KERN_ERR "mf.c: no rsp\n");
-		    }
-		    freeIt = 1;
-		}
-		break;
-	}
-    }
-    else
-	printk( KERN_ERR "mf.c: stack empty for receiving ack\n" );
-
-    /* remove from queue */
-    spin_lock_irqsave( &spinlock, flags );
-    if(( head != NULL ) && ( freeIt == 1 ))
-    {
-	struct StackElement *oldHead = head;
-	head = head->next;
-	two = head;
-	free( oldHead );
-    } 
-    spin_unlock_irqrestore( &spinlock, flags );
-
-    /* send next waiting event */
-    if( two != NULL )
-	signalEvent( NULL );
-}
-
-/*
- * This is the generic event handler we are registering with
- * the Hypervisor.  Ensure the flows are for us, and then
- * parse it enough to know if it is an interrupt or an
- * acknowledge.
- */
-static void hvHandler( struct HvLpEvent * event, struct pt_regs * regs )
-{
-    if( (event != NULL) && (event->xType == HvLpEvent_Type_MachineFac) )
-    {
-	switch( event->xFlags.xFunction )
-	{
-	    case HvLpEvent_Function_Ack:
-		ackReceived( (struct IoMFLpEvent *)event );
-		break;
-	    case HvLpEvent_Function_Int:
-		intReceived( (struct IoMFLpEvent *)event );
-		break;
-	    default:
-		printk( KERN_ERR "mf.c: non ack/int event received\n" );
-		break;
-	}
-    }
-    else
-	printk( KERN_ERR "mf.c: alien event received\n" );
-}
-
-/*
- * Global kernel interface to allocate and seed events into the
- * Hypervisor.
- */
-void mf_allocateLpEvents( HvLpIndex targetLp,
-			  HvLpEvent_Type type,
-			  unsigned size,
-			  unsigned count,
-			  MFCompleteHandler hdlr,
-			  void * userToken )
-{
-    struct StackElement * newElement = newStackElement();
-    int rc = 0;
-
-    if( newElement == NULL )
-	rc = -ENOMEM;
-    else
-    {
-	union SafeCast mine;
-	mine.ptr = userToken;
-	newElement->event.xHvLpEvent.xSubtype = 4;
-	newElement->event.xHvLpEvent.xCorrelationToken = mine.ptrAsU64;
-	newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('M'<<8)+('A'<<0);
-	newElement->event.xUnion.xAllocData.xTargetLp = targetLp;
-	newElement->event.xUnion.xAllocData.xType = type;
-	newElement->event.xUnion.xAllocData.xSize = size;
-	newElement->event.xUnion.xAllocData.xCount = count;
-	newElement->hdlr = hdlr;
-	rc = signalEvent(newElement);
-    }
-
-    if( (rc != 0) && (hdlr != NULL) )
-	(*hdlr)( userToken, rc );
-}
-
-/*
- * Global kernel interface to unseed and deallocate events already in
- * Hypervisor.
- */
-void mf_deallocateLpEvents( HvLpIndex targetLp,
-			    HvLpEvent_Type type,
-			    unsigned count,
-			    MFCompleteHandler hdlr,
-			    void * userToken )
-{
-    struct StackElement * newElement = newStackElement();
-    int rc = 0;
-
-    if( newElement == NULL )
-	rc = -ENOMEM;
-    else
-    {
-	union SafeCast mine;
-	mine.ptr = userToken;
-	newElement->event.xHvLpEvent.xSubtype = 5;
-	newElement->event.xHvLpEvent.xCorrelationToken = mine.ptrAsU64;
-	newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('M'<<8)+('D'<<0);
-	newElement->event.xUnion.xAllocData.xTargetLp = targetLp;
-	newElement->event.xUnion.xAllocData.xType = type;
-	newElement->event.xUnion.xAllocData.xCount = count;
-	newElement->hdlr = hdlr;
-	rc = signalEvent(newElement);
-    }
-
-    if( (rc != 0) && (hdlr != NULL) )
-	(*hdlr)( userToken, rc );
-}
-
-/*
- * Global kernel interface to tell the VSP object in the primary
- * partition to power this partition off.
- */
-void mf_powerOff( void )
-{
-    printk( KERN_ALERT "mf.c: Down it goes...\n" );
-    signalCEMsg( "\x00\x00\x00\x4D\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
-    for(;;);
-}
-
-/*
- * Global kernel interface to tell the VSP object in the primary
- * partition to reboot this partition.
- */
-void mf_reboot( void )
-{
-    printk( KERN_ALERT "mf.c: Preparing to bounce...\n" );
-    signalCEMsg( "\x00\x00\x00\x4E\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
-    for(;;);
-}
-
-/*
- * Display a single word SRC onto the VSP control panel.
- */
-void mf_displaySrc( u32 word )
-{
-    u8 ce[12];
-
-    memcpy( ce, "\x00\x00\x00\x4A\x00\x00\x00\x01\x00\x00\x00\x00", 12 );
-    ce[8] = word>>24;
-    ce[9] = word>>16;
-    ce[10] = word>>8;
-    ce[11] = word;
-    signalCEMsg( ce, NULL );
-}
-
-/*
- * Display a single word SRC of the form "PROGXXXX" on the VSP control panel.
- */
-void mf_displayProgress( u16 value )
-{
-    u8 ce[12];
-    u8 src[72];
-
-    memcpy( ce, "\x00\x00\x04\x4A\x00\x00\x00\x48\x00\x00\x00\x00", 12 );
-    memcpy( src,
-	    "\x01\x00\x00\x01"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "\x00\x00\x00\x00"
-	    "PROGxxxx"
-	    "                        ",
-	    72 );
-    src[6] = value>>8;
-    src[7] = value&255;
-    src[44] = "0123456789ABCDEF"[(value>>12)&15];
-    src[45] = "0123456789ABCDEF"[(value>>8)&15];
-    src[46] = "0123456789ABCDEF"[(value>>4)&15];
-    src[47] = "0123456789ABCDEF"[value&15];
-    dmaAndSignalCEMsg( ce, NULL, src, sizeof(src), 9*64*1024 );
-}
-
-/*
- * Clear the VSP control panel.  Used to "erase" an SRC that was
- * previously displayed.
- */
-void mf_clearSrc( void )
-{
-    signalCEMsg( "\x00\x00\x00\x4B\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
-}
-
-/*
- * Initialization code here.
- */
-void mf_init( void )
-{
-    int i;
-
-    /* initialize */
-    spin_lock_init( &spinlock );
-    for( i = 0; i < sizeof(prealloc)/sizeof(*prealloc); ++i )
-	free( &prealloc[i] );
-    HvLpEvent_registerHandler( HvLpEvent_Type_MachineFac, &hvHandler );
-
-    /* virtual continue ack */
-    signalCEMsg( "\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
-
-    /* initialization complete */
-    printk( KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities initialized\n" );
-
-    iSeries_proc_callback(&mf_proc_init);
-}
-
-void mf_setSide(char side)
-{
-    int rc = 0;
-    u64 newSide = 0;
-    struct VspCmdData myVspCmd;
-
-    memset(&myVspCmd, 0, sizeof(myVspCmd));
-    if (side == 'A')
-	newSide = 0;
-    else if (side == 'B')
-	newSide = 1;
-    else if (side == 'C')
-	newSide = 2; 
-    else
-	newSide = 3;
-
-    myVspCmd.xSubData.xFunction02SelectIplTypeIn.xIplType = newSide;
-    myVspCmd.xCmd = 10;
-
-    rc = signalVspInstruction(&myVspCmd);
-}
-
-char mf_getSide(void)
-{
-    char returnValue = ' ';
-    int rc = 0;
-    struct VspCmdData myVspCmd;
-
-    memset(&myVspCmd, 0, sizeof(myVspCmd));
-    myVspCmd.xCmd = 2;
-    myVspCmd.xSubData.xFunction02SelectIplTypeIn.xIplType = 0;
-    mb();
-    rc = signalVspInstruction(&myVspCmd);
-
-    if(rc != 0)
-    {
-	return returnValue;
-    }
-    else
-    {
-	if (myVspCmd.xRc == 0)
-	{
-	    if (myVspCmd.xSubData.xGetIplTypeOut.xIplType == 0)
-		returnValue = 'A';
-	    else if (myVspCmd.xSubData.xGetIplTypeOut.xIplType == 1)
-		returnValue = 'B';
-	    else if (myVspCmd.xSubData.xGetIplTypeOut.xIplType == 2)
-		returnValue = 'C';
-	    else
-		returnValue = 'D';
-	}
-    }
-
-    return returnValue;
-}
-
-void mf_getSrcHistory(char *buffer, int size)
-{
-    /*    struct IplTypeReturnStuff returnStuff;
-     struct StackElement * newElement = newStackElement();
-     int rc = 0;
-     char *pages[4];
-
-     pages[0] = kmalloc(4096, GFP_ATOMIC);
-     pages[1] = kmalloc(4096, GFP_ATOMIC);
-     pages[2] = kmalloc(4096, GFP_ATOMIC);
-     pages[3] = kmalloc(4096, GFP_ATOMIC);
-     if(( newElement == NULL ) || (pages[0] == NULL) || (pages[1] == NULL) || (pages[2] == NULL) || (pages[3] == NULL))
-     rc = -ENOMEM;
-     else
-     {
-     returnStuff.xType = 0;
-     returnStuff.xRc = 0;
-     returnStuff.xDone = 0;
-     newElement->event.xHvLpEvent.xSubtype = 6;
-     newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('V'<<8)+('I'<<0);
-     newElement->event.xUnion.xVspCmd.xEvent = &returnStuff;
-     newElement->event.xUnion.xVspCmd.xCmd = 4;
-     newElement->event.xUnion.xVspCmd.xLpIndex = HvLpConfig_getLpIndex();
-     newElement->event.xUnion.xVspCmd.xRc = 0xFF;
-     newElement->event.xUnion.xVspCmd.xReserved1 = 0;
-     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[0] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[0]));
-     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[1] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[1]));
-     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[2] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[2]));
-     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[3] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[3]));
-     mb();
-     rc = signalEvent(newElement);
-     }
-
-     if(rc != 0)
-     {
-     return;
-     }
-     else
-     {
-     while (returnStuff.xDone != 1)
-     {
-     udelay(10);
-     }
-
-     if (returnStuff.xRc == 0)
-     {
-     memcpy(buffer, pages[0], size);
-     }
-     }
-
-     kfree(pages[0]);
-     kfree(pages[1]);
-     kfree(pages[2]);
-     kfree(pages[3]);*/
-}
-
-void mf_setCmdLine(const char *cmdline, int size, u64 side)
-{
-    struct VspCmdData myVspCmd;
-    int rc = 0;
-    dma_addr_t dma_addr = 0;
-    char *page = pci_alloc_consistent(NULL, size, &dma_addr);
-
-    if (page == NULL) {
-	printk(KERN_ERR "mf.c: couldn't allocate memory to set command line\n");
-	return;
-    }
-
-    copy_from_user(page, cmdline, size);
-
-    memset(&myVspCmd, 0, sizeof(myVspCmd));
-    myVspCmd.xCmd = 31;
-    myVspCmd.xSubData.xSetKernelCmdLineIn.xToken = dma_addr;
-    myVspCmd.xSubData.xSetKernelCmdLineIn.xAddressType = HvLpDma_AddressType_TceIndex;
-    myVspCmd.xSubData.xSetKernelCmdLineIn.xSide = side;
-    myVspCmd.xSubData.xSetKernelCmdLineIn.xTransferLength = size;
-    mb();
-    rc = signalVspInstruction(&myVspCmd);
-
-    pci_free_consistent(NULL, size, page, dma_addr);
-}
-
-int mf_getCmdLine(char *cmdline, int *size, u64 side)
-{
-    struct VspCmdData myVspCmd;
-    int rc = 0;
-    int len = *size;
-    dma_addr_t dma_addr = pci_map_single(NULL, cmdline, *size, PCI_DMA_FROMDEVICE);
-
-    memset(cmdline, 0, *size);
-    memset(&myVspCmd, 0, sizeof(myVspCmd));
-    myVspCmd.xCmd = 33;
-    myVspCmd.xSubData.xGetKernelCmdLineIn.xToken = dma_addr;
-    myVspCmd.xSubData.xGetKernelCmdLineIn.xAddressType = HvLpDma_AddressType_TceIndex;
-    myVspCmd.xSubData.xGetKernelCmdLineIn.xSide = side;
-    myVspCmd.xSubData.xGetKernelCmdLineIn.xTransferLength = *size;
-    mb();
-    rc = signalVspInstruction(&myVspCmd);
-
-    if ( ! rc ) {
-
-	if (myVspCmd.xRc == 0)
-	{
-	    len = myVspCmd.xSubData.xGetKernelCmdLineOut.xTransferLength;
-	}
-	//	else
-	    //	{
-	    //	    memcpy(cmdline, "Bad cmdline", 11);
-	    //	}
-    }
-
-    pci_unmap_single(NULL, dma_addr, *size, PCI_DMA_FROMDEVICE);
-
-    return len;
-}
-
-
-int mf_setVmlinuxChunk(const char *buffer, int size, int offset, u64 side)
-{
-    struct VspCmdData myVspCmd;
-    int rc = 0;
-
-    dma_addr_t dma_addr = 0;
-
-    char *page = pci_alloc_consistent(NULL, size, &dma_addr);
-
-    if (page == NULL) {
-	printk(KERN_ERR "mf.c: couldn't allocate memory to set vmlinux chunk\n");
-	return -ENOMEM;
-    }
-
-    if (copy_from_user(page, buffer, size)) {
-	    rc = -EFAULT;
-	    goto out;
-    }
-    memset(&myVspCmd, 0, sizeof(myVspCmd));
-
-    myVspCmd.xCmd = 30;
-    myVspCmd.xSubData.xGetKernelImageIn.xToken = dma_addr;
-    myVspCmd.xSubData.xGetKernelImageIn.xAddressType = HvLpDma_AddressType_TceIndex;
-    myVspCmd.xSubData.xGetKernelImageIn.xSide = side;
-    myVspCmd.xSubData.xGetKernelImageIn.xOffset = offset;
-    myVspCmd.xSubData.xGetKernelImageIn.xTransferLength = size;
-    mb();
-    rc = signalVspInstruction(&myVspCmd);
-
-    if(rc == 0)
-    {
-	if (myVspCmd.xRc == 0)
-	{
-	    rc = 0;
-	}
-	else
-	{
-	    rc = -ENOMEM;
-	}
-    }
-out:
-    pci_free_consistent(NULL, size, page, dma_addr);
-
-    return rc;
-}
-
-int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side)
-{
-    struct VspCmdData myVspCmd;
-    int rc = 0;
-    int len = *size;
-
-    dma_addr_t dma_addr = pci_map_single(NULL, buffer, *size, PCI_DMA_FROMDEVICE);
-
-    memset(buffer, 0, len);
-
-    memset(&myVspCmd, 0, sizeof(myVspCmd));
-    myVspCmd.xCmd = 32;
-    myVspCmd.xSubData.xGetKernelImageIn.xToken = dma_addr;
-    myVspCmd.xSubData.xGetKernelImageIn.xAddressType = HvLpDma_AddressType_TceIndex;
-    myVspCmd.xSubData.xGetKernelImageIn.xSide = side;
-    myVspCmd.xSubData.xGetKernelImageIn.xOffset = offset;
-    myVspCmd.xSubData.xGetKernelImageIn.xTransferLength = len;
-    mb();
-    rc = signalVspInstruction(&myVspCmd);
-
-    if(rc == 0)
-    {
-	if (myVspCmd.xRc == 0)
-	{
-	    *size = myVspCmd.xSubData.xGetKernelImageOut.xTransferLength;
-	}
-	else
-	{
-	    rc = -ENOMEM;
-	}
-    }
-
-    pci_unmap_single(NULL, dma_addr, *size, PCI_DMA_FROMDEVICE);
-
-    return rc;
-}
-
-int mf_setRtcTime(unsigned long time)
-{
-    struct rtc_time tm;
-
-    to_tm(time, &tm);
-
-    return mf_setRtc( &tm );
-}
-
-struct RtcTimeData
-{
-    struct semaphore *xSemaphore;
-    struct CeMsgData xCeMsg;
-    int xRc;
-};
-
-void getRtcTimeComplete(void * token, struct CeMsgData *ceMsg)
-{
-    struct RtcTimeData *rtc = (struct RtcTimeData *)token;
-
-    memcpy(&(rtc->xCeMsg), ceMsg, sizeof(rtc->xCeMsg));
-
-    rtc->xRc = 0;
-    up(rtc->xSemaphore);
-}
-
-static unsigned long lastsec = 1;
-
-int mf_getRtcTime(unsigned long *time)
-{
-//    unsigned long usec, tsec;
-	
-    u32 dataWord1 = *((u32 *)(&xSpCommArea.xBcdTimeAtIplStart));
-    u32 dataWord2 = *(((u32 *)&(xSpCommArea.xBcdTimeAtIplStart)) + 1);
-    int year = 1970;
-    int year1 = ( dataWord1 >> 24 ) & 0x000000FF;
-    int year2 = ( dataWord1 >> 16 ) & 0x000000FF;
-    int sec = ( dataWord1 >> 8 ) & 0x000000FF;
-    int min = dataWord1 & 0x000000FF;
-    int hour = ( dataWord2 >> 24 ) & 0x000000FF;
-    int day = ( dataWord2 >> 8 ) & 0x000000FF;
-    int mon = dataWord2 & 0x000000FF;
-
-    BCD_TO_BIN(sec);
-    BCD_TO_BIN(min);
-    BCD_TO_BIN(hour);
-    BCD_TO_BIN(day);
-    BCD_TO_BIN(mon);
-    BCD_TO_BIN(year1);
-    BCD_TO_BIN(year2);
-    year = year1 * 100 + year2;
-
-    *time = mktime(year, mon, day, hour, min, sec);
-
-    *time += ( jiffies / HZ );
-    
-    // Now THIS is a nasty hack!
-    // It ensures that the first two calls to mf_getRtcTime get different
-    // answers.  That way the loop in init_time (time.c) will not think
-    // the clock is stuck.
-    if ( lastsec ) {
-	    *time -= lastsec;
-	    --lastsec;
-    }
-    
-    return 0;
-
-}
-
-int mf_getRtc( struct rtc_time * tm )
-{
-
-    struct CeMsgCompleteData ceComplete;
-    struct RtcTimeData rtcData;
-    int rc = 0;
-    DECLARE_MUTEX_LOCKED(Semaphore);
-
-    memset(&ceComplete, 0, sizeof(ceComplete));
-    memset(&rtcData, 0, sizeof(rtcData));
-
-    rtcData.xSemaphore = &Semaphore;
-
-    ceComplete.xHdlr = &getRtcTimeComplete;
-    ceComplete.xToken = (void *)&rtcData;
-
-    rc = signalCEMsg( "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", &ceComplete );
-
-    if ( rc == 0 )
-    {
-	down(&Semaphore);
-
-	if ( rtcData.xRc == 0)
-	{
-	    if ( ( rtcData.xCeMsg.xCEMsg[2] == 0xa9 ) ||
-	         ( rtcData.xCeMsg.xCEMsg[2] == 0xaf ) ) {
-		/* TOD clock is not set */
-		tm->tm_sec = 1;
-		tm->tm_min = 1;
-		tm->tm_hour = 1;
-		tm->tm_mday = 10;
-		tm->tm_mon = 8;
-		tm->tm_year = 71;
-		mf_setRtc( tm );
-	    }
-	    {
-	    u32 dataWord1 = *((u32 *)(rtcData.xCeMsg.xCEMsg+4));
-	    u32 dataWord2 = *((u32 *)(rtcData.xCeMsg.xCEMsg+8));
-	    u8 year = (dataWord1 >> 16 ) & 0x000000FF;
-	    u8 sec = ( dataWord1 >> 8 ) & 0x000000FF;
-	    u8 min = dataWord1 & 0x000000FF;
-	    u8 hour = ( dataWord2 >> 24 ) & 0x000000FF;
-	    u8 day = ( dataWord2 >> 8 ) & 0x000000FF;
-	    u8 mon = dataWord2 & 0x000000FF;
-
-	    BCD_TO_BIN(sec);
-	    BCD_TO_BIN(min);
-	    BCD_TO_BIN(hour);
-	    BCD_TO_BIN(day);
-	    BCD_TO_BIN(mon);
-	    BCD_TO_BIN(year);
-
-	    if ( year <= 69 )
-		    year += 100;
-	    
-	    tm->tm_sec = sec;
-	    tm->tm_min = min;
-	    tm->tm_hour = hour;
-	    tm->tm_mday = day;
-	    tm->tm_mon = mon;
-	    tm->tm_year = year;
-	    }
-	}
-	else
-	{
-	    rc = rtcData.xRc;
-	    tm->tm_sec = 0;
-	    tm->tm_min = 0;
-	    tm->tm_hour = 0;
-	    tm->tm_mday = 15;
-	    tm->tm_mon = 5;
-	    tm->tm_year = 52;
-
-	}
-	tm->tm_wday = 0;
-	tm->tm_yday = 0;
-	tm->tm_isdst = 0;
-
-    }
-
-    return rc;
-
-}
-
-int mf_setRtc(struct rtc_time * tm)
-{
-    char ceTime[12] = "\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00";
-    int rc = 0;
-    u8 day, mon, hour, min, sec, y1, y2;
-    unsigned year;
-    
-    year = 1900 + tm->tm_year;
-    y1 = year / 100;
-    y2 = year % 100;
-    
-    sec = tm->tm_sec;
-    min = tm->tm_min;
-    hour = tm->tm_hour;
-    day = tm->tm_mday;
-    mon = tm->tm_mon + 1;
-	    
-    BIN_TO_BCD(sec);
-    BIN_TO_BCD(min);
-    BIN_TO_BCD(hour);
-    BIN_TO_BCD(mon);
-    BIN_TO_BCD(day);
-    BIN_TO_BCD(y1);
-    BIN_TO_BCD(y2);
-
-    ceTime[4] = y1;
-    ceTime[5] = y2;
-    ceTime[6] = sec;
-    ceTime[7] = min;
-    ceTime[8] = hour;
-    ceTime[10] = day;
-    ceTime[11] = mon;
-   
-    rc = signalCEMsg( ceTime, NULL );
-
-    return rc;
-}
-
-
-
diff -Nru a/arch/ppc/iSeries/mf_proc.c b/arch/ppc/iSeries/mf_proc.c
--- a/arch/ppc/iSeries/mf_proc.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,309 +0,0 @@
-/*
- * mf_proc.c
- * Copyright (C) 2001 Kyle A. Lucke  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.
- * 
- * 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
- */
-
-
-/* Change Activity: */
-/* End Change Activity */
-
-#ifndef _MF_PROC_H
-#include <asm/iSeries/mf_proc.h>
-#endif
-#ifndef MF_H_INCLUDED
-#include <asm/iSeries/mf.h>
-#endif
-#include <asm/uaccess.h>
-
-static struct proc_dir_entry *mf_proc_root = NULL;
-
-int proc_mf_dump_cmdline
-(char *page, char **start, off_t off, int count, int *eof, void *data);
-
-int proc_mf_dump_vmlinux
-(char *page, char **start, off_t off, int count, int *eof, void *data);
-
-int proc_mf_dump_side
-(char *page, char **start, off_t off, int count, int *eof, void *data);
-
-int proc_mf_change_side
-(struct file *file, const char *buffer, unsigned long count, void *data);
-
-int proc_mf_dump_src
-(char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_mf_change_src (struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_mf_change_cmdline(struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_mf_change_vmlinux(struct file *file, const char *buffer, unsigned long count, void *data);
-
-
-void mf_proc_init(struct proc_dir_entry *iSeries_proc)
-{
-    struct proc_dir_entry *ent = NULL;
-    struct proc_dir_entry *mf_a = NULL;
-    struct proc_dir_entry *mf_b = NULL;
-    struct proc_dir_entry *mf_c = NULL;
-    struct proc_dir_entry *mf_d = NULL;
-
-    mf_proc_root = proc_mkdir("mf", iSeries_proc);
-    if (!mf_proc_root) return;
-
-    mf_a = proc_mkdir("A", mf_proc_root);
-    if (!mf_a) return;
-
-    ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_a);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_mf_dump_cmdline;
-    ent->write_proc = proc_mf_change_cmdline;
-
-    ent = create_proc_entry("vmlinux", S_IFREG|S_IRUSR|S_IWUSR, mf_a);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_mf_dump_vmlinux;
-    ent->write_proc = proc_mf_change_vmlinux;
-
-    mf_b = proc_mkdir("B", mf_proc_root);
-    if (!mf_b) return;
-
-    ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_b);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)1;
-    ent->read_proc = proc_mf_dump_cmdline;
-    ent->write_proc = proc_mf_change_cmdline;
-
-    ent = create_proc_entry("vmlinux", S_IFREG|S_IRUSR|S_IWUSR, mf_b);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)1;
-    ent->read_proc = proc_mf_dump_vmlinux;
-    ent->write_proc = proc_mf_change_vmlinux;
-
-    mf_c = proc_mkdir("C", mf_proc_root);
-    if (!mf_c) return;
-
-    ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_c);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)2;
-    ent->read_proc = proc_mf_dump_cmdline;
-    ent->write_proc = proc_mf_change_cmdline;
-
-    ent = create_proc_entry("vmlinux", S_IFREG|S_IRUSR|S_IWUSR, mf_c);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)2;
-    ent->read_proc = proc_mf_dump_vmlinux;
-    ent->write_proc = proc_mf_change_vmlinux;
-
-    mf_d = proc_mkdir("D", mf_proc_root);
-    if (!mf_d) return;
-
-
-    ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_d);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)3;
-    ent->read_proc = proc_mf_dump_cmdline;
-    ent->write_proc = proc_mf_change_cmdline;
-
-    ent = create_proc_entry("vmlinux", S_IFREG|S_IRUSR, mf_d);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)3;
-    ent->read_proc = proc_mf_dump_vmlinux;
-    ent->write_proc = NULL;
-
-    ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_mf_dump_side;
-    ent->write_proc = proc_mf_change_side;
-
-    ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_mf_dump_src;
-    ent->write_proc = proc_mf_change_src;
-
-
-}
-
-int proc_mf_dump_cmdline
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-    int		len = count;
-    char *p;
-    
-    len = mf_getCmdLine(page, &len, (u64)(int)data);
-   
-    p = page + len - 1;
-    while ( p > page ) {
-	if ( (*p == 0) || (*p == ' ') )
-	    --p;
-	else
-	    break;
-    }
-    if ( *p != '\n' ) {
-	++p;
-	*p = '\n';
-    }
-    ++p;
-    *p = 0;
-    len = p - page;
-    
-    len -= off;			
-    if (len < count) {		
-	*eof = 1;		
-	if (len <= 0)		
-	    return 0;	
-    } else				
-	len = count;		
-    *start = page + off;		
-    return len;			
-}
-
-int proc_mf_dump_vmlinux
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-    int sizeToGet = count;
-    if (!capable(CAP_SYS_ADMIN))
-	return -EACCES;
-
-    if (mf_getVmlinuxChunk(page, &sizeToGet, off, (u64)(int)data) == 0)
-    {
-	if (sizeToGet != 0)
-	{
-	    *start = page + off;
-	    printk("mf_proc.c: got count %d off %d\n", sizeToGet, (int)off);
-	    return sizeToGet;
-	}
-	else
-	{
-	    printk("mf_proc.c: eof\n");
-	    *eof = 1;
-	    return 0;
-	}
-    }
-    else
-    {
-	printk("mf_proc.c: eof\n");
-	*eof = 1;
-	return 0;
-    }
-}
-
-
-int proc_mf_dump_side
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-    int		len = 0;
-
-    char mf_current_side = mf_getSide();
-    len = sprintf(page, "%c\n", mf_current_side);
-
-    if (len <= off+count) *eof = 1;
-    *start = page + off;
-    len -= off;
-    if (len>count) len = count;
-    if (len<0) len = 0;
-    return len;			
-}
-
-int proc_mf_change_side(struct file *file, const char *buffer, unsigned long count, void *data)
-{
-    if (!capable(CAP_SYS_ADMIN))
-	return -EACCES;
-
-    if ((*buffer != 'A') &&
-	(*buffer != 'B') &&
-	(*buffer != 'C') &&
-	(*buffer != 'D'))
-    {
-	printk(KERN_ERR "mf_proc.c: proc_mf_change_side: invalid side\n");
-	return -EINVAL;
-    }
-
-    mf_setSide(*buffer);
-
-    return count;			
-}
-
-int proc_mf_dump_src
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-    int		len = 0;
-    mf_getSrcHistory(page, count);
-    len = count;
-    len -= off;			
-    if (len < count) {		
-	*eof = 1;		
-	if (len <= 0)		
-	    return 0;	
-    } else				
-	len = count;		
-    *start = page + off;		
-    return len;			
-}
-
-int proc_mf_change_src(struct file *file, const char *buffer, unsigned long count, void *data)
-{
-    if (!capable(CAP_SYS_ADMIN))
-	return -EACCES;
-
-    if ((count < 4) && (count != 1))
-    {
-	printk(KERN_ERR "mf_proc: invalid src\n");
-	return -EINVAL;
-    }
-
-    if ((count == 1) && ((*buffer) == '\0'))
-    {
-	mf_clearSrc();
-    }
-    else
-    {
-	mf_displaySrc(*(u32 *)buffer);
-    }
-
-    return count;			
-}
-
-int proc_mf_change_cmdline(struct file *file, const char *buffer, unsigned long count, void *data)
-{
-    if (!capable(CAP_SYS_ADMIN))
-	return -EACCES;
-
-    mf_setCmdLine(buffer, count, (u64)(int)data);
-
-    return count;			
-}
-
-int proc_mf_change_vmlinux(struct file *file, const char *buffer, unsigned long count, void *data)
-{
-    if (!capable(CAP_SYS_ADMIN))
-	return -EACCES;
-
-    mf_setVmlinuxChunk(buffer, count, file->f_pos, (u64)(int)data);
-    file->f_pos += count;
-
-    return count;			
-}
diff -Nru a/arch/ppc/iSeries/pmc_proc.c b/arch/ppc/iSeries/pmc_proc.c
--- a/arch/ppc/iSeries/pmc_proc.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,647 +0,0 @@
-/*
- * pmc_proc.c
- * Copyright (C) 2001 Mike Corrigan  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.
- * 
- * 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
- */
-
-
-/* Change Activity: */
-/* End Change Activity */
-
-#ifndef _PMC_PROC_H
-#include <asm/iSeries/pmc_proc.h>
-#endif
-
-#include <asm/iSeries/Paca.h>
-#include <asm/iSeries/ItLpPaca.h>
-#include <asm/iSeries/ItLpQueue.h>
-#include <asm/processor.h>
-
-#define MMCR0 795
-#define MMCR1 798
-#define MMCRA 786
-#define PMC1  787
-#define PMC2  788
-#define PMC3  789
-#define PMC4  790
-#define PMC5  791
-#define PMC6  792
-#define PMC7  793
-#define PMC8  794
-
-static int proc_pmc_control_mode = 0;
-#define PMC_CONTROL_CPI 1
-#define PMC_CONTROL_TLB 2
-
-static struct proc_dir_entry *pmc_proc_root = NULL;
-
-int proc_get_lpevents( char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_reset_lpevents( struct file *file, const char *buffer, unsigned long count, void *data);
-
-int proc_pmc_get_control( char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_mmcr0( char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_mmcr1( char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_mmcra( char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc1(  char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc2(  char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc3(  char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc4(  char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc5(  char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc6(  char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc7(  char *page, char **start, off_t off, int count, int *eof, void *data);
-int proc_pmc_get_pmc8(  char *page, char **start, off_t off, int count, int *eof, void *data);
-
-int proc_pmc_set_control( struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_mmcr0( struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_mmcr1( struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_mmcra( struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc1(  struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc2(  struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc3(  struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc4(  struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc5(  struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc6(  struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc7(  struct file *file, const char *buffer, unsigned long count, void *data);
-int proc_pmc_set_pmc8(  struct file *file, const char *buffer, unsigned long count, void *data);
-
-void pmc_proc_init(struct proc_dir_entry *iSeries_proc)
-{
-    struct proc_dir_entry *ent = NULL;
-
-    ent = create_proc_entry("lpevents", S_IFREG|S_IRUGO, iSeries_proc);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_get_lpevents;
-    ent->write_proc = proc_reset_lpevents;
-    
-    pmc_proc_root = proc_mkdir("pmc", iSeries_proc);
-    if (!pmc_proc_root) return;
-
-    ent = create_proc_entry("control", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_control;
-    ent->write_proc = proc_pmc_set_control;
-    
-    ent = create_proc_entry("mmcr0", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_mmcr0;
-    ent->write_proc = proc_pmc_set_mmcr0;
-
-    ent = create_proc_entry("mmcr1", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_mmcr1;
-    ent->write_proc = proc_pmc_set_mmcr1;
-
-    ent = create_proc_entry("mmcra", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_mmcra;
-    ent->write_proc = proc_pmc_set_mmcra;
-
-    ent = create_proc_entry("pmc1", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc1;
-    ent->write_proc = proc_pmc_set_pmc1;
-
-    ent = create_proc_entry("pmc2", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc2;
-    ent->write_proc = proc_pmc_set_pmc2;
-
-    ent = create_proc_entry("pmc3", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc3;
-    ent->write_proc = proc_pmc_set_pmc3;
-
-    ent = create_proc_entry("pmc4", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc4;
-    ent->write_proc = proc_pmc_set_pmc4;
-
-    ent = create_proc_entry("pmc5", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc5;
-    ent->write_proc = proc_pmc_set_pmc5;
-
-    ent = create_proc_entry("pmc6", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc6;
-    ent->write_proc = proc_pmc_set_pmc6;
-
-    ent = create_proc_entry("pmc7", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc7;
-    ent->write_proc = proc_pmc_set_pmc7;
-
-    ent = create_proc_entry("pmc8", S_IFREG|S_IRUSR|S_IWUSR, pmc_proc_root);
-    if (!ent) return;
-    ent->nlink = 1;
-    ent->data = (void *)0;
-    ent->read_proc = proc_pmc_get_pmc8;
-    ent->write_proc = proc_pmc_set_pmc8;
-
-
-}
-
-static int pmc_calc_metrics( char *page, char **start, off_t off, int count, int *eof, int len)
-{
-	if ( len <= off+count)
-		*eof = 1;
-	*start = page+off;
-	len -= off;
-	if ( len > count )
-		len = count;
-	if ( len < 0 )
-		len = 0;
-	return len;
-}
-
-static char * lpEventTypes[9] = {
-	"Hypervisor\t\t",
-	"Machine Facilities\t",
-	"Session Manager\t",
-	"SPD I/O\t\t",
-	"Virtual Bus\t\t",
-	"PCI I/O\t\t",
-	"RIO I/O\t\t",
-	"Virtual Lan\t\t",
-	"Virtual I/O\t\t"
-	};
-	
-
-int proc_get_lpevents
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	unsigned i;
-	int len = 0;
-
-	len += sprintf( page+len, "LpEventQueue 0\n" );
-	len += sprintf( page+len, "  events processed:\t%lu\n",
-			(unsigned long)xItLpQueue.xLpIntCount );
-	for (i=0; i<9; ++i) {
-		len += sprintf( page+len, "    %s %10lu\n",
-			lpEventTypes[i],
-			(unsigned long)xItLpQueue.xLpIntCountByType[i] );
-	}
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-
-}
-
-int proc_reset_lpevents( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	return count;
-}
-	
-int proc_pmc_get_control
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = 0;
-
-	if ( proc_pmc_control_mode == PMC_CONTROL_CPI ) {
-		unsigned long mach_cycles   = mfspr( PMC5 );
-		unsigned long inst_complete = mfspr( PMC4 );
-		unsigned long inst_dispatch = mfspr( PMC3 );
-		unsigned long thread_active_run = mfspr( PMC1 );
-		unsigned long thread_active  = mfspr( PMC2 );
-		unsigned long cpi = 0;
-		unsigned long cpithou = 0;
-		unsigned long remain;
-	
-		if ( inst_complete ) {
-			cpi = thread_active_run / inst_complete;
-			remain = thread_active_run % inst_complete;
-			if ( inst_complete > 1000000 ) 
-				cpithou = remain / ( inst_complete / 1000 );
-			else 
-				cpithou = ( remain * 1000 ) / inst_complete;
-		}
-		len += sprintf( page+len, "PMC CPI Mode\nRaw Counts\n" );
-		len += sprintf( page+len, "machine cycles           : %12lu\n", mach_cycles );
-		len += sprintf( page+len, "thread active cycles     : %12lu\n\n", thread_active );
-
-		len += sprintf( page+len, "instructions completed   : %12lu\n", inst_complete );
-		len += sprintf( page+len, "instructions dispatched  : %12lu\n", inst_dispatch );
-		len += sprintf( page+len, "thread active run cycles : %12lu\n", thread_active_run );
-
-		len += sprintf( page+len, "thread active run cycles/instructions completed\n" );
-		len += sprintf( page+len, "CPI = %lu.%03lu\n", cpi, cpithou );
-		
-	}
-	else if ( proc_pmc_control_mode == PMC_CONTROL_TLB ) {
-		len += sprintf( page+len, "PMC TLB Mode\n" );
-		len += sprintf( page+len, "I-miss count             : %12u\n", mfspr( PMC1 ) );
-		len += sprintf( page+len, "I-miss latency           : %12u\n", mfspr( PMC2 ) );
-		len += sprintf( page+len, "D-miss count             : %12u\n", mfspr( PMC3 ) );
-		len += sprintf( page+len, "D-miss latency           : %12u\n", mfspr( PMC4 ) );
-		len += sprintf( page+len, "IERAT miss count         : %12u\n", mfspr( PMC5 ) );
-		len += sprintf( page+len, "D-reference count        : %12u\n", mfspr( PMC6 ) );
-		len += sprintf( page+len, "miss PTEs searched       : %12u\n", mfspr( PMC7 ) );
-		len += sprintf( page+len, "miss >8 PTEs searched    : %12u\n", mfspr( PMC8 ) );
-	}
-	/* IMPLEMENT ME */
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_mmcr0
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(MMCR0) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_mmcr1
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(MMCR1) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_mmcra
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(MMCRA) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc1
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC1) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc2
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC2) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc3
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC3) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc4
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC4) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc5
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC5) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc6
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC6) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc7
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC7) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-int proc_pmc_get_pmc8
-(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-	int len = sprintf( page, "0x%08x", mfspr(PMC8) );
-	return pmc_calc_metrics( page, start, off, count, eof, len );
-}
-
-unsigned long proc_pmc_conv_int( const char *buf, unsigned count )
-{
-	const char * p;
-	char b0, b1;
-	unsigned v, multiplier, mult, i;
-	unsigned long val;
-	multiplier = 10;
-	p = buf;
-	if ( count >= 3 ) {
-		b0 = buf[0];
-		b1 = buf[1];
-		if ( ( b0 == '0' ) &&
-		     ( ( b1 == 'x' ) || ( b1 == 'X' ) ) ) {
-			p = buf + 2;
-			count -= 2;
-			multiplier = 16;
-		}
-			
-	}
-	val = 0;
-	for ( i=0; i<count; ++i ) {
-		b0 = *p++;
-		v = 0;
-		mult = multiplier;
-		if ( ( b0 >= '0' ) && ( b0 <= '9' ) ) 
-			v = b0 - '0';
-		else if ( multiplier == 16 ) {
-			if ( ( b0 >= 'a' ) && ( b0 <= 'f' ) )
-				v = b0 - 'a' + 10;
-			else if ( ( b0 >= 'A' ) && ( b0 <= 'F' ) )
-				v = b0 - 'A' + 10;
-			else 
-				mult = 1;
-		}
-		else
-			mult = 1;
-		val *= mult;
-		val += v;
-	}
-
-	return val;
-
-}
-
-static inline void proc_pmc_stop(void)
-{
-	// Freeze all counters, leave everything else alone
-	mtspr( MMCR0, mfspr( MMCR0 ) | 0x80000000 );
-}
-
-static inline void proc_pmc_start(void)
-{
-	// Unfreeze all counters, leave everything else alone
-	mtspr( MMCR0, mfspr( MMCR0 ) & ~0x80000000 );
-
-}
-
-static inline void proc_pmc_reset(void)
-{
-	// Clear all the PMCs to zero
-	// Assume a "stop" has already frozen the counters
-	// Clear all the PMCs
-	mtspr( PMC1, 0 );
-	mtspr( PMC2, 0 );
-	mtspr( PMC3, 0 );
-	mtspr( PMC4, 0 );
-	mtspr( PMC5, 0 );
-	mtspr( PMC6, 0 );
-	mtspr( PMC7, 0 );
-	mtspr( PMC8, 0 );
-
-}
-
-static inline void proc_pmc_cpi(void)
-{
-	/* Configure the PMC registers to count cycles and instructions */
-	/* so we can compute cpi */
-	/*
-	 * MMCRA[30]    = 1     Don't count in wait state (CTRL[31]=0)
-	 * MMCR0[6]     = 1     Freeze counters when any overflow
-	 * MMCR0[19:25] = 0x01  PMC1 counts Thread Active Run Cycles
-	 * MMCR0[26:31] = 0x05	PMC2 counts Thread Active Cycles
-	 * MMCR1[0:4]   = 0x07	PMC3 counts Instructions Dispatched
-	 * MMCR1[5:9]   = 0x03	PMC4 counts Instructions Completed
-	 * MMCR1[10:14] = 0x06	PMC5 counts Machine Cycles
-	 *
-	 */
-
-	proc_pmc_control_mode = PMC_CONTROL_CPI;
-	
-	// Indicate to hypervisor that we are using the PMCs
-	((struct Paca *)mfspr(SPRG1))->xLpPacaPtr->xPMCRegsInUse = 1;
-
-	// Freeze all counters
-	mtspr( MMCR0, 0x80000000 );
-	mtspr( MMCR1, 0x00000000 );
-	
-	// Clear all the PMCs
-	mtspr( PMC1, 0 );
-	mtspr( PMC2, 0 );
-	mtspr( PMC3, 0 );
-	mtspr( PMC4, 0 );
-	mtspr( PMC5, 0 );
-	mtspr( PMC6, 0 );
-	mtspr( PMC7, 0 );
-	mtspr( PMC8, 0 );
-
-	// Freeze counters in Wait State (CTRL[31]=0)
-	mtspr( MMCRA, 0x00000002 );
-
-	// PMC3<-0x07, PMC4<-0x03, PMC5<-0x06
-	mtspr( MMCR1, 0x38cc0000 );
-
-	mb();
-	
-	// PMC1<-0x01, PMC2<-0x05
-	// Start all counters
-	mtspr( MMCR0, 0x02000045 );
-	
-}
-
-static inline void proc_pmc_tlb(void)
-{
-	/* Configure the PMC registers to count tlb misses  */
-	/*
-	 * MMCR0[6]     = 1     Freeze counters when any overflow
-	 * MMCR0[19:25] = 0x55  Group count
-	 *   PMC1 counts  I misses
-	 *   PMC2 counts  I miss duration (latency)
-	 *   PMC3 counts  D misses
-	 *   PMC4 counts  D miss duration (latency)
-	 *   PMC5 counts  IERAT misses
-	 *   PMC6 counts  D references (including PMC7)
-	 *   PMC7 counts  miss PTEs searched
-	 *   PMC8 counts  miss >8 PTEs searched
-	 *   
-	 */
-
-	proc_pmc_control_mode = PMC_CONTROL_TLB;
-	
-	// Indicate to hypervisor that we are using the PMCs
-	((struct Paca *)mfspr(SPRG1))->xLpPacaPtr->xPMCRegsInUse = 1;
-
-	// Freeze all counters
-	mtspr( MMCR0, 0x80000000 );
-	mtspr( MMCR1, 0x00000000 );
-	
-	// Clear all the PMCs
-	mtspr( PMC1, 0 );
-	mtspr( PMC2, 0 );
-	mtspr( PMC3, 0 );
-	mtspr( PMC4, 0 );
-	mtspr( PMC5, 0 );
-	mtspr( PMC6, 0 );
-	mtspr( PMC7, 0 );
-	mtspr( PMC8, 0 );
-
-	mtspr( MMCRA, 0x00000000 );
-
-	mb();
-	
-	// PMC1<-0x55
-	// Start all counters
-	mtspr( MMCR0, 0x02001540 );
-	
-}
-
-int proc_pmc_set_control( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	if      ( ! strncmp( buffer, "stop", 4 ) )
-		proc_pmc_stop();
-	else if ( ! strncmp( buffer, "start", 5 ) )
-		proc_pmc_start();
-	else if ( ! strncmp( buffer, "reset", 5 ) )
-		proc_pmc_reset();
-	else if ( ! strncmp( buffer, "cpi", 3 ) )
-		proc_pmc_cpi();
-	else if ( ! strncmp( buffer, "tlb", 3 ) )
-		proc_pmc_tlb();
-	
-	/* IMPLEMENT ME */
-	return count;
-}
-
-int proc_pmc_set_mmcr0( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	v = v & ~0x04000000;	/* Don't allow interrupts for now */
-	if ( v & ~0x80000000 ) 	/* Inform hypervisor we are using PMCs */
-		((struct Paca *)mfspr(SPRG1))->xLpPacaPtr->xPMCRegsInUse = 1;
-	else
-		((struct Paca *)mfspr(SPRG1))->xLpPacaPtr->xPMCRegsInUse = 0;
-	mtspr( MMCR0, v );
-	
-	return count;	
-}
-
-int proc_pmc_set_mmcr1( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( MMCR1, v );
-
-	return count;
-}
-
-int proc_pmc_set_mmcra( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	v = v & ~0x00008000;	/* Don't allow interrupts for now */
-	mtspr( MMCRA, v );
-
-	return count;
-}
-
-
-int proc_pmc_set_pmc1( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC1, v );
-
-	return count;
-}
-
-int proc_pmc_set_pmc2( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC2, v );
-
-	return count;
-}
-
-int proc_pmc_set_pmc3( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC3, v );
-
-	return count;
-}
-
-int proc_pmc_set_pmc4( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC4, v );
-
-	return count;
-}
-
-int proc_pmc_set_pmc5( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC5, v );
-
-	return count;
-}
-
-int proc_pmc_set_pmc6( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC6, v );
-
-	return count;
-}
-
-int proc_pmc_set_pmc7( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC7, v );
-
-	return count;
-}
-
-int proc_pmc_set_pmc8( struct file *file, const char *buffer, unsigned long count, void *data )
-{
-	unsigned long v;
-	v = proc_pmc_conv_int( buffer, count );
-	mtspr( PMC8, v );
-
-	return count;
-}
-
-
diff -Nru a/arch/ppc/iSeries/rtc.c b/arch/ppc/iSeries/rtc.c
--- a/arch/ppc/iSeries/rtc.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,265 +0,0 @@
-/*
- *	Real Time Clock interface for IBM iSeries	
- *
- *	Based on rtc.c by Paul Gortmaker
- *
- *	This driver allows use of the real time clock
- *	from user space. It exports the /dev/rtc
- *	interface supporting various ioctl() and also the
- *	/proc/driver/rtc pseudo-file for status information.
- *
- * 	iSeries does not support RTC interrupts nor an alarm.
- *
- *	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.
- *
- *      1.0	Mike Corrigan: IBM iSeries rtc support
- */
-
-#define RTC_VERSION		"1.0"
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/miscdevice.h>
-#include <linux/ioport.h>
-#include <linux/fcntl.h>
-#include <linux/mc146818rtc.h>
-#include <linux/init.h>
-#include <linux/poll.h>
-#include <linux/proc_fs.h>
-#include <linux/spinlock.h>
-
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-
-#include <asm/iSeries/mf.h>
-
-/*
- *	We sponge a minor off of the misc major. No need slurping
- *	up another valuable major dev number for this. If you add
- *	an ioctl, make sure you don't conflict with SPARC's RTC
- *	ioctls.
- */
-
-static loff_t rtc_llseek(struct file *file, loff_t offset, int origin);
-
-static ssize_t rtc_read(struct file *file, char *buf,
-			size_t count, loff_t *ppos);
-
-static int rtc_ioctl(struct inode *inode, struct file *file,
-		     unsigned int cmd, unsigned long arg);
-
-static void get_rtc_time (struct rtc_time *rtc_tm);
-
-static int rtc_read_proc(char *page, char **start, off_t off,
-                         int count, int *eof, void *data);
-
-/*
- *	If this driver ever becomes modularised, it will be really nice
- *	to make the epoch retain its value across module reload...
- */
-
-static unsigned long epoch = 1900;	/* year corresponding to 0x00	*/
-
-static const unsigned char days_in_mo[] = 
-{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
-
-/*
- *	Now all the various file operations that we export.
- */
-
-static loff_t rtc_llseek(struct file *file, loff_t offset, int origin)
-{
-	return -ESPIPE;
-}
-
-static ssize_t rtc_read(struct file *file, char *buf,
-			size_t count, loff_t *ppos)
-{
-	return -EIO;
-}
-
-static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-		     unsigned long arg)
-{
-	struct rtc_time wtime; 
-
-	switch (cmd) {
-	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
-	{
-		get_rtc_time(&wtime);
-		break;
-	}
-	case RTC_SET_TIME:	/* Set the RTC */
-	{
-		struct rtc_time rtc_tm;
-		unsigned char mon, day, hrs, min, sec, leap_yr;
-		unsigned int yrs;
-
-		if (!capable(CAP_SYS_TIME))
-			return -EACCES;
-
-		if (copy_from_user(&rtc_tm, (struct rtc_time*)arg,
-				   sizeof(struct rtc_time)))
-			return -EFAULT;
-
-		yrs = rtc_tm.tm_year;
-		mon = rtc_tm.tm_mon + 1;   /* tm_mon starts at zero */
-		day = rtc_tm.tm_mday;
-		hrs = rtc_tm.tm_hour;
-		min = rtc_tm.tm_min;
-		sec = rtc_tm.tm_sec;
-
-		if (yrs < 70)
-			return -EINVAL;
-
-		leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400));
-
-		if ((mon > 12) || (day == 0))
-			return -EINVAL;
-
-		if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr)))
-			return -EINVAL;
-			
-		if ((hrs >= 24) || (min >= 60) || (sec >= 60))
-			return -EINVAL;
-
-		if ( yrs > 169 )
-			return -EINVAL;
-
-		mf_setRtc( &rtc_tm );
-		
-		return 0;
-	}
-	case RTC_EPOCH_READ:	/* Read the epoch.	*/
-	{
-		return put_user (epoch, (unsigned long *)arg);
-	}
-	case RTC_EPOCH_SET:	/* Set the epoch.	*/
-	{
-		/* 
-		 * There were no RTC clocks before 1900.
-		 */
-		if (arg < 1900)
-			return -EINVAL;
-
-		if (!capable(CAP_SYS_TIME))
-			return -EACCES;
-
-		epoch = arg;
-		return 0;
-	}
-	default:
-		return -EINVAL;
-	}
-	return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
-}
-
-static int rtc_open(struct inode *inode, struct file *file)
-{
-	return 0;
-}
-
-static int rtc_release(struct inode *inode, struct file *file)
-{
-	return 0;
-}
-
-/*
- *	The various file operations we support.
- */
-
-static struct file_operations rtc_fops = {
-	.owner =	THIS_MODULE,
-	.llseek =	rtc_llseek,
-	.read =		rtc_read,
-	.ioctl =	rtc_ioctl,
-	.open =		rtc_open,
-	.release =	rtc_release,
-};
-
-static struct miscdevice rtc_dev=
-{
-	RTC_MINOR,
-	"rtc",
-	&rtc_fops
-};
-
-static int __init rtc_init(void)
-{
-	if (misc_register(&rtc_dev))
-		return -ENODEV;
-	create_proc_read_entry ("driver/rtc", 0, 0, rtc_read_proc, NULL);
-
-	printk(KERN_INFO "iSeries Real Time Clock Driver v" RTC_VERSION "\n");
-
-	return 0;
-}
-
-static void __exit rtc_exit (void)
-{
-	remove_proc_entry ("driver/rtc", NULL);
-	misc_deregister(&rtc_dev);
-}
-
-module_init(rtc_init);
-module_exit(rtc_exit);
-
-/*
- *	Info exported via "/proc/driver/rtc".
- */
-
-static int rtc_proc_output (char *buf)
-{
-	
-	char *p;
-	struct rtc_time tm;
-	
-	p = buf;
-
-	get_rtc_time(&tm);
-
-	/*
-	 * There is no way to tell if the luser has the RTC set for local
-	 * time or for Universal Standard Time (GMT). Probably local though.
-	 */
-	p += sprintf(p,
-		     "rtc_time\t: %02d:%02d:%02d\n"
-		     "rtc_date\t: %04d-%02d-%02d\n"
-	 	     "rtc_epoch\t: %04lu\n",
-		     tm.tm_hour, tm.tm_min, tm.tm_sec,
-		     tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, epoch);
-
-	p += sprintf(p,
-		     "DST_enable\t: no\n"
-		     "BCD\t\t: yes\n"
-		     "24hr\t\t: yes\n" );
-
-	return  p - buf;
-}
-
-static int rtc_read_proc(char *page, char **start, off_t off,
-                         int count, int *eof, void *data)
-{
-        int len = rtc_proc_output (page);
-        if (len <= off+count) *eof = 1;
-        *start = page + off;
-        len -= off;
-        if (len>count) len = count;
-        if (len<0) len = 0;
-        return len;
-}
-
-static void get_rtc_time(struct rtc_time *rtc_tm)
-{
-	mf_getRtc( rtc_tm );
-
-	rtc_tm->tm_mon--;
-}
-
-
diff -Nru a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
--- a/arch/ppc/kernel/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/Makefile	Wed Jan  8 20:04:45 2003
@@ -13,7 +13,7 @@
 HEAD-y				:= head.o
 HEAD-$(CONFIG_40x)		:= head_4xx.o
 HEAD-$(CONFIG_8xx)		:= head_8xx.o
-HEAD-$(CONFIG_PPC_ISERIES)	:= iSeries_head.o
+HEAD-$(CONFIG_6xx)		+= idle_6xx.o
 
 EXTRA_TARGETS	:= $(HEAD-y)
 
@@ -23,13 +23,10 @@
 					process.o signal.o ptrace.o align.o \
 					semaphore.o syscalls.o setup.o \
 					cputable.o ppc_htab.o
-obj-$(CONFIG_6xx)		+= l2cr.o ppc6xx_idle.o
-obj-$(CONFIG_ALL_PPC)		+= ppc6xx_idle.o
+obj-$(CONFIG_6xx)		+= l2cr.o
 obj-$(CONFIG_MODULES)		+= module.o ppc_ksyms.o
 obj-$(CONFIG_PCI)		+= pci.o 
-ifneq ($(CONFIG_PPC_ISERIES),y)
 obj-$(CONFIG_PCI)		+= pci-dma.o
-endif
 obj-$(CONFIG_KGDB)		+= ppc-stub.o
 obj-$(CONFIG_SMP)		+= smp.o
 obj-$(CONFIG_TAU)		+= temp.o
@@ -38,7 +35,6 @@
 obj-y				+= softemu8xx.o
 endif
 endif
-obj-$(CONFIG_PPC_ISERIES)	+= iSeries_misc.o
 
 find_name : find_name.c
 	$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
diff -Nru a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c
--- a/arch/ppc/kernel/asm-offsets.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/kernel/asm-offsets.c	Wed Jan  8 20:04:44 2003
@@ -25,13 +25,6 @@
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
 
-#ifdef CONFIG_PPC_ISERIES
-#include <asm/iSeries/Paca.h>
-#include <asm/iSeries/ItLpPaca.h>
-#include <asm/iSeries/ItLpQueue.h>
-#include <asm/iSeries/HvLpEvent.h>
-#endif /* CONFIG_PPC_ISERIES */
-
 #define DEFINE(sym, val) \
 	asm volatile("\n->" #sym " %0 " #val : : "i" (val))
 
@@ -123,35 +116,6 @@
 	DEFINE(CPU_SPEC_PVR_VALUE, offsetof(struct cpu_spec, pvr_value));
 	DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features));
 	DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup));
-
-#ifdef CONFIG_PPC_ISERIES
-	DEFINE(PACAPROCENABLED, offsetof(struct Paca, xProcEnabled));
-	DEFINE(PACAPACAINDEX, offsetof(struct Paca, xPacaIndex));
-	DEFINE(PACAPROCSTART, offsetof(struct Paca, xProcStart));
-	DEFINE(PACAKSAVE, offsetof(struct Paca, xKsave));
-	DEFINE(PACASAVEDMSR, offsetof(struct Paca, xSavedMsr));
-	DEFINE(PACASAVEDLR, offsetof(struct Paca, xSavedLr));
-	DEFINE(PACACONTEXTOVERFLOW, offsetof(struct Paca, xContextOverflow));
-	DEFINE(PACAR21, offsetof(struct Paca, xR21));
-	DEFINE(PACAR22, offsetof(struct Paca, xR22));
-	DEFINE(PACALPQUEUE, offsetof(struct Paca, lpQueuePtr));
-	DEFINE(PACALPPACA, offsetof(struct Paca, xLpPaca));
-	DEFINE(PACA_STRUCT_SIZE, sizeof(struct Paca));
-	DEFINE(LPREGSAV, offsetof(struct Paca, xRegSav));
-	DEFINE(PACADEFAULTDECR, offsetof(struct Paca, default_decr));
-	DEFINE(LPPACAANYINT, offsetof(struct ItLpPaca, xRsvd));
-	DEFINE(LPPACASRR0, offsetof(struct ItLpPaca, xSavedSrr0));
-	DEFINE(LPPACASRR1, offsetof(struct ItLpPaca, xSavedSrr1));
-	DEFINE(LPPACADECRINT, offsetof(struct ItLpPaca, xDecrInt));
-	DEFINE(LPPACAIPIINT, offsetof(struct ItLpPaca, xIpiCnt));
-	DEFINE(LPQCUREVENTPTR, offsetof(struct ItLpQueue, xSlicCurEventPtr));
-	DEFINE(LPQOVERFLOW, offsetof(struct ItLpQueue, xPlicOverflowIntPending));
-	DEFINE(LPQINUSEWORD, offsetof(struct ItLpQueue, xInUseWord));
-	DEFINE(LPEVENTFLAGS, offsetof(struct HvLpEvent, xFlags));
-	DEFINE(CONTEXT, offsetof(struct mm_struct, context));
-	DEFINE(_SOFTE, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, mq));
-	DEFINE(PACA_EXT_INTS, offsetof(struct Paca, ext_ints));
-#endif /* CONFIG_PPC_ISERIES */
 
 	DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
 	return 0;
diff -Nru a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c
--- a/arch/ppc/kernel/cputable.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/kernel/cputable.c	Wed Jan  8 20:04:44 2003
@@ -18,21 +18,22 @@
 
 struct cpu_spec* cur_cpu_spec[NR_CPUS];
 
-extern void __setup_cpu_601(int cpu_nr);
-extern void __setup_cpu_603(int cpu_nr);
-extern void __setup_cpu_604(int cpu_nr);
-extern void __setup_cpu_750(int cpu_nr);
-extern void __setup_cpu_7400(int cpu_nr);
-extern void __setup_cpu_7410(int cpu_nr);
-extern void __setup_cpu_7450(int cpu_nr);
-extern void __setup_cpu_7450_23(int cpu_nr);
-extern void __setup_cpu_7455(int cpu_nr);
-extern void __setup_cpu_power3(int cpu_nr);
-extern void __setup_cpu_8xx(int cpu_nr);
-extern void __setup_cpu_generic(int cpu_nr);
+extern void __setup_cpu_601(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_603(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_604(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_750(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_750cx(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_750fx(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_7400(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_7410(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_7450(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_7455(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_power3(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_8xx(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_generic(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
 
 #define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \
-		     !defined(CONFIG_POWER3) && !defined(CONFIG_PPC_ISERIES))
+		     !defined(CONFIG_POWER3))
 
 /* This table only contains "desktop" CPUs, it need to be filled with embedded
  * ones as well...
@@ -136,7 +137,7 @@
 	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP,
 	COMMON_PPC,
 	32, 32,
-	__setup_cpu_750
+	__setup_cpu_750cx
     },
     {	/* 750CX (82201 and 82202) */
     	0xfffffff0, 0x00082200, "750CX",
@@ -144,7 +145,7 @@
 	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP,
 	COMMON_PPC,
 	32, 32,
-	__setup_cpu_750
+	__setup_cpu_750cx
     },
     {	/* 750CXe (82214) */
     	0xfffffff0, 0x00082210, "750CXe",
@@ -152,7 +153,7 @@
 	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP,
 	COMMON_PPC,
 	32, 32,
-	__setup_cpu_750
+	__setup_cpu_750cx
     },
     {	/* 750FX rev 2.0 must disable HID0[DPM] */
     	0xffffffff, 0x70000200, "750FX",
@@ -166,16 +167,17 @@
     {	/* 750FX (All revs except 2.0) */
     	0xffff0000, 0x70000000, "750FX",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
-	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP,
+	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP |
+	CPU_FTR_DUAL_PLL_750FX,
 	COMMON_PPC,
 	32, 32,
-	__setup_cpu_750
+	__setup_cpu_750fx
     },
  
     {	/* 740/750 (L2CR bit need fixup for 740) */
     	0xffff0000, 0x00080000, "740/750",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
-	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE,
+	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP,
 	COMMON_PPC,
 	32, 32,
 	__setup_cpu_750
@@ -210,7 +212,7 @@
     {	/* 7450 2.0 - no doze/nap */
     	0xffffffff, 0x80000200, "7450",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
-	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
@@ -220,7 +222,8 @@
     	0xffffffff, 0x80000201, "7450",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
-	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450,
+	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+	CPU_FTR_L3_DISABLE_NAP,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
 	__setup_cpu_7450
@@ -229,16 +232,35 @@
     	0xffff0000, 0x80000000, "7450",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR,
+	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
+	32, 32,
+	__setup_cpu_7450
+    },
+    {	/* 7455 rev 1.x */
+    	0xffffff00, 0x80010100, "7455",
+    	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
+	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
-	__setup_cpu_7450_23
+	__setup_cpu_7455
+    },
+    {	/* 7455 rev 2.0 */
+    	0xffffffff, 0x80010200, "7455",
+    	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+	CPU_FTR_L3_DISABLE_NAP,
+	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
+	32, 32,
+	__setup_cpu_7455
     },
-    {	/* 7455 */
+    {	/* 7455 others */
     	0xffff0000, 0x80010000, "7455",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
-	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450,
+	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
 	__setup_cpu_7455
diff -Nru a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
--- a/arch/ppc/kernel/entry.S	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/entry.S	Wed Jan  8 20:04:45 2003
@@ -8,7 +8,6 @@
  *  rewritten by Paul Mackerras.
  *    Copyright (C) 1996 Paul Mackerras.
  *  MPC8xx modifications Copyright (C) 1997 Dan Malek (dmalek@jlc.net).
- *  Adaptations for iSeries Lpar by Mike Corrigan & Dave Boutcher
  *
  *  This file contains the system call entry code, context switch
  *  code, and exception/interrupt return code for PowerPC.
@@ -31,14 +30,10 @@
 #include <asm/thread_info.h>
 #include <asm/ppc_asm.h>
 #include <asm/offsets.h>
-#ifdef	CONFIG_PPC_ISERIES
-#include "iSeries_asm.h"
-#endif /* CONFIG_PPC_ISERIES */
 
 #undef SHOW_SYSCALLS
 #undef SHOW_SYSCALLS_TASK
 
-#ifndef CONFIG_PPC_ISERIES	/* iSeries version is in iSeries_head.S */
 /*
  * This code finishes saving the registers to the exception frame
  * and jumps to the appropriate handler for the exception, turning
@@ -67,7 +62,21 @@
 	addi	r11,r1,STACK_FRAME_OVERHEAD
 	stw	r11,PT_REGS(r12)
 	b	3f
-2:	/* if from kernel, check for stack overflow */
+2:	/* if from kernel, check interrupted DOZE/NAP mode and
+         * check for stack overflow
+         */
+#ifdef CONFIG_6xx
+	mfspr	r11,SPRN_HID0
+	mtcr	r11
+BEGIN_FTR_SECTION
+	bt-	8,power_save_6xx_restore	/* Check DOZE */
+END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE)
+BEGIN_FTR_SECTION
+	bt-	9,power_save_6xx_restore	/* Check NAP */
+END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP)
+#endif /* CONFIG_6xx */
+	.globl transfer_to_handler_cont
+transfer_to_handler_cont:
 	lwz	r11,THREAD_INFO-THREAD(r12)
 	cmplw	r1,r11			/* if r1 <= current->thread_info */
 	ble-	stack_ovf		/* then the kernel stack overflowed */
@@ -101,7 +110,6 @@
 	mtspr	SRR1,r10
 	SYNC
 	RFI
-#endif /* CONFIG_PPC_ISERIES */
 
 /*
  * Handle a system call.
@@ -370,8 +378,7 @@
  * On entry, r3 points to the THREAD for the current task, r4
  * points to the THREAD for the new task.
  *
- * This routine is always called with interrupts disabled
- * (soft disabled for iSeries).
+ * This routine is always called with interrupts disabled.
  *
  * Note: there are two ways to get to the "going out" portion
  * of this code; either by coming in via the entry (_switch)
diff -Nru a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
--- a/arch/ppc/kernel/head.S	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/kernel/head.S	Wed Jan  8 20:04:44 2003
@@ -168,6 +168,18 @@
 	bl	setup_disp_bat
 #endif
 
+/*
+ * Call setup_cpu for CPU 0 and initialize 6xx Idle
+ */
+	bl	reloc_offset
+	li	r24,0			/* cpu# */
+	bl	call_setup_cpu		/* Call setup_cpu for this CPU */
+#ifdef CONFIG_6xx
+	bl	reloc_offset
+	bl	init_idle_6xx
+#endif /* CONFIG_6xx */
+
+	
 #ifndef CONFIG_APUS
 /*
  * We need to run with _start at physical address 0.
@@ -344,6 +356,10 @@
  */
 	. = 0x200
 MachineCheck:
+BEGIN_FTR_SECTION
+	dssall
+	sync
+END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 	mtspr	SPRG0,r10
 	mtspr	SPRG1,r11
 	mfcr	r10
@@ -1182,6 +1198,10 @@
 	mr	r4,r24
 	bl	identify_cpu
 	bl	call_setup_cpu		/* Call setup_cpu for this CPU */
+#ifdef CONFIG_6xx
+	lis	r3,-KERNELBASE@h
+	bl	init_idle_6xx
+#endif /* CONFIG_6xx */
 
 	/* get current_thread_info and current */
 	lis	r1,secondary_ti@ha
@@ -1236,14 +1256,30 @@
 	bl	setup_750_7400_hid0
 	mtlr	r4
 	blr
+_GLOBAL(__setup_cpu_750cx)
+	mflr	r4
+	bl	setup_common_caches
+	bl	setup_750_7400_hid0
+	bl	setup_750cx
+	mtlr	r4
+	blr
+_GLOBAL(__setup_cpu_750fx)
+	mflr	r4
+	bl	setup_common_caches
+	bl	setup_750_7400_hid0
+	bl	setup_750fx
+	mtlr	r4
+	blr
 _GLOBAL(__setup_cpu_7400)
 	mflr	r4
+	bl	setup_7400_workarounds
 	bl	setup_common_caches
 	bl	setup_750_7400_hid0
 	mtlr	r4
 	blr
 _GLOBAL(__setup_cpu_7410)
 	mflr	r4
+	bl	setup_7410_workarounds
 	bl	setup_common_caches
 	bl	setup_750_7400_hid0
 	li	r3,0
@@ -1253,19 +1289,13 @@
 _GLOBAL(__setup_cpu_7450)
 	mflr	r4
 	bl	setup_common_caches
-	bl	setup_7450_hid0
-	mtlr	r4
-	blr
-_GLOBAL(__setup_cpu_7450_23)
-	mflr	r4
-	bl	setup_common_caches
-	bl	setup_7450_23_hid0
+	bl	setup_745x_specifics
 	mtlr	r4
 	blr
 _GLOBAL(__setup_cpu_7455)
 	mflr	r4
 	bl	setup_common_caches
-	bl	setup_7455_hid0
+	bl	setup_745x_specifics
 	mtlr	r4
 	blr
 _GLOBAL(__setup_cpu_power3)
@@ -1308,6 +1338,47 @@
 	isync
 	blr
 
+/* 7400 <= rev 2.7 and 7410 rev = 1.0 suffer from some
+ * erratas we work around here.
+ * Moto MPC710CE.pdf describes them, those are errata
+ * #3, #4 and #5
+ * Note that we assume the firmware didn't choose to
+ * apply other workarounds (there are other ones documented
+ * in the .pdf). It appear that Apple firmware only works
+ * around #3 and with the same fix we use. We may want to
+ * check if the CPU is using 60x bus mode in which case
+ * the workaround for errata #4 is useless. Also, we may
+ * want to explicitely clear HID0_NOPDST as this is not
+ * needed once we have applied workaround #5 (though it's
+ * not set by Apple's firmware at least).
+ */
+setup_7400_workarounds:
+	mfpvr	r3
+	rlwinm	r3,r3,0,20,31
+	cmpwi	0,r3,0x0207
+	ble	1f
+	blr
+setup_7410_workarounds:
+	mfpvr	r3
+	rlwinm	r3,r3,0,20,31
+	cmpwi	0,r3,0x0100
+	bnelr
+1:
+	mfspr	r11,SPRN_MSSSR0
+	/* Errata #3: Set L1OPQ_SIZE to 0x10 */
+	rlwinm	r11,r11,0,9,6
+	oris	r11,r11,0x0100
+	/* Errata #4: Set L2MQ_SIZE to 1 (check for MPX mode first ?) */
+	oris	r11,r11,0x0002
+	/* Errata #5: Set DRLT_SIZE to 0x01 */
+	rlwinm	r11,r11,0,5,2
+	oris	r11,r11,0x0800
+	sync
+	mtspr	SPRN_MSSSR0,r11
+	sync
+	isync
+	blr
+	
 /* 740/750/7400/7410
  * Enable Store Gathering (SGE), Address Brodcast (ABE),
  * Branch History Table (BHTE), Branch Target ICache (BTIC)
@@ -1330,7 +1401,31 @@
 	isync
 	blr
 
-/* 7450
+/* 750cx specific
+ * Looks like we have to disable NAP feature for some PLL settings...
+ * (waiting for confirmation)
+ */
+setup_750cx:
+	mfspr	r10, SPRN_HID1
+	rlwinm	r10,r10,4,28,31
+	cmpi	cr0,r10,7
+	cmpi	cr1,r10,9
+	cmpi	cr2,r10,11
+	cror	4*cr0+eq,4*cr0+eq,4*cr1+eq
+	cror	4*cr0+eq,4*cr0+eq,4*cr2+eq
+	bnelr
+	lwz	r6,CPU_SPEC_FEATURES(r5)
+	li	r7,CPU_FTR_CAN_NAP
+	andc	r6,r6,r7
+	stw	r6,CPU_SPEC_FEATURES(r5)
+	blr
+
+/* 750fx specific
+ */
+setup_750fx:
+	blr
+
+/* MPC 745x
  * Enable Store Gathering (SGE), Branch Folding (FOLD)
  * Branch History Table (BHTE), Branch Target ICache (BTIC)
  * Dynamic Power Management (DPM), Speculative (SPD)
@@ -1338,8 +1433,9 @@
  * Timebase has to be running or we wouldn't have made it here,
  * just ensure we don't disable it.
  * Clear Instruction cache throttling (ICTC)
+ * Enable L2 HW prefetch
  */
-setup_7450_hid0:
+setup_745x_specifics:
 	/* We check for the presence of an L3 cache setup by
 	 * the firmware. If any, we disable NAP capability as
 	 * it's known to be bogus on rev 2.1 and earlier
@@ -1347,23 +1443,24 @@
 	mfspr	r11,SPRN_L3CR
 	andis.	r11,r11,L3CR_L3E@h
 	beq	1f
-	li	r7,CPU_FTR_CAN_NAP
 	lwz	r6,CPU_SPEC_FEATURES(r5)
+	andi.	r0,r6,CPU_FTR_L3_DISABLE_NAP
+	beq	1f
+	li	r7,CPU_FTR_CAN_NAP
 	andc	r6,r6,r7
 	stw	r6,CPU_SPEC_FEATURES(r5)
 1:	
-setup_7450_23_hid0:
 	mfspr	r11,HID0
 
 	/* All of the bits we have to set.....
-	*/
+	 */
 	ori	r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_BTIC | HID0_LRSTK
 BEGIN_FTR_SECTION
 	oris	r11,r11,HID0_DPM@h	/* enable dynamic power mgmt */
 END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM)
 
 	/* All of the bits we have to clear....
-	*/
+	 */
 	li	r3,HID0_SPD | HID0_NOPDST | HID0_NOPTI
 	andc	r11,r11,r3		/* clear SPD: enable speculative */
  	li	r3,0
@@ -1373,34 +1470,13 @@
 	mtspr	HID0,r11
 	sync
 	isync
-	blr
 
-/* 7455
- * Enable Store Gathering (SGE), Branch Folding (FOLD)
- * Branch History Table (BHTE), Branch Target ICache (BTIC)
- * Dynamic Power Management (DPM), Speculative (SPD)
- * Ensure our data cache instructions really operate.
- * Timebase has to be running or we wouldn't have made it here,
- * just ensure we don't disable it.
- * Clear Instruction cache throttling (ICTC)
- */
-setup_7455_hid0:
-	mfspr	r11,HID0
-
-	/* All of the bits we have to set.....
-	*/
-	ori	r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_BTIC | HID0_LRSTK
-	oris	r11,r11,HID0_DPM@h	/* enable dynamic power mgmt */
-
-	/* All of the bits we have to clear....
-	*/
-	li	r3,HID0_SPD | HID0_NOPDST | HID0_NOPTI
-	andc	r11,r11,r3		/* clear SPD: enable speculative */
- 	li	r3,0
-
- 	mtspr	ICTC,r3			/* Instruction Cache Throttling off */
-	isync
-	mtspr	HID0,r11
+	/* Enable L2 HW prefetch
+	 */
+	mfspr	r3,SPRN_MSSCR0
+	ori	r3,r3,3
+	sync
+	mtspr	SPRN_MSSCR0,r3
 	sync
 	isync
 	blr
@@ -1446,11 +1522,6 @@
  * This is where the main kernel code starts.
  */
 start_here:
-	/* Call setup_cpu for CPU 0 */
-	li	r3,0		/* data offset */
-	li	r24,0		/* cpu# */
-	bl	call_setup_cpu
-
 	/* ptr to current */
 	lis	r2,init_task@h
 	ori	r2,r2,init_task@l
@@ -1562,7 +1633,7 @@
 	dssall
 	sync
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-3:
+3:	isync
 #ifdef CONFIG_PPC64BRIDGE
 	slbie	r4
 #endif /* CONFIG_PPC64BRIDGE */
diff -Nru a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S
--- a/arch/ppc/kernel/head_4xx.S	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/head_4xx.S	Wed Jan  8 20:04:45 2003
@@ -555,33 +555,40 @@
 4:
 	tophys(r11, r11)
 	rlwimi	r11, r10, 12, 20, 29	/* Create L1 (pgdir/pmd) address */
-	lwz	r11, 0(r11)		/* Get L1 entry */
-	rlwinm.	r12, r11, 0, 0, 19	/* Extract L2 (pte) base address */
+	lwz	r12, 0(r11)		/* Get L1 entry */
+	andi.	r9, r12, _PMD_PRESENT	/* Check if it points to a PTE page */
 	beq	2f			/* Bail if no table */
 
 	rlwimi	r12, r10, 22, 20, 29	/* Compute PTE address */
 	lwz	r11, 0(r12)		/* Get Linux PTE */
 	andi.	r9, r11, _PAGE_PRESENT
-	beq	2f
+	beq	5f
 
 	ori	r11, r11, _PAGE_ACCESSED
 	stw	r11, 0(r12)
 
-	/* Most of the Linux PTE is ready to load into the TLB LO.
-	 * We set ZSEL, where only the LS-bit determines user access.
-	 * We set execute, because we don't have the granularity to
-	 * properly set this at the page level (Linux problem).
-	 * If shared is set, we cause a zero PID->TID load.
-	 * Many of these bits are software only.  Bits we don't set
-	 * here we (properly should) assume have the appropriate value.
-	 */
-	li	r12, 0x0ce2
-	andc	r11, r11, r12		/* Make sure 20, 21 are zero */
+	/* Create TLB tag.  This is the faulting address plus a static
+	 * set of bits.  These are size, valid, E, U0.
+	*/
+	li	r12, 0x00c0
+	rlwimi	r10, r12, 0, 20, 31
 
 	b	finish_tlb_load
 
+2:	/* Check for possible large-page pmd entry */
+	rlwinm.	r9, r12, 2, 22, 24
+	beq	5f
+
+	/* Create TLB tag.  This is the faulting address, plus a static
+	 * set of bits (valid, E, U0) plus the size from the PMD.
+	 */
+	ori	r9, r9, 0x40
+	rlwimi	r10, r9, 0, 20, 31
+	mr	r11, r12
 
-2:
+	b	finish_tlb_load
+
+5:
 	/* The bailout.  Restore registers to pre-exception conditions
 	 * and call the heavyweights to help us out.
 	 */
@@ -647,55 +654,40 @@
 4:
 	tophys(r11, r11)
 	rlwimi	r11, r10, 12, 20, 29	/* Create L1 (pgdir/pmd) address */
-	lwz	r11, 0(r11)		/* Get L1 entry */
-	rlwinm.	r12, r11, 0, 0, 19	/* Extract L2 (pte) base address */
+	lwz	r12, 0(r11)		/* Get L1 entry */
+	andi.	r9, r12, _PMD_PRESENT	/* Check if it points to a PTE page */
 	beq	2f			/* Bail if no table */
 
 	rlwimi	r12, r10, 22, 20, 29	/* Compute PTE address */
 	lwz	r11, 0(r12)		/* Get Linux PTE */
 	andi.	r9, r11, _PAGE_PRESENT
-	beq	2f
+	beq	5f
 
 	ori	r11, r11, _PAGE_ACCESSED
 	stw	r11, 0(r12)
 
-	/* Most of the Linux PTE is ready to load into the TLB LO.
-	 * We set ZSEL, where only the LS-bit determines user access.
-	 * We set execute, because we don't have the granularity to
-	 * properly set this at the page level (Linux problem).
-	 * If shared is set, we cause a zero PID->TID load.
-	 * Many of these bits are software only.  Bits we don't set
-	 * here we (properly should) assume have the appropriate value.
-	 */
-	li	r12, 0x0ce2
-	andc	r11, r11, r12		/* Make sure 20, 21 are zero */
+	/* Create TLB tag.  This is the faulting address plus a static
+	 * set of bits.  These are size, valid, E, U0.
+	*/
+	li	r12, 0x00c0
+	rlwimi	r10, r12, 0, 20, 31
 
 	b	finish_tlb_load
 
-	/* Done...restore registers and get out of here.
-	*/
-#ifdef CONFIG_403GCX
-	lwz     r12, 12(r0)
-	lwz     r11, 8(r0)
-	mtspr   SPRN_PID, r12
-	mtcr    r11
-	lwz     r9, 4(r0)
-	lwz     r12, 0(r0)
-#else
-	mfspr	r12, SPRG6
-	mfspr	r11, SPRG7
-	mtspr	SPRN_PID, r12
-	mtcr	r11
-	mfspr	r9, SPRG5
-	mfspr	r12, SPRG4
-#endif
-	mfspr	r11, SPRG1
-	mfspr	r10, SPRG0
-	PPC405_ERR77_SYNC
-	rfi			/* Should sync shadow TLBs */
-	b	.		/* prevent prefetch past rfi */
+2:	/* Check for possible large-page pmd entry */
+	rlwinm.	r9, r12, 2, 22, 24
+	beq	5f
+
+	/* Create TLB tag.  This is the faulting address, plus a static
+	 * set of bits (valid, E, U0) plus the size from the PMD.
+	 */
+	ori	r9, r9, 0x40
+	rlwimi	r10, r9, 0, 20, 31
+	mr	r11, r12
 
-2:
+	b	finish_tlb_load
+	
+5:
 	/* The bailout.  Restore registers to pre-exception conditions
 	 * and call the heavyweights to help us out.
 	 */
@@ -818,8 +810,8 @@
 	/* Damn, I came up one instruction too many to fit into the
 	 * exception space :-).  Both the instruction and data TLB
 	 * miss get to this point to load the TLB.
-	 * 	r10 - EA of fault
-	 * 	r11 - TLB LO (info from Linux PTE)
+	 * 	r10 - TLB_TAG value
+	 * 	r11 - Linux PTE
 	 *	r12, r9 - avilable to use
 	 *	PID - loaded with proper value when we get here
 	 *	Upon exit, we reload everything and RFI.
@@ -833,21 +825,19 @@
 	*/
 	lwz	r9, tlb_4xx_index@l(0)
 	addi	r9, r9, 1
-	cmpwi	0, r9, 61		/* reserve entries 62, 63 for kernel */
-	ble	7f
-	li	r9, 0
-7:
+	andi.	r9, r9, (PPC4XX_TLB_SIZE-1)
 	stw	r9, tlb_4xx_index@l(0)
 
 6:
-	tlbwe	r11, r9, TLB_DATA		/* Load TLB LO */
-
-	/* Create EPN.  This is the faulting address plus a static
-	 * set of bits.  These are size, valid, E, U0, and ensure
-	 * bits 20 and 21 are zero.
+	/*
+	 * Clear out the software-only bits in the PTE to generate the
+	 * TLB_DATA value.  These are the bottom 2 bits of the RPM, the
+	 * top 3 bits of the zone field, and M.
 	 */
-	li	r12, 0x00c0
-	rlwimi	r10, r12, 0, 20, 31
+	li	r12, 0x0ce2
+	andc	r11, r11, r12
+
+	tlbwe	r11, r9, TLB_DATA		/* Load TLB LO */
 	tlbwe	r10, r9, TLB_TAG		/* Load TLB HI */
 
 	/* Done...restore registers and get out of here.
@@ -929,7 +919,9 @@
 
 /* Load up the kernel context */
 2:
-	SYNC			/* Force all PTE updates to finish */
+	sync			/* Flush to memory before changing TLB */
+	tlbia
+	isync			/* Flush shadow TLBs */
 
 	/* set up the PTE pointers for the Abatron bdiGDB.
 	*/
@@ -956,7 +948,7 @@
  */
 initial_mmu:
 	tlbia			/* Invalidate all TLB entries */
-	sync 
+	isync 
 
 	/* We should still be executing code at physical address 0x0000xxxx
 	 * at this point. However, start_here is at virtual address
@@ -985,18 +977,30 @@
 	clrrwi	r3,r3,10		/* Mask off the effective page number */
 	ori	r3,r3,(TLB_VALID | TLB_PAGESZ(PAGESZ_16M))
 
-        li      r0,62                    /* TLB slot 62 */
+        li      r0,63                    /* TLB slot 63 */
 
 	tlbwe	r4,r0,TLB_DATA		/* Load the data portion of the entry */
 	tlbwe	r3,r0,TLB_TAG		/* Load the tag portion of the entry */
 
-	addis	r4, r4, 0x0100		/* Map next 16 M entries */
-	addis	r3, r3, 0x0100
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(SERIAL_DEBUG_IO_BASE)
+	
+	/* Load a TLB entry for the UART, so that ppc4xx_progress() can use
+	 * the UARTs nice and early.  We use a 4k real==virtual mapping. */
+
+	lis	r3,SERIAL_DEBUG_IO_BASE@h
+	ori	r3,r3,SERIAL_DEBUG_IO_BASE@l
+	mr	r4,r3
+	clrrwi	r4,r4,12
+	ori	r4,r4,(TLB_WR|TLB_I|TLB_M|TLB_G)
 
-        li      r0,63                    /* TLB slot 63 */
+	clrrwi	r3,r3,12
+	ori	r3,r3,(TLB_VALID | TLB_PAGESZ(PAGESZ_4K))
 
+	li	r0,0			/* TLB slot 0 */
 	tlbwe	r4,r0,TLB_DATA
 	tlbwe	r3,r0,TLB_TAG
+#endif /* CONFIG_SERIAL_DEBUG_TEXT && SERIAL_DEBUG_IO_BASE */
+
 	isync
 
 	/* Establish the exception vector base
diff -Nru a/arch/ppc/kernel/iSeries_asm.h b/arch/ppc/kernel/iSeries_asm.h
--- a/arch/ppc/kernel/iSeries_asm.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,59 +0,0 @@
-/*
- * arch/ppc/kernel/iSeries_asm.h
- *
- * Definitions used by various bits of low-level assembly code on iSeries.
- *
- * Copyright (C) 2001 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.
- */
-
-#define CHECKLPQUEUE(ra,rb,rc)         \
-	mfspr   rb,SPRG1;       /* Get Paca address */\
-	lbz ra,PACALPPACA+LPPACAIPIINT(rb); /* Get IPI int flag */\
-	cmpi    0,ra,0;         /* IPI occurred in hypervisor ? */\
-	bne 99f;            /* If so, skip rest */\
-	lwz ra,PACALPQUEUE(rb); /* Get LpQueue address */\
-	cmpi    0,ra,0;         /* Does LpQueue exist? */\
-	beq 99f;            /* If not skip rest */\
-	lbz rb,LPQINUSEWORD(ra);    /* Test for LpQueue recursion */\
-	cmpi    0,rb,1;         /* If we are about to recurse */\
-	beq 99f;            /* If so, skip rest */\
-	lwz rb,LPQCUREVENTPTR(ra);  /* Get current LpEvent */\
-	lbz rb,LPEVENTFLAGS(rb);    /* Get Valid bit */\
-	lbz rc,LPQOVERFLOW(ra); /* Get LpQueue overflow */\
-	andi.   ra,rb,0x0080;       /* Isolate Valid bit */\
-	or. ra,ra,rc;       /* 0 == no pending events */\
-99:
-
-#define CHECKDECR(ra,rb)           \
-	mfspr   rb,SPRG1;       /* Get Paca address */\
-	lbz ra,PACALPPACA+LPPACADECRINT(rb); /* Get DECR int flag */\
-	cmpi    0,ra,0;         /* DECR occurred in hypervisor ? */\
-	beq 99f;            /* If not, skip rest */\
-	xor ra,ra,ra;           \
-	stb ra,PACALPPACA+LPPACADECRINT(rb); /* Clear DECR int flag */\
-99:
-
-#define CHECKANYINT(ra,rb,rc)			\
-	mfspr	rb,SPRG1;		/* Get Paca address */\
-	ld	ra,PACALPPACA+LPPACAANYINT(rb); /* Get all interrupt flags */\
-					/* Note use of ld, protected by soft/hard disabled */\
-	cmpldi	0,ra,0;			/* Any interrupt occurred while soft disabled? */\
-	bne	99f;			/* If so, skip rest */\
-	lwz	ra,PACALPQUEUE(rb);	/* Get LpQueue address */\
-	cmpi	0,ra,0;			/* Does LpQueue exist? */\
-	beq	99f;			/* If not skip rest */\
-	lwz	rb,LPQINUSEWORD(ra);	/* Test for LpQueue recursion */\
-	cmpi	0,rb,1;			/* If we are about to recurse */\
-	beq	99f;			/* If so, skip rest */\
-	lwz	rb,LPQCUREVENTPTR(ra);	/* Get current LpEvent */\
-	lbz	rb,LPEVENTFLAGS(rb);	/* Get Valid bit */\
-	lbz	rc,LPQOVERFLOW(ra);	/* Get LpQueue overflow */\
-	andi.	ra,rb,0x0080;		/* Isolate Valid bit */\
-	or.	ra,ra,rc;		/* 0 == no pending events */\
-99:
-
diff -Nru a/arch/ppc/kernel/iSeries_head.S b/arch/ppc/kernel/iSeries_head.S
--- a/arch/ppc/kernel/iSeries_head.S	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1512 +0,0 @@
-/*
- *  arch/ppc/kernel/iSeries_head.S
- *
- *  Adapted from arch/ppc/kernel/head.S
- *
- *  PowerPC version 
- *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
- *
- *  Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
- *    Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu>
- *  Adapted for Power Macintosh by Paul Mackerras.
- *  Low-level exception handlers and MMU support
- *  rewritten by Paul Mackerras.
- *    Copyright (C) 1996 Paul Mackerras.
- *  Adapted for iSeries by Mike Corrigan
- *  Updated by Dave Boutcher
- *  
- *  This file contains the low-level support and setup for the
- *  iSeries LPAR platform.                                   
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU General Public License
- *  as published by the Free Software Foundation; either version
- *  2 of the License, or (at your option) any later version.
- *	
- */
-
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/page.h>
-#include <asm/mmu.h>
-#include <asm/pgtable.h>
-#include <asm/ppc_asm.h>
-#include <asm/thread_info.h>
-#include <asm/offsets.h>
-#include "iSeries_asm.h"
-
-
-	.text
-	.globl	_stext
-_stext:
-
-/* iSeries LPAR
- *
- * In an iSeries partition, the operating system has no direct access
- * to the hashed page table.  The iSeries hypervisor manages the
- * hashed page table, and is directed by the operating system in the
- * partition.  The partition, Linux in this case, always runs with
- * MSR.IR and MSR.DR equal to 1.  The hypervisor establishes    
- * addressibility for the first 64 MB of memory at 0xC0000000 by  
- * building a hashed page table and setting segment register 12.
- *
- * The partition memory is not physically contiguous, nor necessarily
- * addressable with a 32-bit address.  The hypervisor provides functions
- * which the kernel can use to discover the layout of memory.  The  
- * iSeries LPAR specific code in the kernel will build a table that maps
- * contiguous pseudo-real addresses starting at zero to the actual 
- * physical addresses owned by this partition.  In 32-bit mode we will
- * restrict ourselves to no more than 768 MB (or maybe 1 GB)
- *
- * When Linux interrupt handlers get control, the hypervisor has 
- * already saved SRR0 and SRR1 into a control block shared between
- * the hypervisor and Linux.  This is know as the ItLpPaca.  The values
- * in the actual SRR0 and SRR1 are not valid.  This requires a change in
- * the way the SPRG registers are used.  The definitions are:
- *
- *   Register          old definition              new definition
- *
- *   SPRG0             temp - used to save gpr     reserved for hypervisor
- *   SPRG1             temp - used to save gpr     addr of Paca
- *   SPRG2             0 or kernel stack frame     temp - used to save gpr
- *   SPRG3             Linux thread                Linux thread
- *
- * The Paca contains the address of the ItLpPaca.  The Paca is known only 
- * to Linux, while the ItLpPaca is shared between Linux and the 
- * hypervisor.
- *
- * The value that used to be in SPRG2 will now be saved in the Paca,
- * as will at least one GPR.
- */
-	
-	.globl	__start
-__start:
-	b	start_here
-
-
-	. = 0x020
-
-	/* iSeries LPAR hypervisor expects a 64-bit offset of 
-	   the hvReleaseData structure (see HvReleaseData.h)
-	   at offset 0x20.  This is the base for all common
-	   control blocks between the hypervisor and the kernel
-	*/
-
-	.long	0 	
-	.long	hvReleaseData-KERNELBASE
-	.long	0
-	.long	msChunks-KERNELBASE
-	.long	0
-	.long	pidhash-KERNELBASE
-	/* Pointer to start of embedded System.map */
-	.long	0
-	.globl	embedded_sysmap_start
-embedded_sysmap_start:
-	.long	0
-	/* Pointer to end of embedded System.map */
-	.long	0
-	.globl	embedded_sysmap_end
-embedded_sysmap_end:
-	.long	0
-
-
-	. = 0x060
-	
-	.globl	ste_fault_count
-ste_fault_count:
-	.long	0
-	.globl	set_context_count
-set_context_count:
-	.long	0
-	.globl	yield_count
-yield_count:
-	.long	0
-	.globl	update_times_count
-update_times_count:
-	.long	0
-	.globl	update_wall_jiffies_count
-update_wall_jiffies_count:
-	.long 	0
-	.globl	update_wall_jiffies_ticks
-update_wall_jiffies_ticks:
-	.long	0
-
-
-/*
- * We assume SPRG1 has the address of the Paca and SPRG3
- * has the address of the task's thread_struct.
- * SPRG2 is used as a scratch register (as required by the
- * hypervisor).  SPRG0 is reserved for the hypervisor.
- *
- * The ItLpPaca has the values of SRR0 and SRR1 that the 
- * hypervisor saved at the point of the actual interrupt.  
- *
- * The Paca contains the value that the non-LPAR PPC Linux Kernel
- * keeps in SPRG2, which is either zero (if the interrupt
- * occurred in the kernel) or the address of the available
- * space on the kernel stack (if the interrupt occurred
- * in user code).
-*/
-#define EXCEPTION_PROLOG_1	\
-	mtspr	SPRG2,r20;		/* use SPRG2 as scratch reg */\
-	mfspr	r20,SPRG1;		/* get Paca */\
-	/* must do std not stw because soft disable protects	\
-	 * 64-bit register use (in HvCall, maybe others)	\
-	 */\
-	std	r21,PACAR21(r20);	/* Save GPR21 in Paca */\
-	std	r22,PACAR22(r20); 	/* Save GPR22 in Paca */\
-	mfcr	r22			/* Get CR */
-
-#define EXCEPTION_PROLOG_2	\
-	lwz	r21,PACAKSAVE(r20);	/* exception stack to use */\
-	cmpwi	0,r21,0;		/* user mode or kernel     */\
-	bne	1f;			/* 0 -> r1, else use PACAKSAVE */\
-	subi	r21,r1,INT_FRAME_SIZE;	/* alloc exc. frame */\
-1:	stw	r1,GPR1(r21);	\
-	mr	r1,r21;		\
-	stw	r22,_CCR(r1);		/* save CR in stackframe */ \
-	mflr	r22;		\
-	stw	r22,_LINK(r1);		/* Save LR in stackframe */ \
-	bl	save_regs;	 	/* now save everything else */ \
-	ld	r22,PACALPPACA+LPPACASRR0(r20); /* Get SRR0 from ItLpPaca */\
-	ld	r23,PACALPPACA+LPPACASRR1(r20) /* Get SRR1 from ItLpPaca */
-
-#define EXCEPTION_PROLOG_EXIT	\
-	mtcrf	0xff,r22;	\
-	ld	r22,PACALPPACA+LPPACASRR0(r20);	\
-	ld	r21,PACALPPACA+LPPACASRR1(r20);	\
-	mtspr	SRR0,r22;	\
-	mtspr	SRR1,r21;	\
-	ld	r22,PACAR22(r20);	\
-	ld	r21,PACAR21(r20);	\
-	mfspr	r20,SPRG2;	\
-	RFI
-
-#define EXCEPTION_PROLOG	\
-	EXCEPTION_PROLOG_1;	\
-	EXCEPTION_PROLOG_2
-
-
-/*
- * Note: code which follows this uses cr0.eq (set if from kernel),
- * r21, r22 (SRR0), and r23 (SRR1).
- */
-
-/*
- * Exception vectors.
- */
-#define STD_EXCEPTION(n, label, hdlr)		\
-	. = n;					\
-label:						\
-	EXCEPTION_PROLOG;			\
-	addi	r3,r1,STACK_FRAME_OVERHEAD;	\
-	li	r20,0;				/* soft disabled */\
-	bl	transfer_to_handler; 		\
-	.long	hdlr;				\
-	.long	ret_from_except
-
-/* System reset */
-	. = 0x100
-SystemReset:	
-	mfspr	r3,SPRG3		/* Get Paca address */
-	mtspr	SPRG1,r3		/* Set Linux SPRG1 -> Paca */
-	lhz	r24,PACAPACAINDEX(r3)	/* Get processor # */
-	cmpi	0,r24,0			/* Are we processor 0? */
-	beq	start_here		/* Start up the first processor */
-	mfspr	r4,CTRLF
-	li	r5,RUNLATCH
-	andc	r4,r4,r5		/* Turn off the run light */
-	mtspr	CTRLT,r4
-1:
-	HMT_LOW
-#ifdef CONFIG_SMP
-	lbz	r23,PACAPROCSTART(r3)	/* Test if this processor 
-					 * should start */
-	cmpi	0,r23,0
-	bne	secondary_start
-secondary_smp_loop:
-	/* Let the Hypervisor know we are alive */
-	/* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */
-	lis	r3,0x8002
-   	rldicr 	r0,r3,32,15		/* r0 = (r3 << 32) & 0xffff000000000000 */
-   	rldicl 	r3,r3,0,48		/* r3 = r3 & 0x000000000000ffff */
-   	or  	r3,r3,r0		/* r3 = r3 | r0			*/
-#else /* CONFIG_SMP */
-	/* Yield the processor.  This is required for non-SMP kernels
-	   which are running on multi-threaded machines. */
-	lis	r3,0x8000
-	rldicr	r3,r3,32,15		/* r3 = (r3 << 32) & 0xffff000000000000 */
-	addi	r3,r3,18		/* r3 = 0x8000000000000012 which is "yield" */
-	li	r4,0			/* "yield timed" */
-	li	r5,-1			/* "yield forever" */
-#endif /* CONFIG_SMP */
-	li	r0,-1			/* r0=-1 indicates a Hypervisor call */	
-	sc				/* Invoke the hypervisor via a system call */
-	mfspr	r3,SPRG1 		/* Put r3 back */
-	b	1b			/* If SMP not configured, secondaries
-					 * loop forever */
-
-/* Machine check */
-	STD_EXCEPTION(0x200, MachineCheck, MachineCheckException)
-
-/* Data access exception. */
-	. = 0x300
-DataAccess:
-	EXCEPTION_PROLOG
-	mfspr	r4,DAR
-	stw	r4,_DAR(r1)
-	mfspr	r5,DSISR
-	stw	r5,_DSISR(r1)
-	
-	andis.	r0,r5,0x0020		/* Is this a segment fault? */
-	bne	ste_fault		/* Yes - go reload segment regs */
-	
-	/* This should and with 0xd7ff */
-	andis.	r0,r5,0xa470		/* Can we handle as little fault? */
-	bne	1f			/*  */
-	
-	rlwinm	r3,r5,32-15,21,21	/* DSISR_STORE -> _PAGE_RW */
-
-	/* 
-	 * r3 contains the required access permissions
-	 * r4 contains the faulting address
-	 */
-
-	stw	r22,_NIP(r1)		/* Help with debug if dsi loop */
-	bl	hash_page	 	/* Try to handle as hpte fault */
-	lwz	r4,_DAR(r1)		/* Get original DAR */
-	lwz	r5,_DSISR(r1)		/* and original DSISR */
-
-1:	addi	r3,r1,STACK_FRAME_OVERHEAD
-	lwz	r20,_SOFTE(r1)
-	bl	transfer_to_handler
-	.long	do_page_fault
-	.long	ret_from_except
-
-
-/* Instruction access exception. */
-	. = 0x400
-InstructionAccess:
-	EXCEPTION_PROLOG
-	mr	r4,r22
-	mr	r5,r23
-
-	andis.	r0,r23,0x0020		/* Is this a segment fault? */
-	bne	ste_fault		/* Yes - go reload segment regs */
-	
-	andis.	r0,r23,0x4000		/* no pte found? */
-	beq	1f			/* if so, try to put a PTE */
-
-	li	r3,0			
-	bl	hash_page		/* Try to handle as hpte fault */
-	mr	r4,r22
-	mr	r5,r23
-
-1:	addi	r3,r1,STACK_FRAME_OVERHEAD
-	lwz	r20,_SOFTE(r1)
-	bl	transfer_to_handler
-	.long	do_page_fault
-	.long	ret_from_except
-
-/* External interrupt */
-	. = 0x500;
-HardwareInterrupt:
-	EXCEPTION_PROLOG_1
-	lbz	r21,PACAPROCENABLED(r20)
-	cmpi	0,r21,0
-	bne	1f
-	EXCEPTION_PROLOG_EXIT
-1:	EXCEPTION_PROLOG_2
-do_pending_int:
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	li	r4,0
-	li	r20,0			/* Soft disabled */
-	bl	transfer_to_handler
-	.globl do_IRQ_intercept
-do_IRQ_intercept:
-	.long	do_IRQ;
-	.long	ret_from_intercept
-
-/* Alignment exception */
-	. = 0x600
-Alignment:
-	EXCEPTION_PROLOG
-	mfspr	r4,DAR
-	stw	r4,_DAR(r1)
-	mfspr	r5,DSISR
-	stw	r5,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	lbz	r20,PACAPROCENABLED(r20)	/* preserve soft en/disabled */
-	bl	transfer_to_handler
-	.long	AlignmentException
-	.long	ret_from_except
-
-/* Program check exception */
-	. = 0x700
-ProgramCheck:
-	EXCEPTION_PROLOG
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	lbz	r20,PACAPROCENABLED(r20)	/* preserve soft en/disabled */
-	bl	transfer_to_handler
-	.long	ProgramCheckException
-	.long	ret_from_except
-
-/* Floating-point unavailable */
-	. = 0x800
-FPUnavailable:
-	EXCEPTION_PROLOG
-	lwz	r3,PACAKSAVE(r20)
-	cmpwi	0,r3,0
-	beq	1f
-	b	load_up_fpu
-1:
-	li	r20,0			/* soft disabled */
-	bl	transfer_to_handler	/* if from kernel, take a trap */
-	.long	KernelFP
-	.long	ret_from_except
-
-	. = 0x900
-Decrementer:
-	EXCEPTION_PROLOG_1
-	lbz	r21,PACAPROCENABLED(r20)
-	cmpi	0,r21,0
-	bne	1f
-	
-	li	r21,1
-	stb	r21,PACALPPACA+LPPACADECRINT(r20)
-	lwz	r21,PACADEFAULTDECR(r20)
-	mtspr	DEC,r21
-	EXCEPTION_PROLOG_EXIT
-1:	EXCEPTION_PROLOG_2
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	li	r20,0		/* Soft disabled */
-	bl	transfer_to_handler
-	.globl timer_interrupt_intercept
-timer_interrupt_intercept:
-	.long	timer_interrupt
-	.long	ret_from_intercept
-
-	STD_EXCEPTION(0xa00, Trap_0a, UnknownException)
-	STD_EXCEPTION(0xb00, Trap_0b, UnknownException)
-
-/* System call */
-	. = 0xc00
-SystemCall:
-	EXCEPTION_PROLOG
-	/* Store r3 to the kernel stack */
-	stw	r3,ORIG_GPR3(r1)
-	lbz	r20,PACAPROCENABLED(r20)	/* preserve soft en/disabled */
-	bl	transfer_to_handler
-	.long	DoSyscall
-	.long	ret_from_except
-
-/* Single step - not used on 601 */
-	STD_EXCEPTION(0xd00, SingleStep, SingleStepException)
-/*
-	STD_EXCEPTION(0xe00, Trap_0e, UnknownException)
-	STD_EXCEPTION(0xf00, Trap_0f, UnknownException)
-*/
-	STD_EXCEPTION(0x1300, Trap_13, InstructionBreakpoint)
-/*
-	STD_EXCEPTION(0x1400, SMI, SMIException)
-	STD_EXCEPTION(0x1500, Trap_15, UnknownException)
-	STD_EXCEPTION(0x1600, Trap_16, UnknownException)
-	STD_EXCEPTION(0x1700, Trap_17, TAUException)
-	STD_EXCEPTION(0x1800, Trap_18, UnknownException)
-	STD_EXCEPTION(0x1900, Trap_19, UnknownException)
-	STD_EXCEPTION(0x1a00, Trap_1a, UnknownException)
-	STD_EXCEPTION(0x1b00, Trap_1b, UnknownException)
-	STD_EXCEPTION(0x1c00, Trap_1c, UnknownException)
-	STD_EXCEPTION(0x1d00, Trap_1d, UnknownException)
-	STD_EXCEPTION(0x1e00, Trap_1e, UnknownException)
-	STD_EXCEPTION(0x1f00, Trap_1f, UnknownException)
-	STD_EXCEPTION(0x2000, RunMode, RunModeException)
-	STD_EXCEPTION(0x2100, Trap_21, UnknownException)
-	STD_EXCEPTION(0x2200, Trap_22, UnknownException)
-	STD_EXCEPTION(0x2300, Trap_23, UnknownException)
-	STD_EXCEPTION(0x2400, Trap_24, UnknownException)
-	STD_EXCEPTION(0x2500, Trap_25, UnknownException)
-	STD_EXCEPTION(0x2600, Trap_26, UnknownException)
-	STD_EXCEPTION(0x2700, Trap_27, UnknownException)
-	STD_EXCEPTION(0x2800, Trap_28, UnknownException)
-	STD_EXCEPTION(0x2900, Trap_29, UnknownException)
-	STD_EXCEPTION(0x2a00, Trap_2a, UnknownException)
-	STD_EXCEPTION(0x2b00, Trap_2b, UnknownException)
-	STD_EXCEPTION(0x2c00, Trap_2c, UnknownException)
-	STD_EXCEPTION(0x2d00, Trap_2d, UnknownException)
-	STD_EXCEPTION(0x2e00, Trap_2e, UnknownException)
-	STD_EXCEPTION(0x2f00, Trap_2f, UnknownException)
-*/
-	. = 0x3000
-
-	/* This code saves: CTR, XER, DAR, DSISR, SRR0, SRR1, */
-	/*                  r0, r2-r13, r20-r24               */
-	/*		    It uses R22 as a scratch register */
-save_regs:
-	ld 	r22,PACAR21(r20)	/* Get GPR21 from Paca */
-	stw	r22,GPR21(r1)		/* Save GPR21 in stackframe */
-	ld	r22,PACAR22(r20)	/* Get GPR22 from Paca */
-	stw	r22,GPR22(r1)		/* Save GPR22 in stackframe */
-	stw	r23,GPR23(r1)		/* Save GPR23 in stackframe */
-	stw	r24,GPR24(r1)		/* Save GPR24 in stackframe */
-	mfspr	r22,SPRG2		/* Get GPR20 from SPRG2 */
-	stw	r22,GPR20(r1)		/* Save GPR20 in stackframe */
-	mfctr	r22		
-	stw	r22,_CTR(r1)	
-	mfspr	r22,XER	
-	stw	r22,_XER(r1)	
-	lbz	r22,PACAPROCENABLED(r20)/* Get soft enabled/disabled */
-	stw	r22,_SOFTE(r1)
-	stw	r0,GPR0(r1) 	
-	SAVE_8GPRS(2, r1)	
-	SAVE_4GPRS(10, r1)	
-	blr
-	
-ste_fault:
-	bl	set_kernel_segregs
-
-	mfspr	r3,SPRG1
-	li	r4,0
-	stb	r4,PACAPROCENABLED(r3)	/* Soft disable prevents going to */
-					/* do_pending_int on recursive fault */ 
-
-	lis	r3,ste_fault_count@ha
-	lwz	r4,ste_fault_count@l(r3)
-	addi	r4,r4,1
-	stw	r4,ste_fault_count@l(r3)
-
-	mfspr	r3,SPRG3		/* get thread */
-	addi	r3,r3,-THREAD		/* get 'current' */
-	lwz	r3,MM(r3)		/* get mm */
-	cmpi	0,r3,0			/* if no mm */
-	beq	1f			/* then use context 0 (kernel) */
-	lwz	r3,CONTEXT(r3)		/* get context */
-1:	
-	/* set_context kills r0, r3, r4 and CTR */
-	bl	set_context
-	
-	lwz	r3,_SOFTE(r1)
-	cmpi	0,r3,0
-	beq	5f			/* skip checks if restoring disabled */
-
-	CHECKANYINT(r4,r5,r6) 		/* if pending interrupts, process them */
-	bne-	do_pending_int
-5:
-	mfspr	r4,SPRG1
-	stb	r3,PACAPROCENABLED(r4)	/* Restore enabled/disabled */
-	
-	b	fault_exit
-	
-/*
- * This code finishes saving the registers to the exception frame
- * and jumps to the appropriate handler for the exception, turning
- * on address translation.
- *
- * At this point r0-r13, r20-r24, CCR, CTR, LINK, XER, DAR and DSISR
- * are saved on a stack.  SRR0 is in r22, SRR1 is in r23
- * r1 points to the stackframe, r1 points to the kernel stackframe
- * We no longer have any dependency on data saved in the PACA, SRR0, SRR1
- * DAR or DSISR.  We now copy the registers to the kernel stack (which
- * might cause little faults).  Any little fault will be handled without
- * saving state.  Thus when the little fault is completed, it will rfi
- * back to the original faulting instruction.
- */
-	.globl	transfer_to_handler
-transfer_to_handler:
-
-	mfspr	r6,SPRG1
-	li	r7,0
-	stw	r7,PACAKSAVE(r6)	/* Force new frame for recursive fault */
-
-	/* Restore the regs used above -- parameters to syscall */
-	lwz	r6,GPR6(r1)
-	lwz	r7,GPR7(r1)
-
-	stw	r22,_NIP(r1)
-	stw	r23,_MSR(r1)
-	SAVE_4GPRS(14, r1)
-	SAVE_2GPRS(18, r1)
-	SAVE_4GPRS(25, r1)
-	SAVE_2GPRS(29, r1)
-	SAVE_GPR(31, r1)
-
-	andi.	r23,r23,MSR_PR
-	mfspr	r23,SPRG3
-	addi	r2,r23,-THREAD		/* set r2 to current */
-	beq	2f			/* if from user, fix up THREAD.regs */
-	addi	r24,r1,STACK_FRAME_OVERHEAD
-	stw	r24,PT_REGS(r23)
-	b	3f
-2:	/* if from kernel, check for stack overflow */
-	lwz	r22,THREAD_INFO(r2)
-	cmplw	r1,r22			/* if r1 <= current->thread_info */
-	ble-	stack_ovf		/* then the kernel stack overflowed */
-3:
-	li	r22,0
-	stw	r22,RESULT(r1)
-	mfspr	r23,SPRG1		/* Get Paca address */
-	stb	r20,PACAPROCENABLED(r23) /* soft enable or disabled */
-	mflr	r23
-	andi.	r24,r23,0x3f00		/* get vector offset */
-	stw	r24,TRAP(r1)
-	lwz	r24,0(r23)		/* virtual address of handler */
-	lwz	r23,4(r23)		/* where to go when done */
-	li	r20,MSR_KERNEL
-	ori	r20,r20,MSR_EE		/* Always hard enabled */
-	FIX_SRR1(r20,r22)
-	mtspr	SRR0,r24
-	mtspr	SRR1,r20
-	mtlr	r23
-	RFI				/* jump to handler, enable MMU */
-
-/*
- * On kernel stack overflow, load up an initial stack pointer
- * and call StackOverflow(regs), which should not return.
- */
-stack_ovf:
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	lis	r1,init_thread_union@ha
-	addi	r1,r1,init_thread_union@l
-	addi	r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
-	mfspr	r24,SPRG1
-	li	r20,0
-	stb	r20,PACAPROCENABLED(r24)	/* soft disable */
-	lis	r24,StackOverflow@ha
-	addi	r24,r24,StackOverflow@l
-	li	r20,MSR_KERNEL
-	ori	r20,r20,MSR_EE		/* Always hard enabled */
-	FIX_SRR1(r20,r22)
-	mtspr	SRR0,r24
-	mtspr	SRR1,r20
-	RFI
-
-/*
- * Disable FP for the task which had the FPU previously,
- * and save its floating-point registers in its thread_struct.
- * Enables the FPU for use in the kernel on return.
- * On SMP we know the fpu is free, since we give it up every
- * switch.  -- Cort
- * Assume r20 points to PACA on entry
- */
-load_up_fpu:
-	mfmsr	r5
-	ori	r5,r5,MSR_FP
-	SYNC
-	MTMSRD(r5)			/* enable use of fpu now */
-	isync
-/*
- * For SMP, we don't do lazy FPU switching because it just gets too
- * horrendously complex, especially when a task switches from one CPU
- * to another.  Instead we call giveup_fpu in switch_to.
- */
-#ifndef CONFIG_SMP
-	lis	r3,last_task_used_math@ha
-	lwz	r4,last_task_used_math@l(r3)
-	cmpi	0,r4,0
-	beq	1f
-	addi	r4,r4,THREAD		/* want last_task_used_math->thread */
-	SAVE_32FPRS(0, r4)
-	mffs	fr0
-	stfd	fr0,THREAD_FPSCR-4(r4)
-	lwz	r5,PT_REGS(r4)
-	lwz	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-	li	r20,MSR_FP|MSR_FE0|MSR_FE1
-	andc	r4,r4,r20		/* disable FP for previous task */
-	stw	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-1:
-#endif /* CONFIG_SMP */
-	/* enable use of FP after return */
-	ori	r23,r23,MSR_FP|MSR_FE0|MSR_FE1
-	mfspr	r5,SPRG3		/* current task's THREAD (phys) */
-	lfd	fr0,THREAD_FPSCR-4(r5)
-	mtfsf	0xff,fr0
-	REST_32FPRS(0, r5)
-#ifndef CONFIG_SMP
-	subi	r4,r5,THREAD
-	stw	r4,last_task_used_math@l(r3)
-#endif /* CONFIG_SMP */
-	/* restore registers and return */
-	lwz	r3,_CCR(r21)
-	lwz	r4,_LINK(r21)
-	mtcrf	0xff,r3
-	mtlr	r4
-	REST_GPR(1, r21)
-	REST_4GPRS(3, r21)
-	/* we haven't used ctr or xer */
-	mtspr	SRR1,r23
-	mtspr	SRR0,r22
-
-	REST_GPR(20, r21)
-	REST_2GPRS(22, r21)
-	lwz	r21,GPR21(r21)
-	SYNC
-	RFI
-	
-/*
- * FP unavailable trap from kernel - print a message, but let
- * the task use FP in the kernel until it returns to user mode.
- */
-KernelFP:
-	lwz	r3,_MSR(r1)
-	ori	r3,r3,MSR_FP
-	stw	r3,_MSR(r1)		/* enable use of FP after return */
-	lis	r3,86f@h
-	ori	r3,r3,86f@l
-	mr	r4,r2			/* current */
-	lwz	r5,_NIP(r1)
-	bl	printk
-	b	ret_from_except
-86:	.string	"floating point used in kernel (task=%p, pc=%x)\n"
-	.align	4
-
-/*
- * giveup_fpu(tsk)
- * Disable FP for the task given as the argument,
- * and save the floating-point registers in its thread_struct.
- * Enables the FPU for use in the kernel on return.
- */
-	.globl	giveup_fpu
-giveup_fpu:
-	mfmsr	r5
-	ori	r5,r5,MSR_FP
-	mtmsr	r5			/* enable use of fpu now */
-	cmpi	0,r3,0
-	beqlr-				/* if no previous owner, done */
-	addi	r3,r3,THREAD	        /* want THREAD of task */
-	lwz	r5,PT_REGS(r3)
-	cmpi	0,r5,0
-	SAVE_32FPRS(0, r3)
-	mffs	fr0
-	stfd	fr0,THREAD_FPSCR-4(r3)
-	beq	1f
-	lwz	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-	li	r3,MSR_FP|MSR_FE0|MSR_FE1
-	andc	r4,r4,r3		/* disable FP for previous task */
-	stw	r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-1:
-#ifndef CONFIG_SMP
-	li	r5,0
-	lis	r4,last_task_used_math@ha
-	stw	r5,last_task_used_math@l(r4)
-#endif /* CONFIG_SMP */
-	blr
-
-#ifdef CONFIG_SMP 
-secondary_start:
-	lis	r3,0,
-	mr	r4,r24
-	bl	identify_cpu
-	bl	call_setup_cpu		/* Call setup_cpu for this CPU */
-
-	/* get current */
-	HMT_MEDIUM			/* Set thread priority to MEDIUM */
-	lis	r2,current_set@h
-	ori	r2,r2,current_set@l
-	slwi	r24,r24,2		/* get current_set[cpu#] */
-	lwzx	r2,r2,r24
-
-	/* stack */
-	addi	r1,r2,THREAD_SIZE-STACK_FRAME_OVERHEAD
-	li	r0,0
-	stw	r0,0(r1)
-
-	/* load up the MMU */
-	bl	load_up_mmu
-
-	/* ptr to phys current thread */
-	addi	r4,r2,THREAD	/* phys address of our thread_struct */
-	rlwinm	r4,r4,0,0,31
-	mtspr	SPRG3,r4
-
-	/* Set up address of Paca in current thread */
-	lis	r23,xPaca@ha
-	addi	r23,r23,xPaca@l
-	/* r24 has CPU # * 4 at this point.  The Paca is 2048 bytes
-	   long so multiply r24 by 512 to index into the array of Pacas */
-	slwi	r24,r24,9
-	add	r23,r23,r24
-	rlwinm	r23,r23,0,0,31
-	mtspr	SPRG1,r23
-
-	li	r3,0
-	stw	r3,PACAKSAVE(r23)	/* 0 => r1 has kernel sp */
-
-	stb	r3,PACAPROCENABLED(r23)	/* Soft disabled */
-
-	/* enable MMU and jump to start_secondary */
-	
-	li	r4,MSR_KERNEL
-	ori	r4,r4,MSR_EE		/* Hard enabled */
-	lis	r3,start_secondary@h
-	ori	r3,r3,start_secondary@l
-	mtspr	SRR0,r3
-	FIX_SRR1(r4,r3)
-	mtspr	SRR1,r4
-	RFI
-#endif /* CONFIG_SMP */
-
-/*
- * Load stuff into the MMU.  Intended to be called with
- * IR=0 and DR=0.
- */
-load_up_mmu:
-	li	r0,16		/* load up segment register values */
-	mtctr	r0		/* for context 0 */
-	lis	r3,0x2000	/* Ku = 1, VSID = 0 */
-	li	r4,0
-3:	mtsrin	r3,r4
- 	addi	r3,r3,0x111	/* increment VSID */
-	addis	r4,r4,0x1000	/* address of next segment */
-	bdnz	3b
-	blr
-
-/*
- * This is where the main kernel code starts.
- */
-start_here:
-
-	/* ptr to current */
-
-	lis	r2,init_task@h
-	ori	r2,r2,init_task@l
-
-	/* Set up for using our exception vectors */
-
-	addi	r4,r2,THREAD	/* init task's THREAD */
-	rlwinm	r4,r4,0,0,31
-	mtspr	SPRG3,r4
-
-	/* Get address of Paca for processor 0 */
-	lis	r11,xPaca@ha
-	addi	r11,r11,xPaca@l
-	rlwinm	r11,r11,0,0,31
-	mtspr	SPRG1,r11
-
-	li	r3,0
-	stw  	r3,PACAKSAVE(r11)	/* 0 => r1 has kernel sp */
-
-	stb	r3,PACAPROCENABLED(r11)	/* Soft disabled */
-
-	lis	r1,init_thread_union@ha
-	addi	r1,r1,init_thread_union@l
-	li	r0,0
-	stwu	r0,THREAD_SIZE-STACK_FRAME_OVERHEAD(r1)
-
-	/* fix klimit for system map */
-	lis	r6,embedded_sysmap_end@ha
-	lwz	r7,embedded_sysmap_end@l(r6)
-
-	cmpi	0,r7,0
-	beq 	5f
-
-	lis     r6, KERNELBASE@h
-	add 	r7,r7,r6
-	addi	r7,r7,4095
-	li	r6,0x0FFF
-	andc	r7,r7,r6
-
-	lis	r6,klimit@ha
-	stw	r7,klimit@l(r6)
-5:	
-	
-/*
- * Decide what sort of machine this is and initialize the MMU.
- */
-	bl	early_init	/* We have to do this with MMU on */
-
-	mr	r3,r31
-	mr	r4,r30
-	mr	r5,r29
-	mr	r6,r28
-	mr	r7,r27
-	li	r6,0		/* No cmdline parameters */
-	bl	platform_init
-	bl	MMU_init
-
-	bl	load_up_mmu
-
-	li	r4,MSR_KERNEL
-	ori	r4,r4,MSR_EE	/* Hard enabled */
-	FIX_SRR1(r4,r5)
-	lis	r3,start_kernel@h
-	ori	r3,r3,start_kernel@l
-	mtspr	SRR0,r3
-	mtspr	SRR1,r4
-	RFI				/* ensure correct MSR and jump to
-					   start_kernel */
-hash_page:
-	mflr	r21			/* Save LR in r21 */
-
-	/* 
-	 * We hard enable here (but first soft disable) so that the hash_page
-	 * code can spin on the mmu_hash_lock without problem on a shared
-	 * processor
-	 */
-	li	r0,0
-	stb	r0,PACAPROCENABLED(r20)	/* Soft disable */
-
-	mfmsr	r0
-	ori	r0,r0,MSR_EE
-	mtmsr	r0			/* Hard enable */
-
-	bl	create_hpte		/* add the hash table entry */
-	/*
-	 * Now go back to hard disabled
-	 */
-	mfmsr	r0
-	li	r4,0
-	ori	r4,r4,MSR_EE
-	andc	r0,r0,r4
-	mtmsr	r0			/* Hard disable */
-
-	lwz	r0,_SOFTE(r1)
-	mtlr	r21			/* restore LR */
-	mr	r21,r1			/* restore r21 */
-
-	cmpi	0,r0,0			/* See if we will soft enable in */
-					/* fault_exit */
-	beq	5f			/* if not, skip checks */
-
-	CHECKANYINT(r4,r5,r6) 		/* if pending interrupts, process them */
-	bne-	do_pending_int
-
-5:	stb	r0,PACAPROCENABLED(r20)	/* Restore soft enable/disable */
-
-	cmpi	0,r3,0                  /* check return code form create_hpte */
-	bnelr
-
-/*
- * htab_reloads counts the number of times we have to fault an
- * HPTE into the hash table.  This should only happen after a
- * fork (because fork does a flush_tlb_mm) or a vmalloc or ioremap.
- * Where a page is faulted into a process's address space,
- * update_mmu_cache gets called to put the HPTE into the hash table
- * and those are counted as preloads rather than reloads.
- */
-	lis	r2,htab_reloads@ha
-	lwz	r3,htab_reloads@l(r2)
-	addi	r3,r3,1
-	stw	r3,htab_reloads@l(r2)
-
-fault_exit:
-	
-	lwz	r3,_CCR(r1)
-	lwz	r4,_LINK(r1)
-	lwz	r5,_CTR(r1)
-	lwz	r6,_XER(r1)
-
-	mtcrf	0xff,r3
-	mtlr	r4
-	mtctr	r5
-	mtspr	XER,r6
-
-	lwz	r0,GPR0(r1)
-	REST_8GPRS(2, r1)
-	REST_4GPRS(10, r1)
-	FIX_SRR1(r23,r20)
-	mtspr	SRR1,r23
-	mtspr	SRR0,r22
-	REST_4GPRS(20, r1)
-
-	lwz	r1,GPR1(r1)
-	RFI
-
-/*
- * Set up the segment registers for a new context.
- *   context in r3
- */
-_GLOBAL(set_context)
-	mulli	r3,r3,897	/* multiply context by skew factor */
-	rlwinm	r3,r3,4,8,27	/* VSID = (context & 0xfffff) << 4 */
-	addis	r3,r3,0x6000	/* Set Ks, Ku bits */
-	li	r0,NUM_USER_SEGMENTS
-	mtctr	r0
-
-	li	r4,0
-3:
-	mtsrin	r3,r4
-	addi	r3,r3,0x111	/* next VSID */
-	rlwinm	r3,r3,0,8,3	/* clear out any overflow from VSID field */
-	addis	r4,r4,0x1000	/* address of next segment */
-	bdnz	3b
-	isync
-
-set_kernel_segregs:
-
-/* 
- * Reload the last four segment registers because they 
- * might have been clobbered by the hypervisor if we
- * are running on a shared processor
- */
- 	lis	r3,0x2000	/* Set Ku = 1 */
-	addi	r3,r3,0xCCC	/* Set VSID = CCC */
-	lis	r4,0xC000	/* Set SR = C */
-	li	r0,4		/* Load regs C, D, E and F */
-	mtctr	r0
-4:	mtsrin	r3,r4
- 	addi	r3,r3,0x111	/* increment VSID */
-	addis	r4,r4,0x1000	/* address of next segment */
-	bdnz	4b
-	isync
-
-	blr
-
-
-/* Hypervisor call
- *
- * Invoke the iSeries hypervisor (PLIC) via the System Call instruction.
- * Parameters are passed to this routine in registers r3 - r10 and are
- * converted to 64-bit by combining registers. eg. r3 <- r3 
- * r4 <- r5,r6, r5 <- r7,r8, r6 <- r9,r10
- * 
- * r3 contains the HV function to be called
- * r5,r6 contain the first 64-bit operand
- * r7,r8 contain the second 64-bit operand
- * r9,r10 contain the third 64-bit operand
- * caller's stack frame +8 contains the fourth 64-bit operand
- * caller's stack frame +16 contains the fifth 64-bit operand
- * caller's stack frame +24 contains the sixth 64-bit operand
- * caller's stack frame +32 contains the seventh 64-bit operand
- *
- */
-
-_GLOBAL(HvCall) 
-_GLOBAL(HvCall0)
-_GLOBAL(HvCall1)
-_GLOBAL(HvCall2)
-_GLOBAL(HvCall3)
-_GLOBAL(HvCall4)
-_GLOBAL(HvCall5)
-_GLOBAL(HvCall6)
-_GLOBAL(HvCall7)
-   /* 
-    * Stack a frame and save one reg so we can hang on to
-    * the old MSR
-    */
-   stwu   r1,-64(r1)
-   stw	  r31,60(r1)
-
-   stw    r22,24(r1)
-   stw    r23,28(r1)
-   stw    r24,32(r1)
-   stw    r25,36(r1)
-   stw    r26,40(r1)
-   stw    r27,44(r1)
-   stw    r28,48(r1)
-   stw	  r29,52(r1)
-
-   /*
-    * The hypervisor assumes CR fields 0-4 are volatile, but
-    * gcc assumes CR fields 2-7 are non-volatile.  
-    * We must save and restore the CR here
-    */
-   mfcr   r31
-   stw	  r31,20(r1)
-   
-   /* Before we can convert to using 64-bit registers we must
-    * soft disable external interrupts as the interrupt handlers
-    * don't preserve the high half of the registers
-    */
-
-   mfspr  r11,SPRG1		/* Get the Paca pointer */
-   lbz    r31,PACAPROCENABLED(r11) /* Get soft enable/disable flag */
-   li	  r0,0
-   stb	  r0,PACAPROCENABLED(r11)  /* Soft disable */
-
-   /* Get parameters four through seven */
-
-   lwz    r22,72(r1)
-   lwz    r23,76(r1)
-   lwz    r24,80(r1)
-   lwz    r25,84(r1)
-   lwz    r26,88(r1)
-   lwz    r27,92(r1)
-   lwz    r28,96(r1)
-   lwz    r29,100(r1)
-   /* Now it is safe to operate on 64-bit registers
-    * 
-    * Format the operands into the 64-bit registers
-    *
-    */
-   rldicr r5,r5,32,31		/* r5 = r5 << 32		*/
-   rldicl r6,r6,0,32		/* r6 = r6 & 0x00000000ffffffff */
-   or     r4,r5,r6		/* r4 = r5 | r6			*/
-   rldicr r7,r7,32,31		/* r7 = r7 << 32		*/
-   rldicl r8,r8,0,32		/* r8 = r8 & 0x00000000ffffffff */
-   or	  r5,r7,r8		/* r5 = r7 | r8			*/
-   rldicr r9,r9,32,31		/* r9 = r9 << 32		*/
-   rldicl r10,r10,0,32		/* r10 = r10 & 0x00000000ffffffff */
-   or	  r6,r9,r10		/* r6 = r9 | r10		*/
-   rldicr r22,r22,32,31		/* r22 = r22 << 32              */
-   rldicl r23,r23,0,32		/* r23 = r23 & 0x00000000ffffffff */
-   or     r7,r22,r23		/* r7 = r22 | r23               */
-   rldicr r24,r24,32,31		/* r24 = r24 << 32              */
-   rldicl r25,r25,0,32		/* r25 = r25 & 0x00000000ffffffff */
-   or     r8,r24,r25		/* r8 = r24 | r25               */
-   rldicr r26,r26,32,31		/* r26 = r26 << 32              */
-   rldicl r27,r27,0,32		/* r27 = r27 & 0x00000000ffffffff */
-   or     r9,r26,r27		/* r9 = r26 | r27               */
-   rldicr r28,r28,32,31		/* r28 = r28 << 32              */
-   rldicl r29,r29,0,32		/* r29 = r29 & 0x00000000ffffffff */
-   or     r10,r28,r29		/* r10 = r28 | r29              */
-   
-   /* 
-    * Extract the hypervisor function call number from R3
-    * and format it into the 64-bit R3.
-    */
-   rldicr r0,r3,32,15		/* r0 = (r3 << 32) & 0xffff000000000000 */
-   rldicl r3,r3,0,48		/* r3 = r3 & 0x000000000000ffff */
-   or	  r3,r3,r0		/* r3 = r3 | r0			*/
-   
-   /*
-    * r0 = 0xffffffffffffffff indicates a hypervisor call 
-    */
-   li	  r0,-1			/* r1 = 0xffffffffffffffff      */
-   
-   /* Invoke the hypervisor via the System Call instruction */
-
-   sc
-  
-   HMT_MEDIUM
-  
-   /* Return value in 64-bit R3
-    * format it into R3 and R4
-    */
-   rldicl r4,r3,0,32		/* r4 = r3 & 0x00000000ffffffff */
-   rldicl r3,r3,32,32		/* r3 = (r3 >> 32) & 0x00000000ffffffff */
-
-   /* We are now done with 64-bit registers it is safe to touch
-    * the stack again.
-    */
-   lwz    r22,24(r1)
-   lwz    r23,28(r1)
-   lwz    r24,32(r1)
-   lwz    r25,36(r1)
-   lwz    r26,40(r1)
-   lwz    r27,44(r1)
-   lwz    r28,48(r1)
-   lwz    r29,52(r1)
-
-   /* While we were running in the hypervisor, a decrementer or
-    * external interrupt may have occured.  If we are about to
-    * enable here, we must check for these and process them
-    */
-
-   cmpi   0,r31,0		/* check if going to enable */
-   beq	  1f			/* skip checks if staying disabled */
-
-   /* Save r3, r4 and LR */
-   stw	  r3,52(r1)
-   stw    r4,48(r1)
-   mflr   r3
-   stw    r3,44(r1)
-
-   /* enable and check for decrementers/lpEvents */
-   mr	r3,r31
-   bl	local_irq_restore
-
-   /* Restore r3, r4 and LR */
-   lwz    r3,44(r1)
-   mtlr   r3
-   lwz    r3,52(r1)
-   lwz    r4,48(r1)
-
-1:
-   /* 
-    * Unstack the frame and restore r31 and the CR
-    */
-   lwz    r31,20(r1)
-   mtcrf  0xff,r31 
-   lwz    r31,60(r1)
-   lwz	  r1,0(r1)
-    
-   blr 
-   
-/* Hypervisor call with return data
- *
- * Invoke the iSeries hypervisor (PLIC) via the System Call instruction.
- * The Hv function ID is passed in r3
- * The address of the return data structure is passed in r4
- * Parameters are passed to this routine in registers r5 - r10 and are
- * converted to 64-bit by combining registers. eg. r3 <- r3 
- * r4 <- r5,r6, r5 <- r7,r8, r6 <- r9,r10
- * 
- * r3 contains the HV function to be called
- * r4 contains the address of the return data structure
- * r5,r6 contain the first 64-bit operand
- * r7,r8 contain the second 64-bit operand
- * r9,r10 contain the third 64-bit operand
- * caller's stack frame +8 contains the fourth 64-bit operand
- * caller's stack frame +16 contains the fifth 64-bit operand
- * caller's stack frame +24 contains the sixth 64-bit operand
- * caller's stack frame +32 contains the seventh 64-bit operand
- *
- */
-
-_GLOBAL(HvCallRet16) 
-_GLOBAL(HvCall0Ret16)
-_GLOBAL(HvCall1Ret16)
-_GLOBAL(HvCall2Ret16)
-_GLOBAL(HvCall3Ret16)
-_GLOBAL(HvCall4Ret16)
-_GLOBAL(HvCall5Ret16)
-_GLOBAL(HvCall6Ret16)
-_GLOBAL(HvCall7Ret16)
-
-   /*
-    * Stack a frame and save some regs
-    */
-   stwu	  r1,-64(r1)
-   stw	  r31,60(r1)
-   stw	  r30,56(r1)
-
-   stw    r22,24(r1)
-   stw    r23,28(r1)
-   stw    r24,32(r1)
-   stw    r25,36(r1)
-   stw    r26,40(r1)
-   stw    r27,44(r1)
-   stw    r28,48(r1)
-   stw	  r29,52(r1)
-
-   mr     r30,r4		/* Save return data address */
-
-   /*
-    * The hypervisor assumes CR fields 0-4 are volatile, but
-    * gcc assumes CR fields 2-7 are non-volatile.  
-    * We must save and restore the CR here
-    */
-   mfcr   r31
-   stw	  r31,20(r1)
-
-   /* Before we can convert to using 64-bit registers we must
-    * soft disable external interrupts as the interrupt handlers
-    * don't preserve the high half of the registers
-    */
-
-   mfspr  r11,SPRG1		/* Get the Paca pointer */
-   lbz    r31,PACAPROCENABLED(r11) /* Get soft enable/disable flag */
-   li	  r0,0
-   stb	  r0,PACAPROCENABLED(r11)  /* Soft disable */
-
-   /* Get parameters four through seven */
-
-   lwz    r22,76(r1)
-   lwz    r23,80(r1)
-   lwz    r24,84(r1)
-   lwz    r25,88(r1)
-   lwz    r26,92(r1)
-   lwz    r27,96(r1)
-   lwz    r28,100(r1)
-   lwz    r29,104(r1)
-
-   /* Now it is safe to operate on 64-bit registers
-    *
-    */
-    
-   /* 
-    * Format the operands into the 64-bit registers
-    */
-
-   rldicr r5,r5,32,31		/* r5 = r5 << 32		*/
-   rldicl r6,r6,0,32		/* r6 = r6 & 0x00000000ffffffff */
-   or     r4,r5,r6		/* r4 = r5 | r6			*/
-   rldicr r7,r7,32,31		/* r7 = r7 << 32		*/
-   rldicl r8,r8,0,32		/* r8 = r8 & 0x00000000ffffffff */
-   or	  r5,r7,r8		/* r5 = r7 | r8			*/
-   rldicr r9,r9,32,31		/* r9 = r9 << 32		*/
-   rldicl r10,r10,0,32		/* r10 = r10 & 0x00000000ffffffff */
-   or	  r6,r9,r10		/* r6 = r9 | r10		*/
-   rldicr r22,r22,32,31		/* r22 = r22 << 32              */
-   rldicl r23,r23,0,32		/* r23 = r23 & 0x00000000ffffffff */
-   or     r7,r22,r23		/* r7 = r22 | r23               */
-   rldicr r24,r24,32,31		/* r24 = r24 << 32              */
-   rldicl r25,r25,0,32		/* r25 = r25 & 0x00000000ffffffff */
-   or     r8,r24,r25		/* r8 = r24 | r25               */
-   rldicr r26,r26,32,31		/* r26 = r26 << 32              */
-   rldicl r27,r27,0,32		/* r27 = r27 & 0x00000000ffffffff */
-   or     r9,r26,r27		/* r9 = r26 | r27               */
-   rldicr r28,r28,32,31		/* r28 = r28 << 32              */
-   rldicl r29,r29,0,32		/* r29 = r29 & 0x00000000ffffffff */
-   or     r10,r28,r29		/* r10 = r28 | r29              */
-   /* 
-    * Extract the hypervisor function call number from R3
-    * and format it into the 64-bit R3.
-    */
-   rldicr r0,r3,32,15		/* r4 = (r3 << 32) & 0xffff000000000000 */
-   rldicl r3,r3,0,48		/* r3 = r3 & 0x000000000000ffff */
-   or	  r3,r3,r0		/* r3 = r3 | r4			*/
-   
-   /*
-    * r0 = 0xffffffffffffffff indicates a hypervisor call 
-    */
-   li	  r0,-1			/* r1 = 0xffffffffffffffff      */
-   
-   /* Invoke the hypervisor via the System Call instruction */
-
-   sc
-  
-   HMT_MEDIUM
-  
-   /* Return values in 64-bit R3, R4, R5 and R6
-    * place R3 and R4 into data structure, R5 into R3,R4 
-    */
-   rldicl r6,r3,32,32		/* r6 = (r3 >> 32) & 0x00000000ffffffff */
-   rldicl r7,r3,0,32		/* r7 = r3 & 0x00000000ffffffff */
-   rldicl r8,r4,32,32		/* r8 = (r4 >> 32) & 0x00000000ffffffff */
-   rldicl r9,r4,0,32		/* r9 = r4 & 0x00000000ffffffff */
-       
-   rldicl r4,r5,0,32		/* r4 = r5 & 0x00000000ffffffff */
-   rldicl r3,r5,32,32		/* r3 = (r5 >> 32) & 0x00000000ffffffff */
-
-   /* We are now done with 64-bit registers it is safe to touch
-    * the stack again.
-    */
-   stw    r6,0(r30)		/* Save returned data */
-   stw    r7,4(r30)
-   stw    r8,8(r30)
-   stw    r9,12(r30)
-
-   lwz    r22,24(r1)
-   lwz    r23,28(r1)
-   lwz    r24,32(r1)
-   lwz    r25,36(r1)
-   lwz    r26,40(r1)
-   lwz    r27,44(r1)
-   lwz    r28,48(r1)
-   lwz    r29,52(r1)
-
-   /* While we were running in the hypervisor, a decrementer or
-    * external interrupt may have occured.  If we are about to
-    * enable here, we must check for these and process them
-    */
-
-   cmpi   0,r31,0		/* check if going to enable */
-   beq	  1f			/* skip checks if staying disabled */
-
-   /* Save r3, r4 and LR */
-   stw	  r3,48(r1)
-   stw    r4,44(r1)
-   mflr   r3
-   stw    r3,40(r1)
-
-   /* enable and check for decrementers/lpEvents */
-   mr	  r3,r31
-   bl	local_irq_restore
-
-   lwz    r3,40(r1)
-   mtlr   r3
-   lwz    r3,48(r1)
-   lwz    r4,44(r1)
-   
-1:
-   /* 
-    * Unstack the frame and restore r30, r31 and CR
-    */
-   lwz    r31,20(r1)
-   mtcrf  0xff,r31 
-   lwz    r30,56(r1)
-   lwz	  r31,60(r1)
-   lwz	  r1,0(r1)
-   
-   blr 
-
-
-/* Hypervisor call (use no stack)
- *
- * These functions must be called with interrupts soft disabled.
- * The caller is responsible for saving the non-volatile CR
- * The operands should already be formatted into the 64-bit registers
- *
- * Invoke the iSeries hypervisor (PLIC) via the System Call instruction.
- * 
- * r3 contains the HV function to be called
- * r4 contains the first 64-bit operand
- * r5 contains the second 64-bit operand
- * r6 contains the third 64-bit operand
- * r7 contains the fourth 64-bit operand
- * r8 contains the fifth 64-bit operand
- * r9 contains the sixth 64-bit operand
- * r10 contains the seventh 64-bit operand
- *
- * data is returned in 64-bit registers r3-r6
- *
- */
-
-_GLOBAL(HvXCall) 
-_GLOBAL(HvXCall0)
-_GLOBAL(HvXCall1)
-_GLOBAL(HvXCall2)
-_GLOBAL(HvXCall3)
-   /* 
-    * Extract the hypervisor function call number from R3
-    * and format it into the 64-bit R3.
-    */
-   rldicr r0,r3,32,15		/* r0 = (r3 << 32) & 0xffff000000000000 */
-   rldicl r3,r3,0,48		/* r3 = r3 & 0x000000000000ffff */
-   or	  r3,r3,r0		/* r3 = r3 | r0			*/
-   
-   /*
-    * r0 = 0xffffffffffffffff indicates a hypervisor call 
-    */
-   li	  r0,-1			/* r1 = 0xffffffffffffffff      */
-   
-   /* Invoke the hypervisor via the System Call instruction */
-
-   sc
-   
-   blr 
-   
-_GLOBAL(__setup_cpu_power3)
-	blr
-_GLOBAL(__setup_cpu_power4)
-	blr
-_GLOBAL(__setup_cpu_generic)
-	blr
-
-_GLOBAL(iSeries_check_intr)
-	mflr	r31
-	lwz 	r5,_SOFTE(r1)
-	cmpi    0,r5,0  
-	beqlr
-	mfspr   r5,SPRG1
-	lbz 	r5,PACAPROCENABLED(r5)
-	cmpi    0,r5,0  
-	bnelr
-	/* Check for lost decrementer interrupts.
-	 * (If decrementer popped while we were in the hypervisor)
-    	 * (calls timer_interrupt if so)
-    	 */
-3: CHECKDECR(r4,r5)
-   	/* Check for pending interrupts.  If no interrupts pending,
-    	 * then CR0 = "eq" and r4 == 0 
-    	 * (kills registers r5 and r6) 
-    	 */
-	beq+    1f
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	bl  	timer_interrupt
-1:
-	CHECKLPQUEUE(r4,r5,r6)  
-	beq+    2f
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	bl  	do_IRQ  
-	b   	3b  
-
-2:  	mtlr	r31
-	blr
-
-/*
- * Fake an interrupt from kernel mode.
- * This is used when enable_irq loses an interrupt.
- * We only fill in the stack frame minimally.
- */
-_GLOBAL(fake_interrupt)
-	mflr    r0
-	stw 	r0,4(r1)
-	stwu    r1,-INT_FRAME_SIZE(r1)
-	stw 	r0,_NIP(r1)
-	stw 	r0,_LINK(r1)
-	mfmsr   r3
-	stw 	r3,_MSR(r1)
-	li  	r0,0x0fac
-	stw 	r0,TRAP(r1)
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	li  	r4,1
-	bl  	do_IRQ
-	addi    r1,r1,INT_FRAME_SIZE
-	lwz 	r0,4(r1)
-
-	mtlr    r0
-	blr
-
-/*
- * Fake a decrementer from kernel mode.
- * This is used when the decrementer pops in
- * the hypervisor.  We only fill in the stack
- * frame minimally
- */
-_GLOBAL(fake_decrementer)
-	mflr    r0
-	stw 	r0,4(r1)
-	stwu    r1,-INT_FRAME_SIZE(r1)
-	stw 	r0,_NIP(r1)
-	stw 	r0,_LINK(r1)
-	mfmsr   r3
-	stw 	r3,_MSR(r1)
-	li  	r0,0x0fac
-	stw 	r0,TRAP(r1)
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	bl  	timer_interrupt
-	addi    r1,r1,INT_FRAME_SIZE
-	lwz 	r0,4(r1)
-
-	mtlr    r0
-	blr
-
-_GLOBAL(create_hpte)
-	stwu	r1,-INT_FRAME_SIZE(r1)
-	stw	r0,GPR0(r1)
-	lwz	r0,0(r1)
-	stw	r0,GPR1(r1)
-	/* r3-r13 are caller saved  */
-	stw	r2,GPR2(r1)
-	SAVE_8GPRS(4, r1)
-	SAVE_2GPRS(12, r1)
-	SAVE_4GPRS(20,r1)
-  	mfspr	r20,XER
- 	mfctr	r22
-	stw	r20,_XER(r1)
-	stw	r22,_CTR(r1)
-	mflr	r20		
-	mfmsr	r22
-	stw	r20,_NIP(r1)
-	stw	r22,_MSR(r1)
-	stw	r20,_LINK(r1)
-	bl	iSeries_create_hpte
-	lwz	r0,GPR0(r1)
-	lwz	r2,GPR2(r1)
-	REST_8GPRS(4, r1)
-	REST_2GPRS(12, r1)
-	lwz	r20,_NIP(r1)	
-	lwz	r22,_XER(r1)
-	mtlr	r20
-	mtspr	XER,r22
-	lwz	r20,_CTR(r1)
-	mtctr	r20
-	
-	REST_4GPRS(20,r1)
-	addi	r1,r1,INT_FRAME_SIZE
-	blr
-
-###
-### extern void abort(void)
-###
-### Invoke the hypervisor to kill the partition.          
-### 
-	
-_GLOBAL(abort)
-
-
-/*
- * We put a few things here that have to be page-aligned.
- * This stuff goes at the beginning of the data segment,
- * which is page-aligned.
- */
-	.data
-	.globl	sdata
-sdata:
-	.globl	empty_zero_page
-empty_zero_page:
-	.space	4096
-
-	.globl	swapper_pg_dir
-swapper_pg_dir:
-	.space	4096	
-
-/*
- * This space gets a copy of optional info passed to us by the bootstrap
- * Used to pass parameters into the kernel like root=/dev/sda1, etc.
- */	
-	.globl	cmd_line
-cmd_line:
-	.space	512
diff -Nru a/arch/ppc/kernel/iSeries_idle.c b/arch/ppc/kernel/iSeries_idle.c
--- a/arch/ppc/kernel/iSeries_idle.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,124 +0,0 @@
-/*
- * BK Id: %F% %I% %G% %U% %#%
- */
-/*
- * Idle task for iSeries.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
-#include <linux/stddef.h>
-#include <linux/unistd.h>
-#include <linux/ptrace.h>
-#include <linux/slab.h>
-
-#include <asm/pgtable.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/io.h>
-#include <asm/processor.h>
-#include <asm/mmu.h>
-#include <asm/cache.h>
-#include <asm/cputable.h>
-#include <asm/machdep.h>
-#include <asm/time.h>
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/HvCall.h>
-#include <asm/hardirq.h>
-
-static void yield_shared_processor(void);
-static void run_light_on(int on);
-
-extern unsigned long yield_count;
-
-void iSeries_idle(void)
-{
-	if (!need_resched()) {
-		/* Turn off the run light */
-		run_light_on(0);
-		yield_shared_processor(); 
-		HMT_low();
-
-#ifdef CONFIG_SMP
-		set_thread_flag(TIF_POLLING_NRFLAG);
-		while (!need_resched())
-			barrier();
-		clear_thread_flag(TIF_POLLING_NRFLAG);
-#endif
-	}
-
-	if (need_resched()) {
-		run_light_on(1);
-		schedule();
-		return;
-	}
-
-}
-
-extern void fake_interrupt(void);
-extern u64  get_tb64(void);
-
-static void run_light_on(int on)
-{
-	unsigned long CTRL;
-
-	CTRL = mfspr(CTRLF);
-	CTRL = on? (CTRL | RUNLATCH): (CTRL & ~RUNLATCH);
-	mtspr(CTRLT, CTRL);
-}
-
-static void yield_shared_processor(void)
-{
-	struct Paca *paca;
-	u64 tb;
-
-	/* Poll for I/O events */
-	local_irq_disable();
-	local_irq_enable();
-	
-	paca = (struct Paca *)mfspr(SPRG1);
-	if ( paca->xLpPaca.xSharedProc ) {
-		HvCall_setEnabledInterrupts( HvCall_MaskIPI |
-                        HvCall_MaskLpEvent |
-                        HvCall_MaskLpProd |
-                        HvCall_MaskTimeout );
-
-		/*
-		 * Check here for any of the above pending...
-		 * IPI and Decrementers are indicated in ItLpPaca
-		 * LpEvents are indicated on the LpQueue
-		 *
-		 * Disabling/enabling will check for LpEvents, IPIs
-		 * and decrementers
-		 */
-		local_irq_disable();
-		local_irq_enable();
-
-		++yield_count;
-
-		/* Get current tb value */
-		tb = get_tb64();
-		/* Compute future tb value when yield will expire */
-		tb += tb_ticks_per_jiffy;
-		HvCall_yieldProcessor( HvCall_YieldTimed, tb );
-
-		/* Check here for any of the above pending or timeout expired*/
-		local_irq_disable();
-		/*
-		 * The decrementer stops during the yield.  Just force
-		 * a fake decrementer now and the timer_interrupt
-		 * code will straighten it all out
-		 */
-		paca->xLpPaca.xDecrInt = 1;
-		local_irq_enable();
-	}
-}
diff -Nru a/arch/ppc/kernel/iSeries_misc.S b/arch/ppc/kernel/iSeries_misc.S
--- a/arch/ppc/kernel/iSeries_misc.S	Wed Jan  8 20:04:32 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,469 +0,0 @@
- /*
-  * This file contains miscellaneous low-level functions.
-  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
-  *
-  * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
-  * and Paul Mackerras.
-  * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
-  * updated by Dave Boutcher (boutcher@us.ibm.com)
-  * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- */
-
-#include <linux/config.h>
-#include <linux/sys.h>
-#include <asm/unistd.h>
-#include <asm/errno.h>
-#include <asm/processor.h>
-#include <asm/page.h>
-#include <asm/cache.h>
-#include <asm/ppc_asm.h>
-#include <asm/offsets.h>
-#include "iSeries_asm.h"
-
-	.text
-	.align	5
-
-#ifdef CONFIG_SMP
-	.comm	mmu_hash_lock,4
-#endif /* CONFIG_SMP */
-
-_GLOBAL(is_msr_enabled)
-	mfmsr	r3
-	andi.	r3,r3,MSR_EE
-	beqlr		/* Return r3=0 indicating disabled */
-	li	r3,1
-	blr		/* Return r3=1 indicating enabled */
-
-_GLOBAL(is_soft_enabled)
-	mfspr	r3,SPRG1
-	lbz	r3,PACAPROCENABLED(r3)
-	blr
-
-_GLOBAL(get_tb64)
-	/* hard disable because we are using a 64-bit register
-	 * and we don't want it to get trashed in an interrupt
-	 * handler
-	 */
-	
-	mfmsr	r5
-	rlwinm	r0,r5,0,17,15	/* clear MSR_EE in r0 */
-	mtmsr	r0		/* hard disable */
-
-	mftb	r3
-	rldicl	r4,r3,0,32
-	rldicl	r3,r3,32,32
-
-	mtmsr	r5		/* restore MSR_EE */
-	blr
-
-/* void local_save_flags(unsigned long *flags) */
-_GLOBAL(local_save_flags_ptr)
-	mfspr	r4,SPRG1	/* Get Paca pointer */
-	lbz	r4,PACAPROCENABLED(r4)
-	stw	r4,0(r3)
-	blr
-_GLOBAL(local_save_flags_ptr_end)
-
-/* void local_irq_restore(unsigned long flags) */	
-_GLOBAL(local_irq_restore)
-	cmpi	0,r3,0		/* Are we enabling? */
-	beq	0f		/* No - then skip interrupt checks */
-
-3:	
-	mfspr	r4,SPRG1
-	lbz	r4,PACAPROCENABLED(r4)
-	cmpi	0,r4,0		/* Are we already enabled? */
-	bne	0f		/* Yes - then skip interrupt checks */
-
-	CHECKDECR(r4,r5)
-	bne-	do_fake_decrementer
-
-	CHECKLPQUEUE(r4,r5,r6)
-	bne-	do_lost_interrupts
-2:
-	mfmsr	r0
-	rlwinm	r0,r0,0,17,15		/* hard disable */
-	mtmsr	r0
-
-	CHECKANYINT(r4,r5,r6)
-	ori	r0,r0,MSR_EE
-	beq	1f
-	mtmsr	r0			/* hard enable */
-	b	3b			/* process more interrupts */
-1:
-	mfspr	r4,SPRG1
-	stb	r3,PACAPROCENABLED(r4)
-	mtmsr	r0			/* hard enable */
-	blr
-0:
-	mfspr	r4,SPRG1
-	stb	r3,PACAPROCENABLED(r4)
-	blr
-_GLOBAL(local_irq_restore_end)
-	
-_GLOBAL(local_irq_disable)
-	mfspr	r4,SPRG1
-	li	r3,0
-	stb	r3,PACAPROCENABLED(r4)
-	blr			/* Done */
-_GLOBAL(local_irq_disable_end)
-
-_GLOBAL(local_irq_enable)
-	li	r3,1
-	b	local_irq_restore
-_GLOBAL(local_irq_enable_end)
-
-/*
- * We were about to enable interrupts but we have to simulate
- * some interrupts that were lost by enable_irq first.
- */
-_GLOBAL(do_lost_interrupts)
-	stwu	r1,-32(r1)
-	mflr	r0
-	stw	r0,36(r1)
-	stw	r3,28(r1)
-1:	bl	fake_interrupt
-	bl	check_softirqs
-	mfmsr	r0
-	rlwinm	r0,r0,0,17,15		/* hard disable */
-	mtmsr	r0
-
-	CHECKANYINT(r4,r5,r6)
-	ori	r0,r0,MSR_EE
-	beq	2f
-	mtmsr	r0			/* hard enable */
-	b	1b			/* process more interrupts */
-
-2:	lwz	r3,28(r1)
-	mfspr	r4,SPRG1
-	stb	r3,PACAPROCENABLED(r4)	/* restore soft interrupt state */
-	mtmsr	r0			/* hard enable */
-	lwz	r0,36(r1)
-	mtlr	r0
-
-	addi	r1,r1,32
-	blr
-
-/*
- * Simulate a decrementer interrupt
- */
-do_fake_decrementer:
-	stwu	r1,-32(r1)
-	mflr	r0
-	stw	r0,36(r1)
-	stw	r3,28(r1)
-	bl	fake_decrementer
-	bl	check_softirqs
-	lwz	r0,36(r1)
-	mtlr	r0
-
-	lwz	r3,28(r1)
-	addi	r1,r1,32
-
-	mfmsr	r0			/* hard disable */
-	rlwinm	r0,r0,0,17,15
-	mtmsr	r0
-	
-	CHECKANYINT(r4,r5,r6)		/* Check for any interrupts pending */
-	ori	r0,r0,MSR_EE
-	beq	1f
-	mtmsr	r0			/* hard enable */
-	b	do_lost_interrupts	/* Handle more interrupts */
-	
-1:	mfspr	r4,SPRG1
-	stb	r3,PACAPROCENABLED(r4)	/* soft enable */
-	mtmsr	r0			/* hard enable */
-	blr
-
-/*
- * do softirqs if necessary
- */
-check_softirqs:
-	stwu	r1,-32(r1)
-	mflr	r0
-	stw	r0,36(r1)
-	
-	lis	r4,irq_stat@ha
-	addi	r4,r4,irq_stat@l
-#ifdef CONFIG_SMP
-	lwz	r3,CPU(r2)
-	slwi	r3,r3,7
-	add	r4,r4,r3
-#endif
-	lwz	r5,0(r4)
-	lwz	r4,4(r4)
-	and.	r5,r5,r4
-	beq+	2f
-	bl	do_softirq
-2:
-	lwz	r0,36(r1)
-	mtlr	r0
-
-	addi	r1,r1,32
-	blr
-
-
-/*
- * Write any modified data cache blocks out to memory
- * and invalidate the corresponding instruction cache blocks.
- *
- * flush_icache_range(unsigned long start, unsigned long stop)
- */
-
-_GLOBAL(flush_icache_range)
-
-
-/*
- * Flush the data cache to memory 
- * 
- * Different models of iSeries's have different cache line sizes
- * and in some cases i-cache and d-cache line sizes differ from
- * each other.
- */
-
-	lis	r7,iSeries_dcache_line_size@ha
-	lhz	r7,iSeries_dcache_line_size@l(r7)
-	addi	r5,r7,-1
-	andc	r6,r3,r5		/* round low to line bdy */
-	subf	r8,r6,r4		/* compute length */
-	add	r8,r8,r5		/* ensure we get enough */
-	lis	r9,iSeries_log_dcache_line_size@ha
-	lhz	r9,iSeries_log_dcache_line_size@l(r9)
-	srw.	r8,r8,r9		/* compute line count */
-	beqlr				/* nothing to do? */
-	mtctr	r8
-1:	dcbst	0,r6
-	add	r6,r6,r7
-	bdnz	1b
-	sync
-
-/* Now invalidate the instruction cache */
-	
-	lis	r7,iSeries_icache_line_size@ha
-	lhz	r7,iSeries_icache_line_size@l(r7)
-	addi	r5,r7,-1
-	andc	r6,r3,r5		/* round low to line bdy */
-	subf	r8,r6,r4		/* compute length */
-	add	r8,r8,r5
-	lis	r9,iSeries_log_icache_line_size@ha
-	lhz	r9,iSeries_log_icache_line_size@l(r9)
-	srw.	r8,r8,r9		/* compute line count */
-	beqlr				/* nothing to do? */
-	mtctr	r8
-2:	icbi	0,r6
-	add	r6,r6,r7
-	bdnz	2b
-	sync
-	isync
-	blr
-	
-
-/*
- * Like above, but only do the D-cache.
- *
- * flush_dcache_range(unsigned long start, unsigned long stop)
- */
-_GLOBAL(flush_dcache_range)
-
-/*
- * Flush the data cache to memory 
- * 
- * Different models of iSeries's have different cache line sizes
- */
-
-	lis	r7,iSeries_dcache_line_size@ha
-	lhz	r7,iSeries_dcache_line_size@l(r7)
-	addi	r5,r7,-1
-	andc	r6,r3,r5		/* round low to line bdy */
-	subf	r8,r6,r4		/* compute length */
-	add	r8,r8,r5		/* ensure we get enough */
-	lis	r9,iSeries_log_dcache_line_size@ha
-	lhz	r9,iSeries_log_dcache_line_size@l(r9)
-	srw.	r8,r8,r9		/* compute line count */
-	beqlr				/* nothing to do? */
-	mtctr	r8
-0:	dcbst	0,r6
-	add	r6,r6,r7
-	bdnz	0b
-	sync
-	blr
-
-
-/*
- * Flush a particular page from the data cache to RAM.
- * Note: this is necessary because the instruction cache does *not*
- * snoop from the data cache.
- *
- *	void __flush_page_to_ram(void *page)
- *	void __flush_dcache_icache(void *page)
- */
-_GLOBAL(__flush_page_to_ram)
-_GLOBAL(__flush_dcache_icache)
-
-/*
- * Flush the data cache to memory 
- * 
- * Different models of iSeries's have different cache line sizes
- */
-
-/* Flush the dcache */
-
-	rlwinm	r3,r3,0,0,19		/* Page align */
-	lis	r4,iSeries_dcache_lines_per_page@ha
-	lhz	r4,iSeries_dcache_lines_per_page@l(r4)
-	lis	r5,iSeries_dcache_line_size@ha
-	lhz	r5,iSeries_dcache_line_size@l(r5)
-	mr	r6,r3
-	mtctr	r4
-0:	dcbst	0,r6
-	add	r6,r6,r5
-	bdnz	0b
-	sync
-
-/* Now invalidate the icache */	
-
-	lis	r4,iSeries_icache_lines_per_page@ha
-	lhz	r4,iSeries_icache_lines_per_page@l(r4)
-	lis	r5,iSeries_icache_line_size@ha
-	lhz	r5,iSeries_icache_line_size@l(r5)
-	mtctr	r4
-1:	icbi	0,r3
-	add	r3,r3,r5
-	bdnz	1b
-	sync	
-	isync
-	blr
-	
-
-/*
- * Flush a particular page from the instruction cache.
- * Note: this is necessary because the instruction cache does *not*
- * snoop from the data cache.
- *
- *	void __flush_icache_page(void *page)
- */
-_GLOBAL(__flush_icache_page)
-
-
-/*
- * Different models of iSeries's have different cache line sizes
- */
- 
-/* Invalidate the icache */
-
-	rlwinm	r3,r3,0,0,19		/* Page align */
-	lis	r4,iSeries_icache_lines_per_page@ha
-	lhz	r4,iSeries_icache_lines_per_page@l(r4)
-	lis	r5,iSeries_icache_line_size@ha
-	lhz	r5,iSeries_icache_line_size@l(r5)
-	mtctr	r4
-1:	icbi	0,r3
-	add	r3,r3,r5
-	bdnz	1b
-	sync	
-	isync
-	blr
-	
-/*
- * Clear a page using the dcbz instruction, which doesn't cause any
- * memory traffic (except to write out any cache lines which get
- * displaced).  This only works on cacheable memory.
- */
-_GLOBAL(clear_page)
-
-	rlwinm	r3,r3,0,0,19		/* Page align */
-	lis	r4,iSeries_dcache_lines_per_page@ha
-	lhz	r4,iSeries_dcache_lines_per_page@l(r4)
-	lis	r5,iSeries_dcache_line_size@ha
-	lhz	r5,iSeries_dcache_line_size@l(r5)
-	mtctr	r4
-0:	dcbz	0,r3
-	add	r3,r3,r5
-	bdnz	0b
-	blr
-
-
-/*
- * Copy a whole page.  We use the dcbz instruction on the destination
- * to reduce memory traffic (it eliminates the unnecessary reads of
- * the destination into cache).  This requires that the destination
- * is cacheable.
- */
-#define COPY_16_BYTES		\
-	lwz	r6,4(r4);	\
-	lwz	r7,8(r4);	\
-	lwz	r8,12(r4);	\
-	lwzu	r9,16(r4);	\
-	stw	r6,4(r3);	\
-	stw	r7,8(r3);	\
-	stw	r8,12(r3);	\
-	stwu	r9,16(r3)
-
-_GLOBAL(copy_page)
-
-	rlwinm	r3,r3,0,0,19		/* Page align */
-	rlwinm	r4,r4,0,0,19
-	lis	r5,iSeries_dcache_lines_per_page@ha
-	lhz	r5,iSeries_dcache_lines_per_page@l(r5)
-	lis	r6,iSeries_dcache_line_size@ha
-	lhz	r0,iSeries_dcache_line_size@l(r6)
-	mtctr	r5
-	addi	r3,r3,-4
-	addi	r4,r4,-4
-	li	r10,4
-
-	cmpi	0,r0,32
-	beq	do_32_byte_line
-	cmpi	0,r0,64
-	beq	do_64_byte_line
-	cmpi	0,r0,128
-	beq	do_128_byte_line
-
-	/* We don't have code specifically for this cache line size */
-	/* Assume that the cache line size is at least 16 (and of */
-	/* course a multiple of 16)  */
-	/* This code will work for all power-of-2 cache line sizes */
-	/* from 16 to 4096 */
-	
-1:	mr	r5,r0
-	dcbz	r10,r3
-0:	COPY_16_BYTES
-	addi	r5,r5,-16
-	or.	r5,r5,r5
-	bne	0b
-	bdnz	1b
-	blr
-
-do_32_byte_line:
-	dcbz	r10,r3
-	COPY_16_BYTES
-	COPY_16_BYTES
-	bdnz	do_32_byte_line
-	blr
-
-do_64_byte_line:
-	dcbz	r10,r3
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	bdnz	do_64_byte_line
-	blr
-
-do_128_byte_line:	
-	dcbz	r10,r3
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	COPY_16_BYTES
-	bdnz	do_128_byte_line
-	blr
diff -Nru a/arch/ppc/kernel/idle_6xx.S b/arch/ppc/kernel/idle_6xx.S
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/kernel/idle_6xx.S	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,242 @@
+/*
+ *  This file contains the power_save function for 6xx & 7xxx CPUs
+ *  rewritten in assembler
+ *
+ *  Warning ! This code assumes that if your machine has a 750fx
+ *  it will have PLL 1 set to low speed mode (used during NAP/DOZE).
+ *  if this is not the case some additional changes will have to
+ *  be done to check a runtime var (a bit like powersave-nap)
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version
+ *  2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/threads.h>
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <asm/cputable.h>
+#include <asm/thread_info.h>
+#include <asm/ppc_asm.h>
+#include <asm/offsets.h>
+
+#undef DEBUG
+
+	.text
+
+/*
+ * Init idle, called at early CPU setup time from head.S for each CPU
+ * Make sure no rest of NAP mode remains in HID0, save default
+ * values for some CPU specific registers. Called with r24
+ * containing CPU number and r3 reloc offset
+ */
+ 	.globl	init_idle_6xx
+init_idle_6xx:
+BEGIN_FTR_SECTION
+	mfspr	r4,SPRN_HID0
+	rlwinm	r4,r4,0,10,8	/* Clear NAP */
+	mtspr	SPRN_HID0, r4
+	b	1f
+END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP)
+	blr
+1:
+	slwi	r5,r24,2
+	add	r5,r5,r3
+BEGIN_FTR_SECTION
+	mfspr	r4,SPRN_MSSCR0
+	addis	r6,r5, nap_save_msscr0@ha
+	stw	r4,nap_save_msscr0@l(r6)
+END_FTR_SECTION_IFSET(CPU_FTR_NAP_DISABLE_L2_PR)
+BEGIN_FTR_SECTION
+	mfspr	r4,SPRN_HID1
+	addis	r6,r5,nap_save_hid1@ha
+	stw	r4,nap_save_hid1@l(r6)
+END_FTR_SECTION_IFSET(CPU_FTR_DUAL_PLL_750FX)
+	blr
+
+/*
+ * Here is the power_save_6xx function. This could eventually be
+ * split into several functions & changing the function pointer
+ * depending on the various features.
+ */
+	.globl	ppc6xx_idle
+ppc6xx_idle:
+	/* Check if we can nap or doze, put HID0 mask in r3
+	 */
+	lis	r3, 0
+BEGIN_FTR_SECTION
+	lis	r3,HID0_DOZE@h
+END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE)
+BEGIN_FTR_SECTION
+	/* We must dynamically check for the NAP feature as it
+	 * can be cleared by CPU init after the fixups are done
+	 */
+	lis	r4,cur_cpu_spec@ha
+	lwz	r4,cur_cpu_spec@l(r4)
+	lwz	r4,CPU_SPEC_FEATURES(r4)
+	andi.	r0,r4,CPU_FTR_CAN_NAP
+	beq	1f
+	/* Now check if user or arch enabled NAP mode */
+	lis	r4,powersave_nap@ha
+	lwz	r4,powersave_nap@l(r4)
+	cmpi	0,r4,0
+	beq	1f
+	lis	r3,HID0_NAP@h
+1:	
+END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP)
+	cmpi	0,r3,0
+	beqlr
+
+	/* Clear MSR:EE */
+	mfmsr	r7
+	rlwinm	r0,r7,0,17,15
+	mtmsr	r0
+
+	/* Check current_thread_info()->flags */
+	rlwinm	r4,r1,0,0,18
+	lwz	r4,TI_FLAGS(r4)
+	andi.	r0,r4,_TIF_NEED_RESCHED
+	beq	1f
+	mtmsr	r7	/* out of line this ? */
+	blr
+1:	
+	/* Some pre-nap cleanups needed on some CPUs */
+	andis.	r0,r3,HID0_NAP@h
+	beq	2f
+BEGIN_FTR_SECTION
+	/* Disable L2 prefetch on some 745x and try to ensure
+	 * L2 prefetch engines are idle. As explained by errata
+	 * text, we can't be sure they are, we just hope very hard
+	 * that well be enough (sic !). At least I noticed Apple
+	 * doesn't even bother doing the dcbf's here...
+	 */
+	mfspr	r4,SPRN_MSSCR0
+	rlwinm	r4,r4,0,0,29
+	sync
+	mtspr	SPRN_MSSCR0,r4
+	sync
+	isync
+	lis	r4,KERNELBASE@h
+	dcbf	0,r4
+	dcbf	0,r4
+	dcbf	0,r4
+	dcbf	0,r4
+END_FTR_SECTION_IFSET(CPU_FTR_NAP_DISABLE_L2_PR)
+#ifdef DEBUG
+	lis	r6,nap_enter_count@ha
+	lwz	r4,nap_enter_count@l(r6)
+	addi	r4,r4,1
+	stw	r4,nap_enter_count@l(r6)
+#endif	
+2:
+BEGIN_FTR_SECTION
+	/* Go to low speed mode on some 750FX */
+	lis	r4,powersave_lowspeed@ha
+	lwz	r4,powersave_lowspeed@l(r4)
+	cmpi	0,r4,0
+	beq	1f
+	mfspr	r4,SPRN_HID1
+	oris	r4,r4,0x0001
+	mtspr	SPRN_HID1,r4
+1:	
+END_FTR_SECTION_IFSET(CPU_FTR_DUAL_PLL_750FX)
+
+	/* Go to NAP or DOZE now */	
+	mfspr	r4,SPRN_HID0
+	lis	r5,(HID0_NAP|HID0_SLEEP)@h
+BEGIN_FTR_SECTION
+	oris	r5,r5,HID0_DOZE@h
+END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE)
+	andc	r4,r4,r5
+	or	r4,r4,r3
+BEGIN_FTR_SECTION
+	oris	r4,r4,HID0_DPM@h	/* that should be done once for all  */
+END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM)
+	mtspr	SPRN_HID0,r4
+BEGIN_FTR_SECTION
+	DSSALL
+	sync
+END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+	ori	r7,r7,MSR_EE /* Could be ommited (already set) */
+	oris	r7,r7,MSR_POW@h
+	sync
+	isync
+	mtmsr	r7
+	isync
+	sync
+	blr
+	
+/*
+ * Return from NAP/DOZE mode, restore some CPU specific registers,
+ * we are called with DR/IR still off and r2 containing physical
+ * address of current.
+ */
+ 	.globl power_save_6xx_restore
+power_save_6xx_restore:
+	mfspr	r11,SPRN_HID0
+	rlwinm.	r11,r11,0,10,8	/* Clear NAP & copy NAP bit !state to cr1 EQ */
+	cror	4*cr1+eq,4*cr0+eq,4*cr0+eq
+BEGIN_FTR_SECTION
+	rlwinm	r11,r11,0,9,7	/* Clear DOZE */
+END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE)
+	mtspr	SPRN_HID0, r11
+
+#ifdef DEBUG
+	beq	cr1,1f
+	lis	r11,(nap_return_count-KERNELBASE)@ha
+	lwz	r9,nap_return_count@l(r11)
+	addi	r9,r9,1
+	stw	r9,nap_return_count@l(r11)
+1:
+#endif
+	
+	rlwinm	r9,r1,0,0,18
+	tophys(r9,r9)
+	lwz	r11,TI_CPU(r9)
+	slwi	r11,r11,2
+	/* Todo make sure all these are in the same page
+	 * and load r22 (@ha part + CPU offset) only once
+	 */
+BEGIN_FTR_SECTION
+	beq	cr1,1f
+	addis	r9,r11,(nap_save_msscr0-KERNELBASE)@ha
+	lwz	r9,nap_save_msscr0@l(r9)
+	mtspr	SPRN_MSSCR0, r9
+	sync
+	isync
+1:
+END_FTR_SECTION_IFSET(CPU_FTR_NAP_DISABLE_L2_PR)
+BEGIN_FTR_SECTION
+	addis	r9,r11,(nap_save_hid1-KERNELBASE)@ha
+	lwz	r9,nap_save_hid1@l(r9)
+	mtspr	SPRN_HID1, r9
+END_FTR_SECTION_IFSET(CPU_FTR_DUAL_PLL_750FX)
+	b	transfer_to_handler_cont
+
+	.data
+
+	.globl nap_save_msscr0
+nap_save_msscr0:
+	.space	4*NR_CPUS
+
+	.globl nap_save_hid1
+nap_save_hid1:
+	.space	4*NR_CPUS
+
+	.globl powersave_nap
+powersave_nap:
+	.long	0
+	.globl powersave_lowspeed
+powersave_lowspeed:
+	.long	0
+
+#ifdef DEBUG
+	.globl nap_enter_count
+nap_enter_count:
+	.space	4
+	.globl nap_return_count
+nap_return_count:
+	.space	4
+#endif
diff -Nru a/arch/ppc/kernel/irq.c b/arch/ppc/kernel/irq.c
--- a/arch/ppc/kernel/irq.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/irq.c	Wed Jan  8 20:04:45 2003
@@ -502,7 +502,6 @@
 	spin_unlock(&desc->lock);
 }
 
-#ifndef CONFIG_PPC_ISERIES	/* iSeries version is in iSeries_pic.c */
 void do_IRQ(struct pt_regs *regs)
 {
 	int irq, first = 1;
@@ -525,7 +524,6 @@
 		ppc_spurious_interrupts++;
         irq_exit();
 }
-#endif /* CONFIG_PPC_ISERIES */
 
 unsigned long probe_irq_on (void)
 {
diff -Nru a/arch/ppc/kernel/l2cr.S b/arch/ppc/kernel/l2cr.S
--- a/arch/ppc/kernel/l2cr.S	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/kernel/l2cr.S	Wed Jan  8 20:04:44 2003
@@ -101,6 +101,12 @@
 	blr
 END_FTR_SECTION_IFCLR(CPU_FTR_L2CR)
 
+	/* Stop DST streams */
+BEGIN_FTR_SECTION
+	DSSALL
+	sync
+END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+
 	/* Turn off interrupts and data relocation. */
 	mfmsr	r7		/* Save MSR in r7 */
 	rlwinm	r4,r7,0,17,15
@@ -136,7 +142,7 @@
 
 	/* TODO: use HW flush assist when available */
 
-	lis	r4,0x0002
+	lis	r4,0x0004
 	mtctr	r4
 	li	r4,0
 1:
@@ -145,7 +151,7 @@
 	bdnz	1b
 	
 	/* Now, flush the first 4MB of memory */
-	lis	r4,0x0002
+	lis	r4,0x0004
 	mtctr	r4
 	li	r4,0
 	sync
@@ -246,6 +252,10 @@
 	blr
 END_FTR_SECTION_IFCLR(CPU_FTR_L3CR)
 
+	/* Stop DST streams */
+	DSSALL
+	sync
+	
 	/* Turn off interrupts and data relocation. */
 	mfmsr	r7		/* Save MSR in r7 */
 	rlwinm	r4,r7,0,17,15
@@ -254,9 +264,6 @@
 	mtmsr	r4
 	isync
 
-	/* Stop DST streams */
-	dssall
-	
 	/* Get the current enable bit of the L3CR into r4 */
 	mfspr	r4,SPRN_L3CR
 	
@@ -269,50 +276,26 @@
 	rlwinm.	r4,r4,0,0,0
 	beq	2f
 
-	/* Flush the cache. First, read the first 4MB of memory (physical) to
-	 * put new data in the cache.  (Actually we only need
-	 * the size of the L3 cache plus the size of the L1+L2 cache, but 4MB will
-	 * cover everything just to be safe).
+	/* Flush the cache.
 	 */
 		
 	/* TODO: use HW flush assist */
 
-	lis	r4,0x0002
+	lis	r4,0x0008
 	mtctr	r4
 	li	r4,0
 1:
 	lwzx	r0,r0,r4
-	addi	r4,r4,32		/* Go to start of next cache line */
-	bdnz	1b
-	
-	/* Now, flush the first 4MB of memory */
-	lis	r4,0x0002
-	mtctr	r4
-	li	r4,0
-	sync
-1:
 	dcbf	r0,r4
 	addi	r4,r4,32		/* Go to start of next cache line */
 	bdnz	1b
-
+	
 2:
 	/* Set up the L3CR configuration bits (and switch L3 off) */
 	sync
 	mtspr	SPRN_L3CR,r3
 	sync
 
-	/* Before we perform the global invalidation, we must disable dynamic
-	 * power management via HID0[DPM] to work around a processor bug where
-	 * DPM can possibly interfere with the state machine in the processor
-	 * that invalidates the L3 cache tags. Hrm... This is necessary for L2,
-	 * is it for L3 as well ? --BenH.
-	 */
-	mfspr	r8,HID0			/* Save HID0 in r8 */
-	rlwinm	r4,r8,0,12,10		/* Turn off HID0[DPM] */
-	sync
-	mtspr	HID0,r4			/* Disable DPM */
-	sync
-
 	oris	r3,r3,L3CR_L3RES@h		/* Set reserved bit 5 */
 	mtspr	SPRN_L3CR,r3
 	sync
@@ -321,7 +304,7 @@
 	sync
 
 	/* Wait for stabilize */
-	li	r0,128
+	li	r0,256
 	mtctr	r0
 1:	bdnz	1b
 	
@@ -343,15 +326,10 @@
 	sync
 
 	/* Wait for stabilize */
-	li	r0,128
+	li	r0,256
 	mtctr	r0
 1:	bdnz	1b
 	
-	/* Restore HID0[DPM] to whatever it was before */
-	sync
-	mtspr	1008,r8
-	sync
-
 	/* See if we need to enable the cache */
 	cmplwi	r5,0
 	beq	4f
@@ -360,6 +338,11 @@
 	oris	r3,r3,(L3CR_L3E | L3CR_L3CLKEN)@h
 	mtspr	SPRN_L3CR,r3
 	sync
+
+	/* Wait for stabilize */
+	li	r0,256
+	mtctr	r0
+1:	bdnz	1b
 
 	/* Restore MSR (restores EE and DR bits to original state) */
 4:	SYNC
diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
--- a/arch/ppc/kernel/misc.S	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/misc.S	Wed Jan  8 20:04:45 2003
@@ -136,7 +136,6 @@
  * r3 = data offset (not changed)
  */
 _GLOBAL(do_cpu_ftr_fixups)
-#ifndef CONFIG_PPC_ISERIES
 	/* Get CPU 0 features */
 	addis	r6,r3,cur_cpu_spec@ha
 	addi	r6,r6,cur_cpu_spec@l
@@ -180,16 +179,15 @@
 	sync			/* additional sync needed on g4 */
 	isync
 	b	1b
-#else /* CONFIG_PPC_ISERIES */
-	blr
-#endif /* CONFIG_PPC_ISERIES */
 
 /*
  * call_setup_cpu - call the setup_cpu function for this cpu
  * r3 = data offset, r24 = cpu number
  *
- * Don't change register layout, the setup function may rely
- * on r5 containing a relocated pointer to the current cpu spec.
+ * Setup function is called with:
+ *   r3 = data offset
+ *   r4 = CPU number
+ *   r5 = ptr to CPU spec (relocated)
  */
 _GLOBAL(call_setup_cpu)
 	addis	r5,r3,cur_cpu_spec@ha
@@ -200,10 +198,9 @@
 	lwz	r6,CPU_SPEC_SETUP(r5)
 	add	r6,r6,r3
 	mtctr	r6
-	mr	r3,r24
+	mr	r4,r24
 	bctr
 
-#ifndef CONFIG_PPC_ISERIES	/* iSeries version is in iSeries_misc.S */
 /* void local_save_flags_ptr(unsigned long *flags) */
 _GLOBAL(local_save_flags_ptr)
 	mfmsr	r4
@@ -331,7 +328,6 @@
 	nop
 	nop
 _GLOBAL(local_irq_enable_end)
-#endif /* CONFIG_PPC_ISERIES */
 
 /*
  * complement mask on the msr then "or" some values on.
@@ -352,18 +348,9 @@
  */
 _GLOBAL(_tlbia)
 #if defined(CONFIG_40x)
-	/* This needs to be coordinated with other pinning functions since
-	 * we don't keep a memory location of number of entries to reduce
-	 * cache pollution during these operations.
-	 */
-	lis	r3, 0
-	sync
-1:
-	tlbwe	r3, r3, TLB_TAG		/* just ensure V is clear */
-	addi	r3, r3, 1		/*   so r3 works fine for that */
-	cmpwi	0, r3, 61		/* reserve last two entries */
-	ble	1b
-	isync
+	sync			/* Flush to memory before changing mapping */
+	tlbia
+	isync			/* Flush shadow TLB */
 #else /* ! defined(CONFIG_40x) */
 #if defined(CONFIG_SMP)
 	rlwinm	r8,r1,0,0,18
@@ -485,7 +472,6 @@
 	isync
 	blr
 
-#ifndef CONFIG_PPC_ISERIES	/* iSeries version is in iSeries_misc.S */
 /*
  * Write any modified data cache blocks out to memory
  * and invalidate the corresponding instruction cache blocks.
@@ -749,7 +735,6 @@
 #endif
 	bdnz	1b
 	blr
-#endif /* CONFIG_PPC_ISERIES */
 
 /*
  * void atomic_clear_mask(atomic_t mask, atomic_t *addr)
diff -Nru a/arch/ppc/kernel/module.c b/arch/ppc/kernel/module.c
--- a/arch/ppc/kernel/module.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/kernel/module.c	Wed Jan  8 20:04:43 2003
@@ -103,20 +103,20 @@
 
 int module_frob_arch_sections(Elf32_Ehdr *hdr,
 			      Elf32_Shdr *sechdrs,
-			      const char *secstrings,
+			      char *secstrings,
 			      struct module *me)
 {
 	unsigned int i;
 
-	/* Find .plt and .pltinit sections */
+	/* Find .plt and .init.plt sections */
 	for (i = 0; i < hdr->e_shnum; i++) {
-		if (strcmp(secstrings + sechdrs[i].sh_name, ".plt.init") == 0)
+		if (strcmp(secstrings + sechdrs[i].sh_name, ".init.plt") == 0)
 			me->arch.init_plt_section = i;
 		else if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0)
 			me->arch.core_plt_section = i;
 	}
 	if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
-		printk("Module doesn't contain .plt or .plt.init sections.\n");
+		printk("Module doesn't contain .plt or .init.plt sections.\n");
 		return -ENOEXEC;
 	}
 
diff -Nru a/arch/ppc/kernel/ppc-stub.c b/arch/ppc/kernel/ppc-stub.c
--- a/arch/ppc/kernel/ppc-stub.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/ppc-stub.c	Wed Jan  8 20:04:45 2003
@@ -866,7 +866,7 @@
 	return 1;
  }
 
-#if defined(CONFIG_6xx) || defined(CONFIG_POWER3) || defined(CONFIG_ISERIES)
+#if defined(CONFIG_6xx) || defined(CONFIG_POWER3)
 
 /* This is used on arches which don't have a serial driver that maps
  * the ports for us */
diff -Nru a/arch/ppc/kernel/ppc6xx_idle.c b/arch/ppc/kernel/ppc6xx_idle.c
--- a/arch/ppc/kernel/ppc6xx_idle.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,79 +0,0 @@
-/*
- * BK Id: %F% %I% %G% %U% %#%
- */
-/*
- * power_save() rountine for classic PPC CPUs.
- *
- * Written by Cort Dougan (cort@cs.nmt.edu)
- *
- * 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/sched.h>
-#include <linux/smp.h>
-#include <linux/stringify.h>
-
-#include <asm/cputable.h>
-#include <asm/current.h>
-#include <asm/processor.h>
-
-unsigned long powersave_nap = 0;
-
-#define DSSALL		.long	(0x1f<<26)+(0x10<<21)+(0x336<<1)
-
-void
-ppc6xx_idle(void)
-{
-	unsigned long hid0;
-	int nap = powersave_nap;
-
-	/* 7450 has no DOZE mode mode, we return if powersave_nap
-	 * isn't enabled
-	 */
-	if (!(nap || (cur_cpu_spec[smp_processor_id()]->cpu_features
-		      & CPU_FTR_CAN_DOZE)))
-		return;
-	/*
-	 * Disable interrupts to prevent a lost wakeup
-	 * when going to sleep.  This is necessary even with
-	 * RTLinux since we are not guaranteed an interrupt
-	 * didn't come in and is waiting for a __sti() before
-	 * emulating one.  This way, we really do hard disable.
-	 *
-	 * We assume that we're sti-ed when we come in here.  We
-	 * are in the idle loop so if we're cli-ed then it's a bug
-	 * anyway.
-	 *  -- Cort
-	 */
-	_nmask_and_or_msr(MSR_EE, 0);
-	if (!need_resched()) {
-		__asm__ __volatile__("mfspr %0,1008":"=r"(hid0):);
-		hid0 &= ~(HID0_NAP | HID0_SLEEP | HID0_DOZE);
-		hid0 |= (powersave_nap ? HID0_NAP : HID0_DOZE);
-		if (!(cur_cpu_spec[smp_processor_id()]->cpu_features
-		      & CPU_FTR_NO_DPM))
-			hid0 |= HID0_DPM;
-		__asm__ __volatile__("mtspr 1008,%0"::"r"(hid0));
-		/* Flush pending data streams, consider this instruction
-		 * exist on all altivec capable CPUs
-		 */
-		__asm__ __volatile__("98:	" __stringify(DSSALL) "\n"
-				     "	sync\n"
-				     "99:\n"
-				     ".section __ftr_fixup,\"a\"\n"
-				     "	.long %0\n"
-				     "	.long %1\n"
-				     "	.long 98b\n"
-				     "	.long 99b\n"
-				     ".previous"::"i"
-				     (CPU_FTR_ALTIVEC), "i"(CPU_FTR_ALTIVEC));
-
-		/* set the POW bit in the MSR, and enable interrupts
-		 * so we wake up sometime! */
-		_nmask_and_or_msr(0, MSR_POW | MSR_EE);
-	}
-	_nmask_and_or_msr(0, MSR_EE);
-}
diff -Nru a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
--- a/arch/ppc/kernel/ppc_ksyms.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/ppc_ksyms.c	Wed Jan  8 20:04:45 2003
@@ -153,11 +153,9 @@
 EXPORT_SYMBOL(_outsl_ns);
 EXPORT_SYMBOL(iopa);
 EXPORT_SYMBOL(mm_ptov);
-#ifndef CONFIG_PPC_ISERIES
 EXPORT_SYMBOL(ioremap);
 EXPORT_SYMBOL(__ioremap);
 EXPORT_SYMBOL(iounmap);
-#endif
 
 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
 EXPORT_SYMBOL(ppc_ide_md);
diff -Nru a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c
--- a/arch/ppc/kernel/process.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/kernel/process.c	Wed Jan  8 20:04:44 2003
@@ -44,9 +44,6 @@
 #include <asm/mmu.h>
 #include <asm/prom.h>
 #include <asm/hardirq.h>
-#ifdef CONFIG_PPC_ISERIES
-#include <asm/iSeries/Paca.h>
-#endif
 
 int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs);
 extern unsigned long _get_SP(void);
@@ -365,9 +362,6 @@
 	sp -= STACK_FRAME_OVERHEAD;
 	p->thread.ksp = sp;
 	kregs->nip = (unsigned long)ret_from_fork;
-#ifdef CONFIG_PPC_ISERIES
-	kregs->softEnable = ((struct Paca *)mfspr(SPRG1))->xProcEnabled;
-#endif	
 
 	/*
 	 * copy fpu info - assume lazy fpu switch now always
@@ -408,6 +402,7 @@
 	regs->link = 0;
 	regs->xer = 0;
 	regs->ccr = 0;
+	regs->mq = 0;
 	regs->nip = nip;
 	regs->gpr[1] = sp;
 	regs->msr = MSR_USER;
diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
--- a/arch/ppc/kernel/setup.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/kernel/setup.c	Wed Jan  8 20:04:45 2003
@@ -530,7 +530,7 @@
 	strcpy(cmd_line, CONFIG_CMDLINE);
 #endif /* CONFIG_CMDLINE */
 
-#if defined(CONFIG_6xx) || defined(CONFIG_ALL_PPC)
+#if defined(CONFIG_6xx)
 	ppc_md.power_save = ppc6xx_idle;
 #endif
 
diff -Nru a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
--- a/arch/ppc/kernel/time.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/kernel/time.c	Wed Jan  8 20:04:44 2003
@@ -87,11 +87,6 @@
 
 extern unsigned long wall_jiffies;
 
-#ifdef CONFIG_PPC_ISERIES
-extern u64 get_tb64(void);
-extern u64 next_jiffy_update_tb[];
-#endif
-
 static long time_offset;
 
 spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
@@ -111,8 +106,6 @@
 	return delta;
 }
 
-#ifndef CONFIG_PPC_ISERIES	/* iSeries version is in iSeries_time.c */
-
 extern unsigned long prof_cpu_mask;
 extern unsigned int * prof_buffer;
 extern unsigned long prof_len;
@@ -213,7 +206,6 @@
 
 	irq_exit();
 }
-#endif /* CONFIG_PPC_ISERIES */
 
 /*
  * This version of gettimeofday has microsecond resolution.
@@ -226,11 +218,7 @@
 	read_lock_irqsave(&xtime_lock, flags);
 	sec = xtime.tv_sec;
 	usec = (xtime.tv_nsec / 1000);
-#ifdef CONFIG_PPC_ISERIES
-	delta = tb_ticks_per_jiffy - ( next_jiffy_update_tb[0] - get_tb64() );
-#else
 	delta = tb_ticks_since(tb_last_stamp);
-#endif
 #ifdef CONFIG_SMP
 	/* As long as timebases are not in sync, gettimeofday can only
 	 * have jiffy resolution on SMP.
@@ -298,13 +286,11 @@
 	write_unlock_irqrestore(&xtime_lock, flags);
 }
 
-
+/* This function is only called on the boot processor */
 void __init time_init(void)
 {
 	time_t sec, old_sec;
 	unsigned old_stamp, stamp, elapsed;
-	/* This function is only called on the boot processor */
-	unsigned long flags;
 
         if (ppc_md.time_init != NULL)
                 time_offset = ppc_md.time_init();
@@ -321,31 +307,31 @@
 	/* Now that the decrementer is calibrated, it can be used in case the 
 	 * clock is stuck, but the fact that we have to handle the 601
 	 * makes things more complex. Repeatedly read the RTC until the
-	 * next second boundary to try to achieve some precision...
+	 * next second boundary to try to achieve some precision.  If there
+	 * is no RTC, we still need to set tb_last_stamp and
+	 * last_jiffy_stamp(cpu 0) to the current stamp.
 	 */
+	stamp = get_native_tbl();
 	if (ppc_md.get_rtc_time) {
-		stamp = get_native_tbl();
 		sec = ppc_md.get_rtc_time();
 		elapsed = 0;
 		do {
 			old_stamp = stamp; 
 			old_sec = sec;
 			stamp = get_native_tbl();
-			if (__USE_RTC() && stamp < old_stamp) old_stamp -= 1000000000;
+			if (__USE_RTC() && stamp < old_stamp)
+				old_stamp -= 1000000000;
 			elapsed += stamp - old_stamp;
 			sec = ppc_md.get_rtc_time();
 		} while ( sec == old_sec && elapsed < 2*HZ*tb_ticks_per_jiffy);
-		if (sec==old_sec) {
+		if (sec==old_sec)
 			printk("Warning: real time clock seems stuck!\n");
-		}
-		write_lock_irqsave(&xtime_lock, flags);
 		xtime.tv_sec = sec;
-		last_jiffy_stamp(0) = tb_last_stamp = stamp;
 		xtime.tv_nsec = 0;
 		/* No update now, we just read the time from the RTC ! */
 		last_rtc_update = xtime.tv_sec;
-		write_unlock_irqrestore(&xtime_lock, flags);
 	}
+	last_jiffy_stamp(0) = tb_last_stamp = stamp;
 
 	/* Not exact, but the timer interrupt takes care of this */
 	set_dec(tb_ticks_per_jiffy);
diff -Nru a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
--- a/arch/ppc/kernel/traps.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/kernel/traps.c	Wed Jan  8 20:04:43 2003
@@ -29,6 +29,7 @@
 #include <linux/interrupt.h>
 #include <linux/config.h>
 #include <linux/init.h>
+#include <linux/module.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -115,7 +116,7 @@
 MachineCheckException(struct pt_regs *regs)
 {
 #ifdef CONFIG_ALL_PPC
-	unsigned long fixup;
+	const struct exception_table_entry *entry;
 #endif /* CONFIG_ALL_PPC */
 	unsigned long msr = regs->msr;
 
@@ -148,7 +149,7 @@
 	 *  -- paulus.
 	 */
 	if (((msr & 0xffff0000) == 0 || (msr & (0x80000 | 0x40000)))
-	    && (fixup = search_exception_table(regs->nip)) != 0) {
+	    && (entry = search_exception_tables(regs->nip)) != NULL) {
 		/*
 		 * Check that it's a sync instruction, or somewhere
 		 * in the twi; isync; nop sequence that inb/inw/inl uses.
diff -Nru a/arch/ppc/mm/4xx_mmu.c b/arch/ppc/mm/4xx_mmu.c
--- a/arch/ppc/mm/4xx_mmu.c	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/mm/4xx_mmu.c	Wed Jan  8 20:04:32 2003
@@ -50,6 +50,7 @@
 #include <asm/bootx.h>
 #include <asm/machdep.h>
 #include <asm/setup.h>
+#include "mmu_decl.h"
 
 /*
  * MMU_init_hw does the chip-specific initialization of the MMU hardware.
@@ -87,4 +88,50 @@
 
         mtspr(SPRN_DCCR, 0xF0000000);	/* 512 MB of data space at 0x0. */
         mtspr(SPRN_ICCR, 0xF0000000);	/* 512 MB of instr. space at 0x0. */
+}
+
+#define LARGE_PAGE_SIZE_16M	(1<<24)
+#define LARGE_PAGE_SIZE_4M	(1<<22)
+
+unsigned long __init mmu_mapin_ram(void)
+{
+	unsigned long v, s;
+	phys_addr_t p;
+
+	v = KERNELBASE;
+	p = PPC_MEMSTART;
+	s = 0;
+
+	while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) {
+		pmd_t *pmdp;
+		unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
+
+		spin_lock(&init_mm.page_table_lock);
+		pmdp = pmd_offset(pgd_offset_k(v), v);
+		pmd_val(*pmdp++) = val;
+		pmd_val(*pmdp++) = val;
+		pmd_val(*pmdp++) = val;
+		pmd_val(*pmdp++) = val;
+		spin_unlock(&init_mm.page_table_lock);
+
+		v += LARGE_PAGE_SIZE_16M;
+		p += LARGE_PAGE_SIZE_16M;
+		s += LARGE_PAGE_SIZE_16M;
+	}
+	
+	while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) {
+		pmd_t *pmdp;
+		unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
+
+		spin_lock(&init_mm.page_table_lock);
+		pmdp = pmd_offset(pgd_offset_k(v), v);
+		pmd_val(*pmdp) = val;
+		spin_unlock(&init_mm.page_table_lock);
+
+		v += LARGE_PAGE_SIZE_4M;
+		p += LARGE_PAGE_SIZE_4M;
+		s += LARGE_PAGE_SIZE_4M;
+	}
+
+	return s;
 }
diff -Nru a/arch/ppc/mm/Makefile b/arch/ppc/mm/Makefile
--- a/arch/ppc/mm/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/mm/Makefile	Wed Jan  8 20:04:45 2003
@@ -10,6 +10,5 @@
 					mmu_context.o pgtable.o
 
 obj-$(CONFIG_PPC_STD_MMU)	+= hashtable.o ppc_mmu.o tlb.o
-obj-$(CONFIG_PPC_ISERIES)	+= iSeries_hashtable.o iSeries_mmu.o tlb.o
 obj-$(CONFIG_40x)		+= 4xx_mmu.o
 obj-$(CONFIG_NOT_COHERENT_CACHE)	+= cachemap.o
diff -Nru a/arch/ppc/mm/extable.c b/arch/ppc/mm/extable.c
--- a/arch/ppc/mm/extable.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/mm/extable.c	Wed Jan  8 20:04:45 2003
@@ -6,6 +6,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/init.h>
 #include <asm/uaccess.h>
 
 extern struct exception_table_entry __start___ex_table[];
@@ -40,16 +41,17 @@
 	}
 }
 
-void
+void __init
 sort_exception_table(void)
 {
 	sort_ex_table(__start___ex_table, __stop___ex_table);
 }
 
-static inline unsigned long
-search_one_table(const struct exception_table_entry *first,
-		 const struct exception_table_entry *last,
-		 unsigned long value)
+/* Simple binary search */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value)
 {
         while (first <= last) {
 		const struct exception_table_entry *mid;
@@ -58,41 +60,11 @@
 		mid = (last - first) / 2 + first;
 		diff = mid->insn - value;
                 if (diff == 0)
-                        return mid->fixup;
+                        return mid;
                 else if (diff < 0)
                         first = mid+1;
                 else
                         last = mid-1;
         }
-        return 0;
-}
-
-unsigned long
-search_exception_table(unsigned long addr)
-{
-	unsigned long ret = 0;
-
-#ifndef CONFIG_MODULES
-	/* There is only the kernel to search.  */
-	ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
-#else
-	unsigned long flags;
-	struct list_head *i;
-
-	/* The kernel is the last "module" -- no need to treat it special. */
-	spin_lock_irqsave(&modlist_lock, flags);
-	list_for_each(i, &extables) {
-		struct exception_table *ex
-			= list_entry(i, struct exception_table, list);
-		if (ex->num_entries == 0)
-			continue;
-		ret = search_one_table(ex->entry,
-				       ex->entry + ex->num_entries - 1, addr);
-		if (ret)
-			break;
-	}
-	spin_unlock_irqrestore(&modlist_lock, flags);
-#endif
-
-	return ret;
+	return NULL;
 }
diff -Nru a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
--- a/arch/ppc/mm/fault.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/mm/fault.c	Wed Jan  8 20:04:43 2003
@@ -27,6 +27,7 @@
 #include <linux/mm.h>
 #include <linux/interrupt.h>
 #include <linux/highmem.h>
+#include <linux/module.h>
 
 #include <asm/page.h>
 #include <asm/pgtable.h>
@@ -263,12 +264,11 @@
 bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
 {
 	extern void die(const char *,struct pt_regs *,long);
-
-	unsigned long fixup;
+	const struct exception_table_entry *entry;
 
 	/* Are we prepared to handle this fault?  */
-	if ((fixup = search_exception_table(regs->nip)) != 0) {
-		regs->nip = fixup;
+	if ((entry = search_exception_tables(regs->nip)) != NULL) {
+		regs->nip = entry->fixup;
 		return;
 	}
 
diff -Nru a/arch/ppc/mm/iSeries_hashtable.c b/arch/ppc/mm/iSeries_hashtable.c
--- a/arch/ppc/mm/iSeries_hashtable.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,223 +0,0 @@
-/*
- * 
- *
- *    Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>  IBM Corporation
- *    updated by Dave Boutcher (boutcher@us.ibm.com)
- *
- *    Module name: iSeries_hashtable.c
- *
- *    Description:
- *      Handles Hash Table faults for iSeries LPAR.
- *
- * 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.
- * 
- * 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 <asm/processor.h>
-#include <asm/pgtable.h>
-#include <linux/mm.h>
-#include <asm/mmu_context.h>
-#include <asm/page.h>
-#include <asm/types.h>
-#include <linux/spinlock.h>
-#include <asm/iSeries/HvCallHpt.h>
-#include <asm/iSeries/LparData.h>
-
-#include <asm/mmu_context.h>
-
-int iSeries_hpt_loaded;
-
-static spinlock_t mmu_hash_lock = SPIN_LOCK_UNLOCKED;
-
-extern unsigned long htab_reloads;	// Defined in ppc/kernel/ppc_htab.c
-extern unsigned long htab_evicts;
-unsigned long htab_pp_update = 0;
-
-unsigned long flush_hash_page_count  = 0;
-unsigned long Hash_mask;		
-
-unsigned long flush_hash_range_count  = 0;
-unsigned long flush_hash_range_hv_finds  = 0;
-unsigned long flush_hash_range_hv_evicts  = 0;
-extern int iSeries_max_kernel_hpt_slot;
-static unsigned next_slot  = 4;		// good enough starting value
-
-extern void flush_hash_range( u64, u64, unsigned );
-
-static inline u32  computeHptePP( unsigned long pte )
-{
-	return ( ( pte & _PAGE_USER )      >>  1 )  |
-		( ( ( pte & _PAGE_USER )    >>  2 )  &
-		  ( (~pte & _PAGE_RW   )    >> 10 )  );
-}
-
-static inline u32  computeHpteHash( unsigned long vsid,
-				    unsigned long pid )
-{
-	return ( vsid ^ pid ) & Hash_mask;
-}
-
-/*
- * Should be called with hash page lock
- */
-static void __create_hpte(unsigned long vsid, unsigned long va, unsigned long newpte)
-{
-	PTE hpte;
-	u64 vpn;
-	u64 rtnIndex;
-	u64 *hpte0Ptr, *hpte1Ptr;
-	u32 newpp, gIndex;
- 	vsid = vsid & 0x7ffffff;
-	vpn = ((u64)vsid << 16) | ((va >> 12) & 0xffff);
-
-	hpte0Ptr = (u64 *)&hpte;
-	hpte1Ptr = hpte0Ptr + 1;
-	*hpte0Ptr = *hpte1Ptr = 0;
-
-	rtnIndex = HvCallHpt_findValid( &hpte, vpn );
-	
-	newpp = computeHptePP( newpte );
-
-	if ( hpte.v ) {
-		/* A matching valid entry was found
-		 * Just update the pp bits
-		 */
-		++htab_pp_update;
-		HvCallHpt_setPp( rtnIndex, newpp );
-	} else { /* No matching entry was found  Build new hpte */
-		hpte.vsid = vsid;
-		hpte.api = (va >> 23) & 0x1f;
-		hpte.v = 1;
-		hpte.rpn = physRpn_to_absRpn(newpte>>12);
-		hpte.r = 1;
-		hpte.c = 1;
-		hpte.m = 1;
-		hpte.pp = newpp;
-		
-		if ( ( rtnIndex != ~0 ) && 
-		     ( rtnIndex != 0x00000000ffffffff ) ) {
-				/* Free entry was found */
-		  if ( ( rtnIndex >> 63 ) ||
-		       ( rtnIndex & 0x80000000 ) )
-		    hpte.h = 1;
-		  HvCallHpt_addValidate(
-					rtnIndex,
-					hpte.h,
-					&hpte );
-		} else {
-			/* No free entry was found */
-			gIndex = computeHpteHash( vsid, vpn & 0xffff );
-			rtnIndex = gIndex*8 + next_slot;
-			if ( ++next_slot > 7 )
-				next_slot = iSeries_max_kernel_hpt_slot+1;
-			HvCallHpt_invalidateSetSwBitsGet(
-				rtnIndex, 0, 1 );
-			HvCallHpt_addValidate(
-				rtnIndex, 0, &hpte );
-			++htab_evicts;
-		}
-	}
-}		
-
-int iSeries_create_hpte( unsigned long access, unsigned long va )
-{
-	struct thread_struct *ts;
-	pgd_t * pg;
-	pmd_t * pm;
-	pte_t * pt;
-	u32 vsid;
-	unsigned flags;
-
-	vsid = mfsrin( va ) & 0x07ffffff;
-
-	if ( va >= KERNELBASE )
-		pg = swapper_pg_dir;
-	else {
-		// Get the thread structure
-		ts = (struct thread_struct *)mfspr(SPRG3);
-		// Get the page directory
-		pg = ts->pgdir;
-	}
-	
-	pg = pg + pgd_index( va );	// offset into first level
-	pm = pmd_offset( pg, va );	// offset into second level
-	if ( pmd_none( *pm ) ) 		// if no third level
-		return 1;		// indicate failure		
-	pt = pte_offset( pm, va );	// offset into third level
-	
-	access |= _PAGE_PRESENT;		// _PAGE_PRESENT also needed
-
-	spin_lock( &mmu_hash_lock );
-	// check if pte is in the required state
-	if ( ( access & ~(pte_val(*pt)) ) ) {
-		spin_unlock( &mmu_hash_lock );
-		return 1;
-	}
-
-	/* pte allows the access we are making */
-	flags = _PAGE_ACCESSED | _PAGE_HASHPTE | _PAGE_COHERENT;
-	if ( access & _PAGE_RW )	/* If write access */
-		flags |= _PAGE_RW;
-
-	/* atomically update pte */
-	pte_update( pt, 0, flags );
-	__create_hpte(vsid,
-		      va, 
-		      pte_val(*pt));
-
-	spin_unlock( &mmu_hash_lock );
-	return 0;
-}
-
-void add_hash_page(unsigned context, unsigned long va, pte_t *ptep)
-{
-	spin_lock( &mmu_hash_lock );
-	pte_update(ptep,0,_PAGE_HASHPTE);
-	__create_hpte(CTX_TO_VSID(context, va), 
-		      va, 
-		      pte_val(*ptep));
-	spin_unlock( &mmu_hash_lock );
-}
-
-int flush_hash_page(unsigned context, unsigned long va, pte_t *ptep)
-{
-	int rc;
-	PTE hpte;
-	u64 vpn;
-	unsigned long vsid;
-	u64 rtnIndex;
-	u64 *hpte0Ptr, *hpte1Ptr;
-
-	vsid = CTX_TO_VSID(context, va);
-
-	vpn = ((u64)vsid << 16) | ((va >> 12) & 0xffff);
-
-	hpte0Ptr = (u64 *)&hpte;
-	hpte1Ptr = hpte0Ptr + 1;
-	*hpte0Ptr = *hpte1Ptr = 0;
-  
-	spin_lock( &mmu_hash_lock );
-	rtnIndex = HvCallHpt_findValid( &hpte, vpn );
-  
-	if ( hpte.v ) {
-		pte_update(ptep, _PAGE_HASHPTE, 0);
-		HvCallHpt_invalidateSetSwBitsGet(rtnIndex, 0, 1 );
-		rc = 0;
-	} else
-		rc = 1;
-	spin_unlock( &mmu_hash_lock );
-	return rc;
-}
-
diff -Nru a/arch/ppc/mm/iSeries_mmu.c b/arch/ppc/mm/iSeries_mmu.c
--- a/arch/ppc/mm/iSeries_mmu.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,184 +0,0 @@
-/*
- * Procedures for MMU handling on iSeries systems, where we
- * have to call the hypervisor to change things in the hash
- * table.
- *
- * Copyright (C) 2001 IBM Corp.
- * updated by Dave Boutcher (boutcher@us.ibm.com)
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU General Public License
- *  as published by the Free Software Foundation; either version
- *  2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/types.h>
-#include <linux/ptrace.h>
-#include <linux/mman.h>
-#include <linux/mm.h>
-#include <linux/swap.h>
-#include <linux/stddef.h>
-#include <linux/vmalloc.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/bootmem.h>
-#include <linux/highmem.h>
-
-#include <asm/pgalloc.h>
-#include <asm/prom.h>
-#include <asm/io.h>
-#include <asm/mmu_context.h>
-#include <asm/pgtable.h>
-#include <asm/mmu.h>
-#include <asm/bootx.h>
-#include <asm/machdep.h>
-#include <asm/setup.h>
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/HvCallHpt.h>
-#include <linux/pci.h>
-#include <asm/iSeries/iSeries_dma.h>
-#include "mmu_decl.h"
-
-int iSeries_max_kernel_hpt_slot = 0;
-extern unsigned maxPacas;
-extern int iSeries_hpt_loaded;
-PTE *Hash = 0;
-
-#ifdef CONFIG_PCI
-extern  int  iSeries_Is_IoMmAddress(unsigned long address);
-
-/*********************************************************************/
-/* iSeries maps I/O space to device, just leave the address where is.*/
-/*********************************************************************/
-void* ioremap(unsigned long addr, unsigned long size)
-{
-	return (void*)addr;
-}
-
-void* __ioremap(unsigned long addr, unsigned long size, unsigned long flags)
-{
-	return (void*)addr;
-}
-
-/********************************************************************/
-/* iSeries did not remapped the space.                              */
-/********************************************************************/
-void iounmap(void *addr)
-{
-	return;
-}
-#endif /* CONFIG_PCI */
-
-/* 
- * Map as much of memory as will fit into the first entry of each
- * PPC HPTE Group.  (These are the "bolted" entries which will
- * never be cast out).  The iSeries Hypervisor has already mapped
- * the first 32 MB (specified in LparMap.h).  Here we map as
- * much more as we can.
- */
-
-void __init MMU_init_hw(void)
-{
-	PTE hpte;
-	u64 *hpte0Ptr, *hpte1Ptr;
-	u32 HptSizeGroups, msPages, rpn, vsid, ea;
-	u64 rtnIndex;
-	u32 hpteIndex;
-	u32 group;
-	unsigned long numAdded;
-	
-	if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105);
-
-	hpte0Ptr = (u64 *)&hpte;
-	hpte1Ptr = hpte0Ptr + 1;
-	
-	/* Get the number of Hpt groups */
-	HptSizeGroups = (u32)HvCallHpt_getHptPages() * 32;
-	Hash_mask = HptSizeGroups - 1;
-	
-	/* Number of pages in memory */
-	msPages = totalLpChunks << 6;
-
-	/* For each virtual page in kernel space, add a hpte if there
-	   isn't one already in slot 0 of the primary pteg.  */
-
-	numAdded = 0;
-	
-	for ( ea = (u32)KERNELBASE; ea < (u32)high_memory; ea+= PAGE_SIZE) {
-  	        rpn = ea >> 12;
-
-		vsid = ((ea >> 28) * 0x111);
-		
-		rtnIndex = HvCallHpt_findValid( &hpte, 
-						(rpn & 0xffff) | (vsid << 16));
-		hpteIndex = (u32)rtnIndex;
-		if ( hpte.v ) 		/* If valid entry found */
-		        continue;	/* Already mapped, nothing to do */
-		if ( rtnIndex == ~0 )	/* If no free entry found */
-			BUG();	        /* Can't map this page bolted */
-		if ( rtnIndex >> 63 )	/* If first free slot is secondary */
-			BUG();   	/* Can't map this page bolted */
-		if ( (hpteIndex & 7) > 2) /* Not in first 3 slots  */
-			BUG();   	
-		/*
-		 * If returned index is the first in the primary group
-		 * then build an hpt entry for this page.  
-		 */
-		*hpte0Ptr = *hpte1Ptr = 0;
-		hpte.vsid = vsid;
-		hpte.api  = (rpn >> 11) & 0x1f;
-		hpte.h    = 0;
-		hpte.v    = 1;
-		hpte.rpn  = physRpn_to_absRpn( rpn ); 
-		hpte.r    = 1;
-		hpte.c    = 1;
-		hpte.m    = 1;
-		hpte.w    = 0;
-		hpte.i    = 0;
-		hpte.g    = 0;
-		hpte.pp   = 0;
-		HvCallHpt_addValidate( hpteIndex, 0, &hpte );
-		++numAdded;
-		group = rtnIndex & 0x07;
-		if (group > iSeries_max_kernel_hpt_slot)
-			iSeries_max_kernel_hpt_slot = group;
-	}
-
-	printk( "iSeries_hashinit: added %ld hptes to existing mapping. Max group %x\n",
-			numAdded, iSeries_max_kernel_hpt_slot );
-	
-	if ( ppc_md.progress ) ppc_md.progress("hash:done", 0x205);
-
-	iSeries_hpt_loaded = 1;
-	Hash = (void *)0xFFFFFFFF;
-}
-
-/*
- * This is called at the end of handling a user page fault, when the
- * fault has been handled by updating a PTE in the linux page tables.
- * We use it to preload an HPTE into the hash table corresponding to
- * the updated linux PTE.
- */
-void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
-		      pte_t pte)
-{
-	struct mm_struct *mm;
-	pmd_t *pmd;
-	pte_t *ptep;
-	static int nopreload;
-
-	if (nopreload || address >= TASK_SIZE)
-		return;
-	mm = vma->vm_mm;
-	pmd = pmd_offset(pgd_offset(mm, address), address);
-	if (!pmd_none(*pmd)) {
-		ptep = pte_offset_map(pmd, address);
-		add_hash_page(mm->context, address, ptep);
-		pte_unmap(ptep);
-	}
-}
diff -Nru a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
--- a/arch/ppc/mm/init.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/mm/init.c	Wed Jan  8 20:04:43 2003
@@ -55,10 +55,6 @@
 #endif
 #define MAX_LOW_MEM	CONFIG_LOWMEM_SIZE
 
-#ifdef CONFIG_PPC_ISERIES
-extern void create_virtual_bus_tce_table(void);
-#endif
-
 mmu_gather_t mmu_gathers[NR_CPUS];
 
 unsigned long total_memory;
@@ -475,10 +471,6 @@
 		printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page);
 #endif /* defined(CONFIG_ALL_PPC) */
 
-#ifdef CONFIG_PPC_ISERIES
-	create_virtual_bus_tce_table();
-#endif /* CONFIG_PPC_ISERIES */
-
 	/* Make sure all our pagetable pages have page->mapping
 	   and page->index set correctly. */
 	for (addr = KERNELBASE; addr != 0; addr += PGDIR_SIZE) {
@@ -609,7 +601,10 @@
 		struct page *page = pfn_to_page(pfn);
 		if (!PageReserved(page)
 		    && !test_bit(PG_arch_1, &page->flags)) {
-			__flush_dcache_icache((void *) address);
+			if (vma->vm_mm == current->active_mm)
+				__flush_dcache_icache((void *) address);
+			else
+				__flush_dcache_icache_phys(pfn << PAGE_SHIFT);
 			set_bit(PG_arch_1, &page->flags);
 		}
 	}
diff -Nru a/arch/ppc/mm/mmu_context.c b/arch/ppc/mm/mmu_context.c
--- a/arch/ppc/mm/mmu_context.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/mm/mmu_context.c	Wed Jan  8 20:04:44 2003
@@ -3,9 +3,6 @@
  * PowerPC implementations where the MMU substantially follows the
  * architecture specification.  This includes the 6xx, 7xx, 7xxx,
  * 8260, and POWER3 implementations but excludes the 8xx and 4xx.
- * Although the iSeries hardware does comply with the architecture
- * specification, the need to work through the hypervisor makes
- * things sufficiently different that it is handled elsewhere.
  *  -- paulus
  * 
  *  Derived from arch/ppc/mm/init.c:
diff -Nru a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h
--- a/arch/ppc/mm/mmu_decl.h	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/mm/mmu_decl.h	Wed Jan  8 20:04:44 2003
@@ -50,7 +50,7 @@
 #elif defined(CONFIG_4xx)
 #define flush_HPTE(X, va, pg)	_tlbie(va)
 extern void MMU_init_hw(void);
-#define mmu_mapin_ram()		(0UL)
+extern unsigned long mmu_mapin_ram(void);
 
 #else
 /* anything except 4xx or 8xx */
diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
--- a/arch/ppc/mm/pgtable.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/mm/pgtable.c	Wed Jan  8 20:04:43 2003
@@ -119,7 +119,6 @@
 	__free_page(pte);
 }
 
-#ifndef CONFIG_PPC_ISERIES
 void *
 ioremap(unsigned long addr, unsigned long size)
 {
@@ -219,7 +218,6 @@
 	if (addr > high_memory && (unsigned long) addr < ioremap_bot)
 		vunmap((void *) (PAGE_MASK & (unsigned long)addr));
 }
-#endif /* CONFIG_PPC_ISERIES */
 
 int
 map_page(unsigned long va, unsigned long pa, int flags)
diff -Nru a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c
--- a/arch/ppc/mm/ppc_mmu.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/mm/ppc_mmu.c	Wed Jan  8 20:04:43 2003
@@ -3,9 +3,6 @@
  * PowerPC implementations where the MMU substantially follows the
  * architecture specification.  This includes the 6xx, 7xx, 7xxx,
  * 8260, and POWER3 implementations but excludes the 8xx and 4xx.
- * Although the iSeries hardware does comply with the architecture
- * specification, the need to work through the hypervisor makes
- * things sufficiently different that it is handled elsewhere.
  *  -- paulus
  * 
  *  Derived from arch/ppc/mm/init.c:
diff -Nru a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/Kconfig	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,156 @@
+config 4xx
+	bool
+	depends on 40x
+	default y
+
+menu "IBM 4xx options"
+
+choice
+	prompt "Machine Type"
+	depends on 40x
+	default WALNUT
+
+config ASH
+	bool "Ash"
+
+config BEECH
+	bool "Beech"
+
+config CEDAR
+	bool "Cedar"
+
+config CPCI405
+	bool "CPCI405"
+
+config EP405
+	bool "EP405/EP405PC"
+
+config OAK
+	bool "Oak"
+	help
+	  Select Oak if you have an IBM 403GCX "Oak" Evaluation Board.
+
+	  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
+
+	  More information on these boards is available at:
+	  <http://www.chips.ibm.com/products/powerpc/tools/evk_pn.html#GCX>.
+
+config REDWOOD_4
+	bool "Redwood-4"
+
+config REDWOOD_5
+	bool "Redwood-5"
+
+config REDWOOD_6
+	bool "Redwood-6"
+
+config TIVO
+	bool "Tivo"
+
+config WALNUT
+	bool "Walnut"
+	help
+	  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
+
+endchoice
+
+config EP405PC
+	bool "EP405PC Support"
+	depends on EP405
+
+
+# It's often necessary to know the specific 4xx processor type.
+# Fortunately, it is impled (so far) from the board type, so we
+# don't need to ask more redundant questions.
+config NP405H
+	bool
+	depends on ASH
+	default y
+
+# All 405-based cores have this errata.  This leaves out the 403GCX
+config IBM405_ERR77
+	bool
+	depends on 40x && !403GCX
+	default y
+
+# All 40x-based cores have this errata.
+config IBM405_ERR51
+	bool
+	depends on 40x
+	default y
+
+config IBM_OCP
+	bool
+	depends on ASH || BEECH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
+	default y
+
+config NP405L
+	bool
+	depends on CEDAR
+	default y
+
+config BIOS_FIXUP
+	bool
+	depends on CEDAR || EP405 || WALNUT
+	default y
+
+config 403GCX
+	bool
+	depends OAK || TIVO
+	default y
+
+config 405GP
+	bool
+	depends on CPCI405 || EP405 || WALNUT
+	default y
+
+config STB03xxx
+	bool
+	depends on REDWOOD_5 || REDWOOD_4 || REDWOOD_6
+	default y
+
+config EMBEDDEDBOOT
+	bool
+	depends on EP405
+	default y
+
+config IBM_OPENBIOS
+	bool
+	depends on ASH || BEECH || CEDAR || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
+	default y
+
+config 405_DMA
+	bool "Blue Logic DMA"
+	depends on 40x
+
+config PM
+	bool "Power Management support (EXPERIMENTAL)"
+	depends on 4xx && EXPERIMENTAL
+
+choice
+	prompt "TTYS0 device and default console"
+	depends on 40x
+	default UART0_TTYS0
+
+config UART0_TTYS0
+	bool "UART0"
+
+config UART0_TTYS1
+	bool "UART1"
+
+endchoice
+
+config SERIAL_SICC
+	bool "SICC Serial port support"
+	depends on STB03xxx
+
+config UART1_DFLT_CONSOLE
+	bool
+	depends on SERIAL_SICC && UART0_TTYS1
+	default y
+
+config SERIAL_SICC_CONSOLE
+	bool
+	depends on SERIAL_SICC && UART0_TTYS1
+	default y
+endmenu
diff -Nru a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile
--- a/arch/ppc/platforms/4xx/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/4xx/Makefile	Wed Jan  8 20:04:45 2003
@@ -1,13 +1,17 @@
 #
 # Makefile for the PowerPC 4xx linux kernel.
 
+export-objs			:= ibm405lp.o
+
 obj-$(CONFIG_ASH)		+= ash.o
+obj-$(CONFIG_BEECH)		+= beech.o 
 obj-$(CONFIG_CEDAR)		+= cedar.o
 obj-$(CONFIG_CPCI405)		+= cpci405.o
 obj-$(CONFIG_EP405)		+= ep405.o
 obj-$(CONFIG_OAK)		+= oak.o
 obj-$(CONFIG_REDWOOD_4)		+= redwood.o
 obj-$(CONFIG_REDWOOD_5)		+= redwood5.o
+obj-$(CONFIG_REDWOOD_6)		+= redwood6.o 
 obj-$(CONFIG_WALNUT)		+= walnut.o
 
 obj-$(CONFIG_NP405L)		+= ibmnp405l.o
@@ -15,3 +19,7 @@
 obj-$(CONFIG_REDWOOD_4)		+= ibmstb3.o
 obj-$(CONFIG_REDWOOD_5)		+= ibmstb4.o
 obj-$(CONFIG_NP405H)		+= ibmnp405h.o
+obj-$(CONFIG_REDWOOD_6)		+= ibmstbx25.o
+obj-$(CONFIG_NP4GS3)		+= ibmnp4gs.o
+obj-$(CONFIG_405LP)		+= ibm405lp.o
+obj-$(CONFIG_405GPR)		+= ibm405gpr.o
diff -Nru a/arch/ppc/platforms/4xx/ash.c b/arch/ppc/platforms/4xx/ash.c
--- a/arch/ppc/platforms/4xx/ash.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/4xx/ash.c	Wed Jan  8 20:04:43 2003
@@ -1,9 +1,8 @@
 /*
  *
- *    Copyright 2001 MontaVista Software Inc.
+ *    Copyright 2001-2002 MontaVista Software Inc.
  *        <akuster@mvista.com>
  *	IBM NP405H ash eval board
- *
  */
 #include <linux/config.h>
 #include <linux/init.h>
@@ -13,9 +12,12 @@
 #include <asm/machdep.h>
 #include <asm/pci-bridge.h>
 #include <asm/io.h>
-
-#ifdef CONFIG_PPC_RTC
 #include <asm/todc.h>
+
+#ifdef DEBUG
+#define DBG(x...) printk(x)
+#else
+#define DBG(x...)
 #endif
 
 void *ash_rtc_base;
@@ -27,77 +29,211 @@
 ppc405_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
-	 */
+	    /*
+	     *      PCI IDSEL/INTPIN->INTLINE
+	     *      A       B       C       D
+	     */
 	{
-		{28, 28, 28, 28},	/* IDSEL 1 - PCI slot 1 */
-		{29, 29, 29, 29},	/* IDSEL 2 - PCI slot 2 */
-		{30, 30, 30, 30},	/* IDSEL 3 - PCI slot 3 */
-		{31, 31, 31, 31},	/* IDSEL 4 - PCI slot 4 */
+		{24, 24, 24, 24},	/* IDSEL 1 - PCI slot 1 */
+		{25, 25, 25, 25},	/* IDSEL 2 - PCI slot 2 */
+		{26, 26, 26, 26},	/* IDSEL 3 - PCI slot 3 */
+		{27, 27, 27, 27},	/* IDSEL 4 - PCI slot 4 */
 	};
 
 	const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4;
 	return PCI_IRQ_TABLE_LOOKUP;
-};
+}
 
 void __init
-board_setup_arch(void)
+ash_setup_arch(void)
 {
+	bd_t *bip = &__res;
 
-	bd_t *bip = (bd_t *)__res;
+	ppc4xx_setup_arch();
 
-#ifdef CONFIG_PPC_RTC
-        /* RTC step for the walnut */
-        ash_rtc_base = (void *) ASH_RTC_VADDR;
-	TODC_INIT(TODC_TYPE_DS1743, ash_rtc_base, ash_rtc_base,ash_rtc_base, 8);
-#endif /* CONFIG_PPC_RTC */
-#define CONFIG_DEBUG_BRINGUP
 #ifdef CONFIG_DEBUG_BRINGUP
+	int i;
 	printk("\n");
 	printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
 	printk("\n");
-	printk("bi_s_version\t %s\n",      bip->bi_s_version);
-	printk("bi_r_version\t %s\n",      bip->bi_r_version);
-	printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,bip->bi_memsize/(1024*1000));
-	printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0,
-	bip->bi_enetaddr[0][0], bip->bi_enetaddr[0][1],
-	bip->bi_enetaddr[0][2], bip->bi_enetaddr[0][3],
-	bip->bi_enetaddr[0][4], bip->bi_enetaddr[0][5]);
-
-	printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 1,
-	bip->bi_enetaddr[1][0], bip->bi_enetaddr[1][1],
-	bip->bi_enetaddr[1][2], bip->bi_enetaddr[1][3],
-	bip->bi_enetaddr[1][4], bip->bi_enetaddr[1][5]);
+	printk("bi_s_version\t %s\n", bip->bi_s_version);
+	printk("bi_r_version\t %s\n", bip->bi_r_version);
+	printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,
+	       bip->bi_memsize / (1024 * 1000));
+	for (i = 0; i < EMAC_NUMS; i++) {
+		printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", i,
+		       bip->bi_enetaddr[i][0], bip->bi_enetaddr[i][1],
+		       bip->bi_enetaddr[i][2], bip->bi_enetaddr[i][3],
+		       bip->bi_enetaddr[i][4], bip->bi_enetaddr[i][5]);
+	}
+	printk("bi_pci_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0,
+	       bip->bi_pci_enetaddr[0], bip->bi_pci_enetaddr[1],
+	       bip->bi_pci_enetaddr[2], bip->bi_pci_enetaddr[3],
+	       bip->bi_pci_enetaddr[4], bip->bi_pci_enetaddr[5]);
 
 	printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n",
-	       bip->bi_intfreq, bip->bi_intfreq/ 1000000);
+	       bip->bi_intfreq, bip->bi_intfreq / 1000000);
 
 	printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n",
-		bip->bi_busfreq, bip->bi_busfreq / 1000000 );
+	       bip->bi_busfreq, bip->bi_busfreq / 1000000);
 	printk("bi_pci_busfreq\t 0x%8.8x\t pci bus clock:\t %dMHz\n",
-	       bip->bi_pci_busfreq, bip->bi_pci_busfreq/1000000);
+	       bip->bi_pci_busfreq, bip->bi_pci_busfreq / 1000000);
 
 	printk("\n");
 #endif
+	/* RTC step for ash */
+	ash_rtc_base = (void *) ASH_RTC_VADDR;
+	TODC_INIT(TODC_TYPE_DS1743, ash_rtc_base, ash_rtc_base, ash_rtc_base,
+		  8);
 }
 
 void __init
-board_io_mapping(void)
+bios_fixup(struct pci_controller *hose, struct pcil0_regs *pcip)
 {
-	io_block_mapping(ASH_RTC_VADDR,
-		ASH_RTC_PADDR, ASH_RTC_SIZE, _PAGE_IO);
+
+	unsigned int bar_response, bar;
+	/*
+	 * Expected PCI mapping:
+	 *
+	 *  PLB addr             PCI memory addr
+	 *  ---------------------       ---------------------
+	 *  0000'0000 - 7fff'ffff <---  0000'0000 - 7fff'ffff
+	 *  8000'0000 - Bfff'ffff --->  8000'0000 - Bfff'ffff
+	 *
+	 *  PLB addr             PCI io addr
+	 *  ---------------------       ---------------------
+	 *  e800'0000 - e800'ffff --->  0000'0000 - 0001'0000
+	 *
+	 * The following code is simplified by assuming that the bootrom
+	 * has been well behaved in following this mapping.
+	 */
+
+#ifdef DEBUG
+	int i;
+
+	printk("ioremap PCLIO_BASE = 0x%x\n", pcip);
+	printk("PCI bridge regs before fixup \n");
+	for (i = 0; i <= 2; i++) {
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma)));
+		printk(" pmm%dla\t0x%x\n", i, in_le32(&(pcip->pmm[i].la)));
+		printk(" pmm%dpcila\t0x%x\n", i,
+		       in_le32(&(pcip->pmm[i].pcila)));
+		printk(" pmm%dpciha\t0x%x\n", i,
+		       in_le32(&(pcip->pmm[i].pciha)));
+	}
+	printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms)));
+	printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la)));
+	printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms)));
+	printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
+	for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) {
+		early_read_config_dword(hose, hose->first_busno,
+					PCI_FUNC(hose->first_busno), bar,
+					&bar_response);
+		DBG("BUS %d, device %d, Function %d bar 0x%8.8x is 0x%8.8x\n",
+		    hose->first_busno, PCI_SLOT(hose->first_busno),
+		    PCI_FUNC(hose->first_busno), bar, bar_response);
+	}
+
+#endif
+	if (ppc_md.progress)
+		ppc_md.progress("bios_fixup(): enter", 0x800);
+
+	/* added for IBM boot rom version 1.15 bios bar changes  -AK */
+
+	/* Disable region first */
+	out_le32((void *) &(pcip->pmm[0].ma), 0x00000000);
+	/* PLB starting addr, PCI: 0x80000000 */
+	out_le32((void *) &(pcip->pmm[0].la), 0x80000000);
+	/* PCI start addr, 0x80000000 */
+	out_le32((void *) &(pcip->pmm[0].pcila), PPC405_PCI_MEM_BASE);
+	/* 512MB range of PLB to PCI */
+	out_le32((void *) &(pcip->pmm[0].pciha), 0x00000000);
+	/* Enable no pre-fetch, enable region */
+	out_le32((void *) &(pcip->pmm[0].ma), ((0xffffffff -
+						(PPC405_PCI_UPPER_MEM -
+						 PPC405_PCI_MEM_BASE)) | 0x01));
+
+	/* Disable region one */
+	out_le32((void *) &(pcip->pmm[1].ma), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].la), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].pcila), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].pciha), 0x00000000);
+	out_le32((void *) &(pcip->pmm[1].ma), 0x00000000);
+
+	/* Disable region two */
+	out_le32((void *) &(pcip->pmm[2].ma), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].la), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].pcila), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].pciha), 0x00000000);
+	out_le32((void *) &(pcip->pmm[2].ma), 0x00000000);
+	
+	/* Enable PTM1 and PTM2, mapped to PLB address 0. */
+
+	out_le32((void *) &(pcip->ptm1la), 0x00000000);
+	out_le32((void *) &(pcip->ptm1ms), 0x00000001);
+	out_le32((void *) &(pcip->ptm2la), 0x00000000);
+	out_le32((void *) &(pcip->ptm2ms), 0x00000001);
+
+	/* Write zero to PTM1 BAR. */
+
+	early_write_config_dword(hose, hose->first_busno,
+				 PCI_FUNC(hose->first_busno), 
+				 PCI_BASE_ADDRESS_1,
+				 0x00000000);
+
+	/* Disable PTM2 (unused) */
+
+	out_le32((void *) &(pcip->ptm2la), 0x00000000);
+	out_le32((void *) &(pcip->ptm2ms), 0x00000000);
+
+	/* end work arround */
+	if (ppc_md.progress)
+		ppc_md.progress("bios_fixup(): done", 0x800);
+
+#ifdef DEBUG
+	printk("PCI bridge regs after fixup \n");
+	for (i = 0; i <= 2; i++) {
+		printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma)));
+		printk(" pmm%dla\t0x%x\n", i, in_le32(&(pcip->pmm[i].la)));
+		printk(" pmm%dpcila\t0x%x\n", i,
+		       in_le32(&(pcip->pmm[i].pcila)));
+		printk(" pmm%dpciha\t0x%x\n", i,
+		       in_le32(&(pcip->pmm[i].pciha)));
+	}
+	printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms)));
+	printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la)));
+	printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms)));
+	printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
+
+	for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) {
+		early_read_config_dword(hose, hose->first_busno,
+					PCI_FUNC(hose->first_busno), bar,
+					&bar_response);
+		DBG("BUS %d, device %d, Function %d bar 0x%8.8x is 0x%8.8x\n",
+		    hose->first_busno, PCI_SLOT(hose->first_busno),
+		    PCI_FUNC(hose->first_busno), bar, bar_response);
+	}
+
+
+#endif
 }
+
 void __init
-board_setup_irq(void)
+ash_map_io(void)
 {
-
+	ppc4xx_map_io();
+	io_block_mapping(ASH_RTC_VADDR, ASH_RTC_PADDR, ASH_RTC_SIZE, _PAGE_IO);
 }
 
 void __init
-board_init(void)
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
 {
+	ppc4xx_init(r3, r4, r5, r6, r7);
+
+	ppc_md.setup_arch = ash_setup_arch;
+	ppc_md.setup_io_mappings = ash_map_io;
+
 #ifdef CONFIG_PPC_RTC
 	ppc_md.time_init = todc_time_init;
 	ppc_md.set_rtc_time = todc_set_rtc_time;
diff -Nru a/arch/ppc/platforms/4xx/ash.h b/arch/ppc/platforms/4xx/ash.h
--- a/arch/ppc/platforms/4xx/ash.h	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/4xx/ash.h	Wed Jan  8 20:04:43 2003
@@ -1,7 +1,7 @@
 /*
  *
  *
- *    Copyright 2000 MontaVista Software Inc.
+ *    Copyright 2000-2002  MontaVista Software Inc.
  * 	Author: MontaVista Software, Inc.
  *         	akuster@mvista.com or source@mvista.com
  *
@@ -17,7 +17,7 @@
 #ifdef __KERNEL__
 #ifndef __ASM_ASH_H__
 #define __ASM_ASH_H__
-#include <platforms/4xx/ibm_ocp.h>
+#include <asm/ibm_ocp.h>
 #include <platforms/4xx/ibmnp405h.h>
 
 #ifndef __ASSEMBLY__
@@ -32,7 +32,7 @@
 	unsigned char	 bi_s_version[4];	/* Version of this structure */
 	unsigned char	 bi_r_version[30];	/* Version of the IBM ROM */
 	unsigned int	 bi_memsize;		/* DRAM installed, in bytes */
-	unsigned char	 bi_enetaddr[EMAC_NUMS][6];	/* Local Ethernet MAC address */
+	unsigned char	 bi_enetaddr[4][6];	/* Local Ethernet MAC address */
 	unsigned char	 bi_pci_enetaddr[6];
 	unsigned int	 bi_intfreq;		/* Processor speed, in Hz */
 	unsigned int	 bi_busfreq;		/* PLB Bus speed, in Hz */
@@ -76,7 +76,7 @@
 #define BASE_BAUD		691200
 #endif
 
-#define PPC4xx_MACHINE_NAME "IBM NP405H Ceder"
+#define PPC4xx_MACHINE_NAME "IBM NP405H Ash"
 
 extern char pci_irq_table[][4];
 
diff -Nru a/arch/ppc/platforms/4xx/beech.c b/arch/ppc/platforms/4xx/beech.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/beech.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,252 @@
+/*
+ * arch/ppc/platforms/beech.c  Platform setup for the IBM Beech board
+ *
+ * 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.
+ *
+ * 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
+ *
+ * Copyright (C) 2002, International Business Machines Corporation
+ * All Rights Reserved
+ *
+ * Bishop Brock
+ * IBM Research, Austin Center for Low-Power Computing
+ * bcbrock@us.ibm.com
+ * March, 2002
+ *
+ */
+
+#include <linux/blk.h>
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/param.h>
+#include <linux/rtc.h>
+#include <linux/string.h>
+
+#include <asm/delay.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/page.h>
+#include <asm/processor.h>
+#include <asm/system.h>
+#include <asm/time.h>
+#include <asm/todc.h>
+
+static void beech_ebc_setup(void);
+static void beech_fpga_setup(void);
+
+/* 
+   Beech board physical memory map:
+
+   Main Memory (Initialized by the BIOS)
+   =======================================================================
+
+   SDRAM (64 MB)     0x00000000 - 0x04000000
+
+   OPB Space: (Mapped virtual = physical in ppc4xx_setup.c)
+   =======================================================================
+
+   UART0               	      0xEF600300
+   UART1               	      0xEF600400
+   IIC                 	      0xEF600500
+   OPB Arbiter         	      0xEF600600
+   GPIO Controller     	      0xEF600700
+   CODEC Interface            0xEF600900
+   Touch Panel Controller     0xEF600A00
+   DES Controller             0xEF600B00
+
+   
+   EBC Space: (Mapped virtual = physical in ppc4xx_map_io(); EBC setup
+               for PCMCIA left to 4xx_pccf)
+   Space             EBC Bank    Physical Addresses  EBC Base Address
+   =========================================================================
+
+   PCMCIA (32 MB)        x       F0000000 - F1FFFFFF  F0000000 
+
+   Expansion             2       F8000000 - F8FFFFFF  F8000000
+   Linux Flash (16 MB)           F9000000 - F9FFFFFF
+
+   NVRAM (32 KB)         1       FFE00000 - FFE07FFF  FFE00000
+   
+
+   Ethernet(I/O)	 1	 FFE20300 - FFE2030F  FFE00000
+           (MEM)	 	 FFE40000 - FFE40FFF
+
+   FPGA_REG_4            1       FFE60000 - FFE60000  FFE00000
+   FPGA_REG_0            1       FFE80000 - FFE80000  FFE00000
+   FPGA_REG_1            1       FFEA0000 - FFEA0000  FFE00000
+   FPGA_REG_2            1       FFEC0000 - FFEC0000  FFE00000
+   FPGA_REG_3            1       FFEE0000 - FFEE0000  FFE00000
+
+   SRAM (512 KB)         0       FFF00000 - FFF7FFFF  FFF00000
+
+   Boot Flash  (512 KB)  0       FFF80000 - FFFFFFFF  FFF00000
+
+   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+   NB: On Beech 1, address ranges for Bank 2 were reversed
+
+*/
+
+void __init
+beech_setup_arch(void)
+{
+	ppc4xx_setup_arch();
+
+	TODC_INIT(TODC_TYPE_DCR146818, NULL, NULL, NULL, 8);
+
+	/* Set up Beech FPGA. */
+
+	beech_fpga_setup();
+}
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	ppc4xx_init(r3, r4, r5, r6, r7);
+
+	ppc_md.setup_arch = beech_setup_arch;
+
+#ifdef CONFIG_PPC_RTC
+	ppc_md.time_init = todc_time_init;
+	ppc_md.set_rtc_time = todc_set_rtc_time;
+	ppc_md.get_rtc_time = todc_get_rtc_time;
+	ppc_md.nvram_read_val = todc_dcr146818_read_val;
+	ppc_md.nvram_write_val = todc_dcr146818_write_val;
+#endif
+	/* Disable the LCD controller, which may have been left on by the
+	   BIOS.  Then do initialization of the EBC. */
+
+	mtdcri(DCRN_LCD0, DER, 0);
+	beech_ebc_setup();
+}
+
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ + Non-standard board support follows
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+
+/****************************************************************************
+ * EBC Setup
+ ****************************************************************************/
+
+/* The EBC is set up for Beech.  This may simply replicate the setup already
+   done by the IBM BIOS for Beech (possibly with some address map changes), or
+   may be the first initialization if the board is booting from another BIOS.
+   Virtually all that is required to boot Linux on Beech is that the BIOS
+   enable the memory controller, load a Linux image from flash, and run it.
+
+   For optimal dynamic frequency scaling the EBC settings will also vary as the
+   frequency varies.
+*/
+
+static void __init
+beech_ebc_setup(void)
+{
+	ebc0_bnap_t ap;
+	ebc0_bncr_t cr;
+
+	/* Set EBC bank 0 for the SRAM and boot flash.
+
+	   Access parameters assume 120ns AMD flash @ 66.66 MHz maximum bus
+	   speed = 8 cycle access with 2 turnaround cycles (30 ns).
+
+	   These parameters will work for the SRAM as well, which is a 70 ns
+	   part. 
+
+	   NB: IBM BIOS sets this bank to burst, however bursting will never
+	   happen in Linux because this region is mapped non-cacheable and
+	   guarded, so it is set non-burst here. */
+
+	cr.reg = (BEECH_BANK0_PADDR & 0xfff00000) |
+	    (mfdcri(DCRN_EBC0, BnCR(0)) & EBC0_BnCR_MASK);
+	cr.fields.bs = BEECH_BANK0_EBC_SIZE;
+	cr.fields.bu = EBC0_BnCR_BU_RW;
+	cr.fields.bw = EBC0_BnCR_BW_16;
+	mtdcri(DCRN_EBC0, BnCR(0), cr.reg);
+
+	ap.reg = mfdcri(DCRN_EBC0, BnAP(0)) & EBC0_BnAP_MASK;
+	ap.fields.twt = 8;
+	ap.fields.th = 2;
+	mtdcri(DCRN_EBC0, BnAP(0), ap.reg);
+
+	/*  EBC bank 1 is used for many purposes: NVRAM, Ethernet, and FPGA
+	   registers. This is a 1 MB, 16-bit bank. The access parameters must
+	   handle the worst case of all of the devices. 
+
+	   The Ethernet chip needs 20 ns setup of the addresses to the I/O
+	   write signal (generated from the chip select), a minimum 150 ns
+	   cycle, and 30 ns of turnaround.  These settings will work for the
+	   other devices as well.
+	 */
+
+	cr.reg = (BEECH_BANK1_PADDR & 0xfff00000) |
+	    (mfdcri(DCRN_EBC0, BnCR(1)) & EBC0_BnCR_MASK);
+	cr.fields.bs = BEECH_BANK1_EBC_SIZE;
+	cr.fields.bu = EBC0_BnCR_BU_RW;
+	cr.fields.bw = EBC0_BnCR_BW_16;
+	mtdcri(DCRN_EBC0, BnCR(1), cr.reg);
+
+	ap.reg = mfdcri(DCRN_EBC0, BnAP(1)) & EBC0_BnAP_MASK;
+	ap.fields.twt = 10;
+	ap.fields.csn = 2;
+	ap.fields.th = 2;
+	mtdcri(DCRN_EBC0, BnAP(1), ap.reg);
+
+	/* Set EBC bank 2 for the big (Linux) flash.  There is 16 MB of flash,
+	   but the CPLD decodes a 32 MB region.
+
+	   Access parameters assume 90ns AMD flash @ 66.66 MHz maximum bus
+	   speed = 6 cycle access with 2 turnaround cycles (30 ns).
+
+	   NB: IBM BIOS sets this bank to burst, however bursting will never
+	   happen in Linux because this region is mapped non-cacheable and
+	   guarded, so it is set non-burst here. */
+
+	cr.reg = (BEECH_BANK2_PADDR & 0xfff00000) |
+	    (mfdcri(DCRN_EBC0, BnCR(2)) & EBC0_BnCR_MASK);
+	cr.fields.bs = BEECH_BANK2_EBC_SIZE;
+	cr.fields.bu = EBC0_BnCR_BU_RW;
+	cr.fields.bw = EBC0_BnCR_BW_8;
+	mtdcri(DCRN_EBC0, BnCR(2), cr.reg);
+
+	ap.reg = mfdcri(DCRN_EBC0, BnAP(2)) & EBC0_BnAP_MASK;
+	ap.fields.twt = 6;
+	ap.fields.th = 2;
+	mtdcri(DCRN_EBC0, BnAP(2), ap.reg);
+}
+
+/****************************************************************************
+ * FPGA Setup
+ ****************************************************************************/
+
+/* The Beech FPGA is set up for Linux. */
+
+static void __init
+beech_fpga_setup(void)
+{
+	volatile u8 *fpga_reg_2;
+
+	fpga_reg_2 = (volatile u8 *)
+	    ioremap(BEECH_FPGA_REG_2_PADDR, BEECH_FPGA_REG_2_SIZE);
+
+	/* Set RTS/CTS mode for UART 1 */
+
+	*fpga_reg_2 |= FPGA_REG_2_DEFAULT_UART1_N;
+}
+
+/*
+ * Local variables:
+ * c-basic-offset: 8
+ * End:
+ */
diff -Nru a/arch/ppc/platforms/4xx/beech.h b/arch/ppc/platforms/4xx/beech.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/beech.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,202 @@
+/*
+ * include/asm-ppc/platforms/beech.h   Platform definitions for the IBM Beech
+ *                                     board
+ *
+ * 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.
+ *
+ * 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
+ *
+ * Copyright (C) 2002, International Business Machines Corporation
+ * All Rights Reserved.
+ *
+ * Bishop Brock
+ * IBM Research, Austin Center for Low-Power Computing
+ * bcbrock@us.ibm.com
+ * March, 2002
+ * 
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_BEECH_H__
+#define __ASM_BEECH_H__
+
+#include <platforms/4xx/ibm405lp.h>
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Data structure defining board information maintained by the standard boot
+ * ROM on the IBM Beech board. An effort has been made to
+ * keep the field names consistent with the 8xx 'bd_t' board info
+ * structures.  
+ */
+
+typedef struct board_info {
+	unsigned char bi_s_version[4];	/* Version of this structure */
+	unsigned long bi_tbfreq;	/* Frequency of SysTmrClk */
+	unsigned char bi_r_version[30];	/* Version of the IBM ROM */
+	unsigned int bi_memsize;	/* DRAM installed, in bytes */
+	unsigned long sysclock_period;	/* SysClk period in ns */
+	unsigned long sys_speed;	/* SysCLk frequency in Hz */
+	unsigned long bi_intfreq;	/* Processor speed, in Hz */
+	unsigned long vco_speed;	/* PLL VCO speed, in Hz */
+	unsigned long bi_busfreq;	/* PLB Bus speed, in Hz */
+	unsigned long opb_speed;	/* OPB Bus speed, in Hz */
+	unsigned long ebc_speed;	/* EBC Bus speed, in Hz */
+} bd_t;
+
+/* See beech.c for a concise diagram of the Beech physical memory map. */
+
+#define PPC4xx_ONB_IO_PADDR    ((uint)0xef600000)
+#define PPC4xx_ONB_IO_VADDR    PPC4xx_ONB_IO_PADDR
+#define PPC4xx_ONB_IO_SIZE     ((uint)4*1024)
+
+/* EBC Bank 0 controls the boot flash and SRAM */
+
+#define BEECH_BANK0_PADDR      ((uint)0xfff00000)
+#define BEECH_BANK0_EBC_SIZE   EBC0_BnCR_BS_1MB
+
+#define BEECH_SRAM_PADDR		BEECH_BANK0_PADDR
+#define BEECH_SRAM_SIZE			((uint)(512 * 1024))
+
+#define BEECH_BOOTFLASH_PADDR		(BEECH_BANK0_PADDR + (512 * 1024))
+#define BEECH_BOOTFLASH_SIZE		((uint)(512 * 1024))
+
+/* EBC bank 1 controls the NVRAM, Ethernet and CPLD registers. The different
+   areas are mapped in as small an area as possible to help catch any kernel
+   addressing errors.
+
+   NVRAM is improperly connected on Beech Pass 1.  Only every other location is
+   accessible.  This is a 32 KB NVRAM.
+
+   The Ethernet chip maps 13 address lines. We only map the "I/O" space used by
+   the current driver.
+
+   The FPGA "registers" are decoded on 128 KB boundarys. Each is mapped in a
+   separate page. */
+
+#define BEECH_BANK1_PADDR       ((uint)0xffe00000)
+#define BEECH_BANK1_EBC_SIZE    EBC0_BnCR_BS_1MB
+
+#define BEECH_NVRAM_PADDR		BEECH_BANK1_PADDR
+#define BEECH_NVRAM_SIZE		((uint) (32 * 1024))
+
+#define BEECH_ETHERNET_PADDR		(BEECH_BANK1_PADDR + 0x00020000)
+#define BEECH_ETHERNET_SIZE		((uint) (8 * 1024))
+
+#define BEECH_FPGA_REG_0_PADDR		(BEECH_BANK1_PADDR + 0x00080000)
+#define BEECH_FPGA_REG_0_SIZE		PAGE_SIZE
+
+#define BEECH_FPGA_REG_1_PADDR		(BEECH_BANK1_PADDR + 0x000A0000)
+#define BEECH_FPGA_REG_1_SIZE		PAGE_SIZE
+
+#define BEECH_FPGA_REG_2_PADDR		(BEECH_BANK1_PADDR + 0x000C0000)
+#define BEECH_FPGA_REG_2_SIZE		PAGE_SIZE
+
+#define BEECH_FPGA_REG_3_PADDR		(BEECH_BANK1_PADDR + 0x000E0000)
+#define BEECH_FPGA_REG_3_SIZE		PAGE_SIZE
+
+#define BEECH_FPGA_REG_4_PADDR		(BEECH_BANK1_PADDR + 0x00060000)
+#define BEECH_FPGA_REG_4_SIZE		PAGE_SIZE
+
+/* FPGA Register Bits (From IBM BIOS) [ May not be valid for Beech Pass 1 ]*/
+
+#define FPGA_REG_0_FLASH_N		0x01
+#define FPGA_REG_0_FLASH_ONBD_N		0x02
+#define FPGA_REG_0_HITA_TOSH_N		0x04	/* New in Pass 2 */
+#define FPGA_REG_0_STAT_OC		0x20
+#define FPGA_REG_0_AC_SOURCE_SEL_N	0x40
+#define FPGA_REG_0_AC_ACTIVE_N		0x80
+
+#define FPGA_REG_1_USB_ACTIVE		0x01	/* New in Pass 2 */
+#define FPGA_REG_1_CLK_VARIABLE		0x02
+#define FPGA_REG_1_CLK_TEST		0x04
+#define FPGA_REG_1_CLK_SS		0x08
+#define FPGA_REG_1_EXT_IRQ_N		0x10
+#define FPGA_REG_1_SMI_MODE_N		0x20
+#define FPGA_REG_1_BATT_LOW_N		0x40
+#define FPGA_REG_1_PCMCIA_PWR_FAULT_N	0x80
+
+#define FPGA_REG_2_DEFAULT_UART1_N	0x01
+#define FPGA_REG_2_EN_1_8V_PLL_N	0x02
+#define FPGA_REG_2_PC_BUF_EN_N		0x08
+#define FPGA_REG_2_CODEC_RESET_N	0x10	/* New in Pass 2 */
+#define FPGA_REG_2_TP_JSTICK_N		0x20	/* New in Pass 2 */
+
+#define FPGA_REG_3_GAS_GAUGE_IO		0x01
+
+#define FPGA_REG_4_SDRAM_CLK3_ENAB	0x01
+#define FPGA_REG_4_SDRAM_CLK2_ENAB	0x02
+#define FPGA_REG_4_SDRAM_CLK1_ENAB	0x04
+#define FPGA_REG_4_SDRAM_CLK0_ENAB	0x08
+#define FPGA_REG_4_PCMCIA_5V		0x10	/* New in Pass 2 */
+#define FPGA_REG_4_IRQ3			0x20	/* New in Pass 2 */
+
+/* EBC Bank 2 contains the 16 MB "Linux" flash. The FPGA decodes a 32 MB
+   bank. The lower 16 MB are available for expansion devices.  The upper 16 MB
+   are used for the "Linux" flash.
+
+   Partitioning information is for the benefit of the MTD driver.  See 
+   drivers/mtd/maps/ibm4xx.c. We currently allocate the lower 1 MB for a
+   kernel, and the other 15 MB for a filesystem.
+
+*/
+
+/* Bank 2 mappings changed between Beech Pass 1 and Pass 2 */
+
+#ifdef CONFIG_BEECH_PASS1
+#define BEECH_BIGFLASH_OFFSET 0
+#else
+#define BEECH_BIGFLASH_OFFSET (16 * 1024 * 1024)
+#endif
+
+#define BEECH_BANK2_PADDR      ((uint)0xf8000000)
+#define BEECH_BANK2_EBC_SIZE   EBC0_BnCR_BS_32MB
+
+#define BEECH_BIGFLASH_PADDR		(BEECH_BANK2_PADDR + BEECH_BIGFLASH_OFFSET)
+#define BEECH_BIGFLASH_SIZE		(16 * 1024 * 1024)
+
+#define BEECH_KERNEL_OFFSET    0
+#define BEECH_KERNEL_SIZE      (1 * 1024 * 1024)
+
+#define BEECH_FREE_AREA_OFFSET BEECH_KERNEL_SIZE
+#define BEECH_FREE_AREA_SIZE   (BEECH_BIGFLASH_SIZE - BEECH_KERNEL_SIZE)
+
+/* The PCMCIA controller driver 4xx_pccf.c is responsible for the EBC setup of
+   PCMCIA.  Externally, EBC bank selects 3..7 take on PCMCIA functions when
+   PCMCIA is enabled. */
+
+#define BEECH_PCMCIA_PADDR		((uint)0xf0000000)
+#define BEECH_PCMCIA_SIZE		((uint)(32 * 1024 * 1024))
+
+/* We do not currently support the internal clock mode for the UART.  This
+   limits the minimum OPB frequency to just over 2X the UART oscillator
+   frequency. At OPB frequencies less than this the serial port will not
+   function due to the way that SerClk is sampled. */
+
+#define PPC4xx_SERCLK_FREQ		11059200
+#define BASE_BAUD			(PPC4xx_SERCLK_FREQ / 16)
+
+#define PPC4xx_MACHINE_NAME		"IBM 405LP Beech"
+
+/****************************************************************************
+ * Non-standard board support follows
+ ****************************************************************************/
+
+extern int beech_sram_free(void *p);
+extern int ibm405lp_set_pixclk(unsigned pixclk_low, unsigned pixclk_high);
+extern void *beech_sram_alloc(size_t size);
+
+#endif				/* !__ASSEMBLY__ */
+#endif				/* __ASM_BEECH_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/cedar.c b/arch/ppc/platforms/4xx/cedar.c
--- a/arch/ppc/platforms/4xx/cedar.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/cedar.c	Wed Jan  8 20:04:44 2003
@@ -11,73 +11,75 @@
 #include <asm/machdep.h>
 
 #include <asm/io.h>
-
-#ifdef CONFIG_PPC_RTC
 #include <asm/todc.h>
-#endif
 
-void *ceder_rtc_base;
+void *cedar_rtc_base;
 
 void __init
-board_setup_arch(void)
+cedar_setup_arch(void)
 {
+	bd_t *bip = &__res;
 
-	bd_t *bip = (bd_t *)__res;
+	/* RTC step for the walnut */
+	cedar_rtc_base = (void *) CEDAR_RTC_VADDR;
+	TODC_INIT(TODC_TYPE_DS1743, cedar_rtc_base, cedar_rtc_base,
+		  cedar_rtc_base, 8);
 
-#ifdef CONFIG_PPC_RTC
-        /* RTC step for the walnut */
-        ceder_rtc_base = (void *) CEDER_RTC_VADDR;
-	TODC_INIT(TODC_TYPE_DS1743, ceder_rtc_base, ceder_rtc_base,ceder_rtc_base, 8);
-#endif /* CONFIG_PPC_RTC */
-#define CONFIG_DEBUG_BRINGUP
 #ifdef CONFIG_DEBUG_BRINGUP
 	printk("\n");
 	printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
 	printk("\n");
-	printk("bi_s_version\t %s\n",      bip->bi_s_version);
-	printk("bi_r_version\t %s\n",      bip->bi_r_version);
-	printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,bip->bi_memsize/(1024*1000));
+	printk("bi_s_version\t %s\n", bip->bi_s_version);
+	printk("bi_r_version\t %s\n", bip->bi_r_version);
+	printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,
+	       bip->bi_memsize / (1024 * 1000));
 	printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0,
-	bip->bi_enetaddr[0][0], bip->bi_enetaddr[0][1],
-	bip->bi_enetaddr[0][2], bip->bi_enetaddr[0][3],
-	bip->bi_enetaddr[0][4], bip->bi_enetaddr[0][5]);
+	       bip->bi_enetaddr[0][0], bip->bi_enetaddr[0][1],
+	       bip->bi_enetaddr[0][2], bip->bi_enetaddr[0][3],
+	       bip->bi_enetaddr[0][4], bip->bi_enetaddr[0][5]);
 
 	printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 1,
-	bip->bi_enetaddr[1][0], bip->bi_enetaddr[1][1],
-	bip->bi_enetaddr[1][2], bip->bi_enetaddr[1][3],
-	bip->bi_enetaddr[1][4], bip->bi_enetaddr[1][5]);
+	       bip->bi_enetaddr[1][0], bip->bi_enetaddr[1][1],
+	       bip->bi_enetaddr[1][2], bip->bi_enetaddr[1][3],
+	       bip->bi_enetaddr[1][4], bip->bi_enetaddr[1][5]);
 
 	printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n",
-	       bip->bi_intfreq, bip->bi_intfreq/ 1000000);
+	       bip->bi_intfreq, bip->bi_intfreq / 1000000);
 
 	printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n",
-		bip->bi_busfreq, bip->bi_busfreq / 1000000 );
+	       bip->bi_busfreq, bip->bi_busfreq / 1000000);
 	printk("bi_pci_busfreq\t 0x%8.8x\t pci bus clock:\t %dMHz\n",
-	       bip->bi_pci_busfreq, bip->bi_pci_busfreq/1000000);
+	       bip->bi_pci_busfreq, bip->bi_pci_busfreq / 1000000);
 
 	printk("\n");
 #endif
-}
 
-void __init
-board_io_mapping(void)
-{
-	io_block_mapping(CEDER_RTC_VADDR,
-		CEDER_RTC_PADDR, CEDER_RTC_SIZE, _PAGE_IO);
+	/* Identify the system */
+	printk
+	    ("IBM Cedar port (C) 2002 MontaVista Software, Inc. (source@mvista.com)\n");
+
 }
+
 void __init
-board_setup_irq(void)
+cedar_map_io(void)
 {
+	ppc4xx_map_io();
+	io_block_mapping(CEDAR_RTC_VADDR,
+			 CEDAR_RTC_PADDR, CEDAR_RTC_SIZE, _PAGE_IO);
 }
 
 void __init
-board_init(void)
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
 {
-#ifdef CONFIG_PPC_RTC
+	ppc4xx_init(r3, r4, r5, r6, r7);
+
+	ppc_md.setup_arch = cedar_setup_arch;
+	ppc_md.setup_io_mappings = cedar_map_io;
+
 	ppc_md.time_init = todc_time_init;
 	ppc_md.set_rtc_time = todc_set_rtc_time;
 	ppc_md.get_rtc_time = todc_get_rtc_time;
 	ppc_md.nvram_read_val = todc_direct_read_val;
 	ppc_md.nvram_write_val = todc_direct_write_val;
-#endif
 }
diff -Nru a/arch/ppc/platforms/4xx/cedar.h b/arch/ppc/platforms/4xx/cedar.h
--- a/arch/ppc/platforms/4xx/cedar.h	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/cedar.h	Wed Jan  8 20:04:44 2003
@@ -5,24 +5,24 @@
  * 	Author: MontaVista Software, Inc.
  *         	akuster@mvista.com or source@mvista.com
  *
- *    Module name: ceder.h
+ *    Module name: cedar.h
  *
  *    Description:
  *      Macros, definitions, and data structures specific to the IBM PowerPC
- *      Ceder eval board.
+ *      Cedar eval board.
  *
  *
  */
 
 #ifdef __KERNEL__
-#ifndef __ASM_CEDER_H__
-#define __ASM_CEDER_H__
+#ifndef __ASM_CEDAR_H__
+#define __ASM_CEDAR_H__
 #include <platforms/4xx/ibmnp405l.h>
 
 #ifndef __ASSEMBLY__
 /*
  * Data structure defining board information maintained by the boot
- * ROM on IBM's "Ceder" evaluation board. An effort has been made to
+ * ROM on IBM's "Cedar" evaluation board. An effort has been made to
  * keep the field names consistent with the 8xx 'bd_t' board info
  * structures.
  */
@@ -31,7 +31,7 @@
 	unsigned char	 bi_s_version[4];	/* Version of this structure */
 	unsigned char	 bi_r_version[30];	/* Version of the IBM ROM */
 	unsigned int	 bi_memsize;		/* DRAM installed, in bytes */
-	unsigned char	 bi_enetaddr[EMAC_NUMS][6];	/* Local Ethernet MAC address */
+	unsigned char	 bi_enetaddr[2][6];	/* Local Ethernet MAC address */
 	unsigned char	 bi_pci_mac[6];
 	unsigned int	 bi_intfreq;		/* Processor speed, in Hz */
 	unsigned int	 bi_busfreq;		/* PLB Bus speed, in Hz */
@@ -42,32 +42,22 @@
 */
 #define bi_tbfreq bi_intfreq
 
-/* Memory map for the IBM "Ceder" NP405 evaluation board.
+/* Memory map for the IBM "Cedar" NP405 evaluation board.
  */
 
-extern  void *ceder_rtc_base;
-#define CEDER_RTC_PADDR		((uint)0xf0000000)
-#define CEDER_RTC_VADDR		CEDER_RTC_PADDR
-#define CEDER_RTC_SIZE		((uint)8*1024)
+extern  void *cedar_rtc_base;
+#define CEDAR_RTC_PADDR		((uint)0xf0000000)
+#define CEDAR_RTC_VADDR		CEDAR_RTC_PADDR
+#define CEDAR_RTC_SIZE		((uint)8*1024)
 
 
 /* Early initialization address mapping for block_io.
  * Standard 405GP map.
  */
-#define PPC4xx_PCI_IO_PADDR	((uint)PPC405_PCI_PHY_IO_BASE)
-#define PPC4xx_PCI_IO_VADDR	PPC4xx_PCI_IO_PADDR
-#define PPC4xx_PCI_IO_SIZE	((uint)64*1024)
-#define PPC4xx_PCI_CFG_PADDR	((uint)PPC405_PCI_CONFIG_ADDR)
-#define PPC4xx_PCI_CFG_VADDR	PPC4xx_PCI_CFG_PADDR
-#define PPC4xx_PCI_CFG_SIZE	((uint)4*1024)
-#define PPC4xx_PCI_LCFG_PADDR	((uint)0xef400000)
-#define PPC4xx_PCI_LCFG_VADDR	PPC4xx_PCI_LCFG_PADDR
-#define PPC4xx_PCI_LCFG_SIZE	((uint)4*1024)
 #define PPC4xx_ONB_IO_PADDR	((uint)0xef600000)
 #define PPC4xx_ONB_IO_VADDR	PPC4xx_ONB_IO_PADDR
 #define PPC4xx_ONB_IO_SIZE	((uint)4*1024)
 
-#define NR_BOARD_IRQS 32
 
 #ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
 #define BASE_BAUD		201600
@@ -75,11 +65,11 @@
 #define BASE_BAUD		691200
 #endif
 
-#define PPC4xx_MACHINE_NAME "IBM NP405L Ceder"
+#define PPC4xx_MACHINE_NAME "IBM NP405L Cedar"
 
-extern char pci_irq_table[][4];
+ 
 
 
 #endif /* !__ASSEMBLY__ */
-#endif /* __ASM_CEDER_H__ */
+#endif /* __ASM_CEDAR_H__ */
 #endif /* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c
--- a/arch/ppc/platforms/4xx/cpci405.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/cpci405.c	Wed Jan  8 20:04:44 2003
@@ -13,9 +13,6 @@
  * Free Software Foundation;  either version 2 of the  License, or (at your
  * option) any later version.
  *
- *	History: 11/09/2001 - armin
- *       added board_init to add in additional instuctions needed during platfrom_init
- *
  */
 
 #include <linux/config.h>
@@ -26,6 +23,8 @@
 #include <asm/machdep.h>
 #include <asm/todc.h>
 
+void *cpci405_nvram; 
+
 /*
  * Some IRQs unique to CPCI-405.
  */
@@ -51,28 +50,31 @@
 };
 
 void __init
-board_setup_arch(void)
+cpci405_setup_arch(void)
 {
+	ppc4xx_setup_arch();
+	TODC_INIT(TODC_TYPE_MK48T35, cpci405_nvram, cpci405_nvram, cpci405_nvram, 8);
 }
 
 void __init
-board_io_mapping(void)
+cpci405_map_io(void)
 {
+	ppc4xx_map_io();
+	cpci405_nvram = ioremap(CPCI405_NVRAM_PADDR, CPCI405_NVRAM_SIZE);
 }
 
 void __init
-board_setup_irq(void)
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
 {
-}
+	ppc4xx_init(r3, r4, r5, r6, r7);
+
+	ppc_md.setup_arch = cpci405_setup_arch;
+	ppc_md.setup_io_mappings = cpci405_map_io;
 
-void __init
-board_init(void)
-{
-#ifdef CONFIG_PPC_RTC
 	ppc_md.time_init = todc_time_init;
 	ppc_md.set_rtc_time = todc_set_rtc_time;
 	ppc_md.get_rtc_time = todc_get_rtc_time;
 	ppc_md.nvram_read_val = todc_direct_read_val;
 	ppc_md.nvram_write_val = todc_direct_write_val;
-#endif
 }
diff -Nru a/arch/ppc/platforms/4xx/cpci405.h b/arch/ppc/platforms/4xx/cpci405.h
--- a/arch/ppc/platforms/4xx/cpci405.h	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/cpci405.h	Wed Jan  8 20:04:44 2003
@@ -4,35 +4,25 @@
  * Copyright (c) 2001 Stefan Roese (stefan.roese@esd-electronics.com)
  */
 
+#ifdef __KERNEL__
 #ifndef __ASM_CPCI405_H__
 #define __ASM_CPCI405_H__
 
 #include <linux/config.h>
 
 /* We have a 405GP core */
-#include <platforms/ibm405gp.h>
+#include <platforms/4xx/ibm405gp.h>
 
 #include <asm/ppcboot.h>
 
+#ifndef __ASSEMBLY__
 /* Some 4xx parts use a different timebase frequency from the internal clock.
 */
 #define bi_tbfreq bi_intfreq
 
-/* Early initialization address mapping for block_io.
- * Standard 405GP map.
- */
-#define PPC4xx_PCI_IO_PADDR	((uint)PPC405_PCI_PHY_IO_BASE)
-#define PPC4xx_PCI_IO_VADDR	PPC4xx_PCI_IO_PADDR
-#define PPC4xx_PCI_IO_SIZE	((uint)64*1024)
-#define PPC4xx_PCI_CFG_PADDR	((uint)PPC405_PCI_CONFIG_ADDR)
-#define PPC4xx_PCI_CFG_VADDR	PPC4xx_PCI_CFG_PADDR
-#define PPC4xx_PCI_CFG_SIZE	((uint)4*1024)
-#define PPC4xx_PCI_LCFG_PADDR	((uint)0xef400000)
-#define PPC4xx_PCI_LCFG_VADDR	PPC4xx_PCI_LCFG_PADDR
-#define PPC4xx_PCI_LCFG_SIZE	((uint)4*1024)
-#define PPC4xx_ONB_IO_PADDR	((uint)0xef600000)
-#define PPC4xx_ONB_IO_VADDR	PPC4xx_ONB_IO_PADDR
-#define PPC4xx_ONB_IO_SIZE	((uint)4*1024)
+/* Map for the NVRAM space */
+#define CPCI405_NVRAM_PADDR	((uint)0xf0200000)
+#define CPCI405_NVRAM_SIZE	((uint)32*1024)
 
 #ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
 #define BASE_BAUD		201600
@@ -42,4 +32,6 @@
 
 #define PPC4xx_MACHINE_NAME "esd CPCI-405"
 
+#endif /* !__ASSEMBLY__ */
 #endif	/* __ASM_CPCI405_H__ */
+#endif /* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/ep405.c b/arch/ppc/platforms/4xx/ep405.c
--- a/arch/ppc/platforms/4xx/ep405.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/4xx/ep405.c	Wed Jan  8 20:04:43 2003
@@ -2,7 +2,7 @@
  *    Copyright 2001 MontaVista Software Inc.
  *        <mlocke@mvista.com>
  *
- * 	Not much is needed for the Embedded Planet 405gp board
+ * 	Not much needed for the Embedded Planet 405gp board
  *
  */
 #include <linux/config.h>
@@ -12,7 +12,7 @@
 #include <asm/pci-bridge.h>
 #include <asm/machdep.h>
 #include <asm/todc.h>
-#include <platforms/4xx/ibm_ocp.h>
+#include <asm/ibm_ocp_pci.h>
 
 #undef DEBUG
 #ifdef DEBUG
@@ -33,7 +33,6 @@
 	{0x07, 0x0E, 25},		/* EP405PC: USB */
 #endif
 };
-#define EP405_DEVTABLE_SIZE (sizeof(ep405_devtable)/sizeof(ep405_devtable[0]))
 
 int __init
 ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
@@ -42,7 +41,7 @@
 
 	/* AFAICT this is only called a few times during PCI setup, so
 	   performance is not critical */
-	for (i = 0; i < EP405_DEVTABLE_SIZE; i++) {
+	for (i = 0; i < ARRAY_SIZE(ep405_devtable); i++) {
 		if (idsel == ep405_devtable[i].pci_idsel)
 			return ep405_devtable[i].irq;
 	}
@@ -50,11 +49,11 @@
 };
 
 void __init
-board_setup_arch(void)
+ep405_setup_arch(void)
 {
-	bd_t *bip = (bd_t *) __res;
+	ppc4xx_setup_arch();
 
-	if (bip->bi_nvramsize == 512*1024) {
+	if (__res.bi_nvramsize == 512*1024) {
 		/* FIXME: we should properly handle NVRTCs of different sizes */
 		TODC_INIT(TODC_TYPE_DS1557, ep405_nvram, ep405_nvram, ep405_nvram, 8);
 	}
@@ -128,9 +127,11 @@
 }
 
 void __init
-board_io_mapping(void)
+ep405_map_io(void)
 {
-	bd_t *bip = (bd_t *) __res;
+	bd_t *bip = &__res;
+
+	ppc4xx_map_io();
 
 	ep405_bcsr = ioremap(EP405_BCSR_PADDR, EP405_BCSR_SIZE);
 
@@ -140,10 +141,12 @@
 }
 
 void __init
-board_setup_irq(void)
+ep405_init_IRQ(void)
 {
 	int i;
 
+	ppc4xx_init_IRQ();
+
 	/* Workaround for a bug in the firmware it incorrectly sets
 	   the IRQ polarities for XIRQ0 and XIRQ1 */
 	mtdcr(DCRN_UIC_PR(DCRN_UIC0_BASE), 0xffffff80); /* set the polarity */
@@ -153,7 +156,7 @@
 	writeb(0xf0, ep405_bcsr+10);
 
 	/* Set up IRQ routing */
-	for (i = 0; i < EP405_DEVTABLE_SIZE; i++) {
+	for (i = 0; i < ARRAY_SIZE(ep405_devtable); i++) {
 		if ( (ep405_devtable[i].irq >= 25)
 		     && (ep405_devtable[i].irq) <= 31) {
 			writeb(ep405_devtable[i].cpld_xirq_select, ep405_bcsr+5);
@@ -163,22 +166,23 @@
 }
 
 void __init
-board_init(void)
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
 {
-#ifdef CONFIG_PPC_RTC
-	bd_t *bip = (bd_t *) __res;
+	ppc4xx_init(r3, r4, r5, r6, r7);
+
+	ppc_md.setup_arch = ep405_setup_arch;
+	ppc_md.setup_io_mappings = ep405_map_io;
+	ppc_md.init_IRQ = ep405_init_IRQ;
 
-	/* FIXME: we should be able to access the NVRAM even if PPC_RTC is not configured */
 	ppc_md.nvram_read_val = todc_direct_read_val;
 	ppc_md.nvram_write_val = todc_direct_write_val;
 
-	if (bip->bi_nvramsize == 512*1024) {
+	if (__res.bi_nvramsize == 512*1024) {
 		ppc_md.time_init = todc_time_init;
 		ppc_md.set_rtc_time = todc_set_rtc_time;
 		ppc_md.get_rtc_time = todc_get_rtc_time;
 	} else {
 		printk("EP405: NVRTC size is not 512k (not a DS1557).  Not sure what to do with it\n");
 	}
-
-#endif
 }
diff -Nru a/arch/ppc/platforms/4xx/ep405.h b/arch/ppc/platforms/4xx/ep405.h
--- a/arch/ppc/platforms/4xx/ep405.h	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/platforms/4xx/ep405.h	Wed Jan  8 20:04:32 2003
@@ -16,6 +16,9 @@
 #include <platforms/4xx/ibm405gp.h>
 
 #ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+
 typedef struct board_info {
 	unsigned int	 bi_memsize;		/* DRAM installed, in bytes */
 	unsigned char	 bi_enetaddr[6];	/* Local Ethernet MAC address */
diff -Nru a/arch/ppc/platforms/4xx/ibm405gp.c b/arch/ppc/platforms/4xx/ibm405gp.c
--- a/arch/ppc/platforms/4xx/ibm405gp.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/ibm405gp.c	Wed Jan  8 20:04:44 2003
@@ -28,36 +28,20 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *      History: 12/26/2001 - armin
- *		initial release
- *
  */
 
 #include <linux/config.h>
 #include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/threads.h>
-#include <linux/param.h>
-#include <linux/string.h>
+#include <asm/ocp.h>
 #include <platforms/4xx/ibm405gp.h>
 
-const struct pcil0_regs *PCIL_ADDR[] = {
-	(struct pcil0_regs *) PCIL0_BASE,
-};
+struct ocp_def core_ocp[]  __initdata = {
+	{OCP_VENDOR_IBM, OCP_FUNC_OPB, OPB_BASE_START, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART0_IO_BASE, UART0_INT,IBM_CPM_UART0},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART1_IO_BASE, UART1_INT, IBM_CPM_UART1},
+	{OCP_VENDOR_IBM, OCP_FUNC_IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{OCP_VENDOR_IBM, OCP_FUNC_GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{OCP_VENDOR_IBM, OCP_FUNC_EMAC, EMAC0_BASE, BL_MAC_ETH0, IBM_CPM_EMAC0},
+	{OCP_VENDOR_INVALID, OCP_FUNC_INVALID, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
 
-const struct NS16550 *COM_PORTS[] = {
-	(struct NS16550 *) UART0_IO_BASE,
-	(struct NS16550 *) UART1_IO_BASE,
-};
-
-struct iic_regs *IIC_ADDR[] = {
-	(struct iic_regs *) IIC0_BASE,
-};
-
-const struct gpio_regs *GPIO_ADDR[] = {
-	(struct gpio_regs *) GPIO0_BASE,
-};
-
-const struct emac_regs *EMAC_ADDR[] = {
-	(struct emac_regs *) EMAC0_BASE,
 };
diff -Nru a/arch/ppc/platforms/4xx/ibm405gp.h b/arch/ppc/platforms/4xx/ibm405gp.h
--- a/arch/ppc/platforms/4xx/ibm405gp.h	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/platforms/4xx/ibm405gp.h	Wed Jan  8 20:04:32 2003
@@ -30,19 +30,6 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *	Version 1.0 (01/10/10) - A. Kuster
- *	Initial version	 - moved 40GP  specific out of ppc4xx.h
- *			- moved emac reg from ppc405_enet.h
- *
- *	Version 1.1 02/01/17 - A. Kuster
- *	Moved offsets to ibm405.h
- *
- *	Version 1.2 05/01/02 - Armin
- *	 added IIC_PORT_DFNS
- *
- *	Version 1.3 - armin
- *	  removed iic & uart num defines
- *	  and IIC_PORT_DFNS
  */
 
 #ifdef __KERNEL__
@@ -50,7 +37,6 @@
 #define __ASM_IBM405GP_H__
 
 #include <linux/config.h>
-#include <platforms/4xx/ibm_ocp.h>
 
 /* ibm405.h at bottom of this file */
 
@@ -88,6 +74,9 @@
 #define PPC4xx_ONB_IO_VADDR	PPC4xx_ONB_IO_PADDR
 #define PPC4xx_ONB_IO_SIZE	((uint)4*1024)
 
+#define OPB_BASE_START	0x40000000
+#define EBIU_BASE_START	0xF0100000
+
 /* serial port defines */
 #define RS_TABLE_SIZE	2
 
@@ -101,6 +90,13 @@
 #define OPB0_BASE	0xEF600600
 #define GPIO0_BASE	0xEF600700
 #define EMAC0_BASE	0xEF600800
+#define BL_MAC_WOL	9	/* WOL */
+#define BL_MAL_SERR	10	/* MAL SERR */
+#define BL_MAL_TXDE	13	/* MAL TXDE */
+#define BL_MAL_RXDE	14	/* MAL RXDE */
+#define BL_MAL_TXEOB	11	/* MAL TX EOB */
+#define BL_MAL_RXEOB	12	/* MAL RX EOB */
+#define BL_MAC_ETH0	15	/* MAC */
 
 #define EMAC_NUMS	1
 #define IIC0_IRQ	2
@@ -154,23 +150,25 @@
 #define  PSR_PCI_ASYNC_EN        0x00001000
 #define  PSR_PCI_ARBIT_EN        0x00000400
 
-#define CPM_IIC0		0x80000000	/* IIC interface */
-#define CPM_PCI			0x40000000	/* PCI bridge */
-#define CPM_CPU			0x20000000	/* processor core */
-#define CPM_DMA			0x10000000	/* DMA controller */
-#define CPM_BRG			0x08000000	/* PLB to OPB bridge */
-#define CPM_DCP			0x04000000	/* CodePack */
-#define CPM_EBC			0x02000000	/* ROM/SRAM peripheral controller */
-#define CPM_SDRAM0		0x01000000	/* SDRAM memory controller */
-#define CPM_PLB			0x00800000	/* PLB bus arbiter */
-#define CPM_GPIO0		0x00400000	/* General Purpose IO (??) */
-#define CPM_UART0		0x00200000	/* serial port 0 */
-#define CPM_UART1		0x00100000	/* serial port 1 */
-#define CPM_UIC			0x00080000	/* Universal Interrupt Controller */
-#define CPM_TMRCLK		0x00040000	/* CPU timers */
-#define CPM_EMAC_MM		0x00020000	/* on-chip ethernet MM unit */
-#define CPM_EMAC_RM		0x00010000	/* on-chip ethernet RM unit */
-#define CPM_EMAC_TM		0x00008000	/* on-chip ethernet TM unit */
+#define IBM_CPM_IIC0		0x80000000	/* IIC interface */
+#define IBM_CPM_PCI		0x40000000	/* PCI bridge */
+#define IBM_CPM_CPU		0x20000000	/* processor core */
+#define IBM_CPM_DMA		0x10000000	/* DMA controller */
+#define IBM_CPM_OPB		0x08000000	/* PLB to OPB bridge */
+#define IBM_CPM_DCP		0x04000000	/* CodePack */
+#define IBM_CPM_EBC		0x02000000	/* ROM/SRAM peripheral controller */
+#define IBM_CPM_SDRAM0		0x01000000	/* SDRAM memory controller */
+#define IBM_CPM_PLB		0x00800000	/* PLB bus arbiter */
+#define IBM_CPM_GPIO0		0x00400000	/* General Purpose IO (??) */
+#define IBM_CPM_UART0		0x00200000	/* serial port 0 */
+#define IBM_CPM_UART1		0x00100000	/* serial port 1 */
+#define IBM_CPM_UIC		0x00080000	/* Universal Interrupt Controller */
+#define IBM_CPM_TMRCLK		0x00040000	/* CPU timers */
+#define IBM_CPM_EMAC0		0x00020000	/* on-chip ethernet MM unit */
+#define DFLT_IBM4xx_PM		~(IBM_CPM_PCI | IBM_CPM_CPU | IBM_CPM_DMA \
+					| IBM_CPM_OPB | IBM_CPM_EBC \
+					| IBM_CPM_SDRAM0 | IBM_CPM_PLB \
+					| IBM_CPM_UIC | IBM_CPM_TMRCLK)
 
 #define DCRN_DMA0_BASE		0x100
 #define DCRN_DMA1_BASE		0x108
diff -Nru a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibm405gpr.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,47 @@
+/*
+ *
+ *    Copyright 2000-2002 MontaVista Software Inc.
+ *	Current maintainer
+ *      Armin Kuster akuster@mvista.com
+ *
+ *    Module name: ibm405gpr.c
+ *
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <asm/ocp.h>
+
+#include "ibm405gpr.h"
+
+struct ocp_def core_ocp[]  __initdata = {
+	{OCP_VENDOR_IBM, OCP_FUNC_OPB, OPB_BASE_START, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART0_IO_BASE, UART0_INT,IBM_CPM_UART0},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART1_IO_BASE, UART1_INT, IBM_CPM_UART1},
+	{OCP_VENDOR_IBM, OCP_FUNC_IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{OCP_VENDOR_IBM, OCP_FUNC_GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{OCP_VENDOR_IBM, OCP_FUNC_EMAC, EMAC0_BASE, BL_MAC_ETH0, IBM_CPM_EMAC0},
+	{OCP_VENDOR_INVALID, OCP_FUNC_INVALID, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
+
+};
diff -Nru a/arch/ppc/platforms/4xx/ibm405gpr.h b/arch/ppc/platforms/4xx/ibm405gpr.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibm405gpr.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,187 @@
+/*
+ * ibm405gpr.h
+ *
+ *
+ *      Armin Kuster akuster@mvista.com
+ *      Aug, 2002
+ *
+ *
+ * Copyright 2002 MontaVista Softare 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.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_IBM405GPR_H__
+#define __ASM_IBM405GPR_H__
+
+#include <linux/config.h>
+
+/* ibm405.h at bottom of this file */
+
+/* PCI
+ * PCI Bridge config reg definitions
+ * see 17-19 of manual
+ */
+
+#define PPC405_PCI_CONFIG_ADDR	0xeec00000
+#define PPC405_PCI_CONFIG_DATA	0xeec00004
+
+#define PPC405_PCI_PHY_MEM_BASE	0x80000000	/* hose_a->pci_mem_offset */
+						/* setbat */
+#define PPC405_PCI_MEM_BASE	PPC405_PCI_PHY_MEM_BASE	/* setbat */
+#define PPC405_PCI_PHY_IO_BASE	0xe8000000	/* setbat */
+#define PPC405_PCI_IO_BASE	PPC405_PCI_PHY_IO_BASE	/* setbat */
+
+#define PPC405_PCI_LOWER_MEM	0x80000000	/* hose_a->mem_space.start */
+#define PPC405_PCI_UPPER_MEM	0xBfffffff	/* hose_a->mem_space.end */
+#define PPC405_PCI_LOWER_IO	0x00000000	/* hose_a->io_space.start */
+#define PPC405_PCI_UPPER_IO	0x0000ffff	/* hose_a->io_space.end */
+
+#define PPC405_ISA_IO_BASE	PPC405_PCI_IO_BASE
+
+#define PPC4xx_PCI_IO_PADDR	((uint)PPC405_PCI_PHY_IO_BASE)
+#define PPC4xx_PCI_IO_VADDR	PPC4xx_PCI_IO_PADDR
+#define PPC4xx_PCI_IO_SIZE	((uint)64*1024)
+#define PPC4xx_PCI_CFG_PADDR	((uint)PPC405_PCI_CONFIG_ADDR)
+#define PPC4xx_PCI_CFG_VADDR	PPC4xx_PCI_CFG_PADDR
+#define PPC4xx_PCI_CFG_SIZE	((uint)4*1024)
+#define PPC4xx_PCI_LCFG_PADDR	((uint)0xef400000)
+#define PPC4xx_PCI_LCFG_VADDR	PPC4xx_PCI_LCFG_PADDR
+#define PPC4xx_PCI_LCFG_SIZE	((uint)4*1024)
+#define PPC4xx_ONB_IO_PADDR	((uint)0xef600000)
+#define PPC4xx_ONB_IO_VADDR	PPC4xx_ONB_IO_PADDR
+#define PPC4xx_ONB_IO_SIZE	((uint)4*1024)
+
+#define OPB_BASE_START	0x40000000
+#define EBIU_BASE_START	0xF0100000
+
+/* serial port defines */
+#define RS_TABLE_SIZE	2
+
+#define UART0_INT	0
+#define UART1_INT	1
+
+#define PCIL0_BASE	0xEF400000
+#define UART0_IO_BASE	0xEF600300
+#define UART1_IO_BASE	0xEF600400
+#define IIC0_BASE	0xEF600500
+#define OPB0_BASE	0xEF600600
+#define GPIO0_BASE	0xEF600700
+#define EMAC0_BASE	0xEF600800
+#define BL_MAC_WOL	9	/* WOL */
+#define BL_MAL_SERR	10	/* MAL SERR */
+#define BL_MAL_TXDE	13	/* MAL TXDE */
+#define BL_MAL_RXDE	14	/* MAL RXDE */
+#define BL_MAL_TXEOB	11	/* MAL TX EOB */
+#define BL_MAL_RXEOB	12	/* MAL RX EOB */
+#define BL_MAC_ETH0	15	/* MAC */
+
+#define IIC_OWN		0x55
+#define IIC_CLOCK	50
+#define BD_EMAC_ADDR(e,i) bi_enetaddr[i]
+
+#define STD_UART_OP(num)					\
+	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
+		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
+		iomem_base: (u8 *)UART##num##_IO_BASE,		\
+		io_type: SERIAL_IO_MEM},
+
+#if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_DEBUG_IO_BASE	UART0_IO_BASE
+#define SERIAL_PORT_DFNS	\
+	STD_UART_OP(0)		\
+	STD_UART_OP(1)
+#endif
+
+#if defined(CONFIG_UART0_TTYS1)
+#define SERIAL_DEBUG_IO_BASE	UART1_IO_BASE
+#define SERIAL_PORT_DFNS	\
+	STD_UART_OP(1)		\
+	STD_UART_OP(0)
+#endif
+
+/* DCR defines */
+#define DCRN_CHCR_BASE		0x0B1
+#define DCRN_CHPSR_BASE		0x0B4
+#define DCRN_CPMSR_BASE		0x0B8
+#define DCRN_CPMFR_BASE		0x0BA
+
+#define CHR0_U0EC	0x00000080	/* Select external clock for UART0 */
+#define CHR0_U1EC	0x00000040	/* Select external clock for UART1 */
+#define CHR0_UDIV	0x0000003E	/* UART internal clock divisor */
+#define CHR1_CETE	0x00800000	/* CPU external timer enable */
+
+#define DCRN_CHPSR_BASE         0x0B4
+#define  PSR_PLL_FWD_MASK        0xC0000000
+#define  PSR_PLL_FDBACK_MASK     0x30000000
+#define  PSR_PLL_TUNING_MASK     0x0E000000
+#define  PSR_PLB_CPU_MASK        0x01800000
+#define  PSR_OPB_PLB_MASK        0x00600000
+#define  PSR_PCI_PLB_MASK        0x00180000
+#define  PSR_EB_PLB_MASK         0x00060000
+#define  PSR_ROM_WIDTH_MASK      0x00018000
+#define  PSR_ROM_LOC             0x00004000
+#define  PSR_PCI_ASYNC_EN        0x00001000
+#define  PSR_PCI_ARBIT_EN        0x00000400
+
+#define IBM_CPM_IIC0		0x80000000	/* IIC interface */
+#define IBM_CPM_PCI		0x40000000	/* PCI bridge */
+#define IBM_CPM_CPU		0x20000000	/* processor core */
+#define IBM_CPM_DMA		0x10000000	/* DMA controller */
+#define IBM_CPM_OPB		0x08000000	/* PLB to OPB bridge */
+#define IBM_CPM_DCP		0x04000000	/* CodePack */
+#define IBM_CPM_EBC		0x02000000	/* ROM/SRAM peripheral controller */
+#define IBM_CPM_SDRAM0		0x01000000	/* SDRAM memory controller */
+#define IBM_CPM_PLB		0x00800000	/* PLB bus arbiter */
+#define IBM_CPM_GPIO0		0x00400000	/* General Purpose IO (??) */
+#define IBM_CPM_UART0		0x00200000	/* serial port 0 */
+#define IBM_CPM_UART1		0x00100000	/* serial port 1 */
+#define IBM_CPM_UIC		0x00080000	/* Universal Interrupt Controller */
+#define IBM_CPM_TMRCLK		0x00040000	/* CPU timers */
+#define IBM_CPM_EMAC0		0x00020000	/* on-chip ethernet MM unit */
+#define DFLT_IBM4xx_PM		~(IBM_CPM_PCI | IBM_CPM_CPU | IBM_CPM_DMA \
+					| IBM_CPM_OPB | IBM_CPM_EBC \
+					| IBM_CPM_SDRAM0 | IBM_CPM_PLB \
+					| IBM_CPM_UIC | IBM_CPM_TMRCLK)
+
+#define DCRN_DMA0_BASE		0x100
+#define DCRN_DMA1_BASE		0x108
+#define DCRN_DMA2_BASE		0x110
+#define DCRN_DMA3_BASE		0x118
+#define DCRNCAP_DMA_SG		1	/* have DMA scatter/gather capability */
+#define DCRN_DMASR_BASE		0x120
+#define DCRN_EBC_BASE		0x012
+#define DCRN_DCP0_BASE		0x014
+#define DCRN_MAL_BASE		0x180
+#define DCRN_OCM0_BASE		0x018
+#define DCRN_PLB0_BASE		0x084
+#define DCRN_PLLMR_BASE		0x0B0
+#define DCRN_POB0_BASE		0x0A0
+#define DCRN_SDRAM0_BASE	0x010
+#define DCRN_UIC0_BASE		0x0C0
+#define UIC0 DCRN_UIC0_BASE
+
+#include <asm/ibm405.h>
+
+#endif				/* __ASM_IBM405GPR_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/ibm405lp.c b/arch/ppc/platforms/4xx/ibm405lp.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibm405lp.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,266 @@
+/*
+ * arch/ppc/platforms/ibm405lp.c  405LP-specific code
+ *
+ * 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.
+ *
+ * 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
+ *
+ * Copyright (C) 2002, International Business Machines Corporation
+ * All Rights Reserved.
+ *
+ * Bishop Brock
+ * IBM Research, Austin Center for Low-Power Computing
+ * bcbrock@us.ibm.com
+ * March, 2002
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/proc_fs.h>
+#include <linux/stat.h>
+#include <linux/string.h>
+
+#include <asm/delay.h>
+#include <asm/hardirq.h>
+#include <asm/ibm4xx.h>
+#include <asm/machdep.h>
+#include <asm/page.h>
+#include <asm/processor.h>
+#include <asm/system.h>
+#include <asm/time.h>
+#include <asm/uaccess.h>
+#include <asm/ocp.h>
+
+struct ocp_def core_ocp[]  __initdata = {
+	{OCP_VENDOR_IBM, OCP_FUNC_OPB, OPB0_BASE, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART0_IO_BASE, UART0_INT,IBM_CPM_UART0},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART1_IO_BASE, UART1_INT, IBM_CPM_UART1},
+	{OCP_VENDOR_IBM, OCP_FUNC_IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{OCP_VENDOR_IBM, OCP_FUNC_GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{OCP_VENDOR_INVALID, OCP_FUNC_INVALID, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
+};
+
+#ifdef CONFIG_PM
+/* Set up the 405LP clock and power management unit for aggressive power
+   management.  
+
+   Briefly, there are 3 CPM "classes":
+
+   Class 1 - Either completely asleep or awake.  The "force" state is
+             equivalent to the "enabled" state.  Many Class 1 units are 
+             critical system components and are never power managed.
+
+   Class 2 - Can be enabled for power management, where sleep requests are
+             made by the peripheral, typically after an inactivity timeout.
+	     When sleeping, critical interfaces remain active, and
+	     awaken the unit whenever it is targeted with a transaction.
+
+   Class 3 - Can be enabled for power management, where sleep requests are
+             made by the CPM.  Power management for these units typically 
+             will require intelligence in a device driver.
+
+   In the current implementation, the "force" bits are only used on Class 1
+   devices, and only when the associated driver has the intelligence necessary
+   to "unforce" the power management state.  A previous scheme, which tried to
+   enable power management based on whether a particular driver was compiled
+   with the kernel, caused many problems and is never used here.  
+
+   Class 2 devices with timeouts are normally initialized for the most
+   aggressive values.  There is no power management benefit of "forcing" Class
+   2 devices over letting their inactivity timeouts take effect.  Therefore,
+   after being set up here, Class 2 device drivers don't need to worry about
+   CPM.  
+
+   No Class 3 devices are handled yet.  */
+
+void __init
+ibm405lp_setup_cpm(void)
+{
+	u32 force = 0;
+	u32 enable = 0;
+	dma0_slp_t dma0_slp;
+	dcp0_cfg_t dcp0_cfg;
+	ebc0_cfg_t ebc0_cfg;
+	sdram0_cfg_t sdram0_cfg;
+	sdram0_pmit_t sdram0_pmit;
+	sla0_slpmd_t sla0_slpmd;
+
+	/* Initialize the CPM state */
+
+	mtdcr(DCRN_CPMFR, force);
+	mtdcr(DCRN_CPMER, enable);
+
+	/* IIC - Class 3 - Not handled yet.  The driver should at least be able
+	   to force/unforce itself. */
+
+	/* CPU - class 2 - There doesn't appear to be a timeout associated with
+	   this, and the exact function is not documented anywhere.  It saves a
+	   lot of power, though. I assume this gates core clocks when the CPU
+	   core is asleep, and probably adds a couple of cycles of latency when
+	   the CPU core wakes up. */
+
+	enable |= IBM_CPM_CPU;
+
+	/* DMA - class 2. Set for the minimum timeout, which is 32 cycles. */
+
+	dma0_slp.reg = mfdcr(DCRN_SLP);
+	dma0_slp.fields.sme = 1;
+	dma0_slp.fields.idu = 0;
+	mtdcr(DCRN_SLP, dma0_slp.reg);
+	enable |= IBM_CPM_DMA;
+
+	/* BRG - Class 2.  Seems to crash the system when enabled in 405LP Pass
+	   1 
+
+	   DCP (CodePack) - Class 2.  The semantics of the sleep delay are not
+	   documented. We'll use 32 (what the heck). */
+
+	dcp0_cfg.reg = mfdcri(DCRN_DCP0, CFG);
+	dcp0_cfg.fields.slen = 1;
+	dcp0_cfg.fields.sldy = 32;
+	mtdcri(DCRN_DCP0, CFG, dcp0_cfg.reg);
+	enable |= IBM_CPM_DCP;
+
+	/* EBC - Class 2.  Set for minimum timeout, which is 32 cycles. [ I
+	   think this is 32. It may be 64. I don't trust the documentation. ]
+	 */
+
+	ebc0_cfg.reg = mfdcri(DCRN_EBC0, CFG);
+	ebc0_cfg.fields.pme = 1;
+	ebc0_cfg.fields.pmt = 1;
+	mtdcri(DCRN_EBC0, CFG, ebc0_cfg.reg);
+	enable |= IBM_CPM_EBC;
+
+	/* SDRAM - Class 2.  Set for the minimum 32-cycle timeout.
+
+	   The documentation on this core is clear - waking a sleeping SDRAM
+	   controller takes 2 PLB cycles, which is added to the latency of the
+	   memory operation. If someone can prove that this is affecting
+	   performance we can easily back this off.  */
+
+	sdram0_cfg.reg = mfdcri(DCRN_SDRAM0, CFG);
+	sdram0_cfg.fields.pme = 1;
+	mtdcri(DCRN_SDRAM0, CFG, sdram0_cfg.reg);
+
+	sdram0_pmit.reg = mfdcri(DCRN_SDRAM0, PMIT);
+	sdram0_pmit.fields.cnt = 0;
+	mtdcri(DCRN_SDRAM0, PMIT, sdram0_pmit.reg);
+
+	enable |= IBM_CPM_SDRAM0;
+
+	/* PLB - Class 2.  Seems to crash the system when enabled in 405LP Pass
+	   1.
+
+	   GPIO - Class 1.  This unit is used for many things, and no single
+	   driver controls all GPIO.  It's best left unmanaged (it doesn't use
+	   much power anyway). NB: 405LP Pass 1 erratum - forcing PM on GPIO
+	   kills the TPC.
+
+	   UART0 - Class 1
+	   UART1 - Class 1
+
+	   Someone should work on the serial port drivers to enable PM support
+	   for them. Any takers?
+
+	   UIC        - Class 1
+	   CPU_TMRCLK - Class 1
+
+	   These system resources are never power managed.  */
+
+	/* SLA - Class 2.  Set for the minimum 32-cycle timeout. */
+
+	sla0_slpmd.reg = mfdcri(DCRN_SLA0, SLPMD);
+	sla0_slpmd.fields.slen = 1;
+	sla0_slpmd.fields.slcr = 0;
+	mtdcri(DCRN_SLA0, SLPMD, sla0_slpmd.reg);
+	enable |= IBM_CPM_SLA;
+
+	/* CSI  - Class 1.  
+	   TPC  - Class 1.
+	   TDES - Class 1.
+
+	   The drivers for these units are power-aware, and manage the device
+	   properly. By default these units are forced off at boot. */
+
+	force |= IBM_CPM_CSI;
+	force |= IBM_CPM_TPC;
+	force |= IBM_CPM_TDES;
+
+	/* Set the CPM state */
+
+	mtdcr(DCRN_CPMFR, force);
+	mtdcr(DCRN_CPMER, enable);
+}
+#endif
+
+/* This routine is included here because the framebuffer driver needs a way to
+   tell the system the Pixel clock frequency it needs, regardless of whether
+   run-time frequency scaling is configured.  A hook and a couple of global
+   variables are always present and will be used by the RTVFS driver if it is
+   loaded.
+
+   Pixel clock setting is kind of a hack, as the frequency steps available from
+   the PLB/PixClk divider may be too large to guarantee that we'll hit within
+   the given limits.  We never set the frequency above the upper bound, but due
+   to quantization may need to set the frequency below the lower bound.  So far
+   it works OK for the panels we've tried.
+
+   In general, the choice of a system clock frequency should be made with
+   consideration of the LCD panel to be attached, to guarantee a good clock
+   divider for the Pixel clock regardless of frequency scaling.
+
+   Clock frequencies are in KHz. If pixclk_min or pixclk_max are zero, we set
+   the lowest possible frequency to conserve energy. */
+
+int (*set_pixclk_hook) (unsigned pixclk_min, unsigned pixclk_max) = NULL;
+unsigned last_pixclk_min = 0;
+unsigned last_pixclk_max = 0;
+
+EXPORT_SYMBOL(set_pixclk_hook);
+EXPORT_SYMBOL(last_pixclk_min);
+EXPORT_SYMBOL(last_pixclk_max);
+
+int
+ibm405lp_set_pixclk(unsigned pixclk_min, unsigned pixclk_max)
+{
+	unsigned divider;
+	bd_t *bip = (bd_t *) __res;
+	unsigned plb_khz = bip->bi_busfreq / 1000;
+	cpc0_cgcr1_t cgcr1;
+
+	if (set_pixclk_hook) {
+		return (set_pixclk_hook) (pixclk_min, pixclk_max);
+	} else {
+		if ((pixclk_min == 0) || (pixclk_max == 0))
+			divider = CPC0_DIV_MAX;
+		else {
+			divider = plb_khz / pixclk_min;
+			if (divider == 0)
+				divider = 1;
+			if ((divider < CPC0_DIV_MAX) &&
+			    ((plb_khz / divider) > pixclk_max))
+				divider++;
+		}
+
+		cgcr1.reg = mfdcr(DCRN_CPC0_CGCR1);
+		cgcr1.fields.ppxl = CPC0_DIV_ENCODE(divider);
+		mtdcr(DCRN_CPC0_CGCR1, cgcr1.reg);
+
+		last_pixclk_min = pixclk_min;
+		last_pixclk_max = pixclk_max;
+		return 0;
+	}
+}
diff -Nru a/arch/ppc/platforms/4xx/ibm405lp.h b/arch/ppc/platforms/4xx/ibm405lp.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibm405lp.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,900 @@
+/*
+ * include/asm-ppc/platforms/ibm405lp.h  405LP-specific definitions
+ *
+ * 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.
+ *
+ * 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
+ *
+ * Copyright (C) 2002, International Business Machines Corporation
+ * All Rights Reserved.
+ *
+ * Bishop Brock
+ * IBM Research, Austin Center for Low-Power Computing
+ * bcbrock@us.ibm.com
+ * March, 2002
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_IBM405LP_H__
+#define __ASM_IBM405LP_H__
+
+#include <linux/config.h>
+#include <asm/ibm4xx.h>
+
+/* Machine-specific register naming for the 4xx processors is a mess. It seems
+   that everyone had a different idea on how to prefix/abbreviate/configure the
+   DCR numbers and MMIO addresses.  I'm no different! For the 405LP we have
+   defined all of the DCRs and MMIO address consistently with their names as
+   documented in the official IBM hardware manual for the processor.
+
+   DCRs are all given a DCRN_ prefix, which seems to be the most
+   common consistent naming scheme in old code (although the official IBM DCR
+   names are so unique that there's really little need for the DCRN_).
+
+   At the end of the DCR defines several synonyms are defined for backwards
+   compatibility, but all new code specific to the 405LP uses the consistent
+   names. 
+
+   Version 07/24/02 1.1 - Armin
+        added default pm define
+*/
+
+/*****************************************************************************
+ * Directly accessed DCRs
+ *****************************************************************************/
+
+/* DCRs used for Indirect Access */
+
+#define DCRN_SDRAM0_CFGADDR 0x010	/* Memory Ctlr. DCR Address Register */
+#define DCRN_SDRAM0_CFGDATA 0x011	/* Memory Ctlr. DCR Data Register */
+#define DCRN_EBC0_CFGADDR   0x012	/* Peripheral Ctlr. DCR Address Register */
+#define DCRN_EBC0_CFGDATA   0x013	/* Peripheral Ctlr. DCR Data Register */
+#define DCRN_SLA0_CFGADDR   0x0e0	/* Speech Label Accel. DCR Address Reg. */
+#define DCRN_SLA0_CFGDATA   0x0e1	/* Speech Label Accel. DCR Data Reg. */
+#define DCRN_LCD0_CFGADDR   0x3c8	/* LCD Ctlr. DCR Address Reg. */
+#define DCRN_LCD0_CFGDATA   0x3c9	/* LCD Ctlr. DCR Data Reg. */
+
+/* On-chip Buses */
+
+#define DCRN_PLB0_BESR      0x084	/* PLB Bus Error Status Register */
+#define DCRN_PLB0_BEAR      0x086	/* PLB Bus Error Address Register */
+#define DCRN_PLB0_ACR       0x087	/* PLB Arbiter Control Register */
+#define DCRN_POB0_BESR0     0x0a0	/* PLB to OPB Bus Error Status Register 0 */
+#define DCRN_POB0_BEAR      0x0a2	/* PLB to OPB Bus Error Address Register */
+#define DCRN_POB0_BESR1     0x0a4	/* PLB to OPB Bus Error Status Register 1 */
+
+/* Clocking and Chip Control */
+
+#define DCRN_CPC0_PLLMR     0x0b0	/* PLL Mode Register */
+#define DCRN_CPC0_CGCR0     0x0b1	/* Clock Generation Control Register 0 */
+#define DCRN_CPC0_CGCR1     0x0b2	/* Clock Generation Control Register 1 */
+#define DCRN_CPC0_CR0       0x0b5	/* Chip Control Register 0 */
+#define DCRN_CHCR0 DCRN_CPC0_CR0
+#define DCRN_CPC0_CR1       0x0b4	/* Chip Control Register 1 */
+#define DCRN_CPC0_PLBAPR    0x0b6	/* PLB Arbiter Priority Register */
+#define DCRN_CPC0_JTAGID    0x0b7	/* JTAG ID Register */
+
+/* Clock and Power Management */
+
+#define DCRN_CPMSR_BASE     0x0b8	/* CPM Status Register */
+#define DCRN_CPMFR_BASE     0x0ba	/* CPM Force Register */
+
+/* Universal Interrupt Controller */
+
+#define DCRN_UIC0_SR        0x0c0	/* UIC Status Register */
+#define DCRN_UIC0_ER        0x0c2	/* UIC Enable Register */
+#define DCRN_UIC0_CR        0x0c3	/* UIC Critical Register */
+#define DCRN_UIC0_PR        0x0c4	/* UIC Polarity Register */
+#define DCRN_UIC0_TR        0x0c5	/* UIC Triggering Register */
+#define DCRN_UIC0_MSR       0x0c6	/* UIC Masked Status Register */
+#define DCRN_UIC0_VR        0x0c7	/* UIC Vector Register */
+#define DCRN_UIC0_VCR       0x0c8	/* UIC Vector Configuration Register */
+
+/* Real-time Clock */
+
+#define DCRN_RTC0_SEC       0x140	/* RTC Seconds Register */
+#define DCRN_RTC0_SECAL     0x141	/* RTC Seconds Alarm Register */
+#define DCRN_RTC0_MIN       0x142	/* RTC Minutes Register */
+#define DCRN_RTC0_MINAL     0x143	/* RTC Minutes Alarm Register */
+#define DCRN_RTC0_HR        0x144	/* RTC Hours Register */
+#define DCRN_RTC0_HRAL      0x145	/* RTC Hours Alarm Register */
+#define DCRN_RTC0_DOW       0x146	/* RTC Day of Week Register */
+#define DCRN_RTC0_DOM       0x147	/* RTC Date of Month Register */
+#define DCRN_RTC0_MONTH     0x148	/* RTC Month Register */
+#define DCRN_RTC0_YEAR      0x149	/* RTC Year Register */
+#define DCRN_RTC0_CR0       0x14a	/* RTC "A" Register */
+#define DCRN_RTC0_CR1       0x14b	/* RTC "B" Register */
+#define DCRN_RTC0_CR2       0x14c	/* RTC "C" Register */
+#define DCRN_RTC0_CR3       0x14d	/* RTC "D" Register */
+#define DCRN_RTC0_CEN       0x14e	/* RTC Century Register */
+#define DCRN_RTC0_WRAP      0x150	/* RTC Wrapper */
+
+/* Advanced Power Management Controller */
+
+#define DCRN_APM0_ISR 	     0x160	/* APM Interrupt Status Register */
+#define DCRN_APM0_IER 	     0x162	/* APM Interrupt Enable Register */
+#define DCRN_APM0_IPR 	     0x163	/* APM Interrupt Polarity Register */
+#define DCRN_APM0_ITR 	     0x164	/* APM Interrupt Trigger Register */
+#define DCRN_APM0_CFG  	     0x165	/* APM Configuration Register */
+#define DCRN_APM0_SR  	     0x166	/* APM Status Register */
+#define DCRN_APM0_ID  	     0x167	/* APM Revision ID Register */
+
+/* Triple DES Controller */
+
+#define DCRN_TDES0_ADDR      0x180	/* TDES OPB Slave Base Address  */
+#define DCRN_TDES0_CFG       0x181	/* TDES OPB Slave Configuration */
+#define DCRN_TDES0_STAT      0x182	/* TDES Status  */
+#define DCRN_TDES0_ID        0x183	/* TDES Core ID */
+
+/* LCD Controller */
+
+#define DCRN_LCD0_CFG        0x3c0	/* LCD Configuration Register */
+#define DCRN_LCD0_ICR        0x3c1	/* LCD Interrupt Control Register */
+#define DCRN_LCD0_ISR        0x3c2	/* LCD Interrupt Status Register */
+#define DCRN_LCD0_IMR        0x3c3	/* LCD Interrupt Mask Register */
+
+/*****************************************************************************
+ * Indirectly accessed DCRs. Note that unlike direct-access DCRs whose numbers
+ * must be hard-coded into the instruction, indirect-access DCR numbers can be
+ * computed. 
+ *****************************************************************************/
+
+/* Offsets for SDRAM Controler Registers */
+
+#define DCRN_SDRAM0_BESR0  0x00	/* Bus Error Syndrome Register 0 */
+#define DCRN_SDRAM0_BESR1  0x08	/* Bus Error Syndrome Register 1 */
+#define DCRN_SDRAM0_BEAR   0x10	/* Bus Error Address Register */
+#define DCRN_SDRAM0_CFG    0x20	/* Memory Controller Options 1 */
+#define DCRN_SDRAM0_STATUS 0x24	/* SDRAM controller status */
+#define DCRN_SDRAM0_RTR    0x30	/* Refresh Timer Register */
+#define DCRN_SDRAM0_PMIT   0x34	/* Power Management Idle Timer */
+#define DCRN_SDRAM0_B0CR   0x40	/* Memory Bank 0 Configuration */
+#define DCRN_SDRAM0_B1CR   0x44	/* Memory Bank 1 Configuration */
+#define DCRN_SDRAM0_B2CR   0x48	/* Memory Bank 2 Configuration */
+#define DCRN_SDRAM0_B3CR   0x4c	/* Memory Bank 3 Configuration */
+#define DCRN_SDRAM0_TR     0x80	/* Sdram Timing Register 1 */
+#define DCRN_SDRAM0_ECCCFG 0x94	/* ECC Configuration */
+#define DCRN_SDRAM0_ECCESR 0x98	/* ECC Error Status Register */
+
+#define SDRAM0_BANKS           4
+#define DCRN_SDRAM0_BnCR(bank) (0x40 + (4 * (bank)))
+
+/* Offsets for External Bus Controller Registers */
+
+#define DCRN_EBC0_B0CR  0x00	/* Peripheral Bank 0 Configuration Register */
+#define DCRN_EBC0_B1CR  0x01	/* Peripheral Bank 1 Configuration Register */
+#define DCRN_EBC0_B2CR  0x02	/* Peripheral Bank 2 Configuration Register */
+#define DCRN_EBC0_B3CR  0x03	/* Peripheral Bank 3 Configuration Register */
+#define DCRN_EBC0_B4CR  0x04	/* Peripheral Bank 4 Configuration Register */
+#define DCRN_EBC0_B5CR  0x05	/* Peripheral Bank 5 Configuration Register */
+#define DCRN_EBC0_B6CR  0x06	/* Peripheral Bank 6 Configuration Register */
+#define DCRN_EBC0_B7CR  0x07	/* Peripheral Bank 7 Configuration Register */
+#define DCRN_EBC0_B0AP  0x10	/* Peripheral Bank 0 Access Parameters */
+#define DCRN_EBC0_B1AP  0x11	/* Peripheral Bank 1 Access Parameters */
+#define DCRN_EBC0_B2AP  0x12	/* Peripheral Bank 2 Access Parameters */
+#define DCRN_EBC0_B3AP  0x13	/* Peripheral Bank 3 Access Parameters */
+#define DCRN_EBC0_B4AP  0x14	/* Peripheral Bank 4 Access Parameters */
+#define DCRN_EBC0_B5AP  0x15	/* Peripheral Bank 5 Access Parameters */
+#define DCRN_EBC0_B6AP  0x16	/* Peripheral Bank 6 Access Parameters */
+#define DCRN_EBC0_B7AP  0x17	/* Peripheral Bank 7 Access Parameters */
+#define DCRN_EBC0_BEAR  0x20	/* Periperal Bus Error Address Register */
+#define DCRN_EBC0_BESR0 0x21	/* Peripheral Bus Error Status Register 0 */
+#define DCRN_EBC0_BESR1 0x22	/* Peripheral Bus Error Status Register 0 */
+#define DCRN_EBC0_CFG   0x23	/* External Peripheral Control Register */
+
+#define EBC0_BANKS           8
+#define DCRN_EBC0_BnCR(bank) (bank)
+#define DCRN_EBC0_BnAP(bank) (0x10 + (bank))
+
+/* Offsets for LCD Controller DCRs */
+
+#define DCRN_LCD0_DER    0x80010000	/* Display Enable Regsiter */
+#define DCRN_LCD0_DCFG   0x80010010	/* Display Configuration Register */
+#define DCRN_LCD0_DSR    0x80010040	/* Display Status Register */
+#define DCRN_LCD0_FRDR   0x80010080	/* Dither and Frame Rate Modulation Reg. */
+#define DCRN_LCD0_SDR    0x800100c0	/* Signal Delay Register */
+#define DCRN_LCD0_ADSR   0x80010100	/* Active Display Size Register */
+#define DCRN_LCD0_TDSR   0x80010104	/* Total Display Size Register */
+#define DCRN_LCD0_FPLCR  0x80010140	/* FPLINE Control Register */
+#define DCRN_LCD0_FPLOR  0x80010144	/* FPLINE Offset Register */
+#define DCRN_LCD0_FPFCR  0x80010148	/* FPFRAME Control Register */
+#define DCRN_LCD0_FPFOR  0x8001014c	/* FPFRAME Control Register */
+#define DCRN_LCD0_FPSCR  0x80010150	/* FPSHIFT Control Register */
+#define DCRN_LCD0_FPDRR  0x80010158	/* FPDRDY Control Register */
+#define DCRN_LCD0_FPDCR  0x80010160	/* FPDATA Control Register */
+#define DCRN_LCD0_PFBFR  0x80010800	/* Pixel and Frame Buffer Format Reg. */
+#define DCRN_LCD0_PFR    0x80011000	/* Pixel Format Register */
+#define DCRN_LCD0_FBBAR  0x80011008	/* Frame Buffer Base Address Register */
+#define DCRN_LCD0_STRIDE 0x8001100c	/* Stride Register */
+#define DCRN_LCD0_PAR    0x80011800	/* Palette Access Registers Base */
+#define DCRN_LCD0_CER    0x80012000	/* Cursor Enable Register */
+#define DCRN_LCD0_CBAR   0x80012008	/* Cursor Base Address Register */
+#define DCRN_LCD0_CLR    0x8001200c	/* Cursor Location Register */
+#define DCRN_LCD0_CC0R   0x80012010	/* Cursor Color 0 */
+#define DCRN_LCD0_CC1R   0x80012014	/* Cursor Color 1 */
+
+#define LCD0_PAR_REGS     256
+#define DCRN_LCD0_PARn(n) (DCRN_LCD0_PAR + (4 * (n)))
+
+/* Offsets for Decompression Controller DCRs */
+
+#define DCRN_DCP0_ITOR0   0x00	/* Index Table Origin Register 0 */
+#define DCRN_DCP0_ITOR1   0x01	/* Index Table Origin Register 1 */
+#define DCRN_DCP0_ITOR2   0x02	/* Index Table Origin Register 2 */
+#define DCRN_DCP0_ITOR3   0x03	/* Index Table Origin Register 3 */
+#define DCRN_DCP0_ADDR0   0x04	/* Address Decode Definition Register 0 */
+#define DCRN_DCP0_ADDR1   0x05	/* Address Decode Definition Register 1 */
+#define DCRN_DCP0_CFG     0x40	/* Decompression Controller Cfg. Register */
+#define DCRN_DCP0_ID      0x41	/* Decompression Controller ID Register */
+#define DCRN_DCP0_VER     0x42	/* Decompression Controller Version Register */
+#define DCRN_DCP0_PLBBEAR 0x50	/* Bus Error Address Register (PLB) */
+#define DCRN_DCP0_MEMBEAR 0x51	/* Bus Error Address Register (EBC/SDRAM) */
+#define DCRN_DCP0_ESR     0x52	/* Bus Error Status Register 0 (Masters 0-3) */
+
+#define DCRN_DCP0_RAMn(n) (0x400 + (n))	/* Decompression Decode Table Entries
+					   0x400-0x5FF Low 16-bit decode table
+					   0x600-0x7FF High 16-bit decode table
+					 */
+
+/* Offsets for Speech Label Accelerator DCRs */
+
+#define DCRN_SLA0_CR    0x00	/* SLA Control Register */
+#define DCRN_SLA0_SR    0x01	/* SLA Status Register */
+#define DCRN_SLA0_BESR  0x02	/* SLA Bus Error Status Register */
+#define DCRN_SLA0_BEAR  0x03	/* SLA Bus Error Address Register */
+#define DCRN_SLA0_UADDR 0x04	/* SLA PLB Upper Address Register */
+#define DCRN_SLA0_GMBA  0x05	/* SLA General Indirect Memory Base Address */
+#define DCRN_SLA0_GMLL  0x06	/* SLA General Indirect Memory Link List */
+#define DCRN_SLA0_AMBA  0x07	/* SLA Atom Memory Base Address Register */
+#define DCRN_SLA0_ACBA  0x08	/* SLA Accumulator Base Address Register */
+#define DCRN_SLA0_DIBA  0x09	/* SLA Done Indication Base Address Register */
+#define DCRN_SLA0_GPOFF 0x0A	/* SLA General Indirect Pass Offset Register */
+#define DCRN_SLA0_SLPMD 0x0B	/* SLA Sleep Mode Control Register */
+#define DCRN_SLA0_ID    0x0C	/* SLA ID Register */
+#define DCRN_SLA0_GMLLR 0x0D	/* SLA General Indirect Memory Link List Reset */
+
+#define DCRN_DMA0_BASE	0x100
+#define DCRN_DMA1_BASE	0x108
+#define DCRN_DMA2_BASE	0x110
+#define DCRN_DMA3_BASE	0x118
+#define DCRNCAP_DMA_SG	1	/* have DMA scatter/gather capability */
+#define DCRN_DMASR_BASE	0x120
+#define DCRN_EBC_BASE	0x012
+#define DCRN_DCP0_BASE	0x014
+#define DCRN_UIC0_BASE	0x0C0
+
+#define UIC0	DCRN_UIC0_BASE
+
+#undef NR_UICS
+#define NR_UICS	1
+
+/* More memory-mapped I/O bases, etc., esp. for OCP, that should be moved
+   elsewhere. */
+
+#define IIC0_BASE	0xEF600500
+#define OPB0_BASE	0xEF600600
+#define GPIO0_BASE	0xEF600700
+
+#define IIC0_IRQ	2
+
+/****************************************************************************
+ * MMIO Addresses
+ ***************************************************************************/
+
+/* Touch Panel/PWM Controller */
+
+#define TPC0_IO_BASE   0xef600a00
+
+#define TPC_CR   0x00		/* TPC Command Register */
+#define TPC_PCRX 0x04		/* TPC Precharge Count Register X1 */
+#define TPC_DCRX 0x08		/* TPC Discharge Count Register X1 */
+#define TPC_PCRY 0x0c		/* TPC Precharge Count Register Y1 */
+#define TPC_DCRY 0x10		/* TPC Discharge Count Register Y1 */
+#define TPC_RRX  0x14		/* TPC Read Register X1 */
+#define TPC_RRY  0x18		/* TPC Read Register Y1 */
+#define TPC_SRX  0x1c		/* TPC Status Register X1 */
+#define TPC_SRY  0x20		/* TPC Status Register Y1 */
+
+/* Triple-DES Controller */
+
+#define TDES0_IO_BASE  0xef600b00
+
+/*****************************************************************************
+ * CPM bits for the 405LP.  
+ *****************************************************************************/
+
+#define CPM_BITMASK(i) (((unsigned)0x80000000) >> i)
+
+#define IBM_CPM_IIC0   CPM_BITMASK(0)	/* IIC Interface */
+#define IBM_CPM_CPU    CPM_BITMASK(1)	/* Processor Core */
+#define IBM_CPM_DMA    CPM_BITMASK(3)	/* DMA Controller */
+#define IBM_CPM_OPB    CPM_BITMASK(4)	/* PLB to OPB Bridge */
+#define IBM_CPM_DCP    CPM_BITMASK(5)	/* CodePack */
+#define IBM_CPM_EBC    CPM_BITMASK(6)	/* ROM/SRAM Peripheral Controller */
+#define IBM_CPM_SDRAM0 CPM_BITMASK(7)	/* SDRAM memory controller */
+#define IBM_CPM_PLB    CPM_BITMASK(8)	/* PLB bus arbiter */
+#define IBM_CPM_GPIO0  CPM_BITMASK(9)	/* General Purpose IO (??) */
+#define IBM_CPM_UART0  CPM_BITMASK(10)	/* Serial Port 0 */
+#define IBM_CPM_UART1  CPM_BITMASK(11)	/* Serial Port 1 */
+#define IBM_CPM_UIC    CPM_BITMASK(12)	/* Universal Interrupt Controller */
+#define IBM_CPM_TMRCLK CPM_BITMASK(13)	/* CPU Timers */
+#define IBM_CPM_SLA    CPM_BITMASK(14)	/* Speech Label Accelerator */
+#define IBM_CPM_CSI    CPM_BITMASK(15)	/* CODEC Serial Interface */
+#define IBM_CPM_TPC    CPM_BITMASK(16)	/* Touch Panel Controller */
+#define IBM_CPM_TDES   CPM_BITMASK(18)	/* Triple DES */
+
+#define DFLT_IBM4xx_PM 0 /* for now until we get a better hable on this one - armin */
+
+/*****************************************************************************
+ * UIC IRQ ordinals for the 405LP.  IRQ bit names are as documented in the
+ * 405LP manual (except for reserved fields).  Backwards-compatible synonyms
+ * appear at the end.
+ *****************************************************************************/
+
+#define UIC_IRQ_U0    0		/* UART0 */
+#define UIC_IRQ_U1    1		/* UART1 */
+#define UIC_IRQ_IIC   2		/* IIC */
+#define UIC_IRQ_EM    3		/* EBC ??? */
+#define UIC_IRQ_IRQ4  4		/* Reserved */
+#define UIC_IRQ_D0    5		/* DMA Channel 0 */
+#define UIC_IRQ_D1    6		/* DMA Channel 1 */
+#define UIC_IRQ_D2    7		/* DMA Channel 2 */
+#define UIC_IRQ_D3    8		/* DMA Channel 3 */
+#define UIC_IRQ_IRQ9  9		/* Reserved */
+#define UIC_IRQ_IRQ10 10	/* Reserved */
+#define UIC_IRQ_IRQ11 11	/* Reserved */
+#define UIC_IRQ_IRQ12 12	/* Reserved */
+#define UIC_IRQ_IRQ13 13	/* Reserved */
+#define UIC_IRQ_IRQ14 14	/* Reserved */
+#define UIC_IRQ_IRQ15 15	/* Reserved */
+#define UIC_IRQ_IRQ16 16	/* Reserved */
+#define UIC_IRQ_EC    17	/* ECC Correctable Error ??? */
+#define UIC_IRQ_TPX   18	/* Touch Panel X */
+#define UIC_IRQ_TPY   19	/* Touch Panel Y */
+#define UIC_IRQ_SLA   20	/* SLA Interrupt */
+#define UIC_IRQ_CSI   21	/* CSI Interrupt */
+#define UIC_IRQ_LCD   22	/* LCD Interrupt */
+#define UIC_IRQ_RTC   23	/* RTC Interrupt */
+#define UIC_IRQ_APM   24	/* APM Interrupt */
+#define UIC_IRQ_EIR0  25	/* External IRQ 0 */
+#define UIC_IRQ_EIR1  26	/* External IRQ 1 */
+#define UIC_IRQ_EIR2  27	/* External IRQ 2 */
+#define UIC_IRQ_EIR3  28	/* External IRQ 3 */
+#define UIC_IRQ_EIR4  29	/* External IRQ 4 */
+#define UIC_IRQ_EIR5  30	/* External IRQ 5 */
+#define UIC_IRQ_EIR6  31	/* External IRQ 6 */
+
+/*****************************************************************************
+ * Serial port definitions
+ *****************************************************************************/
+
+#ifdef CONFIG_SERIAL_MANY_PORTS
+#define RS_TABLE_SIZE	64
+#else
+#define RS_TABLE_SIZE	4
+#endif
+
+#define UART0_INT	UIC_IRQ_U0
+#define UART1_INT	UIC_IRQ_U1
+#define UART0_IO_BASE	0xEF600300
+#define UART1_IO_BASE	0xEF600400
+
+#define STD_UART_OP(num)					\
+	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
+		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
+		iomem_base:(u8 *) UART##num##_IO_BASE,		\
+		io_type: SERIAL_IO_MEM},
+
+#if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_DEBUG_IO_BASE    UART0_IO_BASE
+#define SERIAL_PORT_DFNS        \
+        STD_UART_OP(0)          \
+        STD_UART_OP(1)
+#endif
+
+#if defined(CONFIG_UART0_TTYS1)
+#define SERIAL_DEBUG_IO_BASE    UART1_IO_BASE
+#define SERIAL_PORT_DFNS        \
+        STD_UART_OP(1)          \
+        STD_UART_OP(0)
+#endif
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+#include <asm/system.h>
+
+/****************************************************************************
+ * DCR type structures and field definitions for DCRs manipulated by the 405LP
+ * Linux port
+ ****************************************************************************/
+
+/* APM0_CFG - APM Configuration Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd:17;
+		unsigned int isp:1;	/* Initiate Sleep */
+		unsigned int ewt:1;	/* Enable Watchdog Timer */
+		unsigned int sm:2;	/* Sleep Mode */
+		unsigned int iica:3;	/* I2C Address (low-order 3 bits) */
+		unsigned int psc:1;	/* Power Select Control */
+		unsigned int cdiv:6;	/* IIC Clock Divider */
+		unsigned int v:1;	/* Valid bit */
+	} fields;
+} apm0_cfg_t;
+
+#define APM0_CFG_MASK 0xffff8000	/* AND to clear all non-reserved fields */
+
+/* APM0_SR - APM Status Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd:17;
+		unsigned int cdet:1;	/* Clock Detect */
+		unsigned int en:1;	/* APM Enable Indicator */
+		unsigned int rset:1;	/* Processor Reset by APM? */
+		unsigned int pfr:1;	/* Power Fail Reset? */
+		unsigned int rsrt:1;	/* Restart Successful? */
+		unsigned int sdwn:1;	/* Shutdown Complete */
+		unsigned int errc:8;	/* Error Code */
+		unsigned int v:1;	/* Valid Bit */
+	} fields;
+} apm0_sr_t;
+
+#define APM0_SR_MASK 0xffff8000	/* AND to clear all non-reserved fields */
+
+/* APM0_IER -- APM Interrupt Enable Register
+   APM0_IPR -- APM Interrupt Polarity Register
+   APM0_ISR -- APM Interrupt Status Register
+   APM0_ITR -- APM Interrupt Trigger Register 
+
+   The interrupts are also accessed via standard interrupt numbers:
+
+   59 : Wake-up Input 0
+   60 : Wake-up Input 1
+   61 : Wake-up Input 2
+   62 : Real-Time Clock Interrupt
+*/
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd:27;
+		unsigned int wi0e:1;
+		unsigned int wi1e:1;
+		unsigned int wi2e:1;
+		unsigned int cie:1;
+		unsigned int v:1;
+	} fields;
+} apm0_ier_t;
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd:27;
+		unsigned int wi0p:1;
+		unsigned int wi1p:1;
+		unsigned int wi2p:1;
+		unsigned int cip:1;
+		unsigned int v:1;
+	} fields;
+} apm0_ipr_t;
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd:27;
+		unsigned int wi0s:1;
+		unsigned int wi1s:1;
+		unsigned int wi2s:1;
+		unsigned int cis:1;
+		unsigned int v:1;
+	} fields;
+} apm0_isr_t;
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd:27;
+		unsigned int wi0t:1;
+		unsigned int wi1t:1;
+		unsigned int wi2t:1;
+		unsigned int cit:1;
+		unsigned int v:1;
+	} fields;
+} apm0_itr_t;
+
+#define APM0_IER_MASK 0xffffffe0	/* AND to clear all non-reserved fields */
+#define APM0_IPR_MASK 0xffffffe0	/* AND to clear all non-reserved fields */
+#define APM0_ISR_MASK 0xffffffe0	/* AND to clear all non-reserved fields */
+#define APM0_ITR_MASK 0xffffffe0	/* AND to clear all non-reserved fields */
+
+/* CPC0_PLLMR - PLL Mode Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int pmul:5;	/* PLL Multiplier */
+		unsigned int pdiv:5;	/* PLL Divider */
+		unsigned int tun:10;	/* PLL Tuning Control */
+		unsigned int db2:1;	/* Divide VCO by 2 Select */
+		unsigned int csel:2;	/* PLL Clock Output Select */
+		unsigned int rsvd:8;	/* Reserved */
+		unsigned int v:1;	/* Valid bit */
+	} fields;
+} cpc0_pllmr_t;
+
+#define CPC0_PLLMR_MASK 0x000001fe	/* AND to clear all non-reserved fields */
+#define CPC0_PLLMR_RTVFS_MASK CPC0_PLLMR_MASK	/* All bits controlled by RTVFS */
+
+/* The PLL multiplier/divider are always multiples of 4. */
+
+#define CPC0_PLLMR_MULDIV_ENCODE(n) ((((unsigned)(n)) / 4) - 1)
+#define CPC0_PLLMR_MULDIV_DECODE(n) (((n) + 1) * 4)
+#define CPC0_PLLMR_MULDIV_MAX 128
+
+#define CPC0_PLLMR_TUN_HIGH 0x200	/* High-band tuning */
+#define CPC0_PLLMR_TUN_LOW  0x000	/* Low-band tuning */
+
+#define CPC0_PLLMR_CSEL_REFCLK  0	/* System Reference Clock */
+#define CPC0_PLLMR_CSEL_PLLVCO  1	/* PLL VCO */
+#define CPC0_PLLMR_CSEL_RTC     2	/* RTC */
+#define CPC0_PLLMR_CSEL_EBCPLB5 3	/* EBC-PLB divisor is 5 ??? */
+
+/* CPC0_CGCR0 - Clock Generation and Control Register 0 */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int pcp:5;	/* Proc. Core/PLB Clock Divisor */
+		unsigned int pcsc:5;	/* Proc. Core/SysClkOut Divisor */
+		unsigned int pcu:5;	/* Proc. Core/UARTSerClk Clock Div. */
+		unsigned int u0cs:1;	/* UART0 Clock Select */
+		unsigned int u1cs:1;	/* UART1 Clock Select */
+		unsigned int scsel:2;	/* SysClkOut Select */
+		unsigned int rsvd:13;	/* Reserved */
+	} fields;
+} cpc0_cgcr0_t;
+
+#define CPC0_CGCR0_MASK 0x00001fff	/* AND to clear all non-reserved fields */
+#define CPC0_CGCR0_RTVFS_MASK 0x0001ffff	/* AND to clear all rtvfs-modified
+						   fields */
+
+#define CPC0_CGCR0_SCSEL_OFF  0	/* SysClkOut driven low (low power) */
+#define CPC0_CGCR0_SCSEL_CPU  1	/* Select CPU clock as SysClkOut */
+#define CPC0_CGCR0_SCSEL_PLB  2	/* SysClkOut is PLB Sample Cycle */
+#define CPC0_CGCR0_SCSEL_OPB  3	/* SysClkOut is OPB Sample Cycle */
+
+/* CPC0_CGCR1 - Clock Generation and Control Register 1 */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int po:5;	/* PLB/OPB Clock Divisor */
+		unsigned int pext:5;	/* PLB/External Clock Divisor */
+		unsigned int ppxl:5;	/* PLB/LCD Pixel Clock Divisor */
+		unsigned int csel:2;	/* PerClk Select */
+		unsigned int rsvd:15;	/* Reserved */
+	} fields;
+} cpc0_cgcr1_t;
+
+#define CPC0_CGCR1_MASK 0x00007fff	/* AND to clear all non-reserved fields */
+#define CPC0_CGCR1_RTVFS_MASK 0x0001ffff	/* AND to clear all rtvfs-modified
+						   fields */
+
+/* 5-bit clock dividers are directly encoded, except that an encoding of 0
+   indicates divide-by-32. */
+
+#define CPC0_DIV_MAX      32
+#define CPC0_DIV_VALID(n) (((n) > 0) && ((n) <= CPC0_DIV_MAX))
+#define CPC0_DIV_ENCODE(n) (((unsigned)(n) >= CPC0_DIV_MAX) ? 0 : (unsigned)(n))
+#define CPC0_DIV_DECODE(n) (((n) == 0) ? CPC0_DIV_MAX : (n))
+
+#define CPC0_CGCR1_CSEL_OFF    0	/* PerClk driven low (low power) */
+#define CPC0_CGCR1_CSEL_PERCLK 1	/* Select PerClk */
+#define CPC0_CGCR1_CSEL_PLBCLK 2	/* Select PLB clock */
+#define CPC0_CGCR1_CSEL_OPBCLK 3	/* Select OPB clock */
+
+/* CPC0_CR0 - Chip Control Register 0 */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd0:7;	/* Reserved */
+		unsigned int ssr:1;	/* SDRAM Self-Refresh on Sleep Req. */
+		unsigned int gpms:2;	/* GPIO Pin Muxing Select */
+		unsigned int u0pms:2;	/* UART0 Pin Muxing Select */
+		unsigned int u1pms:2;	/* UART1 Pin Muxing Select */
+		unsigned int ipms:2;	/* IIC Pin Muxing Select */
+		unsigned int cpms:2;	/* CSI Pin Muxing Select */
+		unsigned int tpms:2;	/* TPC Pin Muxing Select */
+		unsigned int irpms:2;	/* IRQ Pin Muxing Select */
+		unsigned int pcmd:1;	/* PCMCIA Mode Disable */
+		unsigned int u0dte:1;	/* UART0 DMA Transmit Channel Enable */
+		unsigned int u0rde:1;	/* UART0 DMA Receive Channel Enable */
+		unsigned int u0dce:1;	/* UART0 DMA CLear on Enable */
+		unsigned int rsvd1:6;	/* Reserved */
+	} fields;
+} cpc0_cr0_t;
+
+#define CPC0_CR0_MASK 0xfe00003f	/* AND to clear all non-reserved fields */
+
+/* CPC0_CR1 - Chip Control Register 1 */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd0:28;	/* Reserved */
+		unsigned int tbsed:1;	/* TB. Src. in Edge Detect Mode */
+		unsigned int edmd:1;	/* TB. Src. Edge Detect Mode Disable */
+		unsigned int rsvd1:2;	/* Reserved */
+	} fields;
+} cpc0_cr1_t;
+
+#define CPC0_CR1_MASK 0xfffffff3	/* AND to clear all non-reserved fields */
+
+/* DCP0_CFG - DCP Configuration Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd0:18;
+		unsigned int sldy:10;	/* Sleep Delay */
+		unsigned int slen:1;	/* Sleep Enable */
+		unsigned int cdb:1;	/* Clear Decompression Buffer */
+		unsigned int rsvd1:1;
+		unsigned int ikb:1;	/* Enable Decompression */
+	} fields;
+} dcp0_cfg_t;
+
+#define DCP0_CFG_MASK 0xffffc002	/* AND to clear all non-reserved fields */
+
+/* DMA0_SLP - DMA Sleep Mode Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned idu:5;	/* Idle Timer Upper */
+		unsigned rsvd0:5;
+		unsigned sme:1;	/* Sleep Mode Enable */
+		unsigned rsvd1:21;
+	} fields;
+} dma0_slp_t;
+
+#define DMA0_SLP_MASK 0x07dfffff	/* AND to clear all non-reserved fields */
+
+/* EBC0_BnAP - EBC Bank Access Parameters */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned bme:1;	/* Burst Mode Enable */
+		unsigned twt:8;	/* Transfer Wait (non-burst) */
+		unsigned rsvd0:3;
+		unsigned csn:2;	/* Chip Select On Timing */
+		unsigned oen:2;	/* Output Enable On Timing */
+		unsigned wbn:2;	/* Write Byte Enable On Timing */
+		unsigned wbf:2;	/* Write Byte Enable Off Timing */
+		unsigned th:3;	/* Transfer Hold */
+		unsigned re:1;	/* Ready Enable */
+		unsigned sor:1;	/* Sample On Ready */
+		unsigned bem:1;	/* Byte Enable Mode */
+		unsigned pen:1;	/* Parity Enable */
+		unsigned rsvd1:5;
+	} fields;
+} ebc0_bnap_t;
+
+#define EBC0_BnAP_MASK 0x0070001f	/* AND to clear all non-reserved fields */
+
+/* EBC0_BnCR - EBC Bank Configuration Registers */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned bas:12;	/* Base Address */
+		unsigned bs:3;	/* Bank Size */
+		unsigned bu:2;	/* Bank Usage */
+		unsigned bw:2;	/* Bank Width */
+		unsigned rsvd:13;
+	} fields;
+} ebc0_bncr_t;
+
+#define EBC0_BnCR_MASK 0x00001fff	/* AND to clear all non-reserved fields */
+
+#define EBC0_BnCR_BS_1MB   0
+#define EBC0_BnCR_BS_2MB   1
+#define EBC0_BnCR_BS_4MB   2
+#define EBC0_BnCR_BS_8MB   3
+#define EBC0_BnCR_BS_16MB  4
+#define EBC0_BnCR_BS_32MB  5
+#define EBC0_BnCR_BS_64MB  6
+#define EBC0_BnCR_BS_128MB 7
+
+#define EBC0_BnCR_BU_R  1
+#define EBC0_BnCR_BU_W  2
+#define EBC0_BnCR_BU_RW 3
+
+#define EBC0_BnCR_BW_8  0
+#define EBC0_BnCR_BW_16 1
+#define EBC0_BnCR_BW_32 2
+
+/* EBC0_CFG -EBC Configuration Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned ebtc:1;	/* External Bus Three State Control */
+		unsigned ptd:1;	/* Device-paced Time-out Disable */
+		unsigned rtc:3;	/* Ready Timeout Count */
+		unsigned rsvd0:4;
+		unsigned cstc:1;	/* Chip Select Three State Control */
+		unsigned bpf:2;	/* Burst Prefetch */
+		unsigned rsvd1:2;
+		unsigned pme:1;	/* Power Management Enable */
+		unsigned pmt:5;	/* Power Management Timer */
+		unsigned rsvd2:12;
+	} fields;
+} ebc0_cfg_t;
+
+#define EBC0_CFG_MASK 0x078c0fff	/* AND to clear all non-reserved fields */
+
+#define EBC0_CFG_RTC_16   0
+#define EBC0_CFG_RTC_32   1
+#define EBC0_CFG_RTC_64   2
+#define EBC0_CFG_RTC_128  3
+#define EBC0_CFG_RTC_256  4
+#define EBC0_CFG_RTC_512  5
+#define EBC0_CFG_RTC_1024 6
+#define EBC0_CFG_RTC_2048 7
+
+/* SDRAM0_CFG - SDRAM Controller Configuration Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int dce:1;	/* SDRAM Controller Enable */
+		unsigned int sre:1;	/* Self-Refresh Enable */
+		unsigned int pme:1;	/* Power Management Enable */
+		unsigned int rsvd0:1;
+		unsigned int regen:1;	/* Registered Memory Enable */
+		unsigned int drw:2;	/* SDRAM Width */
+		unsigned int brpf:2;	/* Burst Read Prefetch Granularity */
+		unsigned int rsvd1:1;
+		unsigned int emdulr:1;	/* Enable Memory Data Unless Read */
+		unsigned int rsvd2:21;
+	} fields;
+} sdram0_cfg_t;
+
+#define SDRAM0_CFG_MASK 0x106fffff	/* AND to clear all non-reserved fields */
+
+#define SDRAM0_CFG_BRPF_16 1
+#define SDRAM0_CFG_BRPF_32 2
+
+/* SDRAM0_PMIT - SDRAM Power Management Idle Timer */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int cnt:5;	/* Cycle Count Before Sleep Request */
+		unsigned int rsvd:27;
+	} fields;
+} sdram0_pmit_t;
+
+#define SDRAM0_PMIT_MASK 0x07ffffff	/* AND to clear all non-reserved fields */
+
+/* SDRAM0_RTR - Refresh timer register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned rsvd0:2;
+		unsigned iv:11;
+		unsigned rsvd1:19;
+	} fields;
+} sdram0_rtr_t;
+
+#define SDRAM0_RTR_MASK 0xc007ffff	/* AND to clear non-reserved fields */
+#define SDRAM0_RTR_RTVFS_MASK SDRAM0_RTR_MASK
+
+#define SDRAM0_RTR_IV(n) (((n) & 0x3ff8) >> 2)
+
+/* SDRAM0_TR - SDRAM Timing Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned int rsvd0:7;
+		unsigned int casl:2;	/* CAS Latency */
+		unsigned int rsvd1:3;
+		unsigned int pta:2;	/* Precharge-to-activate */
+		unsigned int ctp:2;	/* Read/Write to Precharge */
+		unsigned int ldf:2;	/* Command Leadoff */
+		unsigned int rsvd2:9;
+		unsigned int rfta:3;	/* Refresh-to-Activate */
+		unsigned int rcd:2;	/* RAS-CAS Delay */
+	} fields;
+} sdram0_tr_t;
+
+#define SDRAM0_TR_MASK 0xfe703fe0	/* AND to clear non-reserved fields */
+#define SDRAM0_TR_RTVFS_MASK SDRAM0_TR_MASK
+
+#define SDRAM0_TR_ENCODE(n) ((n) - 1)
+#define SDRAM0_TR_ENCODE_RFTA(n) ((n) - 4)
+
+/* SLA0_SLPMD - SLA Sleep Mode Control Register */
+
+typedef union {
+	u32 reg;
+	struct {
+		unsigned slcr:5;	/* Sleep Counter */
+		unsigned rsvd0:5;
+		unsigned slen:1;	/* Sleep Mode Enable */
+		unsigned rsvd1:21;
+	} fields;
+} sla0_slpmd_t;
+
+#define SLA0_SLPMD_MASK 0x07dfffff	/* AND to clear all non-reserved fields */
+
+/* Several direct-write DCRs on the 405LP have an interlock requirement,
+   implemented by a "valid" bit in the low-order bit.  This routine handles the
+   handshaking for these registers, by
+
+   1) Rewriting the current value with the valid bit clear;
+   2) Rewriting the new value with the valid bit clear;
+   3) Rewriting the new value with the valid bit set.
+
+   The mask is a mask with 1s in every reserved bit position.
+
+   NB: This routine always writes the register with the valid bit set,
+       regardless of the valid bit setting in the 'new' parameter.  
+
+   Unfortunately this must be a macro to work (due to mtdcr()).
+
+   Note that for APM registers, it takes multiple RTC clock cycles for the DCR
+   writes to take effect.  Any time delays after writes to APM are the
+   resonsibility of the caller.
+*/
+
+#define mtdcr_interlock(dcrn, new, mask)                                    \
+do {                                                                        \
+	u32 __old, __new;                                                   \
+	                                                                    \
+	__old = mfdcr(dcrn);                                                \
+	mtdcr(dcrn, __old & 0xfffffffe);                                    \
+	__new = ((__old & (mask)) | ((new) & ~(mask))) & 0xfffffffe;        \
+	mtdcr(dcrn, __new);                                                 \
+	mtdcr(dcrn, __new | 1);                                             \
+} while (0)
+
+/****************************************************************************
+ * Power Managament Routines
+ ****************************************************************************/
+
+int ibm405lp_set_pixclk(unsigned pixclk_min, unsigned pixclk_max);
+
+void ibm405lp_reset_sdram(u32 new_rtr, u32 new_tr);
+
+extern int (*set_pixclk_hook) (unsigned pixclk_min, unsigned pixclk_max);
+extern unsigned last_pixclk_min;
+extern unsigned last_pixclk_max;
+
+#endif				/* __ASSEMBLY__ */
+
+#include <asm/ibm405.h>
+
+#endif				/* __ASM_IBM405LP_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/ibm_ocp.h b/arch/ppc/platforms/4xx/ibm_ocp.h
--- a/arch/ppc/platforms/4xx/ibm_ocp.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,192 +0,0 @@
-/*
- * ibm_ocp.h
- *
- *	This was dirived from the ppc4xx.h and all 405GP specific definition and board
- *	inclusions where moved here.
- *
- * 	Current Maintainer
- *      Armin Kuster akuster@mvista.com
- *      Nov, 2001
- *
- *
- * Copyright 2001 MontaVista Softare 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.
- *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  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.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *	Version 1.0 (01/11/26) - A. Kuster
- *	Initial version	 -
- */
-
-#ifdef __KERNEL__
-#ifndef __ASM_IBM_OCP_H__
-#define __ASM_IBM_OCP_H__
-
-#ifndef __ASSEMBLY__
-#include <linux/types.h>
-
- /* PCI 32 */
-
-struct pmm_regs {
-	u32 la;
-	u32 ma;
-	u32 pcila;
-	u32 pciha;
-};
-
-typedef struct pcil0_regs {
-	struct pmm_regs pmm[3];
-	u32 ptm1ms;
-	u32 ptm1la;
-	u32 ptm2ms;
-	u32 ptm2la;
-} pci0_t;
-
-/* Serial Ports */
-
-#define thr rbr
-#define iir fcr
-#define dll rbr
-#define dlm ier
-
-typedef struct NS16550 {
-	u8 rbr;			/* 0 */
-	u8 ier;			/* 1 */
-	u8 fcr;			/* 2 */
-	u8 lcr;			/* 3 */
-	u8 mcr;			/* 4 */
-	u8 lsr;			/* 5 */
-	u8 msr;			/* 6 */
-	u8 scr;			/* 7 */
-} uart_t;
-
-/* I2c */
-typedef struct iic_regs {
-	u16 mdbuf;
-	u16 sbbuf;
-	u8 lmadr;
-	u8 hmadr;
-	u8 cntl;
-	u8 mdcntl;
-	u8 sts;
-	u8 extsts;
-	u8 lsadr;
-	u8 hsadr;
-	u8 clkdiv;
-	u8 intmsk;
-	u8 xfrcnt;
-	u8 xtcntlss;
-	u8 directcntl;
-} iic_t;
-
-/* OPB arbiter */
-typedef struct opb {
-	u8 pr;
-	u8 cr;
-} opb_t;
-
-/* General purpose i/o */
-
-typedef struct gpio_regs {
-	u32 or;
-	u32 tcr;
-	u32 pad[4];
-	u32 odr;
-	u32 ir;
-} gpio_t;
-
-/* Emac */
-typedef struct emac_regs {
-	volatile u32 em0mr0;
-	volatile u32 em0mr1;
-	volatile u32 em0tmr0;
-	volatile u32 em0tmr1;
-	volatile u32 em0rmr;
-	volatile u32 em0isr;
-	volatile u32 em0iser;
-	volatile u32 em0iahr;
-	volatile u32 em0ialr;
-	volatile u32 em0vtpid;
-	volatile u32 em0vtci;
-	volatile u32 em0ptr;
-	volatile u32 em0iaht1;
-	volatile u32 em0iaht2;
-	volatile u32 em0iaht3;
-	volatile u32 em0iaht4;
-	volatile u32 em0gaht1;
-	volatile u32 em0gaht2;
-	volatile u32 em0gaht3;
-	volatile u32 em0gaht4;
-	volatile u32 em0lsal;
-	volatile u32 em0lsah;
-	volatile u32 em0ipgvr;
-	volatile u32 em0stacr;
-	volatile u32 em0trtr;
-	volatile u32 em0rwmr;
-} emac_t;
-
-/* ZMII bridge */
-typedef struct zmii_regs {
-	u32 fer;		/* Function enable reg */
-	u32 ssr;		/* Spedd select reg */
-	u32 smiirs;		/* SMII status reg */
-} zmii_t;
-
-/* Structure of the memory mapped IDE control.
-*/
-typedef struct ide_regs {
-	unsigned int si_stat;	/* IDE status */
-	unsigned int si_intenable;	/* IDE interrupt enable */
-	unsigned int si_control;	/* IDE control */
-	unsigned int pad0[0x3d];
-	unsigned int si_c0rt;	/* Chan 0 Register transfer timing */
-	unsigned int si_c0fpt;	/* Chan 0 Fast PIO transfer timing */
-	unsigned int si_c0timo;	/* Chan 0 timeout */
-	unsigned int pad1[2];
-	unsigned int si_c0d0u;	/* Chan 0 UDMA transfer timing */
-#define si_c0d0m si_c0d0u	/* Chan 0 Multiword DMA timing */
-	unsigned int pad2;
-	unsigned int si_c0d1u;	/* Chan 0 dev 1 UDMA timing */
-#define si_c0d1m si_c0d1u	/* Chan 0 dev 1 Multiword DMA timing */
-	unsigned int si_c0c;	/* Chan 0 Control */
-	unsigned int si_c0s0;	/* Chan 0 Status 0 */
-	unsigned int si_c0ie;	/* Chan 0 Interrupt Enable */
-	unsigned int si_c0s1;	/* Chan 0 Status 0 */
-	unsigned int pad4[4];
-	unsigned int si_c0dcm;	/* Chan 0 DMA Command */
-	unsigned int si_c0tb;	/* Chan 0 PRD Table base address */
-	unsigned int si_c0dct;	/* Chan 0 DMA Count */
-	unsigned int si_c0da;	/* Chan 0 DMA Address */
-	unsigned int si_c0sr;	/* Chan 0 Slew Rate Output Control */
-	unsigned char pad5[0xa2];
-	unsigned short si_c0adc;	/* Chan 0 Alt status/control */
-	unsigned char si_c0d;	/* Chan 0 data */
-	unsigned char si_c0ef;	/* Chan 0 error/features */
-	unsigned char si_c0sct;	/* Chan 0 sector count */
-	unsigned char si_c0sn;	/* Chan 0 sector number */
-	unsigned char si_c0cl;	/* Chan 0 cylinder low */
-	unsigned char si_c0ch;	/* Chan 0 cylinder high */
-	unsigned char si_c0dh;	/* Chan 0 device/head */
-	unsigned char si_c0scm;	/* Chan 0 status/command */
-} ide_t;
-
-#endif				/* __ASSEMBLY__ */
-#endif				/* __ASM_IBM_OCP_H__ */
-#endif				/* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/ibmnp405h.c b/arch/ppc/platforms/4xx/ibmnp405h.c
--- a/arch/ppc/platforms/4xx/ibmnp405h.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/4xx/ibmnp405h.c	Wed Jan  8 20:04:45 2003
@@ -28,51 +28,28 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *      History: 01/02/2002 - armin
- *		initial release
- *
  */
 
 #include <linux/config.h>
 #include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/threads.h>
-#include <linux/param.h>
-#include <linux/string.h>
+#include <asm/ocp.h>
 #include <platforms/4xx/ibmnp405h.h>
 
-const struct NS16550* COM_PORTS[] =
-{
-  (struct NS16550*) UART0_IO_BASE,
-  (struct NS16550*) UART1_IO_BASE,
-};
 
-const struct pcil0_regs* PCIL0[]=
-{
-	(struct pcil0_regs*)	PCIL0_BASE,
-};
-
-
-const struct iic_regs* IIC_ADDR[]=
-{
-	(struct iic_regs*) IIC0_BASE,
-};
-
-
-const struct gpio_regs* GPIO_ADDR[] =
-{
-	(struct gpio_regs*)	GPIO0_BASE,
-};
-
-const struct emac_regs* EMAC_ADDR[]=
-{
-	(struct emac_regs*) EMAC0_BASE,
-	(struct emac_regs*) EMAC1_BASE,
-	(struct emac_regs*) EMAC2_BASE,
-	(struct emac_regs*) EMAC3_BASE
-};
-
-const struct zmii_regs* ZMII_ADDR[]=
-{
-	(zmii_t*)	ZMII0_BASE,
+struct ocp_def core_ocp[] = {
+//	{OCP_VENDOR_IBM, OCP_FUNC_PLB, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_OPB, OPB_BASE_START, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART0_IO_BASE, UART0_INT,IBM_CPM_UART0},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART1_IO_BASE, UART1_INT, IBM_CPM_UART1},
+	{OCP_VENDOR_IBM, OCP_FUNC_IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{OCP_VENDOR_IBM, OCP_FUNC_GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{OCP_VENDOR_IBM, OCP_FUNC_EMAC, EMAC0_BASE, BL_MAC_ETH0, IBM_CPM_EMAC0},
+	{OCP_VENDOR_IBM, OCP_FUNC_EMAC, EMAC0_BASE, BL_MAC_ETH0, IBM_CPM_EMAC0},
+	{OCP_VENDOR_IBM, OCP_FUNC_EMAC, EMAC1_BASE, BL_MAC_ETH1, IBM_CPM_EMAC1},
+	{OCP_VENDOR_IBM, OCP_FUNC_EMAC, EMAC2_BASE, BL_MAC_ETH2, IBM_CPM_EMAC2},
+	{OCP_VENDOR_IBM, OCP_FUNC_EMAC, EMAC3_BASE, BL_MAC_ETH3, IBM_CPM_EMAC3},
+	{OCP_VENDOR_IBM, OCP_FUNC_PHY, ZMII0_BASE, OCP_IRQ_NA, OCP_CPM_NA},
+//	{OCP_VENDOR_IBM, OCP_FUNC_EXT, EBIU_BASE_START, OCP_IRQ_NA,IBM_CPM_EBC},
+//	{OCP_VENDOR_IBM, OCP_FUNC_PCI, PCIL0_BASE, OCP_IRQ_NA, IBM_CPM_PCI},
+	{OCP_VENDOR_INVALID, OCP_FUNC_INVALID, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
 };
diff -Nru a/arch/ppc/platforms/4xx/ibmnp405h.h b/arch/ppc/platforms/4xx/ibmnp405h.h
--- a/arch/ppc/platforms/4xx/ibmnp405h.h	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/ibmnp405h.h	Wed Jan  8 20:04:44 2003
@@ -30,11 +30,6 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *	Version 1.0 (02/01/03) - A. Kuster
- *	Initial version
- *
- *	Version 1.1 02/01/17 - A. Kuster
- *	moved common ofsets to ibm405.h
  */
 
 #ifdef __KERNEL__
@@ -42,7 +37,7 @@
 #define __ASM_IBMNP405H_H__
 
 #include <linux/config.h>
-#include <platforms/4xx/ibm_ocp.h>
+#include <asm/ibm_ocp.h>
 
 /* ibm405.h at bottom of this file */
 
@@ -70,6 +65,9 @@
 #define PPC4xx_ONB_IO_ADDR	((uint)0xef600000)
 #define PPC4xx_ONB_IO_SIZE	((uint)4*1024)
 
+#define OPB_BASE_START	0x40000000
+#define EBIU_BASE_START	0xF0100000
+
 /* serial port defines */
 #define RS_TABLE_SIZE	4
 
@@ -83,28 +81,40 @@
 #define GPIO0_BASE	0xEF600700
 #define EMAC0_BASE	0xEF600800
 #define EMAC1_BASE	0xEF600900
-#define EMAC2_BASE	0xEF600900
-#define EMAC3_BASE	0xEF600900
+#define EMAC2_BASE	0xEF600a00
+#define EMAC3_BASE	0xEF600b00
 #define ZMII0_BASE	0xEF600C10
+#define BL_MAC_WOL	41 	/* WOL */
+#define BL_MAL_SERR	45	/* MAL SERR */
+#define BL_MAL_TXDE	46	/* MAL TXDE */
+#define BL_MAL_RXDE	47	/* MAL RXDE */
+#define BL_MAL_TXEOB	17	/* MAL TX EOB */
+#define BL_MAL_RXEOB	18	/* MAL RX EOB */
+#define BL_MAC_ETH0	37	/* MAC */
+#define BL_MAC_ETH1	38	/* MAC */
+#define BL_MAC_ETH2	39	/* MAC */
+#define BL_MAC_ETH3	40	/* MAC */
 
 #define EMAC_NUMS	4
-#define UART_NUMS	2
-#define ZMII_NUMS	1
+#define IIC0_IRQ	2
+
 #define BD_EMAC_ADDR(e,i) bi_enetaddr[e][i]
 
 #define STD_UART_OP(num)					\
 	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
 		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
-		iomem_base: UART##num##_IO_BASE,		\
+		iomem_base:(u8 *) UART##num##_IO_BASE,		\
 		io_type: SERIAL_IO_MEM},
 
 #if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_DEBUG_IO_BASE	UART0_IO_BASE
 #define SERIAL_PORT_DFNS        \
         STD_UART_OP(0)          \
         STD_UART_OP(1)
 #endif
 
 #if defined(CONFIG_UART0_TTYS1)
+#define SERIAL_DEBUG_IO_BASE	UART0_IO_BASE
 #define SERIAL_PORT_DFNS        \
         STD_UART_OP(1)          \
         STD_UART_OP(0)
@@ -113,28 +123,42 @@
 /* DCR defines */
 /* ------------------------------------------------------------------------- */
 
-#define DCRN_CHCR_BASE	0x0B1
+#define DCRN_CHCR_BASE	0x0F1
 #define DCRN_CHPSR_BASE	0x0B4
-#define DCRN_CPMSR_BASE	0x0B8
-#define DCRN_CPMFR_BASE	0x0BA
-
-#define CPM_IIC0	0x80000000	/* IIC interface */
-#define CPM_PCI		0x40000000	/* PCI bridge */
-#define CPM_CPU		0x20000000	/* processor core */
-#define CPM_DMA		0x10000000	/* DMA controller */
-#define CPM_BRG		0x08000000	/* PLB to OPB bridge */
-#define CPM_DCP		0x04000000	/* CodePack */
-#define CPM_EBC		0x02000000	/* ROM/SRAM peripheral controller */
-#define CPM_SDRAM0	0x01000000	/* SDRAM memory controller */
-#define CPM_PLB		0x00800000	/* PLB bus arbiter */
-#define CPM_GPIO0	0x00400000	/* General Purpose IO (??) */
-#define CPM_UART0	0x00200000	/* serial port 0 */
-#define CPM_UART1	0x00100000	/* serial port 1 */
-#define CPM_UIC	=	0x00080000	/* Universal Interrupt Controller */
-#define CPM_TMRCLK	0x00040000	/* CPU timers */
-#define CPM_EMAC_MM	0x00020000	/* on-chip ethernet MM unit */
-#define CPM_EMAC_RM	0x00010000	/* on-chip ethernet RM unit */
-#define CPM_EMAC_TM	0x00008000	/* on-chip ethernet TM unit */
+#define DCRN_CPMSR_BASE	0x0BA
+#define DCRN_CPMFR_BASE	0x0B9
+#define DCRN_CPMER_BASE	0x0B8
+
+/* CPM Clocking & Power Mangement defines */
+#define IBM_CPM_PCI		0x40000000	/* PCI */
+#define IBM_CPM_EMAC2	0x20000000	/* EMAC 2 MII */
+#define IBM_CPM_EMAC3	0x04000000	/* EMAC 3 MII */
+#define IBM_CPM_EMAC0	0x00800000	/* EMAC 0 MII */
+#define IBM_CPM_EMAC1	0x00100000	/* EMAC 1 MII */
+#define IBM_CPM_EMMII	0	/* Shift value for MII */
+#define IBM_CPM_EMRX	1	/* Shift value for recv */
+#define IBM_CPM_EMTX	2	/* Shift value for MAC */
+#define IBM_CPM_UIC1	0x00020000	/* Universal Interrupt Controller */
+#define IBM_CPM_UIC0	0x00010000	/* Universal Interrupt Controller */
+#define IBM_CPM_CPU	0x00008000	/* processor core */
+#define IBM_CPM_EBC	0x00004000	/* ROM/SRAM peripheral controller */
+#define IBM_CPM_SDRAM0	0x00002000	/* SDRAM memory controller */
+#define IBM_CPM_GPIO0	0x00001000	/* General Purpose IO (??) */
+#define IBM_CPM_HDLC	0x00000800	/* HDCL */
+#define IBM_CPM_TMRCLK	0x00000400	/* CPU timers */
+#define IBM_CPM_PLB	0x00000100	/* PLB bus arbiter */
+#define IBM_CPM_OPB	0x00000080	/* PLB to OPB bridge */
+#define IBM_CPM_DMA	0x00000040	/* DMA controller */
+#define IBM_CPM_IIC0	0x00000010	/* IIC interface */
+#define IBM_CPM_UART0	0x00000002	/* serial port 0 */
+#define IBM_CPM_UART1	0x00000001	/* serial port 1 */
+/* this is the default setting for devices put to sleep when booting */
+
+#define DFLT_IBM4xx_PM	~(IBM_CPM_UIC0 | IBM_CPM_UIC1 | IBM_CPM_CPU 	\
+			| IBM_CPM_EBC | IBM_CPM_SDRAM0 | IBM_CPM_PLB 	\
+			| IBM_CPM_OPB | IBM_CPM_TMRCLK | IBM_CPM_DMA	\
+			| IBM_CPM_EMAC0 | IBM_CPM_EMAC1 | IBM_CPM_EMAC2	\
+			| IBM_CPM_EMAC3 | IBM_CPM_PCI)
 
 #define DCRN_DMA0_BASE	0x100
 #define DCRN_DMA1_BASE	0x108
@@ -151,20 +175,29 @@
 #define DCRN_POB0_BASE	0x0A0
 #define DCRN_SDRAM0_BASE 0x010
 #define DCRN_UIC0_BASE	0x0C0
+#define DCRN_UIC1_BASE	0x0D0
+#define DCRN_CPC0_EPRCSR 0x0F3
 
-/* unique H offsets */
+#define UIC0_UIC1NC      30	/* UIC1 non-critical interrupt */
+#define UIC0_UIC1CR      31	/* UIC1 critical interrupt */
 
-#ifdef DCRN_UIC1_BASE
-#define DCRN_UIC1_SR	(DCRN_UIC1_BASE + 0x0)
-#define DCRN_UIC1_SRS	(DCRN_UIC1_BASE + 0x1)
-#define DCRN_UIC1_ER	(DCRN_UIC1_BASE + 0x2)
-#define DCRN_UIC1_CR	(DCRN_UIC1_BASE + 0x3)
-#define DCRN_UIC1_PR	(DCRN_UIC1_BASE + 0x4)
-#define DCRN_UIC1_TR	(DCRN_UIC1_BASE + 0x5)
-#define DCRN_UIC1_MSR	(DCRN_UIC1_BASE + 0x6)
-#define DCRN_UIC1_VR	(DCRN_UIC1_BASE + 0x7)
-#define DCRN_UIC1_VCR	(DCRN_UIC1_BASE + 0x8)
-#endif
+#define CHR1_CETE	0x00000004	/* CPU external timer enable */
+#define UIC0	DCRN_UIC0_BASE
+#define UIC1	DCRN_UIC1_BASE
+
+#undef NR_UICS
+#define NR_UICS	2
+#define UIC_CASCADE_MASK 0x0003	/* bits 30 & 31 */
+
+/* EMAC DCRN's FIXME: armin */
+#define DCRN_MALRXCTP2R(base)	((base) + 0x42)	/* Channel Rx 2 Channel Table Pointer */
+#define DCRN_MALRXCTP3R(base)	((base) + 0x43)	/* Channel Rx 3 Channel Table Pointer */
+#define DCRN_MALTXCTP4R(base)	((base) + 0x24)	/* Channel Tx 4 Channel Table Pointer */
+#define DCRN_MALTXCTP5R(base)	((base) + 0x25)	/* Channel Tx 5 Channel Table Pointer */
+#define DCRN_MALTXCTP6R(base)	((base) + 0x26)	/* Channel Tx 6 Channel Table Pointer */
+#define DCRN_MALTXCTP7R(base)	((base) + 0x27)	/* Channel Tx 7 Channel Table Pointer */
+#define DCRN_MALRCBS2(base)	((base) + 0x62)	/* Channel Rx 2 Channel Buffer Size */
+#define DCRN_MALRCBS3(base)	((base) + 0x63)	/* Channel Rx 3 Channel Buffer Size */
 
 #include <asm/ibm405.h>
 
diff -Nru a/arch/ppc/platforms/4xx/ibmnp405l.c b/arch/ppc/platforms/4xx/ibmnp405l.c
--- a/arch/ppc/platforms/4xx/ibmnp405l.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/4xx/ibmnp405l.c	Wed Jan  8 20:04:43 2003
@@ -28,9 +28,6 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *      History: 12/26/2001 - armin
- *		initial release
- *
  */
 
 #include <linux/config.h>
@@ -41,30 +38,15 @@
 #include <linux/string.h>
 #include <platforms/4xx/ibmnp405l.h>
 
-const struct NS16550* COM_PORTS[] =
-{
-  (struct NS16550*) UART0_IO_BASE,
-  (struct NS16550*) UART1_IO_BASE,
-};
+struct ocp_def core_ocp[] = {
+	{UART, UART0_IO_BASE, UART0_INT, IBM_CPM_UART0},
+	{UART, UART1_IO_BASE, UART1_INT, IBM_CPM_UART1},
+	{IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{OPB, OPB0_BASE, OCP_IRQ_NA, IBM_CPM_OPB},
+	{EMAC, EMAC0_BASE, BL_MAC_ETH0, IBM_CPM_EMAC0},
+	{EMAC, EMAC1_BASE, BL_MAC_ETH1, IBM_CPM_EMAC1},
+	{ZMII, ZMII0_BASE, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_NULL_TYPE, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
 
-const struct iic_regs* IIC_ADDR[]=
-{
-	(struct iic_regs*) IIC0_BASE,
-};
-
-
-const struct gpio_regs* GPIO_ADDR[] =
-{
-	(struct gpio_regs*)	GPIO0_BASE,
-};
-
-const struct emac_regs* EMAC_ADDR[]=
-{
-	(struct emac_regs*) EMAC0_BASE,
-	(struct emac_regs*) EMAC1_BASE
-};
-
-const struct zmii_regs* ZMII_ADDR[]=
-{
-	(zmii_t*)	ZMII0_BASE,
 };
diff -Nru a/arch/ppc/platforms/4xx/ibmnp405l.h b/arch/ppc/platforms/4xx/ibmnp405l.h
--- a/arch/ppc/platforms/4xx/ibmnp405l.h	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/4xx/ibmnp405l.h	Wed Jan  8 20:04:43 2003
@@ -30,11 +30,6 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *	Version 1.0 (01/10/10) - A. Kuster
- *	Initial version
- *
- *	Version 1.1 (02/01/16) - A. Kuster
- *	Cleaned out common 405B3 core stuff
  */
 
 #ifdef __KERNEL__
@@ -42,18 +37,6 @@
 #define __ASM_IBMNP405L_H__
 
 #include <linux/config.h>
-#include <platforms/4xx/ibm_ocp.h>
-
-/* ibm405.h at bottom of this file */
-
-#define PPC4xx_PCI_IO_ADDR	((uint)PPC405_PCI_PHY_IO_BASE)
-#define PPC4xx_PCI_IO_SIZE	((uint)64*1024)
-#define PPC4xx_PCI_CFG_ADDR	((uint)PPC405_PCI_CONFIG_ADDR)
-#define PPC4xx_PCI_CFG_SIZE	((uint)4*1024)
-#define PPC4xx_PCI_LCFG_ADDR	((uint)0xef400000)
-#define PPC4xx_PCI_LCFG_SIZE	((uint)4*1024)
-#define PPC4xx_ONB_IO_ADDR	((uint)0xef600000)
-#define PPC4xx_ONB_IO_SIZE	((uint)4*1024)
 
 /* serial port defines */
 #define RS_TABLE_SIZE	2
@@ -61,33 +44,48 @@
 #define UART0_INT	0
 #define UART1_INT	1
 
-#define UART0_IO_BASE	(u8 *)0xEF600300
-#define UART1_IO_BASE	(u8 *)0xEF600400
+#define UART0_IO_BASE	0xEF600300
+#define UART1_IO_BASE	0xEF600400
 #define IIC0_BASE	0xEF600500
 #define OPB0_BASE	0xEF600600
 #define GPIO0_BASE	0xEF600700
 #define EMAC0_BASE	0xEF600800
 #define EMAC1_BASE	0xEF600900
 #define ZMII0_BASE	0xEF600C10
+#define BL_MAC_WOL	41	/* WOL */
+#define BL_MAL_SERR	45	/* MAL SERR */
+#define BL_MAL_TXDE	46	/* MAL TXDE */
+#define BL_MAL_RXDE	47	/* MAL RXDE */
+#define BL_MAL_TXEOB	17	/* MAL TX EOB */
+#define BL_MAL_RXEOB	18	/* MAL RX EOB */
+#define BL_MAC_ETH0	37	/* MAC */
+#define BL_MAC_ETH1	38	/* MAC */
 
 #define EMAC_NUMS	2
-#define UART_NUMS	2
-#define ZMII_NUMS	1
+
+#define IIC0_IRQ	2
+
+#undef NR_UICS
+#define NR_UICS	2
+#define UIC_CASCADE_MASK 0x0003	/* bits 30 & 31 */
+
 #define BD_EMAC_ADDR(e,i) bi_enetaddr[e][i]
 
 #define STD_UART_OP(num)					\
 	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
 		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
-		iomem_base: UART##num##_IO_BASE,		\
+		iomem_base:(u8 *) UART##num##_IO_BASE,		\
 		io_type: SERIAL_IO_MEM},
 
 #if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_DEBUG_IO_BASE	UART0_IO_BASE
 #define SERIAL_PORT_DFNS        \
         STD_UART_OP(0)          \
         STD_UART_OP(1)
 #endif
 
 #if defined(CONFIG_UART0_TTYS1)
+#define SERIAL_DEBUG_IO_BASE	UART1_IO_BASE
 #define SERIAL_PORT_DFNS        \
         STD_UART_OP(1)          \
         STD_UART_OP(0)
@@ -96,28 +94,32 @@
 /* DCR defines */
 /* ------------------------------------------------------------------------- */
 
-#define DCRN_CHCR_BASE	0x0B1
+#define DCRN_CHCR_BASE	0x0F1
 #define DCRN_CHPSR_BASE	0x0B4
-#define DCRN_CPMSR_BASE	0x0B8
-#define DCRN_CPMFR_BASE	0x0BA
-
-#define CPM_IIC0	0x80000000	/* IIC interface */
-#define CPM_PCI		0x40000000	/* PCI bridge */
-#define CPM_CPU		0x20000000	/* processor core */
-#define CPM_DMA		0x10000000	/* DMA controller */
-#define CPM_BRG		0x08000000	/* PLB to OPB bridge */
-#define CPM_DCP		0x04000000	/* CodePack */
-#define CPM_EBC		0x02000000	/* ROM/SRAM peripheral controller */
-#define CPM_SDRAM0	0x01000000	/* SDRAM memory controller */
-#define CPM_PLB		0x00800000	/* PLB bus arbiter */
-#define CPM_GPIO0	0x00400000	/* General Purpose IO (??) */
-#define CPM_UART0	0x00200000	/* serial port 0 */
-#define CPM_UART1	0x00100000	/* serial port 1 */
-#define CPM_UIC		0x00080000	/* Universal Interrupt Controller */
-#define CPM_TMRCLK	0x00040000	/* CPU timers */
-#define CPM_EMAC_MM	0x00020000	/* on-chip ethernet MM unit */
-#define CPM_EMAC_RM	0x00010000	/* on-chip ethernet RM unit */
-#define CPM_EMAC_TM	0x00008000	/* on-chip ethernet TM unit */
+#define DCRN_CPMSR_BASE	0x0BA
+#define DCRN_CPMFR_BASE	0x0B9
+#define DCRN_CPMER_BASE	0x0B8
+
+#define IBM_CPM_EMAC0	0x00800000	/* on-chip ethernet MM unit */
+#define IBM_CPM_EMAC1	0x00100000	/* EMAC 1 MII */
+#define IBM_CPM_UIC1	0x00020000	/* Universal Interrupt Controller */
+#define IBM_CPM_UIC0	0x00010000	/* Universal Interrupt Controller */
+#define IBM_CPM_CPU	0x00008000	/* processor core */
+#define IBM_CPM_EBC	0x00004000	/* ROM/SRAM peripheral controller */
+#define IBM_CPM_SDRAM0	0x00002000	/* SDRAM memory controller */
+#define IBM_CPM_GPIO0	0x00001000	/* General Purpose IO (??) */
+#define IBM_CPM_HDLC	0x00000800	/* HDCL */
+#define IBM_CPM_TMRCLK	0x00000400	/* CPU timers */
+#define IBM_CPM_PLB	0x00000100	/* PLB bus arbiter */
+#define IBM_CPM_OPB	0x00000080	/* PLB to OPB bridge */
+#define IBM_CPM_DMA	0x00000040	/* DMA controller */
+#define IBM_CPM_IIC0	0x00000010	/* IIC interface */
+#define IBM_CPM_UART0	0x00000002	/* serial port 0 */
+#define IBM_CPM_UART1	0x00000001	/* serial port 1 */
+#define DFLT_IBM4xx_PM	~(IBM_CPM_UIC0 | IBM_CPM_UIC1 | IBM_CPM_CPU	\
+			| IBM_CPM_EBC | IBM_CPM_SDRAM0 | IBM_CPM_PLB	\
+			| IBM_CPM_OPB | IBM_CPM_TMRCLK | IBM_CPM_DMA	\
+			| IBM_CPM_EMAC0 | IBM_CPM_EMAC1)
 
 #define DCRN_DMA0_BASE	0x100
 #define DCRN_DMA1_BASE	0x108
@@ -128,28 +130,26 @@
 #define DCRN_EBC_BASE	0x012
 #define DCRN_DCP0_BASE	0x014
 #define DCRN_MAL_BASE	0x180
+#define DCRN_MAL1_BASE	0x200
 #define DCRN_OCM0_BASE	0x018
 #define DCRN_PLB0_BASE	0x084
-#define DCRN_PLLMR_BASE	0x0B0
+#define DCRN_PLLMR_BASE	0x0F0
 #define DCRN_POB0_BASE	0x0A0
 #define DCRN_SDRAM0_BASE 0x010
 #define DCRN_UIC0_BASE	0x0C0
-#define DCRN_UIC1_BASE	0x0C0
+#define DCRN_UIC1_BASE	0x0D0
+#define DCRN_CPC0_EPRCSR 0x0F3
 
-/* need to clean this up - armin */
-
-#ifdef DCRN_UIC1_BASE
-#define DCRN_UIC1_SR	(DCRN_UIC1_BASE + 0x0)
-#define DCRN_UIC1_SRS	(DCRN_UIC1_BASE + 0x1)
-#define DCRN_UIC1_ER	(DCRN_UIC1_BASE + 0x2)
-#define DCRN_UIC1_CR	(DCRN_UIC1_BASE + 0x3)
-#define DCRN_UIC1_PR	(DCRN_UIC1_BASE + 0x4)
-#define DCRN_UIC1_TR	(DCRN_UIC1_BASE + 0x5)
-#define DCRN_UIC1_MSR	(DCRN_UIC1_BASE + 0x6)
-#define DCRN_UIC1_VR	(DCRN_UIC1_BASE + 0x7)
-#define DCRN_UIC1_VCR	(DCRN_UIC1_BASE + 0x8)
-#endif
+#define UIC0_UIC1NC      30	/* UIC1 non-critical interrupt */
+#define UIC0_UIC1CR      31	/* UIC1 critical interrupt */
 
+#define CHR1_CETE	0x00000004	/* CPU external timer enable */
+#define UIC0	DCRN_UIC0_BASE
+#define UIC1	DCRN_UIC1_BASE
+
+#define SDRAM_CFG	0x20
+#define SDRAM0_ECCCFG	0x94
+#define SDRAM_NO_ECC	0x10000000
 #include <asm/ibm405.h>
 
 #endif				/* __ASM_IBMNP405L_H__ */
diff -Nru a/arch/ppc/platforms/4xx/ibmnp4gs.c b/arch/ppc/platforms/4xx/ibmnp4gs.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibmnp4gs.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,42 @@
+/*
+ *
+ *    Copyright 2000-2002 MontaVista Software Inc.
+ *      Completed implementation.
+ *	Current maintainer
+ *      Armin Kuster akuster@mvista.com
+ *
+ *    Module name: ibmnp4gs.c
+ *
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/init.h>
+#include "ibmnp4gs.h"
+#include <asm/ocp.h>
+
+struct ocp_def core_ocp[] = {
+	{UART, UART0_IO_BASE, UART0_INT, IBM_CPM_UART0},
+	{PCI, PCIL0_BASE, OCP_IRQ_NA, IBM_CPM_PCI},
+	{OCP_NULL_TYPE, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
+
+};
diff -Nru a/arch/ppc/platforms/4xx/ibmnp4gs.h b/arch/ppc/platforms/4xx/ibmnp4gs.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibmnp4gs.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,168 @@
+/*
+ * ibmnp405gs.h
+ *
+ *      Armin Kuster akuster@mvista.com
+ *
+ *
+ * Copyright 2002 MontaVista Softare 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.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_IBMNP4GS_H__
+#define __ASM_IBMNP4GS_H__
+
+#include <linux/config.h>
+#include <asm/ibm_ocp.h>
+
+/* ibm405.h at bottom of this file */
+
+/* PCI
+ * PCI Bridge config reg definitions
+ * see 17-19 of manual
+ */
+
+#define PPC405_PCI_CONFIG_ADDR	0xeec00000
+#define PPC405_PCI_CONFIG_DATA	0xeec00004
+
+#define PPC405_PCI_PHY_MEM_BASE	0x80000000	/* hose_a->pci_mem_offset */
+						/* setbat */
+#define PPC405_PCI_MEM_BASE	PPC405_PCI_PHY_MEM_BASE	/* setbat */
+#define PPC405_PCI_PHY_IO_BASE	0xe8000000	/* setbat */
+#define PPC405_PCI_IO_BASE	PPC405_PCI_PHY_IO_BASE	/* setbat */
+
+#define PPC405_PCI_LOWER_MEM	0x80000000	/* hose_a->mem_space.start */
+#define PPC405_PCI_UPPER_MEM	0xBfffffff	/* hose_a->mem_space.end */
+#define PPC405_PCI_LOWER_IO	0x00000000	/* hose_a->io_space.start */
+#define PPC405_PCI_UPPER_IO	0x0000ffff	/* hose_a->io_space.end */
+
+#define PPC405_ISA_IO_BASE	PPC405_PCI_IO_BASE
+
+#define PPC4xx_PCI_IO_PADDR	((uint)PPC405_PCI_PHY_IO_BASE)
+#define PPC4xx_PCI_IO_VADDR	PPC4xx_PCI_IO_PADDR
+#define PPC4xx_PCI_IO_SIZE	((uint)64*1024)
+#define PPC4xx_PCI_CFG_PADDR	((uint)PPC405_PCI_CONFIG_ADDR)
+#define PPC4xx_PCI_CFG_VADDR	PPC4xx_PCI_CFG_PADDR
+#define PPC4xx_PCI_CFG_SIZE	((uint)4*1024)
+#define PPC4xx_PCI_LCFG_PADDR	((uint)0xef400000)
+#define PPC4xx_PCI_LCFG_VADDR	PPC4xx_PCI_LCFG_PADDR
+#define PPC4xx_PCI_LCFG_SIZE	((uint)4*1024)
+#define PPC4xx_ONB_IO_PADDR	((uint)0xef600000)
+#define PPC4xx_ONB_IO_VADDR	PPC4xx_ONB_IO_PADDR
+#define PPC4xx_ONB_IO_SIZE	((uint)4*1024)
+
+#define PCI_CONFIG_ADDR_MASK		0x7F000000
+#define PCI_CONFIG_CYCLE_ENABLE		0x80000000
+#define PCI_BASE_ADDRESS_2		0x18	/* 32 bits [htype 0 only] */
+#define PCI_BASE_ADDRESS_MEM_PREFETCH	0x08
+#define PCI_CONFIG_ADDR_MASK		0x7F000000
+#define PCI_CONFIG_CYCLE_ENABLE		0x80000000
+#define PCI_BASE_ADDRESS_MEM_CARD1	0x80000000
+#define PCI_BASE_ADDRESS_MEM_CARD2	0x90000000
+#define PPC405_UART0_INT		1
+#define PPC_405RAINIER2_IO_PAGE		((void*)0xe8001000)
+#define PPC_405RAINIER1_IO_PAGE		((void*)0xe8002000)
+#define PPC405_UART0_IO_BASE		0x300	/* mostly use (rainier_io_page+0x300) */
+#define RAINIER_IO_PAGE_INTERPOSER_PADDR 0xe8000000
+#define RAINIER_IO_PAGE_INTERPOSER_VADDR RAINIER_IO_PAGE_INTERPOSER_PADDR
+#define RAINIER_IO_PAGE_PCI_PADDR	0xeec00000
+#define RAINIER_IO_PAGE_PCI_VADDR	RAINIER_IO_PAGE_PCI_PADDR
+
+/* serial port defines */
+#define RS_TABLE_SIZE	1
+
+#define UART0_INT	1
+
+#define PCIL0_BASE	0xEF400000
+#define UART0_IO_BASE	PPC_405RAINIER1_IO_PAGE + PPC405_UART0_IO_BASE
+
+#define UART_NUMS	1
+#define BD_EMAC_ADDR(e,i) bi_enetaddr[i]
+
+#define STD_UART_OP(num)					\
+	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
+		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
+		iomem_base: (u8 *)UART##num##_IO_BASE,		\
+		io_type: SERIAL_IO_MEM},
+
+#if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_PORT_DFNS	\
+	STD_UART_OP(0)
+#endif
+
+/* DCR defines */
+#define DCRN_CHCR_BASE		0x0B1
+#define DCRN_CHPSR_BASE		0x0B4
+#define DCRN_CPMSR_BASE		0x0B8
+#define DCRN_CPMFR_BASE		0x0BA
+
+#define  PSR_PLL_FWD_MASK        0xC0000000
+#define  PSR_PLL_FDBACK_MASK     0x30000000
+#define  PSR_PLL_TUNING_MASK     0x0E000000
+#define  PSR_PLB_CPU_MASK        0x01800000
+#define  PSR_OPB_PLB_MASK        0x00600000
+#define  PSR_PCI_PLB_MASK        0x00180000
+#define  PSR_EB_PLB_MASK         0x00060000
+#define  PSR_ROM_WIDTH_MASK      0x00018000
+#define  PSR_ROM_LOC             0x00004000
+#define  PSR_PCI_ASYNC_EN        0x00001000
+#define  PSR_PCI_ARBIT_EN        0x00000400
+
+#define IBM_CPM_IIC0		0x80000000	/* IIC interface */
+#define IBM_CPM_PCI		0x40000000	/* PCI bridge */
+#define IBM_CPM_CPU		0x20000000	/* processor core */
+#define IBM_CPM_DMA		0x10000000	/* DMA controller */
+#define IBM_CPM_BRG		0x08000000	/* PLB to OPB bridge */
+#define IBM_CPM_DCP		0x04000000	/* CodePack */
+#define IBM_CPM_EBC		0x02000000	/* ROM/SRAM peripheral controller */
+#define IBM_CPM_SDRAM0		0x01000000	/* SDRAM memory controller */
+#define IBM_CPM_PLB		0x00800000	/* PLB bus arbiter */
+#define IBM_CPM_GPIO0		0x00400000	/* General Purpose IO (??) */
+#define IBM_CPM_UART0		0x00200000	/* serial port 0 */
+#define IBM_CPM_UART1		0x00100000	/* serial port 1 */
+#define IBM_CPM_UIC		0x00080000	/* Universal Interrupt Controller */
+#define IBM_CPM_TMRCLK		0x00040000	/* CPU timers */
+
+#define DFLT_IBM4xx_PM		0
+
+#define DCRN_DMA0_BASE		0x100
+#define DCRN_DMA1_BASE		0x108
+#define DCRN_DMA2_BASE		0x110
+#define DCRN_DMA3_BASE		0x118
+#define DCRNCAP_DMA_SG		1	/* have DMA scatter/gather capability */
+#define DCRN_DMASR_BASE		0x120
+#define DCRN_EBC_BASE		0x012
+#define DCRN_DCP0_BASE		0x014
+#define DCRN_MAL_BASE		0x180
+#define DCRN_OCM0_BASE		0x018
+#define DCRN_PLB0_BASE		0x084
+#define DCRN_PLLMR_BASE		0x0B0
+#define DCRN_POB0_BASE		0x0A0
+#define DCRN_SDRAM0_BASE	0x010
+#define DCRN_UIC0_BASE		0x0C0
+#define UIC0 DCRN_UIC0_BASE
+
+#include <asm/ibm405.h>
+
+#endif				/* __ASM_IBMNP4GS_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/ibmstb3.c b/arch/ppc/platforms/4xx/ibmstb3.c
--- a/arch/ppc/platforms/4xx/ibmstb3.c	Wed Jan  8 20:04:31 2003
+++ b/arch/ppc/platforms/4xx/ibmstb3.c	Wed Jan  8 20:04:31 2003
@@ -28,26 +28,18 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *      History: 01/08/2002 - armin
- *		initial release
- *
  */
 
 #include <linux/config.h>
-#include <platforms/4xx/ibmstb3.h>
+#include "ibmstb3.h"
+#include <asm/ocp.h>
 
-const struct NS16550* COM_PORTS[] =
-{
-  (struct NS16550*) UART0_IO_BASE,
-};
-
-const struct iic_regs* IIC_ADDR[]=
-{
-	(struct iic_regs*) IIC0_BASE,
-};
+struct ocp_def core_ocp[] = {
+	{UART, UART0_IO_BASE, UART0_INT, IBM_CPM_UART0},
+	{IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{IIC, IIC1_BASE, IIC1_IRQ, IBM_CPM_IIC1},
+	{GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{OPB, OPB0_BASE, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_NULL_TYPE, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
 
-const struct gpio_regs* GPIO_ADDR[] =
-{
-	(struct gpio_regs*)	GPIO0_BASE,
 };
-
diff -Nru a/arch/ppc/platforms/4xx/ibmstb3.h b/arch/ppc/platforms/4xx/ibmstb3.h
--- a/arch/ppc/platforms/4xx/ibmstb3.h	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/4xx/ibmstb3.h	Wed Jan  8 20:04:45 2003
@@ -32,15 +32,6 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *	Version 1.0 Oct 10, 2001 - A. Kuster
- *	Initial version	 - moved stbx  specific out of ibm4xx.h
- *
- *	Version 1.1 Oct 25, 2001 - T. Rini
- *	Lots of cleanups, and we get included by the board-specific file.
- *
- *	Version 1.2 Jan 16, 2002 - A. Kuster
- *	Removed common dcr offests that are now in ibm405.h 
- *
  */
 
 #ifdef __KERNEL__
@@ -84,9 +75,9 @@
 #define RS_TABLE_SIZE		1
 #define UART0_INT		20
 #ifdef __BOOTER__
-#define UART0_IO_BASE		(u8 *)0x40040000
+#define UART0_IO_BASE		0x40040000
 #else
-#define UART0_IO_BASE		(u8 *)STB03xxx_MAP_IO_ADDR(0x40040000)
+#define UART0_IO_BASE		0xe0040000
 #endif
 
  /* UART 0 is duped here so when the SICC is the default console
@@ -95,9 +86,9 @@
 
 #define UART1_INT		20
 #ifdef __BOOTER__
-#define UART1_IO_BASE		(u8 *)0x40040000
+#define UART1_IO_BASE		0x40040000
 #else
-#define UART1_IO_BASE		(u8 *)STB03xxx_MAP_IO_ADDR(0x40040000)
+#define UART1_IO_BASE		0xe0040000
 #endif
 
 /* need to make this work in scheme - armin */
@@ -106,25 +97,35 @@
 #define SICC0_INTTX		22
 #define SICC0_IO_BASE		((uint* )0x40000000)
 
+#define IDE0_BASE		0xf2100000
+#define REDWOOD_IDE_CTRL	0xf4100000
+
 #define IIC0_BASE	0x40030000
 #define IIC1_BASE	0x400b0000
 #define OPB0_BASE	0x40010000
 #define GPIO0_BASE	0x40060000
+#define IIC0_IRQ	9
+#define IIC1_IRQ	10
+#define IIC_OWN		0x55
+#define IIC_CLOCK	50
+#define IDE0_IRQ 	25
 
 #define BD_EMAC_ADDR(e,i) bi_enetaddr[i]
 
 #define STD_UART_OP(num)					\
 	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
 		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
-		iomem_base: UART##num##_IO_BASE,		\
+		iomem_base: (u8 *)UART##num##_IO_BASE,		\
 		io_type: SERIAL_IO_MEM},
 
 #if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_DEBUG_IO_BASE	UART0_IO_BASE
 #define SERIAL_PORT_DFNS	\
 	STD_UART_OP(0)
 #endif
 
 #if defined(CONFIG_UART0_TTYS1)
+#define SERIAL_DEBUG_IO_BASE	UART1_IO_BASE
 #define SERIAL_PORT_DFNS	\
 	STD_UART_OP(1)
 #endif
@@ -149,72 +150,39 @@
 
 #define DCRN_CPMFR_BASE		0x102
 #define DCRN_SCCR_BASE		0x120
+#define UIC0 DCRN_UIC0_BASE
 
-#define CPM_IIC0	0x80000000	/* IIC 0 interface */
-#define CPM_I1284	0x40000000	/* IEEE-1284 */
-#define CPM_IIC1	0x20000000	/* IIC 1 interface */
-#define CPM_CPU		0x10000000	/* PPC405B3 clock control */
-#define CPM_AUD		0x08000000	/* Audio Decoder */
-#define CPM_EBIU	0x04000000	/* External Bus Interface Unit */
-#define CPM_SDRAM1	0x02000000	/* SDRAM 1 memory controller */
-#define CPM_DMA		0x01000000	/* DMA controller */
-#define CPM_RES_1	0x00800000	/* reserved */
-#define CPM_RES_2	0x00400000	/* reserved */
-#define CPM_RES_3	0x00200000	/* reserved */
-#define CPM_UART1	0x00100000	/* Serial 1 / Infrared */
-#define CPM_UART0	0x00080000	/* Serial 0 / 16550 */
-#define CPM_DCRX	0x00040000	/* DCR Extension */
-#define CPM_SC0		0x00020000	/* Smart Card 0 */
-#define CPM_RES_4	0x00010000	/* reserved */
-#define CPM_SC1		0x00008000	/* Smart Card 1 */
-#define CPM_SDRAM0	0x00004000	/* SDRAM 0 memory controller */
-#define CPM_XPT54	0x00002000	/* Transport - 54 Mhz */
-#define CPM_CBS		0x00001000	/* Cross Bar Switch */
-#define CPM_GPT		0x00000800	/* GPTPWM */
-#define CPM_GPIO0	0x00000400	/* General Purpose IO 0 */
-#define CPM_DENC	0x00000200	/* Digital video Encoder */
-#define CPM_TMRCLK	0x00000100	/* CPU timers */
-#define CPM_XPT27	0x00000080	/* Transport - 27 Mhz */
-#define CPM_UIC		0x00000040	/* Universal Interrupt Controller */
-#define CPM_RES_5	0x00000020	/* reserved */
-#define CPM_MSI		0x00000010	/* Modem Serial Interface (SSP) */
-#define CPM_UART2	0x00000008	/* Serial Control Port */
-#define CPM_DSCR	0x00000004	/* Descrambler */
-#define CPM_VID2	0x00000002	/* Video Decoder clock domain 2 */
-#define CPM_RES_6	0x00000001	/* reserved */
-
-/*			0x80000000 */
-#define UIC_XPORT	0x40000000	/* 1 Transport */
-#define UIC_AUDIO	0x20000000	/* 2 Audio Decoder */
-#define UIC_VIDEO	0x10000000	/* 3 Video Decoder */
-#define UIC_D0		0x08000000	/* 4 DMA Channel 0 */
-#define UIC_D1		0x04000000	/* 5 DMA Channel 1 */
-#define UIC_D2		0x02000000	/* 6 DMA Channel 2 */
-#define UIC_D3		0x01000000	/* 7 DMA Channel 3 */
-#define UIC_SC0		0x00800000	/* 8 SmartCard 0 Controller */
-#define UIC_IIC0	0x00400000	/* 9 IIC 0 */
-#define UIC_IIC1	0x00200000	/* 10 IIC 1 */
-#define UIC_PWM0	0x00100000	/* 11 GPT_PWM 0: Capture Timers */
-#define UIC_PWM1	0x00080000	/* 12 GPT_PWM 1: Compare Timers */
-#define UIC_SCP		0x00040000	/* 13 Serial Control Port */
-#define UIC_SSP		0x00020000	/* 14 Soft Modem/Synchronous Serial Port */
-#define UIC_PWM2	0x00010000	/* 15 GPT_PWM 2: Down Counters */
-#define UIC_SC1		0x00008000	/* 16 SmartCard 1 Controller */
-#define UIC_EIR7	0x00004000	/* 17 External IRQ 7 */
-#define UIC_EIR8	0x00002000	/* 18 External IRQ 8 */
-#define UIC_EIR9	0x00001000	/* 19 External IRQ 9 */
-#define UIC_U0		0x00000800	/* 20 UART0 */
-#define UIC_IR_RCV	0x00000400	/* 21 Serial 1 / Infrared UART Receive */
-#define UIC_IR_XMIT	0x00000200	/* 22 Serial 1 / Infrared UART Transmit */
-#define UIC_IEEE1284	0x00000100	/* 23 IEEE-1284 / PPU */
-#define UIC_DCRX	0x00000080	/* 24 DCRX */
-#define UIC_EIR0	0x00000040	/* 25 External IRQ 0 */
-#define UIC_EIR1	0x00000020	/* 26 External IRQ 1 */
-#define UIC_EIR2	0x00000010	/* 27 External IRQ 2 */
-#define UIC_EIR3	0x00000008	/* 28 External IRQ 3 */
-#define UIC_EIR4	0x00000004	/* 29 External IRQ 4 */
-#define UIC_EIR5	0x00000002	/* 30 External IRQ 5 */
-#define UIC_EIR6	0x00000001	/* 31 External IRQ 6 */
+#define IBM_CPM_IIC0	0x80000000	/* IIC 0 interface */
+#define IBM_CPM_I1284	0x40000000	/* IEEE-1284 */
+#define IBM_CPM_IIC1	0x20000000	/* IIC 1 interface */
+#define IBM_CPM_CPU	0x10000000	/* PPC405B3 clock control */
+#define IBM_CPM_AUD	0x08000000	/* Audio Decoder */
+#define IBM_CPM_EBIU	0x04000000	/* External Bus Interface Unit */
+#define IBM_CPM_SDRAM1	0x02000000	/* SDRAM 1 memory controller */
+#define IBM_CPM_DMA	0x01000000	/* DMA controller */
+#define IBM_CPM_UART1	0x00100000	/* Serial 1 / Infrared */
+#define IBM_CPM_UART0	0x00080000	/* Serial 0 / 16550 */
+#define IBM_CPM_DCRX	0x00040000	/* DCR Extension */
+#define IBM_CPM_SC0	0x00020000	/* Smart Card 0 */
+#define IBM_CPM_SC1	0x00008000	/* Smart Card 1 */
+#define IBM_CPM_SDRAM0	0x00004000	/* SDRAM 0 memory controller */
+#define IBM_CPM_XPT54	0x00002000	/* Transport - 54 Mhz */
+#define IBM_CPM_CBS	0x00001000	/* Cross Bar Switch */
+#define IBM_CPM_GPT	0x00000800	/* GPTPWM */
+#define IBM_CPM_GPIO0	0x00000400	/* General Purpose IO 0 */
+#define IBM_CPM_DENC	0x00000200	/* Digital video Encoder */
+#define IBM_CPM_TMRCLK	0x00000100	/* CPU timers */
+#define IBM_CPM_XPT27	0x00000080	/* Transport - 27 Mhz */
+#define IBM_CPM_UIC	0x00000040	/* Universal Interrupt Controller */
+#define IBM_CPM_MSI	0x00000010	/* Modem Serial Interface (SSP) */
+#define IBM_CPM_UART2	0x00000008	/* Serial Control Port */
+#define IBM_CPM_DSCR	0x00000004	/* Descrambler */
+#define IBM_CPM_VID2	0x00000002	/* Video Decoder clock domain 2 */
+
+#define DFLT_IBM4xx_PM	~(IBM_CPM_CPU | IBM_CPM_EBIU | IBM_CPM_SDRAM1 \
+			| IBM_CPM_DMA | IBM_CPM_CBS | IBM_CPM_SDRAM0 \
+			| IBM_CPM_XPT54 | IBM_CPM_TMRCLK | IBM_CPM_XPT27 \
+			| IBM_CPM_UIC)
 
 #ifdef DCRN_CIC_BASE
 #define DCRN_CICCR	(DCRN_CIC_BASE + 0x0)	/* CIC Control Register */
diff -Nru a/arch/ppc/platforms/4xx/ibmstb4.c b/arch/ppc/platforms/4xx/ibmstb4.c
--- a/arch/ppc/platforms/4xx/ibmstb4.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/4xx/ibmstb4.c	Wed Jan  8 20:04:43 2003
@@ -28,34 +28,21 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *      History: 12/26/2001 - armin
- *		initial release
- *
  */
 
 #include <linux/config.h>
-#include <platforms/4xx/ibmstb4.h>
-
-const struct NS16550* COM_PORTS[] =
-{
-  (struct NS16550*) UART0_IO_BASE,
-  (struct NS16550*) UART1_IO_BASE,
-  (struct NS16550*) UART2_IO_BASE,
-};
-
-const struct iic_regs* IIC_ADDR[]=
-{
-	(struct iic_regs*) IIC0_BASE,
-};
-
-
-const struct gpio_regs* GPIO_ADDR[] =
-{
-	(struct gpio_regs*)	GPIO0_BASE,
-};
-
-const struct ide_regs* IDE_ADDR[] =
-{
-	(struct ide_regs*) IDE0_IO_ADDR,
-
+#include <linux/module.h>
+#include "ibmstb4.h"
+#include <asm/ocp.h>
+
+struct ocp_def core_ocp[] = {
+	{UART, UART0_IO_BASE, UART0_INT,IBM_CPM_UART0},
+	{UART, UART1_IO_BASE, UART1_INT, IBM_CPM_UART1},
+	{UART, UART2_IO_BASE, UART2_INT, IBM_CPM_UART2},
+	{IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{IIC, IIC1_BASE, IIC1_IRQ, IBM_CPM_IIC1},
+	{GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{IDE, IDE0_BASE, IDE0_IRQ, OCP_CPM_NA},
+	{USB, USB0_BASE, USB0_IRQ, IBM_CPM_USB0},
+	{OCP_NULL_TYPE, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
 };
diff -Nru a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h
--- a/arch/ppc/platforms/4xx/ibmstb4.h	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/4xx/ibmstb4.h	Wed Jan  8 20:04:45 2003
@@ -30,11 +30,6 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *	Version 1.0 (01/10/10) - A. Kuster
- *	Initial version	
- *
- *	Version 1.1 02/01/17 - A. Kuster
- *	moved common offsets to ibm405.h
  */
 
 #ifdef __KERNEL__
@@ -72,31 +67,57 @@
 
 #define RS_TABLE_SIZE		3
 #define UART0_INT		20
-#define UART0_IO_BASE		(u8 *)0x40040000
+
+#ifdef __BOOTER__
+#define UART0_IO_BASE		0x40040000
+#else
+#define UART0_IO_BASE		0xe0040000
+#endif
+
 #define UART1_INT		21
-#define UART1_IO_BASE		(u8 *)0x40000000
-#define UART2_INT		31
-#define UART2_IO_BASE		(u8 *)0x400e0000
 
-#define IDE0_IO_ADDR	0x400F0000
-#define IDE0_IO_SIZE	0x200
+#ifdef __BOOTER__
+#define UART1_IO_BASE		0x40000000
+#else
+#define UART1_IO_BASE		0xe0000000
+#endif
 
+#define UART2_INT		31
+#ifdef __BOOTER__
+#define UART2_IO_BASE		0x400e0000
+#else
+#define UART2_IO_BASE		0xe00e0000
+#endif
+
+#define IDE0_BASE	0x400F0000
+#define IDE0_SIZE	0x200
+#define IDE0_IRQ	25
 #define IIC0_BASE	0x40030000
 #define IIC1_BASE	0x400b0000
 #define OPB0_BASE	0x40000000
 #define GPIO0_BASE	0x40060000
 
+#define USB0_IRQ	18
+#define USB0_BASE	STB04xxx_MAP_IO_ADDR(0x40010000)
+#define USB0_EXTENT 4096
+
+#define IIC_NUMS 2
 #define UART_NUMS	3
+#define IIC0_IRQ	9
+#define IIC1_IRQ	10
+#define IIC_OWN		0x55
+#define IIC_CLOCK	50
 
 #define BD_EMAC_ADDR(e,i) bi_enetaddr[i]
 
 #define STD_UART_OP(num)					\
 	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
 		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
-		iomem_base: UART##num##_IO_BASE,		\
+		iomem_base: (u8 *)UART##num##_IO_BASE,		\
 		io_type: SERIAL_IO_MEM},
 
 #if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_DEBUG_IO_BASE	UART0_IO_BASE
 #define SERIAL_PORT_DFNS	\
 	STD_UART_OP(0)		\
 	STD_UART_OP(1)		\
@@ -104,6 +125,7 @@
 #endif
 
 #if defined(CONFIG_UART0_TTYS1)
+#define SERIAL_DEBUG_IO_BASE	UART2_IO_BASE
 #define SERIAL_PORT_DFNS	\
 	STD_UART_OP(1)		\
 	STD_UART_OP(0)		\
@@ -111,6 +133,7 @@
 #endif
 
 #if defined(CONFIG_UART0_TTYS2)
+#define SERIAL_DEBUG_IO_BASE	UART2_IO_BASE
 #define SERIAL_PORT_DFNS	\
 	STD_UART_OP(2)		\
 	STD_UART_OP(0)		\
@@ -140,72 +163,43 @@
 #define DCRN_DCRX_BASE		0x020
 #define DCRN_CPMFR_BASE		0x102
 #define DCRN_SCCR_BASE		0x120
+#define UIC0 DCRN_UIC0_BASE
 
-#define CPM_IIC0	0x80000000	/* IIC 0 interface */
-#define CPM_I1284	0x40000000	/* IEEE-1284 */
-#define CPM_IIC1	0x20000000	/* IIC 1 interface */
-#define CPM_CPU		0x10000000	/* PPC405B3 clock control */
-#define CPM_AUD		0x08000000	/* Audio Decoder */
-#define CPM_EBIU	0x04000000	/* External Bus Interface Unit */
-#define CPM_SDRAM1	0x02000000	/* SDRAM 1 memory controller */
-#define CPM_DMA		0x01000000	/* DMA controller */
-#define CPM_RES_1	0x00800000	/* reserved */
-#define CPM_RES_2	0x00400000	/* reserved */
-#define CPM_RES_3	0x00200000	/* reserved */
-#define CPM_UART1	0x00100000	/* Serial 1 / Infrared */
-#define CPM_UART0	0x00080000	/* Serial 0 / 16550 */
-#define CPM_DCRX	0x00040000	/* DCR Extension */
-#define CPM_SC0		0x00020000	/* Smart Card 0 */
-#define CPM_RES_4	0x00010000	/* reserved */
-#define CPM_SC1		0x00008000	/* Smart Card 1 */
-#define CPM_SDRAM0	0x00004000	/* SDRAM 0 memory controller */
-#define CPM_XPT54	0x00002000	/* Transport - 54 Mhz */
-#define CPM_CBS		0x00001000	/* Cross Bar Switch */
-#define CPM_GPT		0x00000800	/* GPTPWM */
-#define CPM_GPIO0	0x00000400	/* General Purpose IO 0 */
-#define CPM_DENC	0x00000200	/* Digital video Encoder */
-#define CPM_TMRCLK	0x00000100	/* CPU timers */
-#define CPM_XPT27	0x00000080	/* Transport - 27 Mhz */
-#define CPM_UIC		0x00000040	/* Universal Interrupt Controller */
-#define CPM_RES_5	0x00000020	/* reserved */
-#define CPM_MSI		0x00000010	/* Modem Serial Interface (SSP) */
-#define CPM_UART2	0x00000008	/* Serial Control Port */
-#define CPM_DSCR	0x00000004	/* Descrambler */
-#define CPM_VID2	0x00000002	/* Video Decoder clock domain 2 */
-#define CPM_RES_6	0x00000001	/* reserved */
-
-/*			0x80000000 */
-#define UIC_XPORT	0x40000000	/* 1 Transport */
-#define UIC_AUDIO	0x20000000	/* 2 Audio Decoder */
-#define UIC_VIDEO	0x10000000	/* 3 Video Decoder */
-#define UIC_D0		0x08000000	/* 4 DMA Channel 0 */
-#define UIC_D1		0x04000000	/* 5 DMA Channel 1 */
-#define UIC_D2		0x02000000	/* 6 DMA Channel 2 */
-#define UIC_D3		0x01000000	/* 7 DMA Channel 3 */
-#define UIC_SC0		0x00800000	/* 8 SmartCard 0 Controller */
-#define UIC_IIC0	0x00400000	/* 9 IIC 0 */
-#define UIC_IIC1	0x00200000	/* 10 IIC 1 */
-#define UIC_PWM0	0x00100000	/* 11 GPT_PWM 0: Capture Timers */
-#define UIC_PWM1	0x00080000	/* 12 GPT_PWM 1: Compare Timers */
-#define UIC_SCP		0x00040000	/* 13 Serial Control Port */
-#define UIC_SSP		0x00020000	/* 14 Soft Modem/Synchronous Serial Port */
-#define UIC_PWM2	0x00010000	/* 15 GPT_PWM 2: Down Counters */
-#define UIC_SC1		0x00008000	/* 16 SmartCard 1 Controller */
-#define UIC_EIR7	0x00004000	/* 17 External IRQ 7 */
-#define UIC_EIR8	0x00002000	/* 18 External IRQ 8 */
-#define UIC_EIR9	0x00001000	/* 19 External IRQ 9 */
-#define UIC_U0		0x00000800	/* 20 UART0 */
-#define UIC_IR_RCV	0x00000400	/* 21 Serial 1 / Infrared UART Receive */
-#define UIC_IR_XMIT	0x00000200	/* 22 Serial 1 / Infrared UART Transmit */
-#define UIC_IEEE1284	0x00000100	/* 23 IEEE-1284 / PPU */
-#define UIC_DCRX	0x00000080	/* 24 DCRX */
-#define UIC_EIR0	0x00000040	/* 25 External IRQ 0 */
-#define UIC_EIR1	0x00000020	/* 26 External IRQ 1 */
-#define UIC_EIR2	0x00000010	/* 27 External IRQ 2 */
-#define UIC_EIR3	0x00000008	/* 28 External IRQ 3 */
-#define UIC_EIR4	0x00000004	/* 29 External IRQ 4 */
-#define UIC_EIR5	0x00000002	/* 30 External IRQ 5 */
-#define UIC_EIR6	0x00000001	/* 31 External IRQ 6 */
+#define IBM_CPM_IIC0	0x80000000	/* IIC 0 interface */
+#define IBM_CPM_USB0	0x40000000	/* IEEE-1284 */
+#define IBM_CPM_IIC1	0x20000000	/* IIC 1 interface */
+#define IBM_CPM_CPU	0x10000000	/* PPC405B3 clock control */
+#define IBM_CPM_AUD	0x08000000	/* Audio Decoder */
+#define IBM_CPM_EBIU	0x04000000	/* External Bus Interface Unit */
+#define IBM_CPM_SDRAM1	0x02000000	/* SDRAM 1 memory controller */
+#define IBM_CPM_DMA	0x01000000	/* DMA controller */
+#define IBM_CPM_DMA1	0x00800000	/* reserved */
+#define IBM_CPM_XPT1	0x00400000	/* reserved */
+#define IBM_CPM_XPT2	0x00200000	/* reserved */
+#define IBM_CPM_UART1	0x00100000	/* Serial 1 / Infrared */
+#define IBM_CPM_UART0	0x00080000	/* Serial 0 / 16550 */
+#define IBM_CPM_EPI	0x00040000	/* DCR Extension */
+#define IBM_CPM_SC0	0x00020000	/* Smart Card 0 */
+#define IBM_CPM_VID	0x00010000	/* reserved */
+#define IBM_CPM_SC1	0x00008000	/* Smart Card 1 */
+#define IBM_CPM_USBSDRA	0x00004000	/* SDRAM 0 memory controller */
+#define IBM_CPM_XPT0	0x00002000	/* Transport - 54 Mhz */
+#define IBM_CPM_CBS	0x00001000	/* Cross Bar Switch */
+#define IBM_CPM_GPT	0x00000800	/* GPTPWM */
+#define IBM_CPM_GPIO0	0x00000400	/* General Purpose IO 0 */
+#define IBM_CPM_DENC	0x00000200	/* Digital video Encoder */
+#define IBM_CPM_TMRCLK	0x00000100	/* CPU timers */
+#define IBM_CPM_XPT27	0x00000080	/* Transport - 27 Mhz */
+#define IBM_CPM_UIC	0x00000040	/* Universal Interrupt Controller */
+#define IBM_CPM_SSP	0x00000010	/* Modem Serial Interface (SSP) */
+#define IBM_CPM_UART2	0x00000008	/* Serial Control Port */
+#define IBM_CPM_DDIO	0x00000004	/* Descrambler */
+#define IBM_CPM_VID2	0x00000002	/* Video Decoder clock domain 2 */
+
+#define DFLT_IBM4xx_PM	~(IBM_CPM_CPU | IBM_CPM_EBIU | IBM_CPM_SDRAM1 \
+			| IBM_CPM_DMA | IBM_CPM_DMA1 | IBM_CPM_CBS \
+			| IBM_CPM_USBSDRA | IBM_CPM_XPT0 | IBM_CPM_TMRCLK \
+			| IBM_CPM_XPT27 | IBM_CPM_UIC )
 
 #define DCRN_BEAR	(DCRN_BE_BASE + 0x0)	/* Bus Error Address Register */
 #define DCRN_BESR	(DCRN_BE_BASE + 0x1)	/* Bus Error Syndrome Register */
diff -Nru a/arch/ppc/platforms/4xx/ibmstbx25.c b/arch/ppc/platforms/4xx/ibmstbx25.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibmstbx25.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,51 @@
+/*
+ *
+ *    Copyright 2000-2002 MontaVista Software Inc.
+ *      Completed implementation.
+ *	Current maintainer
+ *      Armin Kuster akuster@mvista.com
+ *
+ *    Module name: ibmstbx25.c
+ *
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <asm/ocp.h>
+#include "ibmstbx25.h"
+
+struct ocp_def core_ocp[]  __initdata = {
+	{OCP_VENDOR_IBM, OCP_FUNC_PLB, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_OPB, OPB_BASE_START, OCP_IRQ_NA, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART0_IO_BASE, UART0_INT,IBM_CPM_UART0},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART1_IO_BASE, UART1_INT, IBM_CPM_UART1},
+	{OCP_VENDOR_IBM, OCP_FUNC_16550, UART2_IO_BASE,UART2_INT, IBM_CPM_UART2},
+	{OCP_VENDOR_IBM, OCP_FUNC_IIC, IIC0_BASE, IIC0_IRQ, IBM_CPM_IIC0},
+	{OCP_VENDOR_IBM, OCP_FUNC_GPIO, GPIO0_BASE, OCP_IRQ_NA, IBM_CPM_GPIO0},
+	{OCP_VENDOR_IBM, OCP_FUNC_IDE, IDE0_BASE, IDE0_IRQ, OCP_CPM_NA},
+	{OCP_VENDOR_IBM, OCP_FUNC_EXT, EBIU_BASE_START, OCP_IRQ_NA,IBM_CPM_EBIU},
+	{OCP_VENDOR_INVALID, OCP_FUNC_INVALID, 0x0, OCP_IRQ_NA, OCP_CPM_NA},
+
+};
diff -Nru a/arch/ppc/platforms/4xx/ibmstbx25.h b/arch/ppc/platforms/4xx/ibmstbx25.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ibmstbx25.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,282 @@
+/*
+ * ibmstbx25.h
+ *
+ *      Current maintainer
+ *      Armin Kuster akuster@mvista.com
+ *      July, 2002
+ *
+ *
+ * Copyright 2002 MontaVista Softare 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.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_IBMSTBX25_H__
+#define __ASM_IBMSTBX25_H__
+
+#include <linux/config.h>
+
+/* serial port defines */
+#define STBx25xx_IO_BASE	((uint)0xe0000000)
+#define PPC4xx_ONB_IO_PADDR	STBx25xx_IO_BASE
+#define PPC4xx_ONB_IO_VADDR	((uint)0xe0000000)
+#define PPC4xx_ONB_IO_SIZE	((uint)14*64*1024)
+
+/*
+ * map STBxxxx internal i/o address (0x400x00xx) to an address
+ * which is below the 2GB limit...
+ *
+ * 4000 000x	uart1		-> 0xe000 000x
+ * 4001 00xx	uart2
+ * 4002 00xx	smart card
+ * 4003 000x	iic
+ * 4004 000x	uart0
+ * 4005 0xxx	timer
+ * 4006 00xx	gpio
+ * 4007 00xx	smart card
+ * 400b 000x	iic
+ * 400c 000x	scp
+ * 400d 000x	modem
+ * 400e 000x	uart2
+*/
+#define STBx25xx_MAP_IO_ADDR(a)	(((uint)(a)) + (STBx25xx_IO_BASE - 0x40000000))
+
+#define RS_TABLE_SIZE	3
+
+#define OPB_BASE_START	0x40000000
+#define EBIU_BASE_START	0xF0100000
+#define DCR_BASE_START  0x0000
+
+#ifdef __BOOTER__
+#define UART1_IO_BASE	0x40000000
+#define UART2_IO_BASE	0x40010000
+#else
+#define UART1_IO_BASE	0xe0000000
+#define UART2_IO_BASE	0xe0010000
+#endif
+#define SC0_BASE	0x40020000	/* smart card #0 */
+#define IIC0_BASE	0x40030000
+#ifdef __BOOTER__
+#define UART0_IO_BASE	0x40040000
+#else
+#define UART0_IO_BASE	0xe0040000
+#endif
+#define SCC0_BASE	0x40040000	/* Serial 0 controller IrdA */
+#define GPT0_BASE	0x40050000	/* General purpose timers */
+#define GPIO0_BASE	0x40060000
+#define SC1_BASE	0x40070000	/* smart card #1 */
+#define SCP0_BASE	0x400C0000	/* Serial Controller Port */
+#define SSP0_BASE	0x400D0000	/* Sync serial port */
+
+#define IDE0_BASE		0xf0100000
+#define REDWOOD_IDE_CTRL	0xf1100000
+
+#define RTCFPC_IRQ	0
+#define XPORT_IRQ	1
+#define AUD_IRQ		2
+#define AID_IRQ		3
+#define DMA0		4
+#define DMA1_IRQ	5
+#define DMA2_IRQ	6
+#define DMA3_IRQ	7
+#define SC0_IRQ		8
+#define IIC0_IRQ	9
+#define IIR0_IRQ	10
+#define GPT0_IRQ	11
+#define GPT1_IRQ	12
+#define SCP0_IRQ	13
+#define SSP0_IRQ	14
+#define GPT2_IRQ	15	/* count down timer */
+#define SC1_IRQ		16
+/* IRQ 17 - 19  external */
+#define UART0_INT	20
+#define UART1_INT	21
+#define UART2_INT	22
+#define XPTDMA_IRQ	23
+#define DCRIDE_IRQ	24
+/* IRQ 25 - 30 external */
+#define IDE0_IRQ	26
+
+#define IIC_NUMS	1
+#define UART_NUMS	3
+#define IIC_OWN		0x55
+#define IIC_CLOCK	50
+
+#define BD_EMAC_ADDR(e,i) bi_enetaddr[i]
+
+#define STD_UART_OP(num)					\
+	{ 0, BASE_BAUD, 0, UART##num##_INT,			\
+		(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),	\
+		iomem_base: (u8 *)UART##num##_IO_BASE,		\
+		io_type: SERIAL_IO_MEM},
+
+#if defined(CONFIG_UART0_TTYS0)
+#define SERIAL_DEBUG_IO_BASE	UART0_IO_BASE
+#define SERIAL_PORT_DFNS	\
+	STD_UART_OP(0)		\
+	STD_UART_OP(1)		\
+	STD_UART_OP(2)
+#endif
+
+#if defined(CONFIG_UART0_TTYS1)
+#define SERIAL_DEBUG_IO_BASE	UART2_IO_BASE
+#define SERIAL_PORT_DFNS	\
+	STD_UART_OP(1)		\
+	STD_UART_OP(0)		\
+	STD_UART_OP(2)
+#endif
+
+#if defined(CONFIG_UART0_TTYS2)
+#define SERIAL_DEBUG_IO_BASE	UART2_IO_BASE
+#define SERIAL_PORT_DFNS	\
+	STD_UART_OP(2)		\
+	STD_UART_OP(0)		\
+	STD_UART_OP(1)
+#endif
+
+#define DCRN_BE_BASE		0x090
+#define DCRN_DMA0_BASE		0x0C0
+#define DCRN_DMA1_BASE		0x0C8
+#define DCRN_DMA2_BASE		0x0D0
+#define DCRN_DMA3_BASE		0x0D8
+#define DCRNCAP_DMA_CC		1	/* have DMA chained count capability */
+#define DCRN_DMASR_BASE		0x0E0
+#define DCRN_PLB0_BASE		0x054
+#define DCRN_PLB1_BASE		0x064
+#define DCRN_POB0_BASE		0x0B0
+#define DCRN_SCCR_BASE		0x120
+#define DCRN_UIC0_BASE		0x040
+#define DCRN_BE_BASE		0x090
+#define DCRN_DMA0_BASE		0x0C0
+#define DCRN_DMA1_BASE		0x0C8
+#define DCRN_DMA2_BASE		0x0D0
+#define DCRN_DMA3_BASE		0x0D8
+#define DCRN_CIC_BASE 		0x030
+#define DCRN_DMASR_BASE		0x0E0
+#define DCRN_EBIMC_BASE		0x070
+#define DCRN_DCRX_BASE		0x020
+#define DCRN_CPMFR_BASE		0x102
+#define DCRN_SCCR_BASE		0x120
+#define DCRN_RTCFP_BASE		0x310
+
+#define UIC0 DCRN_UIC0_BASE
+
+#define IBM_CPM_IIC0	0x80000000	/* IIC 0 interface */
+#define IBM_CPM_CPU	0x10000000	/* PPC405B3 clock control */
+#define IBM_CPM_AUD	0x08000000	/* Audio Decoder */
+#define IBM_CPM_EBIU	0x04000000	/* External Bus Interface Unit */
+#define IBM_CPM_IRR	0x02000000	/* Infrared reciever */
+#define IBM_CPM_DMA	0x01000000	/* DMA controller */
+#define IBM_CPM_UART2	0x00200000	/* Serial Control Port */
+#define IBM_CPM_UART1	0x00100000	/* Serial 1 / Infrared */
+#define IBM_CPM_UART0	0x00080000	/* Serial 0 / 16550 */
+#define IBM_PM_DCRIDE	0x00040000	/* DCR timeout & IDE line Mode clock */
+#define IBM_CPM_SC0	0x00020000	/* Smart Card 0 */
+#define IBM_CPM_VID	0x00010000	/* reserved */
+#define IBM_CPM_SC1	0x00008000	/* Smart Card 0 */
+#define IBM_CPM_XPT0	0x00002000	/* Transport - 54 Mhz */
+#define IBM_CPM_CBS	0x00001000	/* Cross Bar Switch */
+#define IBM_CPM_GPT	0x00000800	/* GPTPWM */
+#define IBM_CPM_GPIO0	0x00000400	/* General Purpose IO 0 */
+#define IBM_CPM_DENC	0x00000200	/* Digital video Encoder */
+#define IBM_CPM_C405T	0x00000100	/* CPU timers */
+#define IBM_CPM_XPT27	0x00000080	/* Transport - 27 Mhz */
+#define IBM_CPM_UIC	0x00000040	/* Universal Interrupt Controller */
+#define IBM_CPM_RTCFPC	0x00000020	/* Realtime clock and front panel */
+#define IBM_CPM_SSP	0x00000010	/* Modem Serial Interface (SSP) */
+#define IBM_CPM_VID2	0x00000002	/* Video Decoder clock domain 2 */
+#define DFLT_IBM4xx_PM	~(IBM_CPM_CPU | IBM_CPM_EBIU | IBM_CPM_DMA	\
+			| IBM_CPM_CBS | IBM_CPM_XPT0 | IBM_CPM_C405T 	\
+			| IBM_CPM_XPT27 | IBM_CPM_UIC)
+
+#define DCRN_BEAR	(DCRN_BE_BASE + 0x0)	/* Bus Error Address Register */
+#define DCRN_BESR	(DCRN_BE_BASE + 0x1)	/* Bus Error Syndrome Register */
+/* DCRN_BESR */
+#define BESR_DSES	0x80000000	/* Data-Side Error Status */
+#define BESR_DMES	0x40000000	/* DMA Error Status */
+#define BESR_RWS	0x20000000	/* Read/Write Status */
+#define BESR_ETMASK	0x1C000000	/* Error Type */
+#define ET_PROT		0
+#define ET_PARITY	1
+#define ET_NCFG		2
+#define ET_BUSERR	4
+#define ET_BUSTO	6
+
+#define CHR1_CETE	0x00800000	/* CPU external timer enable */
+#define CHR1_PCIPW	0x00008000	/* PCI Int enable/Peripheral Write enable */
+
+#define DCRN_CICCR	(DCRN_CIC_BASE + 0x0)	/* CIC Control Register */
+#define DCRN_DMAS1	(DCRN_CIC_BASE + 0x1)	/* DMA Select1 Register */
+#define DCRN_DMAS2	(DCRN_CIC_BASE + 0x2)	/* DMA Select2 Register */
+#define DCRN_CICVCR	(DCRN_CIC_BASE + 0x3)	/* CIC Video COntro Register */
+#define DCRN_CICSEL3	(DCRN_CIC_BASE + 0x5)	/* CIC Select 3 Register */
+#define DCRN_SGPO	(DCRN_CIC_BASE + 0x6)	/* CIC GPIO Output Register */
+#define DCRN_SGPOD	(DCRN_CIC_BASE + 0x7)	/* CIC GPIO OD Register */
+#define DCRN_SGPTC	(DCRN_CIC_BASE + 0x8)	/* CIC GPIO Tristate Ctrl Reg */
+#define DCRN_SGPI	(DCRN_CIC_BASE + 0x9)	/* CIC GPIO Input Reg */
+
+#define DCRN_DCRXICR	(DCRN_DCRX_BASE + 0x0)	/* Internal Control Register */
+#define DCRN_DCRXISR	(DCRN_DCRX_BASE + 0x1)	/* Internal Status Register */
+#define DCRN_DCRXECR	(DCRN_DCRX_BASE + 0x2)	/* External Control Register */
+#define DCRN_DCRXESR	(DCRN_DCRX_BASE + 0x3)	/* External Status Register */
+#define DCRN_DCRXTAR	(DCRN_DCRX_BASE + 0x4)	/* Target Address Register */
+#define DCRN_DCRXTDR	(DCRN_DCRX_BASE + 0x5)	/* Target Data Register */
+#define DCRN_DCRXIGR	(DCRN_DCRX_BASE + 0x6)	/* Interrupt Generation Register */
+#define DCRN_DCRXBCR	(DCRN_DCRX_BASE + 0x7)	/* Line Buffer Control Register */
+
+#define DCRN_BRCRH0	(DCRN_EBIMC_BASE + 0x0)	/* Bus Region Config High 0 */
+#define DCRN_BRCRH1	(DCRN_EBIMC_BASE + 0x1)	/* Bus Region Config High 1 */
+#define DCRN_BRCRH2	(DCRN_EBIMC_BASE + 0x2)	/* Bus Region Config High 2 */
+#define DCRN_BRCRH3	(DCRN_EBIMC_BASE + 0x3)	/* Bus Region Config High 3 */
+#define DCRN_BRCRH4	(DCRN_EBIMC_BASE + 0x4)	/* Bus Region Config High 4 */
+#define DCRN_BRCRH5	(DCRN_EBIMC_BASE + 0x5)	/* Bus Region Config High 5 */
+#define DCRN_BRCRH6	(DCRN_EBIMC_BASE + 0x6)	/* Bus Region Config High 6 */
+#define DCRN_BRCRH7	(DCRN_EBIMC_BASE + 0x7)	/* Bus Region Config High 7 */
+#define DCRN_BRCR0	(DCRN_EBIMC_BASE + 0x10)	/* BRC 0 */
+#define DCRN_BRCR1	(DCRN_EBIMC_BASE + 0x11)	/* BRC 1 */
+#define DCRN_BRCR2	(DCRN_EBIMC_BASE + 0x12)	/* BRC 2 */
+#define DCRN_BRCR3	(DCRN_EBIMC_BASE + 0x13)	/* BRC 3 */
+#define DCRN_BRCR4	(DCRN_EBIMC_BASE + 0x14)	/* BRC 4 */
+#define DCRN_BRCR5	(DCRN_EBIMC_BASE + 0x15)	/* BRC 5 */
+#define DCRN_BRCR6	(DCRN_EBIMC_BASE + 0x16)	/* BRC 6 */
+#define DCRN_BRCR7	(DCRN_EBIMC_BASE + 0x17)	/* BRC 7 */
+#define DCRN_BEAR0	(DCRN_EBIMC_BASE + 0x20)	/* Bus Error Address Register */
+#define DCRN_BESR0	(DCRN_EBIMC_BASE + 0x21)	/* Bus Error Status Register */
+#define DCRN_BIUCR	(DCRN_EBIMC_BASE + 0x2A)	/* Bus Interfac Unit Ctrl Reg */
+
+#define DCRN_RTC_FPC0_CNTL 	(DCRN_RTCFP_BASE + 0x00)	/* RTC cntl */
+#define DCRN_RTC_FPC0_INT 	(DCRN_RTCFP_BASE + 0x01)	/* RTC Interrupt */
+#define DCRN_RTC_FPC0_TIME 	(DCRN_RTCFP_BASE + 0x02)	/* RTC time reg */
+#define DCRN_RTC_FPC0_ALRM 	(DCRN_RTCFP_BASE + 0x03)	/* RTC Alarm reg */
+#define DCRN_RTC_FPC0_D1 	(DCRN_RTCFP_BASE + 0x04)	/* LED Data 1 */
+#define DCRN_RTC_FPC0_D2 	(DCRN_RTCFP_BASE + 0x05)	/* LED Data 2 */
+#define DCRN_RTC_FPC0_D3 	(DCRN_RTCFP_BASE + 0x06)	/* LED Data 3 */
+#define DCRN_RTC_FPC0_D4 	(DCRN_RTCFP_BASE + 0x07)	/* LED Data 4 */
+#define DCRN_RTC_FPC0_D5 	(DCRN_RTCFP_BASE + 0x08)	/* LED Data 5 */
+#define DCRN_RTC_FPC0_FCNTL 	(DCRN_RTCFP_BASE + 0x09)	/* LED control */
+#define DCRN_RTC_FPC0_BRT 	(DCRN_RTCFP_BASE + 0x0A)	/* Brightness cntl */
+
+#include <asm/ibm405.h>
+
+#endif				/* __ASM_IBMSTBX25_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/oak.h b/arch/ppc/platforms/4xx/oak.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/oak.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,71 @@
+/*
+ *
+ *    Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ *
+ *    Module name: oak.h
+ *
+ *    Description:
+ *	Macros, definitions, and data structures specific to the IBM PowerPC
+ *      403G{A,B,C,CX} "Oak" evaluation board. Anything specific to the pro-
+ *      cessor itself is defined elsewhere.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_OAK_H__
+#define __ASM_OAK_H__
+
+/* We have an IBM 403G{A,B,C,CX} core */
+#include <asm/ibm403.h>
+
+#define _IO_BASE	0
+#define _ISA_MEM_BASE	0
+#define PCI_DRAM_OFFSET	0
+
+/* Memory map for the "Oak" evaluation board */
+
+#define	PPC403SPU_IO_BASE	0x40000000	/* 403 On-chip serial port */
+#define	PPC403SPU_IO_SIZE	0x00000008
+#define	OAKSERIAL_IO_BASE	0x7E000000	/* NS16550DV serial port */
+#define	OAKSERIAL_IO_SIZE	0x00000008
+#define	OAKNET_IO_BASE		0xF4000000	/* NS83902AV Ethernet */
+#define	OAKNET_IO_SIZE		0x00000040
+#define	OAKPROM_IO_BASE		0xFFFE0000	/* AMD 29F010 Flash ROM */
+#define	OAKPROM_IO_SIZE		0x00020000
+
+
+/* Interrupt assignments fixed by the hardware implementation */
+
+/* This is annoying kbuild-2.4 problem. -- Tom */
+
+#define	PPC403SPU_RX_INT	4	/* AIC_INT4 */
+#define	PPC403SPU_TX_INT	5	/* AIC_INT5 */
+#define	OAKNET_INT		27	/* AIC_INT27 */
+#define	OAKSERIAL_INT		28	/* AIC_INT28 */
+
+#ifndef __ASSEMBLY__
+/*
+ * Data structure defining board information maintained by the boot
+ * ROM on IBM's "Oak" evaluation board. An effort has been made to
+ * keep the field names consistent with the 8xx 'bd_t' board info
+ * structures.
+ */
+
+typedef struct board_info {
+	unsigned char	 bi_s_version[4];	/* Version of this structure */
+	unsigned char	 bi_r_version[30];	/* Version of the IBM ROM */
+	unsigned int	 bi_memsize;		/* DRAM installed, in bytes */
+	unsigned char	 bi_enetaddr[6];	/* Ethernet MAC address */
+	unsigned int	 bi_intfreq;		/* Processor speed, in Hz */
+	unsigned int	 bi_busfreq;		/* Bus speed, in Hz */
+} bd_t;
+
+/* Some 4xx parts use a different timebase frequency from the internal clock.
+*/
+#define bi_tbfreq bi_intfreq
+
+#define PPC4xx_MACHINE_NAME	"IBM Oak"
+
+#endif /* !__ASSEMBLY__ */
+#endif /* __ASM_OAK_H__ */
+#endif /* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/oak_setup.c b/arch/ppc/platforms/4xx/oak_setup.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/oak_setup.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,282 @@
+/*
+ *
+ *    Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
+ *
+ *    Module name: oak_setup.c
+ *
+ *    Description:
+ *      Architecture- / platform-specific boot-time initialization code for
+ *      the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original
+ *      code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
+ *      <dan@net4x.com>.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/threads.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/blk.h>
+#include <linux/irq.h>
+#include <linux/seq_file.h>
+
+#include <asm/processor.h>
+#include <asm/board.h>
+#include <asm/machdep.h>
+#include <asm/page.h>
+#include <asm/bootinfo.h>
+#include <asm/ppc4xx_pic.h>
+#include <asm/time.h>
+
+#include "oak_setup.h"
+
+/* Function Prototypes */
+
+extern void abort(void);
+
+/* Global Variables */
+
+unsigned char __res[sizeof(bd_t)];
+
+
+/*
+ * void __init oak_init()
+ *
+ * Description:
+ *   This routine...
+ *
+ * Input(s):
+ *   r3 - Optional pointer to a board information structure.
+ *   r4 - Optional pointer to the physical starting address of the init RAM
+ *        disk.
+ *   r5 - Optional pointer to the physical ending address of the init RAM
+ *        disk.
+ *   r6 - Optional pointer to the physical starting address of any kernel
+ *        command-line parameters.
+ *   r7 - Optional pointer to the physical ending address of any kernel
+ *        command-line parameters.
+ *
+ * Output(s):
+ *   N/A
+ *
+ * Returns:
+ *   N/A
+ *
+ */
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	parse_bootinfo(find_bootinfo());
+
+	/*
+	 * If we were passed in a board information, copy it into the
+	 * residual data area.
+	 */
+	if (r3) {
+		memcpy((void *)__res, (void *)(r3 + KERNELBASE), sizeof(bd_t));
+	}
+
+#if defined(CONFIG_BLK_DEV_INITRD)
+	/*
+	 * If the init RAM disk has been configured in, and there's a valid
+	 * starting address for it, set it up.
+	 */
+	if (r4) {
+		initrd_start = r4 + KERNELBASE;
+		initrd_end = r5 + KERNELBASE;
+	}
+#endif /* CONFIG_BLK_DEV_INITRD */
+
+	/* Copy the kernel command line arguments to a safe place. */
+
+	if (r6) {
+ 		*(char *)(r7 + KERNELBASE) = 0;
+		strcpy(cmd_line, (char *)(r6 + KERNELBASE));
+	}
+
+	/* Initialize machine-dependency vectors */
+
+	ppc_md.setup_arch	 	= oak_setup_arch;
+	ppc_md.show_percpuinfo	 	= oak_show_percpuinfo;
+	ppc_md.irq_cannonicalize 	= NULL;
+	ppc_md.init_IRQ		 	= oak_init_IRQ;
+	ppc_md.get_irq		 	= oak_get_irq;
+	ppc_md.init		 	= NULL;
+
+	ppc_md.restart		 	= oak_restart;
+	ppc_md.power_off	 	= oak_power_off;
+	ppc_md.halt		 	= oak_halt;
+
+	ppc_md.time_init	 	= oak_time_init;
+	ppc_md.set_rtc_time	 	= oak_set_rtc_time;
+	ppc_md.get_rtc_time	 	= oak_get_rtc_time;
+	ppc_md.calibrate_decr	 	= oak_calibrate_decr;
+}
+
+/*
+ * Document me.
+ */
+void __init
+oak_setup_arch(void)
+{
+	/* XXX - Implement me */
+}
+
+/*
+ * int oak_show_percpuinfo()
+ *
+ * Description:
+ *   This routine pretty-prints the platform's internal CPU and bus clock
+ *   frequencies into the buffer for usage in /proc/cpuinfo.
+ *
+ * Input(s):
+ *  *buffer - Buffer into which CPU and bus clock frequencies are to be
+ *            printed.
+ *
+ * Output(s):
+ *  *buffer - Buffer with the CPU and bus clock frequencies.
+ *
+ * Returns:
+ *   The number of bytes copied into 'buffer' if OK, otherwise zero or less
+ *   on error.
+ */
+int
+oak_show_percpuinfo(struct seq_file *m, int i)
+{
+	bd_t *bp = (bd_t *)__res;
+
+	seq_printf(m, "clock\t\t: %dMHz\n"
+		   "bus clock\t\t: %dMHz\n",
+		   bp->bi_intfreq / 1000000,
+		   bp->bi_busfreq / 1000000);
+
+	return 0;
+}
+
+/*
+ * Document me.
+ */
+void __init
+oak_init_IRQ(void)
+{
+	int i;
+
+	ppc4xx_pic_init();
+
+	for (i = 0; i < NR_IRQS; i++) {
+		irq_desc[i].handler = ppc4xx_pic;
+	}
+
+	return;
+}
+
+/*
+ * Document me.
+ */
+int
+oak_get_irq(struct pt_regs *regs)
+{
+	return (ppc4xx_pic_get_irq(regs));
+}
+
+/*
+ * Document me.
+ */
+void
+oak_restart(char *cmd)
+{
+	abort();
+}
+
+/*
+ * Document me.
+ */
+void
+oak_power_off(void)
+{
+	oak_restart(NULL);
+}
+
+/*
+ * Document me.
+ */
+void
+oak_halt(void)
+{
+	oak_restart(NULL);
+}
+
+/*
+ * Document me.
+ */
+long __init
+oak_time_init(void)
+{
+	/* XXX - Implement me */
+	return 0;
+}
+
+/*
+ * Document me.
+ */
+int __init
+oak_set_rtc_time(unsigned long time)
+{
+	/* XXX - Implement me */
+
+	return (0);
+}
+
+/*
+ * Document me.
+ */
+unsigned long __init
+oak_get_rtc_time(void)
+{
+	/* XXX - Implement me */
+
+	return (0);
+}
+
+/*
+ * void __init oak_calibrate_decr()
+ *
+ * Description:
+ *   This routine retrieves the internal processor frequency from the board
+ *   information structure, sets up the kernel timer decrementer based on
+ *   that value, enables the 403 programmable interval timer (PIT) and sets
+ *   it up for auto-reload.
+ *
+ * Input(s):
+ *   N/A
+ *
+ * Output(s):
+ *   N/A
+ *
+ * Returns:
+ *   N/A
+ *
+ */
+void __init
+oak_calibrate_decr(void)
+{
+	unsigned int freq;
+	bd_t *bip = (bd_t *)__res;
+
+	freq = bip->bi_intfreq;
+
+	decrementer_count = freq / HZ;
+	count_period_num = 1;
+	count_period_den = freq;
+
+	/* Enable the PIT and set auto-reload of its value */
+
+	mtspr(SPRN_TCR, TCR_PIE | TCR_ARE);
+
+	/* Clear any pending timer interrupts */
+
+	mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_PIS | TSR_FIS);
+}
diff -Nru a/arch/ppc/platforms/4xx/oak_setup.h b/arch/ppc/platforms/4xx/oak_setup.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/oak_setup.h	Wed Jan  8 20:04:43 2003
@@ -0,0 +1,50 @@
+/*
+ *
+ *    Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
+ *
+ *    Module name: oak_setup.h
+ *
+ *    Description:
+ *      Architecture- / platform-specific boot-time initialization code for
+ *      the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original
+ *      code by Gary Thomas, Cort Dougan <cort@cs.nmt.edu>, and Dan Malek
+ *      <dan@netx4.com>.
+ *
+ */
+
+#ifndef	__OAK_SETUP_H__
+#define	__OAK_SETUP_H__
+
+#include <asm/ptrace.h>
+#include <asm/board.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern unsigned char	 __res[sizeof(bd_t)];
+
+extern void		 oak_init(unsigned long r3,
+				  unsigned long ird_start,
+				  unsigned long ird_end,
+				  unsigned long cline_start,
+				  unsigned long cline_end);
+extern void		 oak_setup_arch(void);
+extern int		 oak_setup_residual(char *buffer);
+extern void		 oak_init_IRQ(void);
+extern int		 oak_get_irq(struct pt_regs *regs);
+extern void		 oak_restart(char *cmd);
+extern void		 oak_power_off(void);
+extern void		 oak_halt(void);
+extern void		 oak_time_init(void);
+extern int		 oak_set_rtc_time(unsigned long now);
+extern unsigned long	 oak_get_rtc_time(void);
+extern void		 oak_calibrate_decr(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OAK_SETUP_H__ */
diff -Nru a/arch/ppc/platforms/4xx/redwood.c b/arch/ppc/platforms/4xx/redwood.c
--- a/arch/ppc/platforms/4xx/redwood.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/4xx/redwood.c	Wed Jan  8 20:04:45 2003
@@ -7,11 +7,6 @@
  *
  *    Module name: redwood.c
  *
- *    Description:
- *
- *      History:  11/09/2001 - Armin
- *      added board_init to add in additional instuctions needed during platfrom_init
- *
  */
 
 #include <linux/config.h>
@@ -22,26 +17,58 @@
 #include <asm/machdep.h>
 
 void __init
-board_setup_arch(void)
+redwood_setup_arch(void)
 {
+	ppc4xx_setup_arch();
+
+#ifdef CONFIG_IDE
+	void *xilinx, *xilinx_1, *xilinx_2;
+	unsigned short reg5;
+
+	xilinx = ioremap(IDE_XLINUX_MUX_BASE, 0x10);
+
+	/* init xilinx control registers - enable ide mux, clear reset bit */
+	if (!xilinx) {
+		printk(KERN_CRIT
+		       "redwood4_setup_arch() xilinx ioremap failed\n");
+		return;
+	}
+	xilinx_1 = xilinx;
+	xilinx_2 = xilinx + 0xe;
+
+	reg5 = readw(xilinx_1);
+	writeb(reg5 |= ~(0x8001), xilinx_1);
+	writeb(0, xilinx_2);
+
+	udelay(10 * 1000);
+
+	writeb(reg5 & 0x8001, xilinx_1);
+	writeb(0, xilinx_2);
+	
+       	/* add RE & OEN to value set by boot rom */
+        mtdcr(DCRN_BRCR3, 0x407cfffe);
+
+#endif
+
 }
 
 void __init
-board_io_mapping(void)
+redwood_map_io(void)
 {
 	int i;
 
+	ppc4xx_map_io();
 	io_block_mapping(OAKNET_IO_VADDR,
 			 OAKNET_IO_PADDR, OAKNET_IO_SIZE, _PAGE_IO);
 
 }
 
 void __init
-board_setup_irq(void)
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
 {
-}
+	ppc4xx_init(r3, r4, r5, r6, r7);
 
-void __init
-board_init(void)
-{
+	ppc_md.setup_arch = redwood_setup_arch;
+	ppc_md.setup_io_mappings = redwood_map_io;
 }
diff -Nru a/arch/ppc/platforms/4xx/redwood.h b/arch/ppc/platforms/4xx/redwood.h
--- a/arch/ppc/platforms/4xx/redwood.h	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/4xx/redwood.h	Wed Jan  8 20:04:45 2003
@@ -27,10 +27,12 @@
 	unsigned char	bi_enetaddr[6];		/* Ethernet MAC address */
 	unsigned int	bi_intfreq;		/* Processor speed, in Hz */
 	unsigned int	bi_busfreq;		/* Bus speed, in Hz */
-	unsigned int	bi_tbfreq;		/* Software timebase freq */
 } bd_t;
+#define bi_tbfreq bi_intfreq
+
 #endif /* !__ASSEMBLY__ */
 
+#define bi_tbfreq bi_intfreq
 #define OAKNET_IO_PADDR		((uint)0xf2000000)
 #define OAKNET_IO_VADDR		OAKNET_IO_PADDR
 #define OAKNET_IO_BASE		OAKNET_IO_VADDR
@@ -38,6 +40,9 @@
 /* ftr revisit- io size was 0xffff in old-line, is 0x40 in oak.h */
 #define OAKNET_IO_SIZE		0xffff
 #define OAKNET_INT		26	/* EXTINT1 */
+
+#define IDE_XLINUX_MUX_BASE        0xf2040000
+#define IDE_DMA_ADDR	0xfce00000
 
 #define _IO_BASE	0
 #define _ISA_MEM_BASE	0
diff -Nru a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c
--- a/arch/ppc/platforms/4xx/redwood5.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/4xx/redwood5.c	Wed Jan  8 20:04:43 2003
@@ -9,9 +9,6 @@
  *    Description:
  *    	IBM redwood5 eval board file
  *
- *      History:  12/29/2001 - Armin
- *    	initail release
- *
  */
 
 #include <linux/config.h>
@@ -21,12 +18,12 @@
 #include <asm/machdep.h>
 
 void __init
-board_setup_arch(void)
+redwood5_setup_arch(void)
 {
+	bd_t *bip = &__res;
 
-	bd_t *bip = (bd_t *)__res;
+	ppc4xx_setup_arch();
 
-#define CONFIG_DEBUG_BRINGUP
 #ifdef CONFIG_DEBUG_BRINGUP
 	printk("\n");
 	printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
@@ -53,10 +50,11 @@
 }
 
 void __init
-board_io_mapping(void)
+redwood5_map_io(void)
 {
 	int i;
 
+	ppc4xx_map_io();
 	for (i = 0; i < 16; i++) {
 	 unsigned long v, p;
 
@@ -72,11 +70,11 @@
 }
 
 void __init
-board_setup_irq(void)
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
 {
-}
+	ppc4xx_init(r3, r4, r5, r6, r7);
 
-void __init
-board_init(void)
-{
+	ppc_md.setup_arch = redwood5_setup_arch;
+	ppc_md.setup_io_mappings = redwood5_map_io;
 }
diff -Nru a/arch/ppc/platforms/4xx/redwood6.c b/arch/ppc/platforms/4xx/redwood6.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/redwood6.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,172 @@
+/*
+ *
+ *    Module name: redwood6.c
+ *
+ *    Description:
+ *    	IBM redwood6 eval board file
+ *
+ *    Author: Armin Kuster
+ *    Copyright 2002 MontaVista Software 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.
+ *
+ * THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ * WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ * NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ * USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * 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.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/pagemap.h>
+#include <asm/io.h>
+#include <asm/ppc4xx_pic.h>
+#include <linux/delay.h>
+#include <asm/machdep.h>
+
+
+/*
+ * Define all of the IRQ senses and polarities.  
+ */
+
+static u_char redwood6_IRQ_initsenses[] __initdata = {
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 0: RTC/FPC */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 1: Transport */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 2: Audio Dec */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 3: Video Dec */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 4: DMA Chan 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 5: DMA Chan 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 6: DMA Chan 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 7: DMA Chan 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 8: SmartCard 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 9: IIC0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 10: IRR */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 11: Cap Timers */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 12: Cmp Timers */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 13: Serial Port */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 14: Soft Modem */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 15: Down Ctrs */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 16: SmartCard 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 17: Ext Int 7 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 18: Ext Int 8 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 19: Ext Int 9 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 20: Serial 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 21: Serial 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 22: Serial 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 23: XPT_DMA */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 24: DCR timeout */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 25: Ext Int 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 26: Ext Int 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 27: Ext Int 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 28: Ext Int 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 29: Ext Int 4 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 30: Ext Int 5 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 31: Ext Int 6 */
+};
+
+
+void __init
+redwood6_setup_arch(void)
+{
+#ifdef CONFIG_IDE
+	void *xilinx, *xilinx_1, *xilinx_2;
+	unsigned short us_reg5;
+#endif
+
+	ppc4xx_setup_arch();
+
+#ifdef CONFIG_IDE
+	xilinx = (unsigned long) ioremap(IDE_XLINUX_MUX_BASE, 0x10);
+	/* init xilinx control registers - enable ide mux, clear reset bit */
+	if (!xilinx) {
+		printk(KERN_CRIT
+		       "redwood6_setup_arch() xilinxi ioremap failed\n");
+		return;
+	}
+	xilinx_1 = xilinx + 0xa;
+	xilinx_2 = xilinx + 0xe;
+
+	us_reg5 = readb(xilinx_1);
+	writeb(0x01d1, xilinx_1);
+	writeb(0x0008, xilinx_2);
+
+	udelay(10 * 1000);
+
+	writeb(0x01d1, xilinx_1);
+	writeb(0x0008, xilinx_2);
+#endif
+
+#ifdef DEBUG_BRINGUP
+	bd_t *bip = (bd_t *) __res;
+	printk("\n");
+	printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
+	printk("\n");
+	printk("bi_s_version\t %s\n", bip->bi_s_version);
+	printk("bi_r_version\t %s\n", bip->bi_r_version);
+	printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize,
+	       bip->bi_memsize / (1024 * 1000));
+	printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0,
+	       bip->bi_enetaddr[0], bip->bi_enetaddr[1], bip->bi_enetaddr[2],
+	       bip->bi_enetaddr[3], bip->bi_enetaddr[4], bip->bi_enetaddr[5]);
+
+	printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n",
+	       bip->bi_intfreq, bip->bi_intfreq / 1000000);
+
+	printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n",
+	       bip->bi_busfreq, bip->bi_busfreq / 1000000);
+	printk("bi_tbfreq\t 0x%8.8x\t TB freq:\t %dMHz\n",
+	       bip->bi_tbfreq, bip->bi_tbfreq / 1000000);
+
+	printk("\n");
+#endif
+	ibm4xxPIC_InitSenses = redwood6_IRQ_initsenses;
+	ibm4xxPIC_NumInitSenses = sizeof(redwood6_IRQ_initsenses);
+
+	/* Identify the system */
+	printk(KERN_INFO "IBM Redwood6 (STBx25XX) Platform\n");
+	printk(KERN_INFO
+	       "Port by MontaVista Software, Inc. (source@mvista.com)\n");
+}
+
+void __init
+redwood6_map_io(void)
+{
+	int i;
+
+	ppc4xx_map_io();
+	for (i = 0; i < 16; i++) {
+		unsigned long v, p;
+
+		/* 0x400x0000 -> 0xe00x0000 */
+		p = 0x40000000 | (i << 16);
+		v = STBx25xx_IO_BASE | (i << 16);
+
+		io_block_mapping(v, p, PAGE_SIZE,
+				 _PAGE_NO_CACHE | pgprot_val(PAGE_KERNEL) |
+				 _PAGE_GUARDED);
+	}
+}
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	ppc4xx_init(r3, r4, r5, r6, r7);
+
+	ppc_md.setup_arch = redwood6_setup_arch;
+	ppc_md.setup_io_mappings = redwood6_map_io;
+}
diff -Nru a/arch/ppc/platforms/4xx/redwood6.h b/arch/ppc/platforms/4xx/redwood6.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/redwood6.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,76 @@
+/*
+ * 	Author: MontaVista Software, Inc.
+ *          Armin Kuster
+ *
+ *    Module name: redwood6.h
+ *
+ *    Description:
+ *      Macros, definitions, and data structures specific to the IBM PowerPC
+ *      STBx25xx "Redwood6" evaluation board.
+ *
+ *    Copyright 2002 MontaVista Software Inc.
+ * 	Author: MontaVista Software, Inc.
+ *          Armin Kuster
+ *
+ * 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.
+ *
+ * THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ * WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ * NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ * USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * 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.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_REDWOOD5_H__
+#define __ASM_REDWOOD5_H__
+
+/* Redwood6 has an STBx25xx core */
+#include <platforms/4xx/ibmstbx25.h>
+
+#ifndef __ASSEMBLY__
+typedef struct board_info {
+	unsigned char bi_s_version[4];	/* Version of this structure */
+	unsigned char bi_r_version[30];	/* Version of the IBM ROM */
+	unsigned int bi_memsize;	/* DRAM installed, in bytes */
+	unsigned int bi_dummy;	/* field shouldn't exist */
+	unsigned char bi_enetaddr[6];	/* Ethernet MAC address */
+	unsigned int bi_intfreq;	/* Processor speed, in Hz */
+	unsigned int bi_busfreq;	/* Bus speed, in Hz */
+	unsigned int bi_tbfreq;	/* Software timebase freq */
+} bd_t;
+#endif				/* !__ASSEMBLY__ */
+
+#define SMC91111_BASE_ADDR	0xf2030300
+#define SMC91111_IRQ		27
+#define IDE_XLINUX_MUX_BASE        0xf2040000
+#define IDE_DMA_ADDR	0xfce00000
+
+#ifdef MAX_HWIFS
+#undef MAX_HWIFS
+#endif
+#define MAX_HWIFS		1
+
+#define _IO_BASE	0
+#define _ISA_MEM_BASE	0
+#define PCI_DRAM_OFFSET	0
+
+#define BASE_BAUD		1267200
+
+#define PPC4xx_MACHINE_NAME	"IBM Redwood6"
+
+#endif				/* __ASM_REDWOOD5_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c
--- a/arch/ppc/platforms/4xx/walnut.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/walnut.c	Wed Jan  8 20:04:44 2003
@@ -1,8 +1,8 @@
 /*
  *
- *    Copyrigh t(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
+ *    Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
  *
- *    Copyright 2000-2001 MontaVista Software Inc.
+ *    Copyright 2000-2002 MontaVista Software Inc.
  *      Completed implementation.
  *      Author: MontaVista Software, Inc.  <source@mvista.com>
  *
@@ -14,13 +14,6 @@
  *      code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
  *      <dan@net4x.com>.
  *
- *      History: 11/09/2001 - armin
- *      added board_init to add in additional instuctions needed during platfrom_init
- *
- *      01/22/2002 - Armin
- *      converted pci to ocp
- *
- *
  */
 #include <linux/config.h>
 #include <linux/init.h>
@@ -39,13 +32,8 @@
 #include <asm/page.h>
 #include <asm/time.h>
 #include <asm/io.h>
-#include <platforms/4xx/ibm_ocp.h>
-
-#ifdef CONFIG_PPC_RTC
+#include <asm/ibm_ocp_pci.h>
 #include <asm/todc.h>
-#endif
-
-#include "walnut.h"
 
 #undef DEBUG
 
@@ -82,8 +70,9 @@
 };
 
 void __init
-board_setup_arch(void)
+walnut_setup_arch(void)
 {
+
 	void *fpga_brdc;
 	unsigned char fpga_brdc_data;
 	void *fpga_enable;
@@ -91,6 +80,8 @@
 	void *fpga_status;
 	void *fpga_trigger;
 
+	ppc4xx_setup_arch();
+
 	kb_data = ioremap(WALNUT_PS2_BASE, 8);
 	if (!kb_data) {
 		printk(KERN_CRIT
@@ -123,20 +114,19 @@
 
 	writeb(0x3, fpga_trigger);
 
-#ifdef CONFIG_PPC_RTC
 	/* RTC step for the walnut */
 	walnut_rtc_base = (void *) WALNUT_RTC_VADDR;
 	TODC_INIT(TODC_TYPE_DS1743, walnut_rtc_base, walnut_rtc_base,
 		  walnut_rtc_base, 8);
-#endif				/* CONFIG_PPC_RTC */
+	/* Identify the system */
+	printk("IBM Walnut port (C) 2000-2002 MontaVista Software, Inc. (source@mvista.com)\n");
 }
 
 void __init
-bios_fixup(struct pci_controller *hose, void *pcil0_base)
+bios_fixup(struct pci_controller *hose, struct pcil0_regs *pcip)
 {
-
+#ifdef CONFIG_PCI
 	unsigned int bar_response, bar;
-	struct pcil0_regs *pcip;
 	/*
 	 * Expected PCI mapping:
 	 *
@@ -155,7 +145,6 @@
 
 #ifdef DEBUG
 	int i;
-	pcip = (struct pcil0_regs *) pcil0_base;
 
 	printk("ioremap PCLIO_BASE = 0x%x\n", pcip);
 	printk("PCI bridge regs before fixup \n");
@@ -170,8 +159,6 @@
 	printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms)));
 	printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
 
-#else
-	pcip = (struct pcil0_regs *) pcil0_base;
 #endif
 
 	/* added for IBM boot rom version 1.15 bios bar changes  -AK */
@@ -233,24 +220,27 @@
 	printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
 
 #endif
+#endif
 }
 
 void __init
-board_io_mapping(void)
+walnut_map_io(void)
 {
+	ppc4xx_map_io();
 	io_block_mapping(WALNUT_RTC_VADDR,
 			 WALNUT_RTC_PADDR, WALNUT_RTC_SIZE, _PAGE_IO);
 }
 
 void __init
-board_setup_irq(void)
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
 {
-}
+	ppc4xx_init(r3, r4, r5, r6, r7);
 
-void __init
-board_init(void)
-{
-#ifdef CONFIG_PPC_RTC
+	ppc_md.setup_arch = walnut_setup_arch;
+	ppc_md.setup_io_mappings = walnut_map_io;
+
+#ifdef CONFIG_GEN_RTC
 	ppc_md.time_init = todc_time_init;
 	ppc_md.set_rtc_time = todc_set_rtc_time;
 	ppc_md.get_rtc_time = todc_get_rtc_time;
diff -Nru a/arch/ppc/platforms/4xx/walnut.h b/arch/ppc/platforms/4xx/walnut.h
--- a/arch/ppc/platforms/4xx/walnut.h	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/4xx/walnut.h	Wed Jan  8 20:04:44 2003
@@ -60,10 +60,6 @@
 #define WALNUT_RTC_VADDR	WALNUT_RTC_PADDR
 #define WALNUT_RTC_SIZE		((uint)8*1024)
 
-/* ps2 keyboard and mouse */
-#define KEYBOARD_IRQ		25
-#define AUX_IRQ			26
-
 #ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
 #define BASE_BAUD		201600
 #else
diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
--- a/arch/ppc/platforms/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/Makefile	Wed Jan  8 20:04:45 2003
@@ -46,10 +46,7 @@
 obj-$(CONFIG_SANDPOINT)		+= sandpoint_setup.o sandpoint_pci.o
 obj-$(CONFIG_SPRUCE)		+= spruce_setup.o spruce_pci.o
 obj-$(CONFIG_ZX4500)		+= zx4500_setup.o zx4500_pci.o
-obj-$(CONFIG_PPC_ISERIES)	+= iSeries_setup.o iSeries_time.o \
-					iSeries_dma.o iSeries_pic.o
 
 ifeq ($(CONFIG_SMP),y)
 obj-$(CONFIG_ALL_PPC)		+= pmac_smp.o chrp_smp.o
-obj-$(CONFIG_PPC_ISERIES)	+= iSeries_smp.o
 endif
diff -Nru a/arch/ppc/platforms/adir_pic.c b/arch/ppc/platforms/adir_pic.c
--- a/arch/ppc/platforms/adir_pic.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/adir_pic.c	Wed Jan  8 20:04:43 2003
@@ -118,7 +118,7 @@
 }
 
 int
-adir_get_irq(void)
+adir_get_irq(struct pt_regs *regs)
 {
 	int	irq;
 
@@ -126,7 +126,7 @@
 		return irq;
 
 	if (irq == ADIR_IRQ_VT82C686_INTR)
-		irq = i8259_poll();
+		irq = i8259_irq(regs);
 
 	return irq;
 }
diff -Nru a/arch/ppc/platforms/adir_setup.c b/arch/ppc/platforms/adir_setup.c
--- a/arch/ppc/platforms/adir_setup.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/adir_setup.c	Wed Jan  8 20:04:43 2003
@@ -158,8 +158,6 @@
 	adir_restart(NULL);
 }
 
-extern unsigned int boot_mem_size;
-
 static unsigned long __init
 adir_find_end_of_memory(void)
 {
diff -Nru a/arch/ppc/platforms/ccm.h b/arch/ppc/platforms/ccm.h
--- a/arch/ppc/platforms/ccm.h	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/ccm.h	Wed Jan  8 20:04:45 2003
@@ -1,7 +1,7 @@
 /*
  * Siemens Card Controller Module specific definitions
  * 
- * Copyright (c) 2001 Wolfgang Denk (wd@denx.de)
+ * Copyright (C) 2001-2002 Wolfgang Denk (wd@denx.de)
  */
 
 #ifndef __MACH_CCM_H
@@ -17,9 +17,9 @@
 #define	IMAP_ADDR     CCM_IMMR_BASE	/* physical base address of IMMR area	*/
 #define IMAP_SIZE     CCM_IMAP_SIZE	/* mapped size of IMMR area		*/
 
-#define	FEC_INTERRUPT	15		/* = SIU_LEVEL7				*/
-#define	DEC_INTERRUPT	13		/* = SIU_LEVEL6				*/
-#define	CPM_INTERRUPT	11		/* = SIU_LEVEL5 (was: SIU_LEVEL2)	*/
+#define	FEC_INTERRUPT	13		/* = SIU_LEVEL6				*/
+#define	DEC_INTERRUPT	11		/* = SIU_LEVEL5				*/
+#define	CPM_INTERRUPT	 9		/* = SIU_LEVEL4				*/
 
 /* We don't use the 8259.
 */
diff -Nru a/arch/ppc/platforms/iSeries_dma.c b/arch/ppc/platforms/iSeries_dma.c
--- a/arch/ppc/platforms/iSeries_dma.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1049 +0,0 @@
-/*
- * iSeries_dma.c
- * Copyright (C) 2001 Mike Corrigan  IBM Corporation
- *
- * Dynamic DMA mapping support.
- * 
- * Manages the TCE space assigned to this partition
- * 
- * modeled from pci-dma.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * 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/init.h>
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/mm.h>
-#include <linux/spinlock.h>
-#include <linux/string.h>
-#include <linux/pci.h>
-#include <asm/io.h>
-#include <asm/iSeries/HvCallXm.h>
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/iSeries_dma.h>
-#include <asm/iSeries/iSeries_pci.h>
-
-struct pci_dev  * iSeries_veth_dev = NULL;
-struct pci_dev  * iSeries_vio_dev  = NULL;
-
-struct TceTable   virtBusTceTable;	/* Tce table for virtual bus */
-
-struct TceTable * tceTables[256];	// Tce tables for 256 busses
-					// Bus 255 is the virtual bus
-					// zero indicates no bus defined
-		  // allocates a contiguous range of tces (power-of-2 size)
-static long       alloc_tce_range( struct TceTable *, 
-				   unsigned order );
-		  // allocates a contiguous range of tces (power-of-2 size)
-		  // assumes lock already held
-static long       alloc_tce_range_nolock( struct TceTable *, 
-					  unsigned order );
-		  // frees a contiguous range of tces (power-of-2 size)
-static void       free_tce_range( struct TceTable *, 
-				  long tcenum, 
-				  unsigned order );
-		  // frees a contiguous rnage of tces (power-of-2 size)
-		  // assumes lock already held
-static void       free_tce_range_nolock( struct TceTable *, 
-				  	 long tcenum, 
-					 unsigned order );
-		  // allocates a range of tces and sets them to the 
-		  // pages 
-static 		  dma_addr_t get_tces( struct TceTable *, 
-				       unsigned order, 
-				       void *page, 
-			    	       unsigned numPages,
-			    	       int tceType,
-			    	       int direction );
-static void       free_tces( struct TceTable *, 
-			     dma_addr_t tce, 
-			     unsigned order,
-			     unsigned numPages );
-static long       test_tce_range( struct TceTable *, 
-				  long tcenum, 
-				  unsigned order );
-
-static unsigned   fill_scatterlist_sg( struct scatterlist *sg, int nents, 
-		        	       dma_addr_t dma_addr, unsigned long numTces );
-
-static unsigned long num_tces_sg( struct scatterlist *sg, 
-				  int nents );
-	
-static dma_addr_t create_tces_sg( struct TceTable *tbl, 
-				  struct scatterlist *sg, 
-			 	  int nents, 
-				  unsigned numTces,
-				  int tceType, 
-				  int direction );
-
-static unsigned __inline__ count_leading_zeros32( unsigned long x )
-{
-	unsigned lz;
-	asm("cntlzw %0,%1" : "=r"(lz) : "r"(x));
-	return lz;
-}
-
-static void __inline__ build_tce( struct TceTable * tbl, long tcenum, 
-			     unsigned long uaddr, int tceType, int direction )
-{
-	union Tce tce;
-	
-	tce.wholeTce = 0;
-	tce.tceBits.rpn = (virt_to_absolute(uaddr)) >> PAGE_SHIFT;
-	// If for virtual bus
-	if ( tceType == TCE_VB ) {
-		tce.tceBits.valid = 1;
-		tce.tceBits.allIo = 1;
-		if ( direction != PCI_DMA_TODEVICE )
-			tce.tceBits.readWrite = 1;
-	}
-	// If for PCI bus
-	else {
-		tce.tceBits.readWrite = 1; // Read allowed 
-		if ( direction != PCI_DMA_TODEVICE )
-			tce.tceBits.pciWrite = 1;
-	}
-	HvCallXm_setTce( (u64)tbl->index, (u64)tcenum, tce.wholeTce );
-
-}
-
-
-
-// Build a TceTable structure.  This contains a multi-level bit map which
-// is used to manage allocation of the tce space.
-
-struct TceTable * build_tce_table( struct HvTceTableManagerCB * tceTableParms,
-				   struct TceTable * tbl )
-{
-	unsigned long bits, bytes, totalBytes;
-	unsigned long numBits[NUM_TCE_LEVELS], numBytes[NUM_TCE_LEVELS];
-	unsigned i, k, m;
-	unsigned char * pos, * p, b;
-
-	tbl->size = tceTableParms->size;
-	tbl->busNumber = tceTableParms->busNumber;
-	tbl->startOffset = tceTableParms->startOffset;
-	tbl->index = tceTableParms->index;
-	spin_lock_init( &(tbl->lock) );
-	
-	tbl->mlbm.maxLevel = 0;
-
-	// Compute number of bits and bytes for each level of the
-	// multi-level bit map
-	// 
-	totalBytes = 0;
-	bits = tbl->size * (PAGE_SIZE / sizeof( union Tce ));
-	
-	for ( i=0; i<NUM_TCE_LEVELS; ++i ) {
-		bytes = (bits+7)/8;
-#ifdef DEBUG_TCE
-		printk("build_tce_table: level %d bits=%ld, bytes=%ld\n", i, bits, bytes );
-#endif
-		numBits[i] = bits;
-		numBytes[i] = bytes;
-		bits /= 2;
-		/* we need extra space at the end that's a multiple of 8 bytes */
-		/* for the cntlzw algorithm to work correctly. */
-		/* but we don't want the bits turned on or used, so we don't muck with numBytes[i] */
-		totalBytes += (bytes + 7) & ~7;
-	}
-#ifdef DEBUG_TCE
-	printk("build_tce_table: totalBytes=%ld\n", totalBytes );
-#endif
-	
-	pos = (char *)__get_free_pages( GFP_ATOMIC, get_order( totalBytes )); 
-	if ( !pos )
-		return NULL;
-
-	memset( pos, 0, totalBytes );
-	
-	// For each level, fill in the pointer to the bit map,
-	// and turn on the last bit in the bit map (if the
-	// number of bits in the map is odd).  The highest
-	// level will get all of its bits turned on.
-	
-	for (i=0; i<NUM_TCE_LEVELS; ++i) {
-		if ( numBytes[i] ) {
-			tbl->mlbm.level[i].map = pos;
-			tbl->mlbm.maxLevel = i;
-
-			if ( numBits[i] & 1 ) {
-				p = pos + numBytes[i] - 1;
-				m = (( numBits[i] % 8) - 1) & 7;
-				*p = 0x80 >> m;
-#ifdef DEBUG_TCE
-				printk("build_tce_table: level %d last bit %x\n", i, 0x80>>m );
-#endif				
-			}
-		}
-		else
-			tbl->mlbm.level[i].map = 0;
-		/* see the comment up above on the totalBytes calculation for why we do this. */
-		pos += (numBytes[i] + 7) & ~7;
-		tbl->mlbm.level[i].numBits = numBits[i];
-		tbl->mlbm.level[i].numBytes = numBytes[i];
-		
-	}
-
-	// For the highest level, turn on all the bits
-	
-	i = tbl->mlbm.maxLevel;
-	p = tbl->mlbm.level[i].map;
-	m = numBits[i];
-#ifdef DEBUG_TCE
-	printk("build_tce_table: highest level (%d) has all bits set\n", i);
-#endif	
-	for (k=0; k<numBytes[i]; ++k) {
-		if ( m >= 8 ) {
-			// handle full bytes
-			*p++ = 0xff;
-			m -= 8;
-		}
-		else {
-			// handle the last partial byte
-			b = 0x80;
-			*p = 0;
-			while (m) {
-				*p |= b;
-				b >>= 1;
-				--m;
-			}
-		}
-	}
-
-	return tbl;
-	
-}
-
-static long alloc_tce_range( struct TceTable *tbl, unsigned order )
-{
-	long retval;
-	unsigned long flags;
-	
-	// Lock the tce allocation bitmap
-	spin_lock_irqsave( &(tbl->lock), flags );
-
-	// Do the actual work
-	retval = alloc_tce_range_nolock( tbl, order );
-	
-	// Unlock the tce allocation bitmap
-	spin_unlock_irqrestore( &(tbl->lock), flags );
-
-	return retval;
-}
-
-static long alloc_tce_range_nolock( struct TceTable *tbl, unsigned order )
-{
-	unsigned long numBits, numBytes;
-	unsigned long i, bit, block, mask;
-	long tcenum;
-	u32 * map;
-
-	// If the order (power of 2 size) requested is larger than our
-	// biggest, indicate failure
-	if ( order > tbl->mlbm.maxLevel ) {
-#ifdef DEBUG_TCE
-		printk("alloc_tce_range_nolock: invalid order requested, order = %d\n", order );
-#endif
-		return -1;
-	}
-	
-	numBits =  tbl->mlbm.level[order].numBits;
-	numBytes = tbl->mlbm.level[order].numBytes;
-	map =      (u32 *)(tbl->mlbm.level[order].map);
-
-	// Initialize return value to -1 (failure)
-	tcenum = -1;
-
-	// Loop through the bytes of the bitmap
-	for (i=0; i<numBytes/4; ++i) {
-		if ( *map ) {
-			// A free block is found, compute the block
-			// number (of this size)
-			bit = count_leading_zeros32( *map );
-			block = (i * 32) + bit;
-			// turn off the bit in the map to indicate
-			// that the block is now in use
-			mask = 0xffffffff ^ (0x80000000 >> bit);
-			*map &= mask;
-			// compute the index into our tce table for
-			// the first tce in the block
-#ifdef DEBUG_TCE
-			printk("alloc_tce_range_nolock: allocating block %ld, (byte=%ld, bit=%ld) order %d\n", block, i, bit, order );
-#endif
-			tcenum = block << order;
-			break;
-		}
-		++map;
-	}
-
-#ifdef DEBUG_TCE
-	if ( tcenum == -1 ) {
-		printk("alloc_tce_range_nolock: no available blocks of order = %d\n", order );
-		if ( order < tbl->mlbm.maxLevel )
-			printk("alloc_tce_range_nolock: trying next bigger size\n" );
-		else
-			printk("alloc_tce_range_nolock: maximum size reached...failing\n");
-	}
-#endif	
-	
-	// If no block of the requested size was found, try the next
-	// size bigger.  If one of those is found, return the second
-	// half of the block to freespace and keep the first half
-	if ( ( tcenum == -1 ) && ( order < tbl->mlbm.maxLevel  ) ) {
-		tcenum = alloc_tce_range_nolock( tbl, order+1 );
-		if ( tcenum != -1 ) {
-			free_tce_range_nolock( tbl, tcenum+(1<<order), order );
-		}
-	}
-	
-	// Return the index of the first tce in the block
-	// (or -1 if we failed)
-	return tcenum;
-	
-}
-
-static void	free_tce_range( struct TceTable *tbl, long tcenum, unsigned order )
-{
-	unsigned long flags;
-
-	// Lock the tce allocation bitmap
-	spin_lock_irqsave( &(tbl->lock), flags );
-
-	// Do the actual work
-	free_tce_range_nolock( tbl, tcenum, order );
-	
-	// Unlock the tce allocation bitmap
-	spin_unlock_irqrestore( &(tbl->lock), flags );
-
-}
-
-static void	free_tce_range_nolock( struct TceTable *tbl, long tcenum, unsigned order )
-{
-	unsigned long block;
-	unsigned byte, bit, mask, b;
-	unsigned char  * map, * bytep;
-	
-	if ( order > tbl->mlbm.maxLevel ) {
-		printk("free_tce_range: order too large, order = %d\n", order );
-		return;
-	}
-	
-	block = tcenum >> order;
-	if ( tcenum != (block << order ) ) {
-		printk("free_tce_range: tcenum %lx is not on appropriate boundary for order %x\n", tcenum, order );
-		return;
-	}
-	if ( block >= tbl->mlbm.level[order].numBits ) {
-		printk("free_tce_range: tcenum %lx is outside the range of this map (order %x, numBits %lx\n", tcenum, order, tbl->mlbm.level[order].numBits );
-		return;
-	}
-#ifdef DEBUG_TCE	
-	if ( test_tce_range( tbl, tcenum, order ) ) {
-		printk("free_tce_range: freeing range not completely allocated.\n");
-		printk("free_tce_range:   TceTable %p, tcenum %lx, order %x\n", tbl, tcenum, order );
-	}
-#endif
-	map = tbl->mlbm.level[order].map;
-	byte  = block / 8;
-	bit   = block % 8;
-	mask  = 0x80 >> bit;
-	bytep = map + byte;
-#ifdef DEBUG_TCE
-	printk("free_tce_range_nolock: freeing block %ld (byte=%d, bit=%d) of order %d\n",block, byte, bit, order);
-	if ( *bytep & mask )
-		printk("free_tce_range: already free: TceTable %p, tcenum %lx, order %x\n", tbl, tcenum, order );
-#endif	
-	*bytep |= mask;
-
-	// If there is a higher level in the bit map than this we may be
-	// able to buddy up this block with its partner.
-	//   If this is the highest level we can't buddy up
-	//   If this level has an odd number of bits and
-	//      we are freeing the last block we can't buddy up
-	// don't buddy up if it's in the first 1/4 of the bits
-	  if ( ( order < tbl->mlbm.maxLevel ) &&
-	       ( ( 0 == ( tbl->mlbm.level[order].numBits & 1 ) ) ||
-		 ( block < tbl->mlbm.level[order].numBits-1 ) )  &&
-	       ( block > (tbl->mlbm.level[order].numBits/4) ) ) {
-	
-		// See if we can buddy up the block we just freed
-		bit  &= 6;		// get to the first of the buddy bits
-		mask  = 0xc0 >> bit;	// build two bit mask
-		b     = *bytep & mask;	// Get the two bits
-		if ( 0 == (b ^ mask) ) { // If both bits are on
-			// both of the buddy blocks are free we can combine them
-			*bytep ^= mask;	// turn off the two bits
-			block = ( byte * 8 ) + bit; // block of first of buddies
-			tcenum = block << order;
-			// free the buddied block
-#ifdef DEBUG_TCE
-			printk("free_tce_range: buddying up block %ld and block %ld\n", block, block+1);
-#endif			
-			free_tce_range_nolock( tbl, tcenum, order+1 ); 
-		}	
-	}
-}
-
-static long	test_tce_range( struct TceTable *tbl, long tcenum, unsigned order )
-{
-	unsigned long block;
-	unsigned byte, bit, mask, b;
-	long	retval, retLeft, retRight;
-	unsigned char  * map;
-	
-	map = tbl->mlbm.level[order].map;
-	block = tcenum >> order;
-	byte = block / 8;		// Byte within bitmap
-	bit  = block % 8;		// Bit within byte
-	mask = 0x80 >> bit;		
-	b    = (*(map+byte) & mask );	// 0 if block is allocated, else free
-	if ( b ) 
-		retval = 1;		// 1 == block is free
-	else
-		retval = 0;		// 0 == block is allocated
-	// Test bits at all levels below this to ensure that all agree
-
-	if (order) {
-		retLeft  = test_tce_range( tbl, tcenum, order-1 );
-		retRight = test_tce_range( tbl, tcenum+(1<<(order-1)), order-1 );
-		if ( retLeft || retRight ) {
-			retval = 2;		
-		}
-	}
-
-	// Test bits at all levels above this to ensure that all agree
-	
-	return retval;
-}
-
-static dma_addr_t get_tces( struct TceTable *tbl, unsigned order, void *page, unsigned numPages, int tceType, int direction )
-{
-	long tcenum;
-	unsigned long uaddr;
-	unsigned i;
-	dma_addr_t retTce = NO_TCE;
-
-	uaddr = (unsigned long)page & PAGE_MASK;
-	
-	// Allocate a range of tces
-	tcenum = alloc_tce_range( tbl, order );
-	if ( tcenum != -1 ) {
-		// We got the tces we wanted
-		tcenum += tbl->startOffset;	// Offset into real TCE table
-		retTce = tcenum << PAGE_SHIFT;	// Set the return dma address
-		// Setup a tce for each page
-		for (i=0; i<numPages; ++i) {
-			build_tce( tbl, tcenum, uaddr, tceType, direction );
-			++tcenum;
-			uaddr += PAGE_SIZE;
-		}
-	}
-#ifdef DEBUG_TCE
-	else
-		printk("alloc_tce_range failed\n");
-#endif	
-	return retTce; 
-}
-
-static void free_tces( struct TceTable *tbl, dma_addr_t dma_addr, unsigned order, unsigned numPages )
-{
-	long tcenum, freeTce, maxTcenum;
-	unsigned i;
-	union Tce tce;
-
-	maxTcenum = (tbl->size * (PAGE_SIZE / sizeof(union Tce))) - 1;
-	
-	tcenum = dma_addr >> PAGE_SHIFT;
-	tcenum -= tbl->startOffset;
-
-	if ( tcenum > maxTcenum ) {
-		printk("free_tces: tcenum > maxTcenum, tcenum = %ld, maxTcenum = %ld\n",
-				tcenum, maxTcenum );
-		printk("free_tces:    TCE Table at %16lx\n", (unsigned long)tbl );
-		printk("free_tces:      bus#     %lu\n", (unsigned long)tbl->busNumber );
-		printk("free_tces:      size     %lu\n", (unsigned long)tbl->size );
-		printk("free_tces:      startOff %lu\n", (unsigned long)tbl->startOffset );
-		printk("free_tces:      index    %lu\n", (unsigned long)tbl->index );
-		return;
-	}
-	
-	freeTce = tcenum;
-
-	for (i=0; i<numPages; ++i) {
-		tce.wholeTce = 0;
-		HvCallXm_setTce( (u64)tbl->index, (u64)tcenum, tce.wholeTce );
-		++tcenum;
-	}
-
-	free_tce_range( tbl, freeTce, order );
-
-}
-
-void __init create_virtual_bus_tce_table(void)
-{
-	struct TceTable * t;
-	struct HvTceTableManagerCB virtBusTceTableParms;
-	u64 absParmsPtr;
-
-	virtBusTceTableParms.busNumber = 255;	/* Bus 255 is the virtual bus */
-	virtBusTceTableParms.virtualBusFlag = 0xff; /* Ask for virtual bus */
-	
-	absParmsPtr = virt_to_absolute( (u32)&virtBusTceTableParms );
-	HvCallXm_getTceTableParms( absParmsPtr );
-	
-	t = build_tce_table( &virtBusTceTableParms, &virtBusTceTable );
-	if ( t ) {
-		tceTables[255] = t;
-		printk("Virtual Bus TCE table built successfully.\n");
-		printk("  TCE table size = %ld entries\n", 
-				(unsigned long)t->size*(PAGE_SIZE/sizeof(union Tce)) );
-		printk("  TCE table token = %d\n",
-				(unsigned)t->index );
-		printk("  TCE table start entry = 0x%lx\n",
-				(unsigned long)t->startOffset );
-	}
-	else 
-		printk("Virtual Bus TCE table failed.\n");
-}
-
-void __init create_pci_bus_tce_table( unsigned busNumber )
-{
-	struct TceTable * t;
-	struct TceTable * newTceTable;
-	struct HvTceTableManagerCB pciBusTceTableParms;
-	u64 absParmsPtr;
-	unsigned i;
-
-	if ( busNumber > 254 ) {
-		printk("PCI Bus TCE table failed.\n");
-		printk("  Invalid bus number %u\n", busNumber );
-		return;
-	}
-
-	newTceTable = kmalloc( sizeof(struct TceTable), GFP_KERNEL );
-	
-	pciBusTceTableParms.busNumber = busNumber;
-	pciBusTceTableParms.virtualBusFlag = 0; 
-	
-	absParmsPtr = virt_to_absolute( (u32)&pciBusTceTableParms );
-	HvCallXm_getTceTableParms( absParmsPtr );
-
-	// Determine if the table identified by the index and startOffset
-	// returned by the hypervisor for this bus has already been created.
-
-	for ( i=0; i<255; ++i) {
-		t = tceTables[i];
-		if ( t ) {
-			if ( ( t->index == pciBusTceTableParms.index ) && 
-		     	    ( t->startOffset == pciBusTceTableParms.startOffset ) ) {
-				if ( t->size != pciBusTceTableParms.size ) 
-					printk("PCI Bus %d Shares a TCE table with Bus %d, but sizes differ\n", busNumber, i );
-				else
-					printk("PCI Bus %d Shares a TCE table with bus %d\n", busNumber, i );
-				tceTables[busNumber] = t;
-				break;
-			}
-		}
-	}
-
-	if ( ! tceTables[busNumber] ) {
-	
-		t = build_tce_table( &pciBusTceTableParms, newTceTable );
-		if ( t ) {
-			tceTables[busNumber] = t;
-			printk("PCI Bus %d TCE table built successfully.\n", busNumber);
-			printk("  TCE table size = %ld entries\n", 
-					(unsigned long)t->size*(PAGE_SIZE/sizeof(union Tce)) );
-			printk("  TCE table token = %d\n",
-					(unsigned)t->index );
-			printk("  TCE table start entry = 0x%lx\n",
-					(unsigned long)t->startOffset );
-		}
-		else {
-			kfree( newTceTable );
-			printk("PCI Bus %d TCE table failed.\n", busNumber );
-		}
-	}
-}
-
-
-// Allocates a contiguous real buffer and creates TCEs over it.
-// Returns the virtual address of the buffer and sets dma_handle
-// to the dma address (tce) of the first page.
-void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
-			   dma_addr_t *dma_handle)
-{
-	struct TceTable * tbl;
-	void *ret = NULL;
-	unsigned order, nPages, bus;
-	dma_addr_t tce;
-	int tceType;
-	
-	size = PAGE_ALIGN(size);
-	order = get_order(size);
-	nPages = 1 << order;
-
-	// If no pci_dev then use virtual bus
-	if (hwdev == NULL ) {
-		bus = 255;
-		tceType = TCE_VB;
-	}
-	else {
-#ifdef CONFIG_PCI        
-		// Get the iSeries bus # to use as an index
-		// into the TCE table array
-		bus = ISERIES_GET_BUS( hwdev );
-		tceType = TCE_PCI;
-#else
-                BUG();
-                return NULL;
-#endif /* CONFIG_PCI */
-	}
-	
-	tbl = tceTables[bus];
-	if ( tbl ) {
-		// Alloc enough pages (and possibly more)
-		ret = (void *)__get_free_pages( GFP_ATOMIC, order );
-		if ( ret ) {
-			// Page allocation succeeded
-			memset(ret, 0, nPages << PAGE_SHIFT);
-			// Set up tces to cover the allocated range
-			tce = get_tces( tbl, order, ret, nPages, tceType,
-					PCI_DMA_BIDIRECTIONAL );
-			if ( tce == NO_TCE ) {
-#ifdef DEBUG_TCE				
-				printk("pci_alloc_consistent: get_tces failed\n" );
-#endif
-				free_pages( (unsigned long)ret, order );
-				ret = NULL;
-			}
-			else
-			{
-				*dma_handle = tce;
-			}
-		}
-#ifdef DEBUG_TCE
-		else
-			printk("pci_alloc_consistent: __get_free_pages failed for order = %d\n", order);
-#endif		
-	}
-
-	return ret;
-}
-
-void pci_free_consistent(struct pci_dev *hwdev, size_t size,
-			 void *vaddr, dma_addr_t dma_handle)
-{
-	struct TceTable * tbl;
-	unsigned order, nPages, bus;
-	
-	size = PAGE_ALIGN(size);
-	order = get_order(size);
-	nPages = 1 << order;
-	
-	// If no pci_dev then use virtual bus
-	if (hwdev == NULL )
-		bus = 255;
-	else {
-#ifdef CONFIG_PCI        
-		// Get the iSeries bus # to use as an index
-		// into the TCE table array
-		bus = ISERIES_GET_BUS( hwdev );
-#else
-                BUG();
-                return;
-#endif /* CONFIG_PCI */
-	}
-
-	if ( bus > 255 ) {
-		printk("pci_free_consistent: invalid bus # %d\n", bus );
-		printk("pci_free_consistent:   hwdev = %08lx\n", (unsigned long)hwdev );
-	}
-	
-	tbl = tceTables[bus];
-
-	if ( tbl ) {
-		free_tces( tbl, dma_handle, order, nPages );
-		free_pages( (unsigned long)vaddr, order );
-	}
-}
-
-// Creates TCEs for a user provided buffer.  The user buffer must be 
-// contiguous real kernel storage (not vmalloc).  The address of the buffer
-// passed here is the kernel (virtual) address of the buffer.  The buffer
-// need not be page aligned, the dma_addr_t returned will point to the same
-// byte within the page as vaddr.
-dma_addr_t pci_map_single( struct pci_dev *hwdev, void *vaddr, size_t size, int direction )
-{
-	struct TceTable * tbl;
-	dma_addr_t dma_handle;
-	unsigned long uaddr;
-	unsigned order, nPages, bus;
-	int tceType;
-
-	if ( direction == PCI_DMA_NONE )
-		BUG();
-	
-	dma_handle = NO_TCE;
-	
-	uaddr = (unsigned long)vaddr;
-	nPages = PAGE_ALIGN( uaddr + size ) - ( uaddr & PAGE_MASK );
-	order = get_order( nPages & PAGE_MASK );
-	nPages >>= PAGE_SHIFT;
-	
-	// If no pci_dev then use virtual bus
-	if (hwdev == NULL ) {
-		bus = 255;
-		tceType = TCE_VB;
-	}
-	else {
-#ifdef CONFIG_PCI        
-		// Get the iSeries bus # to use as an index
-		// into the TCE table array
-		bus = ISERIES_GET_BUS( hwdev );
-		tceType = TCE_PCI;
-#else
-                BUG();
-                return NO_TCE;
-#endif /* CONFIG_PCI */
-
-	}
-	
-	tbl = tceTables[bus];
-
-	if ( tbl ) {
-		dma_handle = get_tces( tbl, order, vaddr, nPages, tceType, 
-					direction );
-		dma_handle |= ( uaddr & ~PAGE_MASK );
-	}
-
-	return dma_handle;
-}
-
-void pci_unmap_single( struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction )
-{
-	struct TceTable * tbl;
-	unsigned order, nPages, bus;
-	
-	if ( direction == PCI_DMA_NONE )
-		BUG();
-
-	nPages = PAGE_ALIGN( dma_handle + size ) - ( dma_handle & PAGE_MASK );
-	order = get_order( nPages & PAGE_MASK );
-	nPages >>= PAGE_SHIFT;
-	
-	// If no pci_dev then use virtual bus
-	if (hwdev == NULL )
-		bus = 255;
-	else {
-#ifdef CONFIG_PCI        
-		// Get the iSeries bus # to use as an index
-		// into the TCE table array
-		bus = ISERIES_GET_BUS( hwdev );
-#else
-                BUG();
-                return;
-#endif /* CONFIG_PCI */
-	}
-	
-	if ( bus > 255 ) {
-		printk("pci_unmap_single: invalid bus # %d\n", bus );
-		printk("pci_unmap_single:   hwdev = %08lx\n", (unsigned long)hwdev );
-	}
-
-	tbl = tceTables[bus];
-
-	if ( tbl ) 
-		free_tces( tbl, dma_handle, order, nPages );
-
-}
-
-// Figure out how many TCEs are actually going to be required
-// to map this scatterlist.  This code is not optimal.  It 
-// takes into account the case where entry n ends in the same
-// page in which entry n+1 starts.  It does not handle the 
-// general case of entry n ending in the same page in which 
-// entry m starts.   
-
-static unsigned long num_tces_sg( struct scatterlist *sg, int nents )
-{
-	unsigned long nTces, numPages, startPage, endPage, prevEndPage;
-	unsigned i;
-
-	prevEndPage = 0;
-	nTces = 0;
-
-	for (i=0; i<nents; ++i) {
-		// Compute the starting page number and
-		// the ending page number for this entry
-		startPage = (unsigned long)sg->address >> PAGE_SHIFT;
-		endPage = ((unsigned long)sg->address + sg->length - 1) >> PAGE_SHIFT;
-		numPages = endPage - startPage + 1;
-		// Simple optimization: if the previous entry ended
-		// in the same page in which this entry starts
-		// then we can reduce the required pages by one.
-		// This matches assumptions in fill_scatterlist_sg and
-		// create_tces_sg
-		if ( startPage == prevEndPage )
-			--numPages;
-		nTces += numPages;
-		prevEndPage = endPage;
-		sg++;
-	}
-	return nTces;
-}
-
-// Fill in the dma data in the scatterlist
-// return the number of dma sg entries created
-static unsigned fill_scatterlist_sg( struct scatterlist *sg, int nents, 
-				 dma_addr_t dma_addr , unsigned long numTces)
-{
-	struct scatterlist *dma_sg;
-	u32 cur_start_dma;
-	unsigned long cur_len_dma, cur_end_virt, uaddr;
-	unsigned num_dma_ents;
-
-	dma_sg = sg;
-	num_dma_ents = 1;
-
-	// Process the first sg entry
-	cur_start_dma = dma_addr + ((unsigned long)sg->address & (~PAGE_MASK));
-	cur_len_dma = sg->length;
-	// cur_end_virt holds the address of the byte immediately after the
-	// end of the current buffer.
-	cur_end_virt = (unsigned long)sg->address + cur_len_dma;
-	// Later code assumes that unused sg->dma_address and sg->dma_length
-	// fields will be zero.  Other archs seem to assume that the user
-	// (device driver) guarantees that...I don't want to depend on that
-	sg->dma_address = sg->dma_length = 0;
-	
-	// Process the rest of the sg entries
-	while (--nents) {
-		++sg;
-		// Clear possibly unused fields. Note: sg >= dma_sg so
-		// this can't be clearing a field we've already set
-		sg->dma_address = sg->dma_length = 0;
-
-		// Check if it is possible to make this next entry
-		// contiguous (in dma space) with the previous entry.
-		
-		// The entries can be contiguous in dma space if
-		// the previous entry ends immediately before the
-		// start of the current entry (in virtual space)
-		// or if the previous entry ends at a page boundary
-		// and the current entry starts at a page boundary.
-		uaddr = (unsigned long)sg->address;
-		if ( ( uaddr != cur_end_virt ) &&
-		     ( ( ( uaddr | cur_end_virt ) & (~PAGE_MASK) ) ||
-		       ( ( uaddr & PAGE_MASK ) == ( ( cur_end_virt-1 ) & PAGE_MASK ) ) ) ) {
-			// This entry can not be contiguous in dma space.
-			// save the previous dma entry and start a new one
-			dma_sg->dma_address = cur_start_dma;
-			dma_sg->dma_length  = cur_len_dma;
-
-			++dma_sg;
-			++num_dma_ents;
-			
-			cur_start_dma += cur_len_dma-1;
-			// If the previous entry ends and this entry starts
-			// in the same page then they share a tce.  In that
-			// case don't bump cur_start_dma to the next page 
-			// in dma space.  This matches assumptions made in
-			// num_tces_sg and create_tces_sg.
-			if ((uaddr & PAGE_MASK) == ((cur_end_virt-1) & PAGE_MASK))
-				cur_start_dma &= PAGE_MASK;
-			else
-				cur_start_dma = PAGE_ALIGN(cur_start_dma+1);
-			cur_start_dma += ( uaddr & (~PAGE_MASK) );
-			cur_len_dma = 0;
-		}
-		// Accumulate the length of this entry for the next 
-		// dma entry
-		cur_len_dma += sg->length;
-		cur_end_virt = uaddr + sg->length;
-	}
-	// Fill in the last dma entry
-	dma_sg->dma_address = cur_start_dma;
-	dma_sg->dma_length  = cur_len_dma;
-
-	if ((((cur_start_dma +cur_len_dma - 1)>> PAGE_SHIFT) - (dma_addr >> PAGE_SHIFT) + 1) != numTces)
-	  {
-	    printk("fill_scatterlist_sg: numTces %ld, used tces %d\n",
-		   numTces,
-		   (unsigned)(((cur_start_dma + cur_len_dma - 1) >> PAGE_SHIFT) - (dma_addr >> PAGE_SHIFT) + 1));
-	  }
-	
-
-	return num_dma_ents;
-}
-
-// Call the hypervisor to create the TCE entries.
-// return the number of TCEs created
-static dma_addr_t create_tces_sg( struct TceTable *tbl, struct scatterlist *sg, 
-		   int nents, unsigned numTces, int tceType, int direction )
-{
-	unsigned order, i, j;
-	unsigned long startPage, endPage, prevEndPage, numPages, uaddr;
-	long tcenum, starttcenum;
-	dma_addr_t dmaAddr;
-
-	dmaAddr = NO_TCE;
-
-	order = get_order( numTces << PAGE_SHIFT );
-	// allocate a block of tces
-	tcenum = alloc_tce_range( tbl, order );
-	if ( tcenum != -1 ) {
-		tcenum += tbl->startOffset;
-		starttcenum = tcenum;
-		dmaAddr = tcenum << PAGE_SHIFT;
-		prevEndPage = 0;
-		for (j=0; j<nents; ++j) {
-			startPage = (unsigned long)sg->address >> PAGE_SHIFT;
-			endPage = ((unsigned long)sg->address + sg->length - 1) >> PAGE_SHIFT;
-			numPages = endPage - startPage + 1;
-			
-			uaddr = (unsigned long)sg->address;
-			
-			// If the previous entry ended in the same page that
-			// the current page starts then they share that
-			// tce and we reduce the number of tces we need
-			// by one.  This matches assumptions made in
-			// num_tces_sg and fill_scatterlist_sg
-			if ( startPage == prevEndPage ) { 
-				--numPages;
-				uaddr += PAGE_SIZE;
-			}
-			
-			for (i=0; i<numPages; ++i) {
-			  build_tce( tbl, tcenum, uaddr, tceType,
-				     direction );
-			  ++tcenum;
-			  uaddr += PAGE_SIZE;
-			}
-			
-			prevEndPage = endPage;
-			sg++;
-		}
-		if ((tcenum - starttcenum) != numTces)
-	    		printk("create_tces_sg: numTces %d, tces used %d\n",
-		   		numTces, (unsigned)(tcenum - starttcenum));
-
-	}
-
-	return dmaAddr;
-}
-
-int pci_map_sg( struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction )
-{
-	struct TceTable * tbl;
-	unsigned bus, numTces;
-	int tceType, num_dma;
-	dma_addr_t dma_handle;
-
-	// Fast path for a single entry scatterlist
-	if ( nents == 1 ) {
-		sg->dma_address = pci_map_single( hwdev, sg->address, 
-					sg->length, direction );
-		sg->dma_length = sg->length;
-		return 1;
-	}
-	
-	if ( direction == PCI_DMA_NONE )
-		BUG();
-	
-	// If no pci_dev then use virtual bus
-	if (hwdev == NULL ) {
-		bus = 255;
-		tceType = TCE_VB;
-	}
-	else {
-#ifdef CONFIG_PCI        
-		// Get the iSeries bus # to use as an index
-		// into the TCE table array
-		bus = ISERIES_GET_BUS( hwdev );
-		tceType = TCE_PCI;
-#else
-                BUG();
-                return 0;
-#endif /* CONFIG_PCI */
-	}
-	
-	tbl = tceTables[bus];
-
-	if ( tbl ) {
-		// Compute the number of tces required
-		numTces = num_tces_sg( sg, nents );
-		// Create the tces and get the dma address
-		dma_handle = create_tces_sg( tbl, sg, nents, numTces,
-				             tceType, direction );
-
-		// Fill in the dma scatterlist
-		num_dma = fill_scatterlist_sg( sg, nents, dma_handle, numTces );
-	}
-
-	return num_dma;
-}
-
-void pci_unmap_sg( struct pci_dev *hwdev, struct scatterlist *sg, int nelms, int direction )
-{
-	struct TceTable * tbl;
-	unsigned order, numTces, bus, i;
-	dma_addr_t dma_end_page, dma_start_page;
-	
-	if ( direction == PCI_DMA_NONE )
-		BUG();
-
-	dma_start_page = sg->dma_address & PAGE_MASK;
-	for ( i=nelms; i>0; --i ) {
-		unsigned k = i - 1;
-		if ( sg[k].dma_length ) {
-			dma_end_page = ( sg[k].dma_address +
-					 sg[k].dma_length - 1 ) & PAGE_MASK;
-			break;
-		}
-	}
-
-	numTces = ((dma_end_page - dma_start_page ) >> PAGE_SHIFT) + 1;
-	order = get_order( numTces << PAGE_SHIFT );
-	
-	// If no pci_dev then use virtual bus
-	if (hwdev == NULL )
-		bus = 255;
-	else {
-#ifdef CONFIG_PCI        
-		// Get the iSeries bus # to use as an index
-		// into the TCE table array
-		bus = ISERIES_GET_BUS( hwdev );
-#else
-                BUG();
-                return;
-#endif /* CONFIG_PCI */
-	}
-		
-	if ( bus > 255 ) {
-		printk("pci_unmap_sg: invalid bus # %d\n", bus );
-		printk("pci_unmap_sg:   hwdev = %08lx\n", (unsigned long)hwdev );
-	}
-
-
-	tbl = tceTables[bus];
-
-	if ( tbl ) 
-		free_tces( tbl, dma_start_page, order, numTces );
-
-}
-
diff -Nru a/arch/ppc/platforms/iSeries_pic.c b/arch/ppc/platforms/iSeries_pic.c
--- a/arch/ppc/platforms/iSeries_pic.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,77 +0,0 @@
-/*
- *  arch/ppc/platforms/iSeries_pic.c
- *
- */
-
-
-#include <linux/ptrace.h>
-#include <linux/errno.h>
-#include <linux/threads.h>
-#include <linux/kernel_stat.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-#include <linux/timex.h>
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-#include <linux/irq.h>
-#include <linux/proc_fs.h>
-#include <linux/random.h>
-
-#include <asm/uaccess.h>
-#include <asm/bitops.h>
-#include <asm/system.h>
-#include <asm/io.h>
-#include <asm/pgtable.h>
-#include <asm/irq.h>
-#include <asm/cache.h>
-#include <asm/prom.h>
-#include <asm/ptrace.h>
-#include <asm/iSeries/LparData.h>
-extern void iSeries_smp_message_recv( struct pt_regs * );
-extern int is_soft_enabled(void);
-
-extern void __no_lpq_restore_flags(unsigned long flags);
-extern void iSeries_smp_message_recv( struct pt_regs * );
-unsigned lpEvent_count = 0;
-
-void do_IRQ(struct pt_regs *regs)
-{
-	int cpu = smp_processor_id();
-	unsigned long flags;
-	struct Paca * paca;
-	struct ItLpQueue *lpq;
-
-	if ( is_soft_enabled() )
-		BUG();
-	
-	irq_enter();
-
-	paca = (struct Paca *)mfspr(SPRG1);
-
-#ifdef CONFIG_SMP
-	if ( paca->xLpPacaPtr->xIpiCnt ) {
-		paca->xLpPacaPtr->xIpiCnt = 0;
-		iSeries_smp_message_recv( regs );
-	}
-#endif /* CONFIG_SMP */
-
-	lpq = paca->lpQueuePtr;
-	if ( lpq ) {
-		local_irq_save(flags);
-		lpEvent_count += ItLpQueue_process( lpq, regs );
-		local_irq_restore( flags );
-	}
-
-	irq_exit();
-
-	if ( paca->xLpPacaPtr->xDecrInt ) {
-		paca->xLpPacaPtr->xDecrInt = 0;
-		/* Signal a fake decrementer interrupt */
-		timer_interrupt( regs );
-	}
-}
diff -Nru a/arch/ppc/platforms/iSeries_setup.c b/arch/ppc/platforms/iSeries_setup.c
--- a/arch/ppc/platforms/iSeries_setup.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,816 +0,0 @@
-/*
- *
- *
- *    Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
- *    Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
- *
- *    Module name: iSeries_setup.c
- *
- *    Description:
- *      Architecture- / platform-specific boot-time initialization code for
- *      the IBM iSeries LPAR.  Adapted from original code by Grant Erickson and
- *      code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
- *      <dan@net4x.com>.
- *
- */
-
-#include <linux/pci.h>
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/threads.h>
-#include <linux/smp.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/bootmem.h>
-#include <linux/blk.h>
-#include <linux/ide.h>
-#include <linux/root_dev.h>
-#include <linux/seq_file.h>
-
-#include <asm/processor.h>
-#include <asm/machdep.h>
-#include <asm/page.h>
-#include <asm/bootinfo.h>
-
-#include <asm/time.h>
-#include "iSeries_setup.h"
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/HvCallHpt.h>
-#include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/HvCallEvent.h>
-#include <asm/iSeries/HvCallSm.h>
-#include <asm/iSeries/ItLpQueue.h>
-#include <asm/iSeries/IoHriMainStore.h>
-#include <asm/iSeries/iSeries_proc.h>
-#include <asm/iSeries/pmc_proc.h>
-#include <asm/iSeries/mf.h>
-#include <asm/pci-bridge.h>
-#include <asm/iSeries/HvCallXm.h>
-#include <asm/iSeries/iSeries_fixup.h>
-#include <asm/iSeries/HvReleaseData.h>
-
-/* Function Prototypes */
-
-extern void abort(void);
-static void build_iSeries_Memory_Map( void );
-static void setup_iSeries_cache_sizes( void );
-extern void iSeries_pci_Initialize(void);
-static int iSeries_show_cpuinfo(struct seq_file *m);
-static int iSeries_show_percpuinfo(struct seq_file *m, int i);
-extern void iSeries_idle(void);
-extern struct pci_ops iSeries_pci_ops;
-
-/* Global Variables */
-
-unsigned short iSeries_icache_line_size = 0;
-unsigned short iSeries_dcache_line_size = 0;
-unsigned short iSeries_icache_lines_per_page = 0;
-unsigned short iSeries_dcache_lines_per_page = 0;
-unsigned short iSeries_log_icache_line_size = 0;
-unsigned short iSeries_log_dcache_line_size = 0;
-
-unsigned long procFreqHz = 0;
-unsigned long procFreqMhz = 0;
-unsigned long procFreqMhzHundreths = 0;
-
-unsigned long tbFreqHz = 0;
-unsigned long tbFreqMhz = 0;
-unsigned long tbFreqMhzHundreths = 0;
-
-unsigned long decr_overclock = 8;
-unsigned long decr_overclock_proc0 = 8;
-unsigned long decr_overclock_set = 0;
-unsigned long decr_overclock_proc0_set = 0;
-
-extern unsigned long embedded_sysmap_start;
-extern unsigned long embedded_sysmap_end;
-
-extern unsigned long sysmap;
-extern unsigned long sysmap_size;
-extern unsigned long end_of_DRAM;	// Defined in ppc/mm/init.c
-
-#ifdef CONFIG_SMP
-extern struct smp_ops_t iSeries_smp_ops;
-#endif /* CONFIG_SMP */
-
-/* XXX for now... */
-#ifndef CONFIG_PCI
-unsigned long isa_io_base;
-#endif
-
-/*
- * void __init platform_init()
- *
- * Description:
- *   This routine...
- *
- * Input(s):
- *   r3 - Optional pointer to a board information structure.
- *   r4 - Optional pointer to the physical starting address of the init RAM
- *        disk.
- *   r5 - Optional pointer to the physical ending address of the init RAM
- *        disk.
- *   r6 - Optional pointer to the physical starting address of any kernel
- *        command-line parameters.
- *   r7 - Optional pointer to the physical ending address of any kernel
- *        command-line parameters.
- *
- * Output(s):
- *   N/A
- *
- * Returns:
- *   N/A
- *
- */
-
-extern int rd_size;		// Defined in drivers/block/rd.c
-extern u64 next_jiffy_update_tb[];
-extern u64 get_tb64(void);
-
-unsigned long __init iSeries_find_end_of_memory(void)
-{
-	/* totalLpChunks contains the size of memory (in units of 256K) */
-	unsigned long memory_end = (totalLpChunks << 18);
-
-	#ifndef CONFIG_HIGHMEM
-	/* Max memory if highmem is not configured is 768 MB */
-	if (memory_end > (768 << 20))
-		memory_end = 768 << 20;
-	#endif /* CONFIG_HIGHMEM */
-
-	return memory_end;
-}
-
-void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
-	      unsigned long r6, unsigned long r7)
-{
-	parse_bootinfo(find_bootinfo());
-
-#if defined(CONFIG_BLK_DEV_INITRD)
-	/*
-	 * If the init RAM disk has been configured and there is
-	 * a non-zero starting address for it, set it up
-	 */
-	if ( xNaca.xRamDisk ) {
-		initrd_start = xNaca.xRamDisk + KERNELBASE;
-		initrd_end   = initrd_start + xNaca.xRamDiskSize * PAGE_SIZE;
-		initrd_below_start_ok = 1;	// ramdisk in kernel space
-		ROOT_DEV = Root_RAM0;
-
-		if ( ((rd_size*1024)/PAGE_SIZE) < xNaca.xRamDiskSize )
-			rd_size = (xNaca.xRamDiskSize*PAGE_SIZE)/1024;
-	} else
-
-#endif /* CONFIG_BLK_DEV_INITRD */
-#if CONFIG_VIODASD_IDE
-	  {
-		ROOT_DEV = Root_HDA1;
-	  }
-#elif defined(CONFIG_VIODASD)
-	  {
-		ROOT_DEV = MKDEV( VIODASD_MAJOR, 1 );
-	  }
-#endif /* CONFIG_VIODASD_IDE */
-
-	/* If an embedded System.map has been added to the kernel,
-	 * set it up.
-	 */
-	if ( embedded_sysmap_start ) {
-		sysmap = embedded_sysmap_start + KERNELBASE;
-		sysmap_size = embedded_sysmap_end - embedded_sysmap_start;
-	}
-
-	/* Copy the kernel command line arguments to a safe place. */
-
-	if (r6) {
- 		*(char *)(r7 + KERNELBASE) = 0;
-		strcpy(cmd_line, (char *)(r6 + KERNELBASE));
-	}
-
-	/* Initialize the table which translate Linux physical addresses to
-	 * iSeries absolute addresses
-	 */
-
-	build_iSeries_Memory_Map();
-
-	setup_iSeries_cache_sizes();
-
-	/* Initialize machine-dependency vectors */
-
-	ppc_md.setup_arch	 	= iSeries_setup_arch;
-	ppc_md.show_cpuinfo	 	= iSeries_show_cpuinfo;
-	ppc_md.show_percpuinfo	 	= iSeries_show_percpuinfo;
-	ppc_md.irq_cannonicalize 	= NULL;
-	ppc_md.init_IRQ		 	= iSeries_init_IRQ;
-	ppc_md.get_irq		 	= iSeries_get_irq;
-	ppc_md.init		 	= NULL;
-
-	ppc_md.restart		 	= iSeries_restart;
-	ppc_md.power_off	 	= iSeries_power_off;
-	ppc_md.halt		 	= iSeries_halt;
-
-	ppc_md.time_init	 	= NULL;
-	ppc_md.set_rtc_time	 	= iSeries_set_rtc_time;
-	ppc_md.get_rtc_time	 	= iSeries_get_rtc_time;
-	ppc_md.calibrate_decr	 	= iSeries_calibrate_decr;
-	ppc_md.progress			= iSeries_progress;
-	ppc_md.find_end_of_memory	= iSeries_find_end_of_memory;
-
-#ifdef CONFIG_PCI
-	ppc_md.pcibios_fixup_bus        = iSeries_fixup_bus;
-	ppc_md.pcibios_fixup            = iSeries_fixup;
-#else
-	ppc_md.pcibios_fixup_bus        = NULL;
-	ppc_md.pcibios_fixup            = NULL;
-#endif /* CONFIG_PCI         */
-
-#ifdef CONFIG_SMP
-	ppc_md.smp_ops			= &iSeries_smp_ops;
-#endif /* CONFIG_SMP */
-
-	// Associate Lp Event Queue 0 with processor 0
-	HvCallEvent_setLpEventQueueInterruptProc( 0, 0 );
-
-	{
-	// copy the command line parameter from the primary VSP
-	char *p, *q;
-	HvCallEvent_dmaToSp( cmd_line,
-			     2*64*1024,
-			     256,
-			     HvLpDma_Direction_RemoteToLocal );
-	p = q = cmd_line + 255;
-	while( p > cmd_line ) {
-		if ((*p == 0) || (*p == ' ') || (*p == '\n'))
-			--p;
-		else
-			break;
-	}
-	if ( p < q )
-		*(p+1) = 0;
-	}
-
-	next_jiffy_update_tb[0] = get_tb64();
-
-	iSeries_proc_early_init();
-
-	mf_init();
-
-	iSeries_proc_callback( &pmc_proc_init );
-
-	return;
-}
-
-/*
- * The iSeries may have very large memories ( > 128 GB ) and a partition
- * may get memory in "chunks" that may be anywhere in the 2**52 real
- * address space.  The chunks are 256K in size.  To map this to the
- * memory model Linux expects, the iSeries specific code builds a
- * translation table to translate what Linux thinks are "physical"
- * addresses to the actual real addresses.  This allows us to make
- * it appear to Linux that we have contiguous memory starting at
- * physical address zero while in fact this could be far from the truth.
- * To avoid confusion, I'll let the words physical and/or real address
- * apply to the Linux addresses while I'll use "absolute address" to
- * refer to the actual hardware real address.
- *
- * build_iSeries_Memory_Map gets information from the Hypervisor and
- * looks at the Main Store VPD to determine the absolute addresses
- * of the memory that has been assigned to our partition and builds
- * a table used to translate Linux's physical addresses to these
- * absolute addresses.  Absolute addresses are needed when
- * communicating with the hypervisor (e.g. to build HPT entries)
- */
-
-static void __init build_iSeries_Memory_Map(void)
-{
-	u32 loadAreaFirstChunk, loadAreaLastChunk, loadAreaSize;
-	u32 hptFirstChunk, hptLastChunk, hptSizeChunks;
-	u32 absAddrHi, absAddrLo;
-	u32 nextPhysChunk;
-	u32 holeFirstChunk, holeSizeChunks;
-	u32 totalChunks,moreChunks;
-	u32 currChunk, thisChunk, absChunk;
-	u32 currDword;
-	u32 chunkBit;
-	u64 holeStart, holeEnd, holeSize;
-	u64 map;
-	struct IoHriMainStoreSegment4 * msVpd;
-
-	// Get absolute address of our load area
-	// and map it to physical address 0
-	// This guarantees that the loadarea ends up at physical 0
-	// otherwise, it might not be returned by PLIC as the first
-	// chunks
-
-	loadAreaFirstChunk = (u32)(itLpNaca.xLoadAreaAddr >> 18);
-	loadAreaSize =  itLpNaca.xLoadAreaChunks;
-
-	loadAreaLastChunk = loadAreaFirstChunk + loadAreaSize - 1;
-
-	// Get absolute address of our HPT and remember it so
-	// we won't map it to any physical address
-
-	hptFirstChunk = (u32)(HvCallHpt_getHptAddress() >> 18 );
-	hptSizeChunks = (u32)(HvCallHpt_getHptPages() >> 6 );
-	hptLastChunk = hptFirstChunk + hptSizeChunks - 1;
-
-	loadAreaLastChunk = loadAreaFirstChunk + loadAreaSize - 1;
-
-	absAddrLo = loadAreaFirstChunk << 18;
-	absAddrHi = loadAreaFirstChunk >> 14;
-
-	printk( "Mapping load area - physical addr = 0, absolute addr = %08x%08x\n",
-			absAddrHi, absAddrLo );
-	printk( "Load area size %dK\n", loadAreaSize*256 );
-
-	nextPhysChunk = 0;
-
-	for ( absChunk = loadAreaFirstChunk; absChunk <= loadAreaLastChunk; ++absChunk ) {
-		if ( ( absChunk < hptFirstChunk ) ||
-		     ( absChunk > hptLastChunk ) ) {
-			msChunks[nextPhysChunk] = absChunk;
-			++nextPhysChunk;
-		}
-	}
-	// Get absolute address of our HPT and remember it so
-	// we won't map it to any physical address
-	hptFirstChunk = (u32)(HvCallHpt_getHptAddress() >> 18 );
-	hptSizeChunks = (u32)(HvCallHpt_getHptPages() >> 6 );
-	hptLastChunk = hptFirstChunk + hptSizeChunks - 1;
-	absAddrLo = hptFirstChunk << 18;
-	absAddrHi = hptFirstChunk >> 14;
-
-	printk( "HPT absolute addr = %08x%08x, size = %dK\n",
-			absAddrHi, absAddrLo, hptSizeChunks*256 );
-
-	// Determine if absolute memory has any
-	// holes so that we can interpret the
-	// access map we get back from the hypervisor
-	// correctly.
-
-	msVpd = (struct IoHriMainStoreSegment4 *)xMsVpd;
-	holeStart = msVpd->nonInterleavedBlocksStartAdr;
-	holeEnd   = msVpd->nonInterleavedBlocksEndAdr;
-	holeSize = holeEnd - holeStart;
-
-	if ( holeSize ) {
-		holeStart = holeStart & 0x000fffffffffffff;
-		holeStart = holeStart >> 18;
-		holeFirstChunk = (u32)holeStart;
-		holeSize = holeSize >> 18;
-		holeSizeChunks = (u32)holeSize;
-		printk( "Main store hole: start chunk = %0x, size = %0x chunks\n",
-				holeFirstChunk, holeSizeChunks );
-	}
-	else {
-		holeFirstChunk = 0xffffffff;
-		holeSizeChunks = 0;
-	}
-
-	// Process the main store access map from the hypervisor
-	// to build up our physical -> absolute translation table
-
-	totalChunks = (u32)HvLpConfig_getMsChunks();
-
-	if ((totalChunks-hptSizeChunks) > 16384) {
-		panic("More than 4GB of memory assigned to this partition");
-	}
-
-	currChunk = 0;
-	currDword = 0;
-	moreChunks = totalChunks;
-
-	while ( moreChunks ) {
-		map = HvCallSm_get64BitsOfAccessMap( itLpNaca.xLpIndex,
-						     currDword );
-		thisChunk = currChunk;
-		while ( map ) {
-			chunkBit = map >> 63;
-			map <<= 1;
-			if ( chunkBit ) {
-				--moreChunks;
-				absChunk = thisChunk;
-				if ( absChunk >= holeFirstChunk )
-					absChunk += holeSizeChunks;
-				if ( ( ( absChunk < hptFirstChunk ) ||
-				       ( absChunk > hptLastChunk ) ) &&
-				     ( ( absChunk < loadAreaFirstChunk ) ||
-				       ( absChunk > loadAreaLastChunk ) ) ) {
-//					printk( "Mapping physical = %0x to absolute %0x for 256K\n", nextPhysChunk << 18, absChunk << 18 );
-					msChunks[nextPhysChunk] = absChunk;
-					++nextPhysChunk;
-				}
-			}
-			++thisChunk;
-		}
-		++currDword;
-		currChunk += 64;
-	}
-
-	// main store size (in chunks) is
-	//   totalChunks - hptSizeChunks
-	// which should be equal to
-	//   nextPhysChunk
-
-	totalLpChunks = nextPhysChunk;
-
-}
-
-/*
- * Set up the variables that describe the cache line sizes
- * for this machine.
- */
-
-static void __init setup_iSeries_cache_sizes(void)
-{
-	unsigned i,n;
-	iSeries_icache_line_size = xIoHriProcessorVpd[0].xInstCacheOperandSize;
-	iSeries_dcache_line_size = xIoHriProcessorVpd[0].xDataCacheOperandSize;
-	iSeries_icache_lines_per_page = PAGE_SIZE / iSeries_icache_line_size;
-	iSeries_dcache_lines_per_page = PAGE_SIZE / iSeries_dcache_line_size;
-	i = iSeries_icache_line_size;
-	n = 0;
-	while ((i=(i/2))) ++n;
-	iSeries_log_icache_line_size = n;
-	i = iSeries_dcache_line_size;
-	n = 0;
-	while ((i=(i/2))) ++n;
-	iSeries_log_dcache_line_size = n;
-	printk( "D-cache line size = %d  (log = %d)\n",
-			(unsigned)iSeries_dcache_line_size,
-			(unsigned)iSeries_log_dcache_line_size );
-	printk( "I-cache line size = %d  (log = %d)\n",
-			(unsigned)iSeries_icache_line_size,
-			(unsigned)iSeries_log_icache_line_size );
-
-}
-
-
-int piranha_simulator = 0;
-
-/*
- * Document me.
- */
-void __init
-iSeries_setup_arch(void)
-{
-	void *	eventStack;
-	u32	procFreq;
-	u32	tbFreq;
-//	u32	evStackContigReal;
-//	u64	evStackReal;
-
-	/* Setup the Lp Event Queue */
-
-	/* Associate Lp Event Queue 0 with processor 0 */
-
-//	HvCallEvent_setLpEventQueueInterruptProc( 0, 0 );
-
-	/* Allocate a page for the Event Stack
-	 * The hypervisor wants the absolute real address, so
-	 * we subtract out the KERNELBASE and add in the
-	 * absolute real address of the kernel load area
-	 */
-
-	eventStack = alloc_bootmem_pages( LpEventStackSize );
-
-	memset( eventStack, 0, LpEventStackSize );
-
-	/* Invoke the hypervisor to initialize the event stack */
-
-	HvCallEvent_setLpEventStack( 0, eventStack, LpEventStackSize );
-
-	/* Initialize fields in our Lp Event Queue */
-
-	xItLpQueue.xHSlicEventStackPtr = 0;
-	xItLpQueue.xSlicEventStackPtr = (char *)eventStack;
-	xItLpQueue.xHSlicCurEventPtr = 0;
-	xItLpQueue.xSlicCurEventPtr = (char *)eventStack;
-	xItLpQueue.xHSlicLastValidEventPtr = 0;
-	xItLpQueue.xSlicLastValidEventPtr = (char *)eventStack +
-					(LpEventStackSize - LpEventMaxSize);
-	xItLpQueue.xIndex = 0;
-
-	if ( itLpNaca.xPirEnvironMode == 0 ) {
-		printk("Running on Piranha simulator\n");
-		piranha_simulator = 1;
-	}
-	// Compute processor frequency
-	procFreq = ( 0x40000000 / (xIoHriProcessorVpd[0].xProcFreq / 1600) );
-	procFreqHz = procFreq * 10000;
-	procFreqMhz = procFreq / 100;
-	procFreqMhzHundreths = procFreq - (procFreqMhz * 100 );
-
-	// Compute time base frequency
-	tbFreq = ( 0x40000000 / (xIoHriProcessorVpd[0].xTimeBaseFreq / 400) );
-	tbFreqHz = tbFreq * 10000;
-	tbFreqMhz = tbFreq / 100;
-	tbFreqMhzHundreths = tbFreq - (tbFreqMhz * 100 );
-
-	printk("Max  logical processors = %d\n",
-			itVpdAreas.xSlicMaxLogicalProcs );
-	printk("Max physical processors = %d\n",
-			itVpdAreas.xSlicMaxPhysicalProcs );
-	printk("Processor frequency = %lu.%02lu\n",
-			procFreqMhz,
-			procFreqMhzHundreths );
-	printk("Time base frequency = %lu.%02lu\n",
-			tbFreqMhz,
-			tbFreqMhzHundreths );
-	printk("Processor version = %x\n",
-			xIoHriProcessorVpd[0].xPVR );
-
-#ifdef CONFIG_PCI
-	/* Initialize the flight recorder, global bus map and pci memory table */
-	iSeries_pci_Initialize();
-
-	/* Setup the PCI controller list */
-	iSeries_build_hose_list();
-#endif /* CONFIG_PCI         */
-/*
-	// copy the command line parameter from the primary VSP
-	HvCallEvent_dmaToSp( cmd_line,
-			     2*64*1024,
-			     256,
-			     HvLpDma_Direction_RemoteToLocal );
-
-	mf_init();
-	viopath_init();
-*/
-
-	ppc_md.idle = iSeries_idle;
-}
-
-/*
- * int iSeries_show_percpuinfo()
- *
- * Description:
- *   This routine pretty-prints CPU information gathered from the VPD
- *   for use in /proc/cpuinfo
- *
- * Input(s):
- *  *buffer - Buffer into which CPU data is to be printed.
- *
- * Output(s):
- *  *buffer - Buffer with CPU data.
- *
- * Returns:
- *   The number of bytes copied into 'buffer' if OK, otherwise zero or less
- *   on error.
- */
-static int
-iSeries_show_percpuinfo(struct seq_file *m, int i)
-{
-	seq_printf(m, "clock\t\t: %lu.%02luMhz\n",
-		procFreqMhz, procFreqMhzHundreths );
-//	seq_printf(m, "  processor clock\t\t: %ldMHz\n",
-//		((unsigned long)xIoHriProcessorVpd[0].xProcFreq)/1000000);
-	seq_printf(m, "time base\t: %lu.%02luMHz\n",
-		tbFreqMhz, tbFreqMhzHundreths );
-//	seq_printf(m, "  time base freq\t\t: %ldMHz\n",
-//		((unsigned long)xIoHriProcessorVpd[0].xTimeBaseFreq)/1000000);
-	seq_printf(m, "i-cache\t\t: %d\n",
-		iSeries_icache_line_size);
-	seq_printf(m, "d-cache\t\t: %d\n",
-		iSeries_dcache_line_size);
-
-	return 0;
-}
-
-static int iSeries_show_cpuinfo(struct seq_file *m)
-{
-	seq_printf(m, "machine\t\t: iSeries Logical Partition\n");
-
-	return 0;
-}
-
-#ifndef CONFIG_PCI
-/*
- * Document me.
- * and Implement me.
- * If no Native I/O, do nothing routine.
- */
- void __init
-iSeries_init_IRQ(void)
-{
-	return;
-}
-#endif
-
-/*
- * Document me.
- * and Implement me.
- */
-int
-iSeries_get_irq(struct pt_regs *regs)
-{
-/*
-	return (ppc4xx_pic_get_irq(regs));
-*/
-	/* -2 means ignore this interrupt */
-	return -2;
-}
-
-/*
- * Document me.
- */
-void
-iSeries_restart(char *cmd)
-{
-	mf_reboot();
-}
-
-/*
- * Document me.
- */
-void
-iSeries_power_off(void)
-{
-	mf_powerOff();
-}
-
-/*
- * Document me.
- */
-void
-iSeries_halt(void)
-{
-	mf_powerOff();
-}
-
-/*
- * Nothing to do here.
- */
-void __init
-iSeries_time_init(void)
-{
-	/* Nothing to do */
-}
-
-/*
- * Set the RTC in the virtual service processor
- * This requires flowing LpEvents to the primary partition
- */
-int iSeries_set_rtc_time(unsigned long time)
-{
-    mf_setRtcTime(time);
-    return 0;
-}
-
-/*
- * Get the RTC from the virtual service processor
- * This requires flowing LpEvents to the primary partition
- */
-unsigned long iSeries_get_rtc_time(void)
-{
-    /* XXX - Implement me */
-    unsigned long time;
-    mf_getRtcTime(&time);
-    return (time);
-}
-
-/*
- * void __init iSeries_calibrate_decr()
- *
- * Description:
- *   This routine retrieves the internal processor frequency from the VPD,
- *   and sets up the kernel timer decrementer based on that value.
- *
- */
-
-void __init
-iSeries_calibrate_decr(void)
-{
-	u32	freq;
-	u32	tbf;
-	struct Paca * paca;
-
-	/* Compute decrementer (and TB) frequency
-	 * in cycles/sec
-	 */
-
-	tbf = xIoHriProcessorVpd[0].xTimeBaseFreq / 16;
-
-	freq = 0x010000000;
-	freq = freq / tbf;		/* cycles / usec */
-	freq = freq * 1000000;		/* now in cycles/sec */
-
-	/* Set the amount to refresh the decrementer by.  This
-	 * is the number of decrementer ticks it takes for
-	 * 1/HZ seconds.
-	 */
-
-	/* decrementer_count = freq / HZ;
-	 * count_period_num = 1;
-	 * count_period_den = freq; */
-
-	if ( decr_overclock_set && !decr_overclock_proc0_set )
-		decr_overclock_proc0 = decr_overclock;
-
-	tb_ticks_per_jiffy = freq / HZ;
-	paca = (struct Paca *)mfspr(SPRG1);
-	paca->default_decr = tb_ticks_per_jiffy / decr_overclock_proc0;
-	tb_to_us = mulhwu_scale_factor(freq, 1000000);
-}
-void __init
-iSeries_progress( char * st, unsigned short code )
-{
-	printk( "Progress: [%04x] - %s\n", (unsigned)code, st );
-	if (code != 0xffff)
-	    mf_displayProgress( code );
-	else
-	    mf_clearSrc();
-}
-
-#ifdef CONFIG_PCI
-/*
- * unsigned int __init iSeries_build_hose_list()
- *
- * Description:
- *   This routine builds a list of the PCI host bridges that
- *   connect PCI buses either partially or fully owned by
- *   this guest partition
- *
- */
-unsigned int __init iSeries_build_hose_list ( ) {
-    struct pci_controller* hose;
-    struct iSeries_hose_arch_data* hose_data;
-    u64 hvRc;
-    u16 hvbusnum;
-    int LxBusNumber = 0;		/* Linux Bus number for grins */
-
-    /* Check to make sure the device probing will work on this iSeries Release. */
-    if(hvReleaseData.xVrmIndex !=3) {
-	printk("PCI: iSeries Lpar and Linux native PCI I/O code is incompatible.\n");
-	printk("PCI: A newer version of the Linux kernel is need for this iSeries release.\n");
-	return 0;
-    }
-
-
-    for (hvbusnum = 0; hvbusnum < 256; hvbusnum++) {  /* All PCI buses which could be owned by this guest partition will be numbered by the hypervisor between 1 & 255 */
-	hvRc = HvCallXm_testBus (hvbusnum);  /* Call the system hypervisor to query guest partition ownership status of this bus */
-	if (hvRc == 0) {  /* This bus is partially/fully owned by this guest partition */
-	    hose = (struct pci_controller*)pcibios_alloc_controller();  // Create the hose for this PCI bus
-	    hose->first_busno = LxBusNumber;	/* This just for debug.   pcibios will */
-	    hose->last_busno  = 0xff;		/* assign the bus numbers.             */
-	    hose->ops = &iSeries_pci_ops;
-	    /* Create the iSeries_arch_data for the hose and cache the HV bus number in it so that pci bios can build the global bus map */
-	    hose_data = (struct iSeries_hose_arch_data *) alloc_bootmem(sizeof(struct iSeries_hose_arch_data));
-	    memset(hose_data, 0, sizeof(*hose_data));
-	    hose->arch_data = (void *) hose_data;
-	    ((struct iSeries_hose_arch_data *)(hose->arch_data))->hvBusNumber = hvbusnum;
-	    LxBusNumber += 1;			/* Keep track for debug */
-	}
-    }
-    pci_assign_all_busses = 1;          /* Let Linux assign the bus numbers in pcibios_init */
-    return 0;
-}
-#endif /* CONFIG_PCI         */
-
-int iSeries_spread_lpevents( char * str )
-{
-	/* The parameter is the number of processors to share in processing lp events */
-	unsigned long i;
-	unsigned long val = simple_strtoul(str, NULL, 0 );
-	if ( ( val > 0 ) && ( val <= maxPacas ) ) {
-		for( i=1; i<val; ++i )
-			xPaca[i].lpQueuePtr = xPaca[0].lpQueuePtr;
-	}
-	else
-		printk("invalid spread_lpevents %ld\n", val);
-	return 1;
-}
-
-int iSeries_decr_overclock_proc0( char * str )
-{
-	unsigned long val = simple_strtoul(str, NULL, 0 );
-	if ( ( val >= 1 ) && ( val <= 48 ) ) {
-		decr_overclock_proc0_set = 1;
-		decr_overclock_proc0 = val;
-		printk("proc 0 decrementer overclock factor of %ld\n", val);
-	}
-	else {
-		printk("invalid proc 0 decrementer overclock factor of %ld\n", val);
-	}
-	return 1;
-}
-
-int iSeries_decr_overclock( char * str )
-{
-	unsigned long val = simple_strtoul( str, NULL, 0 );
-	if ( ( val >= 1 ) && ( val <= 48 ) ) {
-		decr_overclock_set = 1;
-		decr_overclock = val;
-		printk("decrementer overclock factor of %ld\n", val);
-	}
-	else {
-		printk("invalid decrementer overclock factor of %ld\n", val);
-	}
-	return 1;
-}
-
-__setup("spread_lpevents=", iSeries_spread_lpevents );
-__setup("decr_overclock_proc0=", iSeries_decr_overclock_proc0 );
-__setup("decr_overclock=", iSeries_decr_overclock );
-
diff -Nru a/arch/ppc/platforms/iSeries_setup.h b/arch/ppc/platforms/iSeries_setup.h
--- a/arch/ppc/platforms/iSeries_setup.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,61 +0,0 @@
-/*
- *    Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
- *    Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
- *
- *    Module name: iSeries_setup.h
- *
- *    Description:
- *      Architecture- / platform-specific boot-time initialization code for
- *      the IBM iSeries LPAR. Adapted from original code by Grant Erickson and
- *      code by Gary Thomas, Cort Dougan <cort@cs.nmt.edu>, and Dan Malek
- *      <dan@netx4.com>.
- *
- * 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.
- * 
- * 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
- */
-
-#ifndef	__ISERIES_SETUP_H__
-#define	__ISERIES_SETUP_H__
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void		 iSeries_init(unsigned long r3,
-			              unsigned long ird_start,
-				      unsigned long ird_end,
-				      unsigned long cline_start,
-				      unsigned long cline_end);
-extern void		 iSeries_setup_arch(void);
-extern int		 iSeries_setup_residual(char *buffer);
-extern int		 iSeries_get_cpuinfo(char *buffer);
-extern void		 iSeries_init_IRQ(void);
-extern int		 iSeries_get_irq(struct pt_regs *regs);
-extern void		 iSeries_restart(char *cmd);
-extern void		 iSeries_power_off(void);
-extern void		 iSeries_halt(void);
-extern void		 iSeries_time_init(void);
-extern int		 iSeries_set_rtc_time(unsigned long now);
-extern unsigned long	 iSeries_get_rtc_time(void);
-extern void		 iSeries_calibrate_decr(void);
-extern void              iSeries_progress( char *, unsigned short );
-extern unsigned int      iSeries_build_hose_list(void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ISERIES_SETUP_H__ */
diff -Nru a/arch/ppc/platforms/iSeries_smp.c b/arch/ppc/platforms/iSeries_smp.c
--- a/arch/ppc/platforms/iSeries_smp.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,136 +0,0 @@
-/*
- * SMP support for iSeries/LPAR.
- *
- * Copyright (C) 2001 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/config.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
-#include <linux/interrupt.h>
-#include <linux/kernel_stat.h>
-#include <linux/delay.h>
-#define __KERNEL_SYSCALLS__
-#include <linux/unistd.h>
-#include <linux/init.h>
-#include <linux/spinlock.h>
-
-#include <asm/ptrace.h>
-#include <asm/atomic.h>
-#include <asm/irq.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/hardirq.h>
-#include <asm/softirq.h>
-#include <asm/io.h>
-#include <asm/prom.h>
-#include <asm/smp.h>
-#include <asm/residual.h>
-#include <asm/time.h>
-
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/HvCall.h>
-extern u64 get_tb64(void);
-extern u64 next_jiffy_update_tb[];
-
-static unsigned long iSeries_smp_message[NR_CPUS];
-
-void iSeries_smp_message_recv( struct pt_regs * regs )
-{
-	int cpu = smp_processor_id();
-	int msg;
-
-	if ( num_online_cpus() < 2 )
-		return;
-
-	for ( msg = 0; msg < 4; ++msg )
-		if ( test_and_clear_bit( msg, &iSeries_smp_message[cpu] ) )
-			smp_message_recv( msg, regs );
-
-}
-
-static void smp_iSeries_message_pass(int target, int msg, unsigned long data, int wait)
-{
-	int i;
-	for (i = 0; i < NR_CPUS; ++i) {
-		if (!cpu_online(i))
-			continue;
-
-		if ( (target == MSG_ALL) ||
-			(target == i) ||
-			((target == MSG_ALL_BUT_SELF) && (i != smp_processor_id())) ) {
-			set_bit( msg, &iSeries_smp_message[i] );
-			HvCall_sendIPI(&(xPaca[i]));
-		}
-	}
-}
-
-static int smp_iSeries_probe(void)
-{
-	unsigned i;
-	unsigned np;
-	struct ItLpPaca * lpPaca;
-
-	np = 0;
-	for (i=0; i<maxPacas; ++i) {
-		lpPaca = xPaca[i].xLpPacaPtr;
-		if ( lpPaca->xDynProcStatus < 2 )
-			++np;
-	}
-
-	smp_tb_synchronized = 1;
-	return np;
-}
-
-extern unsigned long decr_overclock;
-static void smp_iSeries_kick_cpu(int nr)
-{
-	struct ItLpPaca * lpPaca;
-	// Verify we have a Paca for processor nr
-	if ( ( nr <= 0 ) ||
-		( nr >= maxPacas ) )
-		return;
-	// Verify that our partition has a processor nr
-	lpPaca = xPaca[nr].xLpPacaPtr;
-	if ( lpPaca->xDynProcStatus >= 2 )
-		return;
-	xPaca[nr].default_decr = tb_ticks_per_jiffy / decr_overclock;
-	// The processor is currently spinning, waiting
-	// for the xProcStart field to become non-zero
-	// After we set xProcStart, the processor will
-	// continue on to secondary_start in iSeries_head.S
-	xPaca[nr].xProcStart = 1;
-}
-
-static void smp_iSeries_setup_cpu(int nr)
-{
-	set_dec( xPaca[nr].default_decr );
-}
-
-static void smp_iSeries_space_timers(unsigned nr)
-{
-	unsigned offset,i;
-	
-	offset = tb_ticks_per_jiffy / nr;
-	for ( i=1; i<nr; ++i ) {
-		next_jiffy_update_tb[i] = next_jiffy_update_tb[i-1] + offset;
-	}
-}
-
-struct smp_ops_t iSeries_smp_ops = {
-   smp_iSeries_message_pass,
-   smp_iSeries_probe,
-   smp_iSeries_kick_cpu,
-   smp_iSeries_setup_cpu,
-   smp_iSeries_space_timers,
-   .give_timebase = smp_generic_give_timebase,
-   .take_timebase = smp_generic_take_timebase,
-};
-
diff -Nru a/arch/ppc/platforms/iSeries_time.c b/arch/ppc/platforms/iSeries_time.c
--- a/arch/ppc/platforms/iSeries_time.c	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,150 +0,0 @@
-/*
- * Time routes for iSeries LPAR.
- *
- * Copyright (C) 2001 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/config.h>
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/timex.h>
-#include <linux/kernel_stat.h>
-#include <linux/mc146818rtc.h>
-#include <linux/time.h>
-#include <linux/init.h>
-
-#include <asm/segment.h>
-#include <asm/io.h>
-#include <asm/processor.h>
-#include <asm/nvram.h>
-#include <asm/cache.h>
-#include <asm/8xx_immap.h>
-#include <asm/machdep.h>
-#include <asm/time.h>
-#include <asm/iSeries/Paca.h>
-
-u64 next_jiffy_update_tb[NR_CPUS];
-extern u64 get_tb64(void);
-
-extern rwlock_t xtime_lock;
-extern unsigned long wall_jiffies;
-
-extern unsigned long prof_cpu_mask;
-extern unsigned int * prof_buffer;
-extern unsigned long prof_len;
-extern unsigned long prof_shift;
-extern char _stext;
-
-extern int is_soft_enabled(void);
-
-static inline void ppc_do_profile (unsigned long nip)
-{
-	if (!prof_buffer)
-		return;
-
-	/*
-	 * Only measure the CPUs specified by /proc/irq/prof_cpu_mask.
-	 * (default is all CPUs.)
-	 */
-	if (!((1<<smp_processor_id()) & prof_cpu_mask))
-		return;
-
-	nip -= (unsigned long) &_stext;
-	nip >>= prof_shift;
-	/*
-	 * Don't ignore out-of-bounds EIP values silently,
-	 * put them into the last histogram slot, so if
-	 * present, they will show up as a sharp peak.
-	 */
-	if (nip > prof_len-1)
-		nip = prof_len-1;
-	atomic_inc((atomic_t *)&prof_buffer[nip]);
-}
-
- /*
-  * For iSeries shared processors, we have to let the hypervisor
-  * set the hardware decrementer.  We set a virtual decrementer
-  * in the ItLpPaca and call the hypervisor if the virtual
-  * decrementer is less than the current value in the hardware
-  * decrementer. (almost always the new decrementer value will
-  * be greater than the current hardware decementer so the hypervisor
-  * call will not be needed)
-  *
-  * When we yield the processor in idle.c (needed for shared processors)
-  * we cannot yield for too long or the 32-bit tbl may wrap and then
-  * we would lose jiffies.  In addition, if we yield for too long,
-  * we might be pretty far off on timing for device drivers and such.
-  * When the hypervisor returns to us after a yield we need to
-  * determine whether decrementers might have been missed.  If so
-  * we need to drive the timer_interrupt code to catch up (using
-  * the tb)
-  *
-  * For processors other than processor 0, there is no correction
-  * (in the code below) to next_dec so they're last_jiffy_stamp
-  * values are going to be way off.
-  *
-  */
-int timerRetEnabled = 0;
-int timerRetDisabled = 0;
-
-extern unsigned long iSeries_dec_value;
-void timer_interrupt(struct pt_regs * regs)
-{
-	long next_dec;
-	struct Paca * paca;
-	unsigned long cpu = smp_processor_id();
-	paca = (struct Paca *)mfspr(SPRG1);
-
-	if ( is_soft_enabled() )
-		BUG();
-
-	if (regs->softEnable)
-	  timerRetEnabled++;
-	else
-	  timerRetDisabled++;
-	
-	irq_enter();
-
-	if (!user_mode(regs))
-		ppc_do_profile(instruction_pointer(regs));
-	while ( next_jiffy_update_tb[cpu] < get_tb64() ) {
-#ifdef CONFIG_SMP
-		smp_local_timer_interrupt(regs);
-#endif
-		if ( cpu == 0 ) {
-			write_lock(&xtime_lock);
-			do_timer(regs);
-			if ( (time_status & STA_UNSYNC) == 0 &&
-				xtime.tv_sec - last_rtc_update >= 659 &&
-				abs(xtime.tv_usec - (1000000-1000000/HZ)) < 500000/HZ &&
-				jiffies - wall_jiffies == 1) {
-				if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
-					last_rtc_update = xtime.tv_sec+1;
-				else
-				/* Try again one minute later */
-					last_rtc_update += 60;
-			}
-			write_unlock(&xtime_lock);
-
-		}
-		next_jiffy_update_tb[cpu] += tb_ticks_per_jiffy;
-	}
-	next_dec = next_jiffy_update_tb[cpu] - get_tb64();
-	if ( next_dec > paca->default_decr )
-		next_dec = paca->default_decr;
-	paca->xLpPacaPtr->xDecrInt = 0;
-	set_dec( (unsigned)next_dec );
-
-	irq_exit();
-}
diff -Nru a/arch/ppc/platforms/k2_setup.c b/arch/ppc/platforms/k2_setup.c
--- a/arch/ppc/platforms/k2_setup.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/k2_setup.c	Wed Jan  8 20:04:44 2003
@@ -320,12 +320,6 @@
 	i8259_init(NULL);
 }
 
-static int
-k2_get_irq(struct pt_regs *regs)
-{
-	return i8259_poll();
-}
-
 void __init platform_init(unsigned long r3, unsigned long r4,
 		unsigned long r5, unsigned long r6, unsigned long r7)
 {
@@ -338,7 +332,7 @@
 	ppc_md.setup_arch = k2_setup_arch;
 	ppc_md.show_cpuinfo = k2_show_cpuinfo;
 	ppc_md.init_IRQ = k2_init_irq;
-	ppc_md.get_irq = k2_get_irq;
+	ppc_md.get_irq = i8259_irq;
 
 	ppc_md.find_end_of_memory = k2_find_end_of_memory;
 	ppc_md.setup_io_mappings = k2_map_io;
diff -Nru a/arch/ppc/platforms/menf1_setup.c b/arch/ppc/platforms/menf1_setup.c
--- a/arch/ppc/platforms/menf1_setup.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/menf1_setup.c	Wed Jan  8 20:04:45 2003
@@ -150,11 +150,6 @@
 	i8259_init(NULL);
 }
 
-static int menf1_get_irq(struct pt_regs *regs)
-{
-	return i8259_poll();
-}
-
 /*
  * Set BAT 3 to map 0xF0000000.
  */
@@ -259,7 +254,7 @@
 	ppc_md.setup_arch	= menf1_setup_arch;
 	ppc_md.show_cpuinfo	= menf1_show_cpuinfo;
 	ppc_md.init_IRQ		= menf1_init_IRQ;
-	ppc_md.get_irq		= menf1_get_irq;
+	ppc_md.get_irq		= i8259_irq;
 
 	ppc_md.find_end_of_memory = menf1_find_end_of_memory;
 	ppc_md.setup_io_mappings = menf1_map_io;
diff -Nru a/arch/ppc/platforms/oak.h b/arch/ppc/platforms/oak.h
--- a/arch/ppc/platforms/oak.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,71 +0,0 @@
-/*
- *
- *    Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
- *
- *    Module name: oak.h
- *
- *    Description:
- *	Macros, definitions, and data structures specific to the IBM PowerPC
- *      403G{A,B,C,CX} "Oak" evaluation board. Anything specific to the pro-
- *      cessor itself is defined elsewhere.
- *
- */
-
-#ifdef __KERNEL__
-#ifndef __ASM_OAK_H__
-#define __ASM_OAK_H__
-
-/* We have an IBM 403G{A,B,C,CX} core */
-#include <asm/ibm403.h>
-
-#define _IO_BASE	0
-#define _ISA_MEM_BASE	0
-#define PCI_DRAM_OFFSET	0
-
-/* Memory map for the "Oak" evaluation board */
-
-#define	PPC403SPU_IO_BASE	0x40000000	/* 403 On-chip serial port */
-#define	PPC403SPU_IO_SIZE	0x00000008
-#define	OAKSERIAL_IO_BASE	0x7E000000	/* NS16550DV serial port */
-#define	OAKSERIAL_IO_SIZE	0x00000008
-#define	OAKNET_IO_BASE		0xF4000000	/* NS83902AV Ethernet */
-#define	OAKNET_IO_SIZE		0x00000040
-#define	OAKPROM_IO_BASE		0xFFFE0000	/* AMD 29F010 Flash ROM */
-#define	OAKPROM_IO_SIZE		0x00020000
-
-
-/* Interrupt assignments fixed by the hardware implementation */
-
-/* This is annoying kbuild-2.4 problem. -- Tom */
-
-#define	PPC403SPU_RX_INT	4	/* AIC_INT4 */
-#define	PPC403SPU_TX_INT	5	/* AIC_INT5 */
-#define	OAKNET_INT		27	/* AIC_INT27 */
-#define	OAKSERIAL_INT		28	/* AIC_INT28 */
-
-#ifndef __ASSEMBLY__
-/*
- * Data structure defining board information maintained by the boot
- * ROM on IBM's "Oak" evaluation board. An effort has been made to
- * keep the field names consistent with the 8xx 'bd_t' board info
- * structures.
- */
-
-typedef struct board_info {
-	unsigned char	 bi_s_version[4];	/* Version of this structure */
-	unsigned char	 bi_r_version[30];	/* Version of the IBM ROM */
-	unsigned int	 bi_memsize;		/* DRAM installed, in bytes */
-	unsigned char	 bi_enetaddr[6];	/* Ethernet MAC address */
-	unsigned int	 bi_intfreq;		/* Processor speed, in Hz */
-	unsigned int	 bi_busfreq;		/* Bus speed, in Hz */
-} bd_t;
-
-/* Some 4xx parts use a different timebase frequency from the internal clock.
-*/
-#define bi_tbfreq bi_intfreq
-
-#define PPC4xx_MACHINE_NAME	"IBM Oak"
-
-#endif /* !__ASSEMBLY__ */
-#endif /* __ASM_OAK_H__ */
-#endif /* __KERNEL__ */
diff -Nru a/arch/ppc/platforms/oak_setup.c b/arch/ppc/platforms/oak_setup.c
--- a/arch/ppc/platforms/oak_setup.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,282 +0,0 @@
-/*
- *
- *    Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
- *
- *    Module name: oak_setup.c
- *
- *    Description:
- *      Architecture- / platform-specific boot-time initialization code for
- *      the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original
- *      code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
- *      <dan@net4x.com>.
- *
- */
-
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/threads.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/blk.h>
-#include <linux/irq.h>
-#include <linux/seq_file.h>
-
-#include <asm/processor.h>
-#include <asm/board.h>
-#include <asm/machdep.h>
-#include <asm/page.h>
-#include <asm/bootinfo.h>
-#include <asm/ppc4xx_pic.h>
-#include <asm/time.h>
-
-#include "oak_setup.h"
-
-/* Function Prototypes */
-
-extern void abort(void);
-
-/* Global Variables */
-
-unsigned char __res[sizeof(bd_t)];
-
-
-/*
- * void __init oak_init()
- *
- * Description:
- *   This routine...
- *
- * Input(s):
- *   r3 - Optional pointer to a board information structure.
- *   r4 - Optional pointer to the physical starting address of the init RAM
- *        disk.
- *   r5 - Optional pointer to the physical ending address of the init RAM
- *        disk.
- *   r6 - Optional pointer to the physical starting address of any kernel
- *        command-line parameters.
- *   r7 - Optional pointer to the physical ending address of any kernel
- *        command-line parameters.
- *
- * Output(s):
- *   N/A
- *
- * Returns:
- *   N/A
- *
- */
-void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
-	      unsigned long r6, unsigned long r7)
-{
-	parse_bootinfo(find_bootinfo());
-
-	/*
-	 * If we were passed in a board information, copy it into the
-	 * residual data area.
-	 */
-	if (r3) {
-		memcpy((void *)__res, (void *)(r3 + KERNELBASE), sizeof(bd_t));
-	}
-
-#if defined(CONFIG_BLK_DEV_INITRD)
-	/*
-	 * If the init RAM disk has been configured in, and there's a valid
-	 * starting address for it, set it up.
-	 */
-	if (r4) {
-		initrd_start = r4 + KERNELBASE;
-		initrd_end = r5 + KERNELBASE;
-	}
-#endif /* CONFIG_BLK_DEV_INITRD */
-
-	/* Copy the kernel command line arguments to a safe place. */
-
-	if (r6) {
- 		*(char *)(r7 + KERNELBASE) = 0;
-		strcpy(cmd_line, (char *)(r6 + KERNELBASE));
-	}
-
-	/* Initialize machine-dependency vectors */
-
-	ppc_md.setup_arch	 	= oak_setup_arch;
-	ppc_md.show_percpuinfo	 	= oak_show_percpuinfo;
-	ppc_md.irq_cannonicalize 	= NULL;
-	ppc_md.init_IRQ		 	= oak_init_IRQ;
-	ppc_md.get_irq		 	= oak_get_irq;
-	ppc_md.init		 	= NULL;
-
-	ppc_md.restart		 	= oak_restart;
-	ppc_md.power_off	 	= oak_power_off;
-	ppc_md.halt		 	= oak_halt;
-
-	ppc_md.time_init	 	= oak_time_init;
-	ppc_md.set_rtc_time	 	= oak_set_rtc_time;
-	ppc_md.get_rtc_time	 	= oak_get_rtc_time;
-	ppc_md.calibrate_decr	 	= oak_calibrate_decr;
-}
-
-/*
- * Document me.
- */
-void __init
-oak_setup_arch(void)
-{
-	/* XXX - Implement me */
-}
-
-/*
- * int oak_show_percpuinfo()
- *
- * Description:
- *   This routine pretty-prints the platform's internal CPU and bus clock
- *   frequencies into the buffer for usage in /proc/cpuinfo.
- *
- * Input(s):
- *  *buffer - Buffer into which CPU and bus clock frequencies are to be
- *            printed.
- *
- * Output(s):
- *  *buffer - Buffer with the CPU and bus clock frequencies.
- *
- * Returns:
- *   The number of bytes copied into 'buffer' if OK, otherwise zero or less
- *   on error.
- */
-int
-oak_show_percpuinfo(struct seq_file *m, int i)
-{
-	bd_t *bp = (bd_t *)__res;
-
-	seq_printf(m, "clock\t\t: %dMHz\n"
-		   "bus clock\t\t: %dMHz\n",
-		   bp->bi_intfreq / 1000000,
-		   bp->bi_busfreq / 1000000);
-
-	return 0;
-}
-
-/*
- * Document me.
- */
-void __init
-oak_init_IRQ(void)
-{
-	int i;
-
-	ppc4xx_pic_init();
-
-	for (i = 0; i < NR_IRQS; i++) {
-		irq_desc[i].handler = ppc4xx_pic;
-	}
-
-	return;
-}
-
-/*
- * Document me.
- */
-int
-oak_get_irq(struct pt_regs *regs)
-{
-	return (ppc4xx_pic_get_irq(regs));
-}
-
-/*
- * Document me.
- */
-void
-oak_restart(char *cmd)
-{
-	abort();
-}
-
-/*
- * Document me.
- */
-void
-oak_power_off(void)
-{
-	oak_restart(NULL);
-}
-
-/*
- * Document me.
- */
-void
-oak_halt(void)
-{
-	oak_restart(NULL);
-}
-
-/*
- * Document me.
- */
-long __init
-oak_time_init(void)
-{
-	/* XXX - Implement me */
-	return 0;
-}
-
-/*
- * Document me.
- */
-int __init
-oak_set_rtc_time(unsigned long time)
-{
-	/* XXX - Implement me */
-
-	return (0);
-}
-
-/*
- * Document me.
- */
-unsigned long __init
-oak_get_rtc_time(void)
-{
-	/* XXX - Implement me */
-
-	return (0);
-}
-
-/*
- * void __init oak_calibrate_decr()
- *
- * Description:
- *   This routine retrieves the internal processor frequency from the board
- *   information structure, sets up the kernel timer decrementer based on
- *   that value, enables the 403 programmable interval timer (PIT) and sets
- *   it up for auto-reload.
- *
- * Input(s):
- *   N/A
- *
- * Output(s):
- *   N/A
- *
- * Returns:
- *   N/A
- *
- */
-void __init
-oak_calibrate_decr(void)
-{
-	unsigned int freq;
-	bd_t *bip = (bd_t *)__res;
-
-	freq = bip->bi_intfreq;
-
-	decrementer_count = freq / HZ;
-	count_period_num = 1;
-	count_period_den = freq;
-
-	/* Enable the PIT and set auto-reload of its value */
-
-	mtspr(SPRN_TCR, TCR_PIE | TCR_ARE);
-
-	/* Clear any pending timer interrupts */
-
-	mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_PIS | TSR_FIS);
-}
diff -Nru a/arch/ppc/platforms/oak_setup.h b/arch/ppc/platforms/oak_setup.h
--- a/arch/ppc/platforms/oak_setup.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,50 +0,0 @@
-/*
- *
- *    Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
- *
- *    Module name: oak_setup.h
- *
- *    Description:
- *      Architecture- / platform-specific boot-time initialization code for
- *      the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original
- *      code by Gary Thomas, Cort Dougan <cort@cs.nmt.edu>, and Dan Malek
- *      <dan@netx4.com>.
- *
- */
-
-#ifndef	__OAK_SETUP_H__
-#define	__OAK_SETUP_H__
-
-#include <asm/ptrace.h>
-#include <asm/board.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern unsigned char	 __res[sizeof(bd_t)];
-
-extern void		 oak_init(unsigned long r3,
-				  unsigned long ird_start,
-				  unsigned long ird_end,
-				  unsigned long cline_start,
-				  unsigned long cline_end);
-extern void		 oak_setup_arch(void);
-extern int		 oak_setup_residual(char *buffer);
-extern void		 oak_init_IRQ(void);
-extern int		 oak_get_irq(struct pt_regs *regs);
-extern void		 oak_restart(char *cmd);
-extern void		 oak_power_off(void);
-extern void		 oak_halt(void);
-extern void		 oak_time_init(void);
-extern int		 oak_set_rtc_time(unsigned long now);
-extern unsigned long	 oak_get_rtc_time(void);
-extern void		 oak_calibrate_decr(void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OAK_SETUP_H__ */
diff -Nru a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c
--- a/arch/ppc/platforms/powerpmc250.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/powerpmc250.c	Wed Jan  8 20:04:43 2003
@@ -193,12 +193,6 @@
 	powerpmc250_halt();
 }
 
-/* Resolves the open_pic.c build without including i8259.c */
-int i8259_poll(void)
-{
-	return 0;
-}
-
 static void __init
 powerpmc250_init_IRQ(void)
 {
diff -Nru a/arch/ppc/platforms/pplus_setup.c b/arch/ppc/platforms/pplus_setup.c
--- a/arch/ppc/platforms/pplus_setup.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/pplus_setup.c	Wed Jan  8 20:04:45 2003
@@ -224,12 +224,6 @@
 	}
 }
 
-static int
-pplus_get_irq(struct pt_regs *regs)
-{
-	return i8259_poll();
-}		
-
 static void __init
 pplus_init_IRQ(void)
 {
@@ -484,7 +478,7 @@
 	ppc_md.irq_cannonicalize = pplus_irq_cannonicalize;
 	ppc_md.init_IRQ       = pplus_init_IRQ;
 	/* this gets changed later on if we have an OpenPIC -- Cort */
-	ppc_md.get_irq        = pplus_get_irq;
+	ppc_md.get_irq        = i8259_irq;
 	ppc_md.init           = pplus_init2;
 
 	ppc_md.restart        = pplus_restart;
diff -Nru a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
--- a/arch/ppc/platforms/prep_setup.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/prep_setup.c	Wed Jan  8 20:04:45 2003
@@ -57,6 +57,7 @@
 #include <asm/mpc10x.h>
 #include <asm/i8259.h>
 #include <asm/open_pic.h>
+#include <asm/pci-bridge.h>
 
 unsigned char ucSystemType;
 unsigned char ucBoardRev;
@@ -991,12 +992,24 @@
 prep_init_IRQ(void)
 {
 	int i;
+	unsigned int pci_viddid, pci_did;
 
 	if (OpenPIC_Addr != NULL)
 		openpic_init(NUM_8259_INTERRUPTS);
 	for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ )
 		irq_desc[i].handler = &i8259_pic;
-	i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR);
+	/* If we have a Raven PCI bridge or a Hawk PCI bridge / Memory
+	 * controller, we poll (as they have a different int-ack address). */
+	early_read_config_dword(0, 0, 0, PCI_VENDOR_ID, &pci_viddid);
+	pci_did = (pci_viddid & 0xffff0000) >> 16;
+	if (((pci_viddid & 0xffff) == PCI_VENDOR_ID_MOTOROLA)
+			&& ((pci_did == PCI_DEVICE_ID_MOTOROLA_RAVEN)
+				|| (pci_did == PCI_DEVICE_ID_MOTOROLA_HAWK)))
+		i8259_init(0);
+	else
+		/* PCI interrupt ack address given in section 6.1.8 of the
+		 * PReP specification. */
+		i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR);
 }
 
 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
diff -Nru a/arch/ppc/platforms/prpmc750_setup.c b/arch/ppc/platforms/prpmc750_setup.c
--- a/arch/ppc/platforms/prpmc750_setup.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc/platforms/prpmc750_setup.c	Wed Jan  8 20:04:43 2003
@@ -202,12 +202,6 @@
 	prpmc750_halt();
 }
 
-/* Resolves the open_pic.c build without including i8259.c */
-int i8259_poll(void)
-{
-	return 0;
-}
-
 static void __init
 prpmc750_init_IRQ(void)
 {
diff -Nru a/arch/ppc/platforms/prpmc800_setup.c b/arch/ppc/platforms/prpmc800_setup.c
--- a/arch/ppc/platforms/prpmc800_setup.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/platforms/prpmc800_setup.c	Wed Jan  8 20:04:44 2003
@@ -196,12 +196,6 @@
 	prpmc800_halt();
 }
 
-/* Resolves the open_pic.c build without including i8259.c */
-int i8259_poll()
-{
-	return 0;
-}
-
 static void __init
 prpmc800_init_IRQ(void)
 {
diff -Nru a/arch/ppc/platforms/sandpoint_setup.c b/arch/ppc/platforms/sandpoint_setup.c
--- a/arch/ppc/platforms/sandpoint_setup.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/sandpoint_setup.c	Wed Jan  8 20:04:45 2003
@@ -336,7 +336,7 @@
 	irq = openpic_irq();
 
 	if (irq == SANDPOINT_SIO_IRQ) {
-		cascade_irq = i8259_poll();
+		cascade_irq = i8259_irq(regs);
 
 		if (cascade_irq != -1) {
 			irq = cascade_irq;
diff -Nru a/arch/ppc/platforms/tqm8xx.h b/arch/ppc/platforms/tqm8xx.h
--- a/arch/ppc/platforms/tqm8xx.h	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/platforms/tqm8xx.h	Wed Jan  8 20:04:45 2003
@@ -1,7 +1,7 @@
 /*
  * TQM8xx(L) board specific definitions
  * 
- * Copyright (c) 1999,2000,2001 Wolfgang Denk (wd@denx.de)
+ * Copyright (c) 1999-2002 Wolfgang Denk (wd@denx.de)
  */
 
 #ifdef __KERNEL__
@@ -26,7 +26,27 @@
  */
 #define PCMCIA_MEM_SIZE		( 64 << 20 )
 
-#define	MAX_HWIFS	1	/* overwrite default in include/asm-ppc/ide.h */
+#ifndef CONFIG_KUP4K
+# define	MAX_HWIFS	1	/* overwrite default in include/asm-ppc/ide.h	*/
+
+#else	/* CONFIG_KUP4K */
+
+# define	MAX_HWIFS	2	/* overwrite default in include/asm-ppc/ide.h	*/
+# ifndef __ASSEMBLY__
+# include <asm/8xx_immap.h>
+static __inline__ void ide_led(int on)
+{
+	volatile immap_t	*immap = (immap_t *)IMAP_ADDR;
+
+	if (on) {
+		immap->im_ioport.iop_padat &= ~0x80;
+	} else {
+		immap->im_ioport.iop_padat |= 0x80;
+	}
+}
+# endif	/* __ASSEMBLY__ */
+# define IDE_LED(x) ide_led((x))
+#endif	/* CONFIG_KUP4K */
 
 /*
  * Definitions for IDE0 Interface
@@ -43,8 +63,18 @@
 #define IDE0_CONTROL_REG_OFFSET		0x0106
 #define IDE0_IRQ_REG_OFFSET		0x000A	/* not used */
 
-#define	IDE0_INTERRUPT			13
-
+/* define IO_BASE for PCMCIA */
+#define _IO_BASE 0x80000000
+#define _IO_BASE_SIZE  (64<<10)
+
+#define	FEC_INTERRUPT		 9	/* = SIU_LEVEL4			*/
+#define PHY_INTERRUPT		12	/* = IRQ6			*/
+#define	IDE0_INTERRUPT		13
+
+#ifdef CONFIG_IDE
+#define ide_request_irq(irq,hand,flg,dev,id)    \
+        request_8xxirq((irq),(hand),(flg),(dev),(id))
+#endif
 
 /*-----------------------------------------------------------------------
  * CPM Ethernet through SCCx.
diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
--- a/arch/ppc/syslib/Makefile	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/syslib/Makefile	Wed Jan  8 20:04:32 2003
@@ -12,14 +12,18 @@
 CFLAGS_prom_init.o      += -mrelocatable-lib
 CFLAGS_btext.o          += -mrelocatable-lib
 
+export-objs			:=  ppc4xx_dma.o ppc4xx_pm.o
+
 obj-$(CONFIG_PPCBUG_NVRAM)	+= prep_nvram.o
 ifeq ($(CONFIG_4xx),y)
-obj-$(CONFIG_4xx)		+= ppc4xx_setup.o ppc4xx_pic.o ppc4xx_serial.o
-obj-$(CONFIG_PPC_RTC)		+= todc_time.o
+obj-$(CONFIG_4xx)		+= ppc4xx_pic.o
+obj-$(CONFIG_40x)		+= ppc4xx_setup.o
+obj-$(CONFIG_GEN_RTC)		+= todc_time.o
 obj-$(CONFIG_KGDB)		+= ppc4xx_kgdb.o
-obj-$(CONFIG_405_DMA)		+= ppc405_dma.o
-obj-$(CONFIG_PCI)		+= ppc405_pci.o indirect_pci.o pci_auto.o
-obj-$(CONFIG_PM)		+= ppc4xx_pm.o
+ifeq ($(CONFIG_40x),y)
+obj-$(CONFIG_KGDB)		+= ppc4xx_kgdb.o
+obj-$(CONFIG_PCI)		+= indirect_pci.o pci_auto.o ppc405_pci.o
+endif
 endif
 obj-$(CONFIG_8xx)		+= m8xx_setup.o ppc8xx_pic.o
 ifeq ($(CONFIG_8xx),y)
diff -Nru a/arch/ppc/syslib/ppc405_dma.c b/arch/ppc/syslib/ppc405_dma.c
--- a/arch/ppc/syslib/ppc405_dma.c	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,511 +0,0 @@
-/*
- * linux/arch/ppc/kernel/ppc405_dma.c
- *
- * BRIEF MODULE DESCRIPTION
- *	IBM 405 DMA Controller Functions
- *
- * Copyright 2000 MontaVista Software Inc.
- * Author: MontaVista Software, Inc.
- *         	ppopov@mvista.com or source@mvista.com
- *
- *
- *  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.
- *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  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.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <asm/system.h>
-#include <asm/io.h>
-#include <linux/mm.h>
-#include <linux/miscdevice.h>
-#include <linux/init.h>
-#include <linux/module.h>
-
-#include <asm/ppc405_dma.h>
-
-
-/*
- * Function prototypes
- */
-
-int hw_init_dma_channel(unsigned int,  ppc_dma_ch_t *);
-int init_dma_channel(unsigned int);
-int get_channel_config(unsigned int, ppc_dma_ch_t *);
-int set_channel_priority(unsigned int, unsigned int);
-unsigned int get_peripheral_width(unsigned int);
-int alloc_dma_handle(sgl_handle_t *, unsigned int, unsigned int);
-void free_dma_handle(sgl_handle_t);
-
-
-ppc_dma_ch_t dma_channels[MAX_405GP_DMA_CHANNELS];
-
-/*
- * Configures a DMA channel, including the peripheral bus width, if a
- * peripheral is attached to the channel, the polarity of the DMAReq and
- * DMAAck signals, etc.  This information should really be setup by the boot 
- * code, since most likely the configuration won't change dynamically.
- * If the kernel has to call this function, it's recommended that it's
- * called from platform specific init code.  The driver should not need to 
- * call this function.
- */
-int hw_init_dma_channel(unsigned int dmanr,  ppc_dma_ch_t *p_init)
-{
-    unsigned int polarity;
-    uint32_t control = 0;
-    ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];
-
-#ifdef DEBUG_405DMA
-    if (!p_init) {
-        printk("hw_init_dma_channel: NULL p_init\n");
-        return DMA_STATUS_NULL_POINTER;
-    }
-    if (dmanr >= MAX_405GP_DMA_CHANNELS) {
-        printk("hw_init_dma_channel: bad channel %d\n", dmanr);
-        return DMA_STATUS_BAD_CHANNEL;
-    }
-#endif
-
-#if DCRN_POL > 0
-    polarity = mfdcr(DCRN_POL);
-#else
-    polarity = 0;
-#endif
-
-    /* Setup the control register based on the values passed to
-     * us in p_init.  Then, over-write the control register with this
-     * new value.
-     */
-
-    control |= ( 
-                SET_DMA_CIE_ENABLE(p_init->int_enable) | /* interrupt enable         */
-                SET_DMA_BEN(p_init->buffer_enable)     | /* buffer enable            */ 
-                SET_DMA_ETD(p_init->etd_output)        | /* end of transfer pin      */
-                SET_DMA_TCE(p_init->tce_enable)        | /* terminal count enable    */
-                SET_DMA_PL(p_init->pl)                 | /* peripheral location      */
-                SET_DMA_DAI(p_init->dai)               | /* dest addr increment      */
-                SET_DMA_SAI(p_init->sai)               | /* src addr increment       */
-                SET_DMA_PRIORITY(p_init->cp)           |  /* channel priority        */
-                SET_DMA_PW(p_init->pwidth)             |  /* peripheral/bus width    */
-                SET_DMA_PSC(p_init->psc)               |  /* peripheral setup cycles */
-                SET_DMA_PWC(p_init->pwc)               |  /* peripheral wait cycles  */
-                SET_DMA_PHC(p_init->phc)               |  /* peripheral hold cycles  */
-                SET_DMA_PREFETCH(p_init->pf)              /* read prefetch           */
-                );
-
-    switch (dmanr) {
-        case 0:
-            /* clear all polarity signals and then "or" in new signal levels */
-            polarity &= ~(DMAReq0_ActiveLow | DMAAck0_ActiveLow | EOT0_ActiveLow);
-            polarity |= p_dma_ch->polarity;
-#if DCRN_POL > 0
-            mtdcr(DCRN_POL, polarity);
-#endif
-            mtdcr(DCRN_DMACR0, control);
-            break;
-        case 1:
-            polarity &= ~(DMAReq1_ActiveLow | DMAAck1_ActiveLow | EOT1_ActiveLow);
-            polarity |= p_dma_ch->polarity;
-#if DCRN_POL > 0
-            mtdcr(DCRN_POL, polarity);
-#endif
-            mtdcr(DCRN_DMACR1, control);
-            break;
-        case 2:
-            polarity &= ~(DMAReq2_ActiveLow | DMAAck2_ActiveLow | EOT2_ActiveLow);
-            polarity |= p_dma_ch->polarity;
-#if DCRN_POL > 0
-            mtdcr(DCRN_POL, polarity);
-#endif
-            mtdcr(DCRN_DMACR2, control);
-            break;
-        case 3:
-            polarity &= ~(DMAReq3_ActiveLow | DMAAck3_ActiveLow | EOT3_ActiveLow);
-            polarity |= p_dma_ch->polarity;
-#if DCRN_POL > 0
-            mtdcr(DCRN_POL, polarity);
-#endif
-            mtdcr(DCRN_DMACR3, control);
-            break;
-        default:
-            return DMA_STATUS_BAD_CHANNEL;
-    }
-    
-    /* save these values in our dma channel structure */
-    memcpy(p_dma_ch, p_init, sizeof(ppc_dma_ch_t));
-
-    /*
-     * The peripheral width values written in the control register are:
-     *   PW_8                 0
-     *   PW_16                1
-     *   PW_32                2
-     *   PW_64                3
-     *
-     *   Since the DMA count register takes the number of "transfers",
-     *   we need to divide the count sent to us in certain
-     *   functions by the appropriate number.  It so happens that our
-     *   right shift value is equal to the peripheral width value.
-     */
-    p_dma_ch->shift = p_init->pwidth;
-
-    /*
-     * Save the control word for easy access.
-     */
-    p_dma_ch->control = control;
-
-    mtdcr(DCRN_DMASR, 0xffffffff); /* clear status register */
-    return DMA_STATUS_GOOD;
-}
-
-
-
-
-/*
- * This function returns the channel configuration.
- */
-int get_channel_config(unsigned int dmanr, ppc_dma_ch_t *p_dma_ch)
-{
-    unsigned int polarity;
-    unsigned int control;
-
-#if DCRN_POL > 0
-    polarity = mfdcr(DCRN_POL);
-#else
-    polarity = 0;
-#endif
-
-    switch (dmanr) {
-        case 0:
-            p_dma_ch->polarity = 
-                polarity & (DMAReq0_ActiveLow | DMAAck0_ActiveLow | EOT0_ActiveLow);
-            control = mfdcr(DCRN_DMACR0);
-            break;
-        case 1:
-            p_dma_ch->polarity = 
-                polarity & (DMAReq1_ActiveLow | DMAAck1_ActiveLow | EOT1_ActiveLow);
-            control = mfdcr(DCRN_DMACR1);
-            break;
-        case 2:
-            p_dma_ch->polarity = 
-                polarity & (DMAReq2_ActiveLow | DMAAck2_ActiveLow | EOT2_ActiveLow);
-            control = mfdcr(DCRN_DMACR2);
-            break;
-        case 3:
-            p_dma_ch->polarity = 
-                polarity & (DMAReq3_ActiveLow | DMAAck3_ActiveLow | EOT3_ActiveLow);
-            control = mfdcr(DCRN_DMACR3);
-            break;
-        default:
-            return DMA_STATUS_BAD_CHANNEL;
-    }
-
-    p_dma_ch->cp = GET_DMA_PRIORITY(control);
-    p_dma_ch->pwidth = GET_DMA_PW(control);
-    p_dma_ch->psc = GET_DMA_PSC(control);
-    p_dma_ch->pwc = GET_DMA_PWC(control);
-    p_dma_ch->phc = GET_DMA_PHC(control);
-    p_dma_ch->pf = GET_DMA_PREFETCH(control);
-    p_dma_ch->int_enable = GET_DMA_CIE_ENABLE(control);
-    p_dma_ch->shift = GET_DMA_PW(control);
-
-    return DMA_STATUS_GOOD;
-}
-
-/*
- * Sets the priority for the DMA channel dmanr.
- * Since this is setup by the hardware init function, this function 
- * can be used to dynamically change the priority of a channel.
- *
- * Acceptable priorities:
- *
- * PRIORITY_LOW
- * PRIORITY_MID_LOW
- * PRIORITY_MID_HIGH
- * PRIORITY_HIGH
- *
- */
-int set_channel_priority(unsigned int dmanr, unsigned int priority)
-{
-    unsigned int control;
-
-#ifdef DEBUG_405DMA
-    if ( (priority != PRIORITY_LOW) &&
-            (priority != PRIORITY_MID_LOW) &&
-            (priority != PRIORITY_MID_HIGH) &&
-            (priority != PRIORITY_HIGH)) {
-        printk("set_channel_priority: bad priority: 0x%x\n", priority);
-    }
-#endif
-
-    switch (dmanr) {
-        case 0:
-            control = mfdcr(DCRN_DMACR0);
-            control|= SET_DMA_PRIORITY(priority);
-            mtdcr(DCRN_DMACR0, control);
-            break;
-        case 1:
-            control = mfdcr(DCRN_DMACR1);
-            control|= SET_DMA_PRIORITY(priority);
-            mtdcr(DCRN_DMACR1, control);
-            break;
-        case 2:
-            control = mfdcr(DCRN_DMACR2);
-            control|= SET_DMA_PRIORITY(priority);
-            mtdcr(DCRN_DMACR2, control);
-            break;
-        case 3:
-            control = mfdcr(DCRN_DMACR3);
-            control|= SET_DMA_PRIORITY(priority);
-            mtdcr(DCRN_DMACR3, control);
-            break;
-        default:
-#ifdef DEBUG_405DMA
-            printk("set_channel_priority: bad channel: %d\n", dmanr);
-#endif
-            return DMA_STATUS_BAD_CHANNEL;
-    }
-    return DMA_STATUS_GOOD;
-}
-
-
-
-/*
- * Returns the width of the peripheral attached to this channel. This assumes
- * that someone who knows the hardware configuration, boot code or some other 
- * init code, already set the width.
- *
- * The return value is one of:
- *   PW_8
- *   PW_16
- *   PW_32
- *   PW_64
- *
- *   The function returns 0 on error.
- */
-unsigned int get_peripheral_width(unsigned int dmanr)
-{
-    unsigned int control;
-
-    switch (dmanr) {
-        case 0:
-            control = mfdcr(DCRN_DMACR0);
-            break;
-        case 1:
-            control = mfdcr(DCRN_DMACR1);
-            break;
-        case 2:
-            control = mfdcr(DCRN_DMACR2);
-            break;
-        case 3:
-            control = mfdcr(DCRN_DMACR3);
-            break;
-        default:
-#ifdef DEBUG_405DMA
-            printk("get_peripheral_width: bad channel: %d\n", dmanr);
-#endif
-            return 0;
-    }
-    return(GET_DMA_PW(control));
-}
-
-
-
-
-/*
- *   Create a scatter/gather list handle.  This is simply a structure which
- *   describes a scatter/gather list.
- *
- *   A handle is returned in "handle" which the driver should save in order to 
- *   be able to access this list later.  A chunk of memory will be allocated 
- *   to be used by the API for internal management purposes, including managing 
- *   the sg list and allocating memory for the sgl descriptors.  One page should 
- *   be more than enough for that purpose.  Perhaps it's a bit wasteful to use 
- *   a whole page for a single sg list, but most likely there will be only one 
- *   sg list per channel.
- *
- *   Interrupt notes:
- *   Each sgl descriptor has a copy of the DMA control word which the DMA engine
- *   loads in the control register.  The control word has a "global" interrupt 
- *   enable bit for that channel. Interrupts are further qualified by a few bits
- *   in the sgl descriptor count register.  In order to setup an sgl, we have to
- *   know ahead of time whether or not interrupts will be enabled at the completion
- *   of the transfers.  Thus, enable_dma_interrupt()/disable_dma_interrupt() MUST
- *   be called before calling alloc_dma_handle().  If the interrupt mode will never
- *   change after powerup, then enable_dma_interrupt()/disable_dma_interrupt() 
- *   do not have to be called -- interrupts will be enabled or disabled based
- *   on how the channel was configured after powerup by the hw_init_dma_channel()
- *   function.  Each sgl descriptor will be setup to interrupt if an error occurs;
- *   however, only the last descriptor will be setup to interrupt. Thus, an 
- *   interrupt will occur (if interrupts are enabled) only after the complete
- *   sgl transfer is done.
- */
-int alloc_dma_handle(sgl_handle_t *phandle, unsigned int mode, unsigned int dmanr)
-{
-    sgl_list_info_t *psgl;
-    dma_addr_t dma_addr;
-    ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];
-    uint32_t sg_command;
-    void *ret;
-
-#ifdef DEBUG_405DMA
-    if (!phandle) {
-            printk("alloc_dma_handle: null handle pointer\n");
-            return DMA_STATUS_NULL_POINTER;
-    }
-    switch (mode) {
-        case DMA_MODE_READ:
-        case DMA_MODE_WRITE:
-        case DMA_MODE_MM:
-        case DMA_MODE_MM_DEVATSRC:
-        case DMA_MODE_MM_DEVATDST:
-            break;
-        default:
-            printk("alloc_dma_handle: bad mode 0x%x\n", mode);
-            return DMA_STATUS_BAD_MODE;
-    }
-    if (dmanr >= MAX_405GP_DMA_CHANNELS) {
-        printk("alloc_dma_handle: invalid channel 0x%x\n", dmanr);
-        return DMA_STATUS_BAD_CHANNEL;
-    }
-#endif
-
-    /* Get a page of memory, which is zeroed out by pci_alloc_consistent() */
-
-/* wrong not a pci device - armin */
-    /* psgl = (sgl_list_info_t *) pci_alloc_consistent(NULL, SGL_LIST_SIZE, &dma_addr);
-*/
-
-	ret = consistent_alloc(GFP_ATOMIC |GFP_DMA, SGL_LIST_SIZE, &dma_addr);
-	if (ret != NULL) {
-		memset(ret, 0,SGL_LIST_SIZE );
-		psgl = (sgl_list_info_t *) ret;
-	}
-
-
-    if (psgl == NULL) {
-        *phandle = (sgl_handle_t)NULL;
-        return DMA_STATUS_OUT_OF_MEMORY;
-    }
-
-    psgl->dma_addr = dma_addr;
-    psgl->dmanr = dmanr;
-
-    /*
-     * Modify and save the control word. These word will get written to each sgl
-     * descriptor.  The DMA engine then loads this control word into the control
-     * register every time it reads a new descriptor.
-     */
-    psgl->control = p_dma_ch->control;
-    psgl->control &= ~(DMA_TM_MASK | DMA_TD);  /* clear all "mode" bits first               */
-    psgl->control |= (mode | DMA_CH_ENABLE);   /* save the control word along with the mode */
-
-    if (p_dma_ch->int_enable) {
-        psgl->control |= DMA_CIE_ENABLE;       /* channel interrupt enabled                 */
-    }
-    else {
-        psgl->control &= ~DMA_CIE_ENABLE;
-    }
-
-#if DCRN_ASGC > 0
-    sg_command = mfdcr(DCRN_ASGC);
-    switch (dmanr) {
-        case 0:
-            sg_command |= SSG0_MASK_ENABLE;
-            break;
-        case 1:
-            sg_command |= SSG1_MASK_ENABLE;
-            break;
-        case 2:
-            sg_command |= SSG2_MASK_ENABLE;
-            break;
-        case 3:
-            sg_command |= SSG3_MASK_ENABLE;
-            break;
-        default:
-#ifdef DEBUG_405DMA
-            printk("alloc_dma_handle: bad channel: %d\n", dmanr);
-#endif
-            free_dma_handle((sgl_handle_t)psgl);
-            *phandle = (sgl_handle_t)NULL;
-            return DMA_STATUS_BAD_CHANNEL;
-    }
-
-    mtdcr(DCRN_ASGC, sg_command);  /* enable writing to this channel's sgl control bits */
-#else
-   (void)sg_command;
-#endif
-    psgl->sgl_control = SG_ERI_ENABLE | SG_LINK;   /* sgl descriptor control bits */
-
-    if (p_dma_ch->int_enable) {
-        if (p_dma_ch->tce_enable)
-            psgl->sgl_control |= SG_TCI_ENABLE;
-        else
-            psgl->sgl_control |= SG_ETI_ENABLE;
-    }
-
-    *phandle = (sgl_handle_t)psgl;
-    return DMA_STATUS_GOOD;
-}
-
-
-
-/*
- * Destroy a scatter/gather list handle that was created by alloc_dma_handle().
- * The list must be empty (contain no elements).
- */
-void free_dma_handle(sgl_handle_t handle)
-{
-    sgl_list_info_t *psgl = (sgl_list_info_t *)handle;
-
-    if (!handle) {
-#ifdef DEBUG_405DMA
-        printk("free_dma_handle: got NULL\n");
-#endif
-        return;
-    }
-    else if (psgl->phead) {
-#ifdef DEBUG_405DMA
-        printk("free_dma_handle: list not empty\n");
-#endif
-        return;
-    }
-    else if (!psgl->dma_addr) { /* should never happen */
-#ifdef DEBUG_405DMA
-        printk("free_dma_handle: no dma address\n");
-#endif
-        return;
-    }
-
-  /* wrong not a PCI device -armin */
-  /*  pci_free_consistent(NULL, SGL_LIST_SIZE, (void *)psgl, psgl->dma_addr); */
-	//	free_pages((unsigned long)psgl, get_order(SGL_LIST_SIZE));
-    	consistent_free((void *)psgl);
-
-
-}
-
-
-EXPORT_SYMBOL(hw_init_dma_channel);
-EXPORT_SYMBOL(get_channel_config);
-EXPORT_SYMBOL(set_channel_priority);
-EXPORT_SYMBOL(get_peripheral_width);
-EXPORT_SYMBOL(alloc_dma_handle);
-EXPORT_SYMBOL(free_dma_handle);
-EXPORT_SYMBOL(dma_channels);
diff -Nru a/arch/ppc/syslib/ppc405_pci.c b/arch/ppc/syslib/ppc405_pci.c
--- a/arch/ppc/syslib/ppc405_pci.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc/syslib/ppc405_pci.c	Wed Jan  8 20:04:44 2003
@@ -7,6 +7,7 @@
  * Author: MontaVista Software, Inc.  <source@mvista.com>
  *         Frank Rowand <frank_rowand@mvista.com>
  *         Debbie Chu   <debbie_chu@mvista.com>
+ * Further modifications by Armin Kuster.
  *
  * Copyright 2000 MontaVista Software Inc.
  *
@@ -36,20 +37,16 @@
 #include <asm/system.h>
 #include <asm/machdep.h>
 #include <linux/init.h>
+#include <linux/errno.h>
+#include <asm/ocp.h>
 #include <asm/ibm4xx.h>
 #include <asm/pci-bridge.h>
-#include <platforms/4xx/ibm_ocp.h>
+#include <asm/ibm_ocp_pci.h>
 
-#ifdef  CONFIG_DEBUG_BRINGUP
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
-extern void bios_fixup(struct pci_controller *, void *);
+ 
+extern void bios_fixup(struct pci_controller *, struct pcil0_regs *);
 extern int ppc405_map_irq(struct pci_dev *dev, unsigned char idsel,
 			  unsigned char pin);
-extern struct pcil0_regs *PCIL_ADDR[];
 
 void
 ppc405_pcibios_fixup_resources(struct pci_dev *dev)
@@ -87,7 +84,7 @@
 			    KERN_ERR "  fixup will be attempted later\n",
 			    min_host_addr, i, max_host_addr,
 			    dev->bus->number, PCI_SLOT(dev->devfn),
-			    PCI_FUNC(dev->devfn), dev->name);
+			    PCI_FUNC(dev->devfn), dev->slot.name);
 
 			/* force pcibios_assign_resources() to assign a new address */
 			res->end -= res->start;
@@ -120,19 +117,22 @@
 	isa_io_base = 0;
 	isa_mem_base = 0;
 	pci_dram_offset = 0;
-	
+
+#if  (PSR_PCI_ARBIT_EN > 1)
 	/* Check if running in slave mode */
 	if ((mfdcr(DCRN_CHPSR) & PSR_PCI_ARBIT_EN) == 0) {
 		printk("Running as PCI slave, kernel PCI disabled !\n");
 		return;
 	}
+#endif
 	/* Setup PCI32 hose */
 	hose_a = pcibios_alloc_controller();
 	if (!hose_a)
 		return;
 	setup_indirect_pci(hose_a, PPC405_PCI_CONFIG_ADDR,
 			   PPC405_PCI_CONFIG_DATA);
-	pcip = ioremap((unsigned long) PCIL_ADDR[0], PAGE_SIZE);
+
+	pcip = ioremap(PPC4xx_PCI_LCFG_PADDR, PAGE_SIZE);
 	if (pcip != NULL) {
 
 #if defined(CONFIG_BIOS_FIXUP)
@@ -140,68 +140,67 @@
 #endif
 		new_pmm_min = 0xffffffff;
 		for (reg_index = 0; reg_index < 3; reg_index++) {
-			tmp_size = in_le32((void *) &(pcip->pmm[reg_index].ma));	// *_PMM0MA
-			if (tmp_size & 0x1) {
-				tmp_addr = in_le32((void *) &(pcip->pmm[reg_index].pcila));	// *_PMM0PCILA
-				if (tmp_addr < PPC405_PCI_PHY_MEM_BASE) {
-					printk(KERN_DEBUG
-					       "Disabling mapping to PCI mem addr 0x%8.8x\n",
-					       tmp_addr);
-					out_le32((void *) &(pcip->pmm[reg_index].ma), tmp_size & ~1);	// *_PMMOMA
-				} else {
-					tmp_addr = in_le32((void *) &(pcip->pmm[reg_index].la));	// *_PMMOLA
-					if (tmp_addr < new_pmm_min)
-						new_pmm_min = tmp_addr;
-					tmp_addr =
-					    tmp_addr + (0xffffffff -
-							(tmp_size &
-							 0xffffc000));
-					if (tmp_addr > PPC405_PCI_UPPER_MEM) {
-						new_pmm_max = tmp_addr;	// PPC405_PCI_UPPER_MEM 
-					} else {
-						new_pmm_max =
-						    PPC405_PCI_UPPER_MEM;
-					}
-				}
+			tmp_size = in_le32(&pcip->pmm[reg_index].ma);	// mask & attrs
+			/* test the enable bit */
+			if ((tmp_size & 0x1) == 0)
+				continue;
+			tmp_addr = in_le32(&pcip->pmm[reg_index].pcila);	// PCI addr
+			if (tmp_addr < PPC405_PCI_PHY_MEM_BASE) {
+				printk(KERN_DEBUG
+				       "Disabling mapping to PCI mem addr 0x%8.8x\n",
+				       tmp_addr);
+				out_le32(&pcip->pmm[reg_index].ma, tmp_size & ~1);	// *_PMMOMA
+				continue;
+			}
+			tmp_addr = in_le32(&pcip->pmm[reg_index].la);	// *_PMMOLA
+			if (tmp_addr < new_pmm_min)
+				new_pmm_min = tmp_addr;
+			tmp_addr = tmp_addr +
+				(0xffffffff - (tmp_size & 0xffffc000));
+			if (tmp_addr > PPC405_PCI_UPPER_MEM) {
+				new_pmm_max = tmp_addr;	// PPC405_PCI_UPPER_MEM 
+			} else {
+				new_pmm_max = PPC405_PCI_UPPER_MEM;
 			}
 
 		}		// for
 
 		iounmap(pcip);
 	}
-	hose_a->first_busno      = 0;
-	hose_a->last_busno       = 0xff;
-	hose_a->pci_mem_offset   = 0;
+
+	hose_a->first_busno = 0;
+	hose_a->last_busno = 0xff;
+	hose_a->pci_mem_offset = 0;
 
 	/* Setup bridge memory/IO ranges & resources
 	 * TODO: Handle firmwares setting up a legacy ISA mem base
 	 */
-	hose_a->io_space.start		= PPC405_PCI_LOWER_IO;
-	hose_a->io_space.end		= PPC405_PCI_UPPER_IO;
-	hose_a->mem_space.start		= new_pmm_min;
-	hose_a->mem_space.end		= new_pmm_max;
-	hose_a->io_base_phys		= PPC405_PCI_PHY_IO_BASE;
-	hose_a->io_base_virt		= ioremap(hose_a->io_base_phys, 0x10000);
-	hose_a->io_resource.start	= 0;
-	hose_a->io_resource.end		= PPC405_PCI_UPPER_IO-PPC405_PCI_LOWER_IO;
-	hose_a->io_resource.flags	= IORESOURCE_IO;
-	hose_a->io_resource.name	= "PCI I/O";
-	hose_a->mem_resources[0].start	= new_pmm_min;
-	hose_a->mem_resources[0].end	= new_pmm_max;
-	hose_a->mem_resources[0].flags	= IORESOURCE_MEM;
-	hose_a->mem_resources[0].name	= "PCI Memory";
-	isa_io_base			= (int)hose_a->io_base_virt;
-	isa_mem_base			= 0;	      /*     ISA not implemented */
-	ISA_DMA_THRESHOLD		= 0x00ffffff; /* ??? ISA not implemented */
+	hose_a->io_space.start = PPC405_PCI_LOWER_IO;
+	hose_a->io_space.end = PPC405_PCI_UPPER_IO;
+	hose_a->mem_space.start = new_pmm_min;
+	hose_a->mem_space.end = new_pmm_max;
+	hose_a->io_base_phys = PPC405_PCI_PHY_IO_BASE;
+	hose_a->io_base_virt = ioremap(hose_a->io_base_phys, 0x10000);
+	hose_a->io_resource.start = 0;
+	hose_a->io_resource.end = PPC405_PCI_UPPER_IO - PPC405_PCI_LOWER_IO;
+	hose_a->io_resource.flags = IORESOURCE_IO;
+	hose_a->io_resource.name = "PCI I/O";
+	hose_a->mem_resources[0].start = new_pmm_min;
+	hose_a->mem_resources[0].end = new_pmm_max;
+	hose_a->mem_resources[0].flags = IORESOURCE_MEM;
+	hose_a->mem_resources[0].name = "PCI Memory";
+	isa_io_base = (int) hose_a->io_base_virt;
+	isa_mem_base = 0;	/*     ISA not implemented */
+	ISA_DMA_THRESHOLD = 0x00ffffff;	/* ??? ISA not implemented */
 
 	/* Scan busses & initial setup by pci_auto */
 	hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno);
 	hose_a->last_busno = 0;
 
 	/* Setup ppc_md */
-	ppc_md.pcibios_fixup     	= NULL;
-	ppc_md.pci_exclude_device	= ppc4xx_exclude_device;
-	ppc_md.pcibios_fixup_resources	= ppc405_pcibios_fixup_resources;
-	ppc_md.pci_swizzle		= common_swizzle;
-	ppc_md.pci_map_irq		= ppc405_map_irq;
+	ppc_md.pcibios_fixup = NULL;
+	ppc_md.pci_exclude_device = ppc4xx_exclude_device;
+	ppc_md.pcibios_fixup_resources = ppc405_pcibios_fixup_resources;
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = ppc405_map_irq;
 }
diff -Nru a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/syslib/ppc4xx_dma.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,511 @@
+/*
+ * linux/arch/ppc/kernel/ppc405_dma.c
+ *
+ * BRIEF MODULE DESCRIPTION
+ *	IBM 405 DMA Controller Functions
+ *
+ * Copyright 2000 MontaVista Software Inc.
+ * Author: MontaVista Software, Inc.
+ *         	ppopov@mvista.com or source@mvista.com
+ *
+ *
+ *  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.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <linux/mm.h>
+#include <linux/miscdevice.h>
+#include <linux/init.h>
+#include <linux/module.h>
+
+#include <asm/ppc405_dma.h>
+
+
+/*
+ * Function prototypes
+ */
+
+int hw_init_dma_channel(unsigned int,  ppc_dma_ch_t *);
+int init_dma_channel(unsigned int);
+int get_channel_config(unsigned int, ppc_dma_ch_t *);
+int set_channel_priority(unsigned int, unsigned int);
+unsigned int get_peripheral_width(unsigned int);
+int alloc_dma_handle(sgl_handle_t *, unsigned int, unsigned int);
+void free_dma_handle(sgl_handle_t);
+
+
+ppc_dma_ch_t dma_channels[MAX_405GP_DMA_CHANNELS];
+
+/*
+ * Configures a DMA channel, including the peripheral bus width, if a
+ * peripheral is attached to the channel, the polarity of the DMAReq and
+ * DMAAck signals, etc.  This information should really be setup by the boot 
+ * code, since most likely the configuration won't change dynamically.
+ * If the kernel has to call this function, it's recommended that it's
+ * called from platform specific init code.  The driver should not need to 
+ * call this function.
+ */
+int hw_init_dma_channel(unsigned int dmanr,  ppc_dma_ch_t *p_init)
+{
+    unsigned int polarity;
+    uint32_t control = 0;
+    ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];
+
+#ifdef DEBUG_405DMA
+    if (!p_init) {
+        printk("hw_init_dma_channel: NULL p_init\n");
+        return DMA_STATUS_NULL_POINTER;
+    }
+    if (dmanr >= MAX_405GP_DMA_CHANNELS) {
+        printk("hw_init_dma_channel: bad channel %d\n", dmanr);
+        return DMA_STATUS_BAD_CHANNEL;
+    }
+#endif
+
+#if DCRN_POL > 0
+    polarity = mfdcr(DCRN_POL);
+#else
+    polarity = 0;
+#endif
+
+    /* Setup the control register based on the values passed to
+     * us in p_init.  Then, over-write the control register with this
+     * new value.
+     */
+
+    control |= ( 
+                SET_DMA_CIE_ENABLE(p_init->int_enable) | /* interrupt enable         */
+                SET_DMA_BEN(p_init->buffer_enable)     | /* buffer enable            */ 
+                SET_DMA_ETD(p_init->etd_output)        | /* end of transfer pin      */
+                SET_DMA_TCE(p_init->tce_enable)        | /* terminal count enable    */
+                SET_DMA_PL(p_init->pl)                 | /* peripheral location      */
+                SET_DMA_DAI(p_init->dai)               | /* dest addr increment      */
+                SET_DMA_SAI(p_init->sai)               | /* src addr increment       */
+                SET_DMA_PRIORITY(p_init->cp)           |  /* channel priority        */
+                SET_DMA_PW(p_init->pwidth)             |  /* peripheral/bus width    */
+                SET_DMA_PSC(p_init->psc)               |  /* peripheral setup cycles */
+                SET_DMA_PWC(p_init->pwc)               |  /* peripheral wait cycles  */
+                SET_DMA_PHC(p_init->phc)               |  /* peripheral hold cycles  */
+                SET_DMA_PREFETCH(p_init->pf)              /* read prefetch           */
+                );
+
+    switch (dmanr) {
+        case 0:
+            /* clear all polarity signals and then "or" in new signal levels */
+            polarity &= ~(DMAReq0_ActiveLow | DMAAck0_ActiveLow | EOT0_ActiveLow);
+            polarity |= p_dma_ch->polarity;
+#if DCRN_POL > 0
+            mtdcr(DCRN_POL, polarity);
+#endif
+            mtdcr(DCRN_DMACR0, control);
+            break;
+        case 1:
+            polarity &= ~(DMAReq1_ActiveLow | DMAAck1_ActiveLow | EOT1_ActiveLow);
+            polarity |= p_dma_ch->polarity;
+#if DCRN_POL > 0
+            mtdcr(DCRN_POL, polarity);
+#endif
+            mtdcr(DCRN_DMACR1, control);
+            break;
+        case 2:
+            polarity &= ~(DMAReq2_ActiveLow | DMAAck2_ActiveLow | EOT2_ActiveLow);
+            polarity |= p_dma_ch->polarity;
+#if DCRN_POL > 0
+            mtdcr(DCRN_POL, polarity);
+#endif
+            mtdcr(DCRN_DMACR2, control);
+            break;
+        case 3:
+            polarity &= ~(DMAReq3_ActiveLow | DMAAck3_ActiveLow | EOT3_ActiveLow);
+            polarity |= p_dma_ch->polarity;
+#if DCRN_POL > 0
+            mtdcr(DCRN_POL, polarity);
+#endif
+            mtdcr(DCRN_DMACR3, control);
+            break;
+        default:
+            return DMA_STATUS_BAD_CHANNEL;
+    }
+    
+    /* save these values in our dma channel structure */
+    memcpy(p_dma_ch, p_init, sizeof(ppc_dma_ch_t));
+
+    /*
+     * The peripheral width values written in the control register are:
+     *   PW_8                 0
+     *   PW_16                1
+     *   PW_32                2
+     *   PW_64                3
+     *
+     *   Since the DMA count register takes the number of "transfers",
+     *   we need to divide the count sent to us in certain
+     *   functions by the appropriate number.  It so happens that our
+     *   right shift value is equal to the peripheral width value.
+     */
+    p_dma_ch->shift = p_init->pwidth;
+
+    /*
+     * Save the control word for easy access.
+     */
+    p_dma_ch->control = control;
+
+    mtdcr(DCRN_DMASR, 0xffffffff); /* clear status register */
+    return DMA_STATUS_GOOD;
+}
+
+
+
+
+/*
+ * This function returns the channel configuration.
+ */
+int get_channel_config(unsigned int dmanr, ppc_dma_ch_t *p_dma_ch)
+{
+    unsigned int polarity;
+    unsigned int control;
+
+#if DCRN_POL > 0
+    polarity = mfdcr(DCRN_POL);
+#else
+    polarity = 0;
+#endif
+
+    switch (dmanr) {
+        case 0:
+            p_dma_ch->polarity = 
+                polarity & (DMAReq0_ActiveLow | DMAAck0_ActiveLow | EOT0_ActiveLow);
+            control = mfdcr(DCRN_DMACR0);
+            break;
+        case 1:
+            p_dma_ch->polarity = 
+                polarity & (DMAReq1_ActiveLow | DMAAck1_ActiveLow | EOT1_ActiveLow);
+            control = mfdcr(DCRN_DMACR1);
+            break;
+        case 2:
+            p_dma_ch->polarity = 
+                polarity & (DMAReq2_ActiveLow | DMAAck2_ActiveLow | EOT2_ActiveLow);
+            control = mfdcr(DCRN_DMACR2);
+            break;
+        case 3:
+            p_dma_ch->polarity = 
+                polarity & (DMAReq3_ActiveLow | DMAAck3_ActiveLow | EOT3_ActiveLow);
+            control = mfdcr(DCRN_DMACR3);
+            break;
+        default:
+            return DMA_STATUS_BAD_CHANNEL;
+    }
+
+    p_dma_ch->cp = GET_DMA_PRIORITY(control);
+    p_dma_ch->pwidth = GET_DMA_PW(control);
+    p_dma_ch->psc = GET_DMA_PSC(control);
+    p_dma_ch->pwc = GET_DMA_PWC(control);
+    p_dma_ch->phc = GET_DMA_PHC(control);
+    p_dma_ch->pf = GET_DMA_PREFETCH(control);
+    p_dma_ch->int_enable = GET_DMA_CIE_ENABLE(control);
+    p_dma_ch->shift = GET_DMA_PW(control);
+
+    return DMA_STATUS_GOOD;
+}
+
+/*
+ * Sets the priority for the DMA channel dmanr.
+ * Since this is setup by the hardware init function, this function 
+ * can be used to dynamically change the priority of a channel.
+ *
+ * Acceptable priorities:
+ *
+ * PRIORITY_LOW
+ * PRIORITY_MID_LOW
+ * PRIORITY_MID_HIGH
+ * PRIORITY_HIGH
+ *
+ */
+int set_channel_priority(unsigned int dmanr, unsigned int priority)
+{
+    unsigned int control;
+
+#ifdef DEBUG_405DMA
+    if ( (priority != PRIORITY_LOW) &&
+            (priority != PRIORITY_MID_LOW) &&
+            (priority != PRIORITY_MID_HIGH) &&
+            (priority != PRIORITY_HIGH)) {
+        printk("set_channel_priority: bad priority: 0x%x\n", priority);
+    }
+#endif
+
+    switch (dmanr) {
+        case 0:
+            control = mfdcr(DCRN_DMACR0);
+            control|= SET_DMA_PRIORITY(priority);
+            mtdcr(DCRN_DMACR0, control);
+            break;
+        case 1:
+            control = mfdcr(DCRN_DMACR1);
+            control|= SET_DMA_PRIORITY(priority);
+            mtdcr(DCRN_DMACR1, control);
+            break;
+        case 2:
+            control = mfdcr(DCRN_DMACR2);
+            control|= SET_DMA_PRIORITY(priority);
+            mtdcr(DCRN_DMACR2, control);
+            break;
+        case 3:
+            control = mfdcr(DCRN_DMACR3);
+            control|= SET_DMA_PRIORITY(priority);
+            mtdcr(DCRN_DMACR3, control);
+            break;
+        default:
+#ifdef DEBUG_405DMA
+            printk("set_channel_priority: bad channel: %d\n", dmanr);
+#endif
+            return DMA_STATUS_BAD_CHANNEL;
+    }
+    return DMA_STATUS_GOOD;
+}
+
+
+
+/*
+ * Returns the width of the peripheral attached to this channel. This assumes
+ * that someone who knows the hardware configuration, boot code or some other 
+ * init code, already set the width.
+ *
+ * The return value is one of:
+ *   PW_8
+ *   PW_16
+ *   PW_32
+ *   PW_64
+ *
+ *   The function returns 0 on error.
+ */
+unsigned int get_peripheral_width(unsigned int dmanr)
+{
+    unsigned int control;
+
+    switch (dmanr) {
+        case 0:
+            control = mfdcr(DCRN_DMACR0);
+            break;
+        case 1:
+            control = mfdcr(DCRN_DMACR1);
+            break;
+        case 2:
+            control = mfdcr(DCRN_DMACR2);
+            break;
+        case 3:
+            control = mfdcr(DCRN_DMACR3);
+            break;
+        default:
+#ifdef DEBUG_405DMA
+            printk("get_peripheral_width: bad channel: %d\n", dmanr);
+#endif
+            return 0;
+    }
+    return(GET_DMA_PW(control));
+}
+
+
+
+
+/*
+ *   Create a scatter/gather list handle.  This is simply a structure which
+ *   describes a scatter/gather list.
+ *
+ *   A handle is returned in "handle" which the driver should save in order to 
+ *   be able to access this list later.  A chunk of memory will be allocated 
+ *   to be used by the API for internal management purposes, including managing 
+ *   the sg list and allocating memory for the sgl descriptors.  One page should 
+ *   be more than enough for that purpose.  Perhaps it's a bit wasteful to use 
+ *   a whole page for a single sg list, but most likely there will be only one 
+ *   sg list per channel.
+ *
+ *   Interrupt notes:
+ *   Each sgl descriptor has a copy of the DMA control word which the DMA engine
+ *   loads in the control register.  The control word has a "global" interrupt 
+ *   enable bit for that channel. Interrupts are further qualified by a few bits
+ *   in the sgl descriptor count register.  In order to setup an sgl, we have to
+ *   know ahead of time whether or not interrupts will be enabled at the completion
+ *   of the transfers.  Thus, enable_dma_interrupt()/disable_dma_interrupt() MUST
+ *   be called before calling alloc_dma_handle().  If the interrupt mode will never
+ *   change after powerup, then enable_dma_interrupt()/disable_dma_interrupt() 
+ *   do not have to be called -- interrupts will be enabled or disabled based
+ *   on how the channel was configured after powerup by the hw_init_dma_channel()
+ *   function.  Each sgl descriptor will be setup to interrupt if an error occurs;
+ *   however, only the last descriptor will be setup to interrupt. Thus, an 
+ *   interrupt will occur (if interrupts are enabled) only after the complete
+ *   sgl transfer is done.
+ */
+int alloc_dma_handle(sgl_handle_t *phandle, unsigned int mode, unsigned int dmanr)
+{
+    sgl_list_info_t *psgl;
+    dma_addr_t dma_addr;
+    ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];
+    uint32_t sg_command;
+    void *ret;
+
+#ifdef DEBUG_405DMA
+    if (!phandle) {
+            printk("alloc_dma_handle: null handle pointer\n");
+            return DMA_STATUS_NULL_POINTER;
+    }
+    switch (mode) {
+        case DMA_MODE_READ:
+        case DMA_MODE_WRITE:
+        case DMA_MODE_MM:
+        case DMA_MODE_MM_DEVATSRC:
+        case DMA_MODE_MM_DEVATDST:
+            break;
+        default:
+            printk("alloc_dma_handle: bad mode 0x%x\n", mode);
+            return DMA_STATUS_BAD_MODE;
+    }
+    if (dmanr >= MAX_405GP_DMA_CHANNELS) {
+        printk("alloc_dma_handle: invalid channel 0x%x\n", dmanr);
+        return DMA_STATUS_BAD_CHANNEL;
+    }
+#endif
+
+    /* Get a page of memory, which is zeroed out by pci_alloc_consistent() */
+
+/* wrong not a pci device - armin */
+    /* psgl = (sgl_list_info_t *) pci_alloc_consistent(NULL, SGL_LIST_SIZE, &dma_addr);
+*/
+
+	ret = consistent_alloc(GFP_ATOMIC |GFP_DMA, SGL_LIST_SIZE, &dma_addr);
+	if (ret != NULL) {
+		memset(ret, 0,SGL_LIST_SIZE );
+		psgl = (sgl_list_info_t *) ret;
+	}
+
+
+    if (psgl == NULL) {
+        *phandle = (sgl_handle_t)NULL;
+        return DMA_STATUS_OUT_OF_MEMORY;
+    }
+
+    psgl->dma_addr = dma_addr;
+    psgl->dmanr = dmanr;
+
+    /*
+     * Modify and save the control word. These word will get written to each sgl
+     * descriptor.  The DMA engine then loads this control word into the control
+     * register every time it reads a new descriptor.
+     */
+    psgl->control = p_dma_ch->control;
+    psgl->control &= ~(DMA_TM_MASK | DMA_TD);  /* clear all "mode" bits first               */
+    psgl->control |= (mode | DMA_CH_ENABLE);   /* save the control word along with the mode */
+
+    if (p_dma_ch->int_enable) {
+        psgl->control |= DMA_CIE_ENABLE;       /* channel interrupt enabled                 */
+    }
+    else {
+        psgl->control &= ~DMA_CIE_ENABLE;
+    }
+
+#if DCRN_ASGC > 0
+    sg_command = mfdcr(DCRN_ASGC);
+    switch (dmanr) {
+        case 0:
+            sg_command |= SSG0_MASK_ENABLE;
+            break;
+        case 1:
+            sg_command |= SSG1_MASK_ENABLE;
+            break;
+        case 2:
+            sg_command |= SSG2_MASK_ENABLE;
+            break;
+        case 3:
+            sg_command |= SSG3_MASK_ENABLE;
+            break;
+        default:
+#ifdef DEBUG_405DMA
+            printk("alloc_dma_handle: bad channel: %d\n", dmanr);
+#endif
+            free_dma_handle((sgl_handle_t)psgl);
+            *phandle = (sgl_handle_t)NULL;
+            return DMA_STATUS_BAD_CHANNEL;
+    }
+
+    mtdcr(DCRN_ASGC, sg_command);  /* enable writing to this channel's sgl control bits */
+#else
+   (void)sg_command;
+#endif
+    psgl->sgl_control = SG_ERI_ENABLE | SG_LINK;   /* sgl descriptor control bits */
+
+    if (p_dma_ch->int_enable) {
+        if (p_dma_ch->tce_enable)
+            psgl->sgl_control |= SG_TCI_ENABLE;
+        else
+            psgl->sgl_control |= SG_ETI_ENABLE;
+    }
+
+    *phandle = (sgl_handle_t)psgl;
+    return DMA_STATUS_GOOD;
+}
+
+
+
+/*
+ * Destroy a scatter/gather list handle that was created by alloc_dma_handle().
+ * The list must be empty (contain no elements).
+ */
+void free_dma_handle(sgl_handle_t handle)
+{
+    sgl_list_info_t *psgl = (sgl_list_info_t *)handle;
+
+    if (!handle) {
+#ifdef DEBUG_405DMA
+        printk("free_dma_handle: got NULL\n");
+#endif
+        return;
+    }
+    else if (psgl->phead) {
+#ifdef DEBUG_405DMA
+        printk("free_dma_handle: list not empty\n");
+#endif
+        return;
+    }
+    else if (!psgl->dma_addr) { /* should never happen */
+#ifdef DEBUG_405DMA
+        printk("free_dma_handle: no dma address\n");
+#endif
+        return;
+    }
+
+  /* wrong not a PCI device -armin */
+  /*  pci_free_consistent(NULL, SGL_LIST_SIZE, (void *)psgl, psgl->dma_addr); */
+	//	free_pages((unsigned long)psgl, get_order(SGL_LIST_SIZE));
+    	consistent_free((void *)psgl);
+
+
+}
+
+
+EXPORT_SYMBOL(hw_init_dma_channel);
+EXPORT_SYMBOL(get_channel_config);
+EXPORT_SYMBOL(set_channel_priority);
+EXPORT_SYMBOL(get_peripheral_width);
+EXPORT_SYMBOL(alloc_dma_handle);
+EXPORT_SYMBOL(free_dma_handle);
+EXPORT_SYMBOL(dma_channels);
diff -Nru a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c
--- a/arch/ppc/syslib/ppc4xx_pic.c	Wed Jan  8 20:04:31 2003
+++ b/arch/ppc/syslib/ppc4xx_pic.c	Wed Jan  8 20:04:31 2003
@@ -38,6 +38,13 @@
 
 /* Global Variables */
 struct hw_interrupt_type *ppc4xx_pic;
+/*
+ * We define 4xxIRQ_InitSenses table thusly:
+ * bit 0x1: sense, 1 for edge and 0 for level.
+ * bit 0x2: polarity, 0 for negative, 1 for positive.
+ */
+unsigned int ibm4xxPIC_NumInitSenses __initdata = 0;
+unsigned char *ibm4xxPIC_InitSenses __initdata = NULL;
 
 /* Six of one, half dozen of the other....#ifdefs, separate files,
  * other tricks.....
@@ -140,21 +147,42 @@
 ppc405_uic_enable(unsigned int irq)
 {
 	int bit, word;
+	irq_desc_t *desc = irq_desc + irq;
 
 	bit = irq & 0x1f;
 	word = irq >> 5;
-#ifdef UIC_DEBUG	
-	printk("ppc405_uic_enable - irq %d word %d bit 0x%x\n",irq, word , bit);
+
+#ifdef UIC_DEBUG
+	printk("ppc405_uic_enable - irq %d word %d bit 0x%x\n", irq, word, bit);
 #endif
 	ppc_cached_irq_mask[word] |= 1 << (31 - bit);
-	switch (word){
-		case 0:
-			mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
-		break;
-		case 1:
-			mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
+	switch (word) {
+	case 0:
+		mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
+		if ((mfdcr(DCRN_UIC_TR(UIC0)) & (1 << (31 - bit))) == 0)
+			desc->status |= IRQ_LEVEL;
+		else
+		/* lets hope this works since in linux/irq.h
+		 * there is no define for EDGE and it's assumed
+		 * once you set status to LEVEL you would not 
+		 * want to change it - Armin
+		 */
+		desc->status = desc->status & ~IRQ_LEVEL;
 		break;
+	case 1:
+		mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
+		if ((mfdcr(DCRN_UIC_TR(UIC1)) & (1 << (31 - bit))) == 0)
+			desc->status |= IRQ_LEVEL;
+		else
+		/* lets hope this works since in linux/irq.h
+		 * there is no define for EDGE and it's assumed
+		 * once you set status to LEVEL you would not 
+		 * want to change it - Armin
+		 */
+		desc->status = desc->status & ~IRQ_LEVEL;
+	break;
 	}
+
 }
 
 static void
@@ -164,16 +192,17 @@
 
 	bit = irq & 0x1f;
 	word = irq >> 5;
-#ifdef UIC_DEBUG	
-	printk("ppc405_uic_disable - irq %d word %d bit 0x%x\n",irq, word , bit);
+#ifdef UIC_DEBUG
+	printk("ppc405_uic_disable - irq %d word %d bit 0x%x\n", irq, word,
+	       bit);
 #endif
 	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	switch (word){
-		case 0:
-			mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
+	switch (word) {
+	case 0:
+		mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
 		break;
-		case 1:
-			mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
+	case 1:
+		mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
 		break;
 	}
 }
@@ -186,18 +215,19 @@
 	bit = irq & 0x1f;
 	word = irq >> 5;
 
-#ifdef UIC_DEBUG	
-printk("ppc405_uic_disable_and_ack - irq %d word %d bit 0x%x\n",irq, word , bit);
+#ifdef UIC_DEBUG
+	printk("ppc405_uic_disable_and_ack - irq %d word %d bit 0x%x\n", irq,
+	       word, bit);
 #endif
 	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	switch (word){
-		case 0:
-			mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
-			mtdcr(DCRN_UIC_SR(UIC0), (1 << (31 - bit)));
+	switch (word) {
+	case 0:
+		mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
+		mtdcr(DCRN_UIC_SR(UIC0), (1 << (31 - bit)));
 		break;
-		case 1:	
-			mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
-			mtdcr(DCRN_UIC_SR(UIC1), (1 << (31 - bit)));
+	case 1:
+		mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
+		mtdcr(DCRN_UIC_SR(UIC1), (1 << (31 - bit)));
 		break;
 	}
 }
@@ -211,40 +241,39 @@
 	bit = irq & 0x1f;
 	word = irq >> 5;
 
-#ifdef UIC_DEBUG	
-	printk("ppc405_uic_end - irq %d word %d bit 0x%x\n",irq, word , bit);
+#ifdef UIC_DEBUG
+	printk("ppc405_uic_end - irq %d word %d bit 0x%x\n", irq, word, bit);
 #endif
 
-	switch (word){
-		case 0:
-			tr_bits = mfdcr(DCRN_UIC_TR(UIC0));
+	switch (word) {
+	case 0:
+		tr_bits = mfdcr(DCRN_UIC_TR(UIC0));
 		break;
-		case 1:
-			tr_bits = mfdcr(DCRN_UIC_TR(UIC1));
+	case 1:
+		tr_bits = mfdcr(DCRN_UIC_TR(UIC1));
 		break;
 	}
 
 	if ((tr_bits & (1 << (31 - bit))) == 0) {
 		/* level trigger */
-		switch (word){
-			case 0:
-				mtdcr(DCRN_UIC_SR(UIC0), 1 << (31 - bit));
+		switch (word) {
+		case 0:
+			mtdcr(DCRN_UIC_SR(UIC0), 1 << (31 - bit));
 			break;
-			case 1:
-				mtdcr(DCRN_UIC_SR(UIC1), 1 << (31 - bit));
+		case 1:
+			mtdcr(DCRN_UIC_SR(UIC1), 1 << (31 - bit));
 			break;
 		}
 	}
 
-	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))
-	    && irq_desc[irq].action) {
+	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
 		ppc_cached_irq_mask[word] |= 1 << (31 - bit);
-		switch (word){
-			case 0:
-				mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
+		switch (word) {
+		case 0:
+			mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
 			break;
-			case 1:
-				mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
+		case 1:
+			mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
 			break;
 		}
 	}
@@ -278,15 +307,15 @@
 
 	bits = mfdcr(DCRN_UIC_MSR(UIC0));
 
-#if (NR_UICS > 1) 
-	if (bits & UIC_CASCADE_MASK){
+#if (NR_UICS > 1)
+	if (bits & UIC_CASCADE_MASK) {
 		bits = mfdcr(DCRN_UIC_MSR(UIC1));
 		cas_irq = 32 - ffs(bits);
 		irq = 32 + cas_irq;
 	} else {
 		irq = 32 - ffs(bits);
 		if (irq == 32)
-			irq= -1;
+			irq = -1;
 	}
 #else
 	/*
@@ -301,7 +330,7 @@
 		irq = -1;
 
 #ifdef UIC_DEBUG
-printk("ppc405_pic_get_irq - irq %d bit 0x%x\n",irq, bits);
+	printk("ppc405_pic_get_irq - irq %d bit 0x%x\n", irq, bits);
 #endif
 
 	return (irq);
@@ -309,8 +338,74 @@
 #endif
 
 void __init
+ppc4xx_extpic_init(void)
+{
+	/* set polarity 
+	 * 1 = default/pos/rising  , 0= neg/falling internal
+	 * 1 = neg/falling , 0= pos/rising external
+	 * Sense
+	 * 0 = default level internal
+	 * 0 = level, 1 = edge external
+	 */
+
+	unsigned int sense, irq;
+	int bit, word;
+	unsigned long ppc_cached_sense_mask[NR_MASK_WORDS];
+	unsigned long ppc_cached_pol_mask[NR_MASK_WORDS];
+	ppc_cached_sense_mask[0] = 0;
+	ppc_cached_sense_mask[1] = 0;
+	ppc_cached_pol_mask[0] = 0;
+	ppc_cached_pol_mask[1] = 0;
+
+	for (irq = 0; irq < NR_IRQS; irq++) {
+
+		bit = irq & 0x1f;
+		word = irq >> 5;
+
+		sense =
+		    (irq <
+		     ibm4xxPIC_NumInitSenses) ? ibm4xxPIC_InitSenses[irq] : 3;
+#ifdef PPC4xx_PIC_DEBUG
+		printk("PPC4xx_picext %d word:%x bit:%x sense:%x", irq, word,
+		       bit, sense);
+#endif
+		ppc_cached_sense_mask[word] |=
+		    (sense & IRQ_SENSE_MASK) << (31 - bit);
+		ppc_cached_pol_mask[word] |=
+		    ((sense & IRQ_POLARITY_MASK) >> 1) << (31 - bit);
+		switch (word) {
+		case 0:
+#ifdef PPC4xx_PIC_DEBUG
+			printk("Pol %x ", mfdcr(DCRN_UIC_PR(UIC0)));
+			printk("Level %x\n", mfdcr(DCRN_UIC_TR(UIC0)));
+#endif
+			/* polarity  setting */
+			mtdcr(DCRN_UIC_PR(UIC0), ppc_cached_pol_mask[word]);
+
+			/* Level setting */
+			mtdcr(DCRN_UIC_TR(UIC0), ppc_cached_sense_mask[word]);
+
+			break;
+		case 1:
+#ifdef PPC4xx_PIC_DEBUG
+			printk("Pol %x ", mfdcr(DCRN_UIC_PR(UIC1)));
+			printk("Level %x\n", mfdcr(DCRN_UIC_TR(UIC1)));
+#endif
+			/* polarity  setting */
+			mtdcr(DCRN_UIC_PR(UIC1), ppc_cached_pol_mask[word]);
+
+			/* Level setting */
+			mtdcr(DCRN_UIC_TR(UIC1), ppc_cached_sense_mask[word]);
+
+			break;
+		}
+	}
+
+}
+void __init
 ppc4xx_pic_init(void)
 {
+
 	/*
 	 * Disable all external interrupts until they are
 	 * explicity requested.
@@ -324,25 +419,26 @@
 	ppc4xx_pic = &ppc403_aic;
 	ppc_md.get_irq = ppc403_pic_get_irq;
 #else
-#if  (NR_UICS > 1) 
-	ppc_cached_irq_mask[0] |= 1 << (31 - UIC0_UIC1NC ); /* enable cascading interrupt */
-	mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[0]);
+#if  (NR_UICS > 1)
+	ppc_cached_irq_mask[0] |= 1 << (31 - UIC0_UIC1NC);	/* enable cascading interrupt */
 	mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[1]);
-
-	/* Set all interrupts to non-critical.
-	 */
-	mtdcr(DCRN_UIC_CR(UIC0), 0);
 	mtdcr(DCRN_UIC_CR(UIC1), 0);
 
-#else	
+#endif
 	mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[0]);
-
-	/* Set all interrupts to non-critical.
-	 */
 	mtdcr(DCRN_UIC_CR(UIC0), 0);
+	
+	if (ibm4xxPIC_InitSenses != NULL)
+		ppc4xx_extpic_init();
+
+	/* Clear any pending interrupts */
+#if (NR_UICS > 1)
+	mtdcr(DCRN_UIC_SR(UIC1), 0xffffffff);
 #endif
+	mtdcr(DCRN_UIC_SR(UIC0), 0xffffffff);
 
 	ppc4xx_pic = &ppc405_uic;
 	ppc_md.get_irq = ppc405_pic_get_irq;
 #endif
+
 }
diff -Nru a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c
--- a/arch/ppc/syslib/ppc4xx_setup.c	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc/syslib/ppc4xx_setup.c	Wed Jan  8 20:04:32 2003
@@ -7,23 +7,10 @@
  *      Author: MontaVista Software, Inc.  <source@mvista.com>
  *              Frank Rowand <frank_rowand@mvista.com>
  *              Debbie Chu   <debbie_chu@mvista.com>
+ *	Further modifications by Armin Kuster
  *
  *    Module name: ppc4xx_setup.c
  *
- *    Description:
- *      Architecture- / platform-specific boot-time initialization code for
- *      IBM PowerPC 4xx based boards. Adapted from original
- *      code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
- *      <dan@net4x.com>.
- *
- * 	History: 11/09/2001 - armin
- *	rename board_setup_nvram_access to board_init. board_init is
- *	used for all other board specific instructions needed during
- *	platform_init.
- *	moved RTC to board.c files
- *	moved VT/FB to board.c files
- *	moved r/w4 ide to redwood.c
- *
  */
 
 #include <linux/config.h>
@@ -63,19 +50,12 @@
 extern int wdt_enable;
 extern unsigned long wdt_period;
 
-/* Board specific functions */
-extern void board_setup_arch(void);
-extern void board_io_mapping(void);
-extern void board_setup_irq(void);
-extern void board_init(void);
-
 /* Global Variables */
-unsigned char __res[sizeof (bd_t)];
+bd_t __res;
 
-static void __init
+void __init
 ppc4xx_setup_arch(void)
 {
-
 	/* Setup PCI host bridges */
 
 #ifdef CONFIG_PCI
@@ -85,8 +65,6 @@
 #if defined(CONFIG_FB)
 	conswitchp = &dummy_con;
 #endif
-
-	board_setup_arch();
 }
 
 /*
@@ -97,9 +75,7 @@
 static int
 ppc4xx_show_percpuinfo(struct seq_file *m, int i)
 {
-	bd_t *bip = (bd_t *) __res;
-
-	seq_printf(m, "clock\t\t: %ldMHz\n", (long) bip->bi_intfreq / 1000000);
+	seq_printf(m, "clock\t\t: %ldMHz\n", (long)__res.bi_intfreq / 1000000);
 
 	return 0;
 }
@@ -111,7 +87,7 @@
 static int
 ppc4xx_show_cpuinfo(struct seq_file *m)
 {
-	bd_t *bip = (bd_t *) __res;
+	bd_t *bip = &__res;
 
 	seq_printf(m, "machine\t\t: %s\n", PPC4xx_MACHINE_NAME);
 	seq_printf(m, "plb bus clock\t: %ldMHz\n",
@@ -130,13 +106,11 @@
 static unsigned long __init
 ppc4xx_find_end_of_memory(void)
 {
-	bd_t *bip = (bd_t *) __res;
-
-	return ((unsigned long) bip->bi_memsize);
+	return ((unsigned long) __res.bi_memsize);
 }
 
-static void __init
-m4xx_map_io(void)
+void __init
+ppc4xx_map_io(void)
 {
 	io_block_mapping(PPC4xx_ONB_IO_VADDR,
 			 PPC4xx_ONB_IO_PADDR, PPC4xx_ONB_IO_SIZE, _PAGE_IO);
@@ -148,10 +122,9 @@
 	io_block_mapping(PPC4xx_PCI_LCFG_VADDR,
 			 PPC4xx_PCI_LCFG_PADDR, PPC4xx_PCI_LCFG_SIZE, _PAGE_IO);
 #endif
-	board_io_mapping();
 }
 
-static void __init
+void __init
 ppc4xx_init_IRQ(void)
 {
 	int i;
@@ -160,10 +133,6 @@
 
 	for (i = 0; i < NR_IRQS; i++)
 		irq_desc[i].handler = ppc4xx_pic;
-
-	/* give board specific code a chance to setup things */
-	board_setup_irq();
-	return;
 }
 
 static void
@@ -199,19 +168,13 @@
 ppc4xx_calibrate_decr(void)
 {
 	unsigned int freq;
-	bd_t *bip = (bd_t *) __res;
+	bd_t *bip = &__res;
 
-#if defined(CONFIG_WALNUT) || defined(CONFIG_CEDER)
+#if defined(CONFIG_WALNUT) || defined(CONFIG_CEDER)|| defined(CONFIG_ASH) || defined(CONFIG_SYCAMORE)
 	/* Walnut boot rom sets DCR CHCR1 (aka CPC0_CR1) bit CETE to 1 */
 	mtdcr(DCRN_CHCR1, mfdcr(DCRN_CHCR1) & ~CHR1_CETE);
 #endif
-#ifdef CONFIG_REDWOOD_5
 	freq = bip->bi_tbfreq;
-#else
-	freq = bip->bi_intfreq;
-
-#endif
-
 	tb_ticks_per_jiffy = freq / HZ;
 	tb_to_us = mulhwu_scale_factor(freq, 1000000);
 
@@ -230,20 +193,40 @@
 	/* Set the PIT reload value and just let it run. */
 	mtspr(SPRN_PIT, tb_ticks_per_jiffy);
 }
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
 
-#ifdef CONFIG_DEBUG_TEXT
+/* We assume that the UART has already been initialized by the
+   firmware or the boot loader */
 static void
-ppc4xx_progress(char *s, unsigned short hex)
+serial_putc(u8 * com_port, unsigned char c)
 {
-	printk("%s\n\r", s);
+	while ((readb(com_port + (UART_LSR)) & UART_LSR_THRE) == 0) ;
+	writeb(c, com_port);
 }
+
+static void
+ppc4xx_progress(char *s, unsigned short hex)
+{
+	char c;
+#ifdef SERIAL_DEBUG_IO_BASE
+	u8 *com_port = (u8 *) SERIAL_DEBUG_IO_BASE;
+
+	while ((c = *s++) != '\0') {
+		serial_putc(com_port, c);
+	}
+	serial_putc(com_port, '\r');
+	serial_putc(com_port, '\n');
+#else
+	printk("%s\r\n");
 #endif
+}
+#endif				/* CONFIG_SERIAL_TEXT_DEBUG */
 
 /*
  * IDE stuff.
  * should be generic for every IDE PCI chipset
  */
-#ifdef  CONFIG_PCI
+#if defined(CONFIG_PCI) && defined(CONFIG_IDE)
 static void
 ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port,
 			   ide_ioreg_t ctrl_port, int *irq)
@@ -255,7 +238,7 @@
 
 	hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
 }
-#endif
+#endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */
 
 TODC_ALLOC();
 
@@ -272,8 +255,8 @@
  *        command-line parameters.
  */
 void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
-	      unsigned long r6, unsigned long r7)
+ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	    unsigned long r6, unsigned long r7)
 {
 	parse_bootinfo(find_bootinfo());
 
@@ -281,11 +264,9 @@
 	 * If we were passed in a board information, copy it into the
 	 * residual data area.
 	 */
-	if (r3) {
-		memcpy((void *) __res, (void *) (r3 + KERNELBASE),
-		       sizeof (bd_t));
+	if (r3)
+		__res = *(bd_t *)(r3 + KERNELBASE);
 
-	}
 #if defined(CONFIG_BLK_DEV_INITRD)
 	/*
 	 * If the init RAM disk has been configured in, and there's a valid
@@ -320,7 +301,7 @@
 	}
 #endif
 
-	/* Initialize machine-dependency vectors */
+	/* Initialize machine-dependent vectors */
 
 	ppc_md.setup_arch = ppc4xx_setup_arch;
 	ppc_md.show_percpuinfo = ppc4xx_show_percpuinfo;
@@ -339,9 +320,9 @@
 	ppc_md.heartbeat_count = 0;
 
 	ppc_md.find_end_of_memory = ppc4xx_find_end_of_memory;
-	ppc_md.setup_io_mappings = m4xx_map_io;
+	ppc_md.setup_io_mappings = ppc4xx_map_io;
 
-#ifdef CONFIG_DEBUG_TEXT
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
 	ppc_md.progress = ppc4xx_progress;
 #endif
 
@@ -349,12 +330,7 @@
 **   m8xx_setup.c, prep_setup.c use
 **     defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
 */
-#ifdef CONFIG_IDE
-# ifdef CONFIG_PCI
+#if defined(CONFIG_PCI) && defined(CONFIG_IDE)
 	ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports;
-# endif
-#endif
-	board_init();
-
-	return;
+#endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */
 }
diff -Nru a/arch/ppc/syslib/prom_init.c b/arch/ppc/syslib/prom_init.c
--- a/arch/ppc/syslib/prom_init.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc/syslib/prom_init.c	Wed Jan  8 20:04:45 2003
@@ -366,14 +366,14 @@
 						   default_colors[i*3+2]) != 0)
 					break;
 
-#ifdef CONFIG_FB
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE
 			for (i = 0; i < LINUX_LOGO_COLORS; i++)
 				if (prom_set_color(ih, i + 32,
 						   linux_logo_red[i],
 						   linux_logo_green[i],
 						   linux_logo_blue[i]) != 0)
 					break;
-#endif /* CONFIG_FB */
+#endif /* CONFIG_FRAMEBUFFER_CONSOLE */
 		}
 	}
 
diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
--- a/arch/ppc64/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/Kconfig	Wed Jan  8 20:04:44 2003
@@ -354,47 +354,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile
--- a/arch/ppc64/Makefile	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc64/Makefile	Wed Jan  8 20:04:43 2003
@@ -13,61 +13,47 @@
 # Adjusted for PPC64 by Tom Gall
 #
 
-KERNELLOAD	=0xc000000000000000
+KERNELLOAD	= 0xc000000000000000
 
 LDFLAGS		:= -m elf64ppc
-LDFLAGS_vmlinux	= -Bstatic \
-		-e $(KERNELLOAD) -Ttext $(KERNELLOAD)
+LDFLAGS_vmlinux	= -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
 LDFLAGS_BLOB	:= --format binary --oformat elf64-powerpc
-CFLAGS		:= $(CFLAGS) -msoft-float -pipe \
+CFLAGS		+= -msoft-float -pipe \
 		-Wno-uninitialized -mminimal-toc -mtraceback=full \
 		-finline-limit-2000 -mcpu=power4
-CPP		= $(CC) -E $(CFLAGS)
-
 
 HEAD := arch/ppc64/kernel/head.o
 
-core-y			+= arch/ppc64/kernel/ arch/ppc64/mm/ arch/ppc64/lib/
-core-$(CONFIG_XMON)	+= arch/ppc64/xmon/
-
-# FIXME: is drivers- right ?
-drivers-$(CONFIG_OPROFILE)		+= arch/ppc64/oprofile/
-
-makeboot = $(call descend,arch/ppc64/boot,$(1))
-
-ifdef CONFIG_PPC_PSERIES
-BOOT_TARGETS = zImage zImage.initrd
-endif
-
-ifdef CONFIG_PPC_ISERIES
-BOOT_TARGETS = vmlinux.sminitrd vmlinux.initrd vmlinux.sm
-endif
-
-$(BOOT_TARGETS): vmlinux
-	@$(call makeboot,arch/ppc64/boot/$@)
+libs-y				+= arch/ppc64/lib/
+core-y				+= arch/ppc64/kernel/
+core-y				+= arch/ppc64/mm/
+core-$(CONFIG_XMON)		+= arch/ppc64/xmon/
+drivers-$(CONFIG_OPROFILE)	+= arch/ppc64/oprofile/
+
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ppc64/boot $(1)
+
+boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd
+boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm
+$(boottarget-y): vmlinux
+	$(call makeboot,arch/ppc64/boot/$@)
 
 %_config: arch/ppc64/configs/%_defconfig
 	rm -f .config arch/ppc64/defconfig
 	cp -f arch/ppc64/configs/$(@:config=defconfig) arch/ppc64/defconfig
 
 archclean:
-	@$(call makeboot,clean)
-
-archmrproper:
+	$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/ppc64/boot
 
+prepare: include/asm-ppc64/offsets.h
 
-prepare: include/asm-$(ARCH)/offsets.h
-
-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
+arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
 				   include/config/MARKER
 
-include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
-	@$(generate-asm-offsets.h) < $< > $@
-
-include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
+include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
 	@echo -n '  Generating $@'
+	@$(generate-asm-offsets.h) < $< > $@.tmp
 	@$(update-if-changed)
 
-CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
-	       include/asm-$(ARCH)/offsets.h
+CLEAN_FILES += include/asm-ppc64/offsets.h.tmp \
+	       include/asm-ppc64/offsets.h
 
diff -Nru a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile
--- a/arch/ppc64/boot/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/boot/Makefile	Wed Jan  8 20:04:45 2003
@@ -23,92 +23,88 @@
 CROSS32_COMPILE =
 #CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux-
 
-BOOTCC = $(CROSS32_COMPILE)gcc
-BOOTCFLAGS = $(HOSTCFLAGS) -I$(objtree)/include
-BOOTLD = $(CROSS32_COMPILE)ld
-BOOTAS = $(CROSS32_COMPILE)as
-BOOTAFLAGS = -D__ASSEMBLY__ $(HOSTCFLAGS)
+BOOTCC		:= $(CROSS32_COMPILE)gcc
+BOOTCFLAGS	:= $(HOSTCFLAGS) -Iinclude
+BOOTLD		:= $(CROSS32_COMPILE)ld
+BOOTAS		:= $(CROSS32_COMPILE)as
+BOOTAFLAGS	:= -D__ASSEMBLY__ $(HOSTCFLAGS)
+
+CFLAGS		:= $(CPPFLAGS) -O -fno-builtin -DSTDC_HEADERS
+LD_ARGS		:= -Ttext 0x00400000 -e _start
+OBJCOPYFLAGS	:= -S -O binary
+
+obj-boot := start.o main.o zlib.o imagesize.o no_initrd.o
+OBJS     := crt0.o start.o main.o zlib.o imagesize.o image.o
+obj-boot := $(addprefix $(obj)/,$(obj-boot))
+OBJS     := $(addprefix $(obj)/,$(OBJS))
+targets  += $(obj-boot) $(addprefix $(obj)/,image.c image.o)
+
+quiet_cmd_bootcc = BOOTCC  $@
+      cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
+$(obj-boot): %.o: %.c FORCE
+	$(call if_changed_dep,bootcc)
+
+quiet_cmd_bootas = BOOTAS  $@
+      cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -traditional \
+						-c -o $@ $<
+$(obj)/crt0.o: %.o: %.S FORCE
+	$(call if_changed_dep,bootas)
+
+host-progs		:= piggyback addnote addSystemMap addRamDisk
+HOSTCFLAGS_piggyback.o	:= -DKERNELBASE=$(KERNELBASE)
+EXTRA_TARGETS 		+= zImage zImage.initrd vmlinux.bin vmlinux.gz \
+			   vmlinux.sm vmlinux.initrd vmlinux.sminitrd \
+			   sysmap.o initrd.o
+
+quiet_cmd_sysmap = SYSMAP   $@
+      cmd_sysmap = $(obj)/addSystemMap System.map $< $@
+$(obj)/vmlinux.sm: vmlinux $(obj)/addSystemMap System.map FORCE
+	$(call if_changed,sysmap)
+
+quiet_cmd_ramdisk = RAMDISK $@
+      cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map $< $@
+$(obj)/vmlinux.initrd: vmlinux $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map FORCE
+	$(call if_changed,ramdisk)
+
+$(obj)/vmlinux.sminitrd: $(obj)/vmlinux.sm $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE
+	$(call if_changed,ramdisk)
+
+
+quiet_cmd_piggy = PIGGY   $@
+      cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(BOOTAS) -o $@
+
+$(obj)/image.o: $(obj)/vmlinux.gz $(obj)/piggyback FORCE
+	$(call if_changed,piggy)
+
+$(obj)/sysmap.o: System.map $(obj)/piggyback FORCE
+	$(call if_changed,piggy)
+
+$(obj)/initrd.o: $(obj)/ramdisk.image.gz $(obj)/piggyback FORCE
+	$(call if_changed,piggy)
+
+quiet_cmd_addnote = ADDNOTE $@ 
+      cmd_addnote = $(BOOTLD) $(LD_ARGS) -T $(obj)/zImage.lds -o $@ $(OBJS) $<\
+		    && $(obj)/addnote $@
+
+$(obj)/zImage: $(obj)/no_initrd.o $(OBJS) $(obj)/addnote FORCE
+	$(call if_changed,addnote)
+
+$(obj)/zImage.initrd: $(obj)/initrd.o $(OBJS) $(obj)/addnote FORCE
+	$(call if_changed,addnote)
+
+$(obj)/vmlinux.bin: vmlinux FORCE
+	$(call if_changed,objcopy)
+
+$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
+	$(call if_changed,gzip)
+
+$(obj)/imagesize.c: vmlinux
+	@echo Generating $@
+	ls -l vmlinux | \
+	awk '{printf "/* generated -- do not edit! */\n" \
+		"int uncompressed_size = %d;\n", $$5}' > $(obj)/imagesize.c
+	$(CROSS_COMPILE)nm -n vmlinux | tail -1 | \
+	awk '{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}' \
+		>> $(obj)/imagesize.c
 
-$(obj)/start.o:	$(obj)/start.c
-	$(BOOTCC) $(BOOTCFLAGS) -c -o $*.o $<
-
-$(obj)/main.o:	$(obj)/main.c
-	$(BOOTCC) $(BOOTCFLAGS) -c -o $*.o $<
-
-$(obj)/zlib.o:	$(obj)/zlib.c
-	$(BOOTCC) $(BOOTCFLAGS) -c -o $*.o $<
-
-$(obj)/imagesize.o:	$(obj)/imagesize.c
-	$(BOOTCC) $(BOOTCFLAGS) -c -o $*.o $<
-
-$(obj)/no_initrd.o:	$(obj)/no_initrd.c
-	$(BOOTCC) $(BOOTCFLAGS) -c -o $*.o $<
-
-$(obj)/crt0.o:	$(obj)/crt0.S
-	$(BOOTCC) $(BOOTAFLAGS) -traditional -c -o $*.o $<
-
-CFLAGS	= $(CPPFLAGS) -O -fno-builtin -DSTDC_HEADERS
-LD_ARGS = -Ttext 0x00400000 -e _start
-OBJCOPYFLAGS := -S -O binary
-
-OBJS = $(addprefix $(obj)/,crt0.o start.o main.o zlib.o image.o imagesize.o)
-
-ifeq ($(CONFIG_PPC_ISERIES),y)
-
-boot:	vmlinux.sm
-
-$(obj)/addSystemMap: $(obj)/addSystemMap.c
-	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
-$(obj)/vmlinux.sm: vmlinux $(obj)/addSystemMap
-	$(obj)/addSystemMap System.map vmlinux $(obj)/vmlinux.sm
-
-$(obj)/addRamDisk: $(obj)/addRamDisk.c
-	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
-$(obj)/vmlinux.initrd: vmlinux $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map
-	$(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map vmlinux $(obj)/vmlinux.initrd
-
-$(obj)/vmlinux.sminitrd: $(obj)/vmlinux.sm $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map
-	$(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map $(obj)/vmlinux.sm $(obj)/vmlinux.sminitrd
-
-else
-boot:	zImage
-endif
-
-$(obj)/piggyback: $(obj)/piggyback.c
-	$(HOSTCC) $(HOSTCFLAGS) -DKERNELBASE=$(KERNELBASE) -o $@ $<
-
-$(obj)/addnote: $(obj)/addnote.c
-	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
-$(obj)/image.o: $(obj)/piggyback $(obj)/vmlinux.gz
-	$(obj)/piggyback $(obj)/image < $(obj)/vmlinux.gz | $(BOOTAS) -o $@
-
-$(obj)/sysmap.o: $(obj)/piggyback System.map
-	$(obj)/piggyback $(obj)/sysmap < System.map | $(BOOTAS) -o $(obj)/sysmap.o
-
-$(obj)/initrd.o: $(obj)/ramdisk.image.gz $(obj)/piggyback
-	$(obj)/piggyback $(obj)/initrd < $(obj)/ramdisk.image.gz | $(BOOTAS) -o $(obj)/initrd.o
-
-$(obj)/zImage: $(OBJS) $(obj)/no_initrd.o $(obj)/addnote
-	$(BOOTLD) $(LD_ARGS) -T $(obj)/zImage.lds -o $@ $(OBJS) $(obj)/no_initrd.o
-	$(obj)/addnote $@
-
-$(obj)/zImage.initrd: $(OBJS) $(obj)/initrd.o $(obj)/addnote
-	$(BOOTLD) $(LD_ARGS) -T $(obj)/zImage.lds -o $@ $(OBJS) $(obj)/initrd.o
-	./addnote $@
-
-$(obj)/vmlinux.gz: vmlinux
-	$(OBJCOPY) $(OBJCOPYFLAGS) vmlinux $(obj)/vmlinux
-	ls -l $(obj)/vmlinux | awk '{printf "/* generated -- do not edit! */\nint uncompressed_size = %d;\n", $$5}' > $(obj)/imagesize.c
-	$(CROSS_COMPILE)nm -n vmlinux | tail -1 | awk '{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}' >> $(obj)/imagesize.c
-	gzip -vf9 $(obj)/vmlinux
-
-$(obj)/imagesize.c: $(obj)/vmlinux.gz
-
-clean:
-	@rm -f $(OBJS)
-	@rm -f $(addprefix $(obj)/,piggyback note addnote zImage \
-		zImage.initrd vmlinux.gz no_initrd.o imagesize.c addSystemMap \
-		vmlinux.sm addRamDisk vmlinux.initrd vmlinux.sminitrd)
+clean-files :=  $(targets)
diff -Nru a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c
--- a/arch/ppc64/boot/main.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/boot/main.c	Wed Jan  8 20:04:45 2003
@@ -14,6 +14,8 @@
 #include <asm/page.h>
 #include <asm/bootinfo.h>
 
+#undef DEBUG
+
 void memmove(void *dst, void *im, int len);
 
 extern void *finddevice(const char *);
@@ -90,7 +92,9 @@
 	for(claim_addr = PROG_START; 
 	    claim_addr <= PROG_START * 8; 
 	    claim_addr += 0x100000) {
+#ifdef DEBUG
 		printf("    trying: 0x%08lx\n\r", claim_addr);
+#endif
 		dst = claim(claim_addr, uncompressed_size, 0);
 		if (dst != (void *)-1) break;
 	}
@@ -118,6 +122,7 @@
 	bi_recs = make_bi_recs((unsigned long)dst + vmlinux_end);
 
 	kernel_entry = (kernel_entry_t)dst;
+#ifdef DEBUG
 	printf( "kernel:\n\r"
 		"        entry addr = 0x%lx\n\r"
 		"        a1         = 0x%lx,\n\r"
@@ -126,6 +131,7 @@
 		"        bi_recs    = 0x%lx,\n\r",
 		(unsigned long)kernel_entry, a1, a2,
 		(unsigned long)prom, (unsigned long)bi_recs);
+#endif
 
 	kernel_entry( a1, a2, prom, bi_recs );
 
diff -Nru a/arch/ppc64/defconfig b/arch/ppc64/defconfig
--- a/arch/ppc64/defconfig	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc64/defconfig	Wed Jan  8 20:04:43 2003
@@ -7,6 +7,8 @@
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_EARLY_PRINTK=y
+CONFIG_COMPAT=y
+CONFIG_FRAME_POINTER=y
 
 #
 # Code maturity level options
@@ -64,7 +66,7 @@
 # CONFIG_PARPORT is not set
 
 #
-# Plug and Play configuration
+# Plug and Play support
 #
 # CONFIG_PNP is not set
 
@@ -118,6 +120,7 @@
 # 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_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
@@ -412,6 +415,14 @@
 # CONFIG_I2C is not set
 
 #
+# I2C Hardware Sensors Mainboard support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+
+#
 # Mice
 #
 # CONFIG_BUSMOUSE is not set
@@ -563,31 +574,21 @@
 # CONFIG_NLS_UTF8 is not set
 
 #
-# Console drivers
-#
-
-#
-# Frame-buffer support
+# Graphics support
 #
 CONFIG_FB=y
-CONFIG_DUMMY_CONSOLE=y
 # CONFIG_FB_CLGEN is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ATY is not set
 # CONFIG_FB_CT65550 is not set
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_S3TRIO is not set
 # CONFIG_FB_VGA16 is not set
 # CONFIG_FB_RIVA is not set
-CONFIG_FB_MATROX=y
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G450=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_MULTIHEAD=y
+# CONFIG_FB_MATROX is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
 # CONFIG_FB_SIS is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_3DFX is not set
@@ -595,19 +596,14 @@
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
-# CONFIG_FBCON_ADVANCED is not set
-CONFIG_FBCON_CFB8=y
-CONFIG_FBCON_CFB16=y
-CONFIG_FBCON_CFB24=y
-CONFIG_FBCON_CFB32=y
-CONFIG_FBCON_FONTWIDTH8_ONLY=y
-# CONFIG_FONT_SUN8x16 is not set
-CONFIG_FBCON_FONTS=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
-# CONFIG_FONT_MINI_4x6 is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE is not set
 
 #
 # Sound
diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
--- a/arch/ppc64/kernel/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/kernel/Makefile	Wed Jan  8 20:04:45 2003
@@ -1,40 +1,32 @@
 #
-# Makefile for the linux kernel.
+# Makefile for the linux ppc64 kernel.
 #
 
-EXTRA_CFLAGS = -mno-minimal-toc
-
-KHEAD := head.o
-
-EXTRA_TARGETS	:= $(KHEAD)
-
-export-objs         := ppc_ksyms.o
+EXTRA_CFLAGS	+= -mno-minimal-toc
+EXTRA_TARGETS	:= head.o
+export-objs	:= ppc_ksyms.o
 
 obj-y               :=	ppc_ksyms.o setup.o entry.o traps.o irq.o idle.o \
 			time.o process.o signal.o syscalls.o misc.o ptrace.o \
 			align.o semaphore.o bitops.o stab.o htab.o pacaData.o \
-			LparData.o udbg.o binfmt_elf32.o sys_ppc32.o sys32.o \
-			ioctl32.o ptrace32.o signal32.o open_pic.o xics.o \
-			pmc.o mf_proc.o proc_pmc.o iSeries_setup.o \
-			ItLpQueue.o hvCall.o mf.o HvLpEvent.o ras.o \
-			iSeries_proc.o HvCall.o HvLpConfig.o \
-			rtc.o init_task.o pSeries_htab.o
-
-obj-$(CONFIG_PCI) +=  pci.o pci_dn.o pci_dma.o
-
-ifeq ($(CONFIG_PPC_ISERIES),y)
-obj-$(CONFIG_PCI) += iSeries_pci.o iSeries_pci_reset.o iSeries_IoMmTable.o iSeries_irq.o iSeries_VpdInfo.o XmPciLpEvent.o 
-endif
-ifeq ($(CONFIG_PPC_PSERIES),y)
-obj-$(CONFIG_PCI) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o eeh.o
-
-obj-y += rtasd.o nvram.o
-endif
-
-obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
-
-obj-$(CONFIG_SMP) += smp.o
-
-obj-$(CONFIG_PROFILING)	+= profile.o
-
-obj-y += prom.o lmb.o rtas.o rtas-proc.o chrp_setup.o i8259.o
+			udbg.o binfmt_elf32.o sys_ppc32.o sys32.o ioctl32.o \
+			ptrace32.o signal32.o pmc.o rtc.o init_task.o \
+			lmb.o pci.o pci_dn.o pci_dma.o
+
+obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o       iSeries_pci_reset.o \
+			     iSeries_IoMmTable.o iSeries_irq.o \
+			     iSeries_VpdInfo.o   XmPciLpEvent.o \
+			     HvCall.o HvLpConfig.o LparData.o mf_proc.o \
+			     proc_pmc.o iSeries_setup.o ItLpQueue.o hvCall.o \
+			     mf.o HvLpEvent.o iSeries_proc.o 
+
+obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \
+			     eeh.o rtasd.o nvram.o
+
+# Change this to pSeries only once we've got iSeries up to date
+obj-y			  += open_pic.o xics.o pSeries_htab.o rtas.o \
+			     rtas-proc.o chrp_setup.o i8259.o ras.o prom.o 
+
+obj-$(CONFIG_RTAS_FLASH)	+= rtas_flash.o
+obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_PROFILING)		+= profile.o
diff -Nru a/arch/ppc64/kernel/chrp_setup.c b/arch/ppc64/kernel/chrp_setup.c
--- a/arch/ppc64/kernel/chrp_setup.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc64/kernel/chrp_setup.c	Wed Jan  8 20:04:43 2003
@@ -60,7 +60,7 @@
 
 #include "i8259.h"
 #include "open_pic.h"
-#include "xics.h"
+#include <asm/xics.h>
 #include <asm/ppcdebug.h>
 
 extern volatile unsigned char *chrp_int_ack_special;
diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
--- a/arch/ppc64/kernel/head.S	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/head.S	Wed Jan  8 20:04:44 2003
@@ -79,7 +79,7 @@
 _stext:
 _STATIC(__start)
 	b .__start_initialization_pSeries
-
+#ifdef CONFIG_PPC_ISERIES
 	/* At offset 0x20, there is a pointer to iSeries LPAR data.
 	 * This is required by the hypervisor */
 	. = 0x20
@@ -90,9 +90,7 @@
 	 * between physical addresses and absolute addresses) and
 	 * to the pidhash table (also used by the debugger) */
 	.llong msChunks-KERNELBASE
-#ifdef CONFIG_PPC_ISERIES
 	.llong pidhash-KERNELBASE
-#endif
 
 	/* Offset 0x38 - Pointer to start of embedded System.map */
 	.globl	embedded_sysmap_start
@@ -102,6 +100,7 @@
 	.globl	embedded_sysmap_end
 embedded_sysmap_end:
 	.llong	0
+#endif
 
 	/* Secondary processors spin on this value until it goes to 1. */
 	.globl  __secondary_hold_spinloop
@@ -365,11 +364,15 @@
 	 * point to itVpdAreas.  On pSeries native, this value is not used.
 	 */
 	. = 0x4000
-	.globl __end_interupts
+	.globl __end_interrupts
 	.globl __start_naca
 __end_interupts:
 __start_naca:
+#ifdef CONFIG_PPC_ISERIES
 	.llong itVpdAreas
+#else
+	.llong 0x0
+#endif
 	.llong 0x0
 	.llong 0x0
 	.llong paca
@@ -390,6 +393,7 @@
 	.globl __end_stab
 __end_stab:
 
+#ifdef CONFIG_PPC_ISERIES
 	/*
 	 * The iSeries LPAR map is at this fixed address
 	 * so that the HvReleaseData structure can address
@@ -503,7 +507,7 @@
 	mfspr	r21,SPRG1
 	mfspr	r20,SPRG2
 	rfid
-
+#endif
 /*
  * Data area reserved for FWNMI option.
  */
@@ -1217,7 +1221,7 @@
 #endif
 #endif
 	b 	1b			 /* Loop until told to go         */
-
+#ifdef CONFIG_PPC_ISERIES
 _GLOBAL(__start_initialization_iSeries)
 
 	LOADADDR(r1,init_thread_union)
@@ -1241,6 +1245,7 @@
 	bl      .iSeries_fixup_klimit
 
 	b	.start_here_common
+#endif
 
 _GLOBAL(__start_initialization_pSeries)
 	mr	r31,r3			/* save parameters */
@@ -1248,9 +1253,6 @@
 	mr	r29,r5
 	mr	r28,r6
 	mr	r27,r7
-	mr	r26,r8                  /* YABOOT: debug_print() routine */
-	mr	r25,r9                  /* YABOOT: debug_delay() routine */
-	mr	r24,r10                 /* YABOOT: debug_prom() routine */
 
 	bl	.enable_64b_mode
 
@@ -1295,9 +1297,6 @@
 	mr	r5,r29
 	mr	r6,r28
 	mr	r7,r27
-	mr	r8,r26
-	mr	r9,r25
-	mr	r10,r24
 
 	bl	.prom_init
 
diff -Nru a/arch/ppc64/kernel/init_task.c b/arch/ppc64/kernel/init_task.c
--- a/arch/ppc64/kernel/init_task.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc64/kernel/init_task.c	Wed Jan  8 20:04:43 2003
@@ -13,7 +13,7 @@
 /*
  * Initial thread structure.
  *
- * We need to make sure that this is 8192-byte aligned due to the
+ * We need to make sure that this is 16384-byte aligned due to the
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
diff -Nru a/arch/ppc64/kernel/ioctl32.c b/arch/ppc64/kernel/ioctl32.c
--- a/arch/ppc64/kernel/ioctl32.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/kernel/ioctl32.c	Wed Jan  8 20:04:45 2003
@@ -442,13 +442,13 @@
                 struct  ifmap32 ifru_map;
                 char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
 		char	ifru_newname[IFNAMSIZ];
-                __kernel_caddr_t32 ifru_data;
+                compat_caddr_t ifru_data;
         } ifr_ifru;
 };
 
 struct ifconf32 {
         int     ifc_len;                        /* size of buffer       */
-        __kernel_caddr_t32  ifcbuf;
+        compat_caddr_t  ifcbuf;
 };
 
 #ifdef CONFIG_NET
@@ -884,7 +884,7 @@
 	unsigned char	rate;
 	unsigned char	spec1;
 	unsigned char	fmt_gap;
-	const __kernel_caddr_t32 name;
+	const compat_caddr_t name;
 };
 
 struct floppy_drive_params32 {
@@ -923,7 +923,7 @@
 	int		fd_ref;
 	int		fd_device;
 	int		last_checked;
-	__kernel_caddr_t32 dmabuf;
+	compat_caddr_t dmabuf;
 	int		bufblocks;
 };
 
@@ -1413,7 +1413,7 @@
 }
 
 struct ppp_option_data32 {
-	__kernel_caddr_t32	ptr;
+	compat_caddr_t	ptr;
 	__u32			length;
 	int			transmit;
 };
@@ -1494,8 +1494,8 @@
 	__u32	mt_dsreg;
 	__u32	mt_gstat;
 	__u32	mt_erreg;
-	__kernel_daddr_t32	mt_fileno;
-	__kernel_daddr_t32	mt_blkno;
+	compat_daddr_t	mt_fileno;
+	compat_daddr_t	mt_blkno;
 };
 #define MTIOCGET32	_IOR('m', 2, struct mtget32)
 
@@ -1613,7 +1613,7 @@
 
 struct cdrom_read32 {
 	int			cdread_lba;
-	__kernel_caddr_t32	cdread_bufaddr;
+	compat_caddr_t	cdread_bufaddr;
 	int			cdread_buflen;
 };
 
@@ -1621,16 +1621,16 @@
 	union cdrom_addr	addr;
 	u_char			addr_format;
 	int			nframes;
-	__kernel_caddr_t32	buf;
+	compat_caddr_t	buf;
 };
 
 struct cdrom_generic_command32 {
 	unsigned char		cmd[CDROM_PACKET_SIZE];
-	__kernel_caddr_t32	buffer;
+	compat_caddr_t	buffer;
 	unsigned int		buflen;
 	int			stat;
-	__kernel_caddr_t32	sense;
-	__kernel_caddr_t32	reserved[3];
+	compat_caddr_t	sense;
+	compat_caddr_t	reserved[3];
 };
 
 static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -1639,7 +1639,7 @@
 	struct cdrom_read cdread;
 	struct cdrom_read_audio cdreadaudio;
 	struct cdrom_generic_command cgc;
-	__kernel_caddr_t32 addr;
+	compat_caddr_t addr;
 	char *data = 0;
 	void *karg;
 	int err = 0;
@@ -1722,9 +1722,9 @@
 
 struct loop_info32 {
 	int			lo_number;      /* ioctl r/o */
-	__kernel_dev_t32	lo_device;      /* ioctl r/o */
+	compat_dev_t	lo_device;      /* ioctl r/o */
 	unsigned int		lo_inode;       /* ioctl r/o */
-	__kernel_dev_t32	lo_rdevice;     /* ioctl r/o */
+	compat_dev_t	lo_rdevice;     /* ioctl r/o */
 	int			lo_offset;
 	int			lo_encrypt_type;
 	int			lo_encrypt_key_size;    /* ioctl w/o */
@@ -2054,7 +2054,7 @@
 	set_fs(old_fs);
 
 	if (err >= 0)
-		err = put_user(kuid, (__kernel_uid_t32 *)arg);
+		err = put_user(kuid, (compat_uid_t *)arg);
 
 	return err;
 }
@@ -2062,7 +2062,7 @@
 struct ncp_ioctl_request_32 {
 	unsigned int function;
 	unsigned int size;
-	__kernel_caddr_t32 data;
+	compat_caddr_t data;
 };
 
 struct ncp_fs_info_v2_32 {
@@ -2083,13 +2083,13 @@
 {
 	int		auth_type;
 	unsigned int	object_name_len;
-	__kernel_caddr_t32	object_name;	/* an userspace data, in most cases user name */
+	compat_caddr_t	object_name;	/* an userspace data, in most cases user name */
 };
 
 struct ncp_privatedata_ioctl_32
 {
 	unsigned int	len;
-	__kernel_caddr_t32	data;		/* ~1000 for NDS */
+	compat_caddr_t	data;		/* ~1000 for NDS */
 };
 
 #define	NCP_IOC_NCPREQUEST_32		_IOR('n', 1, struct ncp_ioctl_request_32)
@@ -2362,12 +2362,12 @@
 struct atmif_sioc32 {
         int                number;
         int                length;
-        __kernel_caddr_t32 arg;
+        compat_caddr_t arg;
 };
 
 struct atm_iobuf32 {
 	int                length;
-	__kernel_caddr_t32 buffer;
+	compat_caddr_t buffer;
 };
 
 #define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32)
@@ -2428,7 +2428,7 @@
 
 	iobuf.length = iobuf32.length;
 
-	if (iobuf32.buffer == (__kernel_caddr_t32) NULL || iobuf32.length == 0) {
+	if (iobuf32.buffer == (compat_caddr_t) NULL || iobuf32.length == 0) {
 		iobuf.buffer = (void*)(unsigned long)iobuf32.buffer;
 	} else {
 		iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL);
@@ -2482,7 +2482,7 @@
         sioc.number = sioc32.number;
         sioc.length = sioc32.length;
         
-	if (sioc32.arg == (__kernel_caddr_t32) NULL || sioc32.length == 0) {
+	if (sioc32.arg == (compat_caddr_t) NULL || sioc32.length == 0) {
 		sioc.arg = (void*)(unsigned long)sioc32.arg;
         } else {
                 sioc.arg = kmalloc(sioc.length, GFP_KERNEL);
@@ -3656,7 +3656,7 @@
 #define HANDLE_IOCTL(cmd,handler) { cmd, (unsigned long)handler, 0 }
 
 #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
-#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, __kernel_uid_t32)
+#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t)
 
 static struct ioctl_trans ioctl_translations[] = {
     /* List here explicitly which ioctl's need translation,
@@ -3708,11 +3708,6 @@
 COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO),
 COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO),
 COMPATIBLE_IOCTL(FBIOPAN_DISPLAY),
-COMPATIBLE_IOCTL(FBIOGET_FCURSORINFO),
-COMPATIBLE_IOCTL(FBIOGET_VCURSORINFO),
-COMPATIBLE_IOCTL(FBIOPUT_VCURSORINFO),
-COMPATIBLE_IOCTL(FBIOGET_CURSORSTATE),
-COMPATIBLE_IOCTL(FBIOPUT_CURSORSTATE),
 COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP),
 COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP),
 #if 0
@@ -3763,6 +3758,8 @@
 COMPATIBLE_IOCTL(BLKFLSBUF),
 COMPATIBLE_IOCTL(BLKSECTSET),
 COMPATIBLE_IOCTL(BLKSSZGET),
+COMPATIBLE_IOCTL(BLKRASET),
+COMPATIBLE_IOCTL(BLKFRASET),
 /* RAID */
 COMPATIBLE_IOCTL(RAID_VERSION),
 COMPATIBLE_IOCTL(GET_ARRAY_INFO),
@@ -4350,6 +4347,8 @@
 HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo),
 HANDLE_IOCTL(HDIO_GETGEO_BIG_RAW, hdio_getgeo_big),
 HANDLE_IOCTL(BLKGETSIZE, w_long),
+HANDLE_IOCTL(BLKRAGET, w_long),
+HANDLE_IOCTL(BLKFRAGET, w_long),
 HANDLE_IOCTL(0x1260, broken_blkgetsize),
 HANDLE_IOCTL(BLKSECTGET, w_long),
 HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans),
diff -Nru a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c
--- a/arch/ppc64/kernel/irq.c	Wed Jan  8 20:04:43 2003
+++ b/arch/ppc64/kernel/irq.c	Wed Jan  8 20:04:43 2003
@@ -395,7 +395,7 @@
 }
 
 #ifdef CONFIG_SMP
-extern unsigned int irq_affinity [NR_IRQS];
+extern unsigned long irq_affinity [NR_IRQS];
 
 typedef struct {
 	unsigned long cpu;
@@ -409,7 +409,7 @@
 		(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp > 1))
 
 #define IRQ_ALLOWED(cpu,allowed_mask) \
-		((1 << cpu) & (allowed_mask))
+		((1UL << cpu) & (allowed_mask))
 
 #define IRQ_BALANCE_INTERVAL (HZ/50)
 
@@ -461,7 +461,7 @@
 		new_cpu = move(entry->cpu, allowed_mask, now, random_number);
 		if (entry->cpu != new_cpu) {
 			entry->cpu = new_cpu;
-			irq_desc[irq].handler->set_affinity(irq, 1 << new_cpu);
+			irq_desc[irq].handler->set_affinity(irq, 1UL << new_cpu);
 		}
 	}
 }
@@ -649,19 +649,19 @@
 static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 
 #ifdef CONFIG_IRQ_ALL_CPUS
-unsigned int irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = 0xffffffff};
+unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = -1UL};
 #else  /* CONFIG_IRQ_ALL_CPUS */
-unsigned int irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = 0x00000000};
+unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = 0x0};
 #endif /* CONFIG_IRQ_ALL_CPUS */
 
-#define HEX_DIGITS 8
+#define HEX_DIGITS 16
 
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
 			int count, int *eof, void *data)
 {
 	if (count < HEX_DIGITS+1)
 		return -EINVAL;
-	return sprintf (page, "%08x\n", irq_affinity[(int)(long)data]);
+	return sprintf(page, "%16lx\n", irq_affinity[(long)data]);
 }
 
 static unsigned int parse_hex_value (const char *buffer,
@@ -679,7 +679,7 @@
 		return -EFAULT;
 
 	/*
-	 * Parse the first 8 characters as a hex string, any non-hex char
+	 * Parse the first 16 characters as a hex string, any non-hex char
 	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
 	 */
 	value = 0;
@@ -704,7 +704,7 @@
 static int irq_affinity_write_proc (struct file *file, const char *buffer,
 					unsigned long count, void *data)
 {
-	int irq = (int)(long) data, full_count = count, err;
+	int irq = (long)data, full_count = count, err;
 	unsigned long new_value;
 
 	if (!irq_desc[irq].handler->set_affinity)
@@ -712,8 +712,6 @@
 
 	err = parse_hex_value(buffer, count, &new_value);
 
-/* Why is this disabled ? --BenH */
-#if 0/*CONFIG_SMP*/
 	/*
 	 * Do not allow disabling IRQs completely - it's a too easy
 	 * way to make the system unusable accidentally :-) At least
@@ -721,7 +719,6 @@
 	 */
 	if (!(new_value & cpu_online_map))
 		return -EINVAL;
-#endif
 
 	irq_affinity[irq] = new_value;
 	irq_desc[irq].handler->set_affinity(irq, new_value);
diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
--- a/arch/ppc64/kernel/misc.S	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/kernel/misc.S	Wed Jan  8 20:04:45 2003
@@ -398,46 +398,6 @@
 	bdnz	00b
 	blr	
 
-/*
- * Extended precision shifts
- *
- * R3/R4 has 64 bit value
- * R5    has shift count
- * result in R3/R4
- *
- *  ashrdi3:     XXXYYY/ZZZAAA -> SSSXXX/YYYZZZ
- *  ashldi3:     XXXYYY/ZZZAAA -> YYYZZZ/AAA000
- *  lshrdi3:     XXXYYY/ZZZAAA -> 000XXX/YYYZZZ
- */
-/* MIKEC: These may no longer be needed...what does gcc expect ? */
-	
-_GLOBAL(__ashrdi3)
-	li	r6,32
-	sub	r6,r6,r5
-	slw	r7,r3,r6	/* isolate YYY */
-	srw	r4,r4,r5	/* isolate ZZZ */
-	or	r4,r4,r7	/* YYYZZZ */
-	sraw	r3,r3,r5	/* SSSXXX */
-	blr
-
-_GLOBAL(__ashldi3)
-	li	r6,32
-	sub	r6,r6,r5
-	srw	r7,r4,r6	/* isolate ZZZ */
-	slw	r4,r4,r5	/* AAA000 */
-	slw	r3,r3,r5	/* YYY--- */
-	or	r3,r3,r7	/* YYYZZZ */
-	blr
-
-_GLOBAL(__lshrdi3)
-	li	r6,32
-	sub	r6,r6,r5
-	slw	r7,r3,r6        /* isolate YYY */
-	srw	r4,r4,r5        /* isolate ZZZ */
-	or	r4,r4,r7        /* YYYZZZ */
-	srw	r3,r3,r5        /* 000XXX */
-	blr
-
 _GLOBAL(abs)
 	cmpi	0,r3,0
 	bge	10f
@@ -551,7 +511,7 @@
 	.llong .sys_rmdir		/* 40 */
 	.llong .sys_dup
 	.llong .sys_pipe
-	.llong .sys32_times
+	.llong .compat_sys_times
 	.llong .sys_ni_syscall		/* old prof syscall */
 	.llong .sys_brk			/* 45 */
 	.llong .sys_setgid
@@ -614,9 +574,9 @@
 	.llong .sys32_syslog
 	.llong .compat_sys_setitimer
 	.llong .compat_sys_getitimer		/* 105 */
-	.llong .sys32_newstat
-	.llong .sys32_newlstat
-	.llong .sys32_newfstat
+	.llong .compat_sys_newstat
+	.llong .compat_sys_newlstat
+	.llong .compat_sys_newfstat
 	.llong .sys_uname
 	.llong .sys_ni_syscall		/* 110 old iopl syscall */
 	.llong .sys_vhangup
diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c
--- a/arch/ppc64/kernel/pSeries_pci.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/kernel/pSeries_pci.c	Wed Jan  8 20:04:45 2003
@@ -40,7 +40,6 @@
 #include <asm/naca.h>
 #include <asm/pci_dma.h>
 
-#include "xics.h"
 #include "open_pic.h"
 #include "pci.h"
 
@@ -402,7 +401,7 @@
 	* Python
 	***************************************************************/
 	if (strstr(model, "Python")) {
-		unsigned long chip_regs;
+		void *chip_regs;
 		volatile u32 *tmp, i;
 
 		PPCDBG(PPCDBG_PHBINIT, "\tCreate python\n");
@@ -607,10 +606,6 @@
 	pci_for_each_dev(dev) {
 		pci_read_irq_line(dev);
 		PPCDBGCALL(PPCDBG_PHBINIT, dumpPci_Dev(dev) );
-	}
-
-	if (naca->interrupt_controller == IC_PPC_XIC) {
-		xics_isa_init(); 
 	}
 }
 
diff -Nru a/arch/ppc64/kernel/pci_dma.c b/arch/ppc64/kernel/pci_dma.c
--- a/arch/ppc64/kernel/pci_dma.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/pci_dma.c	Wed Jan  8 20:04:44 2003
@@ -147,6 +147,7 @@
 	return lz;
 }
 
+#ifdef CONFIG_PPC_ISERIES
 static void tce_build_iSeries(struct TceTable *tbl, long tcenum, 
 			       unsigned long uaddr, int direction )
 {
@@ -180,7 +181,9 @@
 		panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", setTceRc);
 	}
 }
+#endif
 
+#ifdef CONFIG_PPC_PSERIES
 static void tce_build_pSeries(struct TceTable *tbl, long tcenum, 
 			       unsigned long uaddr, int direction )
 {
@@ -199,8 +202,8 @@
 
 	tce_addr = ((union Tce *)tbl->base) + tcenum;
 	*tce_addr = (union Tce)tce.wholeTce;
-
 }
+#endif
 
 /* 
  * Build a TceTable structure.  This contains a multi-level bit map which
@@ -548,6 +551,7 @@
 	return retTce; 
 }
 
+#ifdef CONFIG_PPC_ISERIES
 static void tce_free_one_iSeries( struct TceTable *tbl, long tcenum )
 {
 	u64 set_tce_rc;
@@ -560,7 +564,9 @@
 		panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", set_tce_rc);
 
 }
+#endif
 
+#ifdef CONFIG_PPC_PSERIES
 static void tce_free_one_pSeries( struct TceTable *tbl, long tcenum )
 {
 	union Tce tce;
@@ -572,6 +578,7 @@
 	*tce_addr = (union Tce)tce.wholeTce;
 
 }
+#endif
 
 static void tce_free(struct TceTable *tbl, dma_addr_t dma_addr, 
 			     unsigned order, unsigned num_pages)
@@ -609,6 +616,7 @@
 	free_tce_range( tbl, free_tce, order );
 }
 
+#ifdef CONFIG_PPC_ISERIES
 void __init create_virtual_bus_tce_table(void)
 {
 	struct TceTable *t;
@@ -661,6 +669,7 @@
 	}
 	else printk( "Virtual Bus VIO TCE table failed.\n");
 }
+#endif
 
 void create_tce_tables_for_buses(struct list_head *bus_list)
 {
@@ -842,6 +851,7 @@
 static void getTceTableParmsiSeries(struct iSeries_Device_Node* DevNode,
 				    struct TceTable* newTceTable )
 {
+#ifdef CONFIG_PPC_ISERIES
 	struct TceTableManagerCB* pciBusTceTableParms = (struct TceTableManagerCB*)kmalloc( sizeof(struct TceTableManagerCB), GFP_KERNEL );
 	if(pciBusTceTableParms == NULL) panic("PCI_DMA: TCE Table Allocation failed.");
 
@@ -872,6 +882,7 @@
 	newTceTable->tceType     = TCE_PCI;
 
 	kfree(pciBusTceTableParms);
+#endif
 }
 
 static void getTceTableParmsPSeries(struct pci_controller *phb,
@@ -1440,15 +1451,19 @@
 }
 #endif
 
+#ifdef CONFIG_PPC_PSERIES
 /* These are called very early. */
 void tce_init_pSeries(void)
 {
 	ppc_md.tce_build = tce_build_pSeries;
 	ppc_md.tce_free_one = tce_free_one_pSeries;
 }
+#endif
 
+#ifdef CONFIG_PPC_ISERIES
 void tce_init_iSeries(void)
 {
 	ppc_md.tce_build = tce_build_iSeries;
 	ppc_md.tce_free_one = tce_free_one_iSeries;
 }
+#endif
diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
--- a/arch/ppc64/kernel/prom.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/prom.c	Wed Jan  8 20:04:44 2003
@@ -16,10 +16,6 @@
  */
 
 #if 0
-#define DEBUG_YABOOT
-#endif
-
-#if 0
 #define DEBUG_PROM
 #endif
 
@@ -32,22 +28,6 @@
 #include <linux/threads.h>
 #include <linux/spinlock.h>
 #include <linux/blk.h>
-
-#ifdef DEBUG_YABOOT
-#define call_yaboot(FUNC,...) \
-	do { \
-		if (FUNC) {					\
-			struct prom_t *_prom = PTRRELOC(&prom);	\
-			unsigned long prom_entry = _prom->entry;\
-			_prom->entry = (unsigned long)(FUNC);	\
-			enter_prom(__VA_ARGS__); 		\
-			_prom->entry = prom_entry;		\
-		}						\
-	} while (0)
-#else
-#define call_yaboot(FUNC,...) do { ; } while (0)
-#endif
-
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <asm/prom.h>
@@ -65,16 +45,14 @@
 #include <asm/bitops.h>
 #include <asm/naca.h>
 #include <asm/pci.h>
-#include "open_pic.h"
 #include <asm/bootinfo.h>
 #include <asm/ppcdebug.h>
+#include "open_pic.h"
 
 #ifdef CONFIG_FB
 #include <asm/linux_logo.h>
 #endif
 
-extern char _end[];
-
 /*
  * prom_init() is called very early on, before the kernel text
  * and data have been mapped to KERNELBASE.  At this point the code
@@ -131,12 +109,7 @@
 
 typedef unsigned long interpret_func(struct device_node *, unsigned long,
 				     int, int);
-#if 0
 static interpret_func interpret_pci_props;
-#endif
-static unsigned long interpret_pci_props(struct device_node *, unsigned long,
-					 int, int);
-
 static interpret_func interpret_isa_props;
 static interpret_func interpret_root_props;
 
@@ -156,9 +129,6 @@
 	0,			/* version */
 	32,			/* encode_phys_size */
 	0			/* bi_rec pointer */
-#ifdef DEBUG_YABOOT
-	,NULL			/* yaboot */
-#endif
 };
 
 
@@ -170,9 +140,6 @@
 extern unsigned long klimit;
 extern unsigned long embedded_sysmap_end;
 extern struct lmb lmb;
-#ifdef CONFIG_MSCHUNKS
-extern struct msChunks msChunks;
-#endif /* CONFIG_MSCHUNKS */
 
 #define MAX_PHB 16 * 3  // 16 Towers * 3 PHBs/tower
 struct _of_tce_table of_tce_table[MAX_PHB + 1] = {{0, 0, 0}};
@@ -203,12 +170,6 @@
 static unsigned long prom_bi_rec_reserve(unsigned long);
 static struct device_node *find_phandle(phandle);
 
-#ifdef CONFIG_MSCHUNKS
-static unsigned long prom_initialize_mschunks(unsigned long);
-#ifdef DEBUG_PROM
-void prom_dump_mschunks_mapping(void);
-#endif /* DEBUG_PROM */
-#endif /* CONFIG_MSCHUNKS */
 #ifdef DEBUG_PROM
 void prom_dump_lmb(void);
 #endif
@@ -217,8 +178,6 @@
 
 extern void enter_prom(void *dummy,...);
 
-void cacheable_memzero(void *, unsigned int);
-
 extern char cmd_line[512];	/* XXX */
 unsigned long dev_tree_size;
 
@@ -545,20 +504,6 @@
 	unsigned long lmb_base, lmb_size;
 	unsigned long num_regs, bytes_per_reg = (_prom->encode_phys_size*2)/8;
 
-#ifdef CONFIG_MSCHUNKS
-	unsigned long max_addr = 0;
-#if 1
-	/* Fix me: 630 3G-4G IO hack here... -Peter (PPPBBB) */
-	unsigned long io_base = 3UL<<30;
-	unsigned long io_size = 1UL<<30;
-	unsigned long have_630 = 1;	/* assume we have a 630 */
-
-#else
-	unsigned long io_base = <real io base here>;
-	unsigned long io_size = <real io size here>;
-#endif
-#endif /* CONFIG_MSCHUNKS */
-
 	lmb_init();
 
         for (node = 0; prom_next_node(&node); ) {
@@ -581,42 +526,17 @@
 				lmb_size = reg.addr64[i].size;
 			}
 
-#ifdef CONFIG_MSCHUNKS
-			if ( lmb_addrs_overlap(lmb_base,lmb_size,
-						io_base,io_size) ) {
-				/* If we really have dram here, then we don't
-			 	 * have a 630! -Peter
-			 	 */
-				have_630 = 0;
-			}
-#endif /* CONFIG_MSCHUNKS */
 			if ( lmb_add(lmb_base, lmb_size) < 0 )
 				prom_print(RELOC("Too many LMB's, discarding this one...\n"));
-#ifdef CONFIG_MSCHUNKS
-			else if ( max_addr < (lmb_base+lmb_size-1) )
-				max_addr = lmb_base+lmb_size-1;
-#endif /* CONFIG_MSCHUNKS */
 		}
 
 	}
 
-#ifdef CONFIG_MSCHUNKS
-	if ( have_630 && lmb_addrs_overlap(0,max_addr,io_base,io_size) )
-		lmb_add_io(io_base, io_size);
-#endif /* CONFIG_MSCHUNKS */
-
 	lmb_analyze();
 #ifdef DEBUG_PROM
 	prom_dump_lmb();
 #endif /* DEBUG_PROM */
 
-#ifdef CONFIG_MSCHUNKS
-	mem = prom_initialize_mschunks(mem);
-#ifdef DEBUG_PROM
-	prom_dump_mschunks_mapping();
-#endif /* DEBUG_PROM */
-#endif /* CONFIG_MSCHUNKS */
-
 	return mem;
 }
 
@@ -718,96 +638,6 @@
 	return result;
 }
 
-
-#ifdef CONFIG_MSCHUNKS
-static unsigned long
-prom_initialize_mschunks(unsigned long mem)
-{
-        unsigned long offset = reloc_offset();
-	struct lmb *_lmb  = PTRRELOC(&lmb);
-	struct msChunks *_msChunks = PTRRELOC(&msChunks);
-	unsigned long i, pchunk = 0;
-	unsigned long addr_range = _lmb->memory.size + _lmb->memory.iosize;
-	unsigned long chunk_size = _lmb->memory.lcd_size;
-
-
-	mem = msChunks_alloc(mem, addr_range / chunk_size, chunk_size);
-
-	/* First create phys -> abs mapping for memory/dram */
-	for (i=0; i < _lmb->memory.cnt ;i++) {
-		unsigned long base = _lmb->memory.region[i].base;
-		unsigned long size = _lmb->memory.region[i].size;
-		unsigned long achunk = addr_to_chunk(base);
-		unsigned long end_achunk = addr_to_chunk(base+size);
-
-		if(_lmb->memory.region[i].type != LMB_MEMORY_AREA)
-			continue;
-
-		_lmb->memory.region[i].physbase = chunk_to_addr(pchunk);
-		for (; achunk < end_achunk ;) {
-			PTRRELOC(_msChunks->abs)[pchunk++] = achunk++;
-		}
-	}
-
-#ifdef CONFIG_MSCHUNKS
-	/* Now create phys -> abs mapping for IO */
-	for (i=0; i < _lmb->memory.cnt ;i++) {
-		unsigned long base = _lmb->memory.region[i].base;
-		unsigned long size = _lmb->memory.region[i].size;
-		unsigned long achunk = addr_to_chunk(base);
-		unsigned long end_achunk = addr_to_chunk(base+size);
-
-		if(_lmb->memory.region[i].type != LMB_IO_AREA)
-			continue;
-
-		_lmb->memory.region[i].physbase = chunk_to_addr(pchunk);
-		for (; achunk < end_achunk ;) {
-			PTRRELOC(_msChunks->abs)[pchunk++] = achunk++;
-		}
-	}
-#endif /* CONFIG_MSCHUNKS */
-
-	return mem;
-}
-
-#ifdef DEBUG_PROM
-void
-prom_dump_mschunks_mapping(void)
-{
-        unsigned long offset = reloc_offset();
-	struct msChunks *_msChunks = PTRRELOC(&msChunks);
-	unsigned long chunk;
-
-        prom_print(RELOC("\nprom_dump_mschunks_mapping:\n"));
-        prom_print(RELOC("    msChunks.num_chunks         = 0x"));
-        prom_print_hex(_msChunks->num_chunks);
-	prom_print_nl();
-        prom_print(RELOC("    msChunks.chunk_size         = 0x"));
-        prom_print_hex(_msChunks->chunk_size);
-	prom_print_nl();
-        prom_print(RELOC("    msChunks.chunk_shift        = 0x"));
-        prom_print_hex(_msChunks->chunk_shift);
-	prom_print_nl();
-        prom_print(RELOC("    msChunks.chunk_mask         = 0x"));
-        prom_print_hex(_msChunks->chunk_mask);
-	prom_print_nl();
-        prom_print(RELOC("    msChunks.abs                = 0x"));
-        prom_print_hex(_msChunks->abs);
-	prom_print_nl();
-
-        prom_print(RELOC("    msChunks mapping:\n"));
-	for(chunk=0; chunk < _msChunks->num_chunks ;chunk++) {
-        	prom_print(RELOC("        phys 0x"));
-        	prom_print_hex(chunk);
-        	prom_print(RELOC(" -> abs 0x"));
-        	prom_print_hex(PTRRELOC(_msChunks->abs)[chunk]);
-		prom_print_nl();
-	}
-
-}
-#endif /* DEBUG_PROM */
-#endif /* CONFIG_MSCHUNKS */
-
 #ifdef DEBUG_PROM
 void
 prom_dump_lmb(void)
@@ -1213,26 +1043,28 @@
 
 unsigned long __init
 prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
-	  unsigned long r6, unsigned long r7, yaboot_debug_t *yaboot)
+	  unsigned long r6, unsigned long r7)
 {
-	int chrp = 0;
 	unsigned long mem;
-	ihandle prom_mmu, prom_op, prom_root, prom_cpu;
+	ihandle prom_root, prom_cpu;
 	phandle cpu_pkg;
 	unsigned long offset = reloc_offset();
 	long l;
 	char *p, *d;
  	unsigned long phys;
         u32 getprop_rval;
-        struct naca_struct   *_naca = RELOC(naca);
+        struct naca_struct *_naca = RELOC(naca);
 	struct paca_struct *_xPaca = PTRRELOC(&paca[0]);
 	struct prom_t *_prom = PTRRELOC(&prom);
 
 	/* Default machine type. */
 	_naca->platform = PLATFORM_PSERIES;
+
+#if 0
 	/* Reset klimit to take into account the embedded system map */
 	if (RELOC(embedded_sysmap_end))
 		RELOC(klimit) = __va(PAGE_ALIGN(RELOC(embedded_sysmap_end)));
+#endif
 
 	/* Get a handle to the prom entry point before anything else */
 	_prom->entry = pp;
@@ -1241,33 +1073,10 @@
 		RELOC(klimit) = PTRUNRELOC((unsigned long)_prom->bi_recs + _prom->bi_recs->data[1]);
 	}
 
-#ifdef DEBUG_YABOOT
-	call_yaboot(yaboot->dummy,offset>>32,offset&0xffffffff);
-	call_yaboot(yaboot->printf, RELOC("offset = 0x%08x%08x\n"), LONG_MSW(offset), LONG_LSW(offset));
-#endif
-
- 	/* Default */
- 	phys = KERNELBASE - offset;
-
-#ifdef DEBUG_YABOOT
-	call_yaboot(yaboot->printf, RELOC("phys = 0x%08x%08x\n"), LONG_MSW(phys), LONG_LSW(phys));
-#endif
-
-
-#ifdef DEBUG_YABOOT
-	_prom->yaboot = yaboot;
-	call_yaboot(yaboot->printf, RELOC("pp = 0x%08x%08x\n"), LONG_MSW(pp), LONG_LSW(pp));
-	call_yaboot(yaboot->printf, RELOC("prom = 0x%08x%08x\n"), LONG_MSW(_prom->entry), LONG_LSW(_prom->entry));
-#endif
-
 	/* First get a handle for the stdout device */
 	_prom->chosen = (ihandle)call_prom(RELOC("finddevice"), 1, 1,
 				       RELOC("/chosen"));
 
-#ifdef DEBUG_YABOOT
-	call_yaboot(yaboot->printf, RELOC("prom->chosen = 0x%08x%08x\n"), LONG_MSW(_prom->chosen), LONG_LSW(_prom->chosen));
-#endif
-
 	if ((long)_prom->chosen <= 0)
 		prom_exit();
 
@@ -1278,22 +1087,7 @@
 
         _prom->stdout = (ihandle)(unsigned long)getprop_rval;
 
-#ifdef DEBUG_YABOOT
-        if (_prom->stdout == 0) {
-	    call_yaboot(yaboot->printf, RELOC("prom->stdout = 0x%08x%08x\n"), LONG_MSW(_prom->stdout), LONG_LSW(_prom->stdout));
-        }
-
-	call_yaboot(yaboot->printf, RELOC("prom->stdout = 0x%08x%08x\n"), LONG_MSW(_prom->stdout), LONG_LSW(_prom->stdout));
-#endif
-
-#ifdef DEBUG_YABOOT
-	call_yaboot(yaboot->printf, RELOC("Location: 0x11\n"));
-#endif
-
 	mem = RELOC(klimit) - offset; 
-#ifdef DEBUG_YABOOT
-	call_yaboot(yaboot->printf, RELOC("Location: 0x11b\n"));
-#endif
 
 	/* Get the full OF pathname of the stdout device */
 	p = (char *) mem;
@@ -1311,34 +1105,6 @@
 	}
 	_prom->encode_phys_size = (getprop_rval==1) ? 32 : 64;
 
-#ifdef DEBUG_PROM
-	prom_print(RELOC("DRENG:    Detect OF version...\n"));
-#endif
-	/* Find the OF version */
-	prom_op = (ihandle)call_prom(RELOC("finddevice"), 1, 1, RELOC("/openprom"));
-	if (prom_op != (ihandle)-1) {
-		char model[64];
-		long sz;
-		sz = (long)call_prom(RELOC("getprop"), 4, 1, prom_op,
-				    RELOC("model"), model, 64);
-		if (sz > 0) {
-			char *c;
-			/* hack to skip the ibm chrp firmware # */
-			if ( strncmp(model,RELOC("IBM"),3) ) {
-				for (c = model; *c; c++)
-					if (*c >= '0' && *c <= '9') {
-						_prom->version = *c - '0';
-						break;
-					}
-			}
-			else
-				chrp = 1;
-		}
-	}
-	if (_prom->version >= 3)
-		prom_print(RELOC("OF Version 3 detected.\n"));
-
-
 	/* Determine which cpu is actually running right _now_ */
         if ((long)call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
 			    RELOC("cpu"), &getprop_rval,
@@ -1408,35 +1174,9 @@
 	if (_naca->platform == PLATFORM_PSERIES)
 		prom_initialize_tce_table();
 
- 	if ((long) call_prom(RELOC("getprop"), 4, 1,
-				_prom->chosen,
-				RELOC("mmu"),
-				&getprop_rval,
-				sizeof(getprop_rval)) <= 0) {	
-		prom_print(RELOC(" no MMU found\n"));
-                prom_exit();
-	}
-
-	/* We assume the phys. address size is 3 cells */
-	RELOC(prom_mmu) = (ihandle)(unsigned long)getprop_rval;
-
-	if ((long)call_prom(RELOC("call-method"), 4, 4,
-				RELOC("translate"),
-				prom_mmu,
-				(void *)(KERNELBASE - offset),
-				(void *)1) != 0) {
-		prom_print(RELOC(" (translate failed) "));
-	} else {
-		prom_print(RELOC(" (translate ok) "));
-		phys = (unsigned long)_prom->args.rets[3];
-	}
-
-	/* If OpenFirmware version >= 3, then use quiesce call */
-	if (_prom->version >= 3) {
-		prom_print(RELOC("Calling quiesce ...\n"));
-		call_prom(RELOC("quiesce"), 0, 0);
-		phys = KERNELBASE - offset;
-	}
+	prom_print(RELOC("Calling quiesce ...\n"));
+	call_prom(RELOC("quiesce"), 0, 0);
+	phys = KERNELBASE - offset;
 
 	prom_print(RELOC("returning from prom_init\n"));
 	return phys;
@@ -1527,14 +1267,14 @@
 					   RELOC(default_colors)[i*3+2]) != 0)
 				break;
 
-#ifdef CONFIG_FB
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE
 		for (i = 0; i < LINUX_LOGO_COLORS; i++)
 			if (prom_set_color(ih, i + 32,
 					   RELOC(linux_logo_red)[i],
 					   RELOC(linux_logo_green)[i],
 					   RELOC(linux_logo_blue)[i]) != 0)
 				break;
-#endif /* CONFIG_FB */
+#endif /* CONFIG_FRAMEBUFFER_CONSOLE */
 
 		/*
 		 * If this display is the device that OF is using for stdout,
diff -Nru a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c
--- a/arch/ppc64/kernel/rtc.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/rtc.c	Wed Jan  8 20:04:44 2003
@@ -196,8 +196,17 @@
 
 static int __init rtc_init(void)
 {
-	misc_register(&rtc_dev);
-	create_proc_read_entry ("driver/rtc", 0, 0, rtc_read_proc, NULL);
+	int retval;
+
+	retval = misc_register(&rtc_dev);
+	if(retval < 0)
+		return retval;
+
+#ifdef CONFIG_PROC_FS
+	if(create_proc_read_entry ("driver/rtc", 0, 0, rtc_read_proc, NULL) == NULL)
+		misc_deregister(&rtc_dev);
+		return -ENOMEM;
+#endif
 
 	printk(KERN_INFO "i/pSeries Real Time Clock Driver v" RTC_VERSION "\n");
 
@@ -258,6 +267,7 @@
         return len;
 }
 
+#ifdef CONFIG_PPC_ISERIES
 /*
  * Get the RTC from the virtual service processor
  * This requires flowing LpEvents to the primary partition
@@ -271,60 +281,6 @@
 	rtc_tm->tm_mon--;
 }
 
-
-void pSeries_get_rtc_time(struct rtc_time *rtc_tm)
-{
-        unsigned long ret[8];
-        int error;
-	int count;
-
-	/*
-	 * error -2 is clock busy, we keep retrying a few times to see
-	 * if it will come good  -- paulus
-	 */
-	count = 0;
-	do {
-		error = rtas_call(rtas_token("get-time-of-day"), 0, 8, (void *)&ret);
-	} while (error == -2 && ++count < 1000);
-
-        if (error != 0) {
-                printk(KERN_WARNING "error: reading the clock failed (%d)\n",
-		       error);
-		return;
-        }
-
-	rtc_tm->tm_sec = ret[5];
-	rtc_tm->tm_min = ret[4];
-	rtc_tm->tm_hour = ret[3];
-	rtc_tm->tm_mday = ret[2];
-	rtc_tm->tm_mon = ret[1] - 1;
-	rtc_tm->tm_year = ret[0] - 1900;
-}
-
-int pSeries_set_rtc_time(struct rtc_time *tm)
-{
-        int error;
-	int count;
-
-	/*
-	 * error -2 is clock busy, we keep retrying a few times to see
-	 * if it will come good  -- paulus
-	 */
-	count = 0;
-	do {
-	        error = rtas_call(rtas_token("set-time-of-day"), 7, 1, NULL,
-				  tm->tm_year + 1900, tm->tm_mon + 1, 
-				  tm->tm_mday, tm->tm_hour, tm->tm_min, 
-				  tm->tm_sec, 0);
-	} while (error == -2 && ++count < 1000);
-
-        if (error != 0)
-                printk(KERN_WARNING "error: setting the clock failed (%d)\n",
-		       error); 
-
-        return 0;
-}
-
 /*
  * Set the RTC in the virtual service processor
  * This requires flowing LpEvents to the primary partition
@@ -380,3 +336,59 @@
 	tm->tm_year -= 1900;
 	tm->tm_mon  -= 1;
 }
+#endif
+
+#ifdef CONFIG_PPC_PSERIES
+void pSeries_get_rtc_time(struct rtc_time *rtc_tm)
+{
+        unsigned long ret[8];
+        int error;
+	int count;
+
+	/*
+	 * error -2 is clock busy, we keep retrying a few times to see
+	 * if it will come good  -- paulus
+	 */
+	count = 0;
+	do {
+		error = rtas_call(rtas_token("get-time-of-day"), 0, 8, (void *)&ret);
+	} while (error == -2 && ++count < 1000);
+
+        if (error != 0) {
+                printk(KERN_WARNING "error: reading the clock failed (%d)\n",
+		       error);
+		return;
+        }
+
+	rtc_tm->tm_sec = ret[5];
+	rtc_tm->tm_min = ret[4];
+	rtc_tm->tm_hour = ret[3];
+	rtc_tm->tm_mday = ret[2];
+	rtc_tm->tm_mon = ret[1] - 1;
+	rtc_tm->tm_year = ret[0] - 1900;
+}
+
+int pSeries_set_rtc_time(struct rtc_time *tm)
+{
+        int error;
+	int count;
+
+	/*
+	 * error -2 is clock busy, we keep retrying a few times to see
+	 * if it will come good  -- paulus
+	 */
+	count = 0;
+	do {
+	        error = rtas_call(rtas_token("set-time-of-day"), 7, 1, NULL,
+				  tm->tm_year + 1900, tm->tm_mon + 1, 
+				  tm->tm_mday, tm->tm_hour, tm->tm_min, 
+				  tm->tm_sec, 0);
+	} while (error == -2 && ++count < 1000);
+
+        if (error != 0)
+                printk(KERN_WARNING "error: setting the clock failed (%d)\n",
+		       error); 
+
+        return 0;
+}
+#endif
diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c
--- a/arch/ppc64/kernel/setup.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/setup.c	Wed Jan  8 20:04:44 2003
@@ -153,14 +153,18 @@
 	debugger_dabr_match = xmon_dabr_match;
 #endif
 
+#ifdef CONFIG_PPC_ISERIES
 	/* pSeries systems are identified in prom.c via OF. */
 	if ( itLpNaca.xLparInstalled == 1 )
 		naca->platform = PLATFORM_ISERIES_LPAR;
+#endif
 	
 	switch (naca->platform) {
+#ifdef CONFIG_PPC_ISERIES
 	case PLATFORM_ISERIES_LPAR:
 		iSeries_init_early();
 		break;
+#endif
 
 #ifdef CONFIG_PPC_PSERIES
 	case PLATFORM_PSERIES:
@@ -215,9 +219,11 @@
 	mm_init_ppc64();
 
 	switch (naca->platform) {
+#ifdef CONFIG_PPC_ISERIES
 	case PLATFORM_ISERIES_LPAR:
 		iSeries_init();
 		break;
+#endif
 	default:
 		/* The following relies on the device tree being */
 		/* fully configured.                             */
diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c
--- a/arch/ppc64/kernel/signal32.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/kernel/signal32.c	Wed Jan  8 20:04:45 2003
@@ -57,7 +57,7 @@
 struct sigregs32 {
 	/*
 	 * the gp_regs array is 32 bit representation of the pt_regs
-	 * structure that was stored on the kernle stack during the
+	 * structure that was stored on the kernel stack during the
 	 * system call that was interrupted for the signal.
 	 *
 	 * Note that the entire pt_regs regs structure will fit in
diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
--- a/arch/ppc64/kernel/smp.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/smp.c	Wed Jan  8 20:04:44 2003
@@ -56,7 +56,7 @@
 
 static struct smp_ops_t *smp_ops;
 
-volatile unsigned long cpu_callin_map[NR_CPUS];
+volatile unsigned int cpu_callin_map[NR_CPUS];
 
 extern unsigned char stab_array[];
 
@@ -86,6 +86,7 @@
 	mttbl(lower);
 }
 
+#ifdef CONFIG_PPC_ISERIES
 void iSeries_smp_message_recv( struct pt_regs * regs )
 {
 	int cpu = smp_processor_id();
@@ -117,7 +118,6 @@
 	}
 }
 
-#ifdef CONFIG_PPC_ISERIES
 static int smp_iSeries_numProcs(void)
 {
 	unsigned np, i;
@@ -132,7 +132,6 @@
         }
 	return np;
 }
-#endif
 
 static int smp_iSeries_probe(void)
 {
@@ -189,13 +188,12 @@
 	smp_ops->probe        = smp_iSeries_probe;
 	smp_ops->kick_cpu     = smp_iSeries_kick_cpu;
 	smp_ops->setup_cpu    = smp_iSeries_setup_cpu;
-#ifdef CONFIG_PPC_ISERIES
 #warning fix for iseries
 	naca->processorCount	= smp_iSeries_numProcs();
-#endif
 }
+#endif
 
-
+#ifdef CONFIG_PPC_PSERIES
 static void
 smp_openpic_message_pass(int target, int msg, unsigned long data, int wait)
 {
@@ -257,6 +255,7 @@
 	 */
 	paca[nr].xProcStart = 1;
 }
+#endif
 
 static void __init smp_space_timers(unsigned int max_cpus)
 {
@@ -273,6 +272,7 @@
 	}
 }
 
+#ifdef CONFIG_PPC_PSERIES
 static void __devinit pSeries_setup_cpu(int cpu)
 {
 	if (OpenPIC_Addr) {
@@ -361,6 +361,7 @@
 	smp_ops->kick_cpu = smp_kick_cpu;
 	smp_ops->setup_cpu = pSeries_setup_cpu;
 }
+#endif
 
 void smp_local_timer_interrupt(struct pt_regs * regs)
 {
@@ -563,26 +564,8 @@
 	/* Fixup boot cpu */
 	smp_store_cpu_info(smp_processor_id());
 	cpu_callin_map[smp_processor_id()] = 1;
-
-	for (i = 0; i < NR_CPUS; i++) {
-		paca[i].prof_counter = 1;
-		paca[i].prof_multiplier = 1;
-		if (i != boot_cpuid) {
-			void *tmp;
-		        /*
-			 * the boot cpu segment table is statically 
-			 * initialized to real address 0x5000.  The
-			 * Other processor's tables are created and
-			 * initialized here.
-			 */
-			tmp = &stab_array[PAGE_SIZE * (i-1)];
-			memset(tmp, 0, PAGE_SIZE); 
-			paca[i].xStab_data.virt = (unsigned long)tmp;
-			paca[i].xStab_data.real = (unsigned long)__v2a(tmp);
-			paca[i].default_decr = tb_ticks_per_jiffy /
-				decr_overclock;
-		}
-	}
+	paca[smp_processor_id()].prof_counter = 1;
+	paca[smp_processor_id()].prof_multiplier = 1;
 
 	/*
 	 * XXX very rough. 
@@ -615,6 +598,23 @@
 	struct pt_regs regs;
 	struct task_struct *p;
 	int c;
+
+	paca[cpu].prof_counter = 1;
+	paca[cpu].prof_multiplier = 1;
+	paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock;
+
+	if (!cpu_has_slb()) {
+		void *tmp;
+
+		/* maximum of 48 CPUs on machines with a segment table */
+		if (cpu >= 48)
+			BUG();
+
+		tmp = &stab_array[PAGE_SIZE * cpu];
+		memset(tmp, 0, PAGE_SIZE); 
+		paca[cpu].xStab_data.virt = (unsigned long)tmp;
+		paca[cpu].xStab_data.real = (unsigned long)__v2a(tmp);
+	}
 
 	/* create a process for the processor */
 	/* only regs.msr is actually used, and 0 is OK for it */
diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c
--- a/arch/ppc64/kernel/sys_ppc32.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/sys_ppc32.c	Wed Jan  8 20:04:44 2003
@@ -247,30 +247,6 @@
 	return ret;
 }
 
-static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = get_user(kfl->l_type, &ufl->l_type);
-	err |= __get_user(kfl->l_whence, &ufl->l_whence);
-	err |= __get_user(kfl->l_start, &ufl->l_start);
-	err |= __get_user(kfl->l_len, &ufl->l_len);
-	err |= __get_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
-static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = __put_user(kfl->l_type, &ufl->l_type);
-	err |= __put_user(kfl->l_whence, &ufl->l_whence);
-	err |= __put_user(kfl->l_start, &ufl->l_start);
-	err |= __put_user(kfl->l_len, &ufl->l_len);
-	err |= __put_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
 extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
 asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
@@ -283,12 +259,12 @@
 		mm_segment_t old_fs;
 		long ret;
 
-		if(get_flock(&f, (struct flock32 *)arg))
+		if(get_compat_flock(&f, (struct compat_flock *)arg))
 			return -EFAULT;
 		old_fs = get_fs(); set_fs (KERNEL_DS);
 		ret = sys_fcntl(fd, cmd, (unsigned long)&f);
 		set_fs (old_fs);
-		if(put_flock(&f, (struct flock32 *)arg))
+		if(put_compat_flock(&f, (struct compat_flock *)arg))
 			return -EFAULT;
 		return ret;
 	}
@@ -300,16 +276,16 @@
 struct ncp_mount_data32_v3 {
         int version;
         unsigned int ncp_fd;
-        __kernel_uid_t32 mounted_uid;
-        __kernel_pid_t32 wdog_pid;
+        compat_uid_t mounted_uid;
+        compat_pid_t wdog_pid;
         unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
         unsigned int time_out;
         unsigned int retry_count;
         unsigned int flags;
-        __kernel_uid_t32 uid;
-        __kernel_gid_t32 gid;
-        __kernel_mode_t32 file_mode;
-        __kernel_mode_t32 dir_mode;
+        compat_uid_t uid;
+        compat_gid_t gid;
+        compat_mode_t file_mode;
+        compat_mode_t dir_mode;
 };
 
 struct ncp_mount_data32_v4 {
@@ -380,11 +356,11 @@
 
 struct smb_mount_data32 {
         int version;
-        __kernel_uid_t32 mounted_uid;
-        __kernel_uid_t32 uid;
-        __kernel_gid_t32 gid;
-        __kernel_mode_t32 file_mode;
-        __kernel_mode_t32 dir_mode;
+        compat_uid_t mounted_uid;
+        compat_uid_t uid;
+        compat_gid_t gid;
+        compat_mode_t file_mode;
+        compat_mode_t dir_mode;
 };
 
 static void *do_smb_super_data_conv(void *raw_data)
@@ -802,10 +778,13 @@
 	return sys32_select((int)n, inp, outp, exp, tvp_x);
 }
 
-static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
+int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
 {
 	int err;
 
+	if (stat->size > MAX_NON_LFS)
+		return -EOVERFLOW;
+
 	err  = put_user(stat->dev, &statbuf->st_dev);
 	err |= put_user(stat->ino, &statbuf->st_ino);
 	err |= put_user(stat->mode, &statbuf->st_mode);
@@ -813,8 +792,6 @@
 	err |= put_user(stat->uid, &statbuf->st_uid);
 	err |= put_user(stat->gid, &statbuf->st_gid);
 	err |= put_user(stat->rdev, &statbuf->st_rdev);
-	if (stat->size > MAX_NON_LFS)
-		return -EOVERFLOW;
 	err |= put_user(stat->size, &statbuf->st_size);
 	err |= put_user(stat->atime.tv_sec, &statbuf->st_atime);
 	err |= put_user(0, &statbuf->__unused1);
@@ -830,39 +807,6 @@
 	return err;
 }
 
-asmlinkage long sys32_newstat(char* filename, struct stat32* statbuf)
-{
-	struct kstat stat;
-	int error = vfs_stat(filename, &stat);
-	
-	if (!error)
-		error = cp_new_stat32(&stat, statbuf);
-
-	return error;
-}
-
-asmlinkage long sys32_newlstat(char * filename, struct stat32 *statbuf)
-{
-	struct kstat stat;
-	int error = vfs_lstat(filename, &stat);
-	
-	if (!error)
-		error = cp_new_stat32(&stat, statbuf);
-
-	return error;
-}
-
-asmlinkage long sys32_newfstat(unsigned int fd, struct stat32 *statbuf)
-{
-	struct kstat stat;
-	int error = vfs_fstat(fd, &stat);
-	
-	if (!error)
-		error = cp_new_stat32(&stat, statbuf);
-
-	return error;
-}
-
 static inline int put_statfs (struct statfs32 *ubuf, struct statfs *kbuf)
 {
 	int err;
@@ -1492,27 +1436,27 @@
 struct nfsctl_export32 {
 	s8			ex32_client[NFSCLNT_IDMAX+1];
 	s8			ex32_path[NFS_MAXPATHLEN+1];
-	__kernel_dev_t32	ex32_dev;
-	__kernel_ino_t32	ex32_ino;
+	compat_dev_t	ex32_dev;
+	compat_ino_t	ex32_ino;
 	s32			ex32_flags;
-	__kernel_uid_t32	ex32_anon_uid;
-	__kernel_gid_t32	ex32_anon_gid;
+	compat_uid_t	ex32_anon_uid;
+	compat_gid_t	ex32_anon_gid;
 };
 
 struct nfsctl_uidmap32 {
 	u32			ug32_ident;   /* char * */
-	__kernel_uid_t32	ug32_uidbase;
+	compat_uid_t	ug32_uidbase;
 	s32			ug32_uidlen;
 	u32			ug32_udimap;  /* uid_t * */
-	__kernel_uid_t32	ug32_gidbase;
+	compat_uid_t	ug32_gidbase;
 	s32			ug32_gidlen;
 	u32			ug32_gdimap;  /* gid_t * */
 };
 
 struct nfsctl_fhparm32 {
 	struct sockaddr		gf32_addr;
-	__kernel_dev_t32	gf32_dev;
-	__kernel_ino_t32	gf32_ino;
+	compat_dev_t	gf32_dev;
+	compat_ino_t	gf32_ino;
 	s32			gf32_version;
 };
 
@@ -1645,7 +1589,7 @@
 		return -ENOMEM;
 	for(i = 0; i < karg->ca_umap.ug_uidlen; i++)
 		err |= __get_user(karg->ca_umap.ug_udimap[i],
-			      &(((__kernel_uid_t32 *)A(uaddr))[i]));
+			      &(((compat_uid_t *)A(uaddr))[i]));
 	err |= __get_user(karg->ca_umap.ug_gidbase,
 		      &arg32->ca32_umap.ug32_gidbase);
 	err |= __get_user(karg->ca_umap.ug_uidlen,
@@ -1659,7 +1603,7 @@
 		return -ENOMEM;
 	for(i = 0; i < karg->ca_umap.ug_gidlen; i++)
 		err |= __get_user(karg->ca_umap.ug_gdimap[i],
-			      &(((__kernel_gid_t32 *)A(uaddr))[i]));
+			      &(((compat_gid_t *)A(uaddr))[i]));
 
 	return err;
 }
@@ -2076,37 +2020,6 @@
 }
 
 
-struct tms32 {
-	__kernel_clock_t32 tms_utime;
-	__kernel_clock_t32 tms_stime;
-	__kernel_clock_t32 tms_cutime;
-	__kernel_clock_t32 tms_cstime;
-};
-                                
-extern asmlinkage long sys_times(struct tms * tbuf);
-
-asmlinkage long sys32_times(struct tms32 *tbuf)
-{
-	struct tms t;
-	long ret;
-	mm_segment_t old_fs = get_fs ();
-	int err;
-	
-	set_fs (KERNEL_DS);
-	ret = sys_times(tbuf ? &t : NULL);
-	set_fs (old_fs);
-	if (tbuf) {
-		err = put_user (t.tms_utime, &tbuf->tms_utime);
-		err |= __put_user (t.tms_stime, &tbuf->tms_stime);
-		err |= __put_user (t.tms_cutime, &tbuf->tms_cutime);
-		err |= __put_user (t.tms_cstime, &tbuf->tms_cstime);
-		if (err)
-			ret = -EFAULT;
-	}
-	
-	return ret;
-}
-
 struct msgbuf32 { s32 mtype; char mtext[1]; };
 
 struct semid_ds32 {
@@ -2144,8 +2057,8 @@
 	unsigned short msg_cbytes;
 	unsigned short msg_qnum;
 	unsigned short msg_qbytes;
-	__kernel_ipc_pid_t32 msg_lspid;
-	__kernel_ipc_pid_t32 msg_lrpid;
+	compat_ipc_pid_t msg_lspid;
+	compat_ipc_pid_t msg_lrpid;
 };
 
 struct msqid64_ds32 {
@@ -2159,8 +2072,8 @@
 	unsigned int msg_cbytes;
 	unsigned int msg_qnum;
 	unsigned int msg_qbytes;
-	__kernel_pid_t32 msg_lspid;
-	__kernel_pid_t32 msg_lrpid;
+	compat_pid_t msg_lspid;
+	compat_pid_t msg_lrpid;
 	unsigned int __unused4;
 	unsigned int __unused5;
 };
@@ -2171,8 +2084,8 @@
 	compat_time_t shm_atime;
 	compat_time_t shm_dtime;
 	compat_time_t shm_ctime;
-	__kernel_ipc_pid_t32 shm_cpid;
-	__kernel_ipc_pid_t32 shm_lpid;
+	compat_ipc_pid_t shm_cpid;
+	compat_ipc_pid_t shm_lpid;
 	unsigned short shm_nattch;
 	unsigned short __unused;
 	unsigned int __unused2;
@@ -2189,8 +2102,8 @@
 	compat_time_t shm_ctime;
 	unsigned int __unused4;
 	compat_size_t shm_segsz;
-	__kernel_pid_t32 shm_cpid;
-	__kernel_pid_t32 shm_lpid;
+	compat_pid_t shm_cpid;
+	compat_pid_t shm_lpid;
 	unsigned int shm_nattch;
 	unsigned int __unused5;
 	unsigned int __unused6;
@@ -2712,7 +2625,7 @@
  * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
  * and the register representation of a signed int (msr in 64-bit mode) is performed.
  */
-asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, __kernel_off_t32* offset, u32 count)
+asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, compat_off_t* offset, u32 count)
 {
 	mm_segment_t old_fs = get_fs();
 	int ret;
@@ -2733,7 +2646,7 @@
 
 extern asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count);
 
-asmlinkage int sys32_sendfile64(int out_fd, int in_fd, __kernel_loff_t32 *offset, s32 count)
+asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t *offset, s32 count)
 {
 	mm_segment_t old_fs = get_fs();
 	int ret;
@@ -4296,7 +4209,7 @@
 extern asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len,
 					    unsigned long *user_mask_ptr);
 
-asmlinkage int sys32_sched_setaffinity(__kernel_pid_t32 pid, unsigned int len,
+asmlinkage int sys32_sched_setaffinity(compat_pid_t pid, unsigned int len,
 				       u32 *user_mask_ptr)
 {
 	unsigned long kernel_mask;
@@ -4320,7 +4233,7 @@
 extern asmlinkage int sys_sched_getaffinity(pid_t pid, unsigned int len,
 					    unsigned long *user_mask_ptr);
 
-asmlinkage int sys32_sched_getaffinity(__kernel_pid_t32 pid, unsigned int len,
+asmlinkage int sys32_sched_getaffinity(compat_pid_t pid, unsigned int len,
 				       u32 *user_mask_ptr)
 {
 	unsigned long kernel_mask;
diff -Nru a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c
--- a/arch/ppc64/kernel/time.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/kernel/time.c	Wed Jan  8 20:04:45 2003
@@ -301,9 +301,11 @@
         	next_dec = lpaca->default_decr;
 	set_dec(next_dec);
 
+#ifdef CONFIG_PPC_ISERIES
 	lpq = lpaca->lpQueuePtr;
 	if (lpq && ItLpQueue_isLpIntPending(lpq))
 		lpEvent_count += ItLpQueue_process(lpq, regs); 
+#endif
 
 	irq_exit();
 
@@ -458,9 +460,11 @@
 
 	ppc_md.calibrate_decr();
 
-	if ( ! piranha_simulator ) {
+#ifdef CONFIG_PPC_ISERIES
+	if (!piranha_simulator)
+#endif
 		ppc_md.get_boot_time(&tm);
-	}
+
 	write_lock_irqsave(&xtime_lock, flags);
 	xtime.tv_sec = mktime(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
 			      tm.tm_hour, tm.tm_min, tm.tm_sec);
diff -Nru a/arch/ppc64/kernel/xics.c b/arch/ppc64/kernel/xics.c
--- a/arch/ppc64/kernel/xics.c	Wed Jan  8 20:04:44 2003
+++ b/arch/ppc64/kernel/xics.c	Wed Jan  8 20:04:44 2003
@@ -22,7 +22,7 @@
 #include <asm/naca.h>
 #include <asm/rtas.h>
 #include "i8259.h"
-#include "xics.h"
+#include <asm/xics.h>
 #include <asm/ppcdebug.h>
 #include <asm/machdep.h>
 
@@ -430,15 +430,6 @@
 	ppc64_boot_msg(0x21, "XICS Done");
 }
 
-void xics_isa_init(void)
-{
-	return;
-	if (request_irq(xics_irq_8259_cascade + XICS_IRQ_OFFSET, no_action,
-			0, "8259 cascade", 0))
-		printk(KERN_ERR "xics_init_IRQ: couldn't get 8259 cascade\n");
-	i8259_init();
-}
-
 void xics_set_affinity(unsigned int virq, unsigned long cpumask)
 {
         irq_desc_t *desc = irq_desc + virq;
@@ -446,7 +437,7 @@
 	unsigned long flags;
 	long status;
 	unsigned long xics_status[2];
-	u32 newmask;
+	unsigned long newmask;
 
 	virq -= XICS_IRQ_OFFSET;
 	irq = virt_irq_to_real(virq);
@@ -464,12 +455,12 @@
 	}
 
 	/* For the moment only implement delivery to all cpus or one cpu */
-	if (cpumask == 0xffffffff) {
+	if (cpumask == -1UL) {
 		newmask = default_distrib_server;
 	} else {
 		if (!(cpumask & cpu_online_map))
 			goto out;
-		newmask = find_first_bit(&cpumask, 32);
+		newmask = find_first_bit(&cpumask, 8*sizeof(unsigned long));
 	}
 
 	status = rtas_call(ibm_set_xive, 3, 1, NULL,
diff -Nru a/arch/ppc64/kernel/xics.h b/arch/ppc64/kernel/xics.h
--- a/arch/ppc64/kernel/xics.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,22 +0,0 @@
-/* 
- * arch/ppc/kernel/xics.h
- *
- * Copyright 2000 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 _PPC_KERNEL_XICS_H
-#define _PPC_KERNEL_XICS_H
-
-extern struct hw_interrupt_type xics_pic;
-extern struct hw_interrupt_type xics_8259_pic;
-
-void xics_init_IRQ(void);
-int xics_get_irq(struct pt_regs *);
-void xics_isa_init(void);
-
-#endif /* _PPC_KERNEL_XICS_H */
diff -Nru a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile
--- a/arch/ppc64/lib/Makefile	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc64/lib/Makefile	Wed Jan  8 20:04:32 2003
@@ -2,7 +2,9 @@
 # Makefile for ppc64-specific library files..
 #
 
-export-objs     := dec_and_lock.o
+L_TARGET = lib.a
 
-obj-y           := checksum.o dec_and_lock.o string.o strcase.o copypage.o \
-		   memcpy.o copyuser.o
+export-objs := dec_and_lock.o
+
+obj-y := checksum.o dec_and_lock.o string.o strcase.o
+obj-y += copypage.o memcpy.o copyuser.o
diff -Nru a/arch/ppc64/lib/memcpy.S b/arch/ppc64/lib/memcpy.S
--- a/arch/ppc64/lib/memcpy.S	Wed Jan  8 20:04:31 2003
+++ b/arch/ppc64/lib/memcpy.S	Wed Jan  8 20:04:31 2003
@@ -121,7 +121,7 @@
 	cmpwi	cr1,r5,8
 	addi	r3,r3,32
 	sld	r9,r9,r10
-	blt	cr1,.Ldo_tail
+	ble	cr1,.Ldo_tail
 	ld	r0,8(r4)
 	srd	r7,r0,r11
 	or	r9,r7,r9
diff -Nru a/arch/ppc64/mm/Makefile b/arch/ppc64/mm/Makefile
--- a/arch/ppc64/mm/Makefile	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc64/mm/Makefile	Wed Jan  8 20:04:32 2003
@@ -2,7 +2,7 @@
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
 
-EXTRA_CFLAGS = -mno-minimal-toc
+EXTRA_CFLAGS += -mno-minimal-toc
 
-obj-y           := fault.o init.o extable.o imalloc.o
+obj-y := fault.o init.o extable.o imalloc.o
 obj-$(CONFIG_DISCONTIGMEM) += numa.o
diff -Nru a/arch/ppc64/oprofile/Makefile b/arch/ppc64/oprofile/Makefile
--- a/arch/ppc64/oprofile/Makefile	Wed Jan  8 20:04:32 2003
+++ b/arch/ppc64/oprofile/Makefile	Wed Jan  8 20:04:32 2003
@@ -1,8 +1,8 @@
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
-DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
+DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \
 		oprof.o cpu_buffer.o buffer_sync.o \
 		event_buffer.o oprofile_files.o \
 		oprofilefs.o oprofile_stats.o )
 
-oprofile-y				:= $(DRIVER_OBJS) init.o timer_int.o
+oprofile-y := $(DRIVER_OBJS) init.o timer_int.o
diff -Nru a/arch/ppc64/xmon/Makefile b/arch/ppc64/xmon/Makefile
--- a/arch/ppc64/xmon/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/xmon/Makefile	Wed Jan  8 20:04:45 2003
@@ -1,5 +1,5 @@
 # Makefile for xmon
 
-EXTRA_CFLAGS = -mno-minimal-toc
+EXTRA_CFLAGS += -mno-minimal-toc
 
-obj-y       := start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
+obj-y := start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
diff -Nru a/arch/ppc64/xmon/start.c b/arch/ppc64/xmon/start.c
--- a/arch/ppc64/xmon/start.c	Wed Jan  8 20:04:45 2003
+++ b/arch/ppc64/xmon/start.c	Wed Jan  8 20:04:45 2003
@@ -14,29 +14,13 @@
 #include <asm/page.h>
 #include <asm/prom.h>
 #include <asm/processor.h>
-
-/* Transition to udbg isn't quite done yet...but very close. */
-#define USE_UDBG
-#ifdef USE_UDBG
 #include <asm/udbg.h>
-#endif
 
-#ifndef USE_UDBG
-static volatile unsigned char *sccc, *sccd;
-#endif
-unsigned long TXRDY, RXRDY;
 extern void xmon_printf(const char *fmt, ...);
 static int xmon_expect(const char *str, unsigned int timeout);
 
-#ifndef USE_UDBG
-static int console = 0;
-#endif
-static int via_modem = 0;
-/* static int xmon_use_sccb = 0;  --Unused */
-
 #define TB_SPEED	25000000
 
-extern void *comport1;
 static inline unsigned int readtb(void)
 {
 	unsigned int ret;
@@ -45,16 +29,10 @@
 	return ret;
 }
 
-#ifndef USE_UDBG
-void buf_access(void)
-{
-	sccd[3] &= ~0x80;	/* reset DLAB */
-}
-#endif
-
-static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs, struct tty_struct *tty) 
+static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs,
+			      struct tty_struct *tty) 
 {
-  xmon(pt_regs);
+	xmon(pt_regs);
 }
 static struct sysrq_key_op sysrq_xmon_op = 
 {
@@ -68,50 +46,12 @@
 {
 	/* This maybe isn't the best place to register sysrq 'x' */
 	__sysrq_put_key_op('x', &sysrq_xmon_op);
-#ifndef USE_UDBG
-	/* should already be mapped by the kernel boot */
-	sccd = (volatile unsigned char *) (((unsigned long)comport1));
-	sccc = (volatile unsigned char *) (((unsigned long)comport1)+5);
-	TXRDY = 0x20;
-	RXRDY = 1;
-#endif
 }
 
-static int scc_initialized = 0;
-
-void xmon_init_scc(void);
-extern void pmu_poll(void);
-
 int
 xmon_write(void *handle, void *ptr, int nb)
 {
-#ifdef USE_UDBG
 	return udbg_write(ptr, nb);
-#else
-	char *p = ptr;
-	int i, c, ct;
-
-	if (!scc_initialized)
-		xmon_init_scc();
-	ct = 0;
-	for (i = 0; i < nb; ++i) {
-		while ((*sccc & TXRDY) == 0) {
-		}
-		c = p[i];
-		if (c == '\n' && !ct) {
-			c = '\r';
-			ct = 1;
-			--i;
-		} else {
-			if (console)
-				printk("%c", c);
-			ct = 0;
-		}
-		buf_access();
-		*sccd = c;
-	}
-	return i;
-#endif
 }
 
 int xmon_wants_key;
@@ -119,68 +59,15 @@
 int
 xmon_read(void *handle, void *ptr, int nb)
 {
-#ifdef USE_UDBG
 	return udbg_read(ptr, nb);
-#else
-	char *p = ptr;
-	int i, c;
-
-	if (!scc_initialized)
-		xmon_init_scc();
-	for (i = 0; i < nb; ++i) {
-		do {
-			while ((*sccc & RXRDY) == 0)
-				;
-			buf_access();
-			c = *sccd;
-		} while (c == 0x11 || c == 0x13);
-		*p++ = c;
-	}
-	return i;
-#endif
 }
 
 int
 xmon_read_poll(void)
 {
-#ifdef USE_UDBG
 	return udbg_getc_poll();
-#else
-	if ((*sccc & RXRDY) == 0) {
-		return -1;
-	}
-	buf_access();
-	return *sccd;
-#endif
 }
  
-void
-xmon_init_scc()
-{
-#ifndef USE_UDBG
-	sccd[3] = 0x83; eieio();	/* LCR = 8N1 + DLAB */
-	sccd[0] = 12; eieio();		/* DLL = 9600 baud */
-	sccd[1] = 0; eieio();
-	sccd[2] = 0; eieio();		/* FCR = 0 */
-	sccd[3] = 3; eieio();		/* LCR = 8N1 */
-	sccd[1] = 0; eieio();		/* IER = 0 */
-#endif
-
-	scc_initialized = 1;
-	if (via_modem) {
-		for (;;) {
-			xmon_write(0, "ATE1V1\r", 7);
-			if (xmon_expect("OK", 5)) {
-				xmon_write(0, "ATA\r", 4);
-				if (xmon_expect("CONNECT", 40))
-					break;
-			}
-			xmon_write(0, "+++", 3);
-			xmon_expect("OK", 3);
-		}
-	}
-}
-
 void *xmon_stdin;
 void *xmon_stdout;
 void *xmon_stderr;
diff -Nru a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
--- a/arch/s390/kernel/module.c	Wed Jan  8 20:04:45 2003
+++ b/arch/s390/kernel/module.c	Wed Jan  8 20:04:45 2003
@@ -51,9 +51,9 @@
            table entries. */
 }
 
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod)
 {
 	// FIXME: add space needed for GOT/PLT
diff -Nru a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
--- a/arch/s390/kernel/traps.c	Wed Jan  8 20:04:43 2003
+++ b/arch/s390/kernel/traps.c	Wed Jan  8 20:04:43 2003
@@ -63,50 +63,6 @@
 
 static int kstack_depth_to_print = 12;
 
-/*
- * If the address is either in the .text section of the
- * kernel, or in the vmalloc'ed module regions, it *may* 
- * be the address of a calling routine
- */
-extern char _stext, _etext;
-
-#ifdef CONFIG_MODULES
-
-/* FIXME: Accessed without a lock --RR */
-extern struct list_head modules;
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	int retval = 0;
-	struct module *mod;
-
-	if (addr >= (unsigned long) &_stext &&
-	    addr <= (unsigned long) &_etext)
-		return 1;
-
-	list_for_each_entry(mod, &modules, list) {
-		/* mod_bound tests for addr being inside the vmalloc'ed
-		 * module area. Of course it'd be better to test only
-		 * for the .text subset... */
-		if (mod_bound((void*)addr, 0, mod)) {
-			retval = 1;
-			break;
-		}
-	}
-
-	return retval;
-}
-
-#else
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	return (addr >= (unsigned long) &_stext &&
-		addr <= (unsigned long) &_etext);
-}
-
-#endif
-
 void show_trace(unsigned long * stack)
 {
 	unsigned long backchain, low_addr, high_addr, ret_addr;
diff -Nru a/arch/s390x/kernel/linux32.c b/arch/s390x/kernel/linux32.c
--- a/arch/s390x/kernel/linux32.c	Wed Jan  8 20:04:44 2003
+++ b/arch/s390x/kernel/linux32.c	Wed Jan  8 20:04:44 2003
@@ -833,30 +833,6 @@
 	return err;
 }
 
-static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = get_user(kfl->l_type, &ufl->l_type);
-	err |= __get_user(kfl->l_whence, &ufl->l_whence);
-	err |= __get_user(kfl->l_start, &ufl->l_start);
-	err |= __get_user(kfl->l_len, &ufl->l_len);
-	err |= __get_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
-static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = __put_user(kfl->l_type, &ufl->l_type);
-	err |= __put_user(kfl->l_whence, &ufl->l_whence);
-	err |= __put_user(kfl->l_start, &ufl->l_start);
-	err |= __put_user(kfl->l_len, &ufl->l_len);
-	err |= __put_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
 extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
 
 asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -868,7 +844,7 @@
 			mm_segment_t old_fs;
 			long ret;
 			
-			if(get_flock(&f, (struct flock32 *)A(arg)))
+			if(get_compat_flock(&f, (struct compat_flock *)A(arg)))
 				return -EFAULT;
 			old_fs = get_fs(); set_fs (KERNEL_DS);
 			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
@@ -877,7 +853,7 @@
 			if (f.l_start >= 0x7fffffffUL ||
 			    f.l_start + f.l_len >= 0x7fffffffUL)
 				return -EOVERFLOW;
-			if(put_flock(&f, (struct flock32 *)A(arg)))
+			if(put_compat_flock(&f, (struct compat_flock *)A(arg)))
 				return -EFAULT;
 			return 0;
 		}
@@ -888,7 +864,7 @@
 			mm_segment_t old_fs;
 			long ret;
 			
-			if(get_flock(&f, (struct flock32 *)A(arg)))
+			if(get_compat_flock(&f, (struct compat_flock *)A(arg)))
 				return -EFAULT;
 			old_fs = get_fs(); set_fs (KERNEL_DS);
 			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
@@ -1695,8 +1671,7 @@
 	set_fs (KERNEL_DS);
 	ret = sys_sched_rr_get_interval(pid, &t);
 	set_fs (old_fs);
-	if (put_user (t.tv_sec, &interval->tv_sec) ||
-	    __put_user (t.tv_nsec, &interval->tv_nsec))
+	if (put_compat_timespec(&t, interval))
 		return -EFAULT;
 	return ret;
 }
@@ -1830,8 +1805,7 @@
 	signotset(&these);
 
 	if (uts) {
-		if (get_user (ts.tv_sec, &uts->tv_sec) ||
-		    get_user (ts.tv_nsec, &uts->tv_nsec))
+		if (get_compat_timespec(&ts, uts))
 			return -EINVAL;
 		if (ts.tv_nsec >= 1000000000L || ts.tv_nsec < 0
 		    || ts.tv_sec < 0)
@@ -4173,13 +4147,12 @@
 	mm_segment_t old_fs;
 	int ret;
 
-	if (get_user (tmp.tv_sec,  &timeout32->tv_sec)  ||
-	    get_user (tmp.tv_nsec, &timeout32->tv_nsec))
+	if (timeout32 && get_compat_timespec(&tmp, timeout32))
 		return -EINVAL;
 
 	old_fs = get_fs();
 	set_fs(KERNEL_DS);
-	ret = sys_futex(uaddr, op, val, &tmp);
+	ret = sys_futex(uaddr, op, val, timeout32 ? &tmp : NULL);
 	set_fs(old_fs);
 
 	return ret;
diff -Nru a/arch/s390x/kernel/linux32.h b/arch/s390x/kernel/linux32.h
--- a/arch/s390x/kernel/linux32.h	Wed Jan  8 20:04:45 2003
+++ b/arch/s390x/kernel/linux32.h	Wed Jan  8 20:04:45 2003
@@ -25,15 +25,6 @@
 #define F_SETLK64       13
 #define F_SETLKW64      14    
 
-struct flock32 {
-        short l_type;
-        short l_whence;
-        compat_off_t l_start;
-        compat_off_t l_len;
-        compat_pid_t l_pid;
-        short __unused;
-}; 
-
 struct statfs32 {
 	__s32			f_type;
 	__s32			f_bsize;
diff -Nru a/arch/s390x/kernel/module.c b/arch/s390x/kernel/module.c
--- a/arch/s390x/kernel/module.c	Wed Jan  8 20:04:45 2003
+++ b/arch/s390x/kernel/module.c	Wed Jan  8 20:04:45 2003
@@ -52,9 +52,9 @@
 }
 
 /* s390/s390x needs additional memory for GOT/PLT sections. */
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod)
 {
 	// FIXME: add space needed for GOT/PLT
diff -Nru a/arch/s390x/kernel/traps.c b/arch/s390x/kernel/traps.c
--- a/arch/s390x/kernel/traps.c	Wed Jan  8 20:04:44 2003
+++ b/arch/s390x/kernel/traps.c	Wed Jan  8 20:04:44 2003
@@ -65,50 +65,6 @@
 
 static int kstack_depth_to_print = 20;
 
-/*
- * If the address is either in the .text section of the
- * kernel, or in the vmalloc'ed module regions, it *may* 
- * be the address of a calling routine
- */
-extern char _stext, _etext;
-
-#ifdef CONFIG_MODULES
-
-/* FIXME: Accessed without a lock --RR */
-extern struct list_head modules;
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	int retval = 0;
-	struct module *mod;
-
-	if (addr >= (unsigned long) &_stext &&
-	    addr <= (unsigned long) &_etext)
-		return 1;
-
-	list_for_each_entry(mod, &modules, list) {
-		/* mod_bound tests for addr being inside the vmalloc'ed
-		 * module area. Of course it'd be better to test only
-		 * for the .text subset... */
-		if (mod_bound((void*)addr, 0, mod)) {
-			retval = 1;
-			break;
-		}
-	}
-
-	return retval;
-}
-
-#else
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	return (addr >= (unsigned long) &_stext &&
-		addr <= (unsigned long) &_etext);
-}
-
-#endif
-
 void show_trace(unsigned long * stack)
 {
 	unsigned long backchain, low_addr, high_addr, ret_addr;
diff -Nru a/arch/sh/Kconfig b/arch/sh/Kconfig
--- a/arch/sh/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/sh/Kconfig	Wed Jan  8 20:04:45 2003
@@ -745,48 +745,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
-
 menu "Old CD-ROM drivers (not SCSI, not IDE)"
 
 config CD_NO_IDESCSI
diff -Nru a/arch/sparc/Kconfig b/arch/sparc/Kconfig
--- a/arch/sparc/Kconfig	Wed Jan  8 20:04:31 2003
+++ b/arch/sparc/Kconfig	Wed Jan  8 20:04:31 2003
@@ -883,396 +883,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-config DUMMY
-	tristate "Dummy net driver support"
-	depends on NETDEVICES
-	---help---
-	  This is essentially a bit-bucket device (i.e. traffic you send to
-	  this device is consigned into oblivion) with a configurable IP
-	  address. It is most commonly used in order to make your currently
-	  inactive SLIP address seem like a real address for local programs.
-	  If you use SLIP or PPP, you might want to say Y here. Since this
-	  thing often comes in handy, the default is Y. It won't enlarge your
-	  kernel either. What a deal. Read about it in the Network
-	  Administrator's Guide, available from
-	  <http://www.linuxdoc.org/docs.html#guide>.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt>.  The module
-	  will be called dummy.o.  If you want to use more than one dummy
-	  device at a time, you need to compile this driver as a module.
-	  Instead of 'dummy', the devices will then be called 'dummy0',
-	  'dummy1' etc.
-
-config BONDING
-	tristate "Bonding driver support"
-	depends on NETDEVICES
-	---help---
-	  Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
-	  Channels together. This is called 'Etherchannel' by Cisco,
-	  'Trunking' by Sun, and 'Bonding' in Linux.
-
-	  If you have two Ethernet connections to some other computer, you can
-	  make them behave like one double speed connection using this driver.
-	  Naturally, this has to be supported at the other end as well, either
-	  with a similar Bonding Linux driver, a Cisco 5500 switch or a
-	  SunTrunking SunSoft driver.
-
-	  This is similar to the EQL driver, but it merges Ethernet segments
-	  instead of serial lines.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt>.  The module
-	  will be called bonding.o.
-
-config TUN
-	tristate "Universal TUN/TAP device driver support"
-	depends on NETDEVICES
-	---help---
-	  TUN/TAP provides packet reception and transmission for user space
-	  programs.  It can be viewed as a simple Point-to-Point or Ethernet
-	  device, which instead of receiving packets from a physical media,
-	  receives them from user space program and instead of sending packets
-	  via physical media writes them to the user space program.
-
-	  When a program opens /dev/net/tun, driver creates and registers
-	  corresponding net device tunX or tapX.  After a program closed above
-	  devices, driver will automatically delete tunXX or tapXX device and
-	  all routes corresponding to it.
-
-	  Please read <file:Documentation/networking/tuntap.txt> for more
-	  information.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called tun.o.  If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt>.
-
-	  If you don't know what to use this for, you don't need it.
-
-config ETHERTAP
-	tristate "Ethertap network tap (OBSOLETE)"
-	depends on NETDEVICES && EXPERIMENTAL && NETLINK
-	---help---
-	  If you say Y here (and have said Y to "Kernel/User network link
-	  driver", above) and create a character special file /dev/tap0 with
-	  major number 36 and minor number 16 using mknod ("man mknod"), you
-	  will be able to have a user space program read and write raw
-	  Ethernet frames from/to that special file.  tap0 can be configured
-	  with ifconfig and route like any other Ethernet device but it is not
-	  connected to any physical LAN; everything written by the user to
-	  /dev/tap0 is treated by the kernel as if it had come in from a LAN
-	  to the device tap0; everything the kernel wants to send out over the
-	  device tap0 can instead be read by the user from /dev/tap0: the user
-	  mode program replaces the LAN that would be attached to an ordinary
-	  Ethernet device. Please read the file
-	  <file:Documentation/networking/ethertap.txt> for more information.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called ethertap.o. If you want to compile it as a
-	  module, say M here and read <file:Documentation/modules.txt>.
-
-	  If you don't know what to use this for, you don't need it.
-
-config PPP
-	tristate "PPP (point-to-point protocol) support"
-	depends on NETDEVICES
-	---help---
-	  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
-	  the same purpose: sending Internet traffic over telephone (and other
-	  serial) lines.  Ask your access provider if they support it, because
-	  otherwise you can't use it; most Internet access providers these
-	  days support PPP rather than SLIP.
-
-	  To use PPP, you need an additional program called pppd as described
-	  in the PPP-HOWTO, available at
-	  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
-	  the version of pppd recommended in <file:Documentation/Changes>.
-	  The PPP option enlarges your kernel by about 16 KB.
-
-	  There are actually two versions of PPP: the traditional PPP for
-	  asynchronous lines, such as regular analog phone lines, and
-	  synchronous PPP which can be used over digital ISDN lines for
-	  example.  If you want to use PPP over phone lines or other
-	  asynchronous serial lines, you need to say Y (or M) here and also to
-	  the next option, "PPP support for async serial ports".  For PPP over
-	  synchronous lines, you should say Y (or M) here and to "Support
-	  synchronous PPP", below.
-
-	  This driver is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  If you said Y to "Version information on all symbols" above, then
-	  you cannot compile the PPP driver into the kernel; you can then only
-	  compile it as a module.  The module will be called ppp_generic.o.
-	  If you want to compile it as a module, say M here and read
-	  <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>.
-
-config PPP_ASYNC
-	tristate "PPP support for async serial ports"
-	depends on PPP
-	---help---
-	  Say Y (or M) here if you want to be able to use PPP over standard
-	  asynchronous serial ports, such as COM1 or COM2 on a PC.  If you use
-	  a modem (not a synchronous or ISDN modem) to contact your ISP, you
-	  need this option.
-
-	  This code is also available as a module (code which can be inserted
-	  into and removed from the running kernel).  If you want to compile
-	  it as a module, say M here and read <file:Documentation/modules.txt>.
-
-	  If unsure, say Y.
-
-config PPP_SYNC_TTY
-	tristate "PPP support for sync tty ports"
-	depends on PPP
-	help
-	  Say Y (or M) here if you want to be able to use PPP over synchronous
-	  (HDLC) tty devices, such as the SyncLink adapter. These devices
-	  are often used for high-speed leased lines like T1/E1.
-
-	  This code is also available as a module (code which can be inserted
-	  into and removed from the running kernel).  If you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-
-config PPP_DEFLATE
-	tristate "PPP Deflate compression"
-	depends on PPP
-	---help---
-	  Support for the Deflate compression method for PPP, which uses the
-	  Deflate algorithm (the same algorithm that gzip uses) to compress
-	  each PPP packet before it is sent over the wire.  The machine at the
-	  other end of the PPP link (usually your ISP) has to support the
-	  Deflate compression method as well for this to be useful.  Even if
-	  they don't support it, it is safe to say Y here.
-
-	  This code is also available as a module (code which can be inserted
-	  into and removed from the running kernel).  If you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-
-config PPP_BSDCOMP
-	tristate "PPP BSD-Compress compression"
-	depends on NETDEVICES && PPP!=n && m
-	---help---
-	  Support for the BSD-Compress compression method for PPP, which uses
-	  the LZW compression method to compress each PPP packet before it is
-	  sent over the wire. The machine at the other end of the PPP link
-	  (usually your ISP) has to support the BSD-Compress compression
-	  method as well for this to be useful. Even if they don't support it,
-	  it is safe to say Y here.
-
-	  The PPP Deflate compression method ("PPP Deflate compression",
-	  above) is preferable to BSD-Compress, because it compresses better
-	  and is patent-free.
-
-	  Note that the BSD compression code will always be compiled as a
-	  module; it is called bsd_comp.o and will show up in the directory
-	  modules once you have said "make modules". If unsure, say N.
-
-config SLIP
-	tristate "SLIP (serial line) support"
-	depends on NETDEVICES
-	---help---
-	  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
-	  connect to your Internet service provider or to connect to some
-	  other local Unix box or if you want to configure your Linux box as a
-	  Slip/CSlip server for other people to dial in. SLIP (Serial Line
-	  Internet Protocol) is a protocol used to send Internet traffic over
-	  serial connections such as telephone lines or null modem cables;
-	  nowadays, the protocol PPP is more commonly used for this same
-	  purpose.
-
-	  Normally, your access provider has to support SLIP in order for you
-	  to be able to use it, but there is now a SLIP emulator called SLiRP
-	  around (available from
-	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-	  allows you to use SLIP over a regular dial up shell connection. If
-	  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
-	  NET-3-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>, explains how to
-	  configure SLIP. Note that you don't need this option if you just
-	  want to run term (term is a program which gives you almost full
-	  Internet connectivity if you have a regular dial up shell account on
-	  some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
-	  support will enlarge your kernel by about 4 KB. If unsure, say N.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>. The module will be
-	  called slip.o.
-
-config SLIP_COMPRESSED
-	bool "CSLIP compressed headers"
-	depends on SLIP
-	---help---
-	  This protocol is faster than SLIP because it uses compression on the
-	  TCP/IP headers (not on the data itself), but it has to be supported
-	  on both ends. Ask your access provider if you are not sure and
-	  answer Y, just in case. You will still be able to use plain SLIP. If
-	  you plan to use SLiRP, the SLIP emulator (available from
-	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-	  allows you to use SLIP over a regular dial up shell connection, you
-	  definitely want to say Y here. The NET-3-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
-	  CSLIP. This won't enlarge your kernel.
-
-config SLIP_SMART
-	bool "Keepalive and linefill"
-	depends on SLIP
-	help
-	  Adds additional capabilities to the SLIP driver to support the
-	  RELCOM line fill and keepalive monitoring. Ideal on poor quality
-	  analogue lines.
-
-config SLIP_MODE_SLIP6
-	bool "Six bit SLIP encapsulation"
-	depends on SLIP
-	help
-	  Just occasionally you may need to run IP over hostile serial
-	  networks that don't pass all control characters or are only seven
-	  bit. Saying Y here adds an extra mode you can use with SLIP:
-	  "slip6". In this mode, SLIP will only send normal ASCII symbols over
-	  the serial device. Naturally, this has to be supported at the other
-	  end of the link as well. It's good enough, for example, to run IP
-	  over the async ports of a Camtec JNT Pad. If unsure, say N.
-
-config SUNLANCE
-	tristate "Sun LANCE support"
-	depends on NETDEVICES
-	help
-	  This driver supports the "le" interface present on all 32-bit Sparc
-	  systems, on some older Ultra systems and as an Sbus option.  These
-	  cards are based on the AMD Lance chipset, which is better known
-	  via the NE2100 cards.
-
-	  This support is also available as a module called sunlance.o ( =
-	  code which can be inserted in and removed from the running kernel
-	  whenever you want). If you want to compile it as a module, say M
-	  here and read <file:Documentation/modules.txt>.
-
-config HAPPYMEAL
-	tristate "Sun Happy Meal 10/100baseT support"
-	depends on NETDEVICES
-	help
-	  This driver supports the "hme" interface present on most Ultra
-	  systems and as an option on older Sbus systems. This driver supports
-	  both PCI and Sbus devices. This driver also supports the "qfe" quad
-	  100baseT device available in both PCI and Sbus configurations.
-
-	  This support is also available as a module called sunhme.o ( = code
-	  which can be inserted in and removed from the running kernel
-	  whenever you want). If you want to compile it as a module, say M
-	  here and read <file:Documentation/modules.txt>.
-
-config SUNBMAC
-	tristate "Sun BigMAC 10/100baseT support (EXPERIMENTAL)"
-	depends on NETDEVICES && EXPERIMENTAL
-	help
-	  This driver supports the "be" interface available as an Sbus option.
-	  This is Sun's older 100baseT Ethernet device.
-
-	  This support is also available as a module called sunbmac.o ( = code
-	  which can be inserted in and removed from the running kernel
-	  whenever you want). If you want to compile it as a module, say M
-	  here and read <file:Documentation/modules.txt>.
-
-config SUNQE
-	tristate "Sun QuadEthernet support"
-	depends on NETDEVICES
-	help
-	  This driver supports the "qe" 10baseT Ethernet device, available as
-	  an Sbus option. Note that this is not the same as Quad FastEthernet
-	  "qfe" which is supported by the Happy Meal driver instead.
-
-	  This support is also available as a module called sunqe.o ( = code
-	  which can be inserted in and removed from the running kernel
-	  whenever you want). If you want to compile it as a module, say M
-	  here and read <file:Documentation/modules.txt>.
-
-config MYRI_SBUS
-	tristate "MyriCOM Gigabit Ethernet support"
-	depends on NETDEVICES
-	help
-	  This driver supports MyriCOM Sbus gigabit Ethernet cards.
-
-	  If you want to compile this driver as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt>.  This is
-	  recommended.  The module will be called myri_sbus.o.
-
-config VORTEX
-	tristate "3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" support"
-	depends on NETDEVICES && PCI
-	---help---
-	  This option enables driver support for a large number of 10mbps and
-	  10/100mbps EISA, PCI and PCMCIA 3Com network cards:
-
-	  "Vortex"    (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
-	  "Boomerang" (EtherLink XL 3c900 or 3c905)            PCI
-	  "Cyclone"   (3c540/3c900/3c905/3c980/3c575/3c656)    PCI and Cardbus
-	  "Tornado"   (3c905)                                  PCI
-	  "Hurricane" (3c555/3cSOHO)                           PCI
-
-	  If you have such a card, say Y and read the Ethernet-HOWTO,
-	  available from <http://www.linuxdoc.org/docs.html#howto>. More
-	  specific information is in
-	  <file:Documentation/networking/vortex.txt> and in the comments at
-	  the beginning of <file:drivers/net/3c59x.c>.
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt> as well as
-	  <file:Documentation/networking/net-modules.txt>.
-
-#      bool '  FDDI driver support' CONFIG_FDDI
-#      if [ "$CONFIG_FDDI" = "y" ]; then
-#      fi
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 # This one must be before the filesystem configs. -DaveM
diff -Nru a/arch/sparc/Makefile b/arch/sparc/Makefile
--- a/arch/sparc/Makefile	Wed Jan  8 20:04:43 2003
+++ b/arch/sparc/Makefile	Wed Jan  8 20:04:43 2003
@@ -53,27 +53,26 @@
 LIBS_Y		:= $(patsubst %/, %/lib.a, $(libs-y))
 export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD
 
-image: vmlinux
-	$(MAKE) -C arch/sparc/boot image
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
+
+image tftpboot.img: vmlinux
+	$(call makeboot,arch/sparc/boot/$@)
 
 archclean:
-	rm -f $(TOPDIR)/vmlinux.aout
-	-$(MAKE) -C arch/sparc/boot clean
+	$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
 
 archmrproper:
-	rm -f $(TOPDIR)/include/asm-sparc/asm_offsets.h
 
 prepare: include/asm-$(ARCH)/asm_offsets.h
 
 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 				   include/config/MARKER
 
-include/asm-$(ARCH)/asm_offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
-	@$(generate-asm-offsets.h) < $< > $@
-
-include/asm-$(ARCH)/asm_offsets.h: include/asm-$(ARCH)/asm_offsets.h.tmp
+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 	@echo -n '  Generating $@'
+	@$(generate-asm-offsets.h) < $< > $@.tmp
 	@$(update-if-changed)
 
-tftpboot.img:
-	$(MAKE) -C arch/sparc/boot tftpboot.img
+CLEAN_FILES +=	include/asm-$(ARCH)/asm_offsets.h.tmp	\
+		include/asm-$(ARCH)/asm_offsets.h	\
+		arch/$(ARCH)/kernel/asm-offsets.s
diff -Nru a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
--- a/arch/sparc/boot/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc/boot/Makefile	Wed Jan  8 20:04:45 2003
@@ -4,38 +4,35 @@
 # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
 # Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
 
-ROOT_IMG	=/usr/src/root.img
-ELFTOAOUT	=elftoaout
+ROOT_IMG	:= /usr/src/root.img
+ELFTOAOUT	:= elftoaout
 
-all: btfix.o
+host-progs	:= piggyback btfixupprep
+EXTRA_TARGETS	:= tftpboot.img btfix.o btfix.s image
 
-tftpboot.img: piggyback
-	$(ELFTOAOUT) $(TOPDIR)/vmlinux -o tftpboot.img
-	./piggyback tftpboot.img $(TOPDIR)/System.map $(ROOT_IMG)
-
-piggyback: piggyback.c
-	$(HOSTCC) $(HOSTCFLAGS) -o piggyback piggyback.c
-
-btfixupprep: btfixupprep.c
-	$(HOSTCC) $(HOSTCFLAGS) -o btfixupprep btfixupprep.c
-
-clean:
-	rm -f btfixupprep piggyback tftpboot.img btfix.o btfix.s image
+quiet_cmd_elftoaout	= ELFTOAOUT $@
+      cmd_elftoaout	= $(ELFTOAOUT) $(obj)/image -o $@
+quiet_cmd_piggy		= PIGGY $@
+      cmd_piggy		= $(obj)/piggyback $@ $(obj)/System.map $(ROOT_IMG)
+quiet_cmd_btfix		= BTFIX $@
+      cmd_btfix		= $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
 
 BTOBJS := $(HEAD) $(INIT_Y)
 BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
+LDFLAGS_image := -T arch/sparc/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group
 
 # Actual linking
-image: btfix.o
-	$(LD) $(LDFLAGS) -T ../vmlinux.lds.s \
-		$(patsubst %,$(TOPDIR)/%,$(BTOBJS)) \
-		--start-group \
-		$(patsubst %,$(TOPDIR)/%,$(BTLIBS)) \
-		btfix.o \
-		--end-group -o image
-
-btfix.s: btfixupprep $(TOPDIR)/vmlinux
-	$(OBJDUMP) -x $(TOPDIR)/vmlinux | ./btfixupprep > btfix.s
-
-btfix.o: btfix.s
-	$(CC) -c -o btfix.o btfix.s
+$(obj)/image: $(obj)/btfix.o FORCE
+	$(call if_changed,ld)
+	$(NM) $@ | grep -v  '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(obj)/System.map
+
+$(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE
+	$(call if_changed,elftoaout)
+	$(call if_changed,piggy)
+
+$(obj)/btfix.s: $(obj)/btfixupprep vmlinux FORCE
+	$(call if_changed,btfix)
+
+archhelp:
+	@echo '* image		- kernel image ($(obj)/image)'
+	@echo '  tftpboot.img	- image prepared for tftp'
diff -Nru a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
--- a/arch/sparc/kernel/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc/kernel/Makefile	Wed Jan  8 20:04:45 2003
@@ -2,15 +2,13 @@
 # Makefile for the linux kernel.
 #
 
-SH = $(CONFIG_SHELL)
-
 EXTRA_TARGETS	:= head.o init_task.o
 
-EXTRA_AFLAGS := -ansi
+EXTRA_AFLAGS	:= -ansi
 
 export-objs := sparc_ksyms.o
 IRQ_OBJS := irq.o sun4m_irq.o sun4c_irq.o sun4d_irq.o
-obj-y    := entry.o wof.o wuf.o etrap.o rtrap.o traps.o ${IRQ_OBJS} \
+obj-y    := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
 	    process.o signal.o ioport.o setup.o idprom.o \
 	    sys_sparc.o sunos_asm.o systbls.o \
 	    time.o windows.o cpu.o devices.o sclow.o \
diff -Nru a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c
--- a/arch/sparc/kernel/module.c	Wed Jan  8 20:04:32 2003
+++ b/arch/sparc/kernel/module.c	Wed Jan  8 20:04:32 2003
@@ -37,9 +37,9 @@
 }
 
 /* We don't need anything special. */
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod)
 {
 	return 0;
diff -Nru a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
--- a/arch/sparc/kernel/sparc_ksyms.c	Wed Jan  8 20:04:43 2003
+++ b/arch/sparc/kernel/sparc_ksyms.c	Wed Jan  8 20:04:43 2003
@@ -103,7 +103,8 @@
 /* used by various drivers */
 EXPORT_SYMBOL(sparc_cpu_model);
 EXPORT_SYMBOL(kernel_thread);
-#ifdef SPIN_LOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
+#ifdef CONFIG_SMP
 EXPORT_SYMBOL(_do_spin_lock);
 EXPORT_SYMBOL(_do_spin_unlock);
 EXPORT_SYMBOL(_spin_trylock);
@@ -111,10 +112,12 @@
 EXPORT_SYMBOL(_do_read_unlock);
 EXPORT_SYMBOL(_do_write_lock);
 EXPORT_SYMBOL(_do_write_unlock);
+#endif
 #else
-EXPORT_SYMBOL_PRIVATE(_rw_read_enter);
-EXPORT_SYMBOL_PRIVATE(_rw_read_exit);
-EXPORT_SYMBOL_PRIVATE(_rw_write_enter);
+// XXX find what uses (or used) these.
+// EXPORT_SYMBOL_PRIVATE(_rw_read_enter);
+// EXPORT_SYMBOL_PRIVATE(_rw_read_exit);
+// EXPORT_SYMBOL_PRIVATE(_rw_write_enter);
 #endif
 /* semaphores */
 EXPORT_SYMBOL(__up);
diff -Nru a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
--- a/arch/sparc/kernel/sun4c_irq.c	Wed Jan  8 20:04:43 2003
+++ b/arch/sparc/kernel/sun4c_irq.c	Wed Jan  8 20:04:43 2003
@@ -34,6 +34,7 @@
 #include <asm/sun4paddr.h>
 #include <asm/idprom.h>
 #include <asm/machines.h>
+#include <asm/sbus.h>
 
 #if 0
 static struct resource sun4c_timer_eb = { "sun4c_timer" };
@@ -51,6 +52,17 @@
  */
 unsigned char *interrupt_enable = 0;
 
+static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 };
+
+unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
+{
+	if (sbint >= sizeof(sun4c_pil_map)) {
+		printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
+		BUG();
+	}
+	return sun4c_pil_map[sbint];
+}
+
 static void sun4c_disable_irq(unsigned int irq_nr)
 {
 	unsigned long flags;
@@ -213,6 +225,7 @@
 		    int_regs[0].reg_size, "sun4c_intr");
 	}
 
+	BTFIXUPSET_CALL(sbint_to_irq, sun4c_sbint_to_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(enable_irq, sun4c_enable_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(disable_irq, sun4c_disable_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(enable_pil_irq, sun4c_enable_irq, BTFIXUPCALL_NORM);
diff -Nru a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
--- a/arch/sparc/kernel/sun4d_irq.c	Wed Jan  8 20:04:31 2003
+++ b/arch/sparc/kernel/sun4d_irq.c	Wed Jan  8 20:04:31 2003
@@ -252,6 +252,15 @@
 		return irq;
 }
 
+unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
+{
+	if (sbint >= sizeof(sbus_to_pil)) {
+		printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
+		BUG();
+	}
+	return sun4d_build_irq(sdev, sbus_to_pil[sbint]);
+}
+
 int sun4d_request_irq(unsigned int irq,
 		void (*handler)(int, void *, struct pt_regs *),
 		unsigned long irqflags, const char * devname, void *dev_id)
@@ -541,6 +550,7 @@
 {
 	local_irq_disable();
 
+	BTFIXUPSET_CALL(sbint_to_irq, sun4d_sbint_to_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(enable_irq, sun4d_enable_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(disable_irq, sun4d_disable_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM);
diff -Nru a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
--- a/arch/sparc/kernel/sun4m_irq.c	Wed Jan  8 20:04:44 2003
+++ b/arch/sparc/kernel/sun4m_irq.c	Wed Jan  8 20:04:44 2003
@@ -36,6 +36,7 @@
 #include <asm/smp.h>
 #include <asm/irq.h>
 #include <asm/io.h>
+#include <asm/sbus.h>
 
 static unsigned long dummy;
 
@@ -77,6 +78,17 @@
 	SUN4M_INT_SBUS(6)				  /* 14 irq 13 */
 };
 
+static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 };
+
+unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) 
+{
+	if (sbint >= sizeof(sun4m_pil_map)) {
+		printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
+		BUG();
+	}
+	return sun4m_pil_map[sbint] | 0x30;
+}
+
 inline unsigned long sun4m_get_irqmask(unsigned int irq)
 {
 	unsigned long mask;
@@ -366,6 +378,7 @@
 				&sun4m_interrupts->undirected_target;
 		sun4m_interrupts->undirected_target = 0;
 	}
+	BTFIXUPSET_CALL(sbint_to_irq, sun4m_sbint_to_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(enable_irq, sun4m_enable_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(disable_irq, sun4m_disable_irq, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(enable_pil_irq, sun4m_enable_pil_irq, BTFIXUPCALL_NORM);
diff -Nru a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
--- a/arch/sparc64/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc64/Kconfig	Wed Jan  8 20:04:45 2003
@@ -986,7 +986,7 @@
 	optional
 	depends on SCSI && PCI
 
-source "drivers/scsi/aic7xxx/Kconfig"
+source "drivers/scsi/aic7xxx/Kconfig.aic7xxx"
 
 config SCSI_AIC7XXX_OLD
 	tristate "Old driver"
@@ -1403,47 +1403,6 @@
 source "drivers/ieee1394/Kconfig"
 
 source "net/Kconfig"
-
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
 
 source "net/ax25/Kconfig"
 
diff -Nru a/arch/sparc64/Makefile b/arch/sparc64/Makefile
--- a/arch/sparc64/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc64/Makefile	Wed Jan  8 20:04:45 2003
@@ -74,8 +74,13 @@
 tftpboot.img vmlinux.aout:
 	$(Q)$(MAKE) $(build)=arch/sparc64/boot arch/sparc64/boot/$@
 
+archclean:
+
+archmrproper:
+
 define archhelp
   echo  '* vmlinux       - Standard sparc64 kernel'
   echo  '  vmlinux.aout  - a.out kernel for sparc64'
   echo  '  tftpboot.img  - Image prepared for tftp'
 endef
+
diff -Nru a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c
--- a/arch/sparc64/kernel/ioctl32.c	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc64/kernel/ioctl32.c	Wed Jan  8 20:04:45 2003
@@ -450,13 +450,13 @@
                 struct  ifmap32 ifru_map;
                 char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
 		char	ifru_newname[IFNAMSIZ];
-                __kernel_caddr_t32 ifru_data;
+                compat_caddr_t ifru_data;
         } ifr_ifru;
 };
 
 struct ifconf32 {
         int     ifc_len;                        /* size of buffer       */
-        __kernel_caddr_t32  ifcbuf;
+        compat_caddr_t  ifcbuf;
 };
 
 #ifdef CONFIG_NET
@@ -1009,7 +1009,7 @@
 
 struct fb_fix_screeninfo32 {
 	char			id[16];
-        __kernel_caddr_t32	smem_start;
+        compat_caddr_t	smem_start;
 	__u32			smem_len;
 	__u32			type;
 	__u32			type_aux;
@@ -1018,7 +1018,7 @@
 	__u16			ypanstep;
 	__u16			ywrapstep;
 	__u32			line_length;
-        __kernel_caddr_t32	mmio_start;
+        compat_caddr_t	mmio_start;
 	__u32			mmio_len;
 	__u32			accel;
 	__u16			reserved[3];
@@ -1027,10 +1027,10 @@
 struct fb_cmap32 {
 	__u32			start;
 	__u32			len;
-	__kernel_caddr_t32	red;
-	__kernel_caddr_t32	green;
-	__kernel_caddr_t32	blue;
-	__kernel_caddr_t32	transp;
+	compat_caddr_t	red;
+	compat_caddr_t	green;
+	compat_caddr_t	blue;
+	compat_caddr_t	transp;
 };
 
 static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -1169,7 +1169,7 @@
 	unsigned char	rate;
 	unsigned char	spec1;
 	unsigned char	fmt_gap;
-	const __kernel_caddr_t32 name;
+	const compat_caddr_t name;
 };
 
 struct floppy_drive_params32 {
@@ -1208,7 +1208,7 @@
 	int		fd_ref;
 	int		fd_device;
 	int		last_checked;
-	__kernel_caddr_t32 dmabuf;
+	compat_caddr_t dmabuf;
 	int		bufblocks;
 };
 
@@ -1732,7 +1732,7 @@
 }
 
 struct ppp_option_data32 {
-	__kernel_caddr_t32	ptr;
+	compat_caddr_t	ptr;
 	__u32			length;
 	int			transmit;
 };
@@ -1813,8 +1813,8 @@
 	__u32	mt_dsreg;
 	__u32	mt_gstat;
 	__u32	mt_erreg;
-	__kernel_daddr_t32	mt_fileno;
-	__kernel_daddr_t32	mt_blkno;
+	compat_daddr_t	mt_fileno;
+	compat_daddr_t	mt_blkno;
 };
 #define MTIOCGET32	_IOR('m', 2, struct mtget32)
 
@@ -1932,7 +1932,7 @@
 
 struct cdrom_read32 {
 	int			cdread_lba;
-	__kernel_caddr_t32	cdread_bufaddr;
+	compat_caddr_t	cdread_bufaddr;
 	int			cdread_buflen;
 };
 
@@ -1940,16 +1940,16 @@
 	union cdrom_addr	addr;
 	u_char			addr_format;
 	int			nframes;
-	__kernel_caddr_t32	buf;
+	compat_caddr_t	buf;
 };
 
 struct cdrom_generic_command32 {
 	unsigned char		cmd[CDROM_PACKET_SIZE];
-	__kernel_caddr_t32	buffer;
+	compat_caddr_t	buffer;
 	unsigned int		buflen;
 	int			stat;
-	__kernel_caddr_t32	sense;
-	__kernel_caddr_t32	reserved[3];
+	compat_caddr_t	sense;
+	compat_caddr_t	reserved[3];
 };
 
 static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -1958,7 +1958,7 @@
 	struct cdrom_read cdread;
 	struct cdrom_read_audio cdreadaudio;
 	struct cdrom_generic_command cgc;
-	__kernel_caddr_t32 addr;
+	compat_caddr_t addr;
 	char *data = 0;
 	void *karg;
 	int err = 0;
@@ -2041,9 +2041,9 @@
 
 struct loop_info32 {
 	int			lo_number;      /* ioctl r/o */
-	__kernel_dev_t32	lo_device;      /* ioctl r/o */
+	compat_dev_t	lo_device;      /* ioctl r/o */
 	unsigned int		lo_inode;       /* ioctl r/o */
-	__kernel_dev_t32	lo_rdevice;     /* ioctl r/o */
+	compat_dev_t	lo_rdevice;     /* ioctl r/o */
 	int			lo_offset;
 	int			lo_encrypt_type;
 	int			lo_encrypt_key_size;    /* ioctl w/o */
@@ -2248,7 +2248,7 @@
 	set_fs(old_fs);
 
 	if (err >= 0)
-		err = put_user(kuid, (__kernel_uid_t32 *)arg);
+		err = put_user(kuid, (compat_uid_t *)arg);
 
 	return err;
 }
@@ -2256,7 +2256,7 @@
 struct ncp_ioctl_request_32 {
 	unsigned int function;
 	unsigned int size;
-	__kernel_caddr_t32 data;
+	compat_caddr_t data;
 };
 
 struct ncp_fs_info_v2_32 {
@@ -2277,13 +2277,13 @@
 {
 	int		auth_type;
 	unsigned int	object_name_len;
-	__kernel_caddr_t32	object_name;	/* an userspace data, in most cases user name */
+	compat_caddr_t	object_name;	/* an userspace data, in most cases user name */
 };
 
 struct ncp_privatedata_ioctl_32
 {
 	unsigned int	len;
-	__kernel_caddr_t32	data;		/* ~1000 for NDS */
+	compat_caddr_t	data;		/* ~1000 for NDS */
 };
 
 #define	NCP_IOC_NCPREQUEST_32		_IOR('n', 1, struct ncp_ioctl_request_32)
@@ -2557,12 +2557,12 @@
 struct atmif_sioc32 {
         int                number;
         int                length;
-        __kernel_caddr_t32 arg;
+        compat_caddr_t arg;
 };
 
 struct atm_iobuf32 {
 	int                length;
-	__kernel_caddr_t32 buffer;
+	compat_caddr_t buffer;
 };
 
 #define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32)
@@ -2623,7 +2623,7 @@
 
 	iobuf.length = iobuf32.length;
 
-	if (iobuf32.buffer == (__kernel_caddr_t32) NULL || iobuf32.length == 0) {
+	if (iobuf32.buffer == (compat_caddr_t) NULL || iobuf32.length == 0) {
 		iobuf.buffer = (void*)(unsigned long)iobuf32.buffer;
 	} else {
 		iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL);
@@ -2677,7 +2677,7 @@
         sioc.number = sioc32.number;
         sioc.length = sioc32.length;
         
-	if (sioc32.arg == (__kernel_caddr_t32) NULL || sioc32.length == 0) {
+	if (sioc32.arg == (compat_caddr_t) NULL || sioc32.length == 0) {
 		sioc.arg = (void*)(unsigned long)sioc32.arg;
         } else {
                 sioc.arg = kmalloc(sioc.length, GFP_KERNEL);
@@ -2835,7 +2835,7 @@
 } lv_status_byindex_req32_t;
 
 typedef struct {
-	__kernel_dev_t32 dev;
+	compat_dev_t dev;
 	u32   lv;
 } lv_status_bydev_req32_t;
 
@@ -5128,7 +5128,7 @@
 HANDLE_IOCTL(VIDIOCGFREQ32, do_video_ioctl)
 HANDLE_IOCTL(VIDIOCSFREQ32, do_video_ioctl)
 /* One SMB ioctl needs translations. */
-#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, __kernel_uid_t32)
+#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t)
 HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid)
 /* NCPFS */
 HANDLE_IOCTL(NCP_IOC_NCPREQUEST_32, do_ncp_ncprequest)
diff -Nru a/arch/sparc64/kernel/module.c b/arch/sparc64/kernel/module.c
--- a/arch/sparc64/kernel/module.c	Wed Jan  8 20:04:44 2003
+++ b/arch/sparc64/kernel/module.c	Wed Jan  8 20:04:44 2003
@@ -144,9 +144,9 @@
 }
 
 /* We don't need anything special. */
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod)
 {
 	return 0;
diff -Nru a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c
--- a/arch/sparc64/kernel/sunos_ioctl32.c	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc64/kernel/sunos_ioctl32.c	Wed Jan  8 20:04:45 2003
@@ -22,6 +22,7 @@
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/compat.h>
 #include <asm/kbio.h>
 
 /* Use this to get at 32-bit user passed pointers. */
@@ -80,13 +81,13 @@
                 int     ifru_mtu;
                 struct  ifmap32 ifru_map;
                 char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
-                __kernel_caddr_t32 ifru_data;
+                compat_caddr_t ifru_data;
         } ifr_ifru;
 };
 
 struct ifconf32 {
         int     ifc_len;                        /* size of buffer       */
-        __kernel_caddr_t32  ifcbuf;
+        compat_caddr_t  ifcbuf;
 };
 
 extern asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
--- a/arch/sparc64/kernel/sys_sparc32.c	Wed Jan  8 20:04:44 2003
+++ b/arch/sparc64/kernel/sys_sparc32.c	Wed Jan  8 20:04:44 2003
@@ -53,6 +53,7 @@
 #include <linux/security.h>
 #include <linux/compat.h>
 #include <linux/vfs.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
 
 #include <asm/types.h>
 #include <asm/ipc.h>
@@ -290,11 +291,11 @@
 struct ipc_perm32
 {
 	key_t    	  key;
-        __kernel_uid_t32  uid;
-        __kernel_gid_t32  gid;
-        __kernel_uid_t32  cuid;
-        __kernel_gid_t32  cgid;
-        __kernel_mode_t32 mode;
+        compat_uid_t  uid;
+        compat_gid_t  gid;
+        compat_uid_t  cuid;
+        compat_gid_t  cgid;
+        compat_mode_t mode;
         unsigned short  seq;
 };
 
@@ -333,8 +334,8 @@
         unsigned short msg_cbytes;
         unsigned short msg_qnum;  
         unsigned short msg_qbytes;
-        __kernel_ipc_pid_t32 msg_lspid;
-        __kernel_ipc_pid_t32 msg_lrpid;
+        compat_ipc_pid_t msg_lspid;
+        compat_ipc_pid_t msg_lrpid;
 };
 
 struct msqid64_ds32 {
@@ -348,8 +349,8 @@
 	unsigned int  msg_cbytes;
 	unsigned int  msg_qnum;
 	unsigned int  msg_qbytes;
-	__kernel_pid_t32 msg_lspid;
-	__kernel_pid_t32 msg_lrpid;
+	compat_pid_t msg_lspid;
+	compat_pid_t msg_lrpid;
 	unsigned int  __unused1;
 	unsigned int  __unused2;
 };
@@ -361,8 +362,8 @@
 	compat_time_t         shm_atime;
 	compat_time_t         shm_dtime;
 	compat_time_t         shm_ctime;
-	__kernel_ipc_pid_t32    shm_cpid; 
-	__kernel_ipc_pid_t32    shm_lpid; 
+	compat_ipc_pid_t    shm_cpid; 
+	compat_ipc_pid_t    shm_lpid; 
 	unsigned short          shm_nattch;
 };
 
@@ -375,8 +376,8 @@
 	unsigned int		__pad3;
 	compat_time_t  	shm_ctime;
 	compat_size_t	shm_segsz;
-	__kernel_pid_t32	shm_cpid;
-	__kernel_pid_t32	shm_lpid;
+	compat_pid_t	shm_cpid;
+	compat_pid_t	shm_lpid;
 	unsigned int		shm_nattch;
 	unsigned int		__unused1;
 	unsigned int		__unused2;
@@ -804,30 +805,6 @@
 	return err;
 }
 
-static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = get_user(kfl->l_type, &ufl->l_type);
-	err |= __get_user(kfl->l_whence, &ufl->l_whence);
-	err |= __get_user(kfl->l_start, &ufl->l_start);
-	err |= __get_user(kfl->l_len, &ufl->l_len);
-	err |= __get_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
-static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = __put_user(kfl->l_type, &ufl->l_type);
-	err |= __put_user(kfl->l_whence, &ufl->l_whence);
-	err |= __put_user(kfl->l_start, &ufl->l_start);
-	err |= __put_user(kfl->l_len, &ufl->l_len);
-	err |= __put_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
 extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
 
 asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -841,13 +818,13 @@
 			mm_segment_t old_fs;
 			long ret;
 			
-			if (get_flock(&f, (struct flock32 *)arg))
+			if (get_compat_flock(&f, (struct compat_flock *)arg))
 				return -EFAULT;
 			old_fs = get_fs(); set_fs (KERNEL_DS);
 			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
 			set_fs (old_fs);
 			if (ret) return ret;
-			if (put_flock(&f, (struct flock32 *)arg))
+			if (put_compat_flock(&f, (struct compat_flock *)arg))
 				return -EFAULT;
 			return 0;
 		}
@@ -1402,6 +1379,9 @@
 {
 	int err;
 
+	if (stat->size > MAX_NON_LFS)
+		return -EOVERFLOW;
+
 	err  = put_user(stat->dev, &statbuf->st_dev);
 	err |= put_user(stat->ino, &statbuf->st_ino);
 	err |= put_user(stat->mode, &statbuf->st_mode);
@@ -1409,8 +1389,6 @@
 	err |= put_user(high2lowuid(stat->uid), &statbuf->st_uid);
 	err |= put_user(high2lowgid(stat->gid), &statbuf->st_gid);
 	err |= put_user(stat->rdev, &statbuf->st_rdev);
-	if (stat->size > MAX_NON_LFS)
-		return -EOVERFLOW;
 	err |= put_user(stat->size, &statbuf->st_size);
 	err |= put_user(stat->atime.tv_sec, &statbuf->st_atime);
 	err |= put_user(0, &statbuf->__unused1);
@@ -1436,16 +1414,16 @@
 struct ncp_mount_data32_v3 {
         int version;
         unsigned int ncp_fd;
-        __kernel_uid_t32 mounted_uid;
-        __kernel_pid_t32 wdog_pid;
+        compat_uid_t mounted_uid;
+        compat_pid_t wdog_pid;
         unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
         unsigned int time_out;
         unsigned int retry_count;
         unsigned int flags;
-        __kernel_uid_t32 uid;
-        __kernel_gid_t32 gid;
-        __kernel_mode_t32 file_mode;
-        __kernel_mode_t32 dir_mode;
+        compat_uid_t uid;
+        compat_gid_t gid;
+        compat_mode_t file_mode;
+        compat_mode_t dir_mode;
 };
 
 struct ncp_mount_data32_v4 {
@@ -1516,11 +1494,11 @@
 
 struct smb_mount_data32 {
         int version;
-        __kernel_uid_t32 mounted_uid;
-        __kernel_uid_t32 uid;
-        __kernel_gid_t32 gid;
-        __kernel_mode_t32 file_mode;
-        __kernel_mode_t32 dir_mode;
+        compat_uid_t mounted_uid;
+        compat_uid_t uid;
+        compat_gid_t gid;
+        compat_mode_t file_mode;
+        compat_mode_t dir_mode;
 };
 
 static void *do_smb_super_data_conv(void *raw_data)
@@ -1680,7 +1658,7 @@
 	return err;
 }
 
-asmlinkage int sys32_wait4(__kernel_pid_t32 pid, unsigned int *stat_addr, int options, struct rusage32 *ru)
+asmlinkage int sys32_wait4(compat_pid_t pid, unsigned int *stat_addr, int options, struct rusage32 *ru)
 {
 	if (!ru)
 		return sys_wait4(pid, stat_addr, options, NULL);
@@ -1742,7 +1720,7 @@
 
 extern asmlinkage int sys_sched_rr_get_interval(pid_t pid, struct timespec *interval);
 
-asmlinkage int sys32_sched_rr_get_interval(__kernel_pid_t32 pid, struct compat_timespec *interval)
+asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec *interval)
 {
 	struct timespec t;
 	int ret;
@@ -2550,6 +2528,78 @@
 extern asmlinkage int sys_setsockopt(int fd, int level, int optname,
 				     char *optval, int optlen);
 
+static int do_netfilter_replace(int fd, int level, int optname,
+				char *optval, int optlen)
+{
+	struct ipt_replace32 {
+		char name[IPT_TABLE_MAXNAMELEN];
+		__u32 valid_hooks;
+		__u32 num_entries;
+		__u32 size;
+		__u32 hook_entry[NF_IP_NUMHOOKS];
+		__u32 underflow[NF_IP_NUMHOOKS];
+		__u32 num_counters;
+		__u32 counters;
+		struct ipt_entry entries[0];
+	} *repl32 = (struct ipt_replace32 *)optval;
+	struct ipt_replace *krepl;
+	struct ipt_counters *counters32;
+	__u32 origsize;
+	unsigned int kreplsize, kcountersize;
+	mm_segment_t old_fs;
+	int ret;
+
+	if (optlen < sizeof(repl32))
+		return -EINVAL;
+
+	if (copy_from_user(&origsize,
+			&repl32->size,
+			sizeof(origsize)))
+		return -EFAULT;
+
+	kreplsize = sizeof(*krepl) + origsize;
+	kcountersize = krepl->num_counters * sizeof(struct ipt_counters);
+
+	/* Hack: Causes ipchains to give correct error msg --RR */
+	if (optlen != kreplsize)
+		return -ENOPROTOOPT;
+
+	krepl = (struct ipt_replace *)kmalloc(kreplsize, GFP_KERNEL);
+	if (krepl == NULL)
+		return -ENOMEM;
+
+	if (copy_from_user(krepl, optval, kreplsize)) {
+		kfree(krepl);
+		return -EFAULT;
+	}
+
+	counters32 = (struct ipt_counters *)AA(
+		((struct ipt_replace32 *)krepl)->counters);
+
+	kcountersize = krepl->num_counters * sizeof(struct ipt_counters);
+	krepl->counters = (struct ipt_counters *)kmalloc(
+					kcountersize, GFP_KERNEL);
+	if (krepl->counters == NULL) {
+		kfree(krepl);
+		return -ENOMEM;
+	}
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_setsockopt(fd, level, optname,
+			     (char *)krepl, kreplsize);
+	set_fs(old_fs);
+
+	if (ret == 0 &&
+		copy_to_user(counters32, krepl->counters, kcountersize))
+			ret = -EFAULT;
+
+	kfree(krepl->counters);
+	kfree(krepl);
+
+	return ret;
+}
+
 static int do_set_attach_filter(int fd, int level, int optname,
 				char *optval, int optlen)
 {
@@ -2643,6 +2693,9 @@
 asmlinkage int sys32_setsockopt(int fd, int level, int optname,
 				char *optval, int optlen)
 {
+	if (optname == IPT_SO_SET_REPLACE)
+		return do_netfilter_replace(fd, level, optname,
+					    optval, optlen);
 	if (optname == SO_ATTACH_FILTER)
 		return do_set_attach_filter(fd, level, optname,
 					    optval, optlen);
@@ -3051,27 +3104,27 @@
 struct nfsctl_export32 {
 	s8			ex32_client[NFSCLNT_IDMAX+1];
 	s8			ex32_path[NFS_MAXPATHLEN+1];
-	__kernel_dev_t32	ex32_dev;
-	__kernel_ino_t32	ex32_ino;
+	compat_dev_t	ex32_dev;
+	compat_ino_t	ex32_ino;
 	s32			ex32_flags;
-	__kernel_uid_t32	ex32_anon_uid;
-	__kernel_gid_t32	ex32_anon_gid;
+	compat_uid_t	ex32_anon_uid;
+	compat_gid_t	ex32_anon_gid;
 };
 
 struct nfsctl_uidmap32 {
 	u32			ug32_ident;   /* char * */
-	__kernel_uid_t32	ug32_uidbase;
+	compat_uid_t	ug32_uidbase;
 	s32			ug32_uidlen;
 	u32			ug32_udimap;  /* uid_t * */
-	__kernel_uid_t32	ug32_gidbase;
+	compat_uid_t	ug32_gidbase;
 	s32			ug32_gidlen;
 	u32			ug32_gdimap;  /* gid_t * */
 };
 
 struct nfsctl_fhparm32 {
 	struct sockaddr		gf32_addr;
-	__kernel_dev_t32	gf32_dev;
-	__kernel_ino_t32	gf32_ino;
+	compat_dev_t	gf32_dev;
+	compat_ino_t	gf32_ino;
 	s32			gf32_version;
 };
 
@@ -3200,7 +3253,7 @@
 		return -ENOMEM;
 	for(i = 0; i < karg->ca_umap.ug_uidlen; i++)
 		err |= __get_user(karg->ca_umap.ug_udimap[i],
-			      &(((__kernel_uid_t32 *)A(uaddr))[i]));
+			      &(((compat_uid_t *)A(uaddr))[i]));
 	err |= __get_user(karg->ca_umap.ug_gidbase,
 		      &arg32->ca32_umap.ug32_gidbase);
 	err |= __get_user(karg->ca_umap.ug_uidlen,
@@ -3214,7 +3267,7 @@
 		return -ENOMEM;
 	for(i = 0; i < karg->ca_umap.ug_gidlen; i++)
 		err |= __get_user(karg->ca_umap.ug_gdimap[i],
-			      &(((__kernel_gid_t32 *)A(uaddr))[i]));
+			      &(((compat_gid_t *)A(uaddr))[i]));
 
 	return (err ? -EFAULT : 0);
 }
@@ -3506,7 +3559,7 @@
 
 extern asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
 
-asmlinkage int sys32_sendfile(int out_fd, int in_fd, __kernel_off_t32 *offset, s32 count)
+asmlinkage int sys32_sendfile(int out_fd, int in_fd, compat_off_t *offset, s32 count)
 {
 	mm_segment_t old_fs = get_fs();
 	int ret;
@@ -3527,7 +3580,7 @@
 
 extern asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count);
 
-asmlinkage int sys32_sendfile64(int out_fd, int in_fd, __kernel_loff_t32 *offset, s32 count)
+asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t *offset, s32 count)
 {
 	mm_segment_t old_fs = get_fs();
 	int ret;
@@ -3761,7 +3814,7 @@
 extern asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len,
 					    unsigned long *user_mask_ptr);
 
-asmlinkage int sys32_sched_setaffinity(__kernel_pid_t32 pid, unsigned int len,
+asmlinkage int sys32_sched_setaffinity(compat_pid_t pid, unsigned int len,
 				       u32 *user_mask_ptr)
 {
 	unsigned long kernel_mask;
@@ -3785,7 +3838,7 @@
 extern asmlinkage int sys_sched_getaffinity(pid_t pid, unsigned int len,
 					    unsigned long *user_mask_ptr);
 
-asmlinkage int sys32_sched_getaffinity(__kernel_pid_t32 pid, unsigned int len,
+asmlinkage int sys32_sched_getaffinity(compat_pid_t pid, unsigned int len,
 				       u32 *user_mask_ptr)
 {
 	unsigned long kernel_mask;
diff -Nru a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
--- a/arch/sparc64/kernel/sys_sunos32.c	Wed Jan  8 20:04:44 2003
+++ b/arch/sparc64/kernel/sys_sunos32.c	Wed Jan  8 20:04:44 2003
@@ -798,14 +798,14 @@
 }
 
 /* So stupid... */
-extern asmlinkage int sys32_wait4(__kernel_pid_t32 pid,
+extern asmlinkage int sys32_wait4(compat_pid_t pid,
 				  u32 stat_addr, int options, u32 ru);
 
-asmlinkage int sunos_wait4(__kernel_pid_t32 pid, u32 stat_addr, int options, u32 ru)
+asmlinkage int sunos_wait4(compat_pid_t pid, u32 stat_addr, int options, u32 ru)
 {
 	int ret;
 
-	ret = sys32_wait4((pid ? pid : ((__kernel_pid_t32)-1)),
+	ret = sys32_wait4((pid ? pid : ((compat_pid_t)-1)),
 			  stat_addr, options, ru);
 	return ret;
 }
@@ -931,11 +931,11 @@
 struct ipc_perm32
 {
 	key_t    	  key;
-        __kernel_uid_t32  uid;
-        __kernel_gid_t32  gid;
-        __kernel_uid_t32  cuid;
-        __kernel_gid_t32  cgid;
-        __kernel_mode_t32 mode;
+        compat_uid_t  uid;
+        compat_gid_t  gid;
+        compat_uid_t  cuid;
+        compat_gid_t  cgid;
+        compat_mode_t mode;
         unsigned short  seq;
 };
 
@@ -952,8 +952,8 @@
         unsigned short msg_cbytes;
         unsigned short msg_qnum;  
         unsigned short msg_qbytes;
-        __kernel_ipc_pid_t32 msg_lspid;
-        __kernel_ipc_pid_t32 msg_lrpid;
+        compat_ipc_pid_t msg_lspid;
+        compat_ipc_pid_t msg_lrpid;
 };
 
 static inline int sunos_msqid_get(struct msqid_ds32 *user,
@@ -1084,8 +1084,8 @@
         compat_time_t         shm_atime;
         compat_time_t         shm_dtime;
         compat_time_t         shm_ctime;
-        __kernel_ipc_pid_t32    shm_cpid; 
-        __kernel_ipc_pid_t32    shm_lpid; 
+        compat_ipc_pid_t    shm_cpid; 
+        compat_ipc_pid_t    shm_lpid; 
         unsigned short          shm_nattch;
 };
                                                         
diff -Nru a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
--- a/arch/sparc64/kernel/traps.c	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc64/kernel/traps.c	Wed Jan  8 20:04:45 2003
@@ -149,10 +149,10 @@
 
 	if (regs->tstate & TSTATE_PRIV) {
 		/* Test if this comes from uaccess places. */
-		unsigned long fixup, g2;
+		unsigned long fixup;
+		unsigned long g2 = regs->u_regs[UREG_G2];
 
-		g2 = regs->u_regs[UREG_G2];
-		if ((fixup = search_exception_table (regs->tpc, &g2))) {
+		if ((fixup = search_extables_range(regs->tpc, &g2))) {
 			/* Ouch, somebody is trying ugly VM hole tricks on us... */
 #ifdef DEBUG_EXCEPTIONS
 			printk("Exception: PC<%016lx> faddr<UNKNOWN>\n", regs->tpc);
@@ -1370,7 +1370,7 @@
 			recoverable = 1;
 		} else {
 			unsigned long g2 = regs->u_regs[UREG_G2];
-			unsigned long fixup = search_exception_table(regs->tpc, &g2);
+			unsigned long fixup = search_extables_range(regs->tpc, &g2);
 
 			if (fixup != 0UL) {
 				/* OK, kernel access to userspace. */
@@ -1390,7 +1390,7 @@
 				/* Only perform fixup if we still have a
 				 * recoverable condition.
 				 */
-				if (fixup != 0UL && recoverable) {
+				if (recoverable) {
 					regs->tpc = fixup;
 					regs->tnpc = regs->tpc + 4;
 					regs->u_regs[UREG_G2] = g2;
diff -Nru a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
--- a/arch/sparc64/kernel/unaligned.c	Wed Jan  8 20:04:43 2003
+++ b/arch/sparc64/kernel/unaligned.c	Wed Jan  8 20:04:43 2003
@@ -10,6 +10,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 #include <asm/asi.h>
 #include <asm/ptrace.h>
 #include <asm/pstate.h>
@@ -360,7 +361,7 @@
 void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
 {
 	unsigned long g2 = regs->u_regs [UREG_G2];
-	unsigned long fixup = search_exception_table (regs->tpc, &g2);
+	unsigned long fixup = search_extables_range(regs->tpc, &g2);
 
 	if (!fixup) {
 		unsigned long address = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f));
diff -Nru a/arch/sparc64/mm/extable.c b/arch/sparc64/mm/extable.c
--- a/arch/sparc64/mm/extable.c	Wed Jan  8 20:04:43 2003
+++ b/arch/sparc64/mm/extable.c	Wed Jan  8 20:04:43 2003
@@ -9,10 +9,11 @@
 extern const struct exception_table_entry __start___ex_table[];
 extern const struct exception_table_entry __stop___ex_table[];
 
-static unsigned long
-search_one_table(const struct exception_table_entry *start,
-		 const struct exception_table_entry *end,
-		 unsigned long value, unsigned long *g2)
+/* Caller knows they are in a range if ret->fixup == 0 */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *start,
+	       const struct exception_table_entry *last,
+	       unsigned long value)
 {
 	const struct exception_table_entry *walk;
 
@@ -30,7 +31,7 @@
 	 */
 
 	/* 1. Try to find an exact match. */
-	for (walk = start; walk <= end; walk++) {
+	for (walk = start; walk <= last; walk++) {
 		if (walk->fixup == 0) {
 			/* A range entry, skip both parts. */
 			walk++;
@@ -38,55 +39,37 @@
 		}
 
 		if (walk->insn == value)
-			return walk->fixup;
+			return walk;
 	}
 
 	/* 2. Try to find a range match. */
-	for (walk = start; walk <= (end - 1); walk++) {
+	for (walk = start; walk <= (last - 1); walk++) {
 		if (walk->fixup)
 			continue;
 
-		if (walk[0].insn <= value &&
-		    walk[1].insn > value) {
-			*g2 = (value - walk[0].insn) / 4;
-			return walk[1].fixup;
-		}
+		if (walk[0].insn <= value && walk[1].insn > value)
+			return walk;
+
 		walk++;
 	}
 
-        return 0;
+        return NULL;
 }
 
-extern spinlock_t modlist_lock;
-
-unsigned long
-search_exception_table(unsigned long addr, unsigned long *g2)
+/* Special extable search, which handles ranges.  Returns fixup */
+unsigned long search_extables_range(unsigned long addr, unsigned long *g2)
 {
-	unsigned long ret = 0;
+	const struct exception_table_entry *entry;
 
-#ifndef CONFIG_MODULES
-	/* There is only the kernel to search.  */
-	ret = search_one_table(__start___ex_table,
-			       __stop___ex_table-1, addr, g2);
-	return ret;
-#else
-	unsigned long flags;
-	struct list_head *i;
-
-	/* The kernel is the last "module" -- no need to treat it special.  */
-	spin_lock_irqsave(&modlist_lock, flags);
-	list_for_each(i, &extables) {
-		struct exception_table *ex =
-			list_entry(i, struct exception_table, list);
-		if (ex->num_entries == 0)
-			continue;
-		ret = search_one_table(ex->entry,
-				       ex->entry + ex->num_entries - 1,
-				       addr, g2);
-		if (ret)
-			break;
+	entry = search_exception_tables(addr);
+	if (!entry)
+		return 0;
+
+	/* Inside range?  Fix g2 and return correct fixup */
+	if (!entry->fixup) {
+		*g2 = (addr - entry->insn) / 4;
+		return (entry + 1)->fixup;
 	}
-	spin_unlock_irqrestore(&modlist_lock, flags);
-	return ret;
-#endif
+
+	return entry->fixup;
 }
diff -Nru a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c
--- a/arch/sparc64/mm/fault.c	Wed Jan  8 20:04:45 2003
+++ b/arch/sparc64/mm/fault.c	Wed Jan  8 20:04:45 2003
@@ -14,6 +14,7 @@
 #include <linux/mman.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
@@ -285,7 +286,7 @@
 	
 		/* Look in asi.h: All _S asis have LS bit set */
 		if ((asi & 0x1) &&
-		    (fixup = search_exception_table (regs->tpc, &g2))) {
+		    (fixup = search_extables_range(regs->tpc, &g2))) {
 			regs->tpc = fixup;
 			regs->tnpc = regs->tpc + 4;
 			regs->u_regs[UREG_G2] = g2;
diff -Nru a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
--- a/arch/sparc64/mm/hugetlbpage.c	Wed Jan  8 20:04:44 2003
+++ b/arch/sparc64/mm/hugetlbpage.c	Wed Jan  8 20:04:44 2003
@@ -476,9 +476,16 @@
 			page = alloc_hugetlb_page();
 			if (page == NULL) {
 				pte_unmap(pte);
+				retval = -ENOMEM;
+				goto out;
+			}
+			retval = add_to_page_cache(page, mapping,
+						idx, GFP_ATOMIC);
+			if (retval) {
+				pte_unmap(pte);
+				free_hugetlb_page(page);
 				goto out;
 			}
-			add_to_page_cache(page, mapping, idx);
 		}
 		set_huge_pte(mm, vma, page, pte,
 			     (vma->vm_flags & VM_WRITE));
diff -Nru a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c
--- a/arch/um/kernel/sysrq.c	Wed Jan  8 20:04:43 2003
+++ b/arch/um/kernel/sysrq.c	Wed Jan  8 20:04:43 2003
@@ -11,49 +11,6 @@
 #include "sysrq.h"
 #include "user_util.h"
 
- /*
-  * If the address is either in the .text section of the
-  * kernel, or in the vmalloc'ed module regions, it *may* 
-  * be the address of a calling routine
-  */
- 
-#ifdef CONFIG_MODULES
-
-/* FIXME: Accessed without a lock --RR */
-extern struct list_head modules;
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	int retval = 0;
-	struct module *mod;
-
-	if (addr >= (unsigned long) &_stext &&
-	    addr <= (unsigned long) &_etext)
-		return 1;
-
-	list_for_each_entry(mod, &modules, list) {
-		/* mod_bound tests for addr being inside the vmalloc'ed
-		 * module area. Of course it'd be better to test only
-		 * for the .text subset... */
-		if (mod_bound((void *) addr, 0, mod)) {
-			retval = 1;
-			break;
-		}
-	}
-
-	return retval;
-}
-
-#else
-
-static inline int kernel_text_address(unsigned long addr)
-{
-	return (addr >= (unsigned long) &_stext &&
-		addr <= (unsigned long) &_etext);
-}
-
-#endif
-
 void show_trace(unsigned long * stack)
 {
         int i;
diff -Nru a/arch/v850/Kconfig b/arch/v850/Kconfig
--- a/arch/v850/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/v850/Kconfig	Wed Jan  8 20:04:44 2003
@@ -304,47 +304,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-source "drivers/atm/Kconfig"
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
--- a/arch/x86_64/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/arch/x86_64/Kconfig	Wed Jan  8 20:04:45 2003
@@ -567,49 +567,6 @@
 #source drivers/message/i2o/Config.in
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-	  unsure, say Y.
-
-source "drivers/net/Kconfig"
-
-# ATM seems to be largely 64bit unsafe and also unmaintained - disable it for now.
-#      if [ "$CONFIG_ATM" = "y" ]; then
-#         source drivers/atm/Config.in
-#      fi
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
diff -Nru a/arch/x86_64/Makefile b/arch/x86_64/Makefile
--- a/arch/x86_64/Makefile	Wed Jan  8 20:04:45 2003
+++ b/arch/x86_64/Makefile	Wed Jan  8 20:04:45 2003
@@ -57,30 +57,32 @@
 # FIXME: is drivers- right ?
 drivers-$(CONFIG_OPROFILE)		+= arch/x86_64/oprofile/
 
-boot := arch/x86_64/boot
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/x86_64/boot $(1)
 
 .PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
-	archclean
+		clean archclean archmrproper
 
 BOOTIMAGE=arch/x86_64/boot/bzImage
 zImage zlilo zdisk: BOOTIMAGE=arch/x86_64/boot/zImage
 
 zImage bzImage: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
+	$(call makeboot,$(BOOTIMAGE))
 
 compressed: zImage
 
 zlilo bzlilo: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo
+	$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zlilo)
 
 zdisk bzdisk: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk
+	$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zdisk)
 
 install: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) install
+	$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) install)
 
 archclean:
-	$(Q)$(MAKE) $(clean)=$(boot)
+	$(Q)$(MAKE) $(clean)=arch/i386/boot
+
+archmrproper:
 
 prepare: include/asm-$(ARCH)/offset.h
 
@@ -104,3 +106,4 @@
   echo  '                  (distribution) /sbin/installkernel or'
   echo  '        	  install to $$(INSTALL_PATH) and run lilo'
 endef
+
diff -Nru a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
--- a/arch/x86_64/ia32/ia32_binfmt.c	Wed Jan  8 20:04:32 2003
+++ b/arch/x86_64/ia32/ia32_binfmt.c	Wed Jan  8 20:04:32 2003
@@ -261,6 +261,8 @@
 	regs->rax = 0;
 	regs->rbx = 0; 
 	regs->rbp = 0; 
+	regs->r8 = regs->r9 = regs->r10 = regs->r11 = regs->r12 =
+		regs->r13 = regs->r14 = regs->r15 = 0; 
     me->thread.fs = 0; 
 	me->thread.gs = 0;
 	me->thread.fsindex = 0; 
diff -Nru a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c
--- a/arch/x86_64/ia32/ia32_ioctl.c	Wed Jan  8 20:04:44 2003
+++ b/arch/x86_64/ia32/ia32_ioctl.c	Wed Jan  8 20:04:44 2003
@@ -450,13 +450,13 @@
                 struct  ifmap32 ifru_map;
                 char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
 		char	ifru_newname[IFNAMSIZ];
-                __kernel_caddr_t32 ifru_data;
+                compat_caddr_t ifru_data;
         } ifr_ifru;
 };
 
 struct ifconf32 {
         int     ifc_len;                        /* size of buffer       */
-        __kernel_caddr_t32  ifcbuf;
+        compat_caddr_t  ifcbuf;
 };
 
 #ifdef CONFIG_NET
@@ -876,7 +876,7 @@
 
 struct fb_fix_screeninfo32 {
 	char			id[16];
-        __kernel_caddr_t32	smem_start;
+        compat_caddr_t	smem_start;
 	__u32			smem_len;
 	__u32			type;
 	__u32			type_aux;
@@ -885,7 +885,7 @@
 	__u16			ypanstep;
 	__u16			ywrapstep;
 	__u32			line_length;
-        __kernel_caddr_t32	mmio_start;
+        compat_caddr_t	mmio_start;
 	__u32			mmio_len;
 	__u32			accel;
 	__u16			reserved[3];
@@ -894,10 +894,10 @@
 struct fb_cmap32 {
 	__u32			start;
 	__u32			len;
-	__kernel_caddr_t32	red;
-	__kernel_caddr_t32	green;
-	__kernel_caddr_t32	blue;
-	__kernel_caddr_t32	transp;
+	compat_caddr_t	red;
+	compat_caddr_t	green;
+	compat_caddr_t	blue;
+	compat_caddr_t	transp;
 };
 
 static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -1036,7 +1036,7 @@
 	unsigned char	rate;
 	unsigned char	spec1;
 	unsigned char	fmt_gap;
-	const __kernel_caddr_t32 name;
+	const compat_caddr_t name;
 };
 
 struct floppy_drive_params32 {
@@ -1075,7 +1075,7 @@
 	int		fd_ref;
 	int		fd_device;
 	int		last_checked;
-	__kernel_caddr_t32 dmabuf;
+	compat_caddr_t dmabuf;
 	int		bufblocks;
 };
 
@@ -1600,7 +1600,7 @@
 }
 
 struct ppp_option_data32 {
-	__kernel_caddr_t32	ptr;
+	compat_caddr_t	ptr;
 	__u32			length;
 	int			transmit;
 };
@@ -1681,8 +1681,8 @@
 	__u32	mt_dsreg;
 	__u32	mt_gstat;
 	__u32	mt_erreg;
-	__kernel_daddr_t32	mt_fileno;
-	__kernel_daddr_t32	mt_blkno;
+	compat_daddr_t	mt_fileno;
+	compat_daddr_t	mt_blkno;
 };
 #define MTIOCGET32	_IOR('m', 2, struct mtget32)
 
@@ -1800,7 +1800,7 @@
 
 struct cdrom_read32 {
 	int			cdread_lba;
-	__kernel_caddr_t32	cdread_bufaddr;
+	compat_caddr_t	cdread_bufaddr;
 	int			cdread_buflen;
 };
 
@@ -1808,16 +1808,16 @@
 	union cdrom_addr	addr;
 	u_char			addr_format;
 	int			nframes;
-	__kernel_caddr_t32	buf;
+	compat_caddr_t	buf;
 };
 
 struct cdrom_generic_command32 {
 	unsigned char		cmd[CDROM_PACKET_SIZE];
-	__kernel_caddr_t32	buffer;
+	compat_caddr_t	buffer;
 	unsigned int		buflen;
 	int			stat;
-	__kernel_caddr_t32	sense;
-	__kernel_caddr_t32	reserved[3];
+	compat_caddr_t	sense;
+	compat_caddr_t	reserved[3];
 };
 
 static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
@@ -1826,7 +1826,7 @@
 	struct cdrom_read cdread;
 	struct cdrom_read_audio cdreadaudio;
 	struct cdrom_generic_command cgc;
-	__kernel_caddr_t32 addr;
+	compat_caddr_t addr;
 	char *data = 0;
 	void *karg;
 	int err = 0;
@@ -2124,12 +2124,12 @@
 struct atmif_sioc32 {
         int                number;
         int                length;
-        __kernel_caddr_t32 arg;
+        compat_caddr_t arg;
 };
 
 struct atm_iobuf32 {
 	int                length;
-	__kernel_caddr_t32 buffer;
+	compat_caddr_t buffer;
 };
 
 #define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32)
@@ -2190,7 +2190,7 @@
 
 	iobuf.length = iobuf32.length;
 
-	if (iobuf32.buffer == (__kernel_caddr_t32) NULL || iobuf32.length == 0) {
+	if (iobuf32.buffer == (compat_caddr_t) NULL || iobuf32.length == 0) {
 		iobuf.buffer = (void*)(unsigned long)iobuf32.buffer;
 	} else {
 		iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL);
@@ -2244,7 +2244,7 @@
         sioc.number = sioc32.number;
         sioc.length = sioc32.length;
         
-	if (sioc32.arg == (__kernel_caddr_t32) NULL || sioc32.length == 0) {
+	if (sioc32.arg == (compat_caddr_t) NULL || sioc32.length == 0) {
 		sioc.arg = (void*)(unsigned long)sioc32.arg;
         } else {
                 sioc.arg = kmalloc(sioc.length, GFP_KERNEL);
diff -Nru a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
--- a/arch/x86_64/ia32/ia32entry.S	Wed Jan  8 20:04:43 2003
+++ b/arch/x86_64/ia32/ia32entry.S	Wed Jan  8 20:04:43 2003
@@ -76,6 +76,7 @@
 	IA32_ARG_FIXUP 1
 	call *ia32_sys_call_table(,%rax,8)
 	.globl cstar_sysret
+	/* label must directly follow call */
 cstar_sysret:	
 	movq %rax,RAX-ARGOFFSET(%rsp)
 	GET_THREAD_INFO(%r10)
@@ -130,7 +131,7 @@
 	pushq %rax
 	cld
 	/* note the registers are not zero extended to the sf.
-	   this could be a problem */
+	   this could be a problem. */
 	SAVE_ARGS
 	GET_THREAD_INFO(%r10)
 	bt $TIF_SYSCALL_TRACE,threadinfo_flags(%r10)
@@ -190,6 +191,8 @@
 	call *%rax
 	movq %r15, %r11
 	RESTORE_REST
+	cmpq $cstar_sysret,%r11
+	je   int_ret_from_sys_call /* misbalances the call/ret stack. sorry */
 	pushq %r11
 	ret
 
@@ -202,7 +205,7 @@
 	.quad stub32_fork
 	.quad sys_read
 	.quad sys_write
-	.quad sys_open		/* 5 */
+	.quad sys32_open		/* 5 */
 	.quad sys_close
 	.quad sys32_waitpid
 	.quad sys_creat
@@ -320,13 +323,13 @@
 	.quad stub32_clone		/* 120 */
 	.quad sys_setdomainname
 	.quad sys_uname
-	.quad sys_modify_ldt
+	.quad sys32_modify_ldt
 	.quad sys32_adjtimex
 	.quad sys32_mprotect		/* 125 */
 	.quad sys32_sigprocmask
 	.quad sys32_module_warning	/* create_module */
-	.quad sys32_module_warning	/* init_module */
-	.quad sys32_module_warning	/* delete module */
+	.quad sys_init_module
+	.quad sys_delete_module
 	.quad sys32_module_warning	/* 130  get_kernel_syms */
 	.quad ni_syscall	/* quotactl */ 
 	.quad sys_getpgid
@@ -444,8 +447,8 @@
 	.quad sys_get_thread_area
 	.quad sys32_io_setup
 	.quad sys_io_destroy
-	.quad sys_io_getevents
-	.quad sys_io_submit
+	.quad sys32_io_getevents
+	.quad sys32_io_submit
 	.quad sys_io_cancel
 	.quad sys_ni_syscall /* 250 alloc_huge_pages */
 	.quad sys_ni_syscall /* free_huge_pages */
diff -Nru a/arch/x86_64/ia32/ipc32.c b/arch/x86_64/ia32/ipc32.c
--- a/arch/x86_64/ia32/ipc32.c	Wed Jan  8 20:04:43 2003
+++ b/arch/x86_64/ia32/ipc32.c	Wed Jan  8 20:04:43 2003
@@ -40,10 +40,10 @@
 
 struct ipc64_perm32 {
         unsigned key;
-	__kernel_uid32_t32 uid;
-	__kernel_gid32_t32 gid;
-	__kernel_uid32_t32 cuid;
-	__kernel_gid32_t32 cgid;
+	compat_uid32_t uid;
+	compat_gid32_t gid;
+	compat_uid32_t cuid;
+	compat_gid32_t cgid;
 	unsigned short mode;
 	unsigned short __pad1;
 	unsigned short seq;
@@ -86,8 +86,8 @@
 	unsigned short msg_cbytes;
 	unsigned short msg_qnum;
 	unsigned short msg_qbytes;
-	__kernel_ipc_pid_t32 msg_lspid;
-	__kernel_ipc_pid_t32 msg_lrpid;
+	compat_ipc_pid_t msg_lspid;
+	compat_ipc_pid_t msg_lrpid;
 };
 
 struct msqid64_ds32 {
@@ -113,8 +113,8 @@
 	compat_time_t shm_atime;
 	compat_time_t shm_dtime;
 	compat_time_t shm_ctime;
-	__kernel_ipc_pid_t32 shm_cpid;
-	__kernel_ipc_pid_t32 shm_lpid;
+	compat_ipc_pid_t shm_cpid;
+	compat_ipc_pid_t shm_lpid;
 	unsigned short shm_nattch;
 };
 
@@ -613,6 +613,31 @@
 	return err;
 }
 
+extern int sem_ctls[];
+
+static long semtimedop32(int semid, struct sembuf *sb, 
+			 unsigned nsops, struct compat_timespec *ts32)
+{ 
+	struct timespec ts;
+	mm_segment_t oldfs = get_fs(); 
+	long ret;
+
+	if (nsops > sem_ctls[2]) 
+		return -E2BIG;
+	if (!access_ok(VERIFY_READ, sb, nsops * sizeof(struct sembuf)))
+		return -EFAULT; 
+	if (ts32 && 
+	    (get_user(ts.tv_sec, &ts32->tv_sec)  || 
+	     __get_user(ts.tv_nsec, &ts32->tv_nsec)))
+		return -EFAULT;
+
+	set_fs(KERNEL_DS);  
+	ret = sys_semtimedop(semid, sb, nsops, ts32 ? &ts : NULL);
+	set_fs(oldfs); 
+	return ret;
+}
+
+
 asmlinkage long
 sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth)
 {
@@ -627,9 +652,8 @@
 		return sys_semtimedop(first, (struct sembuf *)AA(ptr), second,
 				      NULL);
 	      case TIMEDSEMOP:
-		/* struct sembuf is the same on 32 and 64bit :)) */
-		return sys_semtimedop(first, (struct sembuf *)AA(ptr), second,
-				      (const struct timespec *)AA(fifth));
+		return semtimedop32(first, (struct sembuf *)AA(ptr), second,
+				  (struct compat_timespec *)AA(fifth)); 
 	      case SEMGET:
 		return sys_semget(first, second, third);
 	      case SEMCTL:
diff -Nru a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
--- a/arch/x86_64/ia32/sys_ia32.c	Wed Jan  8 20:04:43 2003
+++ b/arch/x86_64/ia32/sys_ia32.c	Wed Jan  8 20:04:43 2003
@@ -65,6 +65,7 @@
 #include <asm/semaphore.h>
 #include <asm/ipc.h>
 #include <asm/atomic.h>
+#include <asm/ldt.h>
 
 #include <net/scm.h>
 #include <net/sock.h>
@@ -92,6 +93,11 @@
 extern asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf);
 
 
+extern asmlinkage long sys_newstat(char * filename, struct stat * statbuf);
+extern asmlinkage long sys_newlstat(char * filename, struct stat * statbuf);
+extern asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf);
+
+
 int cp_compat_stat(struct kstat *kbuf, struct compat_stat *ubuf)
 {
 	if (verify_area(VERIFY_WRITE, ubuf, sizeof(struct compat_stat)) ||
@@ -228,19 +234,12 @@
 	if (a.prot & PROT_READ) 
 		a.prot |= PROT_EXEC; 
 
-	a.flags |= MAP_32BIT;
-
 	mm = current->mm; 
 	down_write(&mm->mmap_sem); 
 	retval = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, a.offset>>PAGE_SHIFT);
 	if (file)
 		fput(file);
 
-	/* Cannot wrap */
-	if (retval+a.len >= IA32_PAGE_OFFSET && (long)retval > 0) { 
-		do_munmap(mm, retval, a.len); 
-		retval = -ENOMEM; 
-	} 
 	up_write(&mm->mmap_sem); 
 
 	return retval;
@@ -479,6 +478,8 @@
 	return err; 
 }
 
+extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
+
 asmlinkage long
 sys32_alarm(unsigned int seconds)
 {
@@ -1066,30 +1067,6 @@
 	return ret;
 }
 
-static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = get_user(kfl->l_type, &ufl->l_type);
-	err |= __get_user(kfl->l_whence, &ufl->l_whence);
-	err |= __get_user(kfl->l_start, &ufl->l_start);
-	err |= __get_user(kfl->l_len, &ufl->l_len);
-	err |= __get_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
-static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
-{
-	int err;
-	
-	err = __put_user(kfl->l_type, &ufl->l_type);
-	err |= __put_user(kfl->l_whence, &ufl->l_whence);
-	err |= __put_user(kfl->l_start, &ufl->l_start);
-	err |= __put_user(kfl->l_len, &ufl->l_len);
-	err |= __put_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
 extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
 asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg);
 
@@ -1105,13 +1082,13 @@
 			mm_segment_t old_fs;
 			long ret;
 			
-			if (get_flock(&f, (struct flock32 *)arg))
+			if (get_compat_flock(&f, (struct compat_flock *)arg))
 				return -EFAULT;
 			old_fs = get_fs(); set_fs (KERNEL_DS);
 			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
 			set_fs (old_fs);
 			if (ret) return ret;
-			if (put_flock(&f, (struct flock32 *)arg))
+			if (put_compat_flock(&f, (struct compat_flock *)arg))
 				return -EFAULT;
 			return 0;
 		}
@@ -1662,6 +1639,31 @@
 	return ret;
 }
 
+extern asmlinkage long sys_modify_ldt(int func, void *ptr, 
+				      unsigned long bytecount);
+
+asmlinkage long sys32_modify_ldt(int func, void *ptr, unsigned long bytecount)
+{
+	long ret;
+	if (func == 0x1 || func == 0x11) { 
+		struct user_desc info;
+		mm_segment_t old_fs = get_fs();
+		if (bytecount != sizeof(struct user_desc))
+			return -EINVAL;
+		if (copy_from_user(&info, ptr, sizeof(struct user_desc)))
+			return -EFAULT;
+		/* lm bit was undefined in the 32bit ABI and programs
+		   give it random values. Force it to zero here. */
+		info.lm = 0; 
+		set_fs(KERNEL_DS);
+		ret = sys_modify_ldt(func, &info, bytecount);
+		set_fs(old_fs);
+	}  else { 
+		ret = sys_modify_ldt(func, ptr, bytecount); 
+	}
+	return ret;
+}
+
 /* Handle adjtimex compatability. */
 
 struct timex32 {
@@ -1757,15 +1759,9 @@
 		prot |= PROT_EXEC;
 
 	down_write(&mm->mmap_sem);
-	error = do_mmap_pgoff(file, addr, len, prot, flags|MAP_32BIT, pgoff);
+	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
 	up_write(&mm->mmap_sem);
 
-	/* cannot wrap */
-	if (error+len >= IA32_PAGE_OFFSET && (long)error >= 0) { 
-		do_munmap(mm, error, len); 
-		error = -ENOMEM; 
-	} 
-
 	if (file)
 		fput(file);
 	return error;
@@ -2110,54 +2106,6 @@
 	return err;
 }
 
-static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
-{
-	u32 uaddr;
-	int i;
-	int err;
-
-	memset(karg, 0, sizeof(*karg));
-	if(get_user(karg->ca_version, &arg32->ca32_version))
-		return -EFAULT;
-	karg->ca_umap.ug_ident = (char *)get_zeroed_page(GFP_USER);
-	if(!karg->ca_umap.ug_ident)
-		return -ENOMEM;
-	err = get_user(uaddr, &arg32->ca32_umap.ug32_ident);
-	if(strncpy_from_user(karg->ca_umap.ug_ident,
-			     (char *)A(uaddr), PAGE_SIZE) <= 0)
-		return -EFAULT;
-	err |= __get_user(karg->ca_umap.ug_uidbase,
-		      &arg32->ca32_umap.ug32_uidbase);
-	err |= __get_user(karg->ca_umap.ug_uidlen,
-		      &arg32->ca32_umap.ug32_uidlen);
-	err |= __get_user(uaddr, &arg32->ca32_umap.ug32_udimap);
-	if (err)
-		return -EFAULT;
-	karg->ca_umap.ug_udimap = kmalloc((sizeof(uid_t) * karg->ca_umap.ug_uidlen),
-					  GFP_USER);
-	if(!karg->ca_umap.ug_udimap)
-		return -ENOMEM;
-	for(i = 0; i < karg->ca_umap.ug_uidlen; i++)
-		err |= __get_user(karg->ca_umap.ug_udimap[i],
-			      &(((compat_pid_t *)A(uaddr))[i]));
-	err |= __get_user(karg->ca_umap.ug_gidbase,
-		      &arg32->ca32_umap.ug32_gidbase);
-	err |= __get_user(karg->ca_umap.ug_uidlen,
-		      &arg32->ca32_umap.ug32_gidlen);
-	err |= __get_user(uaddr, &arg32->ca32_umap.ug32_gdimap);
-	if (err)
-		return -EFAULT;
-	karg->ca_umap.ug_gdimap = kmalloc((sizeof(gid_t) * karg->ca_umap.ug_uidlen),
-					  GFP_USER);
-	if(!karg->ca_umap.ug_gdimap)
-		return -ENOMEM;
-	for(i = 0; i < karg->ca_umap.ug_gidlen; i++)
-		err |= __get_user(karg->ca_umap.ug_gdimap[i],
-			      &(((compat_gid_t *)A(uaddr))[i]));
-
-	return err;
-}
-
 static int nfs_getfh32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
 {
 	int err;
@@ -2246,10 +2194,6 @@
 	case NFSCTL_UNEXPORT:
 		err = nfs_exp32_trans(karg, arg32);
 		break;
-	/* This one is unimplemented, be we're ready for it. */
-	case NFSCTL_UGIDUPDATE:
-		err = nfs_uud32_trans(karg, arg32);
-		break;
 	case NFSCTL_GETFH:
 		err = nfs_getfh32_trans(karg, arg32);
 		break;
@@ -2306,7 +2250,7 @@
 { 
 	static long warn_time = -(60*HZ); 
 	if (time_before(warn_time + 60*HZ,jiffies) && strcmp(current->comm,"klogd")) { 
-		printk(KERN_INFO "%s: 32bit modutils not supported on 64bit kernel\n",
+		printk(KERN_INFO "%s: 32bit 2.4.x modutils not supported on 64bit kernel\n",
 		       current->comm);
 		warn_time = jiffies;
 	} 
@@ -2434,7 +2378,64 @@
 	return err;		
 }
 
-/* XXX aio getevents */
+extern asmlinkage long sys_io_getevents(aio_context_t ctx_id,
+					  long min_nr,
+					  long nr,
+					  struct io_event *events,
+					  struct timespec *timeout);
+
+asmlinkage long sys32_io_getevents(aio_context_t ctx_id,
+				 unsigned long min_nr,
+				 unsigned long nr,
+				 struct io_event *events,
+				 struct compat_timespec *timeout)
+{ 	
+	long ret;
+	mm_segment_t oldfs; 
+	struct timespec t32;
+	/* Harden against bogus ptrace */
+	if (nr >= 0xffffffff || 
+	    !access_ok(VERIFY_WRITE, events, nr * sizeof(struct io_event)))
+		return -EFAULT;
+	if (timeout && 
+	    (get_user(t32.tv_sec, &timeout->tv_sec)  || 
+	     __get_user(t32.tv_nsec, &timeout->tv_nsec)))
+		return -EFAULT; 
+	oldfs = get_fs();
+	set_fs(KERNEL_DS); 
+	ret = sys_io_getevents(ctx_id,min_nr,nr,events,timeout ? &t32 : NULL); 
+	set_fs(oldfs); 
+	if (timeout && 
+	    (__put_user(t32.tv_sec, &timeout->tv_sec) || 
+	     __put_user(t32.tv_nsec, &timeout->tv_nsec)))
+		return -EFAULT; 		
+	return ret;
+} 
+
+asmlinkage long sys32_open(const char * filename, int flags, int mode)
+{
+	char * tmp;
+	int fd, error;
+
+	/* don't force O_LARGEFILE */
+	tmp = getname(filename);
+	fd = PTR_ERR(tmp);
+	if (!IS_ERR(tmp)) {
+		fd = get_unused_fd();
+		if (fd >= 0) {
+			struct file *f = filp_open(tmp, flags, mode);
+			error = PTR_ERR(f);
+			if (unlikely(IS_ERR(f))) {
+				put_unused_fd(fd); 
+				fd = error;
+			} else
+				fd_install(fd, f);
+		}
+		putname(tmp);
+	}
+	return fd;
+}
+
 
 long sys32_vm86_warning(void)
 { 
diff -Nru a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
--- a/arch/x86_64/kernel/head.S	Wed Jan  8 20:04:44 2003
+++ b/arch/x86_64/kernel/head.S	Wed Jan  8 20:04:44 2003
@@ -365,7 +365,8 @@
 	.quad	0,0			/* TSS */
 	.quad	0			/* LDT */
 	.quad   0,0,0			/* three TLS descriptors */ 
-	.quad	0,0			/* pad to cache line boundary */
+	.quad	0x00cff2000000ffff	/* dummy descriptor for long base */
+	.quad	0			/* pad to cache line boundary */
 gdt_end:	
 	.globl gdt_end
 
diff -Nru a/arch/x86_64/kernel/module.c b/arch/x86_64/kernel/module.c
--- a/arch/x86_64/kernel/module.c	Wed Jan  8 20:04:45 2003
+++ b/arch/x86_64/kernel/module.c	Wed Jan  8 20:04:45 2003
@@ -26,9 +26,9 @@
 #define DEBUGP(fmt...) 
  
 /* We don't need anything special. */
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod)
 {
 	return 0;
diff -Nru a/arch/x86_64/kernel/msr.c b/arch/x86_64/kernel/msr.c
--- a/arch/x86_64/kernel/msr.c	Wed Jan  8 20:04:43 2003
+++ b/arch/x86_64/kernel/msr.c	Wed Jan  8 20:04:43 2003
@@ -79,7 +79,7 @@
 	       "	jmp 2b\n"
 	       ".previous\n"
 	       ".section __ex_table,\"a\"\n"
-	       "	.align 4\n"
+	       "	.align 8\n"
 	       "	.quad 1b,3b\n"
 	       ".previous"
 	       : "=&bDS" (err), "=a" (*eax), "=d" (*edx)
diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
--- a/arch/x86_64/kernel/pci-gart.c	Wed Jan  8 20:04:43 2003
+++ b/arch/x86_64/kernel/pci-gart.c	Wed Jan  8 20:04:43 2003
@@ -72,6 +72,7 @@
 #define EMERGENCY_PAGES 32 /* = 128KB */ 
 
 #ifdef CONFIG_AGP
+extern int agp_amdk8_init(void);
 extern int agp_init(void);
 #define AGPEXTERN extern
 #else
@@ -453,10 +454,14 @@
 	unsigned long aper_size;
 	unsigned long iommu_start;
 		
-#ifndef CONFIG_AGP
+#ifndef CONFIG_AGP_AMD_8151
 	no_agp = 1; 
 #else
-	no_agp = no_agp || (agp_init() < 0) || (agp_copy_info(&info) < 0); 
+	/* Add other K8 AGP bridge drivers here */
+	no_agp = no_agp || 
+		(agp_init() < 0) || 
+		(agp_amdk8_init() < 0) || 
+		(agp_copy_info(&info) < 0); 
 #endif	
 
 	if (no_iommu || (!force_mmu && end_pfn < 0xffffffff>>PAGE_SHIFT)) { 
diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
--- a/arch/x86_64/kernel/process.c	Wed Jan  8 20:04:32 2003
+++ b/arch/x86_64/kernel/process.c	Wed Jan  8 20:04:32 2003
@@ -534,43 +534,45 @@
 int sys_arch_prctl(int code, unsigned long addr)
 { 
 	int ret = 0; 
-	unsigned long tmp; 
 
 	switch (code) { 
 	case ARCH_SET_GS:
 		if (addr >= TASK_SIZE) 
 			return -EPERM; 
-		load_gs_index(0);
-		current->thread.gsindex = 0;
+		get_cpu();
+		load_gs_index(__USER_LONGBASE);
+		current->thread.gsindex = __USER_LONGBASE;
 		current->thread.gs = addr;
 		ret = checking_wrmsrl(MSR_KERNEL_GS_BASE, addr); 
+		put_cpu();
 		break;
 	case ARCH_SET_FS:
 		/* Not strictly needed for fs, but do it for symmetry
 		   with gs */
 		if (addr >= TASK_SIZE)
 			return -EPERM; 
-		asm volatile("movl %0,%%fs" :: "r" (0));
-		current->thread.fsindex = 0;
+		get_cpu();
+		asm volatile("movl %0,%%fs" :: "r" (__USER_LONGBASE));
+		current->thread.fsindex = __USER_LONGBASE;
 		current->thread.fs = addr;
 		ret = checking_wrmsrl(MSR_FS_BASE, addr); 
+		put_cpu();
 		break;
 
 		/* Returned value may not be correct when the user changed fs/gs */ 
 	case ARCH_GET_FS:
-		rdmsrl(MSR_FS_BASE, tmp);
-		ret = put_user(tmp, (unsigned long *)addr); 
+		ret = put_user(current->thread.fs, (unsigned long *)addr); 
 		break; 
 
 	case ARCH_GET_GS: 
-		rdmsrl(MSR_KERNEL_GS_BASE, tmp); 
-		ret = put_user(tmp, (unsigned long *)addr); 
+		ret = put_user(current->thread.gs, (unsigned long *)addr); 
 		break;
 
 	default:
 		ret = -EINVAL;
 		break;
 	} 
+
 	return ret;	
 } 
 
@@ -657,6 +659,7 @@
 #define GET_LIMIT_PAGES(desc)	(((desc)->b >> 23) & 1)
 #define GET_PRESENT(desc)	(((desc)->b >> 15) & 1)
 #define GET_USEABLE(desc)	(((desc)->b >> 20) & 1)
+#define GET_LONGMODE(desc)	(((desc)->b >> 21) & 1)
 
 asmlinkage int sys_get_thread_area(struct user_desc *u_info)
 {
@@ -681,6 +684,7 @@
 	info.limit_in_pages = GET_LIMIT_PAGES(desc);
 	info.seg_not_present = !GET_PRESENT(desc);
 	info.useable = GET_USEABLE(desc);
+	info.lm = GET_LONGMODE(desc);
 
 	if (copy_to_user(u_info, &info, sizeof(info)))
 		return -EFAULT;
diff -Nru a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
--- a/arch/x86_64/kernel/ptrace.c	Wed Jan  8 20:04:43 2003
+++ b/arch/x86_64/kernel/ptrace.c	Wed Jan  8 20:04:43 2003
@@ -91,6 +91,11 @@
 	unsigned long regno, unsigned long value)
 {
 	unsigned long tmp; 
+	
+	/* Some code in the 64bit emulation may not be 64bit clean.
+	   Don't take any chances. */
+	if (test_tsk_thread_flag(child, TIF_IA32))
+		value &= 0xffffffff;
 	switch (regno) {
 		case offsetof(struct user_regs_struct,fs):
 			if (value && (value & 3) != 3)
@@ -145,6 +150,7 @@
 
 static unsigned long getreg(struct task_struct *child, unsigned long regno)
 {
+	unsigned long val;
 	switch (regno) {
 		case offsetof(struct user_regs_struct, fs):
 			return child->thread.fsindex;
@@ -160,7 +166,10 @@
 			return child->thread.gs;
 		default:
 			regno = regno - sizeof(struct pt_regs);
-			return get_stack_long(child, regno);
+			val = get_stack_long(child, regno);
+			if (test_tsk_thread_flag(child, TIF_IA32))
+				val &= 0xffffffff;
+			return val;
 	}
 
 }
diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
--- a/arch/x86_64/kernel/setup.c	Wed Jan  8 20:04:32 2003
+++ b/arch/x86_64/kernel/setup.c	Wed Jan  8 20:04:32 2003
@@ -384,8 +384,6 @@
 	conswitchp = &dummy_con;
 #endif
 #endif
-
-	exception_table_check(); 
 }
 
 #ifndef CONFIG_X86_TSC
diff -Nru a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
--- a/arch/x86_64/kernel/smpboot.c	Wed Jan  8 20:04:45 2003
+++ b/arch/x86_64/kernel/smpboot.c	Wed Jan  8 20:04:45 2003
@@ -799,11 +799,6 @@
 	printk("CPU%d: ", 0);
 	print_cpu_info(&cpu_data[0]);
 
-	/*
-	 * We have the boot CPU online for sure.
-	 */
-	set_bit(0, &cpu_online_map);
-	set_bit(0, &cpu_callout_map);
 	x86_apicid_to_cpu[boot_cpu_id] = 0;
 	x86_cpu_to_apicid[0] = boot_cpu_id;
 	current_thread_info()->cpu = 0;
diff -Nru a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c
--- a/arch/x86_64/kernel/sys_x86_64.c	Wed Jan  8 20:04:44 2003
+++ b/arch/x86_64/kernel/sys_x86_64.c	Wed Jan  8 20:04:44 2003
@@ -18,6 +18,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/ipc.h>
+#include <asm/ia32.h>
 
 /*
  * sys_pipe() is the normal C calling standard for creating
@@ -70,18 +71,27 @@
 	struct vm_area_struct *vma;
 	unsigned long end = TASK_SIZE;
 
-	if (test_thread_flag(TIF_IA32))
-		flags |= MAP_32BIT; 
-	if (flags & MAP_32BIT) 
-		end = 0xffffffff-1;
-	if (len > end)
-		return -ENOMEM;
-	if (!addr) { 
-		addr = TASK_UNMAPPED_64;
-		if (flags & MAP_32BIT) {
+	if (test_thread_flag(TIF_IA32)) { 
+		if (!addr) 
 			addr = TASK_UNMAPPED_32;
+		end = IA32_PAGE_OFFSET; 
+	} else if (flags & MAP_32BIT) { 
+		/* This is usually used needed to map code in small model, so it needs to 
+		   be in the first 31bit. Limit it to that.
+		   This means we need to move the unmapped base down for this case. This can 
+		   give conflicts with the heap, but we assume that glibc malloc knows how 
+		   to fall back to mmap. Give it 1GB of playground for now. -AK */ 
+		if (!addr) 
+			addr = 0x40000000; 
+		end = 0x80000000;		
+	} else { 
+		if (!addr) 
+			addr = TASK_UNMAPPED_64; 
+		end = TASK_SIZE; 
 		}
-	} 
+
+	if (len > end)
+		return -ENOMEM;
 	addr = PAGE_ALIGN(addr);
 
 	for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {
diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
--- a/arch/x86_64/kernel/traps.c	Wed Jan  8 20:04:32 2003
+++ b/arch/x86_64/kernel/traps.c	Wed Jan  8 20:04:32 2003
@@ -87,8 +87,9 @@
 	const char *symname;
 	char *modname;
 	char *delim = ":"; 
+	char namebuf[128];
 
-	symname = kallsyms_lookup(address, &symsize, &offset, &modname); 
+	symname = kallsyms_lookup(address, &symsize, &offset, &modname, namebuf); 
 	if (!symname) 
 		return printk("[<%016lx>]", address);
 	if (!modname) 
@@ -103,44 +104,6 @@
 } 
 #endif
 
-
-#ifdef CONFIG_MODULES
-
-/* FIXME: Accessed without a lock --RR */
-extern struct list_head modules;
-
-static inline int kernel_text_address(unsigned long addr)
-{
-   int retval = 0;
-   struct module *mod;
-
-   if (addr >= (unsigned long) &_stext &&
-       addr <= (unsigned long) &_etext)
-       return 1;
-
-   list_for_each_entry(mod, &modules, list) { 	
-       /* mod_bound tests for addr being inside the vmalloc'ed
-        * module area. Of course it'd be better to test only
-        * for the .text subset... */
-       if (mod_bound((void *)addr, 0, mod)) {
-           retval = 1;
-           break;
-       }
-   }
-
-   return retval;
-}
-
-#else
-
-static inline int kernel_text_address(unsigned long addr)
-{
-   return (addr >= (unsigned long) &_stext &&
-       addr <= (unsigned long) &_etext);
-}
-
-#endif
-
 static inline unsigned long *in_exception_stack(int cpu, unsigned long stack) 
 { 
 	int k;
@@ -434,7 +397,8 @@
 
 	/* kernel trap */ 
 	{	     
-		unsigned long fixup = search_exception_table(regs->rip);
+		const struct exception_table_entry *fixup;
+		fixup = search_exception_tables(regs->rip);
 		if (fixup) {
 			extern int exception_trace; 
 			if (exception_trace)
@@ -442,7 +406,7 @@
 	             "%s: fixed kernel exception at %lx err:%ld\n",
 	             current->comm, regs->rip, error_code);
 		
-			regs->rip = fixup;
+			regs->rip = fixup->fixup;
 		} else	
 			die(str, regs, error_code);
 		return;
@@ -486,8 +450,6 @@
 	do_trap(3, SIGTRAP, "int3", regs, error_code, NULL);
 }
 
-extern void dump_pagetable(unsigned long);
-
 asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
 {
 #ifdef CONFIG_CHECKING
@@ -516,13 +478,12 @@
 
 	/* kernel gp */
 	{
-		unsigned long fixup;
-		fixup = search_exception_table(regs->rip);
+		const struct exception_table_entry *fixup;
+		fixup = search_exception_tables(regs->rip);
 		if (fixup) {
-			regs->rip = fixup;
+			regs->rip = fixup->fixup;
 			return;
 		}
-//		dump_pagetable(regs->rip); 
 		die("general protection fault", regs, error_code);
 	}
 }
diff -Nru a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
--- a/arch/x86_64/kernel/vsyscall.c	Wed Jan  8 20:04:44 2003
+++ b/arch/x86_64/kernel/vsyscall.c	Wed Jan  8 20:04:44 2003
@@ -151,7 +151,6 @@
 
 static int __init vsyscall_init(void)
 {
-	printk("VSYSCALL: consistency checks...");
 	if ((unsigned long) &vgettimeofday != VSYSCALL_ADDR(__NR_vgettimeofday))
 		panic("vgettimeofday link addr broken");
 	if ((unsigned long) &vtime != VSYSCALL_ADDR(__NR_vtime))
@@ -159,9 +158,7 @@
 	if (VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE))
 		panic("fixmap first vsyscall %lx should be %lx", __fix_to_virt(VSYSCALL_FIRST_PAGE),
 		      VSYSCALL_ADDR(0));
-	printk("passed...mapping...");
 	map_vsyscall();
-	printk("done.\n");
 
 	return 0;
 }
diff -Nru a/arch/x86_64/mm/extable.c b/arch/x86_64/mm/extable.c
--- a/arch/x86_64/mm/extable.c	Wed Jan  8 20:04:45 2003
+++ b/arch/x86_64/mm/extable.c	Wed Jan  8 20:04:45 2003
@@ -6,32 +6,12 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
-#include <linux/init.h>
 
-extern const struct exception_table_entry __start___ex_table[];
-extern const struct exception_table_entry __stop___ex_table[];
-
-
-void __init exception_table_check(void)
-{ 
-	const struct exception_table_entry *e;
-	unsigned long prev;
-
-	prev = 0;
-	for (e = __start___ex_table; e < __stop___ex_table; e++) { 		
-		if (e->insn < prev) {
-			panic("unordered exception table at %016lx:%016lx and %016lx:%016lx\n",
-				   prev, e[-1].fixup, 
-			       e->insn, e->fixup);
-		}		   	
-		prev = e->insn;
-	} 
-} 
-
-static unsigned long
-search_one_table(const struct exception_table_entry *first,
-		 const struct exception_table_entry *last,
-		 unsigned long value)
+/* Simple binary search */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value)
 {
         while (first <= last) {
 		const struct exception_table_entry *mid;
@@ -40,42 +20,11 @@
 		mid = (last - first) / 2 + first;
 		diff = mid->insn - value;
                 if (diff == 0)
-                        return mid->fixup;
+                        return mid;
                 else if (diff < 0)
                         first = mid+1;
                 else
                         last = mid-1;
         }
-        return 0;
-}
-
-extern spinlock_t modlist_lock;
-
-unsigned long
-search_exception_table(unsigned long addr)
-{
-	unsigned long ret = 0;
-	unsigned long flags;
-
-#ifndef CONFIG_MODULES
-	/* There is only the kernel to search.  */
-	return search_one_table(__start___ex_table, __stop___ex_table-1, addr);
-#else
-	/* The kernel is the last "module" -- no need to treat it special.  */
-	struct list_head *i;
-
-	spin_lock_irqsave(&modlist_lock, flags);
-	list_for_each(i, &extables) { 
-		struct exception_table *ex = 
-			list_entry(i,struct exception_table, list); 
-		if (ex->num_entries == 0) 
-			continue;
-		ret = search_one_table(ex->entry,
-				       ex->entry + ex->num_entries - 1, addr);
-		if (ret)
-			break;
-	}
-	spin_unlock_irqrestore(&modlist_lock, flags);
-	return ret;
-#endif
+        return NULL;
 }
diff -Nru a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
--- a/arch/x86_64/mm/fault.c	Wed Jan  8 20:04:32 2003
+++ b/arch/x86_64/mm/fault.c	Wed Jan  8 20:04:32 2003
@@ -22,6 +22,7 @@
 #include <linux/tty.h>
 #include <linux/vt_kern.h>		/* For unblank_screen() */
 #include <linux/compiler.h>
+#include <linux/module.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -101,7 +102,7 @@
 	struct mm_struct *mm;
 	struct vm_area_struct * vma;
 	unsigned long address;
-	unsigned long fixup;
+	const struct exception_table_entry *fixup;
 	int write;
 	siginfo_t info;
 
@@ -239,8 +240,9 @@
 no_context:
 	
 	/* Are we prepared to handle this kernel fault?  */
-	if ((fixup = search_exception_table(regs->rip)) != 0) {
-		regs->rip = fixup;
+	fixup = search_exception_tables(regs->rip);
+	if (fixup) {
+		regs->rip = fixup->fixup;
 		if (0 && exception_trace) 
 		printk(KERN_ERR 
 		       "%s: fixed kernel exception at %lx address %lx err:%ld\n", 
diff -Nru a/arch/x86_64/mm/hugetlbpage.c b/arch/x86_64/mm/hugetlbpage.c
--- a/arch/x86_64/mm/hugetlbpage.c	Wed Jan  8 20:04:44 2003
+++ b/arch/x86_64/mm/hugetlbpage.c	Wed Jan  8 20:04:44 2003
@@ -232,8 +232,12 @@
 				ret = -ENOMEM;
 				goto out;
 			}
-			add_to_page_cache(page, mapping, idx);
+			ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC);
 			unlock_page(page);
+			if (ret) {
+				free_huge_page(page);
+				goto out;
+			}
 		}
 		set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE);
 	}
diff -Nru a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c	Wed Jan  8 20:04:43 2003
+++ b/arch/x86_64/mm/init.c	Wed Jan  8 20:04:43 2003
@@ -161,7 +161,7 @@
 } temp_mappings[] __initdata = { 
 	{ &temp_boot_pmds[0], (void *)(40UL * 1024 * 1024) },
 	{ &temp_boot_pmds[1], (void *)(42UL * 1024 * 1024) }, 
-	{ &temp_boot_pmds[1], (void *)(44UL * 1024 * 1024) }, 
+	{ &temp_boot_pmds[2], (void *)(44UL * 1024 * 1024) }, 
 	{}
 }; 
 
diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
--- a/drivers/acpi/bus.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/acpi/bus.c	Wed Jan  8 20:04:44 2003
@@ -676,9 +676,7 @@
 	return_VALUE(-ENODEV);
 }
 
-struct subsystem acpi_subsys = {
-	.kobj	= { .name = "acpi" },
-};
+decl_subsys(acpi,NULL);
 
 static int __init acpi_init (void)
 {
diff -Nru a/drivers/acpi/scan.c b/drivers/acpi/scan.c
--- a/drivers/acpi/scan.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/acpi/scan.c	Wed Jan  8 20:04:43 2003
@@ -31,12 +31,18 @@
 	kfree(dev);
 }
 
-static struct subsystem acpi_namespace_subsys = {
-	.kobj		= { .name = "namespace" },
-	.parent		= &acpi_subsys,
+static struct kobj_type ktype_acpi_ns = {
 	.release	= acpi_device_release,
 };
 
+static struct kset acpi_namespace_kset = {
+	.kobj		= { 
+		.name = "namespace",
+	},
+	.subsys = &acpi_subsys,
+	.ktype	= &ktype_acpi_ns,
+};
+
 
 static void acpi_device_register(struct acpi_device * device, struct acpi_device * parent)
 {
@@ -61,7 +67,8 @@
 	strncpy(device->kobj.name,device->pnp.bus_id,KOBJ_NAME_LEN);
 	if (parent)
 		device->kobj.parent = &parent->kobj;
-	device->kobj.subsys = &acpi_namespace_subsys;
+	device->kobj.ktype = &ktype_acpi_ns;
+	device->kobj.kset = &acpi_namespace_kset;
 	kobject_register(&device->kobj);
 }
 
@@ -920,7 +927,7 @@
 	if (acpi_disabled)
 		return_VALUE(0);
 
-	subsystem_register(&acpi_namespace_subsys);
+	kset_register(&acpi_namespace_kset);
 
 	/*
 	 * Create the root device in the bus's device tree
diff -Nru a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
--- a/drivers/atm/atmtcp.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/atm/atmtcp.c	Wed Jan  8 20:04:44 2003
@@ -173,7 +173,7 @@
 static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
 {
 	struct atmtcp_dev_data *dev_data;
-	struct atm_vcc *out_vcc;
+	struct atm_vcc *out_vcc=NULL; /* Initializer quietens GCC warning */
 	struct sk_buff *new_skb;
 	struct atmtcp_hdr *hdr;
 	int size;
diff -Nru a/drivers/base/bus.c b/drivers/base/bus.c
--- a/drivers/base/bus.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/base/bus.c	Wed Jan  8 20:04:43 2003
@@ -16,13 +16,11 @@
 #include <linux/string.h>
 #include "base.h"
 
-static DECLARE_MUTEX(bus_sem);
-
 #define to_dev(node) container_of(node,struct device,bus_list)
-#define to_drv(node) container_of(node,struct device_driver,bus_list)
+#define to_drv(node) container_of(node,struct device_driver,kobj.entry)
 
 #define to_bus_attr(_attr) container_of(_attr,struct bus_attribute,attr)
-#define to_bus(obj) container_of(obj,struct bus_type,subsys.kobj)
+#define to_bus(obj) container_of(obj,struct bus_type,subsys.kset.kobj)
 
 /*
  * sysfs bindings for drivers
@@ -70,6 +68,11 @@
 	up(&drv->unload_sem);
 }
 
+static struct kobj_type ktype_driver = {
+	.sysfs_ops	= &driver_sysfs_ops,
+	.release	= driver_release,
+};
+
 
 /*
  * sysfs bindings for buses
@@ -111,7 +114,7 @@
 {
 	int error;
 	if (get_bus(bus)) {
-		error = sysfs_create_file(&bus->subsys.kobj,&attr->attr);
+		error = sysfs_create_file(&bus->subsys.kset.kobj,&attr->attr);
 		put_bus(bus);
 	} else
 		error = -EINVAL;
@@ -121,16 +124,17 @@
 void bus_remove_file(struct bus_type * bus, struct bus_attribute * attr)
 {
 	if (get_bus(bus)) {
-		sysfs_remove_file(&bus->subsys.kobj,&attr->attr);
+		sysfs_remove_file(&bus->subsys.kset.kobj,&attr->attr);
 		put_bus(bus);
 	}
 }
 
-struct subsystem bus_subsys = {
-	.kobj	= { .name = "bus" },
+static struct kobj_type ktype_bus = {
 	.sysfs_ops	= &bus_sysfs_ops,
+
 };
 
+decl_subsys(bus,&ktype_bus);
 
 /**
  *	bus_for_each_dev - device iterator.
@@ -160,7 +164,7 @@
 	if (!(bus = get_bus(bus)))
 		return -EINVAL;
 
-	head = start ? &start->bus_list : &bus->devices;
+	head = start ? &start->bus_list : &bus->devices.list;
 
 	down_read(&bus->subsys.rwsem);
 	list_for_each(entry,head) {
@@ -171,6 +175,7 @@
 			break;
 	}
 	up_read(&bus->subsys.rwsem);
+	put_bus(bus);
 	return error;
 }
 
@@ -203,7 +208,7 @@
 	if(!(bus = get_bus(bus)))
 		return -EINVAL;
 
-	head = start ? &start->bus_list : &bus->drivers;
+	head = start ? &start->kobj.entry : &bus->drivers.list;
 
 	down_read(&bus->subsys.rwsem);
 	list_for_each(entry,head) {
@@ -214,17 +219,24 @@
 			break;
 	}
 	up_read(&bus->subsys.rwsem);
+	put_bus(bus);
 	return error;
 }
 
 /**
- *	attach - add device to driver.
+ *	device_bind_driver - bind a driver to one device.
  *	@dev:	device.
- *	
- *	By this point, we know for sure what the driver is, so we 
- *	do the rest (which ain't that much).
+ *
+ *	Allow manual attachment of a driver to a deivce.
+ *	Caller must have already set @dev->driver.
+ *
+ *	Note that this does not modify the bus reference count 
+ *	nor take the bus's rwsem. Please verify those are accounted 
+ *	for before calling this. (It is ok to call with no other effort
+ *	from a driver's probe() method.)
  */
-static void attach(struct device * dev)
+
+void device_bind_driver(struct device * dev)
 {
 	pr_debug("bound device '%s' to driver '%s'\n",
 		 dev->bus_id,dev->driver->name);
@@ -253,14 +265,13 @@
 	if (dev->bus->match(dev,drv)) {
 		dev->driver = drv;
 		if (drv->probe) {
-			if (!(error = drv->probe(dev)))
-				attach(dev);
-			else 
+			if ((error = drv->probe(dev))) {
 				dev->driver = NULL;
-		} else {
-			attach(dev);
-			error = 0;
+				return error;
+			}
 		}
+		device_bind_driver(dev);
+		error = 0;
 	}
 	return error;
 }
@@ -280,16 +291,15 @@
 	int error = 0;
 
 	if (dev->driver) {
-		attach(dev);
+		device_bind_driver(dev);
 		return 0;
 	}
 
 	if (!bus->match)
 		return 0;
 
-	list_for_each(entry,&bus->drivers) {
-		struct device_driver * drv = 
-			container_of(entry,struct device_driver,bus_list);
+	list_for_each(entry,&bus->drivers.list) {
+		struct device_driver * drv = to_drv(entry);
 		if (!(error = bus_match(dev,drv)))
 			break;
 	}
@@ -316,7 +326,7 @@
 	if (!bus->match)
 		return 0;
 
-	list_for_each(entry,&bus->devices) {
+	list_for_each(entry,&bus->devices.list) {
 		struct device * dev = container_of(entry,struct device,bus_list);
 		if (!dev->driver) {
 			if (!bus_match(dev,drv) && dev->driver)
@@ -328,16 +338,18 @@
 
 
 /**
- *	detach - do dirty work of detaching device from its driver.
+ *	device_release_driver - manually detach device from driver.
  *	@dev:	device.
- *	@drv:	its driver.
  *
- *	Note that calls to this function are serialized by taking the 
- *	bus's rwsem in both bus_remove_device() and bus_remove_driver().
+ *	Manually detach device from driver.
+ *	Note that this is called without incrementing the bus
+ *	reference count nor taking the bus's rwsem. Be sure that
+ *	those are accounted for before calling this function.
  */
 
-static void detach(struct device * dev, struct device_driver * drv)
+void device_release_driver(struct device * dev)
 {
+	struct device_driver * drv = dev->driver;
 	if (drv) {
 		sysfs_remove_link(&drv->kobj,dev->kobj.name);
 		list_del_init(&dev->driver_list);
@@ -350,17 +362,6 @@
 
 
 /**
- *	device_detach - detach device from its driver.
- *	@dev:	device.
- */
-
-static void device_detach(struct device * dev)
-{
-	detach(dev,dev->driver);
-}
-
-
-/**
  *	driver_detach - detach driver from all devices it controls.
  *	@drv:	driver.
  */
@@ -370,7 +371,7 @@
 	struct list_head * entry, * next;
 	list_for_each_safe(entry,next,&drv->devices) {
 		struct device * dev = container_of(entry,struct device,driver_list);
-		detach(dev,drv);
+		device_release_driver(dev);
 	}
 	
 }
@@ -389,10 +390,10 @@
 	if (bus) {
 		down_write(&dev->bus->subsys.rwsem);
 		pr_debug("bus %s: add device %s\n",bus->name,dev->bus_id);
-		list_add_tail(&dev->bus_list,&dev->bus->devices);
+		list_add_tail(&dev->bus_list,&dev->bus->devices.list);
 		device_attach(dev);
 		up_write(&dev->bus->subsys.rwsem);
-		sysfs_create_link(&bus->devsubsys.kobj,&dev->kobj,dev->bus_id);
+		sysfs_create_link(&bus->devices.kobj,&dev->kobj,dev->bus_id);
 	}
 	return 0;
 }
@@ -409,10 +410,10 @@
 void bus_remove_device(struct device * dev)
 {
 	if (dev->bus) {
-		sysfs_remove_link(&dev->bus->devsubsys.kobj,dev->bus_id);
+		sysfs_remove_link(&dev->bus->devices.kobj,dev->bus_id);
 		down_write(&dev->bus->subsys.rwsem);
 		pr_debug("bus %s: remove device %s\n",dev->bus->name,dev->bus_id);
-		device_detach(dev);
+		device_release_driver(dev);
 		list_del_init(&dev->bus_list);
 		up_write(&dev->bus->subsys.rwsem);
 		put_bus(dev->bus);
@@ -429,15 +430,14 @@
 {
 	struct bus_type * bus = get_bus(drv->bus);
 	if (bus) {
-		down_write(&bus->subsys.rwsem);
 		pr_debug("bus %s: add driver %s\n",bus->name,drv->name);
 
 		strncpy(drv->kobj.name,drv->name,KOBJ_NAME_LEN);
-		drv->kobj.subsys = &bus->drvsubsys;
+		drv->kobj.kset = &bus->drivers;
 		kobject_register(&drv->kobj);
 
+		down_write(&bus->subsys.rwsem);
 		devclass_add_driver(drv);
-		list_add_tail(&drv->bus_list,&bus->drivers);
 		driver_attach(drv);
 		up_write(&bus->subsys.rwsem);
 	}
@@ -460,10 +460,9 @@
 		down_write(&drv->bus->subsys.rwsem);
 		pr_debug("bus %s: remove driver %s\n",drv->bus->name,drv->name);
 		driver_detach(drv);
-		list_del_init(&drv->bus_list);
 		devclass_remove_driver(drv);
-		kobject_unregister(&drv->kobj);
 		up_write(&drv->bus->subsys.rwsem);
+		kobject_unregister(&drv->kobj);
 		put_bus(drv->bus);
 	}
 }
@@ -478,38 +477,45 @@
 	subsys_put(&bus->subsys);
 }
 
+
+/**
+ *	find_bus - locate bus by name.
+ *	@name:	name of bus.
+ *
+ *	Call kset_find_obj() to iterate over list of buses to
+ *	find a bus by name. Return bus if found.
+ */
+
+struct bus_type * find_bus(char * name)
+{
+	struct kobject * k = kset_find_obj(&bus_subsys.kset,name);
+	return k ? to_bus(k) : NULL;
+}
+
 /**
  *	bus_register - register a bus with the system.
  *	@bus:	bus.
  *
- *	We take bus_sem here to protect against the bus being 
- *	unregistered during the registration process.
  *	Once we have that, we registered the bus with the kobject
  *	infrastructure, then register the children subsystems it has:
  *	the devices and drivers that belong to the bus. 
  */
 int bus_register(struct bus_type * bus)
 {
-	INIT_LIST_HEAD(&bus->devices);
-	INIT_LIST_HEAD(&bus->drivers);
-
-	down(&bus_sem);
-	strncpy(bus->subsys.kobj.name,bus->name,KOBJ_NAME_LEN);
-	bus->subsys.parent = &bus_subsys;
+	strncpy(bus->subsys.kset.kobj.name,bus->name,KOBJ_NAME_LEN);
+	subsys_set_kset(bus,bus_subsys);
 	subsystem_register(&bus->subsys);
 
-	snprintf(bus->devsubsys.kobj.name,KOBJ_NAME_LEN,"devices");
-	bus->devsubsys.parent = &bus->subsys;
-	subsystem_register(&bus->devsubsys);
-
-	snprintf(bus->drvsubsys.kobj.name,KOBJ_NAME_LEN,"drivers");
-	bus->drvsubsys.parent = &bus->subsys;
-	bus->drvsubsys.sysfs_ops = &driver_sysfs_ops;
-	bus->drvsubsys.release = driver_release;
-	subsystem_register(&bus->drvsubsys);
+	snprintf(bus->devices.kobj.name,KOBJ_NAME_LEN,"devices");
+	bus->devices.subsys = &bus->subsys;
+	kset_register(&bus->devices);
+
+	snprintf(bus->drivers.kobj.name,KOBJ_NAME_LEN,"drivers");
+	bus->drivers.subsys = &bus->subsys;
+	bus->drivers.ktype = &ktype_driver;
+	kset_register(&bus->drivers);
 
 	pr_debug("bus type '%s' registered\n",bus->name);
-	up(&bus_sem);
 	return 0;
 }
 
@@ -518,19 +524,15 @@
  *	bus_unregister - remove a bus from the system 
  *	@bus:	bus.
  *
- *	Take bus_sem, in case the bus we're registering hasn't 
- *	finished registering. Once we have it, unregister the child
- *	subsystems and the bus itself.
+ *	Unregister the child subsystems and the bus itself.
  *	Finally, we call put_bus() to release the refcount
  */
 void bus_unregister(struct bus_type * bus)
 {
-	down(&bus_sem);
 	pr_debug("bus %s: unregistering\n",bus->name);
-	subsystem_unregister(&bus->drvsubsys);
-	subsystem_unregister(&bus->devsubsys);
+	kset_unregister(&bus->drivers);
+	kset_unregister(&bus->devices);
 	subsystem_unregister(&bus->subsys);
-	up(&bus_sem);
 }
 
 static int __init bus_subsys_init(void)
@@ -543,12 +545,16 @@
 EXPORT_SYMBOL(bus_for_each_dev);
 EXPORT_SYMBOL(bus_for_each_drv);
 
+EXPORT_SYMBOL(device_bind_driver);
+EXPORT_SYMBOL(device_release_driver);
+
 EXPORT_SYMBOL(bus_add_device);
 EXPORT_SYMBOL(bus_remove_device);
 EXPORT_SYMBOL(bus_register);
 EXPORT_SYMBOL(bus_unregister);
 EXPORT_SYMBOL(get_bus);
 EXPORT_SYMBOL(put_bus);
+EXPORT_SYMBOL(find_bus);
 
 EXPORT_SYMBOL(bus_create_file);
 EXPORT_SYMBOL(bus_remove_file);
diff -Nru a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/base/class.c	Wed Jan  8 20:04:45 2003
@@ -10,10 +10,8 @@
 #include <linux/string.h>
 #include "base.h"
 
-static LIST_HEAD(class_list);
-
 #define to_class_attr(_attr) container_of(_attr,struct devclass_attribute,attr)
-#define to_class(obj) container_of(obj,struct device_class,subsys.kobj)
+#define to_class(obj) container_of(obj,struct device_class,subsys.kset.kobj)
 
 static ssize_t
 devclass_attr_show(struct kobject * kobj, struct attribute * attr,
@@ -46,38 +44,39 @@
 	.store	= devclass_attr_store,
 };
 
-static struct subsystem class_subsys = {
-	.kobj	= { .name = "class", },
+static struct kobj_type ktype_devclass = {
 	.sysfs_ops	= &class_sysfs_ops,
 };
 
+static decl_subsys(class,&ktype_devclass);
+
 
 static int devclass_dev_link(struct device_class * cls, struct device * dev)
 {
 	char	linkname[16];
 	snprintf(linkname,16,"%u",dev->class_num);
-	return sysfs_create_link(&cls->devsubsys.kobj,&dev->kobj,linkname);
+	return sysfs_create_link(&cls->devices.kobj,&dev->kobj,linkname);
 }
 
 static void devclass_dev_unlink(struct device_class * cls, struct device * dev)
 {
 	char	linkname[16];
 	snprintf(linkname,16,"%u",dev->class_num);
-	sysfs_remove_link(&cls->devsubsys.kobj,linkname);
+	sysfs_remove_link(&cls->devices.kobj,linkname);
 }
 
 static int devclass_drv_link(struct device_driver * drv)
 {
 	char	name[KOBJ_NAME_LEN * 3];
 	snprintf(name,KOBJ_NAME_LEN * 3,"%s:%s",drv->bus->name,drv->name);
-	return sysfs_create_link(&drv->devclass->drvsubsys.kobj,&drv->kobj,name);
+	return sysfs_create_link(&drv->devclass->drivers.kobj,&drv->kobj,name);
 }
 
 static void devclass_drv_unlink(struct device_driver * drv)
 {
 	char	name[KOBJ_NAME_LEN * 3];
 	snprintf(name,KOBJ_NAME_LEN * 3,"%s:%s",drv->bus->name,drv->name);
-	return sysfs_remove_link(&drv->devclass->drvsubsys.kobj,name);
+	return sysfs_remove_link(&drv->devclass->drivers.kobj,name);
 }
 
 
@@ -85,7 +84,7 @@
 {
 	int error;
 	if (cls) {
-		error = sysfs_create_file(&cls->subsys.kobj,&attr->attr);
+		error = sysfs_create_file(&cls->subsys.kset.kobj,&attr->attr);
 	} else
 		error = -EINVAL;
 	return error;
@@ -94,7 +93,7 @@
 void devclass_remove_file(struct device_class * cls, struct devclass_attribute * attr)
 {
 	if (cls)
-		sysfs_remove_file(&cls->subsys.kobj,&attr->attr);
+		sysfs_remove_file(&cls->subsys.kset.kobj,&attr->attr);
 }
 
 
@@ -105,7 +104,7 @@
 		down_write(&cls->subsys.rwsem);
 		pr_debug("device class %s: adding driver %s:%s\n",
 			 cls->name,drv->bus->name,drv->name);
-		list_add_tail(&drv->class_list,&cls->drivers);
+		list_add_tail(&drv->class_list,&cls->drivers.list);
 		devclass_drv_link(drv);
 		up_write(&cls->subsys.rwsem);
 	}
@@ -174,7 +173,7 @@
 				interface_add_dev(dev);
 			}
 
-			list_add_tail(&dev->class_list,&cls->devices);
+			list_add_tail(&dev->class_list,&cls->devices.list);
 
 			/* notify userspace (call /sbin/hotplug) */
 			class_hotplug (dev, "add");
@@ -226,21 +225,18 @@
 
 int devclass_register(struct device_class * cls)
 {
-	INIT_LIST_HEAD(&cls->drivers);
-	INIT_LIST_HEAD(&cls->devices);
-
 	pr_debug("device class '%s': registering\n",cls->name);
-	strncpy(cls->subsys.kobj.name,cls->name,KOBJ_NAME_LEN);
-	cls->subsys.parent = &class_subsys;
+	strncpy(cls->subsys.kset.kobj.name,cls->name,KOBJ_NAME_LEN);
+	subsys_set_kset(cls,class_subsys);
 	subsystem_register(&cls->subsys);
 
-	snprintf(cls->devsubsys.kobj.name,KOBJ_NAME_LEN,"devices");
-	cls->devsubsys.parent = &cls->subsys;
-	subsystem_register(&cls->devsubsys);
-
-	snprintf(cls->drvsubsys.kobj.name,KOBJ_NAME_LEN,"drivers");
-	cls->drvsubsys.parent = &cls->subsys;
-	subsystem_register(&cls->drvsubsys);
+	snprintf(cls->devices.kobj.name,KOBJ_NAME_LEN,"devices");
+	cls->devices.subsys = &cls->subsys;
+	kset_register(&cls->devices);
+
+	snprintf(cls->drivers.kobj.name,KOBJ_NAME_LEN,"drivers");
+	cls->drivers.subsys = &cls->subsys;
+	kset_register(&cls->drivers);
 
 	return 0;
 }
@@ -248,8 +244,8 @@
 void devclass_unregister(struct device_class * cls)
 {
 	pr_debug("device class '%s': unregistering\n",cls->name);
-	subsystem_unregister(&cls->drvsubsys);
-	subsystem_unregister(&cls->devsubsys);
+	kset_unregister(&cls->drivers);
+	kset_unregister(&cls->devices);
 	subsystem_unregister(&cls->subsys);
 }
 
diff -Nru a/drivers/base/core.c b/drivers/base/core.c
--- a/drivers/base/core.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/base/core.c	Wed Jan  8 20:04:32 2003
@@ -81,19 +81,18 @@
 		dev->release(dev);
 }
 
-
-/**
- *	device_subsys - structure to be registered with kobject core.
- */
-struct subsystem device_subsys = {
-	.kobj		= {
-		.name	= "devices",
-	},
+static struct kobj_type ktype_device = {
 	.release	= device_release,
 	.sysfs_ops	= &dev_sysfs_ops,
 	.default_attrs	= dev_default_attrs,
 };
 
+/**
+ *	device_subsys - structure to be registered with kobject core.
+ */
+
+decl_subsys(devices,&ktype_device);
+
 
 /**
  *	device_create_file - create sysfs attribute file for device.
@@ -175,7 +174,7 @@
 
 	/* first, register with generic layer. */
 	strncpy(dev->kobj.name,dev->bus_id,KOBJ_NAME_LEN);
-	dev->kobj.subsys = &device_subsys;
+	kobj_set_kset_s(dev,devices_subsys);
 	if (parent)
 		dev->kobj.parent = &parent->kobj;
 
@@ -314,7 +313,7 @@
 
 static int __init device_subsys_init(void)
 {
-	return subsystem_register(&device_subsys);
+	return subsystem_register(&devices_subsys);
 }
 
 core_initcall(device_subsys_init);
diff -Nru a/drivers/base/firmware.c b/drivers/base/firmware.c
--- a/drivers/base/firmware.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/base/firmware.c	Wed Jan  8 20:04:44 2003
@@ -6,13 +6,11 @@
 #include <linux/module.h>
 #include <linux/init.h>
 
-static struct subsystem firmware_subsys = {
-	.kobj	= { .name = "firmware" },
-};
+static decl_subsys(firmware,NULL);
 
 int firmware_register(struct subsystem * s)
 {
-	s->parent = &firmware_subsys;
+	kset_set_kset_s(s,firmware_subsys);
 	return subsystem_register(s);
 }
 
diff -Nru a/drivers/base/intf.c b/drivers/base/intf.c
--- a/drivers/base/intf.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/base/intf.c	Wed Jan  8 20:04:45 2003
@@ -10,13 +10,10 @@
 #include "base.h"
 
 
-#define to_intf(node) container_of(node,struct device_interface,subsys.kobj.entry)
+#define to_intf(node) container_of(node,struct device_interface,kset.kobj.entry)
 
 #define to_data(e) container_of(e,struct intf_data,kobj.entry)
 
-#define intf_from_data(d) container_of(d->kobj.subsys,struct device_interface, subsys);
-
-
 /**
  *	intf_dev_link - create sysfs symlink for interface.
  *	@data:	interface data descriptor.
@@ -28,7 +25,7 @@
 {
 	char	name[16];
 	snprintf(name,16,"%d",data->intf_num);
-	return sysfs_create_link(&data->intf->subsys.kobj,&data->dev->kobj,name);
+	return sysfs_create_link(&data->intf->kset.kobj,&data->dev->kobj,name);
 }
 
 /**
@@ -41,7 +38,7 @@
 {
 	char	name[16];
 	snprintf(name,16,"%d",data->intf_num);
-	sysfs_remove_link(&data->intf->subsys.kobj,name);
+	sysfs_remove_link(&data->intf->kset.kobj,name);
 }
 
 
@@ -61,15 +58,18 @@
 
 int interface_add_data(struct intf_data * data)
 {
-	struct device_interface * intf = intf_from_data(data);
-
-	data->intf_num = data->intf->devnum++;
-	data->kobj.subsys = &intf->subsys;
-	kobject_register(&data->kobj);
+	struct device_interface * intf = data->intf;
 
-	list_add_tail(&data->dev_entry,&data->dev->intf_list);
-	intf_dev_link(data);
-	return 0;
+	if (intf) {
+		data->intf_num = intf->devnum++;
+		data->kobj.kset = &intf->kset;
+		kobject_register(&data->kobj);
+
+		list_add_tail(&data->dev_entry,&data->dev->intf_list);
+		intf_dev_link(data);
+		return 0;
+	}
+	return -EINVAL;
 }
 
 
@@ -121,9 +121,9 @@
 
 static void del(struct intf_data * data)
 {
-	struct device_interface * intf = intf_from_data(data);
+	struct device_interface * intf = data->intf;
 
-	pr_debug(" -> %s ",data->intf->name);
+	pr_debug(" -> %s ",intf->name);
 	interface_remove_data(data);
 	if (intf->remove_device)
 		intf->remove_device(data);
@@ -147,7 +147,7 @@
 	struct list_head * entry;
 
 	down_write(&cls->subsys.rwsem);
-	list_for_each(entry,&cls->devices)
+	list_for_each(entry,&cls->devices.list)
 		add(intf,to_dev(entry));
 	up_write(&cls->subsys.rwsem);
 }
@@ -169,9 +169,9 @@
 		pr_debug("register interface '%s' with class '%s'\n",
 			 intf->name,cls->name);
 
-		strncpy(intf->subsys.kobj.name,intf->name,KOBJ_NAME_LEN);
-		intf->subsys.kobj.subsys = &cls->subsys;
-		subsystem_register(&intf->subsys);
+		strncpy(intf->kset.kobj.name,intf->name,KOBJ_NAME_LEN);
+		kset_set_kset_s(intf,cls->subsys);
+		kset_register(&intf->kset);
 		add_intf(intf);
 	}
 	return 0;
@@ -192,7 +192,7 @@
 	struct list_head * entry;
 
 	down_write(&intf->devclass->subsys.rwsem);
-	list_for_each(entry,&intf->subsys.list) {
+	list_for_each(entry,&intf->kset.list) {
 		struct intf_data * data = to_data(entry);
 		del(data);
 	}
@@ -215,7 +215,7 @@
 		pr_debug("unregistering interface '%s' from class '%s'\n",
 			 intf->name,cls->name);
 		del_intf(intf);
-		subsystem_unregister(&intf->subsys);
+		kset_unregister(&intf->kset);
 		put_devclass(cls);
 	}
 }
@@ -241,7 +241,7 @@
 
 	pr_debug("interfaces: adding device %s\n",dev->name);
 
-	list_for_each(node,&cls->subsys.list) {
+	list_for_each(node,&cls->subsys.kset.list) {
 		struct device_interface * intf = to_intf(node);
 		add(intf,dev);
 	}
diff -Nru a/drivers/base/power.c b/drivers/base/power.c
--- a/drivers/base/power.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/base/power.c	Wed Jan  8 20:04:44 2003
@@ -17,7 +17,7 @@
 
 #define to_dev(node) container_of(node,struct device,kobj.entry)
 
-extern struct subsystem device_subsys;
+extern struct subsystem devices_subsys;
 
 /**
  * device_suspend - suspend/remove all devices on the device ree
@@ -37,8 +37,8 @@
 
 	printk(KERN_EMERG "Suspending devices\n");
 
-	down_write(&device_subsys.rwsem);
-	list_for_each(node,&device_subsys.list) {
+	down_write(&devices_subsys.rwsem);
+	list_for_each(node,&devices_subsys.kset.list) {
 		struct device * dev = to_dev(node);
 		if (dev->driver && dev->driver->suspend) {
 			pr_debug("suspending device %s\n",dev->name);
@@ -47,7 +47,7 @@
 				printk(KERN_ERR "%s: suspend returned %d\n",dev->name,error);
 		}
 	}
-	up_write(&device_subsys.rwsem);
+	up_write(&devices_subsys.rwsem);
 	return error;
 }
 
@@ -63,15 +63,15 @@
 {
 	struct list_head * node;
 
-	down_write(&device_subsys.rwsem);
-	list_for_each_prev(node,&device_subsys.list) {
+	down_write(&devices_subsys.rwsem);
+	list_for_each_prev(node,&devices_subsys.kset.list) {
 		struct device * dev = to_dev(node);
 		if (dev->driver && dev->driver->resume) {
 			pr_debug("resuming device %s\n",dev->name);
 			dev->driver->resume(dev,level);
 		}
 	}
-	up_write(&device_subsys.rwsem);
+	up_write(&devices_subsys.rwsem);
 
 	printk(KERN_EMERG "Devices Resumed\n");
 }
@@ -85,15 +85,15 @@
 	
 	printk(KERN_EMERG "Shutting down devices\n");
 
-	down_write(&device_subsys.rwsem);
-	list_for_each(entry,&device_subsys.list) {
+	down_write(&devices_subsys.rwsem);
+	list_for_each(entry,&devices_subsys.kset.list) {
 		struct device * dev = to_dev(entry);
 		if (dev->driver && dev->driver->shutdown) {
 			pr_debug("shutting down %s\n",dev->name);
 			dev->driver->shutdown(dev);
 		}
 	}
-	up_write(&device_subsys.rwsem);
+	up_write(&devices_subsys.rwsem);
 }
 
 EXPORT_SYMBOL(device_suspend);
diff -Nru a/drivers/block/genhd.c b/drivers/block/genhd.c
--- a/drivers/block/genhd.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/block/genhd.c	Wed Jan  8 20:04:44 2003
@@ -27,12 +27,8 @@
 #include <linux/kmod.h>
 
 
-static rwlock_t gendisk_lock;
+static struct subsystem block_subsys;
 
-/*
- * Global kernel list of partitioning information.
- */
-static LIST_HEAD(gendisk_list);
 
 struct blk_probe {
 	struct blk_probe *next;
@@ -63,19 +59,19 @@
 	p->dev = dev;
 	p->range = range;
 	p->data = data;
-	write_lock(&gendisk_lock);
+	down_write(&block_subsys.rwsem);
 	for (s = &probes[index]; *s && (*s)->range < range; s = &(*s)->next)
 		;
 	p->next = *s;
 	*s = p;
-	write_unlock(&gendisk_lock);
+	up_write(&block_subsys.rwsem);
 }
 
 void blk_unregister_region(dev_t dev, unsigned long range)
 {
 	int index = dev_to_index(dev);
 	struct blk_probe **s;
-	write_lock(&gendisk_lock);
+	down_write(&block_subsys.rwsem);
 	for (s = &probes[index]; *s; s = &(*s)->next) {
 		struct blk_probe *p = *s;
 		if (p->dev == dev || p->range == range) {
@@ -84,7 +80,7 @@
 			break;
 		}
 	}
-	write_unlock(&gendisk_lock);
+	up_write(&block_subsys.rwsem);
 }
 
 EXPORT_SYMBOL(blk_register_region);
@@ -112,9 +108,6 @@
  */
 void add_disk(struct gendisk *disk)
 {
-	write_lock(&gendisk_lock);
-	list_add_tail(&disk->full_list, &gendisk_list);
-	write_unlock(&gendisk_lock);
 	disk->flags |= GENHD_FL_UP;
 	blk_register_region(MKDEV(disk->major, disk->first_minor), disk->minors,
 			NULL, exact_match, exact_lock, disk);
@@ -126,9 +119,6 @@
 
 void unlink_gendisk(struct gendisk *disk)
 {
-	write_lock(&gendisk_lock);
-	list_del_init(&disk->full_list);
-	write_unlock(&gendisk_lock);
 	blk_unregister_region(MKDEV(disk->major, disk->first_minor),
 			      disk->minors);
 }
@@ -149,7 +139,7 @@
 	unsigned best = ~0U;
 
 retry:
-	read_lock(&gendisk_lock);
+	down_read(&block_subsys.rwsem);
 	for (p = probes[index]; p; p = p->next) {
 		struct gendisk *(*probe)(dev_t, int *, void *);
 		struct module *owner;
@@ -157,7 +147,7 @@
 		if (p->dev > dev || p->dev + p->range <= dev)
 			continue;
 		if (p->range >= best) {
-			read_unlock(&gendisk_lock);
+			up_read(&block_subsys.rwsem);
 			return NULL;
 		}
 		if (!try_module_get(p->owner))
@@ -171,7 +161,7 @@
 			module_put(owner);
 			continue;
 		}
-		read_unlock(&gendisk_lock);
+		up_read(&block_subsys.rwsem);
 		disk = probe(dev, part, data);
 		/* Currently ->owner protects _only_ ->probe() itself. */
 		module_put(owner);
@@ -179,7 +169,7 @@
 			return disk;
 		goto retry;
 	}
-	read_unlock(&gendisk_lock);
+	up_read(&block_subsys.rwsem);
 	return NULL;
 }
 
@@ -190,23 +180,24 @@
 	struct list_head *p;
 	loff_t l = *pos;
 
-	read_lock(&gendisk_lock);
-	list_for_each(p, &gendisk_list)
+	down_read(&block_subsys.rwsem);
+	list_for_each(p, &block_subsys.kset.list)
 		if (!l--)
-			return list_entry(p, struct gendisk, full_list);
+			return list_entry(p, struct gendisk, kobj.entry);
 	return NULL;
 }
 
 static void *part_next(struct seq_file *part, void *v, loff_t *pos)
 {
-	struct list_head *p = ((struct gendisk *)v)->full_list.next;
+	struct list_head *p = ((struct gendisk *)v)->kobj.entry.next;
 	++*pos;
-	return p==&gendisk_list ? NULL : list_entry(p, struct gendisk, full_list);
+	return p==&block_subsys.kset.list ? NULL : 
+		list_entry(p, struct gendisk, kobj.entry);
 }
 
 static void part_stop(struct seq_file *part, void *v)
 {
-	read_unlock(&gendisk_lock);
+	up_read(&block_subsys.rwsem);
 }
 
 static int show_partition(struct seq_file *part, void *v)
@@ -215,7 +206,7 @@
 	int n;
 	char buf[64];
 
-	if (&sgp->full_list == gendisk_list.next)
+	if (&sgp->kobj.entry == block_subsys.kset.list.next)
 		seq_puts(part, "major minor  #blocks  name\n\n");
 
 	/* Don't show non-partitionable devices or empty devices */
@@ -258,13 +249,10 @@
 	return NULL;
 }
 
-struct subsystem block_subsys;
-
 int __init device_init(void)
 {
 	struct blk_probe *base = kmalloc(sizeof(struct blk_probe), GFP_KERNEL);
 	int i;
-	rwlock_init(&gendisk_lock);
 	memset(base, 0, sizeof(struct blk_probe));
 	base->dev = MKDEV(1,0);
 	base->range = MKDEV(MAX_BLKDEV-1, 255) - base->dev + 1;
@@ -384,13 +372,17 @@
 	kfree(disk);
 }
 
-struct subsystem block_subsys = {
-	.kobj	= { .name = "block" },
+static struct kobj_type ktype_block = {
 	.release	= disk_release,
 	.sysfs_ops	= &disk_sysfs_ops,
 	.default_attrs	= default_attrs,
 };
 
+
+/* declare block_subsys. */
+static decl_subsys(block,&ktype_block);
+
+
 struct gendisk *alloc_disk(int minors)
 {
 	struct gendisk *disk = kmalloc(sizeof(struct gendisk), GFP_KERNEL);
@@ -408,9 +400,8 @@
 		disk->minors = minors;
 		while (minors >>= 1)
 			disk->minor_shift++;
-		disk->kobj.subsys = &block_subsys;
+		kobj_set_kset_s(disk,block_subsys);
 		kobject_init(&disk->kobj);
-		INIT_LIST_HEAD(&disk->full_list);
 		rand_initialize_disk(disk);
 	}
 	return disk;
diff -Nru a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
--- a/drivers/cdrom/cdrom.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/cdrom/cdrom.c	Wed Jan  8 20:04:43 2003
@@ -727,6 +727,7 @@
 	cgc.cmd[0] = GPCMD_LOAD_UNLOAD;
 	cgc.cmd[4] = 2 + (slot >= 0);
 	cgc.cmd[8] = slot;
+	cgc.timeout = 60 * HZ;
 
 	/* The Sanyo 3 CD changer uses byte 7 of the 
 	GPCMD_TEST_UNIT_READY to command to switch CDs instead of
@@ -1901,6 +1902,7 @@
 {		
 	struct cdrom_device_ops *cdo = cdi->ops;
 	struct cdrom_generic_command cgc;
+	struct request_sense sense;
 	char buffer[32];
 	int ret = 0;
 
@@ -1935,9 +1937,11 @@
 		cgc.buffer = (char *) kmalloc(blocksize, GFP_KERNEL);
 		if (cgc.buffer == NULL)
 			return -ENOMEM;
+		memset(&sense, 0, sizeof(sense));
+		cgc.sense = &sense;
 		cgc.data_direction = CGC_DATA_READ;
 		ret = cdrom_read_block(cdi, &cgc, lba, 1, format, blocksize);
-		if (ret) {
+		if (ret && sense.sense_key==0x05 && sense.asc==0x20 && sense.ascq==0x00) {
 			/*
 			 * SCSI-II devices are not required to support
 			 * READ_CD, so let's try switching block size
diff -Nru a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig
--- a/drivers/char/agp/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/agp/Kconfig	Wed Jan  8 20:04:44 2003
@@ -61,6 +61,16 @@
 	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
 	  use GLX or DRI.  If unsure, say N.
 
+config AGP_VIA_KT400
+	tristate "VIA KT400 chipset support"
+	depends on AGP3
+	help
+	  This option gives you AGP support for the GLX component of the
+	  XFree86 4.x on VIA KT400 AGP 3.0 chipsets.
+
+	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
+	  use GLX or DRI.  If unsure, say N.
+
 config AGP_AMD
 	tristate "AMD Irongate, 761, and 762 support"
 	depends on AGP
diff -Nru a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile
--- a/drivers/char/agp/Makefile	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/agp/Makefile	Wed Jan  8 20:04:43 2003
@@ -12,6 +12,7 @@
 
 obj-$(CONFIG_AGP_INTEL)		+= intel-agp.o
 obj-$(CONFIG_AGP_VIA)		+= via-agp.o
+obj-$(CONFIG_AGP_VIA_KT400)	+= via-kt400.o
 obj-$(CONFIG_AGP_AMD)		+= amd-k7-agp.o
 obj-$(CONFIG_AGP_SIS)		+= sis-agp.o
 obj-$(CONFIG_AGP_ALI)		+= ali-agp.o
diff -Nru a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
--- a/drivers/char/agp/agp.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/agp/agp.h	Wed Jan  8 20:04:43 2003
@@ -1,5 +1,6 @@
 /*
- * AGPGART module version 0.99
+ * AGPGART module
+ * Copyright (C) 2002 Dave Jones
  * Copyright (C) 1999 Jeff Hartmann
  * Copyright (C) 1999 Precision Insight, Inc.
  * Copyright (C) 1999 Xi Graphics, Inc.
@@ -46,6 +47,7 @@
 int agp_generic_suspend(void);
 void agp_generic_resume(void);
 void agp_free_key(int key);
+int agp_num_entries(void);
 
 #define PFX "agpgart: "
 
@@ -128,9 +130,10 @@
 	void *dev_private_data;
 	struct pci_dev *dev;
 	struct gatt_mask *masks;
-	unsigned long *gatt_table;
-	unsigned long *gatt_table_real;
+	u32 *gatt_table;
+	u32 *gatt_table_real;
 	unsigned long scratch_page;
+	unsigned long scratch_page_real;
 	unsigned long gart_bus_addr;
 	unsigned long gatt_bus_addr;
 	u32 mode;
@@ -143,7 +146,6 @@
 	int needs_scratch_page;
 	int aperture_size_idx;
 	int num_aperture_sizes;
-	int num_of_masks;
 	int capndx;
 	int cant_use_aperture;
 
@@ -292,6 +294,9 @@
 #define VIA_ATTBASE	0x88
 
 /* VIA KT400 */
+#define VIA_AGP3_GARTCTRL	0x90
+#define VIA_AGP3_APSIZE	0x94
+#define VIA_AGP3_ATTBASE	0x98
 #define VIA_AGPSEL	0xfd
 
 /* SiS registers */
diff -Nru a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
--- a/drivers/char/agp/ali-agp.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/agp/ali-agp.c	Wed Jan  8 20:04:44 2003
@@ -198,7 +198,6 @@
 static int __init ali_generic_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = ali_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) ali_generic_sizes;
 	agp_bridge.size_type = U32_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
diff -Nru a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
--- a/drivers/char/agp/amd-k7-agp.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/agp/amd-k7-agp.c	Wed Jan  8 20:04:45 2003
@@ -308,7 +308,8 @@
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		addr = (j * PAGE_SIZE) + agp_bridge.gart_bus_addr;
 		cur_gatt = GET_GATT(addr);
-		cur_gatt[GET_GATT_OFF(addr)] = mem->memory[i];
+		cur_gatt[GET_GATT_OFF(addr)] =
+			agp_bridge.mask_memory(mem->memory[i], mem->type);
 	}
 	agp_bridge.tlb_flush(mem);
 	return 0;
@@ -354,7 +355,6 @@
 static int __init amd_irongate_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = amd_irongate_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) amd_irongate_sizes;
 	agp_bridge.size_type = LVL2_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
diff -Nru a/drivers/char/agp/amd-k8-agp.c b/drivers/char/agp/amd-k8-agp.c
--- a/drivers/char/agp/amd-k8-agp.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/agp/amd-k8-agp.c	Wed Jan  8 20:04:44 2003
@@ -8,14 +8,18 @@
  * removed now).
  */ 
 
+/*
+ * On x86-64 the AGP driver needs to be initialized early by the IOMMU 
+ * code.  When you use this driver as a template for a new K8 AGP bridge
+ * driver don't forget to change arch/x86_64/kernel/pci-gart.c too -AK.
+ */
+
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/agp_backend.h>
 #include "agp.h"
 
-extern int agp_memory_reserved;
-
 static u_int64_t pci_read64 (struct pci_dev *dev, int reg)
 {
 	union {
@@ -48,22 +52,18 @@
 static int x86_64_insert_memory(agp_memory * mem, off_t pg_start, int type)
 {
 	int i, j, num_entries;
-	void *temp;
 	long tmp;
 	u32 pte;
 	u64 addr;
 
-	temp = agp_bridge.current_size;
-
-	num_entries = A_SIZE_32(temp)->num_entries;
-
-	num_entries -= agp_memory_reserved>>PAGE_SHIFT;
+	num_entries = agp_num_entries();
 
 	if (type != 0 || mem->type != 0)
 		return -EINVAL;
 
 	/* Make sure we can fit the range in the gatt table. */
-	if ((pg_start + mem->page_count) > num_entries)
+	/* FIXME: could wrap */
+	if (((unsigned long)pg_start + mem->page_count) > num_entries)
 		return -EINVAL;
 
 	j = pg_start;
@@ -81,7 +81,7 @@
 	}
 
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		addr = mem->memory[i];
+		addr = agp_bridge.mask_memory(mem->memory[i], mem->type);
 
 		tmp = addr;
 		BUG_ON(tmp & 0xffffff0000000ffc);
@@ -446,7 +446,6 @@
 static int __init amd_8151_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = amd_8151_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) amd_8151_sizes;
 	agp_bridge.size_type = U32_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -512,7 +511,8 @@
 	.probe		= agp_amdk8_probe,
 };
 
-static int __init agp_amdk8_init(void)
+/* Not static due to IOMMU code calling it early. */
+int __init agp_amdk8_init(void)
 {
 	int ret_val;
 
@@ -531,8 +531,12 @@
 	pci_unregister_driver(&agp_amdk8_pci_driver);
 }
 
+/* On x86-64 the PCI driver needs to initialize this driver early
+   for the IOMMU, so it has to be called via a backdoor. */
+#ifndef CONFIG_GART_IOMMU
 module_init(agp_amdk8_init);
 module_exit(agp_amdk8_cleanup);
+#endif
 
 MODULE_AUTHOR("Dave Jones <davej@codemonkey.org.uk>");
 MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
--- a/drivers/char/agp/backend.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/agp/backend.c	Wed Jan  8 20:04:44 2003
@@ -1,5 +1,5 @@
 /*
- * AGPGART module version 1.0
+ * AGPGART driver backend routines.
  * Copyright (C) 2002 Dave Jones.
  * Copyright (C) 1999 Jeff Hartmann.
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -86,7 +86,7 @@
 {
 	long memory, index, result;
 
-	memory = virt_to_phys(high_memory) >> 20;
+	memory = (num_physpages << PAGE_SHIFT) >> 20;
 	index = 1;
 
 	while ((memory > maxes_table[index].mem) && (index < 8))
@@ -123,8 +123,9 @@
 			printk(KERN_ERR PFX "unable to get memory for scratch page.\n");
 			return -ENOMEM;
 		}
-		agp_bridge.scratch_page = virt_to_phys(addr);
-		agp_bridge.scratch_page = agp_bridge.mask_memory(agp_bridge.scratch_page, 0);
+		agp_bridge.scratch_page_real = virt_to_phys(addr);
+		agp_bridge.scratch_page =
+			agp_bridge.mask_memory(agp_bridge.scratch_page_real, 0);
 	}
 
 	size_value = agp_bridge.fetch_size();
@@ -165,8 +166,7 @@
 
 err_out:
 	if (agp_bridge.needs_scratch_page == TRUE) {
-		agp_bridge.scratch_page &= ~(0x00000fff);
-		agp_bridge.agp_destroy_page(phys_to_virt(agp_bridge.scratch_page));
+		agp_bridge.agp_destroy_page(phys_to_virt(agp_bridge.scratch_page_real));
 	}
 	if (got_gatt)
 		agp_bridge.free_gatt_table();
@@ -184,8 +184,7 @@
 	vfree(agp_bridge.key_list);
 
 	if (agp_bridge.needs_scratch_page == TRUE) {
-		agp_bridge.scratch_page &= ~(0x00000fff);
-		agp_bridge.agp_destroy_page(phys_to_virt(agp_bridge.scratch_page));
+		agp_bridge.agp_destroy_page(phys_to_virt(agp_bridge.scratch_page_real));
 	}
 }
 
diff -Nru a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
--- a/drivers/char/agp/frontend.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/agp/frontend.c	Wed Jan  8 20:04:43 2003
@@ -1,5 +1,6 @@
 /*
- * AGPGART module frontend version 0.99
+ * AGPGART driver frontend
+ * Copyright (C) 2002 Dave Jones
  * Copyright (C) 1999 Jeff Hartmann
  * Copyright (C) 1999 Precision Insight, Inc.
  * Copyright (C) 1999 Xi Graphics, Inc.
diff -Nru a/drivers/char/agp/generic-3.0.c b/drivers/char/agp/generic-3.0.c
--- a/drivers/char/agp/generic-3.0.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/agp/generic-3.0.c	Wed Jan  8 20:04:43 2003
@@ -1,3 +1,7 @@
+/*
+ * Generic routines for AGP 3.0 compliant bridges.
+ */
+
 #include <linux/list.h>
 #include <linux/pci.h>
 #include <linux/agp_backend.h>
@@ -393,8 +397,7 @@
 
 		if(mcapndx == 0) {
 			printk(KERN_ERR PFX "woah!  Non-AGP device "
-				"found on the secondary bus of an AGP 3.0 "
-				"bridge!\n");
+				"found on the secondary bus of an AGP 3.0 bridge!\n");
 			ret = -ENODEV;
 			goto free_and_exit;
 		}
@@ -442,9 +445,8 @@
 		rate = 0x2;
 		break;
 	default:
-		printk(KERN_ERR PFX "woah!  Bogus AGP rate "
-			"value found advertised behind an AGP 3.0 "
-			"bridge!\n");
+		printk(KERN_ERR PFX "woah!  Bogus AGP rate (%d) "
+			"value found advertised behind an AGP 3.0 bridge!\n", rate);
 		ret = -ENODEV;
 		goto free_and_exit;
 	}
@@ -455,12 +457,10 @@
 	 * whether isochronous transfers are supported.
 	 */
 	if(isoch != 0) {
-		if((ret = agp_3_0_isochronous_node_enable(dev_list,
-		                                          ndevs)) != 0)
+		if((ret = agp_3_0_isochronous_node_enable(dev_list, ndevs)) != 0)
 			goto free_and_exit;
 	} else {
-		if((ret = agp_3_0_nonisochronous_node_enable(dev_list,
-		                                             ndevs)) != 0)
+		if((ret = agp_3_0_nonisochronous_node_enable(dev_list,ndevs)) != 0)
 			goto free_and_exit;
 	}
 
@@ -534,8 +534,7 @@
 	major = (ncapid >> 20) & 0xf;
 	minor = (ncapid >> 16) & 0xf;
 
-	printk(KERN_INFO PFX "Found an AGP %d.%d compliant device.\n",
-		  major, minor);
+	printk(KERN_INFO PFX "Found an AGP %d.%d compliant device.\n",major, minor);
 
 	if(major >= 3) {
 		pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx + 0x4, &agp_3_0);
diff -Nru a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
--- a/drivers/char/agp/generic.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/agp/generic.c	Wed Jan  8 20:04:43 2003
@@ -1,5 +1,5 @@
 /*
- * AGPGART module version 1.0
+ * AGPGART driver.
  * Copyright (C) 2002 Dave Jones.
  * Copyright (C) 1999 Jeff Hartmann.
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -110,7 +110,6 @@
 	}
 	if (curr->page_count != 0) {
 		for (i = 0; i < curr->page_count; i++) {
-			curr->memory[i] &= ~(0x00000fff);
 			agp_bridge.agp_destroy_page(phys_to_virt(curr->memory[i]));
 		}
 	}
@@ -158,7 +157,7 @@
 			agp_free_memory(new);
 			return NULL;
 		}
-		new->memory[i] = agp_bridge.mask_memory(virt_to_phys(addr), type);
+		new->memory[i] = virt_to_phys(addr);
 		new->page_count++;
 	}
 
@@ -203,13 +202,44 @@
 	return current_size;
 }
 
+int agp_num_entries(void)
+{
+	int num_entries;
+	void *temp;
+
+	temp = agp_bridge.current_size;
+
+	switch (agp_bridge.size_type) {
+	case U8_APER_SIZE:
+		num_entries = A_SIZE_8(temp)->num_entries;
+		break;
+	case U16_APER_SIZE:
+		num_entries = A_SIZE_16(temp)->num_entries;
+		break;
+	case U32_APER_SIZE:
+		num_entries = A_SIZE_32(temp)->num_entries;
+		break;
+	case LVL2_APER_SIZE:
+		num_entries = A_SIZE_LVL2(temp)->num_entries;
+		break;
+	case FIXED_APER_SIZE:
+		num_entries = A_SIZE_FIX(temp)->num_entries;
+		break;
+	default:
+		num_entries = 0;
+		break;
+	}
+
+	num_entries -= agp_memory_reserved>>PAGE_SHIFT;
+	if (num_entries<0)
+		num_entries = 0;
+	return num_entries;
+}
+
 /* Routine to copy over information structure */
 
 int agp_copy_info(agp_kern_info * info)
 {
-	unsigned long page_mask = 0;
-	int i;
-
 	memset(info, 0, sizeof(agp_kern_info));
 	if (agp_bridge.type == NOT_SUPPORTED) {
 		info->chipset = agp_bridge.type;
@@ -225,11 +255,7 @@
 	info->max_memory = agp_bridge.max_memory_agp;
 	info->current_memory = atomic_read(&agp_bridge.current_memory_agp);
 	info->cant_use_aperture = agp_bridge.cant_use_aperture;
-
-	for(i = 0; i < agp_bridge.num_of_masks; i++)
-		page_mask |= agp_bridge.mask_memory(page_mask, i);
-
-	info->page_mask = ~page_mask;
+	info->page_mask = ~0UL;
 	return 0;
 }
 
@@ -469,7 +495,7 @@
 	for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
 		SetPageReserved(page);
 
-	agp_bridge.gatt_table_real = (unsigned long *) table;
+	agp_bridge.gatt_table_real = (u32 *) table;
 	agp_gatt_table = (void *)table; 
 	CACHE_FLUSH();
 	agp_bridge.gatt_table = ioremap_nocache(virt_to_phys(table),
@@ -486,6 +512,7 @@
 	}
 	agp_bridge.gatt_bus_addr = virt_to_phys(agp_bridge.gatt_table_real);
 
+	/* AK: bogus, should encode addresses > 4GB */
 	for (i = 0; i < num_entries; i++)
 		agp_bridge.gatt_table[i] = (unsigned long) agp_bridge.scratch_page;
 
@@ -586,6 +613,7 @@
 		return -EINVAL;
 	}
 
+	/* AK: could wrap */
 	if ((pg_start + mem->page_count) > num_entries)
 		return -EINVAL;
 
@@ -604,7 +632,8 @@
 	}
 
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
-		agp_bridge.gatt_table[j] = mem->memory[i];
+		agp_bridge.gatt_table[j] =
+				agp_bridge.mask_memory(mem->memory[i], mem->type);
 
 	agp_bridge.tlb_flush(mem);
 	return 0;
@@ -618,6 +647,8 @@
 		/* The generic routines know nothing of memory types */
 		return -EINVAL;
 	}
+
+	/* AK: bogus, should encode addresses > 4GB */
 	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
 		agp_bridge.gatt_table[i] =
 		    (unsigned long) agp_bridge.scratch_page;
@@ -712,4 +743,6 @@
 EXPORT_SYMBOL(agp_generic_alloc_by_type);
 EXPORT_SYMBOL(agp_generic_free_by_type);
 EXPORT_SYMBOL(global_cache_flush);
+
+EXPORT_SYMBOL_GPL(agp_num_entries);
 
diff -Nru a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
--- a/drivers/char/agp/hp-agp.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/agp/hp-agp.c	Wed Jan  8 20:04:45 2003
@@ -331,7 +331,6 @@
 static int __init hp_zx1_setup (struct pci_dev *pdev __attribute__((unused)))
 {
 	agp_bridge.masks = hp_zx1_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.dev_private_data = NULL;
 	agp_bridge.size_type = FIXED_APER_SIZE;
 	agp_bridge.needs_scratch_page = FALSE;
diff -Nru a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
--- a/drivers/char/agp/i460-agp.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/agp/i460-agp.c	Wed Jan  8 20:04:44 2003
@@ -525,7 +525,6 @@
 
 static int __init intel_i460_setup (struct pci_dev *pdev __attribute__((unused)))
 {
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.masks = i460_masks;
 	agp_bridge.aperture_sizes = (void *) i460_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
diff -Nru a/drivers/char/agp/i7x05-agp.c b/drivers/char/agp/i7x05-agp.c
--- a/drivers/char/agp/i7x05-agp.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/agp/i7x05-agp.c	Wed Jan  8 20:04:43 2003
@@ -96,7 +96,6 @@
 static int __init intel_7505_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_7505_sizes;
 	agp_bridge.size_type = U16_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
diff -Nru a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
--- a/drivers/char/agp/intel-agp.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/agp/intel-agp.c	Wed Jan  8 20:04:44 2003
@@ -153,7 +153,8 @@
 	CACHE_FLUSH();
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		OUTREG32(intel_i810_private.registers,
-			 I810_PTE_BASE + (j * 4), mem->memory[i]);
+			I810_PTE_BASE + (j * 4),
+			agp_bridge.mask_memory(mem->memory[i], mem->type));
 	}
 	CACHE_FLUSH();
 
@@ -219,11 +220,11 @@
 			agp_free_memory(new);
 			return NULL;
 		}
-		new->memory[0] = agp_bridge.mask_memory(virt_to_phys(addr), type);
+		new->memory[0] = virt_to_phys(addr);
 		new->page_count = 1;
 		new->num_scratch_pages = 1;
 		new->type = AGP_PHYS_MEMORY;
-		new->physical = virt_to_phys((void *) new->memory[0]);
+		new->physical = new->memory[0];
 		return new;
 	}
 	return NULL;
@@ -251,7 +252,6 @@
 	intel_i810_private.i810_dev = i810_dev;
 
 	agp_bridge.masks = intel_i810_masks;
-	agp_bridge.num_of_masks = 2;
 	agp_bridge.aperture_sizes = (void *) intel_i810_sizes;
 	agp_bridge.size_type = FIXED_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 2;
@@ -454,7 +454,8 @@
 	CACHE_FLUSH();
 
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
-		OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (j * 4),mem->memory[i]);
+		OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (j * 4),
+			agp_bridge.mask_memory(mem->memory[i], mem->type));
 
 	CACHE_FLUSH();
 
@@ -514,11 +515,11 @@
 			return(NULL);
 		}
 
-		nw->memory[0] = agp_bridge.mask_memory(virt_to_phys(addr),type);
+		nw->memory[0] = virt_to_phys(addr);
 		nw->page_count = 1;
 		nw->num_scratch_pages = 1;
 		nw->type = AGP_PHYS_MEMORY;
-		nw->physical = virt_to_phys(addr);
+		nw->physical = nw->memory[0];
 		return(nw);
 	}
 
@@ -530,7 +531,6 @@
 	intel_i830_private.i830_dev = i830_dev;
 
 	agp_bridge.masks = intel_i810_masks;
-	agp_bridge.num_of_masks = 3;
 	agp_bridge.aperture_sizes = (void *) intel_i830_sizes;
 	agp_bridge.size_type = FIXED_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 2;
@@ -974,7 +974,6 @@
 static int __init intel_generic_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_generic_sizes;
 	agp_bridge.size_type = U16_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -1004,7 +1003,6 @@
 static int __init intel_815_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_815_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 2;
@@ -1035,7 +1033,6 @@
 static int __init intel_820_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_8xx_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -1065,7 +1062,6 @@
 static int __init intel_830mp_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_830mp_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 4;
@@ -1095,7 +1091,6 @@
 static int __init intel_840_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_8xx_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -1125,7 +1120,6 @@
 static int __init intel_845_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_8xx_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -1155,7 +1149,6 @@
 static int __init intel_850_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_8xx_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -1185,7 +1178,6 @@
 static int __init intel_860_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = intel_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) intel_8xx_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -1467,7 +1459,9 @@
 	.probe		= agp_intel_probe,
 };
 
-static int __init agp_intel_init(void)
+/* intel_agp_init() must not be declared static for explicit
+   early initialization to work (ie i810fb) */
+int __init agp_intel_init(void)
 {
 	int ret_val;
 	static int agp_initialised=0;
diff -Nru a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c
--- a/drivers/char/agp/sis-agp.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/char/agp/sis-agp.c	Wed Jan  8 20:04:32 2003
@@ -89,7 +89,6 @@
 static int __init sis_generic_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = sis_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) sis_generic_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
diff -Nru a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
--- a/drivers/char/agp/sworks-agp.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/agp/sworks-agp.c	Wed Jan  8 20:04:43 2003
@@ -363,7 +363,8 @@
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		addr = (j * PAGE_SIZE) + agp_bridge.gart_bus_addr;
 		cur_gatt = SVRWRKS_GET_GATT(addr);
-		cur_gatt[GET_GATT_OFF(addr)] = mem->memory[i];
+		cur_gatt[GET_GATT_OFF(addr)] =
+			agp_bridge.mask_memory(mem->memory[i], mem->type);
 	}
 	agp_bridge.tlb_flush(mem);
 	return 0;
@@ -520,7 +521,6 @@
 	serverworks_private.svrwrks_dev = pdev;
 
 	agp_bridge.masks = serverworks_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) serverworks_sizes;
 	agp_bridge.size_type = LVL2_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
diff -Nru a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
--- a/drivers/char/agp/via-agp.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/agp/via-agp.c	Wed Jan  8 20:04:45 2003
@@ -97,7 +97,6 @@
 static int __init via_generic_setup (struct pci_dev *pdev)
 {
 	agp_bridge.masks = via_generic_masks;
-	agp_bridge.num_of_masks = 1;
 	agp_bridge.aperture_sizes = (void *) via_generic_sizes;
 	agp_bridge.size_type = U8_APER_SIZE;
 	agp_bridge.num_aperture_sizes = 7;
@@ -124,65 +123,23 @@
 	return 0;
 }
 
-#ifdef CONFIG_AGP3
 /*
  * The KT400 does magick to put the AGP bridge compliant with the same
  * standards version as the graphics card. If we haven't fallen into
- * 2.0 compatability mode, we run the normal 3.0 code, and fall back
- * if something nasty happens.
+ * 2.0 compatability mode, we abort, as this gets picked up by
+ * via-agp3.o
  */
-static void __init via_kt400_enable(u32 mode)
-{
-	if ((agp_generic_agp_3_0_enable(mode))==FALSE)
-		/* Something weird happened, fall back to 2.0 */
-		agp_generic_agp_enable(mode);
-}
-#endif
 
 static int __init via_kt400_setup(struct pci_dev *pdev)
 {
 	u8 reg;
-
-	agp_bridge.masks = via_generic_masks;
-	agp_bridge.num_of_masks = 1;
-	agp_bridge.aperture_sizes = (void *) via_generic_sizes;
-	agp_bridge.size_type = U8_APER_SIZE;
-	agp_bridge.num_aperture_sizes = 7;
-	agp_bridge.dev_private_data = NULL;
-	agp_bridge.needs_scratch_page = FALSE;
-	agp_bridge.configure = via_configure;
-	agp_bridge.fetch_size = via_fetch_size;
-	agp_bridge.cleanup = via_cleanup;
-	agp_bridge.tlb_flush = via_tlbflush;
-	agp_bridge.mask_memory = via_mask_memory;
-	agp_bridge.cache_flush = global_cache_flush;
-	agp_bridge.create_gatt_table = agp_generic_create_gatt_table;
-	agp_bridge.free_gatt_table = agp_generic_free_gatt_table;
-	agp_bridge.insert_memory = agp_generic_insert_memory;
-	agp_bridge.remove_memory = agp_generic_remove_memory;
-	agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
-	agp_bridge.free_by_type = agp_generic_free_by_type;
-	agp_bridge.agp_alloc_page = agp_generic_alloc_page;
-	agp_bridge.agp_destroy_page = agp_generic_destroy_page;
-	agp_bridge.suspend = agp_generic_suspend;
-	agp_bridge.resume = agp_generic_resume;
-	agp_bridge.cant_use_aperture = 0;
-
 	pci_read_config_byte(pdev, VIA_AGPSEL, &reg);
+	/* Check AGP 2.0 compatability mode. */
 	if ((reg & (1<<1))==1) {
-		/* AGP 2.0 compatability mode. */
-		agp_bridge.agp_enable = agp_generic_agp_enable;
-
-	} else {
-#ifdef CONFIG_AGP3
-		/* AGP 3.0 mode */
-		agp_bridge.agp_enable = via_kt400_enable;
-#else
-		printk ("AGP: VIA KT400 in AGP3.0 mode support not compiled in.\n");
-		return -ENODEV;
-#endif
+		via_generic_setup(pdev);
+		return 0;
 	}
-	return 0;
+	return -ENODEV;
 }
 
 static struct agp_device_ids via_agp_device_ids[] __initdata =
@@ -243,6 +200,11 @@
 		.device_id	= PCI_DEVICE_ID_VIA_82C694X_0,
 		.chipset	= VIA_VT8605,
 		.chipset_name	= "Apollo ProSavage PM133"
+	},
+	{
+		.device_id	= PCI_DEVICE_ID_VIA_8754,
+		.chipset	= VIA_P4X,
+		.chipset_name	= "Apollo P4X333/P4X400"
 	},
 	{ }, /* dummy final entry, always present */
 };
diff -Nru a/drivers/char/agp/via-kt400.c b/drivers/char/agp/via-kt400.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/agp/via-kt400.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,198 @@
+/*
+ * VIA KT400 AGPGART routines. 
+ *
+ * The KT400 does magick to put the AGP bridge compliant with the same
+ * standards version as the graphics card. If we haven't fallen into
+ * 2.0 compatability mode, we run this code. Otherwise, we run the
+ * code in via-agp.c
+ */
+
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/agp_backend.h>
+#include "agp.h"
+
+static int via_fetch_size(void)
+{
+	int i;
+	u8 temp;
+	struct aper_size_info_16 *values;
+
+	values = A_SIZE_16(agp_bridge.aperture_sizes);
+	pci_read_config_byte(agp_bridge.dev, VIA_AGP3_APSIZE, &temp);
+	for (i = 0; i < agp_bridge.num_aperture_sizes; i++) {
+		if (temp == values[i].size_value) {
+			agp_bridge.previous_size =
+			agp_bridge.current_size = (void *) (values + i);
+			agp_bridge.aperture_size_idx = i;
+			return values[i].size;
+		}
+	}
+	return 0;
+}
+
+static int via_configure(void)
+{
+	u32 temp;
+	struct aper_size_info_16 *current_size;
+    
+	current_size = A_SIZE_16(agp_bridge.current_size);
+
+	/* address to map too */
+	pci_read_config_dword(agp_bridge.dev, VIA_APBASE, &temp);
+	agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
+
+	/* attbase - aperture GATT base */
+	pci_write_config_dword(agp_bridge.dev, VIA_AGP3_ATTBASE,
+		agp_bridge.gatt_bus_addr & 0xfffff000);
+	return 0;
+}
+
+static void via_cleanup(void)
+{
+	struct aper_size_info_16 *previous_size;
+
+	previous_size = A_SIZE_16(agp_bridge.previous_size);
+	pci_write_config_byte(agp_bridge.dev, VIA_APSIZE, previous_size->size_value);
+}
+
+static void via_tlbflush(agp_memory * mem)
+{
+	u32 temp;
+
+	pci_read_config_dword(agp_bridge.dev, VIA_AGP3_GARTCTRL, &temp);
+	pci_write_config_dword(agp_bridge.dev, VIA_AGP3_GARTCTRL, temp & ~(1<<7));
+	pci_write_config_dword(agp_bridge.dev, VIA_AGP3_GARTCTRL, temp);
+}
+
+static unsigned long via_mask_memory(unsigned long addr, int type)
+{
+	/* Memory type is ignored */
+
+	return addr | agp_bridge.masks[0].mask;
+}
+
+static struct aper_size_info_16 via_generic_sizes[11] =
+{
+	{ 4,     1024,  0, 1<<11|1<<10|1<<9|1<<8|1<<5|1<<4|1<<3|1<<2|1<<1|1<<0 },
+	{ 8,     2048,  1, 1<<11|1<<10|1<<9|1<<8|1<<5|1<<4|1<<3|1<<2|1<<1},
+	{ 16,    4096,  2, 1<<11|1<<10|1<<9|1<<8|1<<5|1<<4|1<<3|1<<2},
+	{ 32,    8192,  3, 1<<11|1<<10|1<<9|1<<8|1<<5|1<<4|1<<3},
+	{ 64,   16384,  4, 1<<11|1<<10|1<<9|1<<8|1<<5|1<<4},
+	{ 128,  32768,  5, 1<<11|1<<10|1<<9|1<<8|1<<5},
+	{ 256,  65536,  6, 1<<11|1<<10|1<<9|1<<8},
+	{ 512,  131072, 7, 1<<11|1<<10|1<<9},
+	{ 1024, 262144, 8, 1<<11|1<<10},
+	{ 2048, 524288, 9, 1<<11}	/* 2GB <- Max supported */
+};
+
+static struct gatt_mask via_generic_masks[] =
+{
+	{.mask = 0x00000000, .type = 0}
+};
+
+
+static void __init via_kt400_enable(u32 mode)
+{
+	if ((agp_generic_agp_3_0_enable(mode))==FALSE)
+		printk (KERN_INFO PFX "agp_generic_agp_3_0_enable() failed\n");
+}
+
+
+static int __init agp_via_probe (struct pci_dev *dev, const struct pci_device_id *ent)
+{
+	u8 reg;
+	u8 cap_ptr = 0;
+
+	cap_ptr = pci_find_capability(dev, PCI_CAP_ID_AGP);
+	if (cap_ptr == 0)
+		return -ENODEV;
+
+	pci_read_config_byte(dev, VIA_AGPSEL, &reg);
+	/* Check if we are in AGP 2.0 compatability mode, if so it
+	 * will be picked up by via-agp.o */
+	if ((reg & (1<<1))==1)
+		return -ENODEV;
+
+	printk (KERN_INFO PFX "Detected VIA KT400 AGP3 chipset\n");
+
+	agp_bridge.dev = dev;
+	agp_bridge.type = VIA_APOLLO_KT400_3;
+	agp_bridge.capndx = cap_ptr;
+	agp_bridge.masks = via_generic_masks;
+	agp_bridge.aperture_sizes = (void *) via_generic_sizes;
+	agp_bridge.size_type = U8_APER_SIZE;
+	agp_bridge.num_aperture_sizes = 7;
+	agp_bridge.dev_private_data = NULL;
+	agp_bridge.needs_scratch_page = FALSE;
+	agp_bridge.agp_enable = via_kt400_enable;
+	agp_bridge.configure = via_configure;
+	agp_bridge.fetch_size = via_fetch_size;
+	agp_bridge.cleanup = via_cleanup;
+	agp_bridge.tlb_flush = via_tlbflush;
+	agp_bridge.mask_memory = via_mask_memory;
+	agp_bridge.cache_flush = global_cache_flush;
+	agp_bridge.create_gatt_table = agp_generic_create_gatt_table;
+	agp_bridge.free_gatt_table = agp_generic_free_gatt_table;
+	agp_bridge.insert_memory = agp_generic_insert_memory;
+	agp_bridge.remove_memory = agp_generic_remove_memory;
+	agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
+	agp_bridge.free_by_type = agp_generic_free_by_type;
+	agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+	agp_bridge.agp_destroy_page = agp_generic_destroy_page;
+	agp_bridge.suspend = agp_generic_suspend;
+	agp_bridge.resume = agp_generic_resume;
+	agp_bridge.cant_use_aperture = 0;
+
+	/* Fill in the mode register */
+	pci_read_config_dword(agp_bridge.dev, agp_bridge.capndx+4, &agp_bridge.mode);
+
+	agp_register_driver(dev);
+	return 0;
+}
+
+static struct pci_device_id agp_via_pci_table[] __initdata = {
+	{
+	.class		= (PCI_CLASS_BRIDGE_HOST << 8),
+	.class_mask	= ~0,
+	.vendor		= PCI_VENDOR_ID_VIA,
+	.device		= PCI_DEVICE_ID_VIA_8377_0,
+	.subvendor	= PCI_ANY_ID,
+	.subdevice	= PCI_ANY_ID,
+	},
+	{ }
+};
+
+MODULE_DEVICE_TABLE(pci, agp_via_pci_table);
+
+static struct __initdata pci_driver agp_via_pci_driver = {
+	.name		= "agpgart-via",
+	.id_table	= agp_via_pci_table,
+	.probe		= agp_via_probe,
+};
+
+static int __init agp_via_init(void)
+{
+	int ret_val;
+
+	ret_val = pci_module_init(&agp_via_pci_driver);
+	if (ret_val)
+		agp_bridge.type = NOT_SUPPORTED;
+
+	return ret_val;
+}
+
+static void __exit agp_via_cleanup(void)
+{
+	agp_unregister_driver();
+	pci_unregister_driver(&agp_via_pci_driver);
+}
+
+module_init(agp_via_init);
+module_exit(agp_via_cleanup);
+
+MODULE_AUTHOR("Dave Jones <davej@codemonkey.org.uk>");
+MODULE_LICENSE("GPL and additional rights");
+
diff -Nru a/drivers/char/drm/radeon_mem.c b/drivers/char/drm/radeon_mem.c
--- a/drivers/char/drm/radeon_mem.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/drm/radeon_mem.c	Wed Jan  8 20:04:45 2003
@@ -130,16 +130,6 @@
 	}
 }
 
-static void print_heap( struct mem_block *heap )
-{
-	struct mem_block *p;
-
-	for (p = heap->next ; p != heap ; p = p->next) 
-		DRM_DEBUG("0x%x..0x%x (0x%x) -- owner %d\n",
-			  p->start, p->start + p->size,
-			  p->size, p->pid);
-}
-
 /* Initialize.  How to check for an uninitialized heap?
  */
 static int init_heap(struct mem_block **heap, int start, int size)
diff -Nru a/drivers/char/ftape/compressor/zftape-compress.c b/drivers/char/ftape/compressor/zftape-compress.c
--- a/drivers/char/ftape/compressor/zftape-compress.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/ftape/compressor/zftape-compress.c	Wed Jan  8 20:04:45 2003
@@ -37,11 +37,7 @@
 
 #include <linux/zftape.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6)
 #include <asm/uaccess.h>
-#else
-#include <asm/segment.h>
-#endif
 
 #include "../zftape/zftape-init.h"
 #include "../zftape/zftape-eof.h"
@@ -271,15 +267,9 @@
 
 static void zftc_lock(void)
 {
-#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
-	if (!MOD_IN_USE) {
-		MOD_INC_USE_COUNT;
-	}
-#else
 	MOD_INC_USE_COUNT; /*  sets MOD_VISITED and MOD_USED_ONCE,
 			    *  locking is done with can_unload()
 			    */
-#endif
 	keep_module_locked = 1;
 }
 
@@ -291,11 +281,6 @@
 
 	memset((void *)&cseg, '\0', sizeof(cseg));
 	zftc_stats();
-#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
-	if (MOD_IN_USE) {
-		MOD_DEC_USE_COUNT;
-	}
-#endif
 	keep_module_locked = 0;
 	TRACE_EXIT;
 }
@@ -570,15 +555,9 @@
 	TRACE_FUN(ft_t_flow);
 	
 	keep_module_locked = 1;
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18)
 	MOD_INC_USE_COUNT; /*  sets MOD_VISITED and MOD_USED_ONCE,
 			    *  locking is done with can_unload()
 			    */
-#else
-	if (!MOD_IN_USE) {
-		MOD_INC_USE_COUNT;
-	}
-#endif
 	/* Note: we do not unlock the module because
 	 * there are some values cached in that `cseg' variable.  We
 	 * don't don't want to use this information when being
@@ -618,17 +597,10 @@
 		 * block.  We know, that the compression buffer is
 		 * empty (else there wouldn't be any space left).  
 		 */
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 		if (copy_from_user(zftc_scratch_buf, src_buf + result, 
 				   volume->blk_sz) != 0) {
 			TRACE_EXIT -EFAULT;
 		}
-#else
-		TRACE_CATCH(verify_area(VERIFY_READ, src_buf + result, 
-					volume->blk_sz),);
-		memcpy_fromfs(zftc_scratch_buf, src_buf + result, 
-			      volume->blk_sz);
-#endif
 		req_len_left -= volume->blk_sz;
 		cseg.cmpr_sz = zft_compress(zftc_scratch_buf, volume->blk_sz, 
 					    zftc_buf);
@@ -704,15 +676,9 @@
 	TRACE_FUN(ft_t_flow);
 
 	keep_module_locked = 1;
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18)
 	MOD_INC_USE_COUNT; /*  sets MOD_VISITED and MOD_USED_ONCE,
 			    *  locking is done with can_unload()
 			    */
-#else
-	if (!MOD_IN_USE) {
-		MOD_INC_USE_COUNT;
-	}
-#endif
 	TRACE_CATCH(zft_allocate_cmpr_mem(volume->blk_sz),);
 	if (pos->seg_byte_pos == 0) {
 		/* new segment just read
@@ -746,16 +712,11 @@
 				      "Uncompressed blk (%d) != blk size (%d)",
 				      uncompressed_sz, volume->blk_sz);
 			}       
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 			if (copy_to_user(dst_buf + result, 
 					 zftc_scratch_buf, 
 					 uncompressed_sz) != 0 ) {
 				TRACE_EXIT -EFAULT;
 			}
-#else
-			memcpy_tofs(dst_buf + result, zftc_scratch_buf, 
-				    uncompressed_sz);
-#endif
 			remaining      -= uncompressed_sz;
 			result     += uncompressed_sz;
 			cseg.cmpr_pos  = 0;
@@ -839,15 +800,9 @@
 	TRACE_FUN(ft_t_flow);
 
 	keep_module_locked = 1;
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18)
 	MOD_INC_USE_COUNT; /*  sets MOD_VISITED and MOD_USED_ONCE,
 			    *  locking is done with can_unload()
 			    */
-#else
-	if (!MOD_IN_USE) {
-		MOD_INC_USE_COUNT;
-	}
-#endif
 	if (new_block_pos == 0) {
 		pos->seg_pos      = volume->start_seg;
 		pos->seg_byte_pos = 0;
@@ -1272,14 +1227,10 @@
 {
 	int result;
 
-#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
-	register_symtab(0); /* remove global ftape symbols */
-#else
 #if 0 /* FIXME --RR */
 	if (!mod_member_present(&__this_module, can_unload))
 		return -EBUSY;
 	__this_module.can_unload = can_unload;
-#endif
 #endif
 	result = zft_compressor_init();
 	keep_module_locked = 0;
diff -Nru a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c
--- a/drivers/char/ftape/lowlevel/fdc-io.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/ftape/lowlevel/fdc-io.c	Wed Jan  8 20:04:43 2003
@@ -196,11 +196,7 @@
 	fdc_usec_wait(FT_RQM_DELAY);	/* wait for valid RQM status */
 	save_flags(flags);
 	cli();
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,30)
 	if (!in_interrupt())
-#else
-	if (!intr_count)
-#endif
 		/* Yes, I know, too much comments inside this function
 		 * ...
 		 * 
@@ -264,19 +260,11 @@
 		}
 	}
 #endif
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,30)
 	if (!in_interrupt()) {
 		/* shouldn't be cleared if called from isr
 		 */
 		ft_interrupt_seen = 0;
 	}
-#else
-	if (!intr_count) {
-		/* shouldn't be cleared if called from isr
-		 */
-		ft_interrupt_seen = 0;
-	}
-#endif
 	while (count) {
 		result = fdc_write(*cmd_data);
 		if (result < 0) {
@@ -392,15 +380,9 @@
 
 	TRACE_FUN(ft_t_fdc_dma);
 
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16)
  	if (waitqueue_active(&ftape_wait_intr)) {
 		TRACE_ABORT(-EIO, ft_t_err, "error: nested call");
 	}
-#else
-	if (ftape_wait_intr) {
-		TRACE_ABORT(-EIO, ft_t_err, "error: nested call");
-	}
-#endif
 	/* timeout time will be up to USPT microseconds too long ! */
 	timeout = (1000 * time + FT_USPT - 1) / FT_USPT;
 
@@ -1209,7 +1191,7 @@
 	TRACE_FUN(ft_t_flow);
 
 	if (ft_mach2 || ft_probe_fc10) {
-		if (check_region(fdc.sra, 8) < 0) {
+		if (!request_region(fdc.sra, 8, "fdc (ft)")) {
 #ifndef BROKEN_FLOPPY_DRIVER
 			TRACE_EXIT -EBUSY;
 #else
@@ -1217,10 +1199,8 @@
 "address 0x%03x occupied (by floppy driver?), using it anyway", fdc.sra);
 #endif
 		}
-		request_region(fdc.sra, 8, "fdc (ft)");
 	} else {
-		if (check_region(fdc.sra, 6) < 0 || 
-		    check_region(fdc.dir, 1) < 0) {
+		if (!request_region(fdc.sra, 6, "fdc (ft)")) {
 #ifndef BROKEN_FLOPPY_DRIVER
 			TRACE_EXIT -EBUSY;
 #else
@@ -1228,8 +1208,15 @@
 "address 0x%03x occupied (by floppy driver?), using it anyway", fdc.sra);
 #endif
 		}
-		request_region(fdc.sra, 6, "fdc (ft)");
-		request_region(fdc.sra + 7, 1, "fdc (ft)");
+		if (!request_region(fdc.sra + 7, 1, "fdc (ft)")) {
+#ifndef BROKEN_FLOPPY_DRIVER
+			release_region(fdc.sra, 6);
+			TRACE_EXIT -EBUSY;
+#else
+			TRACE(ft_t_warn,
+"address 0x%03x occupied (by floppy driver?), using it anyway", fdc.sra + 7);
+#endif
+		}
 	}
 	TRACE_EXIT 0;
 }
diff -Nru a/drivers/char/ftape/lowlevel/fdc-isr.c b/drivers/char/ftape/lowlevel/fdc-isr.c
--- a/drivers/char/ftape/lowlevel/fdc-isr.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/ftape/lowlevel/fdc-isr.c	Wed Jan  8 20:04:43 2003
@@ -1119,11 +1119,7 @@
 			}
 			ft_seek_completed = 1;
 			fdc_mode = fdc_idle;
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16)
 		} else if (!waitqueue_active(&ftape_wait_intr)) {
-#else
-		} else if (!ftape_wait_intr) {
-#endif
 			if (ft_expected_stray_interrupts == 0) {
 				TRACE(ft_t_warn, "unexpected stray interrupt");
 			} else {
@@ -1154,23 +1150,12 @@
 	 */
 	if (!ft_hide_interrupt) {
 		ft_interrupt_seen ++;
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16)
 		if (waitqueue_active(&ftape_wait_intr)) {
 			wake_up_interruptible(&ftape_wait_intr);
 		}
-#else
-		if (ftape_wait_intr) {
-			wake_up_interruptible(&ftape_wait_intr);
-		}
-#endif
 	} else {
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,0,16)
 		TRACE(ft_t_flow, "hiding interrupt while %s", 
 		      waitqueue_active(&ftape_wait_intr) ? "waiting":"active");
-#else
-		TRACE(ft_t_flow, "hiding interrupt while %s", 
-		      ftape_wait_intr ? "waiting" : "active");
-#endif
 	}
 #ifdef TESTING
 	t0 = ftape_timediff(t0, ftape_timestamp());
diff -Nru a/drivers/char/ftape/lowlevel/ftape-ctl.c b/drivers/char/ftape/lowlevel/ftape-ctl.c
--- a/drivers/char/ftape/lowlevel/ftape-ctl.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/ftape/lowlevel/ftape-ctl.c	Wed Jan  8 20:04:45 2003
@@ -33,11 +33,7 @@
 
 #include <linux/ftape.h>
 #include <linux/qic117.h>
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6)
 #include <asm/uaccess.h>
-#else
-#include <asm/segment.h>
-#endif
 #include <asm/io.h>
 
 /* ease porting between pre-2.4.x and later kernels */
diff -Nru a/drivers/char/ftape/lowlevel/ftape-init.c b/drivers/char/ftape/lowlevel/ftape-init.c
--- a/drivers/char/ftape/lowlevel/ftape-init.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/ftape/lowlevel/ftape-init.c	Wed Jan  8 20:04:45 2003
@@ -31,19 +31,13 @@
 #include <linux/major.h>
 
 #include <linux/ftape.h>
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,16)
 #include <linux/init.h>
-#else
-#define __initdata
-#define __initfunc(__arg) __arg
-#endif
 #include <linux/qic117.h>
 #ifdef CONFIG_ZFTAPE
 #include <linux/zftape.h>
 #endif
 
 #include "../lowlevel/ftape-init.h"
-#include "../lowlevel/ftape_syms.h"
 #include "../lowlevel/ftape-io.h"
 #include "../lowlevel/ftape-read.h"
 #include "../lowlevel/ftape-write.h"
@@ -114,9 +108,6 @@
 	ft_failure   = 1;         /* inhibit any operation but open */
 	ftape_udelay_calibrate(); /* must be before fdc_wait_calibrate ! */
 	fdc_wait_calibrate();
-#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
-	register_symtab(&ftape_symbol_table); /* add global ftape symbols */
-#endif
 #if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS)
 	(void)ftape_proc_init();
 #endif
@@ -132,7 +123,6 @@
 static int ft_tracing = -1;
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18)
 #define FT_MOD_PARM(var,type,desc) \
 	MODULE_PARM(var,type); MODULE_PARM_DESC(var,desc)
 
@@ -154,7 +144,6 @@
 MODULE_DESCRIPTION(
 	"QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives.");
 MODULE_LICENSE("GPL");
-#endif
 
 /*  Called by modules package when installing the driver
  */
diff -Nru a/drivers/char/ftape/lowlevel/ftape-setup.c b/drivers/char/ftape/lowlevel/ftape-setup.c
--- a/drivers/char/ftape/lowlevel/ftape-setup.c	Wed Jan  8 20:04:31 2003
+++ b/drivers/char/ftape/lowlevel/ftape-setup.c	Wed Jan  8 20:04:31 2003
@@ -31,12 +31,7 @@
 #include <linux/mm.h>
 
 #include <linux/ftape.h>
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,16)
 #include <linux/init.h>
-#else
-#define __initdata
-#define __initfunc(__arg) __arg
-#endif
 #include "../lowlevel/ftape-tracing.h"
 #include "../lowlevel/fdc-io.h"
 
diff -Nru a/drivers/char/ftape/lowlevel/ftape_syms.h b/drivers/char/ftape/lowlevel/ftape_syms.h
--- a/drivers/char/ftape/lowlevel/ftape_syms.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,39 +0,0 @@
-#ifndef _FTAPE_SYMS_H
-#define _FTAPE_SYMS_H
-
-/*
- * Copyright (C) 1996-1997 Claus-Justus Heine
-
- 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, or (at your option)
- any later version.
-
- 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; see the file COPYING.  If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- *
- * $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape_syms.h,v $
- * $Revision: 1.2 $
- * $Date: 1997/10/05 19:18:32 $
- *
- *      This file contains the definitions needed to export symbols
- *      from the QIC-40/80/3010/3020 floppy-tape driver "ftape" for
- *      Linux.
- */
-
-#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
-#include <linux/module.h>
-/*      ftape-vfs.c defined global vars.
- */
-
-extern struct symbol_table ftape_symbol_table;
-#endif
-
-#endif
diff -Nru a/drivers/char/ftape/zftape/zftape-buffers.c b/drivers/char/ftape/zftape/zftape-buffers.c
--- a/drivers/char/ftape/zftape/zftape-buffers.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/char/ftape/zftape/zftape-buffers.c	Wed Jan  8 20:04:32 2003
@@ -30,9 +30,7 @@
 
 #include <linux/zftape.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,0)
 #include <linux/vmalloc.h>
-#endif
 
 #include "../zftape/zftape-init.h"
 #include "../zftape/zftape-eof.h"
diff -Nru a/drivers/char/ftape/zftape/zftape-ctl.c b/drivers/char/ftape/zftape/zftape-ctl.c
--- a/drivers/char/ftape/zftape/zftape-ctl.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/ftape/zftape/zftape-ctl.c	Wed Jan  8 20:04:43 2003
@@ -33,11 +33,7 @@
 
 #include <linux/zftape.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6)
 #include <asm/uaccess.h>
-#else
-#include <asm/segment.h>
-#endif
 
 #include "../zftape/zftape-init.h"
 #include "../zftape/zftape-eof.h"
@@ -790,13 +786,6 @@
 		zft_uninit_mem();
 		going_offline = 0;
 		zft_offline   = 1;
-	} else if (zft_dirty()) {
-		TRACE(ft_t_noise, "Keeping module locked in memory because:\n"
-		      KERN_INFO "header segments need updating: %s\n"
-		      KERN_INFO "tape not at BOT              : %s",
-		      (zft_volume_table_changed || zft_header_changed) 
-		      ? "yes" : "no",
-		      zft_tape_at_lbot(&zft_pos) ? "no" : "yes");
 	} else if (zft_cmpr_lock(0 /* don't load */) == 0) {
 		(*zft_cmpr_ops->reset)(); /* unlock it again */
 	}
@@ -964,18 +953,11 @@
 		 */
 		TRACE_EXIT 0;
 	}
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 	if (copy_to_user(mtftseg->mt_data,
 			 zft_deblock_buf,
 			 mtftseg->mt_result) != 0) {
 		TRACE_EXIT -EFAULT;
 	}
-#else
-	TRACE_CATCH(verify_area(VERIFY_WRITE, mtftseg->mt_data,
-				mtftseg->mt_result),);
-	memcpy_tofs(mtftseg->mt_data, zft_deblock_buf, 
-		    mtftseg->mt_result);
-#endif
 	TRACE_EXIT 0;
 }
 #endif
@@ -1023,19 +1005,11 @@
 		TRACE_EXIT -ENXIO;
 	}
 	if (mtftseg->mt_mode != FT_WR_DELETE) {
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 		if (copy_from_user(zft_deblock_buf, 
 				   mtftseg->mt_data,
 				   FT_SEGMENT_SIZE) != 0) {
 			TRACE_EXIT -EFAULT;
 		}
-#else
-		TRACE_CATCH(verify_area(VERIFY_READ, 
-					mtftseg->mt_data, 
-					FT_SEGMENT_SIZE),);
-		memcpy_fromfs(zft_deblock_buf, mtftseg->mt_data,
-			      FT_SEGMENT_SIZE);
-#endif
 	}
 	mtftseg->mt_result = ftape_write_segment(mtftseg->mt_segno, 
 						 zft_deblock_buf,
@@ -1382,14 +1356,9 @@
 			    ft_t_info, "bad argument size: %d", arg_size);
 	}
 	if (dir & _IOC_WRITE) {
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 		if (copy_from_user(&krnl_arg, arg, arg_size) != 0) {
 			TRACE_EXIT -EFAULT;
 		}
-#else
-		TRACE_CATCH(verify_area(VERIFY_READ, arg, arg_size),);
-		memcpy_fromfs(&krnl_arg, arg, arg_size);
-#endif
 	}
 	TRACE(ft_t_flow, "called with ioctl command: 0x%08x", command);
 	switch (command) {
@@ -1442,14 +1411,9 @@
 		break;
 	}
 	if ((result >= 0) && (dir & _IOC_READ)) {
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 		if (copy_to_user(arg, &krnl_arg, arg_size) != 0) {
 			TRACE_EXIT -EFAULT;
 		}
-#else
-		TRACE_CATCH(verify_area(VERIFY_WRITE, arg, arg_size),);
-		memcpy_tofs(arg, &krnl_arg, arg_size);
-#endif
 	}
 	TRACE_EXIT result;
 }
diff -Nru a/drivers/char/ftape/zftape/zftape-ctl.h b/drivers/char/ftape/zftape/zftape-ctl.h
--- a/drivers/char/ftape/zftape/zftape-ctl.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/ftape/zftape/zftape-ctl.h	Wed Jan  8 20:04:44 2003
@@ -47,7 +47,6 @@
 extern void zft_reset_position(zft_position *pos);
 extern int  zft_check_write_access(zft_position *pos);
 extern int  zft_def_idle_state(void);
-extern int  zft_dirty(void);
 
 /*  hooks for the VFS interface 
  */
diff -Nru a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
--- a/drivers/char/ftape/zftape/zftape-init.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/ftape/zftape/zftape-init.c	Wed Jan  8 20:04:43 2003
@@ -45,7 +45,6 @@
 #include "../zftape/zftape-write.h"
 #include "../zftape/zftape-ctl.h"
 #include "../zftape/zftape-buffers.h"
-#include "../zftape/zftape_syms.h"
 
 char zft_src[] __initdata = "$Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape-init.c,v $";
 char zft_rev[] __initdata = "$Revision: 1.8 $";
diff -Nru a/drivers/char/ftape/zftape/zftape-read.c b/drivers/char/ftape/zftape/zftape-read.c
--- a/drivers/char/ftape/zftape/zftape-read.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/ftape/zftape/zftape-read.c	Wed Jan  8 20:04:44 2003
@@ -29,11 +29,7 @@
 
 #include <linux/zftape.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6)
 #include <asm/uaccess.h>
-#else
-#include <asm/segment.h>
-#endif
 
 #include "../zftape/zftape-init.h"
 #include "../zftape/zftape-eof.h"
@@ -172,15 +168,10 @@
 	} else {
 		*read_cnt = to_do;
 	}
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 	if (copy_to_user(dst_buf, 
 			 src_buf + pos->seg_byte_pos, *read_cnt) != 0) {
 		TRACE_EXIT -EFAULT;
 	}
-#else
-	TRACE_CATCH(verify_area(VERIFY_WRITE, dst_buf, *read_cnt),);
-	memcpy_tofs(dst_buf, src_buf +  pos->seg_byte_pos, *read_cnt);
-#endif
 	TRACE(ft_t_noise, "nr bytes just read: %d", *read_cnt);
 	TRACE_EXIT *read_cnt;
 }
diff -Nru a/drivers/char/ftape/zftape/zftape-write.c b/drivers/char/ftape/zftape/zftape-write.c
--- a/drivers/char/ftape/zftape/zftape-write.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/ftape/zftape/zftape-write.c	Wed Jan  8 20:04:44 2003
@@ -29,11 +29,7 @@
 
 #include <linux/zftape.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,6)
 #include <asm/uaccess.h>
-#else
-#include <asm/segment.h>
-#endif
 
 #include "../zftape/zftape-init.h"
 #include "../zftape/zftape-eof.h"
@@ -321,14 +317,9 @@
 	 */
 	space_left = seg_sz - pos->seg_byte_pos;
 	*cnt = req_len < space_left ? req_len : space_left;
-#if LINUX_VERSION_CODE > KERNEL_VER(2,1,3)
 	if (copy_from_user(dst_buf + pos->seg_byte_pos, src_buf, *cnt) != 0) {
 		TRACE_EXIT -EFAULT;
 	}
-#else
-	TRACE_CATCH(verify_area(VERIFY_READ, src_buf, *cnt),);
-	memcpy_fromfs(dst_buf + pos->seg_byte_pos, src_buf, *cnt);
-#endif
 	TRACE_EXIT *cnt;
 }
 
diff -Nru a/drivers/char/ftape/zftape/zftape_syms.h b/drivers/char/ftape/zftape/zftape_syms.h
--- a/drivers/char/ftape/zftape/zftape_syms.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,39 +0,0 @@
-#ifndef _ZFTAPE_SYMS_H
-#define _ZFTAPE_SYMS_H
-
-/*
- * Copyright (C) 1996, 1997 Claus-Justus Heine
-
- 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, or (at your option)
- any later version.
-
- 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; see the file COPYING.  If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- *
- * $Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape_syms.h,v $
- * $Revision: 1.2 $
- * $Date: 1997/10/05 19:19:14 $
- *
- *      This file contains the definitions needed for the symbols
- *      ftape exports
- * 
- */
-
-#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
-#include <linux/module.h>
-/*      ftape-vfs.c defined global vars.
- */
-
-extern struct symbol_table zft_symbol_table;
-#endif
-
-#endif
diff -Nru a/drivers/char/genrtc.c b/drivers/char/genrtc.c
--- a/drivers/char/genrtc.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/genrtc.c	Wed Jan  8 20:04:45 2003
@@ -404,11 +404,20 @@
 
 int __init rtc_generic_init(void)
 {
+	int retval;
 
-		printk(KERN_INFO "Generic RTC Driver v%s\n", RTC_VERSION);
+	printk(KERN_INFO "Generic RTC Driver v%s\n", RTC_VERSION);
 
-	misc_register(&rtc_gen_dev);
-	create_proc_read_entry ("driver/rtc", 0, 0, gen_rtc_read_proc, NULL);
+	retval = misc_register(&rtc_gen_dev);
+	if(retval < 0)
+		return retval;
+
+#ifdef CONFIG_PROC_FS
+	if((create_proc_read_entry ("driver/rtc", 0, 0, gen_rtc_read_proc, NULL)) == NULL){
+		misc_deregister(&rtc_gen_dev);
+		return -ENOMEM;
+	}
+#endif
 
 	return 0;
 }
diff -Nru a/drivers/char/ip2.c b/drivers/char/ip2.c
--- a/drivers/char/ip2.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/ip2.c	Wed Jan  8 20:04:44 2003
@@ -33,9 +33,10 @@
 */
 static int io[IP2_MAX_BOARDS]= { 0, 0, 0, 0 };
 static int irq[IP2_MAX_BOARDS] = { -1, -1, -1, -1 }; 
-static int poll_only = 0;
 
 #ifdef MODULE
+
+static int poll_only = 0;
 
 #	if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
 		MODULE_AUTHOR("Doug McNash");
diff -Nru a/drivers/char/nwflash.c b/drivers/char/nwflash.c
--- a/drivers/char/nwflash.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/nwflash.c	Wed Jan  8 20:04:45 2003
@@ -688,9 +688,10 @@
 		printk("Flash ROM driver v.%s, flash device ID 0x%04X, size %d Mb.\n",
 		       NWFLASH_VERSION, id, gbFlashSize / (1024 * 1024));
 
-		misc_register(&flash_miscdev);
-
-		ret = 0;
+		ret = misc_register(&flash_miscdev);
+		if (ret < 0) {
+			iounmap((void *)FLASH_BASE);
+		}
 	}
 out:
 	return ret;
diff -Nru a/drivers/char/raw.c b/drivers/char/raw.c
--- a/drivers/char/raw.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/char/raw.c	Wed Jan  8 20:04:44 2003
@@ -212,9 +212,20 @@
 	return generic_file_write_nolock(file, &local_iov, 1, ppos);
 }
 
+static ssize_t raw_file_aio_write(struct kiocb *iocb, const char *buf,
+					size_t count, loff_t pos)
+{
+	struct iovec local_iov = { .iov_base = (void *)buf, .iov_len = count };
+
+	return generic_file_aio_write_nolock(iocb, &local_iov, 1, &iocb->ki_pos);
+}
+
+
 static struct file_operations raw_fops = {
 	.read	=	generic_file_read,
+	.aio_read = 	generic_file_aio_read,
 	.write	=	raw_file_write,
+	.aio_write = 	raw_file_aio_write,
 	.open	=	raw_open,
 	.release=	raw_release,
 	.ioctl	=	raw_ioctl,
diff -Nru a/drivers/char/sx.c b/drivers/char/sx.c
--- a/drivers/char/sx.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/char/sx.c	Wed Jan  8 20:04:43 2003
@@ -2499,6 +2499,11 @@
 		sx_debug=-1;
 	}
 
+	if (misc_register(&sx_fw_device) < 0) {
+		printk(KERN_ERR "SX: Unable to register firmware loader driver.\n");
+		return -EIO;
+	}
+
 #ifdef CONFIG_PCI
 	if (pci_present ()) {
 #ifndef TWO_ZERO
@@ -2643,11 +2648,8 @@
 	}
 	if (found) {
 		printk (KERN_INFO "sx: total of %d boards detected.\n", found);
-
-		if (misc_register(&sx_fw_device) < 0) {
-			printk(KERN_ERR "SX: Unable to register firmware loader driver.\n");
-			return -EIO;
-		}
+	} else {
+		misc_deregister(&sx_fw_device);
 	}
 
 	func_exit();
diff -Nru a/drivers/char/toshiba.c b/drivers/char/toshiba.c
--- a/drivers/char/toshiba.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/char/toshiba.c	Wed Jan  8 20:04:45 2003
@@ -474,6 +474,7 @@
 
 int __init tosh_init(void)
 {
+	int retval;
 	/* are we running on a Toshiba laptop */
 
 	if (tosh_probe()!=0)
@@ -483,17 +484,21 @@
 		TOSH_VERSION"\n");
 
 	/* set the port to use for Fn status if not specified as a parameter */
-
 	if (tosh_fn==0x00)
 		tosh_set_fn_port();
 
 	/* register the device file */
+	retval = misc_register(&tosh_device);
+	if(retval < 0)
+		return retval;
 
-	misc_register(&tosh_device);
-
+#ifdef CONFIG_PROC_FS
 	/* register the proc entry */
-
-	create_proc_info_entry("toshiba", 0, NULL, tosh_get_info);
+	if(create_proc_info_entry("toshiba", 0, NULL, tosh_get_info) == NULL){
+		misc_deregister(&tosh_device);
+		return -ENOMEM;
+	}
+#endif
 
 	return 0;
 }
diff -Nru a/drivers/hotplug/ibmphp_core.c b/drivers/hotplug/ibmphp_core.c
--- a/drivers/hotplug/ibmphp_core.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/hotplug/ibmphp_core.c	Wed Jan  8 20:04:45 2003
@@ -769,11 +769,11 @@
  * Parameters: bus number
  * Returns : pci_bus *  or NULL if not found
  */
-static struct pci_bus *find_bus (u8 busno)
+static struct pci_bus *ibmphp_find_bus (u8 busno)
 {
 	const struct list_head *tmp;
 	struct pci_bus *bus;
-	debug ("inside find_bus, busno = %x \n", busno);
+	debug ("inside %s, busno = %x \n", __FUNCTION__, busno);
 
 	list_for_each (tmp, &pci_root_buses) {
 		bus = (struct pci_bus *) pci_bus_b (tmp);
@@ -1002,7 +1002,7 @@
 	struct pci_dev *dev;
 	u16 l;
 
-	if (find_bus (busno) || !(ibmphp_find_same_bus_num (busno)))
+	if (ibmphp_find_bus (busno) || !(ibmphp_find_same_bus_num (busno)))
 		return 1;
 
 	bus = kmalloc (sizeof (*bus), GFP_KERNEL);
@@ -1056,7 +1056,7 @@
 		func->dev = pci_find_slot (func->busno, (func->device << 3) | (func->function & 0x7));
 
 	if (func->dev == NULL) {
-		dev0.bus = find_bus (func->busno);
+		dev0.bus = ibmphp_find_bus (func->busno);
 		dev0.devfn = ((func->device << 3) + (func->function & 0x7));
 		dev0.sysdata = dev0.bus->sysdata;
 
@@ -1636,7 +1636,7 @@
 		return -ENOMEM;
 	}
 
-	bus = find_bus (0);
+	bus = ibmphp_find_bus (0);
 	if (!bus) {
 		err ("Can't find the root pci bus, can not continue\n");
 		return -ENODEV;
diff -Nru a/drivers/hotplug/pci_hotplug_core.c b/drivers/hotplug/pci_hotplug_core.c
--- a/drivers/hotplug/pci_hotplug_core.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/hotplug/pci_hotplug_core.c	Wed Jan  8 20:04:45 2003
@@ -561,7 +561,7 @@
 	up(&parent->d_inode->i_sem);
 }
 
-/* yuck, WFT is this? */
+/* Weee, fun with macros... */
 #define GET_STATUS(name,type)	\
 static int get_##name (struct hotplug_slot *slot, type *value)		\
 {									\
@@ -596,7 +596,7 @@
 
 	if (*offset < 0)
 		return -EINVAL;
-	if (count <= 0)
+	if (count == 0 || count > 16384)
 		return 0;
 	if (*offset != 0)
 		return 0;
@@ -661,29 +661,26 @@
 	power = (u8)(lpower & 0xff);
 	dbg ("power = %d\n", power);
 
+	if (!try_module_get(slot->ops->owner)) {
+		retval = -ENODEV;
+		goto exit;
+	}
 	switch (power) {
 		case 0:
-			if (!slot->ops->disable_slot)
-				break;
-			if (try_module_get(slot->ops->owner)) {
+			if (slot->ops->disable_slot)
 				retval = slot->ops->disable_slot(slot);
-				module_put(slot->ops->owner);
-			}
 			break;
 
 		case 1:
-			if (!slot->ops->enable_slot)
-				break;
-			if (try_module_get(slot->ops->owner)) {
+			if (slot->ops->enable_slot)
 				retval = slot->ops->enable_slot(slot);
-				module_put(slot->ops->owner);
-			}
 			break;
 
 		default:
 			err ("Illegal value specified for power\n");
 			retval = -EINVAL;
 	}
+	module_put(slot->ops->owner);
 
 exit:	
 	kfree (buff);
@@ -770,12 +767,13 @@
 	attention = (u8)(lattention & 0xff);
 	dbg (" - attention = %d\n", attention);
 
-	if (slot->ops->set_attention_status) {
-		if (try_module_get(slot->ops->owner)) {
-			retval = slot->ops->set_attention_status(slot, attention);
-			module_put(slot->ops->owner);
-		}
+	if (!try_module_get(slot->ops->owner)) {
+		retval = -ENODEV;
+		goto exit;
 	}
+	if (slot->ops->set_attention_status)
+		retval = slot->ops->set_attention_status(slot, attention);
+	module_put(slot->ops->owner);
 
 exit:	
 	kfree (buff);
@@ -1007,12 +1005,13 @@
 	test = (u32)(ltest & 0xffffffff);
 	dbg ("test = %d\n", test);
 
-	if (slot->ops->hardware_test) {
-		if (try_module_get(slot->ops->owner)) {
-			retval = slot->ops->hardware_test(slot, test);
-			module_put(slot->ops->owner);
-		}
+	if (!try_module_get(slot->ops->owner)) {
+		retval = -ENODEV;
+		goto exit;
 	}
+	if (slot->ops->hardware_test)
+		retval = slot->ops->hardware_test(slot, test);
+	module_put(slot->ops->owner);
 
 exit:	
 	kfree (buff);
diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c
--- a/drivers/ide/ide.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/ide/ide.c	Wed Jan  8 20:04:43 2003
@@ -1346,6 +1346,7 @@
 	spin_unlock(&drivers_lock);
 	spin_lock(&drives_lock);
 	list_add_tail(&drive->list, &ata_unused);
+	drive->gendev.driver = NULL;
 	spin_unlock(&drives_lock);
 	return 1;
 }
@@ -2307,6 +2308,8 @@
 	spin_lock(&drivers_lock);
 	list_del(&driver->drivers);
 	spin_unlock(&drivers_lock);
+
+	driver_unregister(&driver->gen_driver);
 
 	while(!list_empty(&driver->drives)) {
 		drive = list_entry(driver->drives.next, ide_drive_t, list);
diff -Nru a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c
--- a/drivers/input/serio/sa1111ps2.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/input/serio/sa1111ps2.c	Wed Jan  8 20:04:44 2003
@@ -145,6 +145,8 @@
 
 	ps2if->open = 1;
 
+	enable_irq_wake(ps2if->dev->irq[0]);
+
 	sa1111_writel(PS2CR_ENA, ps2if->base + SA1111_PS2CR);
 	return 0;
 }
@@ -155,6 +157,8 @@
 
 	sa1111_writel(0, ps2if->base + SA1111_PS2CR);
 
+	disable_irq_wake(ps2if->dev->irq[0]);
+
 	ps2if->open = 0;
 
 	free_irq(ps2if->dev->irq[1], ps2if);
@@ -337,7 +341,7 @@
  */
 static struct sa1111_driver ps2_driver = {
 	.drv = {
-		.name		= "SA1111 PS2",
+		.name		= "sa1111-ps2",
 		.bus		= &sa1111_bus_type,
 		.probe		= ps2_probe,
 		.remove		= ps2_remove,
diff -Nru a/drivers/isdn/hisax/amd7930.c b/drivers/isdn/hisax/amd7930.c
--- a/drivers/isdn/hisax/amd7930.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/amd7930.c	Wed Jan  8 20:04:43 2003
@@ -642,7 +642,7 @@
 void
 amd7930_l1cmd(struct IsdnCardState *cs, int msg, void *arg)
 {
-	u_char val;
+	u8 val;
 	char tmp[32];
 	
 	if (cs->debug & L1_DEB_ISAC) {
diff -Nru a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c
--- a/drivers/isdn/hisax/amd7930_fn.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/amd7930_fn.c	Wed Jan  8 20:04:44 2003
@@ -77,13 +77,13 @@
 static inline u8
 rByteAMD(struct IsdnCardState *cs, u8 reg)
 {
-	return cs->readisac(cs, reg);
+	return cs->dc_hw_ops->read_reg(cs, reg);
 }
 
 static inline void
 wByteAMD(struct IsdnCardState *cs, u8 reg, u8 val)
 {
-	cs->writeisac(cs, reg, val);
+	cs->dc_hw_ops->write_reg(cs, reg, val);
 }
 
 static void
@@ -125,7 +125,7 @@
 }
 
 static void
-Amd7930_ph_command(struct IsdnCardState *cs, u_char command, char *s)
+Amd7930_ph_command(struct IsdnCardState *cs, u8 command, char *s)
 {
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "AMD7930: %s: ph_command 0x%02X", s, command);
@@ -167,8 +167,8 @@
 static void
 Amd7930_new_ph(struct IsdnCardState *cs)
 {
-        u_char index = stateHelper[cs->dc.amd7930.old_state]*8 + stateHelper[cs->dc.amd7930.ph_state]-1;
-        u_char message = i430States[index];
+        u8 index = stateHelper[cs->dc.amd7930.old_state]*8 + stateHelper[cs->dc.amd7930.ph_state]-1;
+        u8 message = i430States[index];
 
         if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "AMD7930: new_ph %d, old_ph %d, message %d, index %d",
diff -Nru a/drivers/isdn/hisax/arcofi.c b/drivers/isdn/hisax/arcofi.c
--- a/drivers/isdn/hisax/arcofi.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/arcofi.c	Wed Jan  8 20:04:44 2003
@@ -17,6 +17,19 @@
 
 #define ARCOFI_TIMER_VALUE	20
 
+
+static inline u8
+isac_read(struct IsdnCardState *cs, u8 addr)
+{
+	return cs->dc_hw_ops->read_reg(cs, addr);
+}
+
+static inline void
+isac_write(struct IsdnCardState *cs, u8 addr, u8 val)
+{
+	cs->dc_hw_ops->write_reg(cs, addr, val);
+}
+
 static void
 add_arcofi_timer(struct IsdnCardState *cs) {
 	if (test_and_set_bit(FLG_ARCOFI_TIMER, &cs->HW_Flags)) {
@@ -29,7 +42,7 @@
 
 static void
 send_arcofi(struct IsdnCardState *cs) {
-	u_char val;
+	u8 val;
 	
 	add_arcofi_timer(cs);
 	cs->dc.isac.mon_txp = 0;
@@ -43,11 +56,11 @@
 	}
 	cs->dc.isac.mocr &= 0x0f;
 	cs->dc.isac.mocr |= 0xa0;
-	cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
-	val = cs->readisac(cs, ISAC_MOSR);
-	cs->writeisac(cs, ISAC_MOX1, cs->dc.isac.mon_tx[cs->dc.isac.mon_txp++]);
+	isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
+	val = isac_read(cs, ISAC_MOSR);
+	isac_write(cs, ISAC_MOX1, cs->dc.isac.mon_tx[cs->dc.isac.mon_txp++]);
 	cs->dc.isac.mocr |= 0x10;
-	cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+	isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 }
 
 int
diff -Nru a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c
--- a/drivers/isdn/hisax/asuscom.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/asuscom.c	Wed Jan  8 20:04:45 2003
@@ -43,162 +43,171 @@
 /* CARD_ADR (Write) */
 #define ASUS_RESET      0x80	/* Bit 7 Reset-Leitung */
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(struct IsdnCardState *cs, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&asuscom_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.asus.adr, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&asuscom_lock, flags);
-	return (ret);
+	return ret;
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
-{
-	/* fifo read without cli because it's allready done  */
-
-	byteout(ale, off);
-	insb(adr, data, size);
-}
-
-
-static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&asuscom_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.asus.adr, off);
 	byteout(adr, data);
 	spin_unlock_irqrestore(&asuscom_lock, flags);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
 {
-	/* fifo write without cli because it's allready done  */
-	byteout(ale, off);
-	outsb(adr, data, size);
+	byteout(cs->hw.asus.adr, off);
+	insb(adr, data, size);
 }
 
-/* Interface functions */
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static inline void
+writefifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
+{
+	byteout(cs->hw.asus.adr, off);
+	outsb(adr, data, size);
+}
+
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.asus.adr, cs->hw.asus.isac, offset));
+	return readreg(cs, cs->hw.asus.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.asus.adr, cs->hw.asus.isac, offset, value);
+	writereg(cs, cs->hw.asus.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	readfifo(cs->hw.asus.adr, cs->hw.asus.isac, 0, data, size);
+	readfifo(cs, cs->hw.asus.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writefifo(cs->hw.asus.adr, cs->hw.asus.isac, 0, data, size);
+	writefifo(cs, cs->hw.asus.isac, 0, data, size);
 }
 
-static u_char
-ReadISAC_IPAC(struct IsdnCardState *cs, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+ipac_dc_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.asus.adr, cs->hw.asus.isac, offset|0x80));
+	return readreg(cs, cs->hw.asus.isac, offset|0x80);
 }
 
 static void
-WriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value)
+ipac_dc_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.asus.adr, cs->hw.asus.isac, offset|0x80, value);
+	writereg(cs, cs->hw.asus.isac, offset|0x80, value);
 }
 
 static void
-ReadISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	readfifo(cs->hw.asus.adr, cs->hw.asus.isac, 0x80, data, size);
+	readfifo(cs, cs->hw.asus.isac, 0x80, data, size);
 }
 
 static void
-WriteISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writefifo(cs->hw.asus.adr, cs->hw.asus.isac, 0x80, data, size);
+	writefifo(cs, cs->hw.asus.isac, 0x80, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops ipac_dc_ops = {
+	.read_reg   = ipac_dc_read,
+	.write_reg  = ipac_dc_write,
+	.read_fifo  = ipac_dc_read_fifo,
+	.write_fifo = ipac_dc_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.asus.adr,
-			cs->hw.asus.hscx, offset + (hscx ? 0x40 : 0)));
+	return readreg(cs, cs->hw.asus.hscx, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.asus.adr,
-		 cs->hw.asus.hscx, offset + (hscx ? 0x40 : 0), value);
+	writereg(cs, cs->hw.asus.hscx, offset + (hscx ? 0x40 : 0), value);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.asus.adr, \
-		cs->hw.asus.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.asus.adr, \
-		cs->hw.asus.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.asus.adr, \
-		cs->hw.asus.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	readfifo(cs, cs->hw.asus.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.asus.adr, \
-		cs->hw.asus.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs, cs->hw.asus.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 asuscom_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	spin_lock(&cs->lock);
-	val = readreg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readreg(cs->hw.asus.adr, cs->hw.asus.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = readreg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.asus.adr, cs->hw.asus.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
 		goto Start_ISAC;
 	}
-	writereg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_MASK, 0xFF);
-	writereg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_MASK + 0x40, 0xFF);
-	writereg(cs->hw.asus.adr, cs->hw.asus.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.asus.adr, cs->hw.asus.isac, ISAC_MASK, 0x0);
-	writereg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_MASK, 0x0);
-	writereg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_MASK + 0x40, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -206,18 +215,18 @@
 asuscom_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char ista, val, icnt = 5;
+	u8 ista, val, icnt = 5;
 
 	if (!cs) {
 		printk(KERN_WARNING "ISDNLink: Spurious interrupt!\n");
 		return;
 	}
-	ista = readreg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_ISTA);
+	ista = readreg(cs, cs->hw.asus.isac, IPAC_ISTA);
 Start_IPAC:
 	if (cs->debug & L1_DEB_IPAC)
 		debugl1(cs, "IPAC ISTA %02X", ista);
 	if (ista & 0x0f) {
-		val = readreg(cs->hw.asus.adr, cs->hw.asus.hscx, HSCX_ISTA + 0x40);
+		val = hscx_read(cs, 1, HSCX_ISTA);
 		if (ista & 0x01)
 			val |= 0x01;
 		if (ista & 0x04)
@@ -228,7 +237,7 @@
 			hscx_int_main(cs, val);
 	}
 	if (ista & 0x20) {
-		val = 0xfe & readreg(cs->hw.asus.adr, cs->hw.asus.isac, ISAC_ISTA | 0x80);
+		val = ipac_dc_read(cs, ISAC_ISTA) & 0xfe;
 		if (val) {
 			isac_interrupt(cs, val);
 		}
@@ -237,15 +246,15 @@
 		val = 0x01;
 		isac_interrupt(cs, val);
 	}
-	ista  = readreg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_ISTA);
+	ista  = readreg(cs, cs->hw.asus.isac, IPAC_ISTA);
 	if ((ista & 0x3f) && icnt) {
 		icnt--;
 		goto Start_IPAC;
 	}
 	if (!icnt)
 		printk(KERN_WARNING "ASUS IRQ LOOP\n");
-	writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_MASK, 0xFF);
-	writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_MASK, 0xC0);
+	writereg(cs, cs->hw.asus.isac, IPAC_MASK, 0xFF);
+	writereg(cs, cs->hw.asus.isac, IPAC_MASK, 0xC0);
 }
 
 void
@@ -261,23 +270,23 @@
 reset_asuscom(struct IsdnCardState *cs)
 {
 	if (cs->subtyp == ASUS_IPAC)
-		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_POTA2, 0x20);
+		writereg(cs, cs->hw.asus.isac, IPAC_POTA2, 0x20);
 	else
 		byteout(cs->hw.asus.adr, ASUS_RESET);	/* Reset On */
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
 	if (cs->subtyp == ASUS_IPAC)
-		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_POTA2, 0x0);
+		writereg(cs, cs->hw.asus.isac, IPAC_POTA2, 0x0);
 	else
 		byteout(cs->hw.asus.adr, 0);	/* Reset Off */
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
 	if (cs->subtyp == ASUS_IPAC) {
-		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_CONF, 0x0);
-		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_ACFG, 0xff);
-		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_AOE, 0x0);
-		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_MASK, 0xc0);
-		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_PCFG, 0x12);
+		writereg(cs, cs->hw.asus.isac, IPAC_CONF, 0x0);
+		writereg(cs, cs->hw.asus.isac, IPAC_ACFG, 0xff);
+		writereg(cs, cs->hw.asus.isac, IPAC_AOE, 0x0);
+		writereg(cs, cs->hw.asus.isac, IPAC_MASK, 0xc0);
+		writereg(cs, cs->hw.asus.isac, IPAC_PCFG, 0x12);
 	}
 }
 
@@ -327,7 +336,7 @@
 {
 	int bytecnt;
 	struct IsdnCardState *cs = card->cs;
-	u_char val;
+	u8 val;
 	char tmp[64];
 
 	strcpy(tmp, Asuscom_revision);
@@ -376,34 +385,27 @@
 	bytecnt = 8;
 	cs->hw.asus.cfg_reg = card->para[1];
 	cs->irq = card->para[0];
-	if (check_region((cs->hw.asus.cfg_reg), bytecnt)) {
+	if (!request_region((cs->hw.asus.cfg_reg), bytecnt,
+			    "asuscom isdn")) {
 		printk(KERN_WARNING
 		       "HiSax: %s config port %x-%x already in use\n",
 		       CardType[card->typ],
 		       cs->hw.asus.cfg_reg,
 		       cs->hw.asus.cfg_reg + bytecnt);
 		return (0);
-	} else {
-		request_region(cs->hw.asus.cfg_reg, bytecnt, "asuscom isdn");
 	}
 	printk(KERN_INFO "ISDNLink: defined at 0x%x IRQ %d\n",
 		cs->hw.asus.cfg_reg, cs->irq);
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Asus_card_msg;
-	val = readreg(cs->hw.asus.cfg_reg + ASUS_IPAC_ALE, 
-		cs->hw.asus.cfg_reg + ASUS_IPAC_DATA, IPAC_ID);
+	cs->hw.asus.adr = cs->hw.asus.cfg_reg + ASUS_IPAC_ALE;
+	val = readreg(cs, cs->hw.asus.cfg_reg + ASUS_IPAC_DATA, IPAC_ID);
 	if ((val == 1) || (val == 2)) {
 		cs->subtyp = ASUS_IPAC;
-		cs->hw.asus.adr  = cs->hw.asus.cfg_reg + ASUS_IPAC_ALE;
 		cs->hw.asus.isac = cs->hw.asus.cfg_reg + ASUS_IPAC_DATA;
 		cs->hw.asus.hscx = cs->hw.asus.cfg_reg + ASUS_IPAC_DATA;
 		test_and_set_bit(HW_IPAC, &cs->HW_Flags);
-		cs->readisac = &ReadISAC_IPAC;
-		cs->writeisac = &WriteISAC_IPAC;
-		cs->readisacfifo = &ReadISACfifo_IPAC;
-		cs->writeisacfifo = &WriteISACfifo_IPAC;
+		cs->dc_hw_ops = &ipac_dc_ops;
 		cs->irq_func = &asuscom_interrupt_ipac;
 		printk(KERN_INFO "Asus: IPAC version %x\n", val);
 	} else {
@@ -413,10 +415,7 @@
 		cs->hw.asus.hscx = cs->hw.asus.cfg_reg + ASUS_HSCX;
 		cs->hw.asus.u7 = cs->hw.asus.cfg_reg + ASUS_CTRL_U7;
 		cs->hw.asus.pots = cs->hw.asus.cfg_reg + ASUS_CTRL_POTS;
-		cs->readisac = &ReadISAC;
-		cs->writeisac = &WriteISAC;
-		cs->readisacfifo = &ReadISACfifo;
-		cs->writeisacfifo = &WriteISACfifo;
+		cs->dc_hw_ops = &isac_ops;
 		cs->irq_func = &asuscom_interrupt;
 		ISACVersion(cs, "ISDNLink:");
 		if (HscxVersion(cs, "ISDNLink:")) {
diff -Nru a/drivers/isdn/hisax/avm_a1.c b/drivers/isdn/hisax/avm_a1.c
--- a/drivers/isdn/hisax/avm_a1.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/avm_a1.c	Wed Jan  8 20:04:43 2003
@@ -26,85 +26,98 @@
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
-static inline u_char
-readreg(unsigned int adr, u_char off)
+static inline u8
+readreg(unsigned int adr, u8 off)
 {
 	return (bytein(adr + off));
 }
 
 static inline void
-writereg(unsigned int adr, u_char off, u_char data)
+writereg(unsigned int adr, u8 off, u8 data)
 {
 	byteout(adr + off, data);
 }
 
 
 static inline void
-read_fifo(unsigned int adr, u_char * data, int size)
+read_fifo(unsigned int adr, u8 * data, int size)
 {
 	insb(adr, data, size);
 }
 
 static void
-write_fifo(unsigned int adr, u_char * data, int size)
+write_fifo(unsigned int adr, u8 * data, int size)
 {
 	outsb(adr, data, size);
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.avm.isac, offset));
+	return readreg(cs->hw.avm.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	writereg(cs->hw.avm.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	read_fifo(cs->hw.avm.isacfifo, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	write_fifo(cs->hw.avm.isacfifo, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
 	return (readreg(cs->hw.avm.hscx[hscx], offset));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
 	writereg(cs->hw.avm.hscx[hscx], offset, value);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.avm.hscx[nr], reg)
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.avm.hscx[nr], reg, data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) read_fifo(cs->hw.avm.hscxfifo[nr], ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) write_fifo(cs->hw.avm.hscxfifo[nr], ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	read_fifo(cs->hw.avm.hscxfifo[hscx], data, size);
+}
+
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	write_fifo(cs->hw.avm.hscxfifo[hscx], data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 avm_a1_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val, sval;
+	u8 val, sval;
 
 	spin_lock(&cs->lock);
 	while (((sval = bytein(cs->hw.avm.cfg_reg)) & 0xf) != 0x7) {
@@ -114,22 +127,22 @@
 		} else if (cs->debug & L1_DEB_INTSTAT)
 			debugl1(cs, "avm IntStatus %x", sval);
 		if (!(sval & AVM_A1_STAT_HSCX)) {
-			val = readreg(cs->hw.avm.hscx[1], HSCX_ISTA);
+			val = hscx_read(cs, 1, HSCX_ISTA);
 			if (val)
 				hscx_int_main(cs, val);
 		}
 		if (!(sval & AVM_A1_STAT_ISAC)) {
-			val = readreg(cs->hw.avm.isac, ISAC_ISTA);
+			val = isac_read(cs, ISAC_ISTA);
 			if (val)
 				isac_interrupt(cs, val);
 		}
 	}
-	writereg(cs->hw.avm.hscx[0], HSCX_MASK, 0xFF);
-	writereg(cs->hw.avm.hscx[1], HSCX_MASK, 0xFF);
-	writereg(cs->hw.avm.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.avm.isac, ISAC_MASK, 0x0);
-	writereg(cs->hw.avm.hscx[0], HSCX_MASK, 0x0);
-	writereg(cs->hw.avm.hscx[1], HSCX_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -174,7 +187,7 @@
 int __init
 setup_avm_a1(struct IsdnCard *card)
 {
-	u_char val;
+	u8 val;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
 
@@ -289,13 +302,8 @@
 	       cs->hw.avm.hscx[0] + 32, cs->hw.avm.hscxfifo[0],
 	       cs->hw.avm.hscx[1] + 32, cs->hw.avm.hscxfifo[1]);
 
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &AVM_card_msg;
 	cs->irq_func = &avm_a1_interrupt;
 	ISACVersion(cs, "AVM A1:");
diff -Nru a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c
--- a/drivers/isdn/hisax/avm_a1p.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/avm_a1p.c	Wed Jan  8 20:04:45 2003
@@ -59,147 +59,133 @@
 static const char *avm_revision = "$Revision: 2.7.6.2 $";
 static spinlock_t avm_a1p_lock = SPIN_LOCK_UNLOCKED;
 
-static inline u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static inline u8
+readreg(struct IsdnCardState *cs, int offset, u8 adr)
 {
 	unsigned long flags;
-        u_char ret;
+        u8 ret;
 
-        offset -= 0x20;
 	spin_lock_irqsave(&avm_a1p_lock, flags);
-        byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_REG_OFFSET+offset);
-	ret = bytein(cs->hw.avm.cfg_reg+DATAREG_OFFSET);
+        byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET, offset + adr - 0x20);
+	ret = bytein(cs->hw.avm.cfg_reg + DATAREG_OFFSET);
 	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 	return ret;
 }
 
 static inline void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+writereg(struct IsdnCardState *cs, int offset, u8 adr, u8 value)
 {
 	unsigned long flags;
 
-        offset -= 0x20;
-
 	spin_lock_irqsave(&avm_a1p_lock, flags);
-        byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_REG_OFFSET+offset);
+        byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET, offset + adr - 0x20);
 	byteout(cs->hw.avm.cfg_reg+DATAREG_OFFSET, value);
 	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
 static inline void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, int offset, u8 *data, int size)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&avm_a1p_lock, flags);
-	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_FIFO_OFFSET);
-	insb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	spin_unlock_irqrestore(&avm_a1p_lock, flags);
+        byteout(cs->hw.avm.cfg_reg + ADDRREG_OFFSET, offset);
+	insb(cs->hw.avm.cfg_reg + DATAREG_OFFSET, data, size);
 }
 
 static inline void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+writefifo(struct IsdnCardState *cs, int offset, u8 *data, int size)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&avm_a1p_lock, flags);
-	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_FIFO_OFFSET);
+	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET, offset);
 	outsb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
-static inline u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 adr)
 {
-	u_char ret;
-	unsigned long flags;
+	return readreg(cs, ISAC_REG_OFFSET, adr);
+}
 
-        offset -= 0x20;
+static void
+isac_write(struct IsdnCardState *cs, u8 adr, u8 value)
+{
+	writereg(cs, ISAC_REG_OFFSET, adr, value);
+}
 
-	spin_lock_irqsave(&avm_a1p_lock, flags);
-	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
-			HSCX_REG_OFFSET+hscx*HSCX_CH_DIFF+offset);
-	ret = bytein(cs->hw.avm.cfg_reg+DATAREG_OFFSET);
-	spin_unlock_irqrestore(&avm_a1p_lock, flags);
-	return ret;
+static void
+isac_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
+{
+	readfifo(cs, ISAC_FIFO_OFFSET, data, size);
 }
 
-static inline void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+static void
+isac_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
-	unsigned long flags;
+	writefifo(cs, ISAC_FIFO_OFFSET, data, size);
+}
 
-        offset -= 0x20;
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
 
-	spin_lock_irqsave(&avm_a1p_lock, flags);
-	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
-			HSCX_REG_OFFSET+hscx*HSCX_CH_DIFF+offset);
-	byteout(cs->hw.avm.cfg_reg+DATAREG_OFFSET, value);
-	spin_unlock_irqrestore(&avm_a1p_lock, flags);
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 adr)
+{
+	return readreg(cs, HSCX_REG_OFFSET + hscx*HSCX_CH_DIFF, adr);
 }
 
-static inline void
-ReadHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size)
+static void
+hscx_write(struct IsdnCardState *cs, int hscx, u8 adr, u8 value)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&avm_a1p_lock, flags);
-	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
-			HSCX_FIFO_OFFSET+hscx*HSCX_CH_DIFF);
-	insb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	spin_unlock_irqrestore(&avm_a1p_lock, flags);
+	writereg(cs, HSCX_REG_OFFSET + hscx*HSCX_CH_DIFF, adr, value);
 }
 
-static inline void
-WriteHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&avm_a1p_lock, flags);
-	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
-			HSCX_FIFO_OFFSET+hscx*HSCX_CH_DIFF);
-	outsb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	spin_unlock_irqrestore(&avm_a1p_lock, flags);
+	return readfifo(cs, HSCX_FIFO_OFFSET + hscx*HSCX_CH_DIFF, data, size);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) ReadHSCX(cs, nr, reg)
-#define WRITEHSCX(cs, nr, reg, data) WriteHSCX(cs, nr, reg, data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) ReadHSCXfifo(cs, nr, ptr, cnt) 
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) WriteHSCXfifo(cs, nr, ptr, cnt)
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs, HSCX_FIFO_OFFSET + hscx*HSCX_CH_DIFF, data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 avm_a1p_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val, sval;
+	u8 val, sval;
 
 	spin_lock(&cs->lock);
 	while ((sval = (~bytein(cs->hw.avm.cfg_reg+ASL0_OFFSET) & ASL0_R_IRQPENDING))) {
 		if (cs->debug & L1_DEB_INTSTAT)
 			debugl1(cs, "avm IntStatus %x", sval);
 		if (sval & ASL0_R_HSCX) {
-                        val = ReadHSCX(cs, 1, HSCX_ISTA);
+                        val = hscx_read(cs, 1, HSCX_ISTA);
 			if (val)
 				hscx_int_main(cs, val);
 		}
 		if (sval & ASL0_R_ISAC) {
-			val = ReadISAC(cs, ISAC_ISTA);
+			val = isac_read(cs, ISAC_ISTA);
 			if (val)
 				isac_interrupt(cs, val);
 		}
 	}
-	WriteHSCX(cs, 0, HSCX_MASK, 0xff);
-	WriteHSCX(cs, 1, HSCX_MASK, 0xff);
-	WriteISAC(cs, ISAC_MASK, 0xff);
-	WriteISAC(cs, ISAC_MASK, 0x00);
-	WriteHSCX(cs, 0, HSCX_MASK, 0x00);
-	WriteHSCX(cs, 1, HSCX_MASK, 0x00);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -239,7 +225,7 @@
 int __devinit
 setup_avm_a1_pcmcia(struct IsdnCard *card)
 {
-	u_char model, vers;
+	u8 model, vers;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
 
@@ -270,13 +256,8 @@
 	printk(KERN_INFO "AVM A1 PCMCIA: io 0x%x irq %d model %d version %d\n",
 				cs->hw.avm.cfg_reg, cs->irq, model, vers);
 
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &AVM_card_msg;
 	cs->irq_func = &avm_a1p_interrupt;
 
diff -Nru a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
--- a/drivers/isdn/hisax/avm_pci.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/avm_pci.c	Wed Jan  8 20:04:43 2003
@@ -76,12 +76,12 @@
 
 /* Interface functions */
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+ReadISAC(struct IsdnCardState *cs, u8 offset)
 {
-	register u_char idx = (offset > 0x2f) ? AVM_ISAC_REG_HIGH : AVM_ISAC_REG_LOW;
-	register u_char val;
-	register unsigned long flags;
+	u8 idx = (offset > 0x2f) ? AVM_ISAC_REG_HIGH : AVM_ISAC_REG_LOW;
+	u8 val;
+	unsigned long flags;
 
 	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
@@ -91,10 +91,10 @@
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+WriteISAC(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	register u_char idx = (offset > 0x2f) ? AVM_ISAC_REG_HIGH : AVM_ISAC_REG_LOW;
-	register unsigned long flags;
+	u8 idx = (offset > 0x2f) ? AVM_ISAC_REG_HIGH : AVM_ISAC_REG_LOW;
+	unsigned long flags;
 
 	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
@@ -103,25 +103,32 @@
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+ReadISACfifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	outb(AVM_ISAC_FIFO, cs->hw.avm.cfg_reg + 4);
 	insb(cs->hw.avm.isac, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+WriteISACfifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	outb(AVM_ISAC_FIFO, cs->hw.avm.cfg_reg + 4);
 	outsb(cs->hw.avm.isac, data, size);
 }
 
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = ReadISAC,
+	.write_reg  = WriteISAC,
+	.read_fifo  = ReadISACfifo,
+	.write_fifo = WriteISACfifo,
+};
+
 static inline u_int
-ReadHDLCPCI(struct IsdnCardState *cs, int chan, u_char offset)
+ReadHDLCPCI(struct IsdnCardState *cs, int chan, u8 offset)
 {
-	register u_int idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
-	register u_int val;
-	register unsigned long flags;
+	u_int idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
+	u_int val;
+	unsigned long flags;
 
 	spin_lock_irqsave(&avm_pci_lock, flags);
 	outl(idx, cs->hw.avm.cfg_reg + 4);
@@ -131,10 +138,10 @@
 }
 
 static inline void
-WriteHDLCPCI(struct IsdnCardState *cs, int chan, u_char offset, u_int value)
+WriteHDLCPCI(struct IsdnCardState *cs, int chan, u8 offset, u_int value)
 {
-	register u_int idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
-	register unsigned long flags;
+	u_int idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
+	unsigned long flags;
 
 	spin_lock_irqsave(&avm_pci_lock, flags);
 	outl(idx, cs->hw.avm.cfg_reg + 4);
@@ -142,12 +149,12 @@
 	spin_unlock_irqrestore(&avm_pci_lock, flags);
 }
 
-static inline u_char
-ReadHDLCPnP(struct IsdnCardState *cs, int chan, u_char offset)
+static inline u8
+ReadHDLCPnP(struct IsdnCardState *cs, int chan, u8 offset)
 {
-	register u_char idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
-	register u_char val;
-	register unsigned long flags;
+	u8 idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
+	u8 val;
+	unsigned long flags;
 
 	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
@@ -157,10 +164,10 @@
 }
 
 static inline void
-WriteHDLCPnP(struct IsdnCardState *cs, int chan, u_char offset, u_char value)
+WriteHDLCPnP(struct IsdnCardState *cs, int chan, u8 offset, u8 value)
 {
-	register u_char idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
-	register unsigned long flags;
+	u8 idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
+	unsigned long flags;
 
 	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
@@ -168,18 +175,6 @@
 	spin_unlock_irqrestore(&avm_pci_lock, flags);
 }
 
-static u_char
-ReadHDLC_s(struct IsdnCardState *cs, int chan, u_char offset)
-{
-	return(0xff & ReadHDLCPCI(cs, chan, offset));
-}
-
-static void
-WriteHDLC_s(struct IsdnCardState *cs, int chan, u_char offset, u_char value)
-{
-	WriteHDLCPCI(cs, chan, offset, value);
-}
-
 static inline
 struct BCState *Sel_BCS(struct IsdnCardState *cs, int channel)
 {
@@ -265,8 +260,8 @@
 hdlc_empty_fifo(struct BCState *bcs, int count)
 {
 	register u_int *ptr;
-	u_char *p;
-	u_char idx = bcs->channel ? AVM_HDLC_2 : AVM_HDLC_1;
+	u8 *p;
+	u8 idx = bcs->channel ? AVM_HDLC_2 : AVM_HDLC_1;
 	int cnt=0;
 	struct IsdnCardState *cs = bcs->cs;
 
@@ -304,7 +299,7 @@
 		char *t = bcs->blog;
 
 		if (cs->subtyp == AVM_FRITZ_PNP)
-			p = (u_char *) ptr;
+			p = (u8 *) ptr;
 		t += sprintf(t, "hdlc_empty_fifo %c cnt %d",
 			     bcs->channel ? 'B' : 'A', count);
 		QuickHex(t, p, count);
@@ -312,7 +307,7 @@
 	}
 }
 
-static inline void
+static void
 hdlc_fill_fifo(struct BCState *bcs)
 {
 	struct IsdnCardState *cs = bcs->cs;
@@ -365,6 +360,10 @@
 	hdlc_fill_fifo(bcs);
 }
 
+static struct bc_l1_ops hdlc_l1_ops = {
+	.fill_fifo = hdlc_fill_fifo,
+};
+
 static inline void
 HDLC_irq(struct BCState *bcs, u_int stat)
 {
@@ -595,8 +594,8 @@
 avm_pcipnp_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
-	u_char sval;
+	u8 val;
+	u8 sval;
 
 	if (!cs) {
 		printk(KERN_WARNING "AVM PCI: Spurious interrupt!\n");
@@ -747,16 +746,14 @@
 	}
 ready:
 	cs->hw.avm.isac = cs->hw.avm.cfg_reg + 0x10;
-	if (check_region((cs->hw.avm.cfg_reg), 32)) {
+	if (!request_region((cs->hw.avm.cfg_reg), 32, (cs->subtyp == AVM_FRITZ_PCI)
+			 ? "avm PCI" : "avm PnP")) {
 		printk(KERN_WARNING
 		       "HiSax: %s config port %x-%x already in use\n",
 		       CardType[card->typ],
 		       cs->hw.avm.cfg_reg,
 		       cs->hw.avm.cfg_reg + 31);
 		return (0);
-	} else {
-		request_region(cs->hw.avm.cfg_reg, 32,
-			(cs->subtyp == AVM_FRITZ_PCI) ? "avm PCI" : "avm PnP");
 	}
 	switch (cs->subtyp) {
 	  case AVM_FRITZ_PCI:
@@ -764,30 +761,20 @@
 		printk(KERN_INFO "AVM PCI: stat %#x\n", val);
 		printk(KERN_INFO "AVM PCI: Class %X Rev %d\n",
 			val & 0xff, (val>>8) & 0xff);
-		cs->BC_Read_Reg = &ReadHDLC_s;
-		cs->BC_Write_Reg = &WriteHDLC_s;
 		break;
 	  case AVM_FRITZ_PNP:
 		val = inb(cs->hw.avm.cfg_reg);
 		ver = inb(cs->hw.avm.cfg_reg + 1);
 		printk(KERN_INFO "AVM PnP: Class %X Rev %d\n", val, ver);
 		reset_avmpcipnp(cs);
-		cs->BC_Read_Reg = &ReadHDLCPnP;
-		cs->BC_Write_Reg = &WriteHDLCPnP;
 		break;
-	  default:
-	  	printk(KERN_WARNING "AVM unknown subtype %d\n", cs->subtyp);
-	  	return(0);
 	}
 	printk(KERN_INFO "HiSax: %s config irq:%d base:0x%X\n",
 		(cs->subtyp == AVM_FRITZ_PCI) ? "AVM Fritz!PCI" : "AVM Fritz!PnP",
 		cs->irq, cs->hw.avm.cfg_reg);
 
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Send_Data = &hdlc_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_l1_ops = &hdlc_l1_ops;
 	cs->cardmsg = &AVM_card_msg;
 	cs->irq_func = &avm_pcipnp_interrupt;
 	ISACVersion(cs, (cs->subtyp == AVM_FRITZ_PCI) ? "AVM PCI:" : "AVM PnP:");
diff -Nru a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
--- a/drivers/isdn/hisax/avma1_cs.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/avma1_cs.c	Wed Jan  8 20:04:43 2003
@@ -298,7 +298,7 @@
     cistpl_cftable_entry_t *cf = &parse.cftable_entry;
     local_info_t *dev;
     int i;
-    u_char buf[64];
+    u8 buf[64];
     char devname[128];
     int busy = 0;
     
diff -Nru a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c
--- a/drivers/isdn/hisax/bkm_a4t.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/bkm_a4t.c	Wed Jan  8 20:04:43 2003
@@ -26,10 +26,10 @@
 const char *bkm_a4t_revision = "$Revision: 1.13.6.6 $";
 
 
-static inline u_char
-readreg(unsigned int ale, unsigned long adr, u_char off)
+static inline u8
+readreg(unsigned int ale, unsigned long adr, u8 off)
 {
-	register u_int ret;
+	u_int ret;
 	unsigned long flags;
 	unsigned int *po = (unsigned int *) adr;	/* Postoffice */
 	spin_lock_irqsave(&bkm_a4t_lock, flags);
@@ -42,19 +42,8 @@
 	return ((unsigned char) ret);
 }
 
-
 static inline void
-readfifo(unsigned int ale, unsigned long adr, u_char off, u_char * data, int size)
-{
-	/* fifo read without cli because it's allready done  */
-	int i;
-	for (i = 0; i < size; i++)
-		*data++ = readreg(ale, adr, off);
-}
-
-
-static inline void
-writereg(unsigned int ale, unsigned long adr, u_char off, u_char data)
+writereg(unsigned int ale, unsigned long adr, u8 off, u8 data)
 {
 	unsigned long flags;
 	unsigned int *po = (unsigned int *) adr;	/* Postoffice */
@@ -66,77 +55,93 @@
 	spin_unlock_irqrestore(&bkm_a4t_lock, flags);
 }
 
-
 static inline void
-writefifo(unsigned int ale, unsigned long adr, u_char off, u_char * data, int size)
+readfifo(unsigned int ale, unsigned long adr, u8 off, u8 * data, int size)
 {
-	/* fifo write without cli because it's allready done  */
 	int i;
 
 	for (i = 0; i < size; i++)
-		writereg(ale, adr, off, *data++);
+		*data++ = readreg(ale, adr, off);
 }
 
+static inline void
+writefifo(unsigned int ale, unsigned long adr, u8 off, u8 * data, int size)
+{
+	int i;
 
-/* Interface functions */
+	for (i = 0; i < size; i++)
+		writereg(ale, adr, off, *data++);
+}
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
 	return (readreg(cs->hw.ax.isac_ale, cs->hw.ax.isac_adr, offset));
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	writereg(cs->hw.ax.isac_ale, cs->hw.ax.isac_adr, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	readfifo(cs->hw.ax.isac_ale, cs->hw.ax.isac_adr, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	writefifo(cs->hw.ax.isac_ale, cs->hw.ax.isac_adr, 0, data, size);
 }
 
-static u_char
-ReadJADE(struct IsdnCardState *cs, int jade, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+jade_read(struct IsdnCardState *cs, int jade, u8 offset)
 {
-	return (readreg(cs->hw.ax.jade_ale, cs->hw.ax.jade_adr, offset + (jade == -1 ? 0 : (jade ? 0xC0 : 0x80))));
+	return readreg(cs->hw.ax.jade_ale, cs->hw.ax.jade_adr, offset + (jade == -1 ? 0 : (jade ? 0xC0 : 0x80)));
 }
 
 static void
-WriteJADE(struct IsdnCardState *cs, int jade, u_char offset, u_char value)
+jade_write(struct IsdnCardState *cs, int jade, u8 offset, u8 value)
 {
 	writereg(cs->hw.ax.jade_ale, cs->hw.ax.jade_adr, offset + (jade == -1 ? 0 : (jade ? 0xC0 : 0x80)), value);
 }
 
-/*
- * fast interrupt JADE stuff goes here
- */
-
-#define READJADE(cs, nr, reg) readreg(cs->hw.ax.jade_ale,\
- 		cs->hw.ax.jade_adr, reg + (nr == -1 ? 0 : (nr ? 0xC0 : 0x80)))
-#define WRITEJADE(cs, nr, reg, data) writereg(cs->hw.ax.jade_ale,\
- 		cs->hw.ax.jade_adr, reg + (nr == -1 ? 0 : (nr ? 0xC0 : 0x80)), data)
-
-#define READJADEFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.ax.jade_ale,\
-		cs->hw.ax.jade_adr, (nr == -1 ? 0 : (nr ? 0xC0 : 0x80)), ptr, cnt)
-#define WRITEJADEFIFO(cs, nr, ptr, cnt) writefifo( cs->hw.ax.jade_ale,\
-		cs->hw.ax.jade_adr, (nr == -1 ? 0 : (nr ? 0xC0 : 0x80)), ptr, cnt)
+static void
+jade_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	readfifo(cs->hw.ax.jade_ale, cs->hw.ax.jade_adr,
+		 (hscx == -1 ? 0 : (hscx ? 0xc0 : 0x80)), data, size);
+}
+
+static void
+jade_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs->hw.ax.jade_ale, cs->hw.ax.jade_adr,
+		  (hscx == -1 ? 0 : (hscx ? 0xc0 : 0x80)), data, size);
+}
 
-#include "jade_irq.c"
+static struct bc_hw_ops jade_ops = {
+	.read_reg   = jade_read,
+	.write_reg  = jade_write,
+	.read_fifo  = jade_read_fifo,
+	.write_fifo = jade_write_fifo,
+};
 
 static void
 bkm_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val = 0;
+	u8 val = 0;
 	I20_REGISTER_FILE *pI20_Regs;
 
 	spin_lock(&cs->lock);
@@ -327,13 +332,8 @@
 	       CardType[card->typ], cs->hw.ax.base, cs->irq);
 
 	reset_bkm(cs);
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadJADE;
-	cs->BC_Write_Reg = &WriteJADE;
-	cs->BC_Send_Data = &jade_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &jade_ops;
 	cs->cardmsg = &BKM_card_msg;
 	cs->irq_func = &bkm_interrupt;
 	cs->irq_flags |= SA_SHIRQ;
diff -Nru a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c
--- a/drivers/isdn/hisax/bkm_a8.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/bkm_a8.c	Wed Jan  8 20:04:45 2003
@@ -41,127 +41,134 @@
 #define wordout(addr,val) outw(val,addr)
 #define wordin(addr) inw(addr)
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(struct IsdnCardState *cs, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
+
 	spin_lock_irqsave(&bkm_a8_lock, flags);
-	wordout(ale, off);
-	ret = wordin(adr) & 0xFF;
+	wordout(cs->hw.ax.base, off);
+	ret = wordin(cs->hw.ax.data_adr) & 0xFF;
 	spin_unlock_irqrestore(&bkm_a8_lock, flags);
 	return (ret);
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
-{
-	/* fifo read without cli because it's allready done  */
-	int i;
-	wordout(ale, off);
-	for (i = 0; i < size; i++)
-		data[i] = wordin(adr) & 0xFF;
-}
-
-
-static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(struct IsdnCardState *cs, u8 off, u8 data)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&bkm_a8_lock, flags);
-	wordout(ale, off);
-	wordout(adr, data);
+	wordout(cs->hw.ax.base, off);
+	wordout(cs->hw.ax.data_adr, data);
 	spin_unlock_irqrestore(&bkm_a8_lock, flags);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, u8 off, u8 *data, int size)
 {
-	/* fifo write without cli because it's allready done  */
 	int i;
-	wordout(ale, off);
+
+	wordout(cs->hw.ax.base, off);
 	for (i = 0; i < size; i++)
-		wordout(adr, data[i]);
+		data[i] = wordin(cs->hw.ax.data_adr) & 0xFF;
 }
 
-/* Interface functions */
+static inline void
+writefifo(struct IsdnCardState *cs, u8 off, u8 *data, int size)
+{
+	int i;
+
+	wordout(cs->hw.ax.base, off);
+	for (i = 0; i < size; i++)
+		wordout(cs->hw.ax.data_adr, data[i]);
+}
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+ipac_dc_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.ax.base, cs->hw.ax.data_adr, offset | 0x80));
+	return readreg(cs, offset | 0x80);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+ipac_dc_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.ax.base, cs->hw.ax.data_adr, offset | 0x80, value);
+	writereg(cs, offset | 0x80, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	readfifo(cs->hw.ax.base, cs->hw.ax.data_adr, 0x80, data, size);
+	readfifo(cs, 0x80, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writefifo(cs->hw.ax.base, cs->hw.ax.data_adr, 0x80, data, size);
+	writefifo(cs, 0x80, data, size);
 }
 
+static struct dc_hw_ops ipac_dc_ops = {
+	.read_reg   = ipac_dc_read,
+	.write_reg  = ipac_dc_write,
+	.read_fifo  = ipac_dc_read_fifo,
+	.write_fifo = ipac_dc_write_fifo,
+};
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.ax.base, cs->hw.ax.data_adr, offset + (hscx ? 0x40 : 0)));
+	return readreg(cs, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.ax.base, cs->hw.ax.data_adr, offset + (hscx ? 0x40 : 0), value);
+	writereg(cs, offset + (hscx ? 0x40 : 0), value);
 }
 
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	readfifo(cs, hscx ? 0x40 : 0, data, size);
+}
+
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs, hscx ? 0x40 : 0, data, size);
+}
+
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
+
 /* Set the specific ipac to active */
 static void
 set_ipac_active(struct IsdnCardState *cs, u_int active)
 {
 	/* set irq mask */
-	writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK,
-		active ? 0xc0 : 0xff);
+	writereg(cs, IPAC_MASK, active ? 0xc0 : 0xff);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.ax.base, \
-	cs->hw.ax.data_adr, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.ax.base, \
-	cs->hw.ax.data_adr, reg + (nr ? 0x40 : 0), data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.ax.base, \
-	cs->hw.ax.data_adr, (nr ? 0x40 : 0), ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.ax.base, \
-	cs->hw.ax.data_adr, (nr ? 0x40 : 0), ptr, cnt)
-
-#include "hscx_irq.c"
-
 static void
 bkm_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char ista, val, icnt = 5;
+	u8 ista, val, icnt = 5;
 
 	spin_lock(&cs->lock);
-	ista = readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ISTA);
+	ista = readreg(cs, IPAC_ISTA);
 	if (!(ista & 0x3f)) /* not this IPAC */
 		goto unlock;
       Start_IPAC:
 	if (cs->debug & L1_DEB_IPAC)
 		debugl1(cs, "IPAC ISTA %02X", ista);
 	if (ista & 0x0f) {
-		val = readreg(cs->hw.ax.base, cs->hw.ax.data_adr, HSCX_ISTA + 0x40);
+		val = hscx_read(cs, 1, HSCX_ISTA);
 		if (ista & 0x01)
 			val |= 0x01;
 		if (ista & 0x04)
@@ -173,7 +180,7 @@
 		}
 	}
 	if (ista & 0x20) {
-		val = 0xfe & readreg(cs->hw.ax.base, cs->hw.ax.data_adr, ISAC_ISTA | 0x80);
+		val = ipac_dc_read(cs, ISAC_ISTA) & 0xfe;
 		if (val) {
 			isac_interrupt(cs, val);
 		}
@@ -182,7 +189,7 @@
 		val = 0x01;
 		isac_interrupt(cs, val);
 	}
-	ista = readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ISTA);
+	ista = readreg(cs, IPAC_ISTA);
 	if ((ista & 0x3f) && icnt) {
 		icnt--;
 		goto Start_IPAC;
@@ -191,8 +198,8 @@
 		printk(KERN_WARNING "HiSax: %s (%s) IRQ LOOP\n",
 		       CardType[cs->typ],
 		       sct_quadro_subtypes[cs->subtyp]);
-	writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xFF);
-	writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xC0);
+	writereg(cs, IPAC_MASK, 0xFF);
+	writereg(cs, IPAC_MASK, 0xC0);
  unlock:
 	spin_unlock(&cs->lock);
 }
@@ -263,13 +270,11 @@
 int __init
 sct_alloc_io(u_int adr, u_int len)
 {
-	if (check_region(adr, len)) {
+	if (!request_region(adr, len, "scitel")) {
 		printk(KERN_WARNING
 			"HiSax: Scitel port %#x-%#x already in use\n",
 			adr, adr + len);
 		return (1);
-	} else {
-		request_region(adr, len, "scitel");
 	}
 	return(0);
 }
@@ -277,7 +282,7 @@
 static struct pci_dev *dev_a8 __initdata = NULL;
 static u16  sub_vendor_id __initdata = 0;
 static u16  sub_sys_id __initdata = 0;
-static u_char pci_irq __initdata = 0;
+static u8 pci_irq __initdata = 0;
 
 #endif /* CONFIG_PCI */
 
@@ -287,7 +292,7 @@
 #if CONFIG_PCI
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
-	u_char pci_rev_id;
+	u8 pci_rev_id;
 	u_int found = 0;
 	u_int pci_ioaddr1, pci_ioaddr2, pci_ioaddr3, pci_ioaddr4, pci_ioaddr5;
 
@@ -391,15 +396,6 @@
 				return(0);
 			if (sct_alloc_io(pci_ioaddr5, 64))
 				return(0);
-			/* disable all IPAC */
-			writereg(pci_ioaddr5, pci_ioaddr5 + 4,
-				IPAC_MASK, 0xFF);
-			writereg(pci_ioaddr4 + 0x08, pci_ioaddr4 + 0x0c,
-				IPAC_MASK, 0xFF);
-			writereg(pci_ioaddr3 + 0x10, pci_ioaddr3 + 0x14,
-				IPAC_MASK, 0xFF);
-			writereg(pci_ioaddr2 + 0x20, pci_ioaddr2 + 0x24,
-				IPAC_MASK, 0xFF);
 			break;
 		case 2:
 			cs->hw.ax.base = pci_ioaddr4 + 0x08;
@@ -417,8 +413,8 @@
 				return(0);
 			break;
 	}	
-	/* For isac and hscx data path */
 	cs->hw.ax.data_adr = cs->hw.ax.base + 4;
+	writereg(cs, IPAC_MASK, 0xFF);
 
 	printk(KERN_INFO "HiSax: %s (%s) configured at 0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n",
 	       CardType[card->typ],
@@ -430,21 +426,15 @@
 
 	test_and_set_bit(HW_IPAC, &cs->HW_Flags);
 
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &ipac_dc_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &BKM_card_msg;
 	cs->irq_func = &bkm_interrupt_ipac;
 
 	printk(KERN_INFO "HiSax: %s (%s): IPAC Version %d\n",
 		CardType[card->typ],
 		sct_quadro_subtypes[cs->subtyp],
-		readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ID));
+		readreg(cs, IPAC_ID));
 	return (1);
 #else
 	printk(KERN_ERR "HiSax: bkm_a8 only supported on PCI Systems\n");
diff -Nru a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c
--- a/drivers/isdn/hisax/callc.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/callc.c	Wed Jan  8 20:04:44 2003
@@ -1424,7 +1424,7 @@
 {
 	char *t = tmpbuf;
 
-	t += QuickHex(t, (u_char *)cm, (cm->Length>50)? 50: cm->Length);
+	t += QuickHex(t, (u8 *)cm, (cm->Length>50)? 50: cm->Length);
 	t--;
 	*t= 0;
 	HiSax_putstatus(chanp->cs, "Ch", "%d CAPIMSG %s", chanp->chan, tmpbuf);
diff -Nru a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
--- a/drivers/isdn/hisax/config.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/config.c	Wed Jan  8 20:04:45 2003
@@ -634,10 +634,10 @@
 	return NULL;
 }
 
-int HiSax_readstatus(u_char * buf, int len, int user, int id, int channel)
+int HiSax_readstatus(u8 * buf, int len, int user, int id, int channel)
 {
 	int count, cnt;
-	u_char *p = buf;
+	u8 *p = buf;
 	struct IsdnCardState *cs = hisax_findcard(id);
 
 	if (cs) {
@@ -702,7 +702,7 @@
 	return 8;
 }
 
-static u_char tmpbuf[HISAX_STATUS_BUFSIZE];
+static u8 tmpbuf[HISAX_STATUS_BUFSIZE];
 
 void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt,
 		      va_list args)
@@ -711,7 +711,7 @@
 
 	unsigned long flags;
 	int count, i;
-	u_char *p;
+	u8 *p;
 	isdn_ctrl ic;
 	int len;
 
@@ -1511,7 +1511,8 @@
 	       nrcards, (nrcards > 1) ? "s" : "");
 
 	/* Install only, if at least one card found */
-	HiSax_inithardware(NULL);
+	if (!HiSax_inithardware(NULL))
+		return -ENODEV;
 	return 0;
 
  out_tei:
@@ -1575,7 +1576,8 @@
 	printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
 	       nrcards, (nrcards > 1) ? "s" : "");
 
-	HiSax_inithardware(busy_flag);
+	if (!HiSax_inithardware(busy_flag))
+		return -ENODEV;
 	printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
 	return 0;
@@ -1617,7 +1619,8 @@
 	printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
 	       nrcards, (nrcards > 1) ? "s" : "");
 
-	HiSax_inithardware(busy_flag);
+	if (!HiSax_inithardware(busy_flag))
+		return -ENODEV;
 	printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
 	return 0;
@@ -1659,7 +1662,8 @@
 	printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
 	       nrcards, (nrcards > 1) ? "s" : "");
 
-	HiSax_inithardware(busy_flag);
+	if (!HiSax_inithardware(busy_flag))
+		return -ENODEV;
 	printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
 	return 0;
@@ -1701,7 +1705,8 @@
 	printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
 	       nrcards, (nrcards > 1) ? "s" : "");
 
-	HiSax_inithardware(busy_flag);
+	if (!HiSax_inithardware(busy_flag))
+		return -ENODEV;
 	printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
 	return 0;
@@ -1711,7 +1716,7 @@
 int __devinit hisax_init_pcmcia(void *pcm_iob, int *busy_flag,
 				struct IsdnCard *card)
 {
-	u_char ids[16];
+	u8 ids[16];
 	int ret = -1;
 
 	cards[nrcards] = *card;
@@ -2018,7 +2023,7 @@
 static void EChannel_proc_rcv(struct hisax_d_if *d_if)
 {
 	struct IsdnCardState *cs = d_if->cs;
-	u_char *ptr;
+	u8 *ptr;
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(&d_if->erq)) != NULL) {
diff -Nru a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
--- a/drivers/isdn/hisax/diva.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/diva.c	Wed Jan  8 20:04:45 2003
@@ -82,229 +82,259 @@
 #endif
 #define PITA_INT0_STATUS	0x02
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(unsigned int ale, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&diva_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&diva_lock, flags);
-	return (ret);
+	return ret;
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+writereg(unsigned int ale, unsigned int adr, u8 off, u8 data)
 {
-	/* fifo read without cli because it's allready done  */
+	unsigned long flags;
 
+	spin_lock_irqsave(&diva_lock, flags);
 	byteout(ale, off);
-	insb(adr, data, size);
+	byteout(adr, data);
+	spin_unlock_irqrestore(&diva_lock, flags);
 }
 
-
 static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+readfifo(unsigned int ale, unsigned int adr, u8 off, u8 * data, int size)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&diva_lock, flags);
 	byteout(ale, off);
-	byteout(adr, data);
-	spin_unlock_irqrestore(&diva_lock, flags);
+	insb(adr, data, size);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char *data, int size)
+writefifo(unsigned int ale, unsigned int adr, u8 off, u8 *data, int size)
 {
-	/* fifo write without cli because it's allready done  */
 	byteout(ale, off);
 	outsb(adr, data, size);
 }
 
-static inline u_char
-memreadreg(unsigned long adr, u_char off)
+static inline u8
+memreadreg(unsigned long adr, u8 off)
 {
-	return(*((unsigned char *)
-		(((unsigned int *)adr) + off)));
+	return readb(((unsigned int *)adr) + off);
 }
 
 static inline void
-memwritereg(unsigned long adr, u_char off, u_char data)
+memwritereg(unsigned long adr, u8 off, u8 data)
 {
-	register u_char *p;
-	
-	p = (unsigned char *)(((unsigned int *)adr) + off);
-	*p = data;
+	writeb(data, ((unsigned int *)adr) + off);
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return(readreg(cs->hw.diva.isac_adr, cs->hw.diva.isac, offset));
+	return readreg(cs->hw.diva.isac_adr, cs->hw.diva.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	writereg(cs->hw.diva.isac_adr, cs->hw.diva.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	readfifo(cs->hw.diva.isac_adr, cs->hw.diva.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	writefifo(cs->hw.diva.isac_adr, cs->hw.diva.isac, 0, data, size);
 }
 
-static u_char
-ReadISAC_IPAC(struct IsdnCardState *cs, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+ipac_dc_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.diva.isac_adr, cs->hw.diva.isac, offset+0x80));
+	return readreg(cs->hw.diva.isac_adr, cs->hw.diva.isac, offset+0x80);
 }
 
 static void
-WriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value)
+ipac_dc_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	writereg(cs->hw.diva.isac_adr, cs->hw.diva.isac, offset|0x80, value);
 }
 
 static void
-ReadISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	readfifo(cs->hw.diva.isac_adr, cs->hw.diva.isac, 0x80, data, size);
 }
 
 static void
-WriteISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	writefifo(cs->hw.diva.isac_adr, cs->hw.diva.isac, 0x80, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops ipac_dc_ops = {
+	.read_reg   = ipac_dc_read,
+	.write_reg  = ipac_dc_write,
+	.read_fifo  = ipac_dc_read_fifo,
+	.write_fifo = ipac_dc_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return(readreg(cs->hw.diva.hscx_adr,
-		cs->hw.diva.hscx, offset + (hscx ? 0x40 : 0)));
+	return readreg(cs->hw.diva.hscx_adr, cs->hw.diva.hscx, 
+		       offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.diva.hscx_adr,
-		cs->hw.diva.hscx, offset + (hscx ? 0x40 : 0), value);
+	writereg(cs->hw.diva.hscx_adr, cs->hw.diva.hscx,
+		 offset + (hscx ? 0x40 : 0), value);
 }
 
-static u_char
-MemReadISAC_IPAC(struct IsdnCardState *cs, u_char offset)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
 {
-	return (memreadreg(cs->hw.diva.cfg_reg, offset+0x80));
+	readfifo(cs->hw.diva.hscx_adr, cs->hw.diva.hscx, hscx ? 0x40 : 0, data, size);
 }
 
 static void
-MemWriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value)
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs->hw.diva.hscx_adr, cs->hw.diva.hscx, hscx ? 0x40 : 0, data, size);
+}
+
+static struct bc_hw_ops hscx_ops = {
+	.read_reg  = hscx_read,
+	.write_reg = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
+
+static u8
+mem_ipac_dc_read(struct IsdnCardState *cs, u8 offset)
+{
+	return memreadreg(cs->hw.diva.cfg_reg, offset+0x80);
+}
+
+static void
+mem_ipac_dc_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	memwritereg(cs->hw.diva.cfg_reg, offset|0x80, value);
 }
 
 static void
-MemReadISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+mem_ipac_dc_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	while(size--)
 		*data++ = memreadreg(cs->hw.diva.cfg_reg, 0x80);
 }
 
 static void
-MemWriteISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+mem_ipac_dc_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	while(size--)
 		memwritereg(cs->hw.diva.cfg_reg, 0x80, *data++);
 }
 
-static u_char
-MemReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops mem_ipac_dc_ops = {
+	.read_reg   = mem_ipac_dc_read,
+	.write_reg  = mem_ipac_dc_write,
+	.read_fifo  = mem_ipac_dc_read_fifo,
+	.write_fifo = mem_ipac_dc_write_fifo,
+};
+
+static u8
+mem_hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return(memreadreg(cs->hw.diva.cfg_reg, offset + (hscx ? 0x40 : 0)));
+	return memreadreg(cs->hw.diva.cfg_reg, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-MemWriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+mem_hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
 	memwritereg(cs->hw.diva.cfg_reg, offset + (hscx ? 0x40 : 0), value);
 }
 
+static struct bc_hw_ops mem_hscx_ops = {
+	.read_reg   = mem_hscx_read,
+	.write_reg  = mem_hscx_write,
+};
+
 /* IO-Functions for IPACX type cards */
-static u_char
-MemReadISAC_IPACX(struct IsdnCardState *cs, u_char offset)
+static u8
+ipacx_dc_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (memreadreg(cs->hw.diva.cfg_reg, offset));
+	return memreadreg(cs->hw.diva.cfg_reg, offset);
 }
 
 static void
-MemWriteISAC_IPACX(struct IsdnCardState *cs, u_char offset, u_char value)
+ipacx_dc_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	memwritereg(cs->hw.diva.cfg_reg, offset, value);
 }
 
 static void
-MemReadISACfifo_IPACX(struct IsdnCardState *cs, u_char * data, int size)
+ipacx_dc_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	while(size--)
 		*data++ = memreadreg(cs->hw.diva.cfg_reg, 0);
 }
 
 static void
-MemWriteISACfifo_IPACX(struct IsdnCardState *cs, u_char * data, int size)
+ipacx_dc_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	while(size--)
 		memwritereg(cs->hw.diva.cfg_reg, 0, *data++);
 }
 
-static u_char
-MemReadHSCX_IPACX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops ipacx_dc_ops = {
+	.read_reg   = ipacx_dc_read,
+	.write_reg  = ipacx_dc_write,
+	.read_fifo  = ipacx_dc_read_fifo,
+	.write_fifo = ipacx_dc_write_fifo,
+};
+
+static u8
+ipacx_bc_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return(memreadreg(cs->hw.diva.cfg_reg, offset + 
-                    (hscx ? IPACX_OFF_B2 : IPACX_OFF_B1)));
+	return memreadreg(cs->hw.diva.cfg_reg, offset + 
+			  (hscx ? IPACX_OFF_B2 : IPACX_OFF_B1));
 }
 
 static void
-MemWriteHSCX_IPACX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+ipacx_bc_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
 	memwritereg(cs->hw.diva.cfg_reg, offset + 
               (hscx ? IPACX_OFF_B2 : IPACX_OFF_B1), value);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.diva.hscx_adr, \
-		cs->hw.diva.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.diva.hscx_adr, \
-                cs->hw.diva.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.diva.hscx_adr, \
-		cs->hw.diva.hscx, (nr ? 0x40 : 0), ptr, cnt)
-
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.diva.hscx_adr, \
-		cs->hw.diva.hscx, (nr ? 0x40 : 0), ptr, cnt)
-
-#include "hscx_irq.c"
+static struct bc_hw_ops ipacx_bc_ops = {
+	.read_reg   = ipacx_bc_read,
+	.write_reg  = ipacx_bc_write,
+};
 
 static void
 diva_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val, sval;
+	u8 val, sval;
 	int cnt=5;
 
 	spin_lock(&cs->lock);
@@ -332,7 +362,7 @@
 diva_irq_ipac_isa(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char ista,val;
+	u8 ista,val;
 	int icnt=5;
 
 	if (!cs) {
@@ -380,7 +410,7 @@
 {
 	int to = 50;
 
-	while ((MemReadHSCX(cs, hscx, HSCX_STAR) & 0x04) && to) {
+	while ((mem_hscx_read(cs, hscx, HSCX_STAR) & 0x04) && to) {
 		udelay(1);
 		to--;
 	}
@@ -394,7 +424,7 @@
 {
 	int to = 50;
 
-	while ((!(MemReadHSCX(cs, hscx, HSCX_STAR) & 0x44) == 0x40) && to) {
+	while ((!(mem_hscx_read(cs, hscx, HSCX_STAR) & 0x44) == 0x40) && to) {
 		udelay(1);
 		to--;
 	}
@@ -403,20 +433,20 @@
 }
 
 static inline void
-MemWriteHSCXCMDR(struct IsdnCardState *cs, int hscx, u_char data)
+MemWriteHSCXCMDR(struct IsdnCardState *cs, int hscx, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&diva_lock, flags);
 	MemwaitforCEC(cs, hscx);
-	MemWriteHSCX(cs, hscx, HSCX_CMDR, data);
+	mem_hscx_write(cs, hscx, HSCX_CMDR, data);
 	spin_unlock_irqrestore(&diva_lock, flags);
 }
 
 static void
 Memhscx_empty_fifo(struct BCState *bcs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 	struct IsdnCardState *cs = bcs->cs;
 	unsigned long flags;
 	int cnt;
@@ -469,10 +499,14 @@
 	MemWriteHSCXCMDR(cs, bcs->hw.hscx.hscx, more ? 0x8 : 0xa);
 }
 
+static struct bc_l1_ops mem_hscx_l1_ops = {
+	.fill_fifo = Memhscx_fill_fifo,
+};
+
 static inline void
-Memhscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
+Memhscx_interrupt(struct IsdnCardState *cs, u8 val, u8 hscx)
 {
-	u_char r;
+	u8 r;
 	struct BCState *bcs = cs->bcs + hscx;
 	struct sk_buff *skb;
 	int fifo_size = test_bit(HW_IPAC, &cs->HW_Flags)? 64: 32;
@@ -482,7 +516,7 @@
 		return;
 
 	if (val & 0x80) {	/* RME */
-		r = MemReadHSCX(cs, hscx, HSCX_RSTA);
+		r = mem_hscx_read(cs, hscx, HSCX_RSTA);
 		if ((r & 0xf0) != 0xa0) {
 			if (!(r & 0x80))
 				if (cs->debug & L1_DEB_WARN)
@@ -496,7 +530,7 @@
 					debugl1(cs, "HSCX CRC error");
 			MemWriteHSCXCMDR(cs, hscx, 0x80);
 		} else {
-			count = MemReadHSCX(cs, hscx, HSCX_RBCL) & (
+			count = mem_hscx_read(cs, hscx, HSCX_RBCL) & (
 				test_bit(HW_IPAC, &cs->HW_Flags)? 0x3f: 0x1f);
 			if (count == 0)
 				count = fifo_size;
@@ -541,15 +575,15 @@
 }
 
 static inline void
-Memhscx_int_main(struct IsdnCardState *cs, u_char val)
+Memhscx_int_main(struct IsdnCardState *cs, u8 val)
 {
 
-	u_char exval;
+	u8 exval;
 	struct BCState *bcs;
 
 	if (val & 0x01) { // EXB
 		bcs = cs->bcs + 1;
-		exval = MemReadHSCX(cs, 1, HSCX_EXIR);
+		exval = mem_hscx_read(cs, 1, HSCX_EXIR);
 		if (exval & 0x40) {
 			if (cs->debug & L1_DEB_HSCX)
 				debugl1(cs, "HSCX B EXIR %x", exval);
@@ -563,7 +597,7 @@
 	}
 	if (val & 0x02) {	// EXA
 		bcs = cs->bcs;
-		exval = MemReadHSCX(cs, 0, HSCX_EXIR);
+		exval = mem_hscx_read(cs, 0, HSCX_EXIR);
 		if (exval & 0x40) {
 			if (cs->debug & L1_DEB_HSCX)
 				debugl1(cs, "HSCX A EXIR %x", exval);
@@ -571,7 +605,7 @@
 		}
 	}
 	if (val & 0x04) {	// ICA
-		exval = MemReadHSCX(cs, 0, HSCX_ISTA);
+		exval = mem_hscx_read(cs, 0, HSCX_ISTA);
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX A interrupt %x", exval);
 		Memhscx_interrupt(cs, exval, 0);
@@ -582,15 +616,15 @@
 diva_irq_ipac_pci(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char ista,val;
+	u8 ista,val;
 	int icnt=5;
-	u_char *cfg;
+	u8 *cfg;
 
 	if (!cs) {
 		printk(KERN_WARNING "Diva: Spurious interrupt!\n");
 		return;
 	}
-	cfg = (u_char *) cs->hw.diva.pci_cfg;
+	cfg = (u8 *) cs->hw.diva.pci_cfg;
 	val = *cfg;
 	if (!(val & PITA_INT0_STATUS))
 		return; /* other shared IRQ */
@@ -635,14 +669,14 @@
 diva_irq_ipacx_pci(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
-	u_char *cfg;
+	u8 val;
+	u8 *cfg;
 
 	if (!cs) {
 		printk(KERN_WARNING "Diva: Spurious interrupt!\n");
 		return;
 	}
-	cfg = (u_char *) cs->hw.diva.pci_cfg;
+	cfg = (u8 *) cs->hw.diva.pci_cfg;
 	val = *cfg;
 	if (!(val &PITA_INT0_STATUS)) return; // other shared IRQ
 	interrupt_ipacx(cs);      // handler for chip
@@ -707,7 +741,7 @@
 		*ireg = PITA_PARA_MPX_MODE | PITA_SER_SOFTRESET;
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout((10*HZ)/1000);
-    MemWriteISAC_IPACX(cs, IPACX_MASK, 0xff); // Interrupts off
+		ipacx_dc_write(cs, IPACX_MASK, 0xff); // Interrupts off
 	} else { /* DIVA 2.0 */
 		cs->hw.diva.ctrl_reg = 0;        /* Reset On */
 		byteout(cs->hw.diva.ctrl, cs->hw.diva.ctrl_reg);
@@ -865,7 +899,7 @@
 setup_diva(struct IsdnCard *card)
 {
 	int bytecnt = 8;
-	u_char val;
+	u8 val;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
 
@@ -1064,48 +1098,31 @@
 		}
 	}
 	reset_diva(cs);
-	cs->BC_Read_Reg  = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Diva_card_msg;
 	if (cs->subtyp == DIVA_IPAC_ISA) {
-		cs->readisac  = &ReadISAC_IPAC;
-		cs->writeisac = &WriteISAC_IPAC;
-		cs->readisacfifo  = &ReadISACfifo_IPAC;
-		cs->writeisacfifo = &WriteISACfifo_IPAC;
+		cs->dc_hw_ops = &ipac_dc_ops;
 		cs->irq_func = &diva_irq_ipac_isa;
 		val = readreg(cs->hw.diva.isac_adr, cs->hw.diva.isac, IPAC_ID);
 		printk(KERN_INFO "Diva: IPAC version %x\n", val);
 	} else if (cs->subtyp == DIVA_IPAC_PCI) {
-		cs->readisac  = &MemReadISAC_IPAC;
-		cs->writeisac = &MemWriteISAC_IPAC;
-		cs->readisacfifo  = &MemReadISACfifo_IPAC;
-		cs->writeisacfifo = &MemWriteISACfifo_IPAC;
-		cs->BC_Read_Reg  = &MemReadHSCX;
-		cs->BC_Write_Reg = &MemWriteHSCX;
-		cs->BC_Send_Data = &Memhscx_fill_fifo;
+		cs->dc_hw_ops = &mem_ipac_dc_ops;
+		cs->bc_hw_ops = &mem_hscx_ops;
+		cs->bc_l1_ops = &mem_hscx_l1_ops;
 		cs->irq_func = &diva_irq_ipac_pci;
 		val = memreadreg(cs->hw.diva.cfg_reg, IPAC_ID);
 		printk(KERN_INFO "Diva: IPAC version %x\n", val);
 	} else if (cs->subtyp == DIVA_IPACX_PCI) {
-		cs->readisac  = &MemReadISAC_IPACX;
-		cs->writeisac = &MemWriteISAC_IPACX;
-		cs->readisacfifo  = &MemReadISACfifo_IPACX;
-		cs->writeisacfifo = &MemWriteISACfifo_IPACX;
-		cs->BC_Read_Reg  = &MemReadHSCX_IPACX;
-		cs->BC_Write_Reg = &MemWriteHSCX_IPACX;
-		cs->BC_Send_Data = &ipacx_fill_fifo;
+		cs->dc_hw_ops = &ipacx_dc_ops;
+		cs->bc_hw_ops = &ipacx_bc_ops;
 		cs->irq_func = &diva_irq_ipacx_pci;
 		printk(KERN_INFO "Diva: IPACX Design Id: %x\n", 
-            MemReadISAC_IPACX(cs, IPACX_ID) &0x3F);
+		       ipacx_dc_read(cs, IPACX_ID) &0x3F);
 	} else { /* DIVA 2.0 */
 		cs->hw.diva.tl.function = (void *) diva_led_handler;
 		cs->hw.diva.tl.data = (long) cs;
 		init_timer(&cs->hw.diva.tl);
-		cs->readisac  = &ReadISAC;
-		cs->writeisac = &WriteISAC;
-		cs->readisacfifo  = &ReadISACfifo;
-		cs->writeisacfifo = &WriteISACfifo;
+		cs->dc_hw_ops = &isac_ops;
 		cs->irq_func = &diva_interrupt;
 		ISACVersion(cs, "Diva:");
 		if (HscxVersion(cs, "Diva:")) {
diff -Nru a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
--- a/drivers/isdn/hisax/elsa.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/elsa.c	Wed Jan  8 20:04:43 2003
@@ -142,127 +142,152 @@
 #include "elsa_ser.c"
 #endif /* ARCOFI_USE */
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(struct IsdnCardState *cs, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&elsa_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.elsa.ale, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&elsa_lock, flags);
-	return (ret);
+	return ret;
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
-{
-	/* fifo read without cli because it's allready done  */
-
-	byteout(ale, off);
-	insb(adr, data, size);
-}
-
-
-static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&elsa_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.elsa.ale, off);
 	byteout(adr, data);
 	spin_unlock_irqrestore(&elsa_lock, flags);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
 {
-	/* fifo write without cli because it's allready done  */
-	byteout(ale, off);
-	outsb(adr, data, size);
+	byteout(cs->hw.elsa.ale, off);
+	insb(adr, data, size);
 }
 
-/* Interface functions */
+static inline void
+writefifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
+{
+	byteout(cs->hw.elsa.ale, off);
+	outsb(adr, data, size);
+}
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, offset));
+	return readreg(cs, cs->hw.elsa.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, offset, value);
+	writereg(cs, cs->hw.elsa.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
-	readfifo(cs->hw.elsa.ale, cs->hw.elsa.isac, 0, data, size);
+	readfifo(cs, cs->hw.elsa.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
-	writefifo(cs->hw.elsa.ale, cs->hw.elsa.isac, 0, data, size);
+	writefifo(cs, cs->hw.elsa.isac, 0, data, size);
 }
 
-static u_char
-ReadISAC_IPAC(struct IsdnCardState *cs, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+ipac_dc_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, offset+0x80));
+	return readreg(cs, cs->hw.elsa.isac, offset+0x80);
 }
 
 static void
-WriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value)
+ipac_dc_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, offset|0x80, value);
+	writereg(cs, cs->hw.elsa.isac, offset|0x80, value);
 }
 
 static void
-ReadISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
-	readfifo(cs->hw.elsa.ale, cs->hw.elsa.isac, 0x80, data, size);
+	readfifo(cs, cs->hw.elsa.isac, 0x80, data, size);
 }
 
 static void
-WriteISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
-	writefifo(cs->hw.elsa.ale, cs->hw.elsa.isac, 0x80, data, size);
+	writefifo(cs, cs->hw.elsa.isac, 0x80, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops ipac_dc_ops = {
+	.read_reg   = ipac_dc_read,
+	.write_reg  = ipac_dc_write,
+	.read_fifo  = ipac_dc_read_fifo,
+	.write_fifo = ipac_dc_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.elsa.ale,
-			cs->hw.elsa.hscx, offset + (hscx ? 0x40 : 0)));
+	return readreg(cs, cs->hw.elsa.hscx, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.elsa.ale,
-		 cs->hw.elsa.hscx, offset + (hscx ? 0x40 : 0), value);
+	writereg(cs, cs->hw.elsa.hscx, offset + (hscx ? 0x40 : 0), value);
 }
 
-static inline u_char
-readitac(struct IsdnCardState *cs, u_char off)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs, cs->hw.elsa.hscx, hscx ? 0x40 : 0, data, size);
+}
+
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
 {
-	register u_char ret;
+	writefifo(cs, cs->hw.elsa.hscx, hscx ? 0x40 : 0, data, size);
+}
+
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
+
+static inline u8
+readitac(struct IsdnCardState *cs, u8 off)
+{
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&elsa_lock, flags);
 	byteout(cs->hw.elsa.ale, off);
 	ret = bytein(cs->hw.elsa.itac);
 	spin_unlock_irqrestore(&elsa_lock, flags);
-	return (ret);
+	return ret;
 }
 
 static inline void
-writeitac(struct IsdnCardState *cs, u_char off, u_char data)
+writeitac(struct IsdnCardState *cs, u8 off, u8 data)
 {
 	unsigned long flags;
 
@@ -275,7 +300,7 @@
 static inline int
 TimerRun(struct IsdnCardState *cs)
 {
-	register u_char v;
+	register u8 v;
 
 	v = bytein(cs->hw.elsa.cfg);
 	if ((cs->subtyp == ELSA_QS1000) || (cs->subtyp == ELSA_QS3000))
@@ -284,28 +309,12 @@
 		return (v & ELSA_TIMER_RUN_PCC8);
 	return (v & ELSA_TIMER_RUN);
 }
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.elsa.ale, \
-		cs->hw.elsa.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.elsa.ale, \
-		cs->hw.elsa.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.elsa.ale, \
-		cs->hw.elsa.hscx, (nr ? 0x40 : 0), ptr, cnt)
-
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.elsa.ale, \
-		cs->hw.elsa.hscx, (nr ? 0x40 : 0), ptr, cnt)
-
-#include "hscx_irq.c"
 
 static void
 elsa_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 	int icnt=5;
 
 	spin_lock(&cs->lock);
@@ -324,24 +333,24 @@
 		}
 	}
 #endif
-	val = readreg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val) {
 		hscx_int_main(cs, val);
 	}
-	val = readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val) {
 		isac_interrupt(cs, val);
 	}
-	val = readreg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val && icnt) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		icnt--;
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val && icnt) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
@@ -350,9 +359,9 @@
 	}
 	if (!icnt)
 		printk(KERN_WARNING"ELSA IRQ LOOP\n");
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK, 0xFF);
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK + 0x40, 0xFF);
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_MASK, 0xFF);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
 	if (cs->hw.elsa.status & ELSA_TIMER_AKTIV) {
 		if (!TimerRun(cs)) {
 			/* Timer Restart */
@@ -372,9 +381,9 @@
 #endif
 	if (cs->hw.elsa.trig)
 		byteout(cs->hw.elsa.trig, 0x00);
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK, 0x0);
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK + 0x40, 0x0);
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x00);
+	hscx_write(cs, 1, HSCX_MASK, 0x00);
+	isac_write(cs, ISAC_MASK, 0x00);
  unlock:
 	spin_unlock(&cs->lock);
 }
@@ -383,7 +392,7 @@
 elsa_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char ista,val;
+	u8 ista,val;
 	int icnt=5;
 
 	if (!cs) {
@@ -405,12 +414,12 @@
 		}
 	}
 #endif
-	ista = readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ISTA);
+	ista = readreg(cs, cs->hw.elsa.isac, IPAC_ISTA);
 Start_IPAC:
 	if (cs->debug & L1_DEB_IPAC)
 		debugl1(cs, "IPAC ISTA %02X", ista);
 	if (ista & 0x0f) {
-		val = readreg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_ISTA + 0x40);
+		val = hscx_read(cs, 1, HSCX_ISTA);
 		if (ista & 0x01)
 			val |= 0x01;
 		if (ista & 0x04)
@@ -421,7 +430,7 @@
 			hscx_int_main(cs, val);
 	}
 	if (ista & 0x20) {
-		val = 0xfe & readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_ISTA + 0x80);
+		val = ipac_dc_read(cs, ISAC_ISTA) & 0xfe;
 		if (val) {
 			isac_interrupt(cs, val);
 		}
@@ -430,15 +439,15 @@
 		val = 0x01;
 		isac_interrupt(cs, val);
 	}
-	ista  = readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ISTA);
+	ista  = readreg(cs, cs->hw.elsa.isac, IPAC_ISTA);
 	if ((ista & 0x3f) && icnt) {
 		icnt--;
 		goto Start_IPAC;
 	}
 	if (!icnt)
 		printk(KERN_WARNING "ELSA IRQ LOOP\n");
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_MASK, 0xFF);
-	writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_MASK, 0xC0);
+	writereg(cs, cs->hw.elsa.isac, IPAC_MASK, 0xFF);
+	writereg(cs, cs->hw.elsa.isac, IPAC_MASK, 0xC0);
 }
 
 void
@@ -454,17 +463,17 @@
 		byteout(cs->hw.elsa.ctrl, 0);	/* LEDs Out */
 	if (cs->subtyp == ELSA_QS1000PCI) {
 		byteout(cs->hw.elsa.cfg + 0x4c, 0x01);  /* disable IRQ */
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ATX, 0xff);
+		writereg(cs, cs->hw.elsa.isac, IPAC_ATX, 0xff);
 		bytecnt = 2;
 		release_region(cs->hw.elsa.cfg, 0x80);
 	}
 	if (cs->subtyp == ELSA_QS3000PCI) {
 		byteout(cs->hw.elsa.cfg + 0x4c, 0x03); /* disable ELSA PCI IRQ */
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ATX, 0xff);
+		writereg(cs, cs->hw.elsa.isac, IPAC_ATX, 0xff);
 		release_region(cs->hw.elsa.cfg, 0x80);
 	}
  	if (cs->subtyp == ELSA_PCMCIA_IPAC) {
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ATX, 0xff);
+		writereg(cs, cs->hw.elsa.isac, IPAC_ATX, 0xff);
  	}
 	if ((cs->subtyp == ELSA_PCFPRO) ||
 		(cs->subtyp == ELSA_QS3000) ||
@@ -501,22 +510,22 @@
 			byteout(cs->hw.elsa.trig, 0xff);
 	}
 	if ((cs->subtyp == ELSA_QS1000PCI) || (cs->subtyp == ELSA_QS3000PCI) || (cs->subtyp == ELSA_PCMCIA_IPAC)) {
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_POTA2, 0x20);
+		writereg(cs, cs->hw.elsa.isac, IPAC_POTA2, 0x20);
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_POTA2, 0x00);
+		writereg(cs, cs->hw.elsa.isac, IPAC_POTA2, 0x00);
 		set_current_state(TASK_UNINTERRUPTIBLE);
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_MASK, 0xc0);
+		writereg(cs, cs->hw.elsa.isac, IPAC_MASK, 0xc0);
 		schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
 		if (cs->subtyp != ELSA_PCMCIA_IPAC) {
-			writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ACFG, 0x0);
-			writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_AOE, 0x3c);
+			writereg(cs, cs->hw.elsa.isac, IPAC_ACFG, 0x0);
+			writereg(cs, cs->hw.elsa.isac, IPAC_AOE, 0x3c);
 		} else {
-			writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_PCFG, 0x10);
-			writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ACFG, 0x4);
-			writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_AOE, 0xf8);
+			writereg(cs, cs->hw.elsa.isac, IPAC_PCFG, 0x10);
+			writereg(cs, cs->hw.elsa.isac, IPAC_ACFG, 0x4);
+			writereg(cs, cs->hw.elsa.isac, IPAC_AOE, 0xf8);
 		}
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ATX, 0xff);
+		writereg(cs, cs->hw.elsa.isac, IPAC_ATX, 0xff);
 		if (cs->subtyp == ELSA_QS1000PCI)
 			byteout(cs->hw.elsa.cfg + 0x4c, 0x41); /* enable ELSA PCI IRQ */
 		else if (cs->subtyp == ELSA_QS3000PCI)
@@ -539,7 +548,7 @@
 	int arcofi_present = 0;
 	char tmp[40];
 	char *t;
-	u_char *p;
+	u8 *p;
 
 	if (!cs->dc.isac.mon_tx)
 		if (!(cs->dc.isac.mon_tx=kmalloc(MAX_MON_FRAME, GFP_ATOMIC))) {
@@ -649,12 +658,12 @@
 
 	if ((cs->subtyp == ELSA_QS1000PCI) ||
 		(cs->subtyp == ELSA_QS3000PCI)) {
-		u_char led = 0xff;
+		u8 led = 0xff;
 		if (cs->hw.elsa.ctrl_reg & ELSA_LINE_LED)
 			led ^= ELSA_IPAC_LINE_LED;
 		if (cs->hw.elsa.ctrl_reg & ELSA_STAT_LED)
 			led ^= ELSA_IPAC_STAT_LED;
-		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ATX, led);
+		writereg(cs, cs->hw.elsa.isac, IPAC_ATX, led);
 	} else
 		byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg);
 	if (blink) {
@@ -756,7 +765,7 @@
 		case CARD_AUX_IND:
 			if (cs->hw.elsa.MFlag) {
 				int len;
-				u_char *msg;
+				u8 *msg;
 
 				if (!arg)
 					return(0);
@@ -861,7 +870,7 @@
 setup_elsa(struct IsdnCard *card)
 {
 	int bytecnt;
-	u_char val, pci_rev;
+	u8 val, pci_rev;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
 
@@ -895,15 +904,15 @@
 			cs->hw.elsa.timer = cs->hw.elsa.base + ELSA_START_TIMER;
 			val = bytein(cs->hw.elsa.cfg);
 			if (cs->subtyp == ELSA_PC) {
-				const u_char CARD_IrqTab[8] =
+				const u8 CARD_IrqTab[8] =
 				{7, 3, 5, 9, 0, 0, 0, 0};
 				cs->irq = CARD_IrqTab[(val & ELSA_IRQ_IDX_PC) >> 2];
 			} else if (cs->subtyp == ELSA_PCC8) {
-				const u_char CARD_IrqTab[8] =
+				const u8 CARD_IrqTab[8] =
 				{7, 3, 5, 9, 0, 0, 0, 0};
 				cs->irq = CARD_IrqTab[(val & ELSA_IRQ_IDX_PCC8) >> 4];
 			} else {
-				const u_char CARD_IrqTab[8] =
+				const u8 CARD_IrqTab[8] =
 				{15, 10, 15, 3, 11, 5, 11, 9};
 				cs->irq = CARD_IrqTab[(val & ELSA_IRQ_IDX) >> 3];
 			}
@@ -1001,10 +1010,10 @@
 	} else if (cs->typ == ISDN_CTYPE_ELSA_PCMCIA) {
 		cs->hw.elsa.base = card->para[1];
 		cs->irq = card->para[0];
-		val = readreg(cs->hw.elsa.base + 0, cs->hw.elsa.base + 2, IPAC_ID);
+		cs->hw.elsa.ale = cs->hw.elsa.base + 0;
+		val = readreg(cs, cs->hw.elsa.base + 2, IPAC_ID);
 		if ((val == 1) || (val == 2)) { /* IPAC version 1.1/1.2 */
 			cs->subtyp = ELSA_PCMCIA_IPAC;
-			cs->hw.elsa.ale = cs->hw.elsa.base + 0;
 			cs->hw.elsa.isac = cs->hw.elsa.base + 2;
 			cs->hw.elsa.hscx = cs->hw.elsa.base + 2;
 			test_and_set_bit(HW_IPAC, &cs->HW_Flags);
@@ -1159,24 +1168,16 @@
 		}
 		printk(KERN_INFO "Elsa: timer OK; resetting card\n");
 	}
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Elsa_card_msg;
 	reset_elsa(cs);
 	if ((cs->subtyp == ELSA_QS1000PCI) || (cs->subtyp == ELSA_QS3000PCI) || (cs->subtyp == ELSA_PCMCIA_IPAC)) {
-		cs->readisac = &ReadISAC_IPAC;
-		cs->writeisac = &WriteISAC_IPAC;
-		cs->readisacfifo = &ReadISACfifo_IPAC;
-		cs->writeisacfifo = &WriteISACfifo_IPAC;
+		cs->dc_hw_ops = &ipac_dc_ops;
 		cs->irq_func = &elsa_interrupt_ipac;
-		val = readreg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ID);
+		val = readreg(cs, cs->hw.elsa.isac, IPAC_ID);
 		printk(KERN_INFO "Elsa: IPAC version %x\n", val);
 	} else {
-		cs->readisac = &ReadISAC;
-		cs->writeisac = &WriteISAC;
-		cs->readisacfifo = &ReadISACfifo;
-		cs->writeisacfifo = &WriteISACfifo;
+		cs->dc_hw_ops = &isac_ops;
 		cs->irq_func = &elsa_interrupt;
 		ISACVersion(cs, "Elsa:");
 		if (HscxVersion(cs, "Elsa:")) {
diff -Nru a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c
--- a/drivers/isdn/hisax/elsa_ser.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/elsa_ser.c	Wed Jan  8 20:04:43 2003
@@ -26,7 +26,7 @@
 //#define SERIAL_DEBUG_REG 1
 
 #ifdef SERIAL_DEBUG_REG
-static u_char deb[32];
+static u8 deb[32];
 const char *ModemIn[] = {"RBR","IER","IIR","LCR","MCR","LSR","MSR","SCR"};
 const char *ModemOut[] = {"THR","IER","FCR","LCR","MCR","LSR","MSR","SCR"};
 #endif
@@ -375,6 +375,10 @@
 	}
 }
 
+static struct bc_l1_ops modem_l1_ops = {
+	.fill_fifo = modem_fill,
+};
+
 
 static void rs_interrupt_elsa(int irq, struct IsdnCardState *cs)
 {
@@ -436,9 +440,9 @@
 }
 
 void
-modem_write_cmd(struct IsdnCardState *cs, u_char *buf, int len) {
+modem_write_cmd(struct IsdnCardState *cs, u8 *buf, int len) {
 	int count, fp;
-	u_char *msg = buf;
+	u8 *msg = buf;
 	unsigned long flags;
 	
 	if (!len)
@@ -609,7 +613,7 @@
 			bcs->tx_cnt = 0;
 			bcs->cs->hw.elsa.bcs = bcs;
 			st->l1.l2l1 = modem_l2l1;
-			bcs->cs->BC_Send_Data = modem_fill;
+			bcs->cs->bc_l1_ops = &modem_l1_ops;
 			break;
 	}
 	st->l1.bcs = bcs;
diff -Nru a/drivers/isdn/hisax/enternow.h b/drivers/isdn/hisax/enternow.h
--- a/drivers/isdn/hisax/enternow.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/enternow.h	Wed Jan  8 20:04:43 2003
@@ -40,12 +40,3 @@
  * den TigerJet i/o-Raum gemappt
  * -> 0x01 des AMD bei hw.njet.base + 0C4 */
 #define TJ_AMD_PORT						0xC0
-
-
-
-/* ***************************************************************************************** *
- * *************************************** Prototypen ************************************** *
- * ***************************************************************************************** */
-
-BYTE ReadByteAmd7930(struct IsdnCardState *cs, BYTE offset);
-void WriteByteAmd7930(struct IsdnCardState *cs, BYTE offset, BYTE value);
diff -Nru a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c
--- a/drivers/isdn/hisax/enternow_pci.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/enternow_pci.c	Wed Jan  8 20:04:44 2003
@@ -80,7 +80,7 @@
 
 
 /* cs->readisac, macro rByteAMD */
-BYTE
+static BYTE
 ReadByteAmd7930(struct IsdnCardState *cs, BYTE offset)
 {
 	/* direktes Register */
@@ -95,7 +95,7 @@
 }
 
 /* cs->writeisac, macro wByteAMD */
-void
+static void
 WriteByteAmd7930(struct IsdnCardState *cs, BYTE offset, BYTE value)
 {
 	/* direktes Register */
@@ -110,6 +110,11 @@
 }
 
 
+static struct dc_hw_ops enternow_ops = {
+	.read_reg   = ReadByteAmd7930,
+	.write_reg  = WriteByteAmd7930,
+};
+
 void
 enpci_setIrqMask(struct IsdnCardState *cs, BYTE val) {
         if (!val)
@@ -119,17 +124,6 @@
 }
 
 
-static BYTE dummyrr(struct IsdnCardState *cs, int chan, BYTE off)
-{
-        return(5);
-}
-
-static void dummywr(struct IsdnCardState *cs, int chan, BYTE off, BYTE value)
-{
-
-}
-
-
 /* ******************************************************************************** */
 
 
@@ -363,27 +357,19 @@
 	printk(KERN_INFO
 		"enter:now PCI: PCI card configured at 0x%lx IRQ %d\n",
 		cs->hw.njet.base, cs->irq);
-	if (check_region(cs->hw.njet.base, bytecnt)) {
+	if (!request_region(cs->hw.njet.base, bytecnt, "Fn_ISDN")) {
 		printk(KERN_WARNING
 			   "HiSax: %s config port %lx-%lx already in use\n",
 			   CardType[card->typ],
 			   cs->hw.njet.base,
 			   cs->hw.njet.base + bytecnt);
 		return (0);
-	} else {
-		request_region(cs->hw.njet.base, bytecnt, "Fn_ISDN");
 	}
 	reset_enpci(cs);
 	cs->hw.njet.last_is0 = 0;
-        /* macro rByteAMD */
-        cs->readisac = &ReadByteAmd7930;
-        /* macro wByteAMD */
-        cs->writeisac = &WriteByteAmd7930;
+	cs->dc_hw_ops = &enternow_ops;
         cs->dc.amd7930.setIrqMask = &enpci_setIrqMask;
 
-        cs->BC_Read_Reg  = &dummyrr;
-	cs->BC_Write_Reg = &dummywr;
-	cs->BC_Send_Data = &netjet_fill_dma;
 	cs->cardmsg = &enpci_card_msg;
 	cs->irq_func = &enpci_interrupt;
 	cs->irq_flags |= SA_SHIRQ;
diff -Nru a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c
--- a/drivers/isdn/hisax/gazel.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/gazel.c	Wed Jan  8 20:04:44 2003
@@ -44,74 +44,72 @@
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
-static inline u_char
+static inline u8
 readreg(unsigned int adr, u_short off)
 {
 	return bytein(adr + off);
 }
 
 static inline void
-writereg(unsigned int adr, u_short off, u_char data)
+writereg(unsigned int adr, u_short off, u8 data)
 {
 	byteout(adr + off, data);
 }
 
 
 static inline void
-read_fifo(unsigned int adr, u_char * data, int size)
+read_fifo(unsigned int adr, u8 * data, int size)
 {
 	insb(adr, data, size);
 }
 
 static void
-write_fifo(unsigned int adr, u_char * data, int size)
+write_fifo(unsigned int adr, u8 * data, int size)
 {
 	outsb(adr, data, size);
 }
 
-static inline u_char
-readreg_ipac(unsigned int adr, u_short off)
+static inline u8
+readreg_ipac(struct IsdnCardState *cs, u_short off)
 {
-	register u_char ret;
+	register u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&gazel_lock, flags);
-	byteout(adr, off);
-	ret = bytein(adr + 4);
+	byteout(cs->hw.gazel.ipac, off);
+	ret = bytein(cs->hw.gazel.ipac + 4);
 	spin_unlock_irqrestore(&gazel_lock, flags);
 	return ret;
 }
 
 static inline void
-writereg_ipac(unsigned int adr, u_short off, u_char data)
+writereg_ipac(struct IsdnCardState *cs, u_short off, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&gazel_lock, flags);
-	byteout(adr, off);
-	byteout(adr + 4, data);
+	byteout(cs->hw.gazel.ipac, off);
+	byteout(cs->hw.gazel.ipac + 4, data);
 	spin_unlock_irqrestore(&gazel_lock, flags);
 }
 
 
 static inline void
-read_fifo_ipac(unsigned int adr, u_short off, u_char * data, int size)
+read_fifo_ipac(struct IsdnCardState *cs, u_short off, u8 * data, int size)
 {
-	byteout(adr, off);
-	insb(adr + 4, data, size);
+	byteout(cs->hw.gazel.ipac, off);
+	insb(cs->hw.gazel.ipac + 4, data, size);
 }
 
 static void
-write_fifo_ipac(unsigned int adr, u_short off, u_char * data, int size)
+write_fifo_ipac(struct IsdnCardState *cs, u_short off, u8 * data, int size)
 {
-	byteout(adr, off);
-	outsb(adr + 4, data, size);
+	byteout(cs->hw.gazel.ipac, off);
+	outsb(cs->hw.gazel.ipac + 4, data, size);
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
 	u_short off2 = offset;
 
@@ -122,13 +120,13 @@
 			return (readreg(cs->hw.gazel.isac, off2));
 		case R753:
 		case R742:
-			return (readreg_ipac(cs->hw.gazel.ipac, 0x80 + off2));
+			return (readreg_ipac(cs, 0x80 + off2));
 	}
 	return 0;
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	u_short off2 = offset;
 
@@ -140,13 +138,13 @@
 			break;
 		case R753:
 		case R742:
-			writereg_ipac(cs->hw.gazel.ipac, 0x80 + off2, value);
+			writereg_ipac(cs, 0x80 + off2, value);
 			break;
 	}
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	switch (cs->subtyp) {
 		case R647:
@@ -155,13 +153,13 @@
 			break;
 		case R753:
 		case R742:
-			read_fifo_ipac(cs->hw.gazel.ipac, 0x80, data, size);
+			read_fifo_ipac(cs, 0x80, data, size);
 			break;
 	}
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	switch (cs->subtyp) {
 		case R647:
@@ -170,112 +168,115 @@
 			break;
 		case R753:
 		case R742:
-			write_fifo_ipac(cs->hw.gazel.ipac, 0x80, data, size);
+			write_fifo_ipac(cs, 0x80, data, size);
 			break;
 	}
 }
 
-static void
-ReadHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
+	u_short off2 = offset;
+
 	switch (cs->subtyp) {
 		case R647:
+			off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
 		case R685:
-			read_fifo(cs->hw.gazel.hscxfifo[hscx], data, size);
-			break;
+			return readreg(cs->hw.gazel.hscx[hscx], off2);
 		case R753:
 		case R742:
-			read_fifo_ipac(cs->hw.gazel.ipac, hscx * 0x40, data, size);
-			break;
+			return readreg_ipac(cs, hscx * 0x40 + off2);
 	}
+	return 0;
 }
 
 static void
-WriteHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
+	u_short off2 = offset;
+
 	switch (cs->subtyp) {
 		case R647:
+			off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
 		case R685:
-			write_fifo(cs->hw.gazel.hscxfifo[hscx], data, size);
+			writereg(cs->hw.gazel.hscx[hscx], off2, value);
 			break;
 		case R753:
 		case R742:
-			write_fifo_ipac(cs->hw.gazel.ipac, hscx * 0x40, data, size);
+			writereg_ipac(cs, hscx * 0x40 + off2, value);
 			break;
 	}
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 * data, int size)
 {
-	u_short off2 = offset;
-
 	switch (cs->subtyp) {
 		case R647:
-			off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
 		case R685:
-			return (readreg(cs->hw.gazel.hscx[hscx], off2));
+			read_fifo(cs->hw.gazel.hscxfifo[hscx], data, size);
+			break;
 		case R753:
 		case R742:
-			return (readreg_ipac(cs->hw.gazel.ipac, hscx * 0x40 + off2));
+			read_fifo_ipac(cs, hscx * 0x40, data, size);
+			break;
 	}
-	return 0;
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 * data, int size)
 {
-	u_short off2 = offset;
-
 	switch (cs->subtyp) {
 		case R647:
-			off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
 		case R685:
-			writereg(cs->hw.gazel.hscx[hscx], off2, value);
+			write_fifo(cs->hw.gazel.hscxfifo[hscx], data, size);
 			break;
 		case R753:
 		case R742:
-			writereg_ipac(cs->hw.gazel.ipac, hscx * 0x40 + off2, value);
+			write_fifo_ipac(cs, hscx * 0x40, data, size);
 			break;
 	}
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) ReadHSCX(cs, nr, reg)
-#define WRITEHSCX(cs, nr, reg, data) WriteHSCX(cs, nr, reg, data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) ReadHSCXfifo(cs, nr, ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) WriteHSCXfifo(cs, nr, ptr, cnt)
-
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 gazel_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 #define MAXCOUNT 5
 	struct IsdnCardState *cs = dev_id;
-	u_char valisac, valhscx;
+	u8 valisac, valhscx;
 	int count = 0;
 
 	spin_lock(&cs->lock);
 	do {
-		valhscx = ReadHSCX(cs, 1, HSCX_ISTA);
+		valhscx = hscx_read(cs, 1, HSCX_ISTA);
 		if (valhscx)
 			hscx_int_main(cs, valhscx);
-		valisac = ReadISAC(cs, ISAC_ISTA);
+		valisac = isac_read(cs, ISAC_ISTA);
 		if (valisac)
 			isac_interrupt(cs, valisac);
 		count++;
 	} while ((valhscx || valisac) && (count < MAXCOUNT));
 
-	WriteHSCX(cs, 0, HSCX_MASK, 0xFF);
-	WriteHSCX(cs, 1, HSCX_MASK, 0xFF);
-	WriteISAC(cs, ISAC_MASK, 0xFF);
-	WriteISAC(cs, ISAC_MASK, 0x0);
-	WriteHSCX(cs, 0, HSCX_MASK, 0x0);
-	WriteHSCX(cs, 1, HSCX_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -284,17 +285,17 @@
 gazel_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char ista, val;
+	u8 ista, val;
 	int count = 0;
 
 	if (!cs) {
 		printk(KERN_WARNING "Gazel: Spurious interrupt!\n");
 		return;
 	}
-	ista = ReadISAC(cs, IPAC_ISTA - 0x80);
+	ista = readreg_ipac(cs, IPAC_ISTA);
 	do {
 		if (ista & 0x0f) {
-			val = ReadHSCX(cs, 1, HSCX_ISTA);
+			val = hscx_read(cs, 1, HSCX_ISTA);
 			if (ista & 0x01)
 				val |= 0x01;
 			if (ista & 0x04)
@@ -306,7 +307,7 @@
 			}
 		}
 		if (ista & 0x20) {
-			val = 0xfe & ReadISAC(cs, ISAC_ISTA);
+			val = isac_read(cs, ISAC_ISTA) & 0xfe;
 			if (val) {
 				isac_interrupt(cs, val);
 			}
@@ -315,13 +316,13 @@
 			val = 0x01;
 			isac_interrupt(cs, val);
 		}
-		ista = ReadISAC(cs, IPAC_ISTA - 0x80);
+		ista = readreg_ipac(cs, IPAC_ISTA);
 		count++;
 	}
 	while ((ista & 0x3f) && (count < MAXCOUNT));
 
-	WriteISAC(cs, IPAC_MASK - 0x80, 0xFF);
-	WriteISAC(cs, IPAC_MASK - 0x80, 0xC0);
+	writereg_ipac(cs, IPAC_MASK, 0xFF);
+	writereg_ipac(cs, IPAC_MASK, 0xC0);
 }
 void
 release_io_gazel(struct IsdnCardState *cs)
@@ -381,28 +382,28 @@
 				plxcntrl = inl(addr + PLX_CNTRL);
 			plxcntrl |= (RESET_9050 + RESET_GAZEL);
 			outl(plxcntrl, addr + PLX_CNTRL);
-			WriteISAC(cs, IPAC_POTA2 - 0x80, 0x20);
+			writereg_ipac(cs, IPAC_POTA2, 0x20);
 			HZDELAY(4);
 			plxcntrl &= ~(RESET_9050 + RESET_GAZEL);
 			outl(plxcntrl, addr + PLX_CNTRL);
 			HZDELAY(10);
-			WriteISAC(cs, IPAC_POTA2 - 0x80, 0x00);
-			WriteISAC(cs, IPAC_ACFG - 0x80, 0xff);
-			WriteISAC(cs, IPAC_AOE - 0x80, 0x0);
-			WriteISAC(cs, IPAC_MASK - 0x80, 0xff);
-			WriteISAC(cs, IPAC_CONF - 0x80, 0x1);
+			writereg_ipac(cs, IPAC_POTA2, 0x00);
+			writereg_ipac(cs, IPAC_ACFG, 0xff);
+			writereg_ipac(cs, IPAC_AOE, 0x0);
+			writereg_ipac(cs, IPAC_MASK, 0xff);
+			writereg_ipac(cs, IPAC_CONF, 0x1);
 			outb(INT_IPAC_EN + INT_PCI_EN, addr + PLX_INCSR);
-			WriteISAC(cs, IPAC_MASK - 0x80, 0xc0);
+			writereg_ipac(cs, IPAC_MASK, 0xc0);
 			break;
 		case R742:
-			WriteISAC(cs, IPAC_POTA2 - 0x80, 0x20);
+			writereg_ipac(cs, IPAC_POTA2, 0x20);
 			HZDELAY(4);
-			WriteISAC(cs, IPAC_POTA2 - 0x80, 0x00);
-			WriteISAC(cs, IPAC_ACFG - 0x80, 0xff);
-			WriteISAC(cs, IPAC_AOE - 0x80, 0x0);
-			WriteISAC(cs, IPAC_MASK - 0x80, 0xff);
-			WriteISAC(cs, IPAC_CONF - 0x80, 0x1);
-			WriteISAC(cs, IPAC_MASK - 0x80, 0xc0);
+			writereg_ipac(cs, IPAC_POTA2, 0x00);
+			writereg_ipac(cs, IPAC_ACFG, 0xff);
+			writereg_ipac(cs, IPAC_AOE, 0x0);
+			writereg_ipac(cs, IPAC_MASK, 0xff);
+			writereg_ipac(cs, IPAC_CONF, 0x1);
+			writereg_ipac(cs, IPAC_MASK, 0xc0);
 			break;
 	}
 	return (0);
@@ -501,13 +502,13 @@
 	// R742 decodes address even in not started...
 	// R647 returns FF if not present or not started
 	// eventually needs improvment
-	if (readreg_ipac(card->para[1], IPAC_ID) == 1)
+	cs->hw.gazel.ipac = card->para[1];
+	if (readreg_ipac(cs, IPAC_ID) == 1)
 		cs->subtyp = R742;
 	else
 		cs->subtyp = R647;
 
 	cs->hw.gazel.cfg_reg = card->para[1] + 0xC000;
-	cs->hw.gazel.ipac = card->para[1];
 	cs->hw.gazel.isac = card->para[1] + 0x8000;
 	cs->hw.gazel.hscx[0] = card->para[1];
 	cs->hw.gazel.hscx[1] = card->para[1] + 0x4000;
@@ -546,9 +547,9 @@
 setup_gazelpci(struct IsdnCardState *cs)
 {
 	u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0;
-	u_char pci_irq = 0, found;
+	u8 pci_irq = 0, found;
 	u_int nbseek, seekcard;
-	u_char pci_rev;
+	u8 pci_rev;
 
 	printk(KERN_WARNING "Gazel: PCI card automatic recognition\n");
 
@@ -646,7 +647,7 @@
 {
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
-	u_char val;
+	u8 val;
 
 	strcpy(tmp, gazel_revision);
 	printk(KERN_INFO "Gazel: Driver Revision %s\n", HiSax_getrev(tmp));
@@ -676,13 +677,8 @@
 		release_io_gazel(cs);
 		return (0);
 	}
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Gazel_card_msg;
 
 	switch (cs->subtyp) {
@@ -700,10 +696,10 @@
 		case R742:
 		case R753:
 			cs->irq_func = &gazel_interrupt_ipac;
-			val = ReadISAC(cs, IPAC_ID - 0x80);
+			val = readreg_ipac(cs, IPAC_ID);
 			printk(KERN_INFO "Gazel: IPAC version %x\n", val);
 			break;
 	}
 
-	return (1);
+	return 1;
 }
diff -Nru a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c
--- a/drivers/isdn/hisax/hfc_2bds0.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/isdn/hisax/hfc_2bds0.c	Wed Jan  8 20:04:32 2003
@@ -23,16 +23,10 @@
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
-static void
-dummyf(struct IsdnCardState *cs, u_char * data, int size)
-{
-	printk(KERN_WARNING "HiSax: hfcd dummy fifo called\n");
-}
-
-static inline u_char
-ReadReg(struct IsdnCardState *cs, int data, u_char reg)
+static inline u8
+ReadReg(struct IsdnCardState *cs, int data, u8 reg)
 {
-	register u_char ret;
+	register u8 ret;
 
 	if (data) {
 		if (cs->hw.hfcD.cip != reg) { 
@@ -50,7 +44,7 @@
 }
 
 static inline void
-WriteReg(struct IsdnCardState *cs, int data, u_char reg, u_char value)
+WriteReg(struct IsdnCardState *cs, int data, u8 reg, u8 value)
 {
 	if (cs->hw.hfcD.cip != reg) { 
 		cs->hw.hfcD.cip = reg;
@@ -64,16 +58,21 @@
 #endif
 }
 
+static struct bc_hw_ops hfcs_bc_ops = {
+	.read_reg  = ReadReg,
+	.write_reg = WriteReg,
+};
+
 /* Interface functions */
 
-static u_char
-readreghfcd(struct IsdnCardState *cs, u_char offset)
+static inline u8
+hfcs_read_reg(struct IsdnCardState *cs, u8 offset)
 {
-	return(ReadReg(cs, HFCD_DATA, offset));
+	return ReadReg(cs, HFCD_DATA, offset);
 }
 
-static void
-writereghfcd(struct IsdnCardState *cs, u_char offset, u_char value)
+static inline void
+hfcs_write_reg(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	WriteReg(cs, HFCD_DATA, offset, value);
 }
@@ -81,12 +80,7 @@
 void
 set_cs_func(struct IsdnCardState *cs)
 {
-	cs->readisac = &readreghfcd;
-	cs->writeisac = &writereghfcd;
-	cs->readisacfifo = &dummyf;
-	cs->writeisacfifo = &dummyf;
-	cs->BC_Read_Reg = &ReadReg;
-	cs->BC_Write_Reg = &WriteReg;
+	cs->bc_hw_ops = &hfcs_bc_ops;
 }
 
 static inline int
@@ -118,9 +112,9 @@
 }
 
 static int
-SelFiFo(struct IsdnCardState *cs, u_char FiFo)
+SelFiFo(struct IsdnCardState *cs, u8 FiFo)
 {
-	u_char cip;
+	u8 cip;
 
 	if (cs->hw.hfcD.fifo == FiFo)
 		return(1);
@@ -144,7 +138,7 @@
 	}
 	cs->hw.hfcD.fifo = FiFo;
 	WaitNoBusy(cs);
-	cs->BC_Write_Reg(cs, HFCD_DATA, cip, 0);
+	WriteReg(cs, HFCD_DATA, cip, 0);
 	WaitForBusy(cs);
 	return(2);
 }
@@ -177,7 +171,7 @@
 }
 
 static int
-ReadZReg(struct IsdnCardState *cs, u_char reg)
+ReadZReg(struct IsdnCardState *cs, u8 reg)
 {
 	int val;
 
@@ -191,12 +185,12 @@
 static struct sk_buff
 *hfc_empty_fifo(struct BCState *bcs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 	struct sk_buff *skb;
 	struct IsdnCardState *cs = bcs->cs;
 	int idx;
 	int chksum;
-	u_char stat, cip;
+	u8 stat, cip;
 	
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "hfc_empty_fifo");
@@ -272,7 +266,7 @@
 	struct IsdnCardState *cs = bcs->cs;
 	int idx, fcnt;
 	int count;
-	u_char cip;
+	u8 cip;
 
 	if (!bcs->tx_skb)
 		return;
@@ -340,7 +334,7 @@
 {
 	struct IsdnCardState *cs = bcs->cs;
 	int z1, z2, rcnt;
-	u_char f1, f2, cip;
+	u8 f1, f2, cip;
 	int receive, count = 5;
 	struct sk_buff *skb;
 
@@ -548,18 +542,18 @@
 	struct sk_buff *skb;
 	int idx;
 	int rcnt, z1, z2;
-	u_char stat, cip, f1, f2;
+	u8 stat, cip, f1, f2;
 	int chksum;
 	int count=5;
-	u_char *ptr;
+	u8 *ptr;
 
 	SelFiFo(cs, 4 | HFCD_REC);
 	cip = HFCD_FIFO | HFCD_F1 | HFCD_REC;
 	WaitNoBusy(cs);
-	f1 = cs->readisac(cs, cip) & 0xf;
+	f1 = hfcs_read_reg(cs, cip) & 0xf;
 	cip = HFCD_FIFO | HFCD_F2 | HFCD_REC;
 	WaitNoBusy(cs);
-	f2 = cs->readisac(cs, cip) & 0xf;
+	f2 = hfcs_read_reg(cs, cip) & 0xf;
 	while ((f1 != f2) && count--) {
 		z1 = ReadZReg(cs, HFCD_FIFO | HFCD_Z1 | HFCD_REC);
 		z2 = ReadZReg(cs, HFCD_FIFO | HFCD_Z2 | HFCD_REC);
@@ -634,7 +628,7 @@
 		WaitForBusy(cs);
 		cip = HFCD_FIFO | HFCD_F2 | HFCD_REC;
 		WaitNoBusy(cs);
-		f2 = cs->readisac(cs, cip) & 0xf;
+		f2 = hfcs_read_reg(cs, cip) & 0xf;
 	}
 	return(1);
 } 
@@ -644,7 +638,7 @@
 {
 	int idx, fcnt;
 	int count;
-	u_char cip;
+	u8 cip;
 
 	if (!cs->tx_skb)
 		return;
@@ -716,9 +710,9 @@
 }
 
 void
-hfc2bds0_interrupt(struct IsdnCardState *cs, u_char val)
+hfc2bds0_interrupt(struct IsdnCardState *cs, u8 val)
 {
-       	u_char exval;
+       	u8 exval;
        	struct BCState *bcs;
 	int count=15;
 
@@ -727,7 +721,7 @@
 
 	val &= cs->hw.hfcD.int_m1;
 	if (val & 0x40) { /* TE state machine irq */
-		exval = cs->readisac(cs, HFCD_STATES) & 0xf;
+		exval = hfcs_read_reg(cs, HFCD_STATES) & 0xf;
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ph_state chg %d->%d", cs->dc.hfcd.ph_state,
 				exval);
@@ -804,24 +798,24 @@
 			xmit_pull_req_d(st);
 			break;
 		case (HW_RESET | REQUEST):
-			cs->writeisac(cs, HFCD_STATES, HFCD_LOAD_STATE | 3); /* HFC ST 3 */
+			hfcs_write_reg(cs, HFCD_STATES, HFCD_LOAD_STATE | 3); /* HFC ST 3 */
 			udelay(6);
-			cs->writeisac(cs, HFCD_STATES, 3); /* HFC ST 2 */
+			hfcs_write_reg(cs, HFCD_STATES, 3); /* HFC ST 2 */
 			cs->hw.hfcD.mst_m |= HFCD_MASTER;
-			cs->writeisac(cs, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
-			cs->writeisac(cs, HFCD_STATES, HFCD_ACTIVATE | HFCD_DO_ACTION);
+			hfcs_write_reg(cs, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
+			hfcs_write_reg(cs, HFCD_STATES, HFCD_ACTIVATE | HFCD_DO_ACTION);
 			l1_msg(cs, HW_POWERUP | CONFIRM, NULL);
 			break;
 		case (HW_ENABLE | REQUEST):
-			cs->writeisac(cs, HFCD_STATES, HFCD_ACTIVATE | HFCD_DO_ACTION);
+			hfcs_write_reg(cs, HFCD_STATES, HFCD_ACTIVATE | HFCD_DO_ACTION);
 			break;
 		case (HW_DEACTIVATE | REQUEST):
 			cs->hw.hfcD.mst_m &= ~HFCD_MASTER;
-			cs->writeisac(cs, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
+			hfcs_write_reg(cs, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
 			break;
 		case (HW_INFO3 | REQUEST):
 			cs->hw.hfcD.mst_m |= HFCD_MASTER;
-			cs->writeisac(cs, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
+			hfcs_write_reg(cs, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
 			break;
 		default:
 			if (cs->debug & L1_DEB_WARN)
@@ -870,7 +864,6 @@
 		cs->bcs[0].hw.hfc.send = init_send_hfcd(32);
 	if (!cs->bcs[1].hw.hfc.send)
 		cs->bcs[1].hw.hfc.send = init_send_hfcd(32);
-	cs->BC_Send_Data = hfc_fill_fifo;
 	cs->DC_Send_Data = hfc_fill_dfifo;
 	cs->bcs[0].BC_SetStack = setstack_2b;
 	cs->bcs[1].BC_SetStack = setstack_2b;
diff -Nru a/drivers/isdn/hisax/hfc_2bds0.h b/drivers/isdn/hisax/hfc_2bds0.h
--- a/drivers/isdn/hisax/hfc_2bds0.h	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/hfc_2bds0.h	Wed Jan  8 20:04:45 2003
@@ -124,5 +124,5 @@
 extern void main_irq_2bds0(struct BCState *bcs);
 extern void init2bds0(struct IsdnCardState *cs);
 extern void release2bds0(struct IsdnCardState *cs);
-extern void hfc2bds0_interrupt(struct IsdnCardState *cs, u_char val);
+extern void hfc2bds0_interrupt(struct IsdnCardState *cs, u8 val);
 extern void set_cs_func(struct IsdnCardState *cs);
diff -Nru a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c
--- a/drivers/isdn/hisax/hfc_2bs0.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/hfc_2bs0.c	Wed Jan  8 20:04:43 2003
@@ -17,14 +17,26 @@
 #include "isdnl1.h"
 #include <linux/interrupt.h>
 
+static inline u8
+hfc_read_reg(struct IsdnCardState *cs, int data, u8 reg)
+{
+	return cs->bc_hw_ops->read_reg(cs, data, reg);
+}
+
+static inline void
+hfc_write_reg(struct IsdnCardState *cs, int data, u8 reg, u8 val)
+{
+	cs->bc_hw_ops->write_reg(cs, data, reg, val);
+}
+
 static inline int
 WaitForBusy(struct IsdnCardState *cs)
 {
 	int to = 130;
-	u_char val;
+	u8 val;
 
-	while (!(cs->BC_Read_Reg(cs, HFC_STATUS, 0) & HFC_BUSY) && to) {
-		val = cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F2 |
+	while (!(hfc_read_reg(cs, HFC_STATUS, 0) & HFC_BUSY) && to) {
+		val = hfc_read_reg(cs, HFC_DATA, HFC_CIP | HFC_F2 |
 				      (cs->hw.hfc.cip & 3));
 		udelay(1);
 		to--;
@@ -41,7 +53,7 @@
 {
 	int to = 125;
 
-	while ((cs->BC_Read_Reg(cs, HFC_STATUS, 0) & HFC_BUSY) && to) {
+	while ((hfc_read_reg(cs, HFC_STATUS, 0) & HFC_BUSY) && to) {
 		udelay(1);
 		to--;
 	}
@@ -67,14 +79,14 @@
 }
 
 int
-ReadZReg(struct BCState *bcs, u_char reg)
+ReadZReg(struct BCState *bcs, u8 reg)
 {
 	int val;
 
 	WaitNoBusy(bcs->cs);
-	val = 256 * bcs->cs->BC_Read_Reg(bcs->cs, HFC_DATA, reg | HFC_CIP | HFC_Z_HIGH);
+	val = 256 * hfc_read_reg(bcs->cs, HFC_DATA, reg | HFC_CIP | HFC_Z_HIGH);
 	WaitNoBusy(bcs->cs);
-	val += bcs->cs->BC_Read_Reg(bcs->cs, HFC_DATA, reg | HFC_CIP | HFC_Z_LOW);
+	val += hfc_read_reg(bcs->cs, HFC_DATA, reg | HFC_CIP | HFC_Z_LOW);
 	return (val);
 }
 
@@ -84,21 +96,21 @@
 	struct IsdnCardState *cs = bcs->cs;
 	int idx, cnt;
 	int rcnt, z1, z2;
-	u_char cip, f1, f2;
+	u8 cip, f1, f2;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "hfc_clear_fifo");
 
 	cip = HFC_CIP | HFC_F1 | HFC_REC | HFC_CHANNEL(bcs->channel);
 	if ((cip & 0xc3) != (cs->hw.hfc.cip & 0xc3)) {
-		cs->BC_Write_Reg(cs, HFC_STATUS, cip, cip);
+		hfc_write_reg(cs, HFC_STATUS, cip, cip);
 		WaitForBusy(cs);
 	}
 	WaitNoBusy(cs);
-	f1 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+	f1 = hfc_read_reg(cs, HFC_DATA, cip);
 	cip = HFC_CIP | HFC_F2 | HFC_REC | HFC_CHANNEL(bcs->channel);
 	WaitNoBusy(cs);
-	f2 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+	f2 = hfc_read_reg(cs, HFC_DATA, cip);
 	z1 = ReadZReg(bcs, HFC_Z1 | HFC_REC | HFC_CHANNEL(bcs->channel));
 	z2 = ReadZReg(bcs, HFC_Z2 | HFC_REC | HFC_CHANNEL(bcs->channel));
 	cnt = 32;
@@ -117,21 +129,21 @@
 		cip = HFC_CIP | HFC_FIFO_OUT | HFC_REC | HFC_CHANNEL(bcs->channel);
 		idx = 0;
 		while ((idx < rcnt) && WaitNoBusy(cs)) {
-			cs->BC_Read_Reg(cs, HFC_DATA_NODEB, cip);
+			hfc_read_reg(cs, HFC_DATA_NODEB, cip);
 			idx++;
 		}
 		if (f1 != f2) {
 			WaitNoBusy(cs);
-			cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
+			hfc_read_reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
 					HFC_CHANNEL(bcs->channel));
 			WaitForBusy(cs);
 		}
 		cip = HFC_CIP | HFC_F1 | HFC_REC | HFC_CHANNEL(bcs->channel);
 		WaitNoBusy(cs);
-		f1 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+		f1 = hfc_read_reg(cs, HFC_DATA, cip);
 		cip = HFC_CIP | HFC_F2 | HFC_REC | HFC_CHANNEL(bcs->channel);
 		WaitNoBusy(cs);
-		f2 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+		f2 = hfc_read_reg(cs, HFC_DATA, cip);
 		z1 = ReadZReg(bcs, HFC_Z1 | HFC_REC | HFC_CHANNEL(bcs->channel));
 		z2 = ReadZReg(bcs, HFC_Z2 | HFC_REC | HFC_CHANNEL(bcs->channel));
 	}
@@ -143,12 +155,12 @@
 *
 hfc_empty_fifo(struct BCState *bcs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 	struct sk_buff *skb;
 	struct IsdnCardState *cs = bcs->cs;
 	int idx;
 	int chksum;
-	u_char stat, cip;
+	u8 stat, cip;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "hfc_empty_fifo");
@@ -158,9 +170,9 @@
 			debugl1(cs, "hfc_empty_fifo: incoming packet too large");
 		cip = HFC_CIP | HFC_FIFO_OUT | HFC_REC | HFC_CHANNEL(bcs->channel);
 		while ((idx++ < count) && WaitNoBusy(cs))
-			cs->BC_Read_Reg(cs, HFC_DATA_NODEB, cip);
+			hfc_read_reg(cs, HFC_DATA_NODEB, cip);
 		WaitNoBusy(cs);
-		stat = cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
+		stat = hfc_read_reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
 				       HFC_CHANNEL(bcs->channel));
 		WaitForBusy(cs);
 		return (NULL);
@@ -170,9 +182,9 @@
 			debugl1(cs, "hfc_empty_fifo: incoming packet too small");
 		cip = HFC_CIP | HFC_FIFO_OUT | HFC_REC | HFC_CHANNEL(bcs->channel);
 		while ((idx++ < count) && WaitNoBusy(cs))
-			cs->BC_Read_Reg(cs, HFC_DATA_NODEB, cip);
+			hfc_read_reg(cs, HFC_DATA_NODEB, cip);
 		WaitNoBusy(cs);
-		stat = cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
+		stat = hfc_read_reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
 				       HFC_CHANNEL(bcs->channel));
 		WaitForBusy(cs);
 #ifdef ERROR_STATISTIC
@@ -191,7 +203,7 @@
 		idx = 0;
 		cip = HFC_CIP | HFC_FIFO_OUT | HFC_REC | HFC_CHANNEL(bcs->channel);
 		while ((idx < count) && WaitNoBusy(cs)) {
-			*ptr++ = cs->BC_Read_Reg(cs, HFC_DATA_NODEB, cip);
+			*ptr++ = hfc_read_reg(cs, HFC_DATA_NODEB, cip);
 			idx++;
 		}
 		if (idx != count) {
@@ -200,7 +212,7 @@
 			dev_kfree_skb_any(skb);
 			if (bcs->mode != L1_MODE_TRANS) {
 			  WaitNoBusy(cs);
-			  stat = cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
+			  stat = hfc_read_reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
 						 HFC_CHANNEL(bcs->channel));
 			  WaitForBusy(cs);
 			}
@@ -208,11 +220,11 @@
 		}
 		if (bcs->mode != L1_MODE_TRANS) {
 		  WaitNoBusy(cs);
-		  chksum = (cs->BC_Read_Reg(cs, HFC_DATA, cip) << 8);
+		  chksum = (hfc_read_reg(cs, HFC_DATA, cip) << 8);
 		  WaitNoBusy(cs);
-		  chksum += cs->BC_Read_Reg(cs, HFC_DATA, cip);
+		  chksum += hfc_read_reg(cs, HFC_DATA, cip);
 		  WaitNoBusy(cs);
-		  stat = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+		  stat = hfc_read_reg(cs, HFC_DATA, cip);
 		  if (cs->debug & L1_DEB_HSCX)
 		    debugl1(cs, "hfc_empty_fifo %d chksum %x stat %x",
 			    bcs->channel, chksum, stat);
@@ -225,7 +237,7 @@
 #endif
 		  }
 		  WaitNoBusy(cs);
-		  stat = cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
+		  stat = hfc_read_reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
 					 HFC_CHANNEL(bcs->channel));
 		  WaitForBusy(cs);
 		}
@@ -240,7 +252,7 @@
 	int idx, fcnt;
 	int count;
 	int z1, z2;
-	u_char cip;
+	u8 cip;
 
 	if (!bcs->tx_skb)
 		return;
@@ -249,15 +261,15 @@
 
 	cip = HFC_CIP | HFC_F1 | HFC_SEND | HFC_CHANNEL(bcs->channel);
 	if ((cip & 0xc3) != (cs->hw.hfc.cip & 0xc3)) {
-	  cs->BC_Write_Reg(cs, HFC_STATUS, cip, cip);
+	  hfc_write_reg(cs, HFC_STATUS, cip, cip);
 	  WaitForBusy(cs);
 	}
 	WaitNoBusy(cs);
 	if (bcs->mode != L1_MODE_TRANS) {
-	  bcs->hw.hfc.f1 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+	  bcs->hw.hfc.f1 = hfc_read_reg(cs, HFC_DATA, cip);
 	  cip = HFC_CIP | HFC_F2 | HFC_SEND | HFC_CHANNEL(bcs->channel);
 	  WaitNoBusy(cs);
-	  bcs->hw.hfc.f2 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+	  bcs->hw.hfc.f2 = hfc_read_reg(cs, HFC_DATA, cip);
 	  bcs->hw.hfc.send[bcs->hw.hfc.f1] = ReadZReg(bcs, HFC_Z1 | HFC_SEND | HFC_CHANNEL(bcs->channel));
 	  if (cs->debug & L1_DEB_HSCX)
 	    debugl1(cs, "hfc_fill_fifo %d f1(%d) f2(%d) z1(%x)",
@@ -293,7 +305,7 @@
 	cip = HFC_CIP | HFC_FIFO_IN | HFC_SEND | HFC_CHANNEL(bcs->channel);
 	idx = 0;
 	while ((idx < bcs->tx_skb->len) && WaitNoBusy(cs))
-		cs->BC_Write_Reg(cs, HFC_DATA_NODEB, cip, bcs->tx_skb->data[idx++]);
+		hfc_write_reg(cs, HFC_DATA_NODEB, cip, bcs->tx_skb->data[idx++]);
 	if (idx != bcs->tx_skb->len) {
 		debugl1(cs, "FIFO Send BUSY error");
 		printk(KERN_WARNING "HFC S FIFO channel %d BUSY Error\n", bcs->channel);
@@ -307,7 +319,7 @@
 		if (bcs->mode != L1_MODE_TRANS) {
 		  WaitForBusy(cs);
 		  WaitNoBusy(cs);
-		  cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F1_INC | HFC_SEND | HFC_CHANNEL(bcs->channel));
+		  hfc_read_reg(cs, HFC_DATA, HFC_CIP | HFC_F1_INC | HFC_SEND | HFC_CHANNEL(bcs->channel));
 		}
 		test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
 	}
@@ -319,7 +331,7 @@
 {
 	struct IsdnCardState *cs = bcs->cs;
 	int z1, z2, rcnt;
-	u_char f1, f2, cip;
+	u8 f1, f2, cip;
 	int receive, transmit, count = 5;
 	struct sk_buff *skb;
 
@@ -327,16 +339,16 @@
 	count--;
 	cip = HFC_CIP | HFC_F1 | HFC_REC | HFC_CHANNEL(bcs->channel);
 	if ((cip & 0xc3) != (cs->hw.hfc.cip & 0xc3)) {
-		cs->BC_Write_Reg(cs, HFC_STATUS, cip, cip);
+		hfc_write_reg(cs, HFC_STATUS, cip, cip);
 		WaitForBusy(cs);
 	}
 	WaitNoBusy(cs);
 	receive = 0;
 	if (bcs->mode == L1_MODE_HDLC) {
-		f1 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+		f1 = hfc_read_reg(cs, HFC_DATA, cip);
 		cip = HFC_CIP | HFC_F2 | HFC_REC | HFC_CHANNEL(bcs->channel);
 		WaitNoBusy(cs);
-		f2 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
+		f2 = hfc_read_reg(cs, HFC_DATA, cip);
 		if (f1 != f2) {
 			if (cs->debug & L1_DEB_HSCX)
 				debugl1(cs, "hfc rec %d f1(%d) f2(%d)",
@@ -411,7 +423,7 @@
 			break;
 		case (L1_MODE_TRANS):
 		        cs->hw.hfc.ctmt &= ~(1 << bc); /* set HDLC mode */ 
-			cs->BC_Write_Reg(cs, HFC_STATUS, cs->hw.hfc.ctmt, cs->hw.hfc.ctmt);
+			hfc_write_reg(cs, HFC_STATUS, cs->hw.hfc.ctmt, cs->hw.hfc.ctmt);
 			hfc_clear_fifo(bcs); /* complete fifo clear */ 
 			if (bc) {
 				cs->hw.hfc.ctmt |= 1;
@@ -435,8 +447,8 @@
 			}
 			break;
 	}
-	cs->BC_Write_Reg(cs, HFC_STATUS, cs->hw.hfc.ctmt, cs->hw.hfc.ctmt);
-	cs->writeisac(cs, ISAC_SPCR, cs->hw.hfc.isac_spcr);
+	hfc_write_reg(cs, HFC_STATUS, cs->hw.hfc.ctmt, cs->hw.hfc.ctmt);
+	cs->dc_hw_ops->write_reg(cs, ISAC_SPCR, cs->hw.hfc.isac_spcr);
 	if (mode == L1_MODE_HDLC)
 		hfc_clear_fifo(bcs);
 }
@@ -532,12 +544,16 @@
 		bcs->hw.hfc.send[i] = 0x1fff;
 }
 
+static struct bc_l1_ops hfc_l1_ops = {
+	.fill_fifo = hfc_fill_fifo,
+};
+
 void __init
 inithfc(struct IsdnCardState *cs)
 {
 	init_send(&cs->bcs[0]);
 	init_send(&cs->bcs[1]);
-	cs->BC_Send_Data = &hfc_fill_fifo;
+	cs->bc_l1_ops = &hfc_l1_ops;
 	cs->bcs[0].BC_SetStack = setstack_hfc;
 	cs->bcs[1].BC_SetStack = setstack_hfc;
 	cs->bcs[0].BC_Close = close_hfcstate;
diff -Nru a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
--- a/drivers/isdn/hisax/hfc_pci.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/hfc_pci.c	Wed Jan  8 20:04:43 2003
@@ -193,7 +193,7 @@
 /* clear the desired B-channel rx fifo */
 /***************************************/
 static void hfcpci_clear_fifo_rx(struct IsdnCardState *cs, int fifo)
-{       u_char fifo_state;
+{       u8 fifo_state;
         bzfifo_type *bzr;
 
 	if (fifo) {
@@ -220,7 +220,7 @@
 /* clear the desired B-channel tx fifo */
 /***************************************/
 static void hfcpci_clear_fifo_tx(struct IsdnCardState *cs, int fifo)
-{       u_char fifo_state;
+{       u8 fifo_state;
         bzfifo_type *bzt;
 
 	if (fifo) {
@@ -247,9 +247,9 @@
 /*********************************************/
 static struct sk_buff
 *
-hfcpci_empty_fifo(struct BCState *bcs, bzfifo_type * bz, u_char * bdata, int count)
+hfcpci_empty_fifo(struct BCState *bcs, bzfifo_type * bz, u8 * bdata, int count)
 {
-	u_char *ptr, *ptr1, new_f2;
+	u8 *ptr, *ptr1, new_f2;
 	struct sk_buff *skb;
 	struct IsdnCardState *cs = bcs->cs;
 	int total, maxlen, new_z2;
@@ -311,7 +311,7 @@
 	int maxlen;
 	int rcnt, total;
 	int count = 5;
-	u_char *ptr, *ptr1;
+	u8 *ptr, *ptr1;
 	dfifo_type *df;
 	z_type *zp;
 
@@ -369,12 +369,12 @@
 /* check for transparent receive data and read max one threshold size if avail */
 /*******************************************************************************/
 int
-hfcpci_empty_fifo_trans(struct BCState *bcs, bzfifo_type * bz, u_char * bdata)
+hfcpci_empty_fifo_trans(struct BCState *bcs, bzfifo_type * bz, u8 * bdata)
 {
 	unsigned short *z1r, *z2r;
 	int new_z2, fcnt, maxlen;
 	struct sk_buff *skb;
-	u_char *ptr, *ptr1;
+	u8 *ptr, *ptr1;
 
 	z1r = &bz->za[MAX_B_FRAMES].z1;		/* pointer to z reg */
 	z2r = z1r + 1;
@@ -428,7 +428,7 @@
 	int receive, count = 5;
 	struct sk_buff *skb;
 	bzfifo_type *bz;
-	u_char *bdata;
+	u8 *bdata;
 	z_type *zp;
 
 	if ((bcs->channel) && (!cs->hw.hfcpci.bswapped)) {
@@ -490,7 +490,7 @@
 	int fcnt;
 	int count, new_z1, maxlen;
 	dfifo_type *df;
-	u_char *src, *dst, new_f1;
+	u8 *src, *dst, new_f1;
 
 	if (!cs->tx_skb)
 		return;
@@ -562,8 +562,8 @@
 	int maxlen, fcnt;
 	int count, new_z1;
 	bzfifo_type *bz;
-	u_char *bdata;
-	u_char new_f1, *src, *dst;
+	u8 *bdata;
+	u8 new_f1, *src, *dst;
 	unsigned short *z1t, *z2t;
 
 	if (!bcs->tx_skb)
@@ -780,11 +780,11 @@
 	int rcnt;
 	int receive, count = 5;
 	bzfifo_type *bz;
-	u_char *bdata;
+	u8 *bdata;
 	z_type *zp;
-	u_char *ptr, *ptr1, new_f2;
+	u8 *ptr, *ptr1, new_f2;
 	int total, maxlen, new_z2;
-	u_char e_buffer[256];
+	u8 e_buffer[256];
 
 	bz = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2;
 	bdata = ((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxdat_b2;
@@ -873,10 +873,10 @@
 hfcpci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char exval;
+	u8 exval;
 	struct BCState *bcs;
 	int count = 15;
-	u_char val, stat;
+	u8 val, stat;
 
 	if (!cs) {
 		printk(KERN_WARNING "HFC-PCI: Spurious interrupt!\n");
@@ -1335,6 +1335,9 @@
 		DChannel_proc_xmt(cs);
 }
 
+static struct bc_l1_ops hfcpci_l1_ops = {
+	.fill_fifo = hfcpci_fill_fifo,
+};
 
 /********************************/
 /* called for card init message */
@@ -1347,7 +1350,7 @@
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
 	INIT_WORK(&cs->work, hfcpci_bh, cs);
-	cs->BC_Send_Data = hfcpci_fill_fifo;
+	cs->bc_l1_ops = &hfcpci_l1_ops;
 	cs->DC_Send_Data = hfcpci_fill_dfifo;
 	cs->bcs[0].BC_SetStack = setstack_2b;
 	cs->bcs[1].BC_SetStack = setstack_2b;
@@ -1473,12 +1476,6 @@
 		return (0);	/* no valid card type */
 
 
-	cs->readisac = NULL;
-	cs->writeisac = NULL;
-	cs->readisacfifo = NULL;
-	cs->writeisacfifo = NULL;
-	cs->BC_Read_Reg = NULL;
-	cs->BC_Write_Reg = NULL;
 	cs->irq_func = &hfcpci_interrupt;
 	cs->irq_flags |= SA_SHIRQ;
 
diff -Nru a/drivers/isdn/hisax/hfc_pci.h b/drivers/isdn/hisax/hfc_pci.h
--- a/drivers/isdn/hisax/hfc_pci.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/hfc_pci.h	Wed Jan  8 20:04:44 2003
@@ -188,18 +188,18 @@
   } __attribute__((packed)) z_type;
 
 typedef struct {
-    u_char data[D_FIFO_SIZE]; /* FIFO data space */
-    u_char fill1[0x20A0-D_FIFO_SIZE]; /* reserved, do not use */
-    u_char f1,f2; /* f pointers */
-    u_char fill2[0x20C0-0x20A2]; /* reserved, do not use */
+    u8 data[D_FIFO_SIZE]; /* FIFO data space */
+    u8 fill1[0x20A0-D_FIFO_SIZE]; /* reserved, do not use */
+    u8 f1,f2; /* f pointers */
+    u8 fill2[0x20C0-0x20A2]; /* reserved, do not use */
     z_type za[MAX_D_FRAMES+1]; /* mask index with D_FREG_MASK for access */
-    u_char fill3[0x4000-0x2100]; /* align 16K */  
+    u8 fill3[0x4000-0x2100]; /* align 16K */  
   } __attribute__((packed)) dfifo_type;
 
 typedef struct {
     z_type za[MAX_B_FRAMES+1]; /* only range 0x0..0x1F allowed */ 
-    u_char f1,f2; /* f pointers */
-    u_char fill[0x2100-0x2082]; /* alignment */
+    u8 f1,f2; /* f pointers */
+    u8 fill[0x2100-0x2082]; /* alignment */
   } __attribute__((packed)) bzfifo_type;
 
 
@@ -209,29 +209,29 @@
       dfifo_type d_rx; /* D-receive channel */
     } __attribute__((packed)) d_chan; 
     struct {
-      u_char fill1[0x200];
-      u_char txdat_b1[B_FIFO_SIZE];
+      u8 fill1[0x200];
+      u8 txdat_b1[B_FIFO_SIZE];
       bzfifo_type txbz_b1;
 
       bzfifo_type txbz_b2;
-      u_char txdat_b2[B_FIFO_SIZE];
+      u8 txdat_b2[B_FIFO_SIZE];
 
-      u_char fill2[D_FIFO_SIZE];
+      u8 fill2[D_FIFO_SIZE];
 
-      u_char rxdat_b1[B_FIFO_SIZE];
+      u8 rxdat_b1[B_FIFO_SIZE];
       bzfifo_type rxbz_b1;
 
       bzfifo_type rxbz_b2;
-      u_char rxdat_b2[B_FIFO_SIZE];
+      u8 rxdat_b2[B_FIFO_SIZE];
     } __attribute__((packed)) b_chans;  
-    u_char fill[32768]; 
+    u8 fill[32768]; 
   } __attribute__((packed)) fifo_area;
 
 
-//#define Write_hfc(a,b,c) (*(((u_char *)a->hw.hfcpci.pci_io)+b) = c) 
-//#define Read_hfc(a,b) (*(((u_char *)a->hw.hfcpci.pci_io)+b))
-#define Write_hfc(a,b,c)	writeb(c, ((u_char *)a->hw.hfcpci.pci_io)+b)
-#define Read_hfc(a,b)		readb(((u_char *)a->hw.hfcpci.pci_io)+b)
+//#define Write_hfc(a,b,c) (*(((u8 *)a->hw.hfcpci.pci_io)+b) = c) 
+//#define Read_hfc(a,b) (*(((u8 *)a->hw.hfcpci.pci_io)+b))
+#define Write_hfc(a,b,c)	writeb(c, ((u8 *)a->hw.hfcpci.pci_io)+b)
+#define Read_hfc(a,b)		readb(((u8 *)a->hw.hfcpci.pci_io)+b)
 
 extern void main_irq_hcpci(struct BCState *bcs);
 extern void inithfcpci(struct IsdnCardState *cs);
diff -Nru a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
--- a/drivers/isdn/hisax/hfc_sx.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/hfc_sx.c	Wed Jan  8 20:04:43 2003
@@ -43,11 +43,11 @@
 
 #undef CCD_DEMO_BOARD
 #ifdef CCD_DEMO_BOARD
-static u_char ccd_sp_irqtab[16] = {
+static u8 ccd_sp_irqtab[16] = {
   0,0,0,0,0,2,1,0,0,0,3,4,5,0,0,6
 };
 #else /* Teles 16.3c */
-static u_char ccd_sp_irqtab[16] = {
+static u8 ccd_sp_irqtab[16] = {
   0,0,0,7,0,1,0,0,0,2,3,4,5,0,0,6
 };
 #endif
@@ -60,17 +60,17 @@
 /* In/Out access to registers */
 /******************************/
 static inline void
-Write_hfc(struct IsdnCardState *cs, u_char regnum, u_char val)
+Write_hfc(struct IsdnCardState *cs, u8 regnum, u8 val)
 {
 
         byteout(cs->hw.hfcsx.base+1, regnum);
 	byteout(cs->hw.hfcsx.base, val);
 } 
 
-static inline u_char
-Read_hfc(struct IsdnCardState *cs, u_char regnum)
+static inline u8
+Read_hfc(struct IsdnCardState *cs, u8 regnum)
 {
-        u_char ret; 
+        u8 ret; 
 
         byteout(cs->hw.hfcsx.base+1, regnum);
 	ret = bytein(cs->hw.hfcsx.base);
@@ -82,7 +82,7 @@
 /* select a fifo and remember which one for reuse */
 /**************************************************/
 static void
-fifo_select(struct IsdnCardState *cs, u_char fifo)
+fifo_select(struct IsdnCardState *cs, u8 fifo)
 {
         if (fifo == cs->hw.hfcsx.last_fifo) 
 	  return; /* still valid */
@@ -100,7 +100,7 @@
 /* If its a send fifo init needed markers */
 /******************************************/
 static void
-reset_fifo(struct IsdnCardState *cs, u_char fifo)
+reset_fifo(struct IsdnCardState *cs, u8 fifo)
 {
 	fifo_select(cs, fifo); /* first select the fifo */
 	byteout(cs->hw.hfcsx.base+1, HFCSX_CIRM);
@@ -116,10 +116,10 @@
 /* the skb is not released in any way.                       */
 /*************************************************************/
 static int
-write_fifo(struct IsdnCardState *cs, struct sk_buff *skb, u_char fifo, int trans_max)
+write_fifo(struct IsdnCardState *cs, struct sk_buff *skb, u8 fifo, int trans_max)
 {       unsigned short *msp;
         int fifo_size, count, z1, z2;
-	u_char f_msk, f1, f2, *src;
+	u8 f_msk, f1, f2, *src;
 
 	if (skb->len <= 0) return(0);
         if (fifo & 1) return(0); /* no write fifo */
@@ -205,9 +205,9 @@
 /* the skb is not released in any way.                         */
 /***************************************************************/
 static struct sk_buff * 
-read_fifo(struct IsdnCardState *cs, u_char fifo, int trans_max)
+read_fifo(struct IsdnCardState *cs, u8 fifo, int trans_max)
 {       int fifo_size, count, z1, z2;
-	u_char f_msk, f1, f2, *dst;
+	u8 f_msk, f1, f2, *dst;
 	struct sk_buff *skb;
 
         if (!(fifo & 1)) return(NULL); /* no read fifo */
@@ -629,7 +629,7 @@
 receive_emsg(struct IsdnCardState *cs)
 {
 	int count = 5;
-	u_char *ptr;
+	u8 *ptr;
 	struct sk_buff *skb;
 
 	do {
@@ -664,10 +664,10 @@
 hfcsx_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char exval;
+	u8 exval;
 	struct BCState *bcs;
 	int count = 15;
-	u_char val, stat;
+	u8 val, stat;
 
 	if (!cs) {
 		printk(KERN_WARNING "HFC-SX: Spurious interrupt!\n");
@@ -1112,6 +1112,9 @@
 		DChannel_proc_xmt(cs);
 }
 
+static struct bc_l1_ops hfcsx_l1_ops = {
+	.fill_fifo = hfcsx_fill_fifo,
+};
 
 /********************************/
 /* called for card init message */
@@ -1124,7 +1127,7 @@
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
 	INIT_WORK(&cs->work, hfcsx_bh, cs);
-	cs->BC_Send_Data = hfcsx_fill_fifo;
+	cs->bc_l1_ops = &hfcsx_l1_ops;
 	cs->DC_Send_Data = hfcsx_fill_dfifo;
 	cs->bcs[0].BC_SetStack = setstack_2b;
 	cs->bcs[1].BC_SetStack = setstack_2b;
@@ -1285,12 +1288,6 @@
 	} else
 		return (0);	/* no valid card type */
 
-	cs->readisac = NULL;
-	cs->writeisac = NULL;
-	cs->readisacfifo = NULL;
-	cs->writeisacfifo = NULL;
-	cs->BC_Read_Reg = NULL;
-	cs->BC_Write_Reg = NULL;
 	cs->irq_func = &hfcsx_interrupt;
 
 	cs->hw.hfcsx.timer.function = (void *) hfcsx_Timer;
diff -Nru a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c
--- a/drivers/isdn/hisax/hfcscard.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/hfcscard.c	Wed Jan  8 20:04:45 2003
@@ -20,19 +20,31 @@
 
 static const char *hfcs_revision = "$Revision: 1.8.6.2 $";
 
+static inline u8
+hfcs_read_reg(struct IsdnCardState *cs, int data, u8 reg)
+{
+	return cs->bc_hw_ops->read_reg(cs, data, reg);
+}
+
+static inline void
+hfcs_write_reg(struct IsdnCardState *cs, int data, u8 reg, u8 val)
+{
+	cs->bc_hw_ops->write_reg(cs, data, reg, val);
+}
+
 static void
 hfcs_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val, stat;
+	u8 val, stat;
 
 	if (!cs) {
 		printk(KERN_WARNING "HFCS: Spurious interrupt!\n");
 		return;
 	}
 	if ((HFCD_ANYINT | HFCD_BUSY_NBUSY) & 
-		(stat = cs->BC_Read_Reg(cs, HFCD_DATA, HFCD_STAT))) {
-		val = cs->BC_Read_Reg(cs, HFCD_DATA, HFCD_INT_S1);
+		(stat = hfcs_read_reg(cs, HFCD_DATA, HFCD_STAT))) {
+		val = hfcs_read_reg(cs, HFCD_DATA, HFCD_INT_S1);
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "HFCS: stat(%02x) s1(%02x)", stat, val);
 		hfc2bds0_interrupt(cs, val);
@@ -68,37 +80,37 @@
 	cs->hw.hfcD.cirm = HFCD_RESET;
 	if (cs->typ == ISDN_CTYPE_TELES3C)
 		cs->hw.hfcD.cirm |= HFCD_MEM8K;
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm);	/* Reset On */
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm);	/* Reset On */
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((30*HZ)/1000);
 	cs->hw.hfcD.cirm = 0;
 	if (cs->typ == ISDN_CTYPE_TELES3C)
 		cs->hw.hfcD.cirm |= HFCD_MEM8K;
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm);	/* Reset Off */
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm);	/* Reset Off */
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
 	if (cs->typ == ISDN_CTYPE_TELES3C)
 		cs->hw.hfcD.cirm |= HFCD_INTB;
 	else if (cs->typ == ISDN_CTYPE_ACERP10)
 		cs->hw.hfcD.cirm |= HFCD_INTA;
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm);
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CLKDEL, 0x0e);
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_TEST, HFCD_AUTO_AWAKE); /* S/T Auto awake */
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm);
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_CLKDEL, 0x0e);
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_TEST, HFCD_AUTO_AWAKE); /* S/T Auto awake */
 	cs->hw.hfcD.ctmt = HFCD_TIM25 | HFCD_AUTO_TIMER;
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcD.ctmt);
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcD.ctmt);
 	cs->hw.hfcD.int_m2 = HFCD_IRQ_ENABLE;
 	cs->hw.hfcD.int_m1 = HFCD_INTS_B1TRANS | HFCD_INTS_B2TRANS |
 		HFCD_INTS_DTRANS | HFCD_INTS_B1REC | HFCD_INTS_B2REC |
 		HFCD_INTS_DREC | HFCD_INTS_L1STATE;
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_INT_M1, cs->hw.hfcD.int_m1);
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_INT_M2, cs->hw.hfcD.int_m2);
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_STATES, HFCD_LOAD_STATE | 2); /* HFC ST 2 */
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_INT_M1, cs->hw.hfcD.int_m1);
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_INT_M2, cs->hw.hfcD.int_m2);
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_STATES, HFCD_LOAD_STATE | 2); /* HFC ST 2 */
 	udelay(10);
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_STATES, 2); /* HFC ST 2 */
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_STATES, 2); /* HFC ST 2 */
 	cs->hw.hfcD.mst_m = HFCD_MASTER;
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_MST_MODE, cs->hw.hfcD.mst_m); /* HFC Master */
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_MST_MODE, cs->hw.hfcD.mst_m); /* HFC Master */
 	cs->hw.hfcD.sctrl = 0;
-	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_SCTRL, cs->hw.hfcD.sctrl);
+	hfcs_write_reg(cs, HFCD_DATA, HFCD_SCTRL, cs->hw.hfcD.sctrl);
 }
 
 static int
@@ -120,8 +132,8 @@
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout((80*HZ)/1000);
 			cs->hw.hfcD.ctmt |= HFCD_TIM800;
-			cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcD.ctmt); 
-			cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
+			hfcs_write_reg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcD.ctmt); 
+			hfcs_write_reg(cs, HFCD_DATA, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
 			return(0);
 		case CARD_TEST:
 			return(0);
diff -Nru a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
--- a/drivers/isdn/hisax/hisax.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/hisax.h	Wed Jan  8 20:04:44 2003
@@ -292,14 +292,14 @@
 #define NO_CAUSE 254
 
 struct Param {
-	u_char cause;
-	u_char loc;
-	u_char diag[6];
+	u8 cause;
+	u8 loc;
+	u8 diag[6];
 	int bchannel;
 	int chargeinfo;
 	int spv;		/* SPV Flag */
 	setup_parm setup;	/* from isdnif.h numbers and Serviceindicator */
-	u_char moderate;	/* transfer mode and rate (bearer octet 4) */
+	u8 moderate;	/* transfer mode and rate (bearer octet 4) */
 };
 
 
@@ -314,7 +314,7 @@
 
         /* protocol specific data fields */
         union
-	 { u_char uuuu; /* only as dummy */
+	 { u8 uuuu; /* only as dummy */
 #ifdef CONFIG_HISAX_EURO
            dss1_stk_priv dss1; /* private dss1 data */
 #endif /* CONFIG_HISAX_EURO */              
@@ -338,7 +338,7 @@
 
         /* protocol specific data fields */
         union 
-	 { u_char uuuu; /* only when euro not defined, avoiding empty union */
+	 { u8 uuuu; /* only when euro not defined, avoiding empty union */
 #ifdef CONFIG_HISAX_EURO 
            dss1_proc_priv dss1; /* private dss1 data */
 #endif /* CONFIG_HISAX_EURO */            
@@ -351,53 +351,53 @@
 struct hscx_hw {
 	int hscx;
 	int rcvidx;
-	u_char *rcvbuf;         /* B-Channel receive Buffer */
-	u_char tsaxr0;
-	u_char tsaxr1;
+	u8 *rcvbuf;         /* B-Channel receive Buffer */
+	u8 tsaxr0;
+	u8 tsaxr1;
 };
 
 struct w6692B_hw {
 	int bchan;
 	int rcvidx;
-	u_char *rcvbuf;         /* B-Channel receive Buffer */
+	u8 *rcvbuf;         /* B-Channel receive Buffer */
 };
 
 struct isar_reg {
 	unsigned long Flags;
-	volatile u_char bstat;
-	volatile u_char iis;
-	volatile u_char cmsb;
-	volatile u_char clsb;
-	volatile u_char par[8];
+	volatile u8 bstat;
+	volatile u8 iis;
+	volatile u8 cmsb;
+	volatile u8 clsb;
+	volatile u8 par[8];
 };
 
 struct isar_hw {
 	int dpath;
 	int rcvidx;
 	int mml;
-	u_char state;
-	u_char cmd;
-	u_char mod;
-	u_char newcmd;
-	u_char newmod;
+	u8 state;
+	u8 cmd;
+	u8 mod;
+	u8 newcmd;
+	u8 newmod;
 	char try_mod;
 	struct timer_list ftimer;
-	u_char *rcvbuf;         /* B-Channel receive Buffer */
-	u_char conmsg[16];
+	u8 *rcvbuf;         /* B-Channel receive Buffer */
+	u8 conmsg[16];
 	struct isar_reg *reg;
 };
 
 struct hdlc_stat_reg {
 #ifdef __BIG_ENDIAN
-	u_char fill __attribute__((packed));
-	u_char mode __attribute__((packed));
-	u_char xml  __attribute__((packed));
-	u_char cmd  __attribute__((packed));
-#else
-	u_char cmd  __attribute__((packed));
-	u_char xml  __attribute__((packed));
-	u_char mode __attribute__((packed));
-	u_char fill __attribute__((packed));
+	u8 fill __attribute__((packed));
+	u8 mode __attribute__((packed));
+	u8 xml  __attribute__((packed));
+	u8 cmd  __attribute__((packed));
+#else
+	u8 cmd  __attribute__((packed));
+	u8 xml  __attribute__((packed));
+	u8 mode __attribute__((packed));
+	u8 fill __attribute__((packed));
 #endif
 };
 
@@ -408,7 +408,7 @@
 	} ctrl;
 	u_int stat;
 	int rcvidx;
-	u_char *rcvbuf;         /* B-Channel receive Buffer */
+	u8 *rcvbuf;         /* B-Channel receive Buffer */
 };
 
 struct hfcB_hw {
@@ -425,24 +425,24 @@
 	u_int *rec;
 	dma_addr_t rec_dma;
 	int free;
-	u_char *rcvbuf;
-	u_char *sendbuf;
-	u_char *sp;
+	u8 *rcvbuf;
+	u8 *sendbuf;
+	u8 *sp;
 	int sendcnt;
 	u_int s_tot;
 	u_int r_bitcnt;
 	u_int r_tot;
 	u_int r_err;
 	u_int r_fcs;
-	u_char r_state;
-	u_char r_one;
-	u_char r_val;
-	u_char s_state;
+	u8 r_state;
+	u8 r_one;
+	u8 r_val;
+	u8 s_state;
 };
 
 struct amd7930_hw {
-	u_char *tx_buff;
-	u_char *rv_buff;
+	u8 *tx_buff;
+	u8 *rv_buff;
 	int rv_buff_in;
 	int rv_buff_out;
 	struct sk_buff *rv_skb;
@@ -487,8 +487,8 @@
 	struct sk_buff_head squeue;	/* B-Channel send queue */
 	struct sk_buff_head cmpl_queue;	/* B-Channel send complete queue */
 	struct PStack *st;
-	u_char *blog;
-	u_char *conmsg;
+	u8 *blog;
+	u8 *conmsg;
 	struct timer_list transbusy;
 	struct work_struct work;
 	unsigned long event;
@@ -547,17 +547,17 @@
 	struct timer_list tl;
 	unsigned int MFlag;
 	struct BCState *bcs;
-	u_char *transbuf;
-	u_char *rcvbuf;
+	u8 *transbuf;
+	u8 *rcvbuf;
 	unsigned int transp;
 	unsigned int rcvp;
 	unsigned int transcnt;
 	unsigned int rcvcnt;
-	u_char IER;
-	u_char FCR;
-	u_char LCR;
-	u_char MCR;
-	u_char ctrl_reg;
+	u8 IER;
+	u8 FCR;
+	u8 LCR;
+	u8 MCR;
+	u8 ctrl_reg;
 };
 
 struct teles3_hw {
@@ -601,7 +601,7 @@
 	unsigned int hscx;
 	unsigned int status;
 	struct timer_list tl;
-	u_char ctrl_reg;
+	u8 ctrl_reg;
 };
 
 struct asus_hw {
@@ -620,7 +620,7 @@
 	unsigned char cirm;
 	unsigned char ctmt;
 	unsigned char cip;
-	u_char isac_spcr;
+	u8 isac_spcr;
 	struct timer_list timer;
 };
 
@@ -795,25 +795,25 @@
 
 struct arcofi_msg {
 	struct arcofi_msg *next;
-	u_char receive;
-	u_char len;
-	u_char msg[10];
+	u8 receive;
+	u8 len;
+	u8 msg[10];
 };
 
 struct isac_chip {
 	int ph_state;
-	u_char *mon_tx;
-	u_char *mon_rx;
+	u8 *mon_tx;
+	u8 *mon_rx;
 	int mon_txp;
 	int mon_txc;
 	int mon_rxp;
 	struct arcofi_msg *arcofi_list;
 	struct timer_list arcofitimer;
 	wait_queue_head_t arcofi_wait;
-	u_char arcofi_bc;
-	u_char arcofi_state;
-	u_char mocr;
-	u_char adf2;
+	u8 arcofi_bc;
+	u8 arcofi_state;
+	u8 mocr;
+	u8 adf2;
 };
 
 struct hfcd_chip {
@@ -833,30 +833,55 @@
 };
 
 struct amd7930_chip {
-	u_char lmr1;
-	u_char ph_state;
-	u_char old_state;
-	u_char flg_t3;
+	u8 lmr1;
+	u8 ph_state;
+	u8 old_state;
+	u8 flg_t3;
 	unsigned int tx_xmtlen;
 	struct timer_list timer3;
-	void (*ph_command) (struct IsdnCardState *, u_char, char *);
-	void (*setIrqMask) (struct IsdnCardState *, u_char);
+	void (*ph_command) (struct IsdnCardState *, u8, char *);
+	void (*setIrqMask) (struct IsdnCardState *, u8);
 };
 
 struct icc_chip {
 	int ph_state;
-	u_char *mon_tx;
-	u_char *mon_rx;
+	u8 *mon_tx;
+	u8 *mon_rx;
 	int mon_txp;
 	int mon_txc;
 	int mon_rxp;
 	struct arcofi_msg *arcofi_list;
 	struct timer_list arcofitimer;
 	wait_queue_head_t arcofi_wait;
-	u_char arcofi_bc;
-	u_char arcofi_state;
-	u_char mocr;
-	u_char adf2;
+	u8 arcofi_bc;
+	u8 arcofi_state;
+	u8 mocr;
+	u8 adf2;
+};
+
+struct IsdnCardState;
+
+/* Card specific drivers provide methods to access the
+ * chips to the chip drivers */
+
+struct bc_hw_ops {
+	u8     (*read_reg)   (struct IsdnCardState *, int, u8);
+	void   (*write_reg)  (struct IsdnCardState *, int, u8, u8);
+	void   (*read_fifo)  (struct IsdnCardState *, int, u8 *, int);
+	void   (*write_fifo) (struct IsdnCardState *, int, u8 *, int);
+};
+
+struct dc_hw_ops {
+	u8     (*read_reg)   (struct IsdnCardState *, u8);
+	void   (*write_reg)  (struct IsdnCardState *, u8, u8);
+	void   (*read_fifo)  (struct IsdnCardState *, u8 *, int);
+	void   (*write_fifo) (struct IsdnCardState *, u8 *, int);
+};
+
+/* Methods provided to shared FIFO handling */
+
+struct bc_l1_ops {
+	void   (*fill_fifo)  (struct BCState *);
 };
 
 #define HW_IOM1			0
@@ -911,17 +936,13 @@
 	} hw;
 	int myid;
 	isdn_if iif;
-	u_char *status_buf;
-	u_char *status_read;
-	u_char *status_write;
-	u_char *status_end;
-	u_char (*readisac) (struct IsdnCardState *, u_char);
-	void   (*writeisac) (struct IsdnCardState *, u_char, u_char);
-	void   (*readisacfifo) (struct IsdnCardState *, u_char *, int);
-	void   (*writeisacfifo) (struct IsdnCardState *, u_char *, int);
-	u_char (*BC_Read_Reg) (struct IsdnCardState *, int, u_char);
-	void   (*BC_Write_Reg) (struct IsdnCardState *, int, u_char, u_char);
-	void   (*BC_Send_Data) (struct BCState *);
+	u8 *status_buf;
+	u8 *status_read;
+	u8 *status_write;
+	u8 *status_end;
+	struct dc_hw_ops *dc_hw_ops;
+	struct bc_hw_ops *bc_hw_ops;
+	struct bc_l1_ops *bc_l1_ops;
 	int    (*cardmsg) (struct IsdnCardState *, int, void *);
 	void   (*setstack_d) (struct PStack *, struct IsdnCardState *);
 	void   (*DC_Send_Data) (struct IsdnCardState *);
@@ -944,7 +965,7 @@
 		struct amd7930_chip amd7930;
 		struct icc_chip icc;
 	} dc;
-	u_char *rcvbuf;
+	u8 *rcvbuf;
 	int rcvidx;
 	struct sk_buff *tx_skb;
 	int tx_cnt;
@@ -1317,8 +1338,8 @@
 void setstack_l3bc(struct PStack *st, struct Channel *chanp);
 void releasestack_isdnl3(struct PStack *st);
 
-u_char *findie(u_char * p, int size, u_char ie, int wanted_set);
-int getcallref(u_char * p);
+u8 *findie(u8 * p, int size, u8 ie, int wanted_set);
+int getcallref(u8 * p);
 int newcallref(void);
 
 int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
@@ -1338,10 +1359,10 @@
 void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);
 void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);
 void HiSax_reportcard(int cardnr, int sel);
-int QuickHex(char *txt, u_char * p, int cnt);
-void LogFrame(struct IsdnCardState *cs, u_char * p, int size);
+int QuickHex(char *txt, u8 * p, int cnt);
+void LogFrame(struct IsdnCardState *cs, u8 * p, int size);
 void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir);
-void iecpy(u_char * dest, u_char * iestart, int ieoffset);
+void iecpy(u8 * dest, u8 * iestart, int ieoffset);
 #ifdef ISDN_CHIP_ISAC
 void setstack_isac(struct PStack *st, struct IsdnCardState *cs);
 #endif	/* ISDN_CHIP_ISAC */
diff -Nru a/drivers/isdn/hisax/hisax_debug.h b/drivers/isdn/hisax/hisax_debug.h
--- a/drivers/isdn/hisax/hisax_debug.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/hisax_debug.h	Wed Jan  8 20:04:43 2003
@@ -39,7 +39,7 @@
 
 
 static void __attribute__((unused))
-dump_packet(const char *name,const u_char *data,int pkt_len)
+dump_packet(const char *name,const u8 *data,int pkt_len)
 {
 #define DUMP_HDR_SIZE 20
 #define DUMP_TLR_SIZE 8
diff -Nru a/drivers/isdn/hisax/hisax_fcclassic.c b/drivers/isdn/hisax/hisax_fcclassic.c
--- a/drivers/isdn/hisax/hisax_fcclassic.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/hisax_fcclassic.c	Wed Jan  8 20:04:43 2003
@@ -86,8 +86,8 @@
 	outsb(adapter->isac_fifo, data, size);
 }
 
-static u_char
-fcclassic_read_hscx(struct hscx *hscx, u_char offset)
+static u8
+fcclassic_read_hscx(struct hscx *hscx, u8 offset)
 {
 	struct fritz_adapter *adapter = hscx->priv;
 
@@ -95,7 +95,7 @@
 }
 
 static void
-fcclassic_write_hscx(struct hscx *hscx, u_char offset, u_char value)
+fcclassic_write_hscx(struct hscx *hscx, u8 offset, u8 value)
 {
 	struct fritz_adapter *adapter = hscx->priv;
 
diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c	Wed Jan  8 20:04:44 2003
@@ -890,6 +890,24 @@
 	return retval;
 }
 
+static void __devexit fcpci_remove(struct pci_dev *pdev)
+{
+	struct fritz_adapter *adapter = pci_get_drvdata(pdev);
+
+	fcpcipnp_release(adapter);
+	pci_disable_device(pdev);
+	delete_adapter(adapter);
+}
+
+static struct pci_driver fcpci_driver = {
+	.name     = "fcpci",
+	.probe    = fcpci_probe,
+	.remove   = __devexit_p(fcpci_remove),
+	.id_table = fcpci_ids,
+};
+
+#ifdef __ISAPNP__
+
 static int __devinit fcpnp_probe(struct pci_dev *pdev,
 				 const struct isapnp_device_id *ent)
 {
@@ -924,15 +942,6 @@
 	return retval;
 }
 
-static void __devexit fcpci_remove(struct pci_dev *pdev)
-{
-	struct fritz_adapter *adapter = pci_get_drvdata(pdev);
-
-	fcpcipnp_release(adapter);
-	pci_disable_device(pdev);
-	delete_adapter(adapter);
-}
-
 static void __devexit fcpnp_remove(struct pci_dev *pdev)
 {
 	struct fritz_adapter *adapter = pci_get_drvdata(pdev);
@@ -942,13 +951,6 @@
 	delete_adapter(adapter);
 }
 
-static struct pci_driver fcpci_driver = {
-	.name     = "fcpci",
-	.probe    = fcpci_probe,
-	.remove   = __devexit_p(fcpci_remove),
-	.id_table = fcpci_ids,
-};
-
 static struct isapnp_driver fcpnp_driver = {
 	.name     = "fcpnp",
 	.probe    = fcpnp_probe,
@@ -956,6 +958,8 @@
 	.id_table = fcpnp_ids,
 };
 
+#endif
+
 static int __init hisax_fcpcipnp_init(void)
 {
 	int retval, pci_nr_found;
@@ -967,7 +971,11 @@
 		goto out;
 	pci_nr_found = retval;
 
+#ifdef __ISAPNP__
 	retval = isapnp_register_driver(&fcpnp_driver);
+#else
+	retval = 0;
+#endif
 	if (retval < 0)
 		goto out_unregister_pci;
 
@@ -981,8 +989,10 @@
 
 #if !defined(CONFIG_HOTPLUG) || defined(MODULE)
  out_unregister_isapnp:
+#ifdef __ISAPNP__
 	isapnp_unregister_driver(&fcpnp_driver);
 #endif
+#endif
  out_unregister_pci:
 	pci_unregister_driver(&fcpci_driver);
  out:
@@ -991,7 +1001,9 @@
 
 static void __exit hisax_fcpcipnp_exit(void)
 {
+#ifdef __ISAPNP__
 	isapnp_unregister_driver(&fcpnp_driver);
+#endif
 	pci_unregister_driver(&fcpci_driver);
 }
 
diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.h b/drivers/isdn/hisax/hisax_fcpcipnp.h
--- a/drivers/isdn/hisax/hisax_fcpcipnp.h	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.h	Wed Jan  8 20:04:45 2003
@@ -12,15 +12,15 @@
 
 struct hdlc_stat_reg {
 #ifdef __BIG_ENDIAN
-	u_char fill __attribute__((packed));
-	u_char mode __attribute__((packed));
-	u_char xml  __attribute__((packed));
-	u_char cmd  __attribute__((packed));
+	u8 fill __attribute__((packed));
+	u8 mode __attribute__((packed));
+	u8 xml  __attribute__((packed));
+	u8 cmd  __attribute__((packed));
 #else
-	u_char cmd  __attribute__((packed));
-	u_char xml  __attribute__((packed));
-	u_char mode __attribute__((packed));
-	u_char fill __attribute__((packed));
+	u8 cmd  __attribute__((packed));
+	u8 xml  __attribute__((packed));
+	u8 mode __attribute__((packed));
+	u8 fill __attribute__((packed));
 #endif
 };
 
@@ -36,7 +36,7 @@
 	} ctrl;
 	u_int stat;
 	int rcvidx;
-	u_char rcvbuf[HSCX_BUFMAX]; /* B-Channel receive Buffer */
+	u8 rcvbuf[HSCX_BUFMAX]; /* B-Channel receive Buffer */
 
 	int tx_cnt;		    /* B-Channel transmit counter */
 	struct sk_buff *tx_skb;     /* B-Channel transmit Buffer */
diff -Nru a/drivers/isdn/hisax/hisax_hscx.c b/drivers/isdn/hisax/hisax_hscx.c
--- a/drivers/isdn/hisax/hisax_hscx.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/hisax_hscx.c	Wed Jan  8 20:04:43 2003
@@ -113,7 +113,7 @@
 
 static void hscx_empty_fifo(struct hscx *hscx, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 
 	DBG(DBG_IRQ, "count %d", count);
 
diff -Nru a/drivers/isdn/hisax/hisax_hscx.h b/drivers/isdn/hisax/hisax_hscx.h
--- a/drivers/isdn/hisax/hisax_hscx.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/hisax_hscx.h	Wed Jan  8 20:04:44 2003
@@ -16,16 +16,16 @@
 	struct hisax_b_if b_if;
 	int mode;
 	int channel;
-	u_char tsaxr;
+	u8 tsaxr;
 	struct sk_buff *tx_skb;
 	int tx_cnt;
-	u_char rcvbuf[HSCX_BUFMAX];
+	u8 rcvbuf[HSCX_BUFMAX];
 	int rcvidx;
 
-	u_char (*read_hscx)      (struct hscx *, u_char);
-	void   (*write_hscx)     (struct hscx *, u_char, u_char);
-	void   (*read_hscx_fifo) (struct hscx *, u_char *, int);
-	void   (*write_hscx_fifo)(struct hscx *, u_char *, int);
+	u8 (*read_hscx)      (struct hscx *, u8);
+	void   (*write_hscx)     (struct hscx *, u8, u8);
+	void   (*read_hscx_fifo) (struct hscx *, u8 *, int);
+	void   (*write_hscx_fifo)(struct hscx *, u8 *, int);
 };
 
 void hscx_init(struct hscx *hscx);
diff -Nru a/drivers/isdn/hisax/hisax_isac.c b/drivers/isdn/hisax/hisax_isac.c
--- a/drivers/isdn/hisax/hisax_isac.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/isdn/hisax/hisax_isac.c	Wed Jan  8 20:04:32 2003
@@ -450,7 +450,7 @@
 {
 	// this also works for isacsx, since
 	// CMDR(D) register works the same
-	u_char *ptr;
+	u8 *ptr;
 
 	DBG(DBG_IRQ, "count %d", count);
 
@@ -474,7 +474,7 @@
 
 	int count;
 	unsigned char cmd;
-	u_char *ptr;
+	u8 *ptr;
 
 	if (!isac->tx_skb)
 		BUG();
diff -Nru a/drivers/isdn/hisax/hisax_isac.h b/drivers/isdn/hisax/hisax_isac.h
--- a/drivers/isdn/hisax/hisax_isac.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/hisax_isac.h	Wed Jan  8 20:04:44 2003
@@ -17,20 +17,20 @@
 	struct hisax_d_if hisax_d_if;
 	struct FsmInst l1m;
 	struct FsmTimer timer;
-	u_char mocr;
-	u_char adf2;
+	u8 mocr;
+	u8 adf2;
 	int    type;
 
-	u_char rcvbuf[MAX_DFRAME_LEN_L1];
+	u8 rcvbuf[MAX_DFRAME_LEN_L1];
 	int rcvidx;
 
 	struct sk_buff *tx_skb;
 	int tx_cnt;
 
-	u_char (*read_isac)      (struct isac *, u_char);
-	void   (*write_isac)     (struct isac *, u_char, u_char);
-	void   (*read_isac_fifo) (struct isac *, u_char *, int);
-	void   (*write_isac_fifo)(struct isac *, u_char *, int);
+	u8 (*read_isac)      (struct isac *, u8);
+	void   (*write_isac)     (struct isac *, u8, u8);
+	void   (*read_isac_fifo) (struct isac *, u8 *, int);
+	void   (*write_isac_fifo)(struct isac *, u8 *, int);
 };
 
 void isac_init(struct isac *isac);
diff -Nru a/drivers/isdn/hisax/hscx.c b/drivers/isdn/hisax/hscx.c
--- a/drivers/isdn/hisax/hscx.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/isdn/hisax/hscx.c	Wed Jan  8 20:04:32 2003
@@ -21,13 +21,49 @@
 {"A1", "?1", "A2", "?3", "A3", "V2.1", "?6", "?7",
  "?8", "?9", "?10", "?11", "?12", "?13", "?14", "???"};
 
+static inline u8
+hscx_read(struct BCState *bcs, u8 addr)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	return cs->bc_hw_ops->read_reg(cs, hscx, addr);
+}
+
+static inline void
+hscx_write(struct BCState *bcs, u8 addr, u8 val)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	cs->bc_hw_ops->write_reg(cs, hscx, addr, val);
+}
+
+static inline void
+hscx_read_fifo(struct BCState *bcs, u8 *p, int len)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	cs->bc_hw_ops->read_fifo(cs, hscx, p, len);
+}
+
+static inline void
+hscx_write_fifo(struct BCState *bcs, u8 *p, int len)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	cs->bc_hw_ops->write_fifo(cs, hscx, p, len);
+}
+
 int __init
 HscxVersion(struct IsdnCardState *cs, char *s)
 {
 	int verA, verB;
 
-	verA = cs->BC_Read_Reg(cs, 0, HSCX_VSTR) & 0xf;
-	verB = cs->BC_Read_Reg(cs, 1, HSCX_VSTR) & 0xf;
+	verA = cs->bc_hw_ops->read_reg(cs, 0, HSCX_VSTR) & 0xf;
+	verB = cs->bc_hw_ops->read_reg(cs, 1, HSCX_VSTR) & 0xf;
 	printk(KERN_INFO "%s HSCX version A: %s  B: %s\n", s,
 	       HSCXVer[verA], HSCXVer[verB]);
 	if ((verA == 0) | (verA == 0xf) | (verB == 0) | (verB == 0xf))
@@ -47,48 +83,49 @@
 			'A' + hscx, mode, bc);
 	bcs->mode = mode;
 	bcs->channel = bc;
-	cs->BC_Write_Reg(cs, hscx, HSCX_XAD1, 0xFF);
-	cs->BC_Write_Reg(cs, hscx, HSCX_XAD2, 0xFF);
-	cs->BC_Write_Reg(cs, hscx, HSCX_RAH2, 0xFF);
-	cs->BC_Write_Reg(cs, hscx, HSCX_XBCH, 0x0);
-	cs->BC_Write_Reg(cs, hscx, HSCX_RLCR, 0x0);
-	cs->BC_Write_Reg(cs, hscx, HSCX_CCR1,
+	hscx_write(bcs, HSCX_XAD1, 0xFF);
+	hscx_write(bcs, HSCX_XAD2, 0xFF);
+	hscx_write(bcs, HSCX_RAH2, 0xFF);
+	hscx_write(bcs, HSCX_XBCH, 0x0);
+	hscx_write(bcs, HSCX_RLCR, 0x0);
+	hscx_write(bcs, HSCX_CCR1,
 		test_bit(HW_IPAC, &cs->HW_Flags) ? 0x82 : 0x85);
-	cs->BC_Write_Reg(cs, hscx, HSCX_CCR2, 0x30);
-	cs->BC_Write_Reg(cs, hscx, HSCX_XCCR, 7);
-	cs->BC_Write_Reg(cs, hscx, HSCX_RCCR, 7);
+	hscx_write(bcs, HSCX_CCR2, 0x30);
+	hscx_write(bcs, HSCX_XCCR, 7);
+	hscx_write(bcs, HSCX_RCCR, 7);
 
 	/* Switch IOM 1 SSI */
 	if (test_bit(HW_IOM1, &cs->HW_Flags) && (hscx == 0))
 		bc = 1 - bc;
 
 	if (bc == 0) {
-		cs->BC_Write_Reg(cs, hscx, HSCX_TSAX,
+		hscx_write(bcs, HSCX_TSAX,
 			      test_bit(HW_IOM1, &cs->HW_Flags) ? 0x7 : bcs->hw.hscx.tsaxr0);
-		cs->BC_Write_Reg(cs, hscx, HSCX_TSAR,
+		hscx_write(bcs, HSCX_TSAR,
 			      test_bit(HW_IOM1, &cs->HW_Flags) ? 0x7 : bcs->hw.hscx.tsaxr0);
 	} else {
-		cs->BC_Write_Reg(cs, hscx, HSCX_TSAX, bcs->hw.hscx.tsaxr1);
-		cs->BC_Write_Reg(cs, hscx, HSCX_TSAR, bcs->hw.hscx.tsaxr1);
+		hscx_write(bcs, HSCX_TSAX, bcs->hw.hscx.tsaxr1);
+		hscx_write(bcs, HSCX_TSAR, bcs->hw.hscx.tsaxr1);
 	}
 	switch (mode) {
-		case (L1_MODE_NULL):
-			cs->BC_Write_Reg(cs, hscx, HSCX_TSAX, 0x1f);
-			cs->BC_Write_Reg(cs, hscx, HSCX_TSAR, 0x1f);
-			cs->BC_Write_Reg(cs, hscx, HSCX_MODE, 0x84);
-			break;
-		case (L1_MODE_TRANS):
-			cs->BC_Write_Reg(cs, hscx, HSCX_MODE, 0xe4);
-			break;
-		case (L1_MODE_HDLC):
-			cs->BC_Write_Reg(cs, hscx, HSCX_CCR1,
-				test_bit(HW_IPAC, &cs->HW_Flags) ? 0x8a : 0x8d);
-			cs->BC_Write_Reg(cs, hscx, HSCX_MODE, 0x8c);
-			break;
+	case L1_MODE_NULL:
+		hscx_write(bcs, HSCX_TSAX, 0x1f);
+		hscx_write(bcs, HSCX_TSAR, 0x1f);
+		hscx_write(bcs, HSCX_MODE, 0x84);
+		break;
+	case L1_MODE_TRANS:
+		hscx_write(bcs, HSCX_MODE, 0xe4);
+		break;
+	case L1_MODE_HDLC:
+		hscx_write(bcs, HSCX_CCR1,
+			       test_bit(HW_IPAC, &cs->HW_Flags) ? 0x8a : 0x8d);
+		hscx_write(bcs, HSCX_MODE, 0x8c);
+		break;
 	}
 	if (mode)
-		cs->BC_Write_Reg(cs, hscx, HSCX_CMDR, 0x41);
-	cs->BC_Write_Reg(cs, hscx, HSCX_ISTA, 0x00);
+		hscx_write(bcs, HSCX_CMDR, 0x41);
+
+	hscx_write(bcs, HSCX_ISTA, 0x00);
 }
 
 void
@@ -191,11 +228,16 @@
 	return (0);
 }
 
+static struct bc_l1_ops hscx_l1_ops = {
+	.fill_fifo = hscx_fill_fifo,
+};
+
 void __init
 inithscx(struct IsdnCardState *cs)
 {
 	int val, eval;
-
+	
+	cs->bc_l1_ops = &hscx_l1_ops;
 	cs->bcs[0].BC_SetStack = setstack_hscx;
 	cs->bcs[1].BC_SetStack = setstack_hscx;
 	cs->bcs[0].BC_Close = close_hscxstate;
@@ -207,32 +249,32 @@
 	cs->bcs[1].hw.hscx.tsaxr0 = 0x2f;
 	cs->bcs[1].hw.hscx.tsaxr1 = 3;
 
-	val = cs->BC_Read_Reg(cs, 1, HSCX_ISTA);
+	val = hscx_read(&cs->bcs[1], HSCX_ISTA);
 	debugl1(cs, "HSCX B ISTA %x", val);
 	if (val & 0x01) {
-		eval = cs->BC_Read_Reg(cs, 1, HSCX_EXIR);
+		eval = hscx_read(&cs->bcs[1], HSCX_EXIR);
 		debugl1(cs, "HSCX B EXIR %x", eval);
 	}
 	if (val & 0x02) {
-		eval = cs->BC_Read_Reg(cs, 0, HSCX_EXIR);
+		eval = hscx_read(&cs->bcs[0], HSCX_EXIR);
 		debugl1(cs, "HSCX A EXIR %x", eval);
 	}
-	val = cs->BC_Read_Reg(cs, 0, HSCX_ISTA);
+	val = hscx_read(&cs->bcs[0], HSCX_ISTA);
 	debugl1(cs, "HSCX A ISTA %x", val);
-	val = cs->BC_Read_Reg(cs, 1, HSCX_STAR);
+	val = hscx_read(&cs->bcs[1], HSCX_STAR);
 	debugl1(cs, "HSCX B STAR %x", val);
-	val = cs->BC_Read_Reg(cs, 0, HSCX_STAR);
+	val = hscx_read(&cs->bcs[0], HSCX_STAR);
 	debugl1(cs, "HSCX A STAR %x", val);
 	/* disable all IRQ */
-	cs->BC_Write_Reg(cs, 0, HSCX_MASK, 0xFF);
-	cs->BC_Write_Reg(cs, 1, HSCX_MASK, 0xFF);
+	hscx_write(&cs->bcs[0], HSCX_MASK, 0xFF);
+	hscx_write(&cs->bcs[1], HSCX_MASK, 0xFF);
 
-	modehscx(cs->bcs, 0, 0);
-	modehscx(cs->bcs + 1, 0, 0);
+	modehscx(&cs->bcs[0], 0, 0);
+	modehscx(&cs->bcs[1], 0, 0);
 
 	/* Reenable all IRQ */
-	cs->BC_Write_Reg(cs, 0, HSCX_MASK, 0);
-	cs->BC_Write_Reg(cs, 1, HSCX_MASK, 0);
+	hscx_write(&cs->bcs[0], HSCX_MASK, 0x0);
+	hscx_write(&cs->bcs[1], HSCX_MASK, 0x0);
 }
 
 void __init
@@ -241,3 +283,5 @@
 	initisac(cs);
 	inithscx(cs);
 }
+
+#include "hscx_irq.c"
diff -Nru a/drivers/isdn/hisax/hscx.h b/drivers/isdn/hisax/hscx.h
--- a/drivers/isdn/hisax/hscx.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/hscx.h	Wed Jan  8 20:04:44 2003
@@ -37,3 +37,5 @@
 extern int HscxVersion(struct IsdnCardState *cs, char *s);
 extern void modehscx(struct BCState *bcs, int mode, int bc);
 extern void inithscxisac(struct IsdnCardState *cs);
+extern void hscx_int_main(struct IsdnCardState *cs, u8 val);
+extern void hscx_fill_fifo(struct BCState *bcs);
diff -Nru a/drivers/isdn/hisax/hscx_irq.c b/drivers/isdn/hisax/hscx_irq.c
--- a/drivers/isdn/hisax/hscx_irq.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/hscx_irq.c	Wed Jan  8 20:04:45 2003
@@ -12,13 +12,12 @@
  *
  */
 
-
-static inline void
-waitforCEC(struct IsdnCardState *cs, int hscx)
+static void
+waitforCEC(struct BCState *bcs)
 {
 	int to = 50;
 
-	while ((READHSCX(cs, hscx, HSCX_STAR) & 0x04) && to) {
+	while ((hscx_read(bcs, HSCX_STAR) & 0x04) && to) {
 		udelay(1);
 		to--;
 	}
@@ -28,11 +27,11 @@
 
 
 static inline void
-waitforXFW(struct IsdnCardState *cs, int hscx)
+waitforXFW(struct BCState *bcs)
 {
 	int to = 50;
 
-	while ((!(READHSCX(cs, hscx, HSCX_STAR) & 0x44) == 0x40) && to) {
+	while ((!(hscx_read(bcs, HSCX_STAR) & 0x44) == 0x40) && to) {
 		udelay(1);
 		to--;
 	}
@@ -41,17 +40,17 @@
 }
 
 static inline void
-WriteHSCXCMDR(struct IsdnCardState *cs, int hscx, u_char data)
+WriteHSCXCMDR(struct BCState *bcs, u8 data)
 {
-	waitforCEC(cs, hscx);
-	WRITEHSCX(cs, hscx, HSCX_CMDR, data);
+	waitforCEC(bcs);
+	hscx_write(bcs, HSCX_CMDR, data);
 }
 
 
 static void
 hscx_empty_fifo(struct BCState *bcs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 	struct IsdnCardState *cs = bcs->cs;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
@@ -60,14 +59,14 @@
 	if (bcs->hw.hscx.rcvidx + count > HSCX_BUFMAX) {
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "hscx_empty_fifo: incoming packet too large");
-		WriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x80);
+		WriteHSCXCMDR(bcs, 0x80);
 		bcs->hw.hscx.rcvidx = 0;
 		return;
 	}
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	bcs->hw.hscx.rcvidx += count;
-	READHSCXFIFO(cs, bcs->hw.hscx.hscx, ptr, count);
-	WriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x80);
+	hscx_read_fifo(bcs, ptr, count);
+	WriteHSCXCMDR(bcs, 0x80);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -78,13 +77,13 @@
 	}
 }
 
-static void
+void
 hscx_fill_fifo(struct BCState *bcs)
 {
 	struct IsdnCardState *cs = bcs->cs;
 	int more, count;
 	int fifo_size = test_bit(HW_IPAC, &cs->HW_Flags)? 64: 32;
-	u_char *ptr;
+	u8 *ptr;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "hscx_fill_fifo");
@@ -101,13 +100,13 @@
 	} else
 		count = bcs->tx_skb->len;
 
-	waitforXFW(cs, bcs->hw.hscx.hscx);
+	waitforXFW(bcs);
 	ptr = bcs->tx_skb->data;
 	skb_pull(bcs->tx_skb, count);
 	bcs->tx_cnt -= count;
 	bcs->count += count;
-	WRITEHSCXFIFO(cs, bcs->hw.hscx.hscx, ptr, count);
-	WriteHSCXCMDR(cs, bcs->hw.hscx.hscx, more ? 0x8 : 0xa);
+	hscx_write_fifo(bcs, ptr, count);
+	WriteHSCXCMDR(bcs, more ? 0x8 : 0xa);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -119,9 +118,9 @@
 }
 
 static inline void
-hscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
+hscx_interrupt(struct IsdnCardState *cs, u8 val, u8 hscx)
 {
-	u_char r;
+	u8 r;
 	struct BCState *bcs = cs->bcs + hscx;
 	struct sk_buff *skb;
 	int fifo_size = test_bit(HW_IPAC, &cs->HW_Flags)? 64: 32;
@@ -131,7 +130,7 @@
 		return;
 
 	if (val & 0x80) {	/* RME */
-		r = READHSCX(cs, hscx, HSCX_RSTA);
+		r = hscx_read(bcs, HSCX_RSTA);
 		if ((r & 0xf0) != 0xa0) {
 			if (!(r & 0x80)) {
 				if (cs->debug & L1_DEB_WARN)
@@ -155,9 +154,9 @@
 				bcs->err_crc++;
 #endif
 			}
-			WriteHSCXCMDR(cs, hscx, 0x80);
+			WriteHSCXCMDR(bcs, 0x80);
 		} else {
-			count = READHSCX(cs, hscx, HSCX_RBCL) & (
+			count = hscx_read(bcs, HSCX_RBCL) & (
 				test_bit(HW_IPAC, &cs->HW_Flags)? 0x3f: 0x1f);
 			if (count == 0)
 				count = fifo_size;
@@ -198,20 +197,20 @@
 static void
 reset_xmit(struct BCState *bcs)
 {
-	WriteHSCXCMDR(bcs->cs, bcs->hw.hscx.hscx, 0x01);
+	WriteHSCXCMDR(bcs, 0x01);
 }
 
-static inline void
-hscx_int_main(struct IsdnCardState *cs, u_char val)
+void
+hscx_int_main(struct IsdnCardState *cs, u8 val)
 {
 
-	u_char exval;
+	u8 exval;
 	struct BCState *bcs;
 
 	spin_lock(&cs->lock);
 	if (val & 0x01) {
 		bcs = cs->bcs + 1;
-		exval = READHSCX(cs, 1, HSCX_EXIR);
+		exval = hscx_read(bcs, HSCX_EXIR);
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX B EXIR %x", exval);
 		if (exval & 0x40) {
@@ -225,7 +224,7 @@
 	}
 	if (val & 0x02) {
 		bcs = cs->bcs;
-		exval = READHSCX(cs, 0, HSCX_EXIR);
+		exval = hscx_read(bcs, HSCX_EXIR);
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX A EXIR %x", exval);
 		if (exval & 0x40) {
@@ -233,7 +232,8 @@
 		}
 	}
 	if (val & 0x04) {
-		exval = READHSCX(cs, 0, HSCX_ISTA);
+		bcs = cs->bcs;
+		exval = hscx_read(bcs, HSCX_ISTA);
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX A interrupt %x", exval);
 		hscx_interrupt(cs, exval, 0);
diff -Nru a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c
--- a/drivers/isdn/hisax/icc.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/isdn/hisax/icc.c	Wed Jan  8 20:04:32 2003
@@ -25,6 +25,30 @@
 #define ARCOFI_USE 0
 static spinlock_t icc_lock = SPIN_LOCK_UNLOCKED;
 
+static inline u8
+icc_read_reg(struct IsdnCardState *cs, u8 addr)
+{
+	return cs->dc_hw_ops->read_reg(cs, addr);
+}
+
+static inline void
+icc_write_reg(struct IsdnCardState *cs, u8 addr, u8 val)
+{
+	cs->dc_hw_ops->write_reg(cs, addr, val);
+}
+
+static inline void
+icc_read_fifo(struct IsdnCardState *cs, u8 *p, int len)
+{
+	return cs->dc_hw_ops->read_fifo(cs, p, len);
+}
+
+static inline void
+icc_write_fifo(struct IsdnCardState *cs, u8 *p, int len)
+{
+	return cs->dc_hw_ops->write_fifo(cs, p, len);
+}
+
 static char *ICCVer[] __initdata =
 {"2070 A1/A3", "2070 B1", "2070 B2/B3", "2070 V2.4"};
 
@@ -33,7 +57,7 @@
 {
 	int val;
 
-	val = cs->readisac(cs, ICC_RBCH);
+	val = icc_read_reg(cs, ICC_RBCH);
 	printk(KERN_INFO "%s ICC version (%x): %s\n", s, val, ICCVer[(val >> 5) & 3]);
 }
 
@@ -42,7 +66,7 @@
 {
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "ph_command %x", command);
-	cs->writeisac(cs, ICC_CIX0, (command << 2) | 3);
+	icc_write_reg(cs, ICC_CIX0, (command << 2) | 3);
 }
 
 
@@ -113,7 +137,7 @@
 void
 icc_empty_fifo(struct IsdnCardState *cs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
@@ -123,15 +147,15 @@
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "icc_empty_fifo overrun %d",
 				cs->rcvidx + count);
-		cs->writeisac(cs, ICC_CMDR, 0x80);
+		icc_write_reg(cs, ICC_CMDR, 0x80);
 		cs->rcvidx = 0;
 		return;
 	}
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
 	spin_lock_irqsave(&icc_lock, flags);
-	cs->readisacfifo(cs, ptr, count);
-	cs->writeisac(cs, ICC_CMDR, 0x80);
+	icc_read_fifo(cs, ptr, count);
+	icc_write_reg(cs, ICC_CMDR, 0x80);
 	spin_unlock_irqrestore(&icc_lock, flags);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
@@ -154,8 +178,8 @@
 		return;
 
 	spin_lock_irqsave(&icc_lock, flags);
-	cs->writeisacfifo(cs, p, count);
-	cs->writeisac(cs, ICC_CMDR, more ? 0x8 : 0xa);
+	icc_write_fifo(cs, p, count);
+	icc_write_reg(cs, ICC_CMDR, more ? 0x8 : 0xa);
 	if (test_and_set_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
 		debugl1(cs, "icc_fill_fifo dbusytimer running");
 		del_timer(&cs->dbusytimer);
@@ -167,9 +191,9 @@
 }
 
 void
-icc_interrupt(struct IsdnCardState *cs, u_char val)
+icc_interrupt(struct IsdnCardState *cs, u8 val)
 {
-	u_char exval, v1;
+	u8 exval, v1;
 	struct sk_buff *skb;
 	unsigned int count;
 	unsigned long flags;
@@ -177,7 +201,7 @@
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "ICC interrupt %x", val);
 	if (val & 0x80) {	/* RME */
-		exval = cs->readisac(cs, ICC_RSTA);
+		exval = icc_read_reg(cs, ICC_RSTA);
 		if ((exval & 0x70) != 0x20) {
 			if (exval & 0x40) {
 				if (cs->debug & L1_DEB_WARN)
@@ -193,9 +217,9 @@
 				cs->err_crc++;
 #endif
 			}
-			cs->writeisac(cs, ICC_CMDR, 0x80);
+			icc_write_reg(cs, ICC_CMDR, 0x80);
 		} else {
-			count = cs->readisac(cs, ICC_RBCL) & 0x1f;
+			count = icc_read_reg(cs, ICC_RBCL) & 0x1f;
 			if (count == 0)
 				count = 32;
 			icc_empty_fifo(cs, count);
@@ -226,7 +250,7 @@
 		xmit_xpr_d(cs);
 	}
 	if (val & 0x04) {	/* CISQ */
-		exval = cs->readisac(cs, ICC_CIR0);
+		exval = icc_read_reg(cs, ICC_CIR0);
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ICC CIR0 %02X", exval );
 		if (exval & 2) {
@@ -236,7 +260,7 @@
 			sched_d_event(cs, D_L1STATECHANGE);
 		}
 		if (exval & 1) {
-			exval = cs->readisac(cs, ICC_CIR1);
+			exval = icc_read_reg(cs, ICC_CIR1);
 			if (cs->debug & L1_DEB_ISAC)
 				debugl1(cs, "ICC CIR1 %02X", exval );
 		}
@@ -247,7 +271,7 @@
 			debugl1(cs, "ICC SIN interrupt");
 	}
 	if (val & 0x01) {	/* EXI */
-		exval = cs->readisac(cs, ICC_EXIR);
+		exval = icc_read_reg(cs, ICC_EXIR);
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "ICC EXIR %02x", exval);
 		if (exval & 0x80) {  /* XMR */
@@ -258,7 +282,7 @@
 			xmit_xdu_d(cs, NULL);
 		}
 		if (exval & 0x04) {  /* MOS */
-			v1 = cs->readisac(cs, ICC_MOSR);
+			v1 = icc_read_reg(cs, ICC_MOSR);
 			if (cs->debug & L1_DEB_MONITOR)
 				debugl1(cs, "ICC MOSR %02x", v1);
 #if ARCOFI_USE
@@ -269,7 +293,7 @@
 							debugl1(cs, "ICC MON RX out of memory!");
 						cs->dc.icc.mocr &= 0xf0;
 						cs->dc.icc.mocr |= 0x0a;
-						cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+						icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 						goto afterMONR0;
 					} else
 						cs->dc.icc.mon_rxp = 0;
@@ -277,18 +301,18 @@
 				if (cs->dc.icc.mon_rxp >= MAX_MON_FRAME) {
 					cs->dc.icc.mocr &= 0xf0;
 					cs->dc.icc.mocr |= 0x0a;
-					cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+					icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 					cs->dc.icc.mon_rxp = 0;
 					if (cs->debug & L1_DEB_WARN)
 						debugl1(cs, "ICC MON RX overflow!");
 					goto afterMONR0;
 				}
-				cs->dc.icc.mon_rx[cs->dc.icc.mon_rxp++] = cs->readisac(cs, ICC_MOR0);
+				cs->dc.icc.mon_rx[cs->dc.icc.mon_rxp++] = icc_read_reg(cs, ICC_MOR0);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ICC MOR0 %02x", cs->dc.icc.mon_rx[cs->dc.icc.mon_rxp -1]);
 				if (cs->dc.icc.mon_rxp == 1) {
 					cs->dc.icc.mocr |= 0x04;
-					cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+					icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 				}
 			}
 		      afterMONR0:
@@ -299,7 +323,7 @@
 							debugl1(cs, "ICC MON RX out of memory!");
 						cs->dc.icc.mocr &= 0x0f;
 						cs->dc.icc.mocr |= 0xa0;
-						cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+						icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 						goto afterMONR1;
 					} else
 						cs->dc.icc.mon_rxp = 0;
@@ -307,31 +331,31 @@
 				if (cs->dc.icc.mon_rxp >= MAX_MON_FRAME) {
 					cs->dc.icc.mocr &= 0x0f;
 					cs->dc.icc.mocr |= 0xa0;
-					cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+					icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 					cs->dc.icc.mon_rxp = 0;
 					if (cs->debug & L1_DEB_WARN)
 						debugl1(cs, "ICC MON RX overflow!");
 					goto afterMONR1;
 				}
-				cs->dc.icc.mon_rx[cs->dc.icc.mon_rxp++] = cs->readisac(cs, ICC_MOR1);
+				cs->dc.icc.mon_rx[cs->dc.icc.mon_rxp++] = icc_read_reg(cs, ICC_MOR1);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ICC MOR1 %02x", cs->dc.icc.mon_rx[cs->dc.icc.mon_rxp -1]);
 				cs->dc.icc.mocr |= 0x40;
-				cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+				icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 			}
 		      afterMONR1:
 			if (v1 & 0x04) {
 				cs->dc.icc.mocr &= 0xf0;
-				cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+				icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 				cs->dc.icc.mocr |= 0x0a;
-				cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+				icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 				sched_d_event(cs, D_RX_MON0);
 			}
 			if (v1 & 0x40) {
 				cs->dc.icc.mocr &= 0x0f;
-				cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+				icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 				cs->dc.icc.mocr |= 0xa0;
-				cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+				icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 				sched_d_event(cs, D_RX_MON1);
 			}
 			if (v1 & 0x02) {
@@ -339,9 +363,9 @@
 					(cs->dc.icc.mon_txp >= cs->dc.icc.mon_txc) && 
 					!(v1 & 0x08))) {
 					cs->dc.icc.mocr &= 0xf0;
-					cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+					icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 					cs->dc.icc.mocr |= 0x0a;
-					cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+					icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 					if (cs->dc.icc.mon_txc &&
 						(cs->dc.icc.mon_txp >= cs->dc.icc.mon_txc))
 						sched_d_event(cs, D_TX_MON0);
@@ -351,7 +375,7 @@
 					sched_d_event(cs, D_TX_MON0);
 					goto AfterMOX0;
 				}
-				cs->writeisac(cs, ICC_MOX0,
+				icc_write_reg(cs, ICC_MOX0,
 					cs->dc.icc.mon_tx[cs->dc.icc.mon_txp++]);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ICC %02x -> MOX0", cs->dc.icc.mon_tx[cs->dc.icc.mon_txp -1]);
@@ -362,9 +386,9 @@
 					(cs->dc.icc.mon_txp >= cs->dc.icc.mon_txc) && 
 					!(v1 & 0x80))) {
 					cs->dc.icc.mocr &= 0x0f;
-					cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+					icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 					cs->dc.icc.mocr |= 0xa0;
-					cs->writeisac(cs, ICC_MOCR, cs->dc.icc.mocr);
+					icc_write_reg(cs, ICC_MOCR, cs->dc.icc.mocr);
 					if (cs->dc.icc.mon_txc &&
 						(cs->dc.icc.mon_txp >= cs->dc.icc.mon_txc))
 						sched_d_event(cs, D_TX_MON1);
@@ -374,7 +398,7 @@
 					sched_d_event(cs, D_TX_MON1);
 					goto AfterMOX1;
 				}
-				cs->writeisac(cs, ICC_MOX1,
+				icc_write_reg(cs, ICC_MOX1,
 					cs->dc.icc.mon_tx[cs->dc.icc.mon_txp++]);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ICC %02x -> MOX1", cs->dc.icc.mon_tx[cs->dc.icc.mon_txp -1]);
@@ -427,19 +451,19 @@
 			if (test_bit(HW_IOM1, &cs->HW_Flags)) {
 				/* IOM 1 Mode */
 				if (!val) {
-					cs->writeisac(cs, ICC_SPCR, 0xa);
-					cs->writeisac(cs, ICC_ADF1, 0x2);
+					icc_write_reg(cs, ICC_SPCR, 0xa);
+					icc_write_reg(cs, ICC_ADF1, 0x2);
 				} else {
-					cs->writeisac(cs, ICC_SPCR, val);
-					cs->writeisac(cs, ICC_ADF1, 0xa);
+					icc_write_reg(cs, ICC_SPCR, val);
+					icc_write_reg(cs, ICC_ADF1, 0xa);
 				}
 			} else {
 				/* IOM 2 Mode */
-				cs->writeisac(cs, ICC_SPCR, val);
+				icc_write_reg(cs, ICC_SPCR, val);
 				if (val)
-					cs->writeisac(cs, ICC_ADF1, 0x8);
+					icc_write_reg(cs, ICC_ADF1, 0x8);
 				else
-					cs->writeisac(cs, ICC_ADF1, 0x0);
+					icc_write_reg(cs, ICC_ADF1, 0x0);
 			}
 			break;
 		case (HW_DEACTIVATE | RESPONSE):
@@ -486,8 +510,8 @@
 	int	rbch, star;
 
 	if (test_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
-		rbch = cs->readisac(cs, ICC_RBCH);
-		star = cs->readisac(cs, ICC_STAR);
+		rbch = icc_read_reg(cs, ICC_RBCH);
+		star = icc_read_reg(cs, ICC_STAR);
 		if (cs->debug) 
 			debugl1(cs, "D-Channel Busy RBCH %02x STAR %02x",
 				rbch, star);
@@ -509,7 +533,7 @@
 				printk(KERN_WARNING "HiSax: ICC D-Channel Busy no skb\n");
 				debugl1(cs, "D-Channel Busy no skb");
 			}
-			cs->writeisac(cs, ICC_CMDR, 0x01); /* Transmitter reset */
+			icc_write_reg(cs, ICC_CMDR, 0x01); /* Transmitter reset */
 			cs->irq_func(cs->irq, cs, NULL);
 		}
 	}
@@ -530,46 +554,46 @@
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
 
-	val = cs->readisac(cs, ICC_STAR);
+	val = icc_read_reg(cs, ICC_STAR);
 	debugl1(cs, "ICC STAR %x", val);
-	val = cs->readisac(cs, ICC_MODE);
+	val = icc_read_reg(cs, ICC_MODE);
 	debugl1(cs, "ICC MODE %x", val);
-	val = cs->readisac(cs, ICC_ADF2);
+	val = icc_read_reg(cs, ICC_ADF2);
 	debugl1(cs, "ICC ADF2 %x", val);
-	val = cs->readisac(cs, ICC_ISTA);
+	val = icc_read_reg(cs, ICC_ISTA);
 	debugl1(cs, "ICC ISTA %x", val);
 	if (val & 0x01) {
-		eval = cs->readisac(cs, ICC_EXIR);
+		eval = icc_read_reg(cs, ICC_EXIR);
 		debugl1(cs, "ICC EXIR %x", eval);
 	}
-	val = cs->readisac(cs, ICC_CIR0);
+	val = icc_read_reg(cs, ICC_CIR0);
 	debugl1(cs, "ICC CIR0 %x", val);
 	cs->dc.icc.ph_state = (val >> 2) & 0xf;
 	sched_d_event(cs, D_L1STATECHANGE);
 	/* Disable all IRQ */
-	cs->writeisac(cs, ICC_MASK, 0xFF);
+	icc_write_reg(cs, ICC_MASK, 0xFF);
 
   	cs->dc.icc.mocr = 0xaa;
 	if (test_bit(HW_IOM1, &cs->HW_Flags)) {
 		/* IOM 1 Mode */
-		cs->writeisac(cs, ICC_ADF2, 0x0);
-		cs->writeisac(cs, ICC_SPCR, 0xa);
-		cs->writeisac(cs, ICC_ADF1, 0x2);
-		cs->writeisac(cs, ICC_STCR, 0x70);
-		cs->writeisac(cs, ICC_MODE, 0xc9);
+		icc_write_reg(cs, ICC_ADF2, 0x0);
+		icc_write_reg(cs, ICC_SPCR, 0xa);
+		icc_write_reg(cs, ICC_ADF1, 0x2);
+		icc_write_reg(cs, ICC_STCR, 0x70);
+		icc_write_reg(cs, ICC_MODE, 0xc9);
 	} else {
 		/* IOM 2 Mode */
 		if (!cs->dc.icc.adf2)
 			cs->dc.icc.adf2 = 0x80;
-		cs->writeisac(cs, ICC_ADF2, cs->dc.icc.adf2);
-		cs->writeisac(cs, ICC_SQXR, 0xa0);
-		cs->writeisac(cs, ICC_SPCR, 0x20);
-		cs->writeisac(cs, ICC_STCR, 0x70);
-		cs->writeisac(cs, ICC_MODE, 0xca);
-		cs->writeisac(cs, ICC_TIMR, 0x00);
-		cs->writeisac(cs, ICC_ADF1, 0x20);
+		icc_write_reg(cs, ICC_ADF2, cs->dc.icc.adf2);
+		icc_write_reg(cs, ICC_SQXR, 0xa0);
+		icc_write_reg(cs, ICC_SPCR, 0x20);
+		icc_write_reg(cs, ICC_STCR, 0x70);
+		icc_write_reg(cs, ICC_MODE, 0xca);
+		icc_write_reg(cs, ICC_TIMR, 0x00);
+		icc_write_reg(cs, ICC_ADF1, 0x20);
 	}
 	ph_command(cs, ICC_CMD_RES);
-	cs->writeisac(cs, ICC_MASK, 0x0);
+	icc_write_reg(cs, ICC_MASK, 0x0);
 	ph_command(cs, ICC_CMD_DI);
 }
diff -Nru a/drivers/isdn/hisax/icc.h b/drivers/isdn/hisax/icc.h
--- a/drivers/isdn/hisax/icc.h	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/icc.h	Wed Jan  8 20:04:45 2003
@@ -67,4 +67,4 @@
 
 extern void ICCVersion(struct IsdnCardState *cs, char *s);
 extern void initicc(struct IsdnCardState *cs);
-extern void icc_interrupt(struct IsdnCardState *cs, u_char val);
+extern void icc_interrupt(struct IsdnCardState *cs, u8 val);
diff -Nru a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
--- a/drivers/isdn/hisax/ipacx.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/ipacx.c	Wed Jan  8 20:04:44 2003
@@ -45,7 +45,7 @@
 static void __devinit dch_init(struct IsdnCardState *cs);
 static void bch_l2l1(struct PStack *st, int pr, void *arg);
 static void bch_empty_fifo(struct BCState *bcs, int count);
-static void bch_int(struct IsdnCardState *cs, u_char hscx);
+static void bch_int(struct IsdnCardState *cs, u8 hscx);
 static void bch_mode(struct BCState *bcs, int mode, int bc);
 static void bch_close_state(struct BCState *bcs);
 static int bch_open_state(struct IsdnCardState *cs, struct BCState *bcs);
@@ -53,6 +53,47 @@
 static void __devinit bch_init(struct IsdnCardState *cs, int hscx);
 static void __init clear_pending_ints(struct IsdnCardState *cs);
 
+static inline u8
+ipacx_bc_read_reg(struct BCState *bcs, u8 addr)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	return cs->bc_hw_ops->read_reg(cs, hscx, addr);
+}
+
+static inline void
+ipacx_bc_write_reg(struct BCState *bcs, u8 addr, u8 val)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	cs->bc_hw_ops->write_reg(cs, hscx, addr, val);
+}
+
+static inline u8
+ipacx_read_reg(struct IsdnCardState *cs, u8 addr)
+{
+	return cs->dc_hw_ops->read_reg(cs, addr);
+}
+
+static inline void
+ipacx_write_reg(struct IsdnCardState *cs, u8 addr, u8 val)
+{
+	cs->dc_hw_ops->write_reg(cs, addr, val);
+}
+
+static inline void
+ipacx_read_fifo(struct IsdnCardState *cs, u8 *p, int len)
+{
+	return cs->dc_hw_ops->read_fifo(cs, p, len);
+}
+
+static inline void
+ipacx_write_fifo(struct IsdnCardState *cs, u8 *p, int len)
+{
+	return cs->dc_hw_ops->write_fifo(cs, p, len);
+}
 //----------------------------------------------------------
 // Issue Layer 1 command to chip
 //----------------------------------------------------------
@@ -62,7 +103,7 @@
 	if (cs->debug &L1_DEB_ISAC)
 		debugl1(cs, "ph_command (%#x) in (%#x)", command,
 			cs->dc.isac.ph_state);
-	cs->writeisac(cs, IPACX_CIX0, (command << 4) | 0x0E);
+	ipacx_write_reg(cs, IPACX_CIX0, (command << 4) | 0x0E);
 }
 
 //----------------------------------------------------------
@@ -71,9 +112,9 @@
 static inline void 
 cic_int(struct IsdnCardState *cs)
 {
-	u_char event;
+	u8 event;
 
-	event = cs->readisac(cs, IPACX_CIR0) >> 4;
+	event = ipacx_read_reg(cs, IPACX_CIR0) >> 4;
 	if (cs->debug &L1_DEB_ISAC) debugl1(cs, "cic_int(event=%#x)", event);
 	cs->dc.isac.ph_state = event;
 	sched_d_event(cs, D_L1STATECHANGE);
@@ -91,7 +132,7 @@
 {
 	struct IsdnCardState *cs = (struct IsdnCardState *) st->l1.hardware;
 	struct sk_buff *skb = arg;
-  u_char cda1_cr, cda2_cr;
+  u8 cda1_cr, cda2_cr;
 
 	switch (pr) {
 		case (PH_DATA |REQUEST):
@@ -113,21 +154,21 @@
 			break;
 
 		case (HW_TESTLOOP | REQUEST):
-      cs->writeisac(cs, IPACX_CDA_TSDP10, 0x80); // Timeslot 0 is B1
-      cs->writeisac(cs, IPACX_CDA_TSDP11, 0x81); // Timeslot 0 is B1
-      cda1_cr = cs->readisac(cs, IPACX_CDA1_CR);
-      cda2_cr = cs->readisac(cs, IPACX_CDA2_CR);
+      ipacx_write_reg(cs, IPACX_CDA_TSDP10, 0x80); // Timeslot 0 is B1
+      ipacx_write_reg(cs, IPACX_CDA_TSDP11, 0x81); // Timeslot 0 is B1
+      cda1_cr = ipacx_read_reg(cs, IPACX_CDA1_CR);
+      cda2_cr = ipacx_read_reg(cs, IPACX_CDA2_CR);
 			if ((long)arg &1) { // loop B1
-        cs->writeisac(cs, IPACX_CDA1_CR, cda1_cr |0x0a); 
+        ipacx_write_reg(cs, IPACX_CDA1_CR, cda1_cr |0x0a); 
       }
       else {  // B1 off
-        cs->writeisac(cs, IPACX_CDA1_CR, cda1_cr &~0x0a); 
+        ipacx_write_reg(cs, IPACX_CDA1_CR, cda1_cr &~0x0a); 
       }
 			if ((long)arg &2) { // loop B2
-        cs->writeisac(cs, IPACX_CDA1_CR, cda1_cr |0x14); 
+        ipacx_write_reg(cs, IPACX_CDA1_CR, cda1_cr |0x14); 
       }
       else {  // B2 off
-        cs->writeisac(cs, IPACX_CDA1_CR, cda1_cr &~0x14); 
+        ipacx_write_reg(cs, IPACX_CDA1_CR, cda1_cr &~0x14); 
       }
 			break;
 
@@ -157,8 +198,8 @@
 	int	rbchd, stard;
 
 	if (test_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
-		rbchd = cs->readisac(cs, IPACX_RBCHD);
-		stard = cs->readisac(cs, IPACX_STARD);
+		rbchd = ipacx_read_reg(cs, IPACX_RBCHD);
+		stard = ipacx_read_reg(cs, IPACX_STARD);
 		if (cs->debug) 
       debugl1(cs, "D-Channel Busy RBCHD %02x STARD %02x", rbchd, stard);
 		if (!(stard &0x40)) { // D-Channel Busy
@@ -177,7 +218,7 @@
 				printk(KERN_WARNING "HiSax: ISAC D-Channel Busy no skb\n");
 				debugl1(cs, "D-Channel Busy no skb");
 			}
-			cs->writeisac(cs, IPACX_CMDRD, 0x01); // Tx reset, generates XPR
+			ipacx_write_reg(cs, IPACX_CMDRD, 0x01); // Tx reset, generates XPR
 		}
 	}
 }
@@ -264,7 +305,7 @@
 static void 
 dch_empty_fifo(struct IsdnCardState *cs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 
 	if ((cs->debug &L1_DEB_ISAC) && !(cs->debug &L1_DEB_ISAC_FIFO))
 		debugl1(cs, "dch_empty_fifo()");
@@ -273,7 +314,7 @@
 	if ((cs->rcvidx + count) >= MAX_DFRAME_LEN_L1) {
 		if (cs->debug &L1_DEB_WARN)
 			debugl1(cs, "dch_empty_fifo() incoming message too large");
-	  cs->writeisac(cs, IPACX_CMDRD, 0x80); // RMC
+	  ipacx_write_reg(cs, IPACX_CMDRD, 0x80); // RMC
 		cs->rcvidx = 0;
 		return;
 	}
@@ -281,8 +322,8 @@
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
   
-	cs->readisacfifo(cs, ptr, count);
-	cs->writeisac(cs, IPACX_CMDRD, 0x80); // RMC
+	ipacx_read_fifo(cs, ptr, count);
+	ipacx_write_reg(cs, IPACX_CMDRD, 0x80); // RMC
   
 	if (cs->debug &L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
@@ -312,8 +353,8 @@
 		cmd   = 0x0A; // XTF | XME
 	}
   
-	cs->writeisacfifo(cs, p, count);
-	cs->writeisac(cs, IPACX_CMDRD, cmd);
+	ipacx_write_fifo(cs, p, count);
+	ipacx_write_reg(cs, IPACX_CMDRD, cmd);
   
   // set timeout for transmission contol
 	if (test_and_set_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
@@ -332,13 +373,13 @@
 dch_int(struct IsdnCardState *cs)
 {
 	struct sk_buff *skb;
-	u_char istad, rstad;
+	u8 istad, rstad;
 	int count;
 
-	istad = cs->readisac(cs, IPACX_ISTAD);
+	istad = ipacx_read_reg(cs, IPACX_ISTAD);
   
 	if (istad &0x80) {  // RME
-	  rstad = cs->readisac(cs, IPACX_RSTAD);
+	  rstad = ipacx_read_reg(cs, IPACX_RSTAD);
 		if ((rstad &0xf0) != 0xa0) { // !(VFR && !RDO && CRC && !RAB)
 			if (!(rstad &0x80))
 				if (cs->debug &L1_DEB_WARN) 
@@ -349,9 +390,9 @@
 			if (!(rstad &0x20))
 				if (cs->debug &L1_DEB_WARN) 
           debugl1(cs, "dch_int(): CRC error");
-	    cs->writeisac(cs, IPACX_CMDRD, 0x80);  // RMC
+	    ipacx_write_reg(cs, IPACX_CMDRD, 0x80);  // RMC
 		} else {  // received frame ok
-			count = cs->readisac(cs, IPACX_RBCLD);
+			count = ipacx_read_reg(cs, IPACX_RBCLD);
       if (count) count--; // RSTAB is last byte
 			count &= D_FIFO_SIZE-1;
 			if (count == 0) count = D_FIFO_SIZE;
@@ -376,7 +417,7 @@
 
 	if (istad &0x20) {  // RFO
 		if (cs->debug &L1_DEB_WARN) debugl1(cs, "dch_int(): RFO");
-	  cs->writeisac(cs, IPACX_CMDRD, 0x40); //RRES
+	  ipacx_write_reg(cs, IPACX_CMDRD, 0x40); //RRES
 	}
   
 	if (istad &0x10) {  // XPR
@@ -410,10 +451,10 @@
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
 
-  cs->writeisac(cs, IPACX_TR_CONF0, 0x00);  // clear LDD
-  cs->writeisac(cs, IPACX_TR_CONF2, 0x00);  // enable transmitter
-  cs->writeisac(cs, IPACX_MODED,    0xC9);  // transparent mode 0, RAC, stop/go
-  cs->writeisac(cs, IPACX_MON_CR,   0x00);  // disable monitor channel
+  ipacx_write_reg(cs, IPACX_TR_CONF0, 0x00);  // clear LDD
+  ipacx_write_reg(cs, IPACX_TR_CONF2, 0x00);  // enable transmitter
+  ipacx_write_reg(cs, IPACX_MODED,    0xC9);  // transparent mode 0, RAC, stop/go
+  ipacx_write_reg(cs, IPACX_MON_CR,   0x00);  // disable monitor channel
 }
 
 
@@ -462,7 +503,7 @@
 static void
 bch_empty_fifo(struct BCState *bcs, int count)
 {
-	u_char *ptr, hscx;
+	u8 *ptr, hscx;
 	struct IsdnCardState *cs;
 	int cnt;
 
@@ -475,7 +516,7 @@
 	if (bcs->hw.hscx.rcvidx + count > HSCX_BUFMAX) {
 		if (cs->debug &L1_DEB_WARN)
 			debugl1(cs, "bch_empty_fifo() incoming packet too large");
-	  cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, 0x80);  // RMC
+	  ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x80);  // RMC
 		bcs->hw.hscx.rcvidx = 0;
 		return;
 	}
@@ -483,8 +524,8 @@
   // Read data uninterruptible
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	cnt = count;
-	while (cnt--) *ptr++ = cs->BC_Read_Reg(cs, hscx, IPACX_RFIFOB); 
-	cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, 0x80);  // RMC
+	while (cnt--) *ptr++ = ipacx_bc_read_reg(bcs, IPACX_RFIFOB); 
+	ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x80);  // RMC
   
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	bcs->hw.hscx.rcvidx += count;
@@ -504,9 +545,7 @@
 void
 ipacx_fill_fifo(struct BCState *bcs)
 {
-	struct IsdnCardState *cs = bcs->cs;
 	int more, count;
-	unsigned char hscx = bcs->hw.hscx.hscx;
 	unsigned char *p;
 
 	p = xmit_fill_fifo_b(bcs, B_FIFO_SIZE, &count, &more);
@@ -514,9 +553,9 @@
 		return;
 
 	while (count--)
-		cs->BC_Write_Reg(cs, hscx, IPACX_XFIFOB, *p++); 
+		ipacx_bc_write_reg(bcs, IPACX_XFIFOB, *p++); 
 
-	cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, (more ? 0x08 : 0x0a));
+	ipacx_bc_write_reg(bcs, IPACX_CMDRB, (more ? 0x08 : 0x0a));
 }
 
 //----------------------------------------------------------
@@ -526,24 +565,24 @@
 static void
 reset_xmit(struct BCState *bcs)
 {
-	bcs->cs->BC_Write_Reg(bcs->cs, bcs->hw.hscx.hscx, IPACX_CMDRB, 0x01);  // XRES
+	ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x01);  // XRES
 }
 
 static void
-bch_int(struct IsdnCardState *cs, u_char hscx)
+bch_int(struct IsdnCardState *cs, u8 hscx)
 {
-	u_char istab;
+	u8 istab;
 	struct BCState *bcs;
 	struct sk_buff *skb;
 	int count;
-	u_char rstab;
+	u8 rstab;
 
 	bcs = cs->bcs + hscx;
-	istab = cs->BC_Read_Reg(cs, hscx, IPACX_ISTAB);
+	istab = ipacx_bc_read_reg(bcs, IPACX_ISTAB);
 	if (!test_bit(BC_FLG_INIT, &bcs->Flag)) return;
 
 	if (istab &0x80) {	// RME
-		rstab = cs->BC_Read_Reg(cs, hscx, IPACX_RSTAB);
+		rstab = ipacx_bc_read_reg(bcs, IPACX_RSTAB);
 		if ((rstab &0xf0) != 0xa0) { // !(VFR && !RDO && CRC && !RAB)
 			if (!(rstab &0x80))
 				if (cs->debug &L1_DEB_WARN) 
@@ -554,10 +593,10 @@
 			if (!(rstab &0x20))
 				if (cs->debug &L1_DEB_WARN) 
           debugl1(cs, "bch_int() B-%d: CRC error", hscx);
-	    cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, 0x80);  // RMC
+	    ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x80);  // RMC
 		} 
     else {  // received frame ok
-			count = cs->BC_Read_Reg(cs, hscx, IPACX_RBCLB) &(B_FIFO_SIZE-1);
+			count = ipacx_bc_read_reg(bcs, IPACX_RBCLB) &(B_FIFO_SIZE-1);
 			if (count == 0) count = B_FIFO_SIZE;
 			bch_empty_fifo(bcs, count);
 			if ((count = bcs->hw.hscx.rcvidx - 1) > 0) {
@@ -594,7 +633,7 @@
 	if (istab &0x20) {	// RFO
 		if (cs->debug &L1_DEB_WARN) 
 			debugl1(cs, "bch_int() B-%d: RFO error", hscx);
-		cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, 0x40);  // RRES
+		ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x40);  // RRES
 	}
 
 	if (istab &0x10) {	// XPR
@@ -623,33 +662,33 @@
   // map controller to according timeslot
   if (!hscx)
   {
-    cs->writeisac(cs, IPACX_BCHA_TSDP_BC1, 0x80 | bc);
-    cs->writeisac(cs, IPACX_BCHA_CR,       0x88); 
+    ipacx_write_reg(cs, IPACX_BCHA_TSDP_BC1, 0x80 | bc);
+    ipacx_write_reg(cs, IPACX_BCHA_CR,       0x88); 
   }
   else
   {
-    cs->writeisac(cs, IPACX_BCHB_TSDP_BC1, 0x80 | bc);
-    cs->writeisac(cs, IPACX_BCHB_CR,       0x88); 
+    ipacx_write_reg(cs, IPACX_BCHB_TSDP_BC1, 0x80 | bc);
+    ipacx_write_reg(cs, IPACX_BCHB_CR,       0x88); 
   }
 
 	switch (mode) {
 		case (L1_MODE_NULL):
-		    cs->BC_Write_Reg(cs, hscx, IPACX_MODEB, 0xC0);  // rec off
-		    cs->BC_Write_Reg(cs, hscx, IPACX_EXMB,  0x30);  // std adj.
-		    cs->BC_Write_Reg(cs, hscx, IPACX_MASKB, 0xFF);  // ints off
-		    cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, 0x41);  // validate adjustments
+		    ipacx_bc_write_reg(bcs, IPACX_MODEB, 0xC0);  // rec off
+		    ipacx_bc_write_reg(bcs, IPACX_EXMB,  0x30);  // std adj.
+		    ipacx_bc_write_reg(bcs, IPACX_MASKB, 0xFF);  // ints off
+		    ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x41);  // validate adjustments
 		    break;
 		case (L1_MODE_TRANS):
-		    cs->BC_Write_Reg(cs, hscx, IPACX_MODEB, 0x88);  // ext transp mode
-		    cs->BC_Write_Reg(cs, hscx, IPACX_EXMB,  0x00);  // xxx00000
-		    cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, 0x41);  // validate adjustments
-		    cs->BC_Write_Reg(cs, hscx, IPACX_MASKB, _MASKB_IMASK);
+		    ipacx_bc_write_reg(bcs, IPACX_MODEB, 0x88);  // ext transp mode
+		    ipacx_bc_write_reg(bcs, IPACX_EXMB,  0x00);  // xxx00000
+		    ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x41);  // validate adjustments
+		    ipacx_bc_write_reg(bcs, IPACX_MASKB, _MASKB_IMASK);
 		    break;
 		case (L1_MODE_HDLC):
-		    cs->BC_Write_Reg(cs, hscx, IPACX_MODEB, 0xC8);  // transp mode 0
-		    cs->BC_Write_Reg(cs, hscx, IPACX_EXMB,  0x01);  // idle=hdlc flags crc enabled
-		    cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, 0x41);  // validate adjustments
-		    cs->BC_Write_Reg(cs, hscx, IPACX_MASKB, _MASKB_IMASK);
+		    ipacx_bc_write_reg(bcs, IPACX_MODEB, 0xC8);  // transp mode 0
+		    ipacx_bc_write_reg(bcs, IPACX_EXMB,  0x01);  // idle=hdlc flags crc enabled
+		    ipacx_bc_write_reg(bcs, IPACX_CMDRB, 0x41);  // validate adjustments
+		    ipacx_bc_write_reg(bcs, IPACX_MASKB, _MASKB_IMASK);
 		    break;
 	}
 }
@@ -748,10 +787,10 @@
 void 
 interrupt_ipacx(struct IsdnCardState *cs)
 {
-	u_char ista;
+	u8 ista;
 	
 	spin_lock(&cs->lock);
-	while ((ista = cs->readisac(cs, IPACX_ISTA))) {
+	while ((ista = ipacx_read_reg(cs, IPACX_ISTA))) {
 		if (ista &0x80) bch_int(cs, 0); // B channel interrupts
 		if (ista &0x40) bch_int(cs, 1);
 		if (ista &0x01) dch_int(cs);    // D channel
@@ -769,18 +808,22 @@
 	int ista;
 
   // all interrupts off
-  cs->writeisac(cs, IPACX_MASK, 0xff);
-	cs->writeisac(cs, IPACX_MASKD, 0xff);
-	cs->BC_Write_Reg(cs, 0, IPACX_MASKB, 0xff);
-	cs->BC_Write_Reg(cs, 1, IPACX_MASKB, 0xff);
-  
-  ista = cs->readisac(cs, IPACX_ISTA); 
-  if (ista &0x80) cs->BC_Read_Reg(cs, 0, IPACX_ISTAB);
-  if (ista &0x40) cs->BC_Read_Reg(cs, 1, IPACX_ISTAB);
-  if (ista &0x10) cs->readisac(cs, IPACX_CIR0);
-  if (ista &0x01) cs->readisac(cs, IPACX_ISTAD); 
+  ipacx_write_reg(cs, IPACX_MASK, 0xff);
+  ipacx_write_reg(cs, IPACX_MASKD, 0xff);
+  cs->bc_hw_ops->write_reg(cs, 0, IPACX_MASKB, 0xff);
+  cs->bc_hw_ops->write_reg(cs, 1, IPACX_MASKB, 0xff);
+  
+  ista = ipacx_read_reg(cs, IPACX_ISTA); 
+  if (ista &0x80) cs->bc_hw_ops->read_reg(cs, 0, IPACX_ISTAB);
+  if (ista &0x40) cs->bc_hw_ops->read_reg(cs, 1, IPACX_ISTAB);
+  if (ista &0x10) ipacx_read_reg(cs, IPACX_CIR0);
+  if (ista &0x01) ipacx_read_reg(cs, IPACX_ISTAD); 
 }
 
+static struct bc_l1_ops ipacx_bc_l1_ops = {
+	.fill_fifo = ipacx_fill_fifo,
+};
+
 //----------------------------------------------------------
 // Does chip configuration work
 // Work to do depends on bit mask in part
@@ -789,22 +832,23 @@
 init_ipacx(struct IsdnCardState *cs, int part)
 {
 	if (part &1) {  // initialise chip
+		cs->bc_l1_ops = &ipacx_bc_l1_ops;
 		clear_pending_ints(cs);
 		bch_init(cs, 0);
 		bch_init(cs, 1);
 		dch_init(cs);
 	}
 	if (part &2) {  // reenable all interrupts and start chip
-		cs->BC_Write_Reg(cs, 0, IPACX_MASKB, _MASKB_IMASK);
-		cs->BC_Write_Reg(cs, 1, IPACX_MASKB, _MASKB_IMASK);
-		cs->writeisac(cs, IPACX_MASKD, _MASKD_IMASK);
-		cs->writeisac(cs, IPACX_MASK, _MASK_IMASK); // global mask register
+		cs->bc_hw_ops->write_reg(cs, 0, IPACX_MASKB, _MASKB_IMASK);
+		cs->bc_hw_ops->write_reg(cs, 1, IPACX_MASKB, _MASKB_IMASK);
+		ipacx_write_reg(cs, IPACX_MASKD, _MASKD_IMASK);
+		ipacx_write_reg(cs, IPACX_MASK, _MASK_IMASK); // global mask register
 
     // reset HDLC Transmitters/receivers
-		cs->writeisac(cs, IPACX_CMDRD, 0x41); 
-    cs->BC_Write_Reg(cs, 0, IPACX_CMDRB, 0x41);
-    cs->BC_Write_Reg(cs, 1, IPACX_CMDRB, 0x41);
-  	ph_command(cs, IPACX_CMD_RES);
+		ipacx_write_reg(cs, IPACX_CMDRD, 0x41); 
+		cs->bc_hw_ops->write_reg(cs, 0, IPACX_CMDRB, 0x41);
+		cs->bc_hw_ops->write_reg(cs, 1, IPACX_CMDRB, 0x41);
+		ph_command(cs, IPACX_CMD_RES);
 	}
 }
 
diff -Nru a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
--- a/drivers/isdn/hisax/isac.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/isac.c	Wed Jan  8 20:04:43 2003
@@ -27,12 +27,36 @@
 {"2086/2186 V1.1", "2085 B1", "2085 B2",
  "2085 V2.3"};
 
+static inline u8
+isac_read(struct IsdnCardState *cs, u8 addr)
+{
+	return cs->dc_hw_ops->read_reg(cs, addr);
+}
+
+static inline void
+isac_write(struct IsdnCardState *cs, u8 addr, u8 val)
+{
+	cs->dc_hw_ops->write_reg(cs, addr, val);
+}
+
+static inline void
+isac_read_fifo(struct IsdnCardState *cs, u8 *p, int len)
+{
+	return cs->dc_hw_ops->read_fifo(cs, p, len);
+}
+
+static inline void
+isac_write_fifo(struct IsdnCardState *cs, u8 *p, int len)
+{
+	return cs->dc_hw_ops->write_fifo(cs, p, len);
+}
+
 void
 ISACVersion(struct IsdnCardState *cs, char *s)
 {
 	int val;
 
-	val = cs->readisac(cs, ISAC_RBCH);
+	val = isac_read(cs, ISAC_RBCH);
 	printk(KERN_INFO "%s ISAC version (%x): %s\n", s, val, ISACVer[(val >> 5) & 3]);
 }
 
@@ -41,7 +65,7 @@
 {
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "ph_command %x", command);
-	cs->writeisac(cs, ISAC_CIX0, (command << 2) | 3);
+	isac_write(cs, ISAC_CIX0, (command << 2) | 3);
 }
 
 
@@ -116,7 +140,7 @@
 void
 isac_empty_fifo(struct IsdnCardState *cs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "isac_empty_fifo");
@@ -125,14 +149,14 @@
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "isac_empty_fifo overrun %d",
 				cs->rcvidx + count);
-		cs->writeisac(cs, ISAC_CMDR, 0x80);
+		isac_write(cs, ISAC_CMDR, 0x80);
 		cs->rcvidx = 0;
 		return;
 	}
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
-	cs->readisacfifo(cs, ptr, count);
-	cs->writeisac(cs, ISAC_CMDR, 0x80);
+	isac_read_fifo(cs, ptr, count);
+	isac_write(cs, ISAC_CMDR, 0x80);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
 
@@ -152,8 +176,8 @@
 	if (!p)
 		return;
 
-	cs->writeisacfifo(cs, p, count);
-	cs->writeisac(cs, ISAC_CMDR, more ? 0x8 : 0xa);
+	isac_write_fifo(cs, p, count);
+	isac_write(cs, ISAC_CMDR, more ? 0x8 : 0xa);
 	if (test_and_set_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
 		debugl1(cs, "isac_fill_fifo dbusytimer running");
 		del_timer(&cs->dbusytimer);
@@ -164,16 +188,16 @@
 }
 
 void
-isac_interrupt(struct IsdnCardState *cs, u_char val)
+isac_interrupt(struct IsdnCardState *cs, u8 val)
 {
-	u_char exval, v1;
+	u8 exval, v1;
 	struct sk_buff *skb;
 	unsigned int count;
 
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "ISAC interrupt %x", val);
 	if (val & 0x80) {	/* RME */
-		exval = cs->readisac(cs, ISAC_RSTA);
+		exval = isac_read(cs, ISAC_RSTA);
 		if ((exval & 0x70) != 0x20) {
 			if (exval & 0x40) {
 				if (cs->debug & L1_DEB_WARN)
@@ -189,9 +213,9 @@
 				cs->err_crc++;
 #endif
 			}
-			cs->writeisac(cs, ISAC_CMDR, 0x80);
+			isac_write(cs, ISAC_CMDR, 0x80);
 		} else {
-			count = cs->readisac(cs, ISAC_RBCL) & 0x1f;
+			count = isac_read(cs, ISAC_RBCL) & 0x1f;
 			if (count == 0)
 				count = 32;
 			isac_empty_fifo(cs, count);
@@ -220,7 +244,7 @@
 		xmit_xpr_d(cs);
 	}
 	if (val & 0x04) {	/* CISQ */
-		exval = cs->readisac(cs, ISAC_CIR0);
+		exval = isac_read(cs, ISAC_CIR0);
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC CIR0 %02X", exval );
 		if (exval & 2) {
@@ -230,7 +254,7 @@
 			sched_d_event(cs, D_L1STATECHANGE);
 		}
 		if (exval & 1) {
-			exval = cs->readisac(cs, ISAC_CIR1);
+			exval = isac_read(cs, ISAC_CIR1);
 			if (cs->debug & L1_DEB_ISAC)
 				debugl1(cs, "ISAC CIR1 %02X", exval );
 		}
@@ -241,7 +265,7 @@
 			debugl1(cs, "ISAC SIN interrupt");
 	}
 	if (val & 0x01) {	/* EXI */
-		exval = cs->readisac(cs, ISAC_EXIR);
+		exval = isac_read(cs, ISAC_EXIR);
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "ISAC EXIR %02x", exval);
 		if (exval & 0x80) {  /* XMR */
@@ -252,7 +276,7 @@
 			xmit_xdu_d(cs, NULL);
 		}
 		if (exval & 0x04) {  /* MOS */
-			v1 = cs->readisac(cs, ISAC_MOSR);
+			v1 = isac_read(cs, ISAC_MOSR);
 			if (cs->debug & L1_DEB_MONITOR)
 				debugl1(cs, "ISAC MOSR %02x", v1);
 #if ARCOFI_USE
@@ -263,7 +287,7 @@
 							debugl1(cs, "ISAC MON RX out of memory!");
 						cs->dc.isac.mocr &= 0xf0;
 						cs->dc.isac.mocr |= 0x0a;
-						cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+						isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 						goto afterMONR0;
 					} else
 						cs->dc.isac.mon_rxp = 0;
@@ -271,18 +295,18 @@
 				if (cs->dc.isac.mon_rxp >= MAX_MON_FRAME) {
 					cs->dc.isac.mocr &= 0xf0;
 					cs->dc.isac.mocr |= 0x0a;
-					cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+					isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 					cs->dc.isac.mon_rxp = 0;
 					if (cs->debug & L1_DEB_WARN)
 						debugl1(cs, "ISAC MON RX overflow!");
 					goto afterMONR0;
 				}
-				cs->dc.isac.mon_rx[cs->dc.isac.mon_rxp++] = cs->readisac(cs, ISAC_MOR0);
+				cs->dc.isac.mon_rx[cs->dc.isac.mon_rxp++] = isac_read(cs, ISAC_MOR0);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ISAC MOR0 %02x", cs->dc.isac.mon_rx[cs->dc.isac.mon_rxp -1]);
 				if (cs->dc.isac.mon_rxp == 1) {
 					cs->dc.isac.mocr |= 0x04;
-					cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+					isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 				}
 			}
 		      afterMONR0:
@@ -293,7 +317,7 @@
 							debugl1(cs, "ISAC MON RX out of memory!");
 						cs->dc.isac.mocr &= 0x0f;
 						cs->dc.isac.mocr |= 0xa0;
-						cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+						isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 						goto afterMONR1;
 					} else
 						cs->dc.isac.mon_rxp = 0;
@@ -301,31 +325,31 @@
 				if (cs->dc.isac.mon_rxp >= MAX_MON_FRAME) {
 					cs->dc.isac.mocr &= 0x0f;
 					cs->dc.isac.mocr |= 0xa0;
-					cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+					isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 					cs->dc.isac.mon_rxp = 0;
 					if (cs->debug & L1_DEB_WARN)
 						debugl1(cs, "ISAC MON RX overflow!");
 					goto afterMONR1;
 				}
-				cs->dc.isac.mon_rx[cs->dc.isac.mon_rxp++] = cs->readisac(cs, ISAC_MOR1);
+				cs->dc.isac.mon_rx[cs->dc.isac.mon_rxp++] = isac_read(cs, ISAC_MOR1);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ISAC MOR1 %02x", cs->dc.isac.mon_rx[cs->dc.isac.mon_rxp -1]);
 				cs->dc.isac.mocr |= 0x40;
-				cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+				isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 			}
 		      afterMONR1:
 			if (v1 & 0x04) {
 				cs->dc.isac.mocr &= 0xf0;
-				cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+				isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 				cs->dc.isac.mocr |= 0x0a;
-				cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+				isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 				sched_d_event(cs, D_RX_MON0);
 			}
 			if (v1 & 0x40) {
 				cs->dc.isac.mocr &= 0x0f;
-				cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+				isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 				cs->dc.isac.mocr |= 0xa0;
-				cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+				isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 				sched_d_event(cs, D_RX_MON1);
 			}
 			if (v1 & 0x02) {
@@ -333,9 +357,9 @@
 					(cs->dc.isac.mon_txp >= cs->dc.isac.mon_txc) && 
 					!(v1 & 0x08))) {
 					cs->dc.isac.mocr &= 0xf0;
-					cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+					isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 					cs->dc.isac.mocr |= 0x0a;
-					cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+					isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 					if (cs->dc.isac.mon_txc &&
 						(cs->dc.isac.mon_txp >= cs->dc.isac.mon_txc))
 						sched_d_event(cs, D_TX_MON0);
@@ -345,7 +369,7 @@
 					sched_d_event(cs, D_TX_MON0);
 					goto AfterMOX0;
 				}
-				cs->writeisac(cs, ISAC_MOX0,
+				isac_write(cs, ISAC_MOX0,
 					cs->dc.isac.mon_tx[cs->dc.isac.mon_txp++]);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ISAC %02x -> MOX0", cs->dc.isac.mon_tx[cs->dc.isac.mon_txp -1]);
@@ -356,9 +380,9 @@
 					(cs->dc.isac.mon_txp >= cs->dc.isac.mon_txc) && 
 					!(v1 & 0x80))) {
 					cs->dc.isac.mocr &= 0x0f;
-					cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+					isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 					cs->dc.isac.mocr |= 0xa0;
-					cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
+					isac_write(cs, ISAC_MOCR, cs->dc.isac.mocr);
 					if (cs->dc.isac.mon_txc &&
 						(cs->dc.isac.mon_txp >= cs->dc.isac.mon_txc))
 						sched_d_event(cs, D_TX_MON1);
@@ -368,7 +392,7 @@
 					sched_d_event(cs, D_TX_MON1);
 					goto AfterMOX1;
 				}
-				cs->writeisac(cs, ISAC_MOX1,
+				isac_write(cs, ISAC_MOX1,
 					cs->dc.isac.mon_tx[cs->dc.isac.mon_txp++]);
 				if (cs->debug & L1_DEB_MONITOR)
 					debugl1(cs, "ISAC %02x -> MOX1", cs->dc.isac.mon_tx[cs->dc.isac.mon_txp -1]);
@@ -419,19 +443,19 @@
 			if (test_bit(HW_IOM1, &cs->HW_Flags)) {
 				/* IOM 1 Mode */
 				if (!val) {
-					cs->writeisac(cs, ISAC_SPCR, 0xa);
-					cs->writeisac(cs, ISAC_ADF1, 0x2);
+					isac_write(cs, ISAC_SPCR, 0xa);
+					isac_write(cs, ISAC_ADF1, 0x2);
 				} else {
-					cs->writeisac(cs, ISAC_SPCR, val);
-					cs->writeisac(cs, ISAC_ADF1, 0xa);
+					isac_write(cs, ISAC_SPCR, val);
+					isac_write(cs, ISAC_ADF1, 0xa);
 				}
 			} else {
 				/* IOM 2 Mode */
-				cs->writeisac(cs, ISAC_SPCR, val);
+				isac_write(cs, ISAC_SPCR, val);
 				if (val)
-					cs->writeisac(cs, ISAC_ADF1, 0x8);
+					isac_write(cs, ISAC_ADF1, 0x8);
 				else
-					cs->writeisac(cs, ISAC_ADF1, 0x0);
+					isac_write(cs, ISAC_ADF1, 0x0);
 			}
 			break;
 		case (HW_DEACTIVATE | RESPONSE):
@@ -478,8 +502,8 @@
 	int	rbch, star;
 
 	if (test_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
-		rbch = cs->readisac(cs, ISAC_RBCH);
-		star = cs->readisac(cs, ISAC_STAR);
+		rbch = isac_read(cs, ISAC_RBCH);
+		star = isac_read(cs, ISAC_STAR);
 		if (cs->debug) 
 			debugl1(cs, "D-Channel Busy RBCH %02x STAR %02x",
 				rbch, star);
@@ -501,7 +525,7 @@
 				printk(KERN_WARNING "HiSax: ISAC D-Channel Busy no skb\n");
 				debugl1(cs, "D-Channel Busy no skb");
 			}
-			cs->writeisac(cs, ISAC_CMDR, 0x01); /* Transmitter reset */
+			isac_write(cs, ISAC_CMDR, 0x01); /* Transmitter reset */
 			cs->irq_func(cs->irq, cs, NULL);
 		}
 	}
@@ -512,20 +536,20 @@
 {
 	int val, eval;
 
-	val = cs->readisac(cs, ISAC_STAR);
+	val = isac_read(cs, ISAC_STAR);
 	debugl1(cs, "ISAC STAR %x", val);
-	val = cs->readisac(cs, ISAC_MODE);
+	val = isac_read(cs, ISAC_MODE);
 	debugl1(cs, "ISAC MODE %x", val);
-	val = cs->readisac(cs, ISAC_ADF2);
+	val = isac_read(cs, ISAC_ADF2);
 	debugl1(cs, "ISAC ADF2 %x", val);
-	val = cs->readisac(cs, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	debugl1(cs, "ISAC ISTA %x", val);
 	if (val & 0x01) {
-		eval = cs->readisac(cs, ISAC_EXIR);
+		eval = isac_read(cs, ISAC_EXIR);
 		debugl1(cs, "ISAC EXIR %x", eval);
 	}
 	/* Disable all IRQ */
-	cs->writeisac(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
 
 	INIT_WORK(&cs->work, isac_bh, cs);
 	cs->setstack_d = setstack_isac;
@@ -536,35 +560,35 @@
 	cs->dbusytimer.function = (void *) dbusy_timer_handler;
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
-  	cs->writeisac(cs, ISAC_MASK, 0xff);
+  	isac_write(cs, ISAC_MASK, 0xff);
   	cs->dc.isac.mocr = 0xaa;
 	if (test_bit(HW_IOM1, &cs->HW_Flags)) {
 		/* IOM 1 Mode */
-		cs->writeisac(cs, ISAC_ADF2, 0x0);
-		cs->writeisac(cs, ISAC_SPCR, 0xa);
-		cs->writeisac(cs, ISAC_ADF1, 0x2);
-		cs->writeisac(cs, ISAC_STCR, 0x70);
-		cs->writeisac(cs, ISAC_MODE, 0xc9);
+		isac_write(cs, ISAC_ADF2, 0x0);
+		isac_write(cs, ISAC_SPCR, 0xa);
+		isac_write(cs, ISAC_ADF1, 0x2);
+		isac_write(cs, ISAC_STCR, 0x70);
+		isac_write(cs, ISAC_MODE, 0xc9);
 	} else {
 		/* IOM 2 Mode */
 		if (!cs->dc.isac.adf2)
 			cs->dc.isac.adf2 = 0x80;
-		cs->writeisac(cs, ISAC_ADF2, cs->dc.isac.adf2);
-		cs->writeisac(cs, ISAC_SQXR, 0x2f);
-		cs->writeisac(cs, ISAC_SPCR, 0x00);
-		cs->writeisac(cs, ISAC_STCR, 0x70);
-		cs->writeisac(cs, ISAC_MODE, 0xc9);
-		cs->writeisac(cs, ISAC_TIMR, 0x00);
-		cs->writeisac(cs, ISAC_ADF1, 0x00);
+		isac_write(cs, ISAC_ADF2, cs->dc.isac.adf2);
+		isac_write(cs, ISAC_SQXR, 0x2f);
+		isac_write(cs, ISAC_SPCR, 0x00);
+		isac_write(cs, ISAC_STCR, 0x70);
+		isac_write(cs, ISAC_MODE, 0xc9);
+		isac_write(cs, ISAC_TIMR, 0x00);
+		isac_write(cs, ISAC_ADF1, 0x00);
 	}
 	ph_command(cs, ISAC_CMD_RS);
-	cs->writeisac(cs, ISAC_MASK, 0x0);
+	isac_write(cs, ISAC_MASK, 0x0);
 
-	val = cs->readisac(cs, ISAC_CIR0);
+	val = isac_read(cs, ISAC_CIR0);
 	debugl1(cs, "ISAC CIR0 %x", val);
 	cs->dc.isac.ph_state = (val >> 2) & 0xf;
 	sched_d_event(cs, D_L1STATECHANGE);
 
 	/* RESET Receiver and Transmitter */
-	cs->writeisac(cs, ISAC_CMDR, 0x41);
+	isac_write(cs, ISAC_CMDR, 0x41);
 }
diff -Nru a/drivers/isdn/hisax/isac.h b/drivers/isdn/hisax/isac.h
--- a/drivers/isdn/hisax/isac.h	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/isac.h	Wed Jan  8 20:04:45 2003
@@ -65,4 +65,4 @@
 
 extern void ISACVersion(struct IsdnCardState *cs, char *s);
 extern void initisac(struct IsdnCardState *cs);
-extern void isac_interrupt(struct IsdnCardState *cs, u_char val);
+extern void isac_interrupt(struct IsdnCardState *cs, u8 val);
diff -Nru a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
--- a/drivers/isdn/hisax/isar.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/isar.c	Wed Jan  8 20:04:43 2003
@@ -21,19 +21,32 @@
 #define ETX	0x03
 
 
-const u_char faxmodulation_s[] = "3,24,48,72,73,74,96,97,98,121,122,145,146"; 
-const u_char faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146}; 
+const u8 faxmodulation_s[] = "3,24,48,72,73,74,96,97,98,121,122,145,146"; 
+const u8 faxmodulation[] = {3,24,48,72,73,74,96,97,98,121,122,145,146}; 
 #define FAXMODCNT 13
 
 void isar_setup(struct IsdnCardState *cs);
-static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para);
-static inline void ll_deliver_faxstat(struct BCState *bcs, u_char status);
+static void isar_pump_cmd(struct BCState *bcs, u8 cmd, u8 para);
+static inline void ll_deliver_faxstat(struct BCState *bcs, u8 status);
 static spinlock_t isar_lock = SPIN_LOCK_UNLOCKED;
+
+static inline u8
+isar_read_reg(struct IsdnCardState *cs, int mode, u8 addr)
+{
+	return cs->bc_hw_ops->read_reg(cs, mode, addr);
+}
+
+static inline void
+isar_write_reg(struct IsdnCardState *cs, int mode, u8 addr, u8 val)
+{
+	cs->bc_hw_ops->write_reg(cs, mode, addr, val);
+}
+
 static inline int
 waitforHIA(struct IsdnCardState *cs, int timeout)
 {
 
-	while ((cs->BC_Read_Reg(cs, 0, ISAR_HIA) & 1) && timeout) {
+	while ((isar_read_reg(cs, 0, ISAR_HIA) & 1) && timeout) {
 		udelay(1);
 		timeout--;
 	}
@@ -44,8 +57,8 @@
 
 
 int
-sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len,
-	u_char *msg)
+sendmsg(struct IsdnCardState *cs, u8 his, u8 creg, u8 len,
+	u8 *msg)
 {
 	unsigned long flags;
 	int i;
@@ -57,13 +70,13 @@
 		debugl1(cs, "sendmsg(%02x,%02x,%d)", his, creg, len);
 #endif
 	spin_lock_irqsave(&isar_lock, flags);
-	cs->BC_Write_Reg(cs, 0, ISAR_CTRL_H, creg);
-	cs->BC_Write_Reg(cs, 0, ISAR_CTRL_L, len);
-	cs->BC_Write_Reg(cs, 0, ISAR_WADR, 0);
+	isar_write_reg(cs, 0, ISAR_CTRL_H, creg);
+	isar_write_reg(cs, 0, ISAR_CTRL_L, len);
+	isar_write_reg(cs, 0, ISAR_WADR, 0);
 	if (msg && len) {
-		cs->BC_Write_Reg(cs, 1, ISAR_MBOX, msg[0]);
+		isar_write_reg(cs, 1, ISAR_MBOX, msg[0]);
 		for (i=1; i<len; i++)
-			cs->BC_Write_Reg(cs, 2, ISAR_MBOX, msg[i]);
+			isar_write_reg(cs, 2, ISAR_MBOX, msg[i]);
 #if DUMP_MBOXFRAME>1
 		if (cs->debug & L1_DEB_HSCX_FIFO) {
 			char tmp[256], *t;
@@ -79,7 +92,7 @@
 		}
 #endif
 	}
-	cs->BC_Write_Reg(cs, 1, ISAR_HIS, his);
+	isar_write_reg(cs, 1, ISAR_HIS, his);
 	spin_unlock_irqrestore(&isar_lock, flags);
 	waitforHIA(cs, 10000);
 	return(1);
@@ -87,15 +100,15 @@
 
 /* Call only with IRQ disabled !!! */
 inline void
-rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u_char *msg)
+rcv_mbox(struct IsdnCardState *cs, struct isar_reg *ireg, u8 *msg)
 {
 	int i;
 
-	cs->BC_Write_Reg(cs, 1, ISAR_RADR, 0);
+	isar_write_reg(cs, 1, ISAR_RADR, 0);
 	if (msg && ireg->clsb) {
-		msg[0] = cs->BC_Read_Reg(cs, 1, ISAR_MBOX);
+		msg[0] = isar_read_reg(cs, 1, ISAR_MBOX);
 		for (i=1; i < ireg->clsb; i++)
-			 msg[i] = cs->BC_Read_Reg(cs, 2, ISAR_MBOX);
+			 msg[i] = isar_read_reg(cs, 2, ISAR_MBOX);
 #if DUMP_MBOXFRAME>1
 		if (cs->debug & L1_DEB_HSCX_FIFO) {
 			char tmp[256], *t;
@@ -111,16 +124,16 @@
 		}
 #endif
 	}
-	cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+	isar_write_reg(cs, 1, ISAR_IIA, 0);
 }
 
 /* Call only with IRQ disabled !!! */
 inline void
 get_irq_infos(struct IsdnCardState *cs, struct isar_reg *ireg)
 {
-	ireg->iis = cs->BC_Read_Reg(cs, 1, ISAR_IIS);
-	ireg->cmsb = cs->BC_Read_Reg(cs, 1, ISAR_CTRL_H);
-	ireg->clsb = cs->BC_Read_Reg(cs, 1, ISAR_CTRL_L);
+	ireg->iis = isar_read_reg(cs, 1, ISAR_IIS);
+	ireg->cmsb = isar_read_reg(cs, 1, ISAR_CTRL_H);
+	ireg->clsb = isar_read_reg(cs, 1, ISAR_CTRL_L);
 #if DUMP_MBOXFRAME
 	if (cs->debug & L1_DEB_HSCX)
 		debugl1(cs, "rcv_mbox(%02x,%02x,%d)", ireg->iis, ireg->cmsb,
@@ -129,15 +142,15 @@
 }
 
 int
-waitrecmsg(struct IsdnCardState *cs, u_char *len,
-	u_char *msg, int maxdelay)
+waitrecmsg(struct IsdnCardState *cs, u8 *len,
+	u8 *msg, int maxdelay)
 {
 	int timeout = 0;
 	unsigned long flags;
 	struct isar_reg *ir = cs->bcs[0].hw.isar.reg;
 	
 	
-	while((!(cs->BC_Read_Reg(cs, 0, ISAR_IRQBIT) & ISAR_IRQSTA)) &&
+	while((!(isar_read_reg(cs, 0, ISAR_IRQBIT) & ISAR_IRQSTA)) &&
 		(timeout++ < maxdelay))
 		udelay(1);
 	if (timeout >= maxdelay) {
@@ -156,14 +169,14 @@
 ISARVersion(struct IsdnCardState *cs, char *s)
 {
 	int ver;
-	u_char msg[] = ISAR_MSG_HWVER;
-	u_char tmp[64];
-	u_char len;
+	u8 msg[] = ISAR_MSG_HWVER;
+	u8 tmp[64];
+	u8 len;
 	int debug;
 
 	cs->cardmsg(cs, CARD_RESET,  NULL);
 	/* disable ISAR IRQ */
-	cs->BC_Write_Reg(cs, 0, ISAR_IRQBIT, 0);
+	isar_write_reg(cs, 0, ISAR_IRQBIT, 0);
 	debug = cs->debug;
 	cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO);
 	if (!sendmsg(cs, ISAR_HIS_VNR, 0, 3, msg))
@@ -183,13 +196,13 @@
 }
 
 int
-isar_load_firmware(struct IsdnCardState *cs, u_char *buf)
+isar_load_firmware(struct IsdnCardState *cs, u8 *buf)
 {
 	int ret, size, cnt, debug;
-	u_char len, nom, noc;
+	u8 len, nom, noc;
 	u_short sadr, left, *sp;
-	u_char *p = buf;
-	u_char *msg, *tmpmsg, *mp, tmp[64];
+	u8 *p = buf;
+	u8 *msg, *tmpmsg, *mp, tmp[64];
 	struct isar_reg *ireg = cs->bcs[0].hw.isar.reg;
 	
 	struct {u_short sadr;
@@ -223,7 +236,7 @@
 	}
 	cnt = 0;
 	/* disable ISAR IRQ */
-	cs->BC_Write_Reg(cs, 0, ISAR_IRQBIT, 0);
+	isar_write_reg(cs, 0, ISAR_IRQBIT, 0);
 	if (!(msg = kmalloc(256, GFP_KERNEL))) {
 		printk(KERN_ERR"isar_load_firmware no buffer\n");
 		return (1);
@@ -342,7 +355,7 @@
 		printk(KERN_DEBUG"isar start dsp success\n");
 	/* NORMAL mode entered */
 	/* Enable IRQs of ISAR */
-	cs->BC_Write_Reg(cs, 0, ISAR_IRQBIT, ISAR_IRQSTA);
+	isar_write_reg(cs, 0, ISAR_IRQBIT, ISAR_IRQSTA);
 	cnt = 1000; /* max 1s */
 	while ((!ireg->bstat) && cnt) {
 		udelay(1000);
@@ -413,7 +426,7 @@
 	cs->debug = debug;
 	if (ret)
 		/* disable ISAR IRQ */
-		cs->BC_Write_Reg(cs, 0, ISAR_IRQBIT, 0);
+		isar_write_reg(cs, 0, ISAR_IRQBIT, 0);
 	kfree(msg);
 	kfree(tmpmsg);
 	return(ret);
@@ -438,7 +451,7 @@
 static inline void
 send_DLE_ETX(struct BCState *bcs)
 {
-	u_char dleetx[2] = {DLE,ETX};
+	u8 dleetx[2] = {DLE,ETX};
 	struct sk_buff *skb;
 	
 	if ((skb = dev_alloc_skb(2))) {
@@ -474,13 +487,13 @@
 static inline void
 isar_rcv_frame(struct IsdnCardState *cs, struct BCState *bcs)
 {
-	u_char *ptr;
+	u8 *ptr;
 	struct sk_buff *skb;
 	struct isar_reg *ireg = bcs->hw.isar.reg;
 	
 	if (!ireg->clsb) {
 		debugl1(cs, "isar zero len frame");
-		cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+		isar_write_reg(cs, 1, ISAR_IIA, 0);
 		return;
 	}
 	switch (bcs->mode) {
@@ -489,24 +502,24 @@
 			ireg->iis, ireg->cmsb, ireg->clsb);
 		printk(KERN_WARNING"isar mode 0 spurious IIS_RDATA %x/%x/%x\n",
 			ireg->iis, ireg->cmsb, ireg->clsb);
-		cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+		isar_write_reg(cs, 1, ISAR_IIA, 0);
 		break;
 	case L1_MODE_TRANS:
 	case L1_MODE_V32:
 		if ((skb = dev_alloc_skb(ireg->clsb))) {
-			rcv_mbox(cs, ireg, (u_char *)skb_put(skb, ireg->clsb));
+			rcv_mbox(cs, ireg, (u8 *)skb_put(skb, ireg->clsb));
 			skb_queue_tail(&bcs->rqueue, skb);
 			sched_b_event(bcs, B_RCVBUFREADY);
 		} else {
 			printk(KERN_WARNING "HiSax: skb out of memory\n");
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 		}
 		break;
 	case L1_MODE_HDLC:
 		if ((bcs->hw.isar.rcvidx + ireg->clsb) > HSCX_BUFMAX) {
 			if (cs->debug & L1_DEB_WARN)
 				debugl1(cs, "isar_rcv_frame: incoming packet too large");
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 			bcs->hw.isar.rcvidx = 0;
 		} else if (ireg->cmsb & HDLC_ERROR) {
 			if (cs->debug & L1_DEB_WARN)
@@ -519,7 +532,7 @@
 				bcs->err_crc++;
 #endif
 			bcs->hw.isar.rcvidx = 0;
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 		} else {
 			if (ireg->cmsb & HDLC_FSD)
 				bcs->hw.isar.rcvidx = 0;
@@ -547,7 +560,7 @@
 		if (bcs->hw.isar.state != STFAX_ACTIV) {
 			if (cs->debug & L1_DEB_WARN)
 				debugl1(cs, "isar_rcv_frame: not ACTIV");
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 			bcs->hw.isar.rcvidx = 0;
 			break;
 		}
@@ -559,14 +572,14 @@
 				debugl1(cs, "isar_rcv_frame: raw(%d) dle(%d)",
 					ireg->clsb, bcs->hw.isar.rcvidx);
 			if ((skb = dev_alloc_skb(bcs->hw.isar.rcvidx))) {
-				insert_dle((u_char *)skb_put(skb, bcs->hw.isar.rcvidx),
+				insert_dle((u8 *)skb_put(skb, bcs->hw.isar.rcvidx),
 					bcs->hw.isar.rcvbuf, ireg->clsb);
 				skb_queue_tail(&bcs->rqueue, skb);
 				sched_b_event(bcs, B_RCVBUFREADY);
 				if (ireg->cmsb & SART_NMD) { /* ABORT */
 					if (cs->debug & L1_DEB_WARN)
 						debugl1(cs, "isar_rcv_frame: no more data");
-					cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+					isar_write_reg(cs, 1, ISAR_IIA, 0);
 					bcs->hw.isar.rcvidx = 0;
 					send_DLE_ETX(bcs);
 					sendmsg(cs, SET_DPS(bcs->hw.isar.dpath) |
@@ -577,7 +590,7 @@
 				}
 			} else {
 				printk(KERN_WARNING "HiSax: skb out of memory\n");
-				cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+				isar_write_reg(cs, 1, ISAR_IIA, 0);
 			}
 			break;
 		}
@@ -585,7 +598,7 @@
 			if (cs->debug & L1_DEB_WARN)
 				debugl1(cs, "isar_rcv_frame: unknown fax mode %x",
 					bcs->hw.isar.cmd);
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 			bcs->hw.isar.rcvidx = 0;
 			break;
 		}
@@ -593,14 +606,14 @@
 		if ((bcs->hw.isar.rcvidx + ireg->clsb) > HSCX_BUFMAX) {
 			if (cs->debug & L1_DEB_WARN)
 				debugl1(cs, "isar_rcv_frame: incoming packet too large");
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 			bcs->hw.isar.rcvidx = 0;
 		} else if (ireg->cmsb & HDLC_ERROR) {
 			if (cs->debug & L1_DEB_WARN)
 				debugl1(cs, "isar frame error %x len %d",
 					ireg->cmsb, ireg->clsb);
 			bcs->hw.isar.rcvidx = 0;
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 		} else {
 			if (ireg->cmsb & HDLC_FSD)
 				bcs->hw.isar.rcvidx = 0;
@@ -617,7 +630,7 @@
 				} else if (!(skb = dev_alloc_skb(bcs->hw.isar.rcvidx))) {
 					printk(KERN_WARNING "ISAR: receive out of memory\n");
 				} else {
-					insert_dle((u_char *)skb_put(skb, len),
+					insert_dle((u8 *)skb_put(skb, len),
 						bcs->hw.isar.rcvbuf,
 						bcs->hw.isar.rcvidx);
 					skb_queue_tail(&bcs->rqueue, skb);
@@ -631,7 +644,7 @@
 		if (ireg->cmsb & SART_NMD) { /* ABORT */
 			if (cs->debug & L1_DEB_WARN)
 				debugl1(cs, "isar_rcv_frame: no more data");
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 			bcs->hw.isar.rcvidx = 0;
 			send_DLE_ETX(bcs);
 			sendmsg(cs, SET_DPS(bcs->hw.isar.dpath) |
@@ -642,7 +655,7 @@
 		break;
 	default:
 		printk(KERN_ERR"isar_rcv_frame mode (%x)error\n", bcs->mode);
-		cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+		isar_write_reg(cs, 1, ISAR_IIA, 0);
 		break;
 	}
 }
@@ -652,8 +665,8 @@
 {
 	struct IsdnCardState *cs = bcs->cs;
 	int count;
-	u_char msb;
-	u_char *ptr;
+	u8 msb;
+	u8 *ptr;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "isar_fill_fifo");
@@ -724,7 +737,7 @@
 }
 
 inline
-struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u_char dpath)
+struct BCState *sel_bcs_isar(struct IsdnCardState *cs, u8 dpath)
 {
 	if ((!dpath) || (dpath == 3))
 		return(NULL);
@@ -767,7 +780,7 @@
 		if (test_and_clear_bit(BC_FLG_DLEETX, &bcs->Flag)) {
 			if (test_and_clear_bit(BC_FLG_LASTDATA, &bcs->Flag)) {
 				if (test_and_clear_bit(BC_FLG_NMD_DATA, &bcs->Flag)) {
-					u_char dummy = 0;
+					u8 dummy = 0;
 					sendmsg(bcs->cs, SET_DPS(bcs->hw.isar.dpath) |
 						ISAR_HIS_SDATA, 0x01, 1, &dummy);
 				}
@@ -782,7 +795,7 @@
 }
 
 inline void
-check_send(struct IsdnCardState *cs, u_char rdm)
+check_send(struct IsdnCardState *cs, u8 rdm)
 {
 	struct BCState *bcs;
 	
@@ -812,8 +825,8 @@
 static void
 isar_pump_status_rsp(struct BCState *bcs, struct isar_reg *ireg) {
 	struct IsdnCardState *cs = bcs->cs;
-	u_char ril = ireg->par[0];
-	u_char rim;
+	u8 ril = ireg->par[0];
+	u8 rim;
 
 	if (!test_and_clear_bit(ISAR_RATE_REQ, &bcs->hw.isar.reg->Flags))
 		return; 
@@ -864,9 +877,9 @@
 }
 
 static void
-isar_pump_statev_modem(struct BCState *bcs, u_char devt) {
+isar_pump_statev_modem(struct BCState *bcs, u8 devt) {
 	struct IsdnCardState *cs = bcs->cs;
-	u_char dps = SET_DPS(bcs->hw.isar.dpath);
+	u8 dps = SET_DPS(bcs->hw.isar.dpath);
 
 	switch(devt) {
 		case PSEV_10MS_TIMER:
@@ -934,7 +947,7 @@
 }
 
 static inline void
-ll_deliver_faxstat(struct BCState *bcs, u_char status)
+ll_deliver_faxstat(struct BCState *bcs, u8 status)
 {
         isdn_ctrl ic;
 	struct Channel *chanp = (struct Channel *) bcs->st->lli.userdata;
@@ -949,10 +962,10 @@
 }
 
 static void
-isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
+isar_pump_statev_fax(struct BCState *bcs, u8 devt) {
 	struct IsdnCardState *cs = bcs->cs;
-	u_char dps = SET_DPS(bcs->hw.isar.dpath);
-	u_char p1;
+	u8 dps = SET_DPS(bcs->hw.isar.dpath);
+	u8 p1;
 
 	switch(devt) {
 		case PSEV_10MS_TIMER:
@@ -1151,11 +1164,11 @@
 			} else {
 				debugl1(cs, "isar spurious IIS_RDATA %x/%x/%x",
 					ireg->iis, ireg->cmsb, ireg->clsb);
-				cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+				isar_write_reg(cs, 1, ISAR_IIA, 0);
 			}
 			break;
 		case ISAR_IIS_GSTEV:
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 			ireg->bstat |= ireg->cmsb;
 			check_send(cs, ireg->cmsb);
 			break;
@@ -1171,11 +1184,11 @@
 			if (cs->debug & L1_DEB_WARN)
 				debugl1(cs, "Buffer STEV dpath%d msb(%x)",
 					ireg->iis>>6, ireg->cmsb);
-			cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+			isar_write_reg(cs, 1, ISAR_IIA, 0);
 			break;
 		case ISAR_IIS_PSTEV:
 			if ((bcs = sel_bcs_isar(cs, ireg->iis >> 6))) {
-				rcv_mbox(cs, ireg, (u_char *)ireg->par);
+				rcv_mbox(cs, ireg, (u8 *)ireg->par);
 				if (bcs->mode == L1_MODE_V32) {
 					isar_pump_statev_modem(bcs, ireg->cmsb);
 				} else if (bcs->mode == L1_MODE_FAX) {
@@ -1188,30 +1201,30 @@
 			} else {
 				debugl1(cs, "isar spurious IIS_PSTEV %x/%x/%x",
 					ireg->iis, ireg->cmsb, ireg->clsb);
-				cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+				isar_write_reg(cs, 1, ISAR_IIA, 0);
 			}
 			break;
 		case ISAR_IIS_PSTRSP:
 			if ((bcs = sel_bcs_isar(cs, ireg->iis >> 6))) {
-				rcv_mbox(cs, ireg, (u_char *)ireg->par);
+				rcv_mbox(cs, ireg, (u8 *)ireg->par);
 				isar_pump_status_rsp(bcs, ireg);
 			} else {
 				debugl1(cs, "isar spurious IIS_PSTRSP %x/%x/%x",
 					ireg->iis, ireg->cmsb, ireg->clsb);
-				cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+				isar_write_reg(cs, 1, ISAR_IIA, 0);
 			}
 			break;
 		case ISAR_IIS_DIAG:
 		case ISAR_IIS_BSTRSP:
 		case ISAR_IIS_IOM2RSP:
-			rcv_mbox(cs, ireg, (u_char *)ireg->par);
+			rcv_mbox(cs, ireg, (u8 *)ireg->par);
 			if ((cs->debug & (L1_DEB_HSCX | L1_DEB_HSCX_FIFO))
 				== L1_DEB_HSCX) {
-				u_char *tp=debbuf;
+				u8 *tp=debbuf;
 
 				tp += sprintf(debbuf, "msg iis(%x) msb(%x)",
 					ireg->iis, ireg->cmsb);
-				QuickHex(tp, (u_char *)ireg->par, ireg->clsb);
+				QuickHex(tp, (u8 *)ireg->par, ireg->clsb);
 				debugl1(cs, debbuf);
 			}
 			break;
@@ -1244,8 +1257,8 @@
 static void
 setup_pump(struct BCState *bcs) {
 	struct IsdnCardState *cs = bcs->cs;
-	u_char dps = SET_DPS(bcs->hw.isar.dpath);
-	u_char ctrl, param[6];
+	u8 dps = SET_DPS(bcs->hw.isar.dpath);
+	u8 ctrl, param[6];
 
 	switch (bcs->mode) {
 		case L1_MODE_NULL:
@@ -1293,8 +1306,8 @@
 static void
 setup_sart(struct BCState *bcs) {
 	struct IsdnCardState *cs = bcs->cs;
-	u_char dps = SET_DPS(bcs->hw.isar.dpath);
-	u_char ctrl, param[2];
+	u8 dps = SET_DPS(bcs->hw.isar.dpath);
+	u8 ctrl, param[2];
 	
 	switch (bcs->mode) {
 		case L1_MODE_NULL:
@@ -1327,8 +1340,8 @@
 static void
 setup_iom2(struct BCState *bcs) {
 	struct IsdnCardState *cs = bcs->cs;
-	u_char dps = SET_DPS(bcs->hw.isar.dpath);
-	u_char cmsb = IOM_CTRL_ENA, msg[5] = {IOM_P1_TXD,0,0,0,0};
+	u8 dps = SET_DPS(bcs->hw.isar.dpath);
+	u8 cmsb = IOM_CTRL_ENA, msg[5] = {IOM_P1_TXD,0,0,0,0};
 	
 	if (bcs->channel)
 		msg[1] = msg[3] = 1;
@@ -1413,11 +1426,11 @@
 }
 
 static void
-isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para) 
+isar_pump_cmd(struct BCState *bcs, u8 cmd, u8 para) 
 {
 	struct IsdnCardState *cs = bcs->cs;
-	u_char dps = SET_DPS(bcs->hw.isar.dpath);
-	u_char ctrl = 0, nom = 0, p1 = 0;
+	u8 dps = SET_DPS(bcs->hw.isar.dpath);
+	u8 ctrl = 0, nom = 0, p1 = 0;
 
 	switch(cmd) {
 		case ISDN_FAX_CLASS1_FTM:
@@ -1520,7 +1533,7 @@
 void
 isar_setup(struct IsdnCardState *cs)
 {
-	u_char msg;
+	u8 msg;
 	int i;
 	
 	/* Dpath 1, 2 */
@@ -1713,7 +1726,7 @@
 						ISDN_FEATURE_L2_FAX |
 						ISDN_FEATURE_L3_FCLASS1;
 					memcpy(&adr, ic->parm.num, sizeof(ulong));
-					if (isar_load_firmware(cs, (u_char *)adr))
+					if (isar_load_firmware(cs, (u8 *)adr))
 						return(1);
 					else 
 						ll_run(cs, features);
@@ -1730,9 +1743,14 @@
 	return(0);
 }
 
+static struct bc_l1_ops isar_l1_ops = {
+	.fill_fifo = isar_fill_fifo,
+};
+
 void __devinit
 initisar(struct IsdnCardState *cs)
 {
+	cs->bc_l1_ops = &isar_l1_ops;
 	cs->bcs[0].BC_SetStack = setstack_isar;
 	cs->bcs[1].BC_SetStack = setstack_isar;
 	cs->bcs[0].BC_Close = close_isarstate;
diff -Nru a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c
--- a/drivers/isdn/hisax/isdnl1.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/isdnl1.c	Wed Jan  8 20:04:43 2003
@@ -366,7 +366,7 @@
 #ifdef L2FRAME_DEBUG		/* psa */
 
 char *
-l2cmd(u_char cmd)
+l2cmd(u8 cmd)
 {
 	switch (cmd & ~0x10) {
 		case 1:
@@ -400,7 +400,7 @@
 static char tmpdeb[32];
 
 char *
-l2frames(u_char * ptr)
+l2frames(u8 * ptr)
 {
 	switch (ptr[2] & ~0x10) {
 		case 1:
@@ -432,7 +432,7 @@
 void
 Logl2Frame(struct IsdnCardState *cs, struct sk_buff *skb, char *buf, int dir)
 {
-	u_char *ptr;
+	u8 *ptr;
 
 	ptr = skb->data;
 
diff -Nru a/drivers/isdn/hisax/isdnl1.h b/drivers/isdn/hisax/isdnl1.h
--- a/drivers/isdn/hisax/isdnl1.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/isdnl1.h	Wed Jan  8 20:04:44 2003
@@ -31,6 +31,12 @@
 extern void l1_msg(struct IsdnCardState *cs, int pr, void *arg);
 extern void l1_msg_b(struct PStack *st, int pr, void *arg);
 
+static inline void
+fill_fifo_b(struct BCState *bcs)
+{
+	bcs->cs->bc_l1_ops->fill_fifo(bcs);
+}
+
 #ifdef L2FRAME_DEBUG
 extern void Logl2Frame(struct IsdnCardState *cs, struct sk_buff *skb, char *buf, int dir);
 #endif
@@ -74,7 +80,7 @@
 	if (bcs->tx_skb) {
 		bcs->count = 0;
 		set_bit(BC_FLG_BUSY, &bcs->Flag);
-		bcs->cs->BC_Send_Data(bcs);
+		fill_fifo_b(bcs);
 	} else {
 		clear_bit(BC_FLG_BUSY, &bcs->Flag);
 		sched_b_event(bcs, B_XMTBUFREADY);
@@ -107,7 +113,7 @@
 		set_bit(BC_FLG_BUSY, &bcs->Flag);
 		bcs->tx_skb = skb;
 		bcs->count = 0;
-		bcs->cs->BC_Send_Data(bcs);
+		fill_fifo_b(bcs);
 	}
 	spin_unlock_irqrestore(&cs->lock, flags);
 }
@@ -153,7 +159,7 @@
 		set_bit(BC_FLG_BUSY, &bcs->Flag);
 		bcs->tx_skb = skb;
 		bcs->count = 0;
-		bcs->cs->BC_Send_Data(bcs);
+		fill_fifo_b(bcs);
 	}
 	spin_unlock_irqrestore(&cs->lock, flags);
 }
@@ -268,7 +274,7 @@
 	if (bcs->tx_skb) {
 		/* last frame not done yet? */
 		if (bcs->tx_skb->len) {
-			bcs->cs->BC_Send_Data(bcs);
+			fill_fifo_b(bcs);
 			return;
 		}
 		xmit_complete_b(bcs);
@@ -310,7 +316,7 @@
 		debugl1(cs, "HSCX %c EXIR XDU", 'A' + bcs->channel);
 
 	if (bcs->mode == L1_MODE_TRANS) {
-		cs->BC_Send_Data(bcs);
+		fill_fifo_b(bcs);
 	} else {
 		xmit_restart_b(bcs);
 		reset_xmit(bcs);
diff -Nru a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c
--- a/drivers/isdn/hisax/isdnl2.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/isdnl2.c	Wed Jan  8 20:04:43 2003
@@ -192,9 +192,9 @@
 }
 
 static int
-sethdraddr(struct Layer2 *l2, u_char * header, int rsp)
+sethdraddr(struct Layer2 *l2, u8 * header, int rsp)
 {
-	u_char *ptr = header;
+	u8 *ptr = header;
 	int crbit = rsp;
 
 	if (test_bit(FLG_LAPD, &l2->flag)) {
@@ -224,31 +224,31 @@
 #define enqueue_ui(a, b) enqueue_super(a, b)
 
 inline int
-IsUI(u_char * data)
+IsUI(u8 * data)
 {
 	return ((data[0] & 0xef) == UI);
 }
 
 inline int
-IsUA(u_char * data)
+IsUA(u8 * data)
 {
 	return ((data[0] & 0xef) == UA);
 }
 
 inline int
-IsDM(u_char * data)
+IsDM(u8 * data)
 {
 	return ((data[0] & 0xef) == DM);
 }
 
 inline int
-IsDISC(u_char * data)
+IsDISC(u8 * data)
 {
 	return ((data[0] & 0xef) == DISC);
 }
 
 inline int
-IsRR(u_char * data, struct PStack *st)
+IsRR(u8 * data, struct PStack *st)
 {
 	if (test_bit(FLG_MOD128, &st->l2.flag))
 		return (data[0] == RR);
@@ -257,9 +257,9 @@
 }
 
 inline int
-IsSFrame(u_char * data, struct PStack *st)
+IsSFrame(u8 * data, struct PStack *st)
 {
-	register u_char d = *data;
+	register u8 d = *data;
 	
 	if (!test_bit(FLG_MOD128, &st->l2.flag))
 		d &= 0xf;
@@ -267,27 +267,27 @@
 }
 
 inline int
-IsSABME(u_char * data, struct PStack *st)
+IsSABME(u8 * data, struct PStack *st)
 {
-	u_char d = data[0] & ~0x10;
+	u8 d = data[0] & ~0x10;
 
 	return (test_bit(FLG_MOD128, &st->l2.flag) ? d == SABME : d == SABM);
 }
 
 inline int
-IsREJ(u_char * data, struct PStack *st)
+IsREJ(u8 * data, struct PStack *st)
 {
 	return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == REJ : (data[0] & 0xf) == REJ);
 }
 
 inline int
-IsFRMR(u_char * data)
+IsFRMR(u8 * data)
 {
 	return ((data[0] & 0xef) == FRMR);
 }
 
 inline int
-IsRNR(u_char * data, struct PStack *st)
+IsRNR(u8 * data, struct PStack *st)
 {
 	return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == RNR : (data[0] & 0xf) == RNR);
 }
@@ -361,7 +361,7 @@
 FRMR_error(struct PStack *st, struct sk_buff *skb)
 {
 	int headers = l2addrsize(&st->l2) + 1;
-	u_char *datap = skb->data + headers;
+	u8 *datap = skb->data + headers;
 	int rsp = *skb->data & 0x2;
 
 	if (test_bit(FLG_ORIG, &st->l2.flag))
@@ -420,10 +420,10 @@
 }
 
 static void
-send_uframe(struct PStack *st, u_char cmd, u_char cr)
+send_uframe(struct PStack *st, u8 cmd, u8 cr)
 {
 	struct sk_buff *skb;
-	u_char tmp[MAX_HEADER_LEN];
+	u8 tmp[MAX_HEADER_LEN];
 	int i;
 
 	i = sethdraddr(&st->l2, tmp, cr);
@@ -436,7 +436,7 @@
 	enqueue_super(st, skb);
 }
 
-inline u_char
+inline u8
 get_PollFlag(struct PStack * st, struct sk_buff * skb)
 {
 	return (skb->data[l2addrsize(&(st->l2))] & 0x10);
@@ -449,10 +449,10 @@
 }
 
 
-inline u_char
+inline u8
 get_PollFlagFree(struct PStack *st, struct sk_buff *skb)
 {
-	u_char PF;
+	u8 PF;
 
 	PF = get_PollFlag(st, skb);
 	FreeSkb(skb);
@@ -505,7 +505,7 @@
 establishlink(struct FsmInst *fi)
 {
 	struct PStack *st = fi->userdata;
-	u_char cmd;
+	u8 cmd;
 
 	clear_exception(&st->l2);
 	st->l2.rc = 0;
@@ -599,7 +599,7 @@
 tx_ui(struct PStack *st)
 {
 	struct sk_buff *skb;
-	u_char header[MAX_HEADER_LEN];
+	u8 header[MAX_HEADER_LEN];
 	int i;
 
 	i = sethdraddr(&(st->l2), header, CMD);
@@ -882,11 +882,11 @@
 }
 
 inline void
-enquiry_cr(struct PStack *st, u_char typ, u_char cr, u_char pf)
+enquiry_cr(struct PStack *st, u8 typ, u8 cr, u8 pf)
 {
 	struct sk_buff *skb;
 	struct Layer2 *l2;
-	u_char tmp[MAX_HEADER_LEN];
+	u8 tmp[MAX_HEADER_LEN];
 	int i;
 
 	l2 = &st->l2;
@@ -1250,7 +1250,7 @@
 	struct PStack *st = fi->userdata;
 	struct sk_buff *skb, *oskb;
 	struct Layer2 *l2 = &st->l2;
-	u_char header[MAX_HEADER_LEN];
+	u8 header[MAX_HEADER_LEN];
 	int i;
 	int unsigned p1;
 	unsigned long flags;
@@ -1631,7 +1631,7 @@
 isdnl2_l1l2(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	u_char *datap;
+	u8 *datap;
 	int ret = 1, len;
 	int c = 0;
 
diff -Nru a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
--- a/drivers/isdn/hisax/isdnl3.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/isdnl3.c	Wed Jan  8 20:04:44 2003
@@ -77,11 +77,11 @@
 	va_end(args);
 }
 
-u_char *
-findie(u_char * p, int size, u_char ie, int wanted_set)
+u8 *
+findie(u8 * p, int size, u8 ie, int wanted_set)
 {
 	int l, codeset, maincodeset;
-	u_char *pend = p + size;
+	u8 *pend = p + size;
 
 	/* skip protocol discriminator, callref and message type */
 	p++;
@@ -123,7 +123,7 @@
 }
 
 int
-getcallref(u_char * p)
+getcallref(u8 * p)
 {
 	int l, cr = 0;
 
diff -Nru a/drivers/isdn/hisax/isdnl3.h b/drivers/isdn/hisax/isdnl3.h
--- a/drivers/isdn/hisax/isdnl3.h	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/isdnl3.h	Wed Jan  8 20:04:45 2003
@@ -20,7 +20,7 @@
 struct stateentry {
 	int state;
 	int primitive;
-	void (*rout) (struct l3_process *, u_char, void *);
+	void (*rout) (struct l3_process *, u8, void *);
 };
 
 #define l3_debug(st, fmt, args...) HiSax_putstatus(st->l1.hardware, "l3 ", fmt, ## args)
diff -Nru a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
--- a/drivers/isdn/hisax/isurf.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/isurf.c	Wed Jan  8 20:04:44 2003
@@ -35,20 +35,20 @@
 #define ISURF_IOMEM_SIZE	0x400
 /* Interface functions */
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+ReadISAC(struct IsdnCardState *cs, u8 offset)
 {
 	return (readb(cs->hw.isurf.isac + offset));
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+WriteISAC(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	writeb(value, cs->hw.isurf.isac + offset); mb();
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+ReadISACfifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	register int i;
 	for (i = 0; i < size; i++)
@@ -56,7 +56,7 @@
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+WriteISACfifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	register int i;
 	for (i = 0; i < size; i++){
@@ -64,29 +64,41 @@
 	}
 }
 
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = ReadISAC,
+	.write_reg  = WriteISAC,
+	.read_fifo  = ReadISACfifo,
+	.write_fifo = WriteISACfifo,
+};
+
 /* ISAR access routines
  * mode = 0 access with IRQ on
  * mode = 1 access with IRQ off
  * mode = 2 access with IRQ off and using last offset
  */
   
-static u_char
-ReadISAR(struct IsdnCardState *cs, int mode, u_char offset)
+static u8
+ReadISAR(struct IsdnCardState *cs, int mode, u8 offset)
 {	
 	return(readb(cs->hw.isurf.isar + offset));
 }
 
 static void
-WriteISAR(struct IsdnCardState *cs, int mode, u_char offset, u_char value)
+WriteISAR(struct IsdnCardState *cs, int mode, u8 offset, u8 value)
 {
 	writeb(value, cs->hw.isurf.isar + offset);mb();
 }
 
+static struct bc_hw_ops isar_ops = {
+	.read_reg  = ReadISAR,
+	.write_reg = WriteISAR,
+};
+
 static void
 isurf_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 	int cnt = 5;
 
 	spin_lock(&cs->lock);
@@ -129,7 +141,7 @@
 }
 
 static void
-reset_isurf(struct IsdnCardState *cs, u_char chips)
+reset_isurf(struct IsdnCardState *cs, u8 chips)
 {
 	printk(KERN_INFO "ISurf: resetting card\n");
 
@@ -273,18 +285,13 @@
 	cs->cardmsg = &ISurf_card_msg;
 	cs->irq_func = &isurf_interrupt;
 	cs->auxcmd = &isurf_auxcmd;
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
+	cs->dc_hw_ops = &isac_ops;
 	cs->bcs[0].hw.isar.reg = &cs->hw.isurf.isar_r;
 	cs->bcs[1].hw.isar.reg = &cs->hw.isurf.isar_r;
 	reset_isurf(cs, ISURF_RESET);
 	test_and_set_bit(HW_ISAR, &cs->HW_Flags);
 	ISACVersion(cs, "ISurf:");
-	cs->BC_Read_Reg = &ReadISAR;
-	cs->BC_Write_Reg = &WriteISAR;
-	cs->BC_Send_Data = &isar_fill_fifo;
+	cs->bc_hw_ops = &isar_ops;
 	ver = ISARVersion(cs, "ISurf:");
 	if (ver < 0) {
 		printk(KERN_WARNING
diff -Nru a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c
--- a/drivers/isdn/hisax/ix1_micro.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/ix1_micro.c	Wed Jan  8 20:04:45 2003
@@ -40,134 +40,139 @@
 
 #define TIMEOUT 50
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(struct IsdnCardState *cs, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&ix1_micro_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.ix1.isac_ale, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&ix1_micro_lock, flags);
 	return (ret);
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
-{
-	/* fifo read without cli because it's allready done  */
-
-	byteout(ale, off);
-	insb(adr, data, size);
-}
-
-
-static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&ix1_micro_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.ix1.isac_ale, off);
 	byteout(adr, data);
 	spin_unlock_irqrestore(&ix1_micro_lock, flags);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
 {
-	/* fifo write without cli because it's allready done  */
-	byteout(ale, off);
-	outsb(adr, data, size);
+	byteout(cs->hw.ix1.isac_ale, off);
+	insb(adr, data, size);
 }
 
-/* Interface functions */
+static inline void
+writefifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
+{
+	byteout(cs->hw.ix1.isac_ale, off);
+	outsb(adr, data, size);
+}
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, offset));
+	return readreg(cs, cs->hw.ix1.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, offset, value);
+	writereg(cs, cs->hw.ix1.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	readfifo(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, 0, data, size);
+	readfifo(cs, cs->hw.ix1.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writefifo(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, 0, data, size);
+	writefifo(cs, cs->hw.ix1.isac, 0, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.ix1.hscx_ale,
-			cs->hw.ix1.hscx, offset + (hscx ? 0x40 : 0)));
+	return readreg(cs, cs->hw.ix1.hscx, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.ix1.hscx_ale,
-		 cs->hw.ix1.hscx, offset + (hscx ? 0x40 : 0), value);
+	writereg(cs, cs->hw.ix1.hscx, offset + (hscx ? 0x40 : 0), value);
 }
 
-#define READHSCX(cs, nr, reg) readreg(cs->hw.ix1.hscx_ale, \
-		cs->hw.ix1.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.ix1.hscx_ale, \
-		cs->hw.ix1.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.ix1.hscx_ale, \
-		cs->hw.ix1.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	readfifo(cs, cs->hw.ix1.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.ix1.hscx_ale, \
-		cs->hw.ix1.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs, cs->hw.ix1.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 ix1micro_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	spin_lock(&cs->lock);
-	val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readreg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
 		goto Start_ISAC;
 	}
-	writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK, 0xFF);
-	writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK + 0x40, 0xFF);
-	writereg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_MASK, 0);
-	writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK, 0);
-	writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK + 0x40, 0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -279,7 +284,6 @@
 #endif
 	/* IO-Ports */
 	cs->hw.ix1.isac_ale = card->para[1] + ISAC_COMMAND_OFFSET;
-	cs->hw.ix1.hscx_ale = card->para[1] + HSCX_COMMAND_OFFSET;
 	cs->hw.ix1.isac = card->para[1] + ISAC_DATA_OFFSET;
 	cs->hw.ix1.hscx = card->para[1] + HSCX_DATA_OFFSET;
 	cs->hw.ix1.cfg_reg = card->para[1];
@@ -300,13 +304,8 @@
 	       CardType[cs->typ], cs->irq,
 	       cs->hw.ix1.cfg_reg);
 	ix1_reset(cs);
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &ix1_card_msg;
 	cs->irq_func = &ix1micro_interrupt;
 	ISACVersion(cs, "ix1-Micro:");
diff -Nru a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c
--- a/drivers/isdn/hisax/jade.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/jade.c	Wed Jan  8 20:04:43 2003
@@ -20,16 +20,46 @@
 
 static spinlock_t jade_lock = SPIN_LOCK_UNLOCKED;
 
+static inline u8
+jade_read_reg(struct IsdnCardState *cs, int jade, u8 addr)
+{
+	return cs->bc_hw_ops->read_reg(cs, jade, addr);
+}
+
+static inline void
+jade_write_reg(struct IsdnCardState *cs, int jade, u8 addr, u8 val)
+{
+	cs->bc_hw_ops->write_reg(cs, jade, addr, val);
+}
+
+static inline void
+jade_read_fifo(struct BCState *bcs, u8 *p, int len)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	cs->bc_hw_ops->read_fifo(cs, hscx, p, len);
+}
+
+static inline void
+jade_write_fifo(struct BCState *bcs, u8 *p, int len)
+{
+	struct IsdnCardState *cs = bcs->cs;
+	u8 hscx = bcs->hw.hscx.hscx;
+
+	cs->bc_hw_ops->write_fifo(cs, hscx, p, len);
+}
+
 int __init
 JadeVersion(struct IsdnCardState *cs, char *s)
 {
     int ver,i;
     int to = 50;
-    cs->BC_Write_Reg(cs, -1, 0x50, 0x19);
+    jade_write_reg(cs, -1, 0x50, 0x19);
     i=0;
     while (to) {
     	udelay(1);
-	ver = cs->BC_Read_Reg(cs, -1, 0x60);
+	ver = jade_read_reg(cs, -1, 0x60);
 	to--;
 	if (ver)
     	    break;
@@ -41,28 +71,28 @@
     /* Wait for the JADE */
     udelay(10);
     /* Read version */
-    ver = cs->BC_Read_Reg(cs, -1, 0x60);
+    ver = jade_read_reg(cs, -1, 0x60);
     printk(KERN_INFO "%s JADE version: %d\n", s, ver);
     return (1);
 }
 
 /* Write to indirect accessible jade register set */
 static void
-jade_write_indirect(struct IsdnCardState *cs, u_char reg, u_char value)
+jade_write_indirect(struct IsdnCardState *cs, u8 reg, u8 value)
 {
     int to = 50;
     unsigned long flags;
-    u_char ret;
+    u8 ret;
     spin_lock_irqsave(&jade_lock, flags);
     /* Write the data */
-    cs->BC_Write_Reg(cs, -1, COMM_JADE+1, value);
+    jade_write_reg(cs, -1, COMM_JADE+1, value);
     /* Say JADE we wanna write indirect reg 'reg' */
-    cs->BC_Write_Reg(cs, -1, COMM_JADE, reg);
+    jade_write_reg(cs, -1, COMM_JADE, reg);
     to = 50;
     /* Wait for RDY goes high */
     while (to) {
     	udelay(1);
-	ret = cs->BC_Read_Reg(cs, -1, COMM_JADE);
+	ret = jade_read_reg(cs, -1, COMM_JADE);
 	to--;
 	if (ret & 1)
 	    /* Got acknowledge */
@@ -93,45 +123,45 @@
     bcs->mode = mode;
     bcs->channel = bc;
 	
-    cs->BC_Write_Reg(cs, jade, jade_HDLC_MODE, (mode == L1_MODE_TRANS ? jadeMODE_TMO:0x00));
-    cs->BC_Write_Reg(cs, jade, jade_HDLC_CCR0, (jadeCCR0_PU|jadeCCR0_ITF));
-    cs->BC_Write_Reg(cs, jade, jade_HDLC_CCR1, 0x00);
+    jade_write_reg(cs, jade, jade_HDLC_MODE, (mode == L1_MODE_TRANS ? jadeMODE_TMO:0x00));
+    jade_write_reg(cs, jade, jade_HDLC_CCR0, (jadeCCR0_PU|jadeCCR0_ITF));
+    jade_write_reg(cs, jade, jade_HDLC_CCR1, 0x00);
 
     jade_write_indirect(cs, jade_HDLC1SERRXPATH, 0x08);
     jade_write_indirect(cs, jade_HDLC2SERRXPATH, 0x08);
     jade_write_indirect(cs, jade_HDLC1SERTXPATH, 0x00);
     jade_write_indirect(cs, jade_HDLC2SERTXPATH, 0x00);
 
-    cs->BC_Write_Reg(cs, jade, jade_HDLC_XCCR, 0x07);
-    cs->BC_Write_Reg(cs, jade, jade_HDLC_RCCR, 0x07);
+    jade_write_reg(cs, jade, jade_HDLC_XCCR, 0x07);
+    jade_write_reg(cs, jade, jade_HDLC_RCCR, 0x07);
 
     if (bc == 0) {
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_TSAX, 0x00);
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_TSAR, 0x00);
+	jade_write_reg(cs, jade, jade_HDLC_TSAX, 0x00);
+	jade_write_reg(cs, jade, jade_HDLC_TSAR, 0x00);
     } else {
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_TSAX, 0x04);
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_TSAR, 0x04);
+	jade_write_reg(cs, jade, jade_HDLC_TSAX, 0x04);
+	jade_write_reg(cs, jade, jade_HDLC_TSAR, 0x04);
     }
     switch (mode) {
 	case (L1_MODE_NULL):
-		cs->BC_Write_Reg(cs, jade, jade_HDLC_MODE, jadeMODE_TMO);
+		jade_write_reg(cs, jade, jade_HDLC_MODE, jadeMODE_TMO);
 		break;
 	case (L1_MODE_TRANS):
-		cs->BC_Write_Reg(cs, jade, jade_HDLC_MODE, (jadeMODE_TMO|jadeMODE_RAC|jadeMODE_XAC));
+		jade_write_reg(cs, jade, jade_HDLC_MODE, (jadeMODE_TMO|jadeMODE_RAC|jadeMODE_XAC));
 		break;
 	case (L1_MODE_HDLC):
-		cs->BC_Write_Reg(cs, jade, jade_HDLC_MODE, (jadeMODE_RAC|jadeMODE_XAC));
+		jade_write_reg(cs, jade, jade_HDLC_MODE, (jadeMODE_RAC|jadeMODE_XAC));
 		break;
     }
     if (mode) {
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_RCMD, (jadeRCMD_RRES|jadeRCMD_RMC));
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_XCMD, jadeXCMD_XRES);
+	jade_write_reg(cs, jade, jade_HDLC_RCMD, (jadeRCMD_RRES|jadeRCMD_RMC));
+	jade_write_reg(cs, jade, jade_HDLC_XCMD, jadeXCMD_XRES);
 	/* Unmask ints */
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_IMR, 0xF8);
+	jade_write_reg(cs, jade, jade_HDLC_IMR, 0xF8);
     }
     else
 	/* Mask ints */
-	cs->BC_Write_Reg(cs, jade, jade_HDLC_IMR, 0x00);
+	jade_write_reg(cs, jade, jade_HDLC_IMR, 0x00);
 }
 
 static void
@@ -233,11 +263,16 @@
 	return (0);
 }
 
+static struct bc_l1_ops jade_l1_ops = {
+	.fill_fifo = jade_fill_fifo,
+};
+
 void __init
 initjade(struct IsdnCardState *cs)
 {
 	int val;
 
+	cs->bc_l1_ops = &jade_l1_ops;
 	cs->bcs[0].BC_SetStack = setstack_jade;
 	cs->bcs[1].BC_SetStack = setstack_jade;
 	cs->bcs[0].BC_Close = close_jadestate;
@@ -245,42 +280,43 @@
 	cs->bcs[0].hw.hscx.hscx = 0;
 	cs->bcs[1].hw.hscx.hscx = 1;
 
-	cs->BC_Write_Reg(cs, 0, jade_HDLC_IMR, 0x00);
-	cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0x00);
+	jade_write_reg(cs, 0, jade_HDLC_IMR, 0x00);
+	jade_write_reg(cs, 1, jade_HDLC_IMR, 0x00);
 
-	val = cs->BC_Read_Reg(cs, 1, jade_HDLC_ISR);
+	val = jade_read_reg(cs, 1, jade_HDLC_ISR);
 	debugl1(cs, "jade B ISTA %x", val);
-	val = cs->BC_Read_Reg(cs, 0, jade_HDLC_ISR);
+	val = jade_read_reg(cs, 0, jade_HDLC_ISR);
 	debugl1(cs, "jade A ISTA %x", val);
-	val = cs->BC_Read_Reg(cs, 1, jade_HDLC_STAR);
+	val = jade_read_reg(cs, 1, jade_HDLC_STAR);
 	debugl1(cs, "jade B STAR %x", val);
-	val = cs->BC_Read_Reg(cs, 0, jade_HDLC_STAR);
+	val = jade_read_reg(cs, 0, jade_HDLC_STAR);
 	debugl1(cs, "jade A STAR %x", val);
 
 	/* Unmask ints */
-	cs->BC_Write_Reg(cs, 0, jade_HDLC_IMR, 0xF8);
-	cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0xF8);
+	jade_write_reg(cs, 0, jade_HDLC_IMR, 0xF8);
+	jade_write_reg(cs, 1, jade_HDLC_IMR, 0xF8);
 
 	/* Stop DSP audio tx/rx */
 	jade_write_indirect(cs, 0x11, 0x0f);
 	jade_write_indirect(cs, 0x17, 0x2f);
 
 	/* Transparent Mode, RxTx inactive, No Test, No RFS/TFS */
-	cs->BC_Write_Reg(cs, 0, jade_HDLC_MODE, jadeMODE_TMO);
-	cs->BC_Write_Reg(cs, 1, jade_HDLC_MODE, jadeMODE_TMO);
+	jade_write_reg(cs, 0, jade_HDLC_MODE, jadeMODE_TMO);
+	jade_write_reg(cs, 1, jade_HDLC_MODE, jadeMODE_TMO);
 	/* Power down, 1-Idle, RxTx least significant bit first */
-	cs->BC_Write_Reg(cs, 0, jade_HDLC_CCR0, 0x00);
-	cs->BC_Write_Reg(cs, 1, jade_HDLC_CCR0, 0x00);
+	jade_write_reg(cs, 0, jade_HDLC_CCR0, 0x00);
+	jade_write_reg(cs, 1, jade_HDLC_CCR0, 0x00);
 	/* Mask all interrupts */
-	cs->BC_Write_Reg(cs, 0, jade_HDLC_IMR,  0x00);
-	cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR,  0x00);
+	jade_write_reg(cs, 0, jade_HDLC_IMR,  0x00);
+	jade_write_reg(cs, 1, jade_HDLC_IMR,  0x00);
 	/* Setup host access to hdlc controller */
 	jade_write_indirect(cs, jade_HDLCCNTRACCESS, (jadeINDIRECT_HAH1|jadeINDIRECT_HAH2));
 	/* Unmask HDLC int (don´t forget DSP int later on)*/
-	cs->BC_Write_Reg(cs, -1,jade_INT, (jadeINT_HDLC1|jadeINT_HDLC2));
+	jade_write_reg(cs, -1,jade_INT, (jadeINT_HDLC1|jadeINT_HDLC2));
 
 	/* once again TRANSPARENT */	
 	modejade(cs->bcs, 0, 0);
 	modejade(cs->bcs + 1, 0, 0);
 }
 
+#include "jade_irq.c"
diff -Nru a/drivers/isdn/hisax/jade.h b/drivers/isdn/hisax/jade.h
--- a/drivers/isdn/hisax/jade.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/jade.h	Wed Jan  8 20:04:43 2003
@@ -131,5 +131,8 @@
 extern void jade_sched_event(struct BCState *bcs, int event);
 extern void modejade(struct BCState *bcs, int mode, int bc);
 extern void initjade(struct IsdnCardState *cs);
+extern void jade_int_main(struct IsdnCardState *cs, u_char val, int jade);
+extern void jade_fill_fifo(struct BCState *bcs);
+
 
 #endif	/* __JADE_H__ */
diff -Nru a/drivers/isdn/hisax/jade_irq.c b/drivers/isdn/hisax/jade_irq.c
--- a/drivers/isdn/hisax/jade_irq.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/jade_irq.c	Wed Jan  8 20:04:43 2003
@@ -16,7 +16,7 @@
 {
   	int to = 50;
   	int mask = (reg == jade_HDLC_XCMD ? jadeSTAR_XCEC : jadeSTAR_RCEC);
-  	while ((READJADE(cs, jade, jade_HDLC_STAR) & mask) && to) {
+  	while ((jade_read_reg(cs, jade, jade_HDLC_STAR) & mask) && to) {
   		udelay(1);
   		to--;
   	}
@@ -32,13 +32,13 @@
 }
 
 static inline void
-WriteJADECMDR(struct IsdnCardState *cs, int jade, int reg, u_char data)
+WriteJADECMDR(struct IsdnCardState *cs, int jade, int reg, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&jade_irq_lock, flags);
 	waitforCEC(cs, jade, reg);
-	WRITEJADE(cs, jade, reg, data);
+	jade_write_reg(cs, jade, reg, data);
 	spin_unlock_irqrestore(&jade_irq_lock, flags);
 }
 
@@ -47,7 +47,7 @@
 static void
 jade_empty_fifo(struct BCState *bcs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 	struct IsdnCardState *cs = bcs->cs;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
@@ -62,7 +62,7 @@
 	}
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	bcs->hw.hscx.rcvidx += count;
-	READJADEFIFO(cs, bcs->hw.hscx.hscx, ptr, count);
+	jade_read_fifo(bcs, ptr, count);
 	WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_RCMD, jadeRCMD_RMC);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
@@ -74,7 +74,7 @@
 	}
 }
 
-static void
+void
 jade_fill_fifo(struct BCState *bcs)
 {
 	struct IsdnCardState *cs = bcs->cs;
@@ -88,16 +88,16 @@
 		return;
 
 	waitforXFW(cs, hscx);
-	WRITEJADEFIFO(cs, hscx, p, count);
+	jade_write_fifo(bcs, p, count);
 	WriteJADECMDR(cs, hscx, jade_HDLC_XCMD,
 		      more ? jadeXCMD_XF : (jadeXCMD_XF|jadeXCMD_XME));
 }
 
 
 static inline void
-jade_interrupt(struct IsdnCardState *cs, u_char val, u_char jade)
+jade_interrupt(struct IsdnCardState *cs, u8 val, u8 jade)
 {
-	u_char r;
+	u8 r;
 	struct BCState *bcs = cs->bcs + jade;
 	struct sk_buff *skb;
 	int fifo_size = 32;
@@ -108,7 +108,7 @@
 		return;
 
 	if (val & 0x80) {	/* RME */
-		r = READJADE(cs, i_jade, jade_HDLC_RSTA);
+		r = jade_read_reg(cs, i_jade, jade_HDLC_RSTA);
 		if ((r & 0xf0) != 0xa0) {
 			if (!(r & 0x80))
 				if (cs->debug & L1_DEB_WARN)
@@ -121,7 +121,7 @@
 					debugl1(cs, "JADE %c CRC error", 'A'+jade);
 			WriteJADECMDR(cs, jade, jade_HDLC_RCMD, jadeRCMD_RMC);
 		} else {
-			count = READJADE(cs, i_jade, jade_HDLC_RBCL) & 0x1F;
+			count = jade_read_reg(cs, i_jade, jade_HDLC_RBCL) & 0x1F;
 			if (count == 0)
 				count = fifo_size;
 			jade_empty_fifo(bcs, count);
@@ -164,8 +164,8 @@
 	WriteJADECMDR(bcs->cs, bcs->hw.hscx.hscx, jade_HDLC_XCMD, jadeXCMD_XRES);
 }
 
-static inline void
-jade_int_main(struct IsdnCardState *cs, u_char val, int jade)
+void
+jade_int_main(struct IsdnCardState *cs, u8 val, int jade)
 {
 	struct BCState *bcs;
 	bcs = cs->bcs + jade;
diff -Nru a/drivers/isdn/hisax/l3_1tr6.c b/drivers/isdn/hisax/l3_1tr6.c
--- a/drivers/isdn/hisax/l3_1tr6.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/l3_1tr6.c	Wed Jan  8 20:04:44 2003
@@ -28,10 +28,10 @@
 	*ptr++ = mty
 
 static void
-l3_1TR6_message(struct l3_process *pc, u_char mt, u_char pd)
+l3_1TR6_message(struct l3_process *pc, u8 mt, u8 pd)
 {
 	struct sk_buff *skb;
-	u_char *p;
+	u8 *p;
 
 	if (!(skb = l3_alloc_skb(4)))
 		return;
@@ -41,7 +41,7 @@
 }
 
 static void
-l3_1tr6_release_req(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_release_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	StopAllL3Timer(pc);
 	newl3state(pc, 19);
@@ -50,7 +50,7 @@
 }
 
 static void
-l3_1tr6_invalid(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_invalid(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 
@@ -59,7 +59,7 @@
 }
 
 static void
-l3_1tr6_error(struct l3_process *pc, u_char *msg, struct sk_buff *skb)
+l3_1tr6_error(struct l3_process *pc, u8 *msg, struct sk_buff *skb)
 {
 	dev_kfree_skb(skb);
 	if (pc->st->l3.debug & L3_DEB_WARN)
@@ -68,14 +68,14 @@
 }
 
 static void
-l3_1tr6_setup_req(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_setup_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[128];
-	u_char *p = tmp;
-	u_char *teln;
-	u_char *eaz;
-	u_char channel = 0;
+	u8 tmp[128];
+	u8 *p = tmp;
+	u8 *teln;
+	u8 *eaz;
+	u8 channel = 0;
 	int l;
 
 	MsgHead(p, pc->callref, MT_N1_SETUP, PROTO_DIS_N1);
@@ -157,9 +157,9 @@
 }
 
 static void
-l3_1tr6_setup(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_setup(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	int bcfound = 0;
 	char tmp[80];
 	struct sk_buff *skb = arg;
@@ -228,9 +228,9 @@
 }
 
 static void
-l3_1tr6_setup_ack(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_setup_ack(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 
 	L3DelTimer(&pc->timer);
@@ -256,9 +256,9 @@
 }
 
 static void
-l3_1tr6_call_sent(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_call_sent(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 
 	L3DelTimer(&pc->timer);
@@ -288,7 +288,7 @@
 }
 
 static void
-l3_1tr6_alert(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_alert(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 
@@ -299,9 +299,9 @@
 }
 
 static void
-l3_1tr6_info(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_info(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	int i, tmpcharge = 0;
 	char a_charge[8], tmp[32];
 	struct sk_buff *skb = arg;
@@ -328,7 +328,7 @@
 }
 
 static void
-l3_1tr6_info_s2(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_info_s2(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 
@@ -336,7 +336,7 @@
 }
 
 static void
-l3_1tr6_connect(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_connect(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 
@@ -352,10 +352,10 @@
 }
 
 static void
-l3_1tr6_rel(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_rel(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 
 	p = skb->data;
 	if ((p = findie(p, skb->len, WE0_cause, 0))) {
@@ -383,7 +383,7 @@
 }
 
 static void
-l3_1tr6_rel_ack(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_rel_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 
@@ -396,10 +396,10 @@
 }
 
 static void
-l3_1tr6_disc(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_disc(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 	int i, tmpcharge = 0;
 	char a_charge[8], tmp[32];
 
@@ -451,7 +451,7 @@
 
 
 static void
-l3_1tr6_connect_ack(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_connect_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 
@@ -467,18 +467,18 @@
 }
 
 static void
-l3_1tr6_alert_req(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_alert_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	newl3state(pc, 7);
 	l3_1TR6_message(pc, MT_N1_ALERT, PROTO_DIS_N1);
 }
 
 static void
-l3_1tr6_setup_rsp(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_setup_rsp(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[24];
-	u_char *p = tmp;
+	u8 tmp[24];
+	u8 *p = tmp;
 	int l;
 
 	MsgHead(p, pc->callref, MT_N1_CONN, PROTO_DIS_N1);
@@ -508,20 +508,20 @@
 }
 
 static void
-l3_1tr6_reset(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_reset(struct l3_process *pc, u8 pr, void *arg)
 {
 	release_l3_process(pc);
 }
 
 static void
-l3_1tr6_disconnect_req(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_disconnect_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
-	u_char cause = 0x10;
-	u_char clen = 1;
+	u8 cause = 0x10;
+	u8 clen = 1;
 
 	if (pc->para.cause > 0)
 		cause = pc->para.cause;
@@ -553,7 +553,7 @@
 }
 
 static void
-l3_1tr6_t303(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_t303(struct l3_process *pc, u8 pr, void *arg)
 {
 	if (pc->N303 > 0) {
 		pc->N303--;
@@ -567,7 +567,7 @@
 }
 
 static void
-l3_1tr6_t304(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_t304(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.cause = 0xE6;
@@ -576,14 +576,14 @@
 }
 
 static void
-l3_1tr6_t305(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_t305(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
-	u_char cause = 0x90;
-	u_char clen = 1;
+	u8 cause = 0x90;
+	u8 clen = 1;
 
 	L3DelTimer(&pc->timer);
 	if (pc->para.cause != NO_CAUSE)
@@ -612,7 +612,7 @@
 }
 
 static void
-l3_1tr6_t310(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_t310(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.cause = 0xE6;
@@ -621,7 +621,7 @@
 }
 
 static void
-l3_1tr6_t313(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_t313(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.cause = 0xE6;
@@ -630,7 +630,7 @@
 }
 
 static void
-l3_1tr6_t308_1(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_t308_1(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	l3_1TR6_message(pc, MT_N1_REL, PROTO_DIS_N1);
@@ -639,7 +639,7 @@
 }
 
 static void
-l3_1tr6_t308_2(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_t308_2(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	L3L4(pc->st, CC_RELEASE_ERR, pc);
@@ -647,7 +647,7 @@
 }
 
 static void
-l3_1tr6_dl_reset(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_dl_reset(struct l3_process *pc, u8 pr, void *arg)
 {
         pc->para.cause = CAUSE_LocalProcErr;
         l3_1tr6_disconnect_req(pc, pr, NULL);
@@ -655,7 +655,7 @@
 }
 
 static void
-l3_1tr6_dl_release(struct l3_process *pc, u_char pr, void *arg)
+l3_1tr6_dl_release(struct l3_process *pc, u8 pr, void *arg)
 {
         newl3state(pc, 0);
         pc->para.cause = 0x1b;          /* Destination out of order */
diff -Nru a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c
--- a/drivers/isdn/hisax/l3dss1.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/l3dss1.c	Wed Jan  8 20:04:43 2003
@@ -136,7 +136,7 @@
 /* and a return result is delivered. id specifies the invoke id.   */
 /*******************************************************************/ 
 static void 
-l3dss1_dummy_return_result(struct PStack *st, int id, u_char *p, u_char nlen)
+l3dss1_dummy_return_result(struct PStack *st, int id, u8 *p, u8 nlen)
 { isdn_ctrl ic;
   struct IsdnCardState *cs;
   struct l3_process *pc = NULL; 
@@ -203,7 +203,7 @@
 /*******************************************************************/ 
 static void 
 l3dss1_dummy_invoke(struct PStack *st, int cr, int id, 
-                    int ident, u_char *p, u_char nlen)
+                    int ident, u8 *p, u8 nlen)
 { isdn_ctrl ic;
   struct IsdnCardState *cs;
   
@@ -227,7 +227,7 @@
 
 static void
 l3dss1_parse_facility(struct PStack *st, struct l3_process *pc,
-                      int cr, u_char * p)
+                      int cr, u8 * p)
 {
 	int qd_len = 0;
 	unsigned char nlen = 0, ilen, cp_tag;
@@ -504,10 +504,10 @@
 }
 
 static void
-l3dss1_message(struct l3_process *pc, u_char mt)
+l3dss1_message(struct l3_process *pc, u8 mt)
 {
 	struct sk_buff *skb;
-	u_char *p;
+	u8 *p;
 
 	if (!(skb = l3_alloc_skb(4)))
 		return;
@@ -517,11 +517,11 @@
 }
 
 static void
-l3dss1_message_cause(struct l3_process *pc, u_char mt, u_char cause)
+l3dss1_message_cause(struct l3_process *pc, u8 mt, u8 cause)
 {
 	struct sk_buff *skb;
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 
 	MsgHead(p, pc->callref, mt);
@@ -538,10 +538,10 @@
 }
 
 static void
-l3dss1_status_send(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_status_send(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	struct sk_buff *skb;
 
@@ -564,14 +564,14 @@
 }
 
 static void
-l3dss1_msg_without_setup(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_msg_without_setup(struct l3_process *pc, u8 pr, void *arg)
 {
 	/* This routine is called if here was no SETUP made (checks in dss1up and in
 	 * l3dss1_setup) and a RELEASE_COMPLETE have to be sent with an error code
 	 * MT_STATUS_ENQUIRE in the NULL state is handled too
 	 */
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	struct sk_buff *skb;
 
@@ -690,7 +690,7 @@
 };
 
 static int
-getmax_ie_len(u_char ie) {
+getmax_ie_len(u8 ie) {
 	int i = 0;
 	while (max_ie_len[i].ie != -1) {
 		if (max_ie_len[i].ie == ie)
@@ -701,7 +701,7 @@
 }
 
 static int
-ie_in_set(struct l3_process *pc, u_char ie, int *checklist) {
+ie_in_set(struct l3_process *pc, u8 ie, int *checklist) {
 	int ret = 1;
 
 	while (*checklist != -1) {
@@ -721,13 +721,13 @@
 check_infoelements(struct l3_process *pc, struct sk_buff *skb, int *checklist)
 {
 	int *cl = checklist;
-	u_char mt;
-	u_char *p, ie;
+	u8 mt;
+	u8 *p, ie;
 	int l, newpos, oldpos;
 	int err_seq = 0, err_len = 0, err_compr = 0, err_ureg = 0;
-	u_char codeset = 0;
-	u_char old_codeset = 0;
-	u_char codelock = 1;
+	u8 codeset = 0;
+	u8 old_codeset = 0;
+	u8 codelock = 1;
 	
 	p = skb->data;
 	/* skip cr */
@@ -870,7 +870,7 @@
 
 static int
 l3dss1_get_channel_id(struct l3_process *pc, struct sk_buff *skb) {
-	u_char *p;
+	u8 *p;
 
 	p = skb->data;
 	if ((p = findie(p, skb->len, IE_CHANNEL_ID, 0))) {
@@ -893,8 +893,8 @@
 
 static int
 l3dss1_get_cause(struct l3_process *pc, struct sk_buff *skb) {
-	u_char l, i=0;
-	u_char *p;
+	u8 l, i=0;
+	u8 *p;
 
 	p = skb->data;
 	pc->para.cause = 31;
@@ -931,11 +931,11 @@
 }
 
 static void
-l3dss1_msg_with_uus(struct l3_process *pc, u_char cmd)
+l3dss1_msg_with_uus(struct l3_process *pc, u8 cmd)
 {
 	struct sk_buff *skb;
-	u_char tmp[16+40];
-	u_char *p = tmp;
+	u8 tmp[16+40];
+	u8 *p = tmp;
 	int l;
 
 	MsgHead(p, pc->callref, cmd);
@@ -957,7 +957,7 @@
 } /* l3dss1_msg_with_uus */
 
 static void
-l3dss1_release_req(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_release_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	StopAllL3Timer(pc);
 	newl3state(pc, 19);
@@ -969,7 +969,7 @@
 }
 
 static void
-l3dss1_release_cmpl(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_release_cmpl(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -987,8 +987,8 @@
 
 #if EXT_BEARER_CAPS
 
-static u_char *
-EncodeASyncParams(u_char * p, u_char si2)
+static u8 *
+EncodeASyncParams(u8 * p, u8 si2)
 {				// 7c 06 88  90 21 42 00 bb
 
 	p[0] = 0;
@@ -1052,8 +1052,8 @@
 	return p + 3;
 }
 
-static  u_char
-EncodeSyncParams(u_char si2, u_char ai)
+static  u8
+EncodeSyncParams(u8 si2, u8 ai)
 {
 
 	switch (si2) {
@@ -1097,10 +1097,10 @@
 }
 
 
-static u_char
-DecodeASyncParams(u_char si2, u_char * p)
+static u8
+DecodeASyncParams(u8 si2, u8 * p)
 {
-	u_char info;
+	u8 info;
 
 	switch (p[5]) {
 		case 66:	// 1200 bit/s
@@ -1154,8 +1154,8 @@
 }
 
 
-static u_char
-DecodeSyncParams(u_char si2, u_char info)
+static u8
+DecodeSyncParams(u8 si2, u8 info)
 {
 	info &= 0x7f;
 	switch (info) {
@@ -1195,10 +1195,10 @@
 	}
 }
 
-static u_char
+static u8
 DecodeSI2(struct sk_buff *skb)
 {
-	u_char *p;		//, *pend=skb->data + skb->len;
+	u8 *p;		//, *pend=skb->data + skb->len;
 
 	if ((p = findie(skb->data, skb->len, 0x7c, 0))) {
 		switch (p[4] & 0x0f) {
@@ -1225,20 +1225,20 @@
 
 
 static void
-l3dss1_setup_req(struct l3_process *pc, u_char pr,
+l3dss1_setup_req(struct l3_process *pc, u8 pr,
 		 void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[128];
-	u_char *p = tmp;
-	u_char channel = 0;
-
-        u_char send_keypad;
-	u_char screen = 0x80;
-	u_char *teln;
-	u_char *msn;
-	u_char *sub;
-	u_char *sp;
+	u8 tmp[128];
+	u8 *p = tmp;
+	u8 channel = 0;
+
+        u8 send_keypad;
+	u8 screen = 0x80;
+	u8 *teln;
+	u8 *msn;
+	u8 *sub;
+	u8 *sp;
 	int l;
 
 	MsgHead(p, pc->callref, MT_SETUP);
@@ -1436,7 +1436,7 @@
 }
 
 static void
-l3dss1_call_proc(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_call_proc(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int id, ret;
@@ -1475,7 +1475,7 @@
 }
 
 static void
-l3dss1_setup_ack(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_setup_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int id, ret;
@@ -1514,12 +1514,12 @@
 }
 
 static void
-l3dss1_disconnect(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_disconnect(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 	int ret;
-	u_char cause = 0;
+	u8 cause = 0;
 
 	StopAllL3Timer(pc);
 	if ((ret = l3dss1_get_cause(pc, skb))) {
@@ -1552,7 +1552,7 @@
 }
 
 static void
-l3dss1_connect(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_connect(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -1572,7 +1572,7 @@
 }
 
 static void
-l3dss1_alerting(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_alerting(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -1590,9 +1590,9 @@
 }
 
 static void
-l3dss1_setup(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_setup(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	int bcfound = 0;
 	char tmp[80];
 	struct sk_buff *skb = arg;
@@ -1756,19 +1756,19 @@
 }
 
 static void
-l3dss1_reset(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_reset(struct l3_process *pc, u8 pr, void *arg)
 {
 	dss1_release_l3_process(pc);
 }
 
 static void
-l3dss1_disconnect_req(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_disconnect_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[16+40];
-	u_char *p = tmp;
+	u8 tmp[16+40];
+	u8 *p = tmp;
 	int l;
-	u_char cause = 16;
+	u8 cause = 16;
 
 	if (pc->para.cause != NO_CAUSE)
 		cause = pc->para.cause;
@@ -1801,7 +1801,7 @@
 }
 
 static void
-l3dss1_setup_rsp(struct l3_process *pc, u_char pr,
+l3dss1_setup_rsp(struct l3_process *pc, u8 pr,
 		 void *arg)
 {
         if (!pc->para.bchannel) 
@@ -1817,7 +1817,7 @@
 }
 
 static void
-l3dss1_connect_ack(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_connect_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -1835,13 +1835,13 @@
 }
 
 static void
-l3dss1_reject_req(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_reject_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
-	u_char cause = 21;
+	u8 cause = 21;
 
 	if (pc->para.cause != NO_CAUSE)
 		cause = pc->para.cause;
@@ -1864,10 +1864,10 @@
 }
 
 static void
-l3dss1_release(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_release(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 	int ret, cause=0;
 
 	StopAllL3Timer(pc);
@@ -1898,7 +1898,7 @@
 }
 
 static void
-l3dss1_alert_req(struct l3_process *pc, u_char pr,
+l3dss1_alert_req(struct l3_process *pc, u8 pr,
 		 void *arg)
 {
 	newl3state(pc, 7);
@@ -1909,7 +1909,7 @@
 }
 
 static void
-l3dss1_proceed_req(struct l3_process *pc, u_char pr,
+l3dss1_proceed_req(struct l3_process *pc, u8 pr,
 		   void *arg)
 {
 	newl3state(pc, 9);
@@ -1918,7 +1918,7 @@
 }
 
 static void
-l3dss1_setup_ack_req(struct l3_process *pc, u_char pr,
+l3dss1_setup_ack_req(struct l3_process *pc, u8 pr,
 		   void *arg)
 {
 	newl3state(pc, 25);
@@ -1931,8 +1931,8 @@
 /* deliver a incoming display message to HL */
 /********************************************/
 static void
-l3dss1_deliver_display(struct l3_process *pc, int pr, u_char *infp)
-{       u_char len;
+l3dss1_deliver_display(struct l3_process *pc, int pr, u8 *infp)
+{       u8 len;
         isdn_ctrl ic; 
 	struct IsdnCardState *cs;
         char *p; 
@@ -1954,11 +1954,11 @@
 
 
 static void
-l3dss1_progress(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_progress(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int err = 0;
-	u_char *p;
+	u8 *p;
 
 	if ((p = findie(skb->data, skb->len, IE_PROGRESS, 0))) {
 		if (p[1] != 2) {
@@ -2011,11 +2011,11 @@
 }
 
 static void
-l3dss1_notify(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_notify(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int err = 0;
-	u_char *p;
+	u8 *p;
 
 	if ((p = findie(skb->data, skb->len, IE_NOTIFY, 0))) {
 		if (p[1] != 1) {
@@ -2052,7 +2052,7 @@
 }
 
 static void
-l3dss1_status_enq(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_status_enq(struct l3_process *pc, u8 pr, void *arg)
 {
 	int ret;
 	struct sk_buff *skb = arg;
@@ -2064,11 +2064,11 @@
 }
 
 static void
-l3dss1_information(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_information(struct l3_process *pc, u8 pr, void *arg)
 {
 	int ret;
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 	char tmp[32];
 
 	ret = check_infoelements(pc, skb, ie_INFORMATION);
@@ -2089,14 +2089,14 @@
 /******************************/
 /* handle deflection requests */
 /******************************/
-static void l3dss1_redir_req(struct l3_process *pc, u_char pr, void *arg)
+static void l3dss1_redir_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[128];
-	u_char *p = tmp;
-        u_char *subp;
-        u_char len_phone = 0;
-        u_char len_sub = 0;
+	u8 tmp[128];
+	u8 *p = tmp;
+        u8 *subp;
+        u8 len_phone = 0;
+        u8 len_sub = 0;
 	int l; 
 
 
@@ -2161,7 +2161,7 @@
 /********************************************/
 /* handle deflection request in early state */
 /********************************************/
-static void l3dss1_redir_req_early(struct l3_process *pc, u_char pr, void *arg)
+static void l3dss1_redir_req_early(struct l3_process *pc, u8 pr, void *arg)
 {
   l3dss1_proceed_req(pc,pr,arg);
   l3dss1_redir_req(pc,pr,arg);
@@ -2173,9 +2173,9 @@
 /* remote operations with dummy  callref.      */
 /***********************************************/
 static int l3dss1_cmd_global(struct PStack *st, isdn_ctrl *ic)
-{ u_char id;
-  u_char temp[265];
-  u_char *p = temp;
+{ u8 id;
+  u8 temp[265];
+  u8 *p = temp;
   int i, l, proc_len; 
   struct sk_buff *skb;
   struct l3_process *pc = NULL;
@@ -2279,9 +2279,9 @@
 } /* l3dss1_io_timer */
 
 static void
-l3dss1_release_ind(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_release_ind(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 	int callState = 0;
 	p = skb->data;
@@ -2304,12 +2304,12 @@
 }
 
 static void
-l3dss1_dummy(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_dummy(struct l3_process *pc, u8 pr, void *arg)
 {
 }
 
 static void
-l3dss1_t302(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t302(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2319,7 +2319,7 @@
 }
 
 static void
-l3dss1_t303(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t303(struct l3_process *pc, u8 pr, void *arg)
 {
 	if (pc->N303 > 0) {
 		pc->N303--;
@@ -2334,7 +2334,7 @@
 }
 
 static void
-l3dss1_t304(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t304(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2345,13 +2345,13 @@
 }
 
 static void
-l3dss1_t305(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t305(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	struct sk_buff *skb;
-	u_char cause = 16;
+	u8 cause = 16;
 
 	L3DelTimer(&pc->timer);
 	if (pc->para.cause != NO_CAUSE)
@@ -2374,7 +2374,7 @@
 }
 
 static void
-l3dss1_t310(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t310(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2384,7 +2384,7 @@
 }
 
 static void
-l3dss1_t313(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t313(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2394,7 +2394,7 @@
 }
 
 static void
-l3dss1_t308_1(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t308_1(struct l3_process *pc, u8 pr, void *arg)
 {
 	newl3state(pc, 19);
 	L3DelTimer(&pc->timer);
@@ -2403,7 +2403,7 @@
 }
 
 static void
-l3dss1_t308_2(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t308_2(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	L3L4(pc->st, CC_RELEASE_ERR, pc);
@@ -2411,7 +2411,7 @@
 }
 
 static void
-l3dss1_t318(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t318(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.cause = 102;	/* Timer expiry */
@@ -2423,7 +2423,7 @@
 }
 
 static void
-l3dss1_t319(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_t319(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.cause = 102;	/* Timer expiry */
@@ -2433,7 +2433,7 @@
 }
 
 static void
-l3dss1_restart(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_restart(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	L3L4(pc->st, CC_RELEASE | INDICATION, pc);
@@ -2441,12 +2441,12 @@
 }
 
 static void
-l3dss1_status(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_status(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 	int ret; 
-	u_char cause = 0, callState = 0;
+	u8 cause = 0, callState = 0;
 	
 	if ((ret = l3dss1_get_cause(pc, skb))) {
 		if (pc->debug & L3_DEB_WARN)
@@ -2474,7 +2474,7 @@
 			cause = 99;
 	}
 	if (cause) {
-		u_char tmp;
+		u8 tmp;
 		
 		if (pc->debug & L3_DEB_WARN)
 			l3_debug(pc->st, "STATUS error(%d/%d)",ret,cause);
@@ -2499,7 +2499,7 @@
 }
 
 static void
-l3dss1_facility(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_facility(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2507,20 +2507,20 @@
 	ret = check_infoelements(pc, skb, ie_FACILITY);
 	l3dss1_std_ie_err(pc, ret);
  	  {
-		u_char *p;
+		u8 *p;
 		if ((p = findie(skb->data, skb->len, IE_FACILITY, 0)))
 			l3dss1_parse_facility(pc->st, pc, pc->callref, p);
 	}
 }
 
 static void
-l3dss1_suspend_req(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_suspend_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[32];
-	u_char *p = tmp;
-	u_char i, l;
-	u_char *msg = pc->chan->setup.phone;
+	u8 tmp[32];
+	u8 *p = tmp;
+	u8 i, l;
+	u8 *msg = pc->chan->setup.phone;
 
 	MsgHead(p, pc->callref, MT_SUSPEND);
 	l = *msg++;
@@ -2543,7 +2543,7 @@
 }
 
 static void
-l3dss1_suspend_ack(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_suspend_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2560,7 +2560,7 @@
 }
 
 static void
-l3dss1_suspend_rej(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_suspend_rej(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2588,13 +2588,13 @@
 }
 
 static void
-l3dss1_resume_req(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_resume_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[32];
-	u_char *p = tmp;
-	u_char i, l;
-	u_char *msg = pc->para.setup.phone;
+	u8 tmp[32];
+	u8 *p = tmp;
+	u8 i, l;
+	u8 *msg = pc->para.setup.phone;
 
 	MsgHead(p, pc->callref, MT_RESUME);
 
@@ -2618,7 +2618,7 @@
 }
 
 static void
-l3dss1_resume_ack(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_resume_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int id, ret;
@@ -2652,7 +2652,7 @@
 }
 
 static void
-l3dss1_resume_rej(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_resume_rej(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2681,11 +2681,11 @@
 }
 
 static void
-l3dss1_global_restart(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_global_restart(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char tmp[32];
-	u_char *p;
-	u_char ri, ch = 0, chan = 0;
+	u8 tmp[32];
+	u8 *p;
+	u8 ri, ch = 0, chan = 0;
 	int l;
 	struct sk_buff *skb = arg;
 	struct l3_process *up;
@@ -2735,7 +2735,7 @@
 }
 
 static void
-l3dss1_dl_reset(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_dl_reset(struct l3_process *pc, u8 pr, void *arg)
 {
         pc->para.cause = 0x29;          /* Temporary failure */
         pc->para.loc = 0;
@@ -2744,7 +2744,7 @@
 }
 
 static void
-l3dss1_dl_release(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_dl_release(struct l3_process *pc, u8 pr, void *arg)
 {
         newl3state(pc, 0);
         pc->para.cause = 0x1b;          /* Destination out of order */
@@ -2754,7 +2754,7 @@
 }
 
 static void
-l3dss1_dl_reestablish(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_dl_reestablish(struct l3_process *pc, u8 pr, void *arg)
 {
         L3DelTimer(&pc->timer);
         L3AddTimer(&pc->timer, T309, CC_T309);
@@ -2762,7 +2762,7 @@
 }
  
 static void
-l3dss1_dl_reest_status(struct l3_process *pc, u_char pr, void *arg)
+l3dss1_dl_reest_status(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
  
@@ -2920,8 +2920,8 @@
 static void
 global_handler(struct PStack *st, int mt, struct sk_buff *skb)
 {
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	int i;
 	struct l3_process *proc = st->l3.global;
@@ -2963,7 +2963,7 @@
 {
 	int i, mt, cr, cause, callState;
 	char *ptr;
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 	struct l3_process *proc;
 
diff -Nru a/drivers/isdn/hisax/l3dss1.h b/drivers/isdn/hisax/l3dss1.h
--- a/drivers/isdn/hisax/l3dss1.h	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/l3dss1.h	Wed Jan  8 20:04:45 2003
@@ -109,7 +109,7 @@
 typedef struct
   { unsigned char invoke_id; /* used invoke id in remote ops, 0 = not active */
     ulong ll_id; /* remebered ll id */
-    u_char remote_operation; /* handled remote operation, 0 = not active */ 
+    u8 remote_operation; /* handled remote operation, 0 = not active */ 
     int proc; /* rememered procedure */  
     ulong remote_result; /* result of remote operation for statcallb */
     char uus1_data[35]; /* data send during alerting or disconnect */
diff -Nru a/drivers/isdn/hisax/l3ni1.c b/drivers/isdn/hisax/l3ni1.c
--- a/drivers/isdn/hisax/l3ni1.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/l3ni1.c	Wed Jan  8 20:04:43 2003
@@ -134,7 +134,7 @@
 /* and a return result is delivered. id specifies the invoke id.   */
 /*******************************************************************/ 
 static void 
-l3ni1_dummy_return_result(struct PStack *st, int id, u_char *p, u_char nlen)
+l3ni1_dummy_return_result(struct PStack *st, int id, u8 *p, u8 nlen)
 { isdn_ctrl ic;
   struct IsdnCardState *cs;
   struct l3_process *pc = NULL; 
@@ -201,7 +201,7 @@
 /*******************************************************************/ 
 static void 
 l3ni1_dummy_invoke(struct PStack *st, int cr, int id, 
-                    int ident, u_char *p, u_char nlen)
+                    int ident, u8 *p, u8 nlen)
 { isdn_ctrl ic;
   struct IsdnCardState *cs;
 
@@ -225,7 +225,7 @@
 
 static void
 l3ni1_parse_facility(struct PStack *st, struct l3_process *pc,
-                      int cr, u_char * p)
+                      int cr, u8 * p)
 {
 	int qd_len = 0;
 	unsigned char nlen = 0, ilen, cp_tag;
@@ -432,10 +432,10 @@
 }
 
 static void
-l3ni1_message(struct l3_process *pc, u_char mt)
+l3ni1_message(struct l3_process *pc, u8 mt)
 {
 	struct sk_buff *skb;
-	u_char *p;
+	u8 *p;
 
 	if (!(skb = l3_alloc_skb(4)))
 		return;
@@ -445,15 +445,15 @@
 }
 
 static void
-l3ni1_message_plus_chid(struct l3_process *pc, u_char mt)
+l3ni1_message_plus_chid(struct l3_process *pc, u8 mt)
 /* sends an l3 messages plus channel id -  added GE 05/09/00 */
 {
 	struct sk_buff *skb;
-	u_char tmp[16];
-	u_char *p = tmp;
-	u_char chid;
+	u8 tmp[16];
+	u8 *p = tmp;
+	u8 chid;
 
-	chid = (u_char)(pc->para.bchannel & 0x03) | 0x88;
+	chid = (u8)(pc->para.bchannel & 0x03) | 0x88;
 	MsgHead(p, pc->callref, mt);
 	*p++ = IE_CHANNEL_ID;
 	*p++ = 0x01;
@@ -466,11 +466,11 @@
 }
 
 static void
-l3ni1_message_cause(struct l3_process *pc, u_char mt, u_char cause)
+l3ni1_message_cause(struct l3_process *pc, u8 mt, u8 cause)
 {
 	struct sk_buff *skb;
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 
 	MsgHead(p, pc->callref, mt);
@@ -487,10 +487,10 @@
 }
 
 static void
-l3ni1_status_send(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_status_send(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	struct sk_buff *skb;
 
@@ -513,14 +513,14 @@
 }
 
 static void
-l3ni1_msg_without_setup(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_msg_without_setup(struct l3_process *pc, u8 pr, void *arg)
 {
 	/* This routine is called if here was no SETUP made (checks in ni1up and in
 	 * l3ni1_setup) and a RELEASE_COMPLETE have to be sent with an error code
 	 * MT_STATUS_ENQUIRE in the NULL state is handled too
 	 */
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	struct sk_buff *skb;
 
@@ -639,7 +639,7 @@
 };
 
 static int
-getmax_ie_len(u_char ie) {
+getmax_ie_len(u8 ie) {
 	int i = 0;
 	while (max_ie_len[i].ie != -1) {
 		if (max_ie_len[i].ie == ie)
@@ -650,7 +650,7 @@
 }
 
 static int
-ie_in_set(struct l3_process *pc, u_char ie, int *checklist) {
+ie_in_set(struct l3_process *pc, u8 ie, int *checklist) {
 	int ret = 1;
 
 	while (*checklist != -1) {
@@ -670,13 +670,13 @@
 check_infoelements(struct l3_process *pc, struct sk_buff *skb, int *checklist)
 {
 	int *cl = checklist;
-	u_char mt;
-	u_char *p, ie;
+	u8 mt;
+	u8 *p, ie;
 	int l, newpos, oldpos;
 	int err_seq = 0, err_len = 0, err_compr = 0, err_ureg = 0;
-	u_char codeset = 0;
-	u_char old_codeset = 0;
-	u_char codelock = 1;
+	u8 codeset = 0;
+	u8 old_codeset = 0;
+	u8 codelock = 1;
 	
 	p = skb->data;
 	/* skip cr */
@@ -819,7 +819,7 @@
 
 static int
 l3ni1_get_channel_id(struct l3_process *pc, struct sk_buff *skb) {
-	u_char *p;
+	u8 *p;
 
 	p = skb->data;
 	if ((p = findie(p, skb->len, IE_CHANNEL_ID, 0))) {
@@ -842,8 +842,8 @@
 
 static int
 l3ni1_get_cause(struct l3_process *pc, struct sk_buff *skb) {
-	u_char l, i=0;
-	u_char *p;
+	u8 l, i=0;
+	u8 *p;
 
 	p = skb->data;
 	pc->para.cause = 31;
@@ -880,11 +880,11 @@
 }
 
 static void
-l3ni1_msg_with_uus(struct l3_process *pc, u_char cmd)
+l3ni1_msg_with_uus(struct l3_process *pc, u8 cmd)
 {
 	struct sk_buff *skb;
-	u_char tmp[16+40];
-	u_char *p = tmp;
+	u8 tmp[16+40];
+	u8 *p = tmp;
 	int l;
 
 	MsgHead(p, pc->callref, cmd);
@@ -906,7 +906,7 @@
 } /* l3ni1_msg_with_uus */
 
 static void
-l3ni1_release_req(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_release_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	StopAllL3Timer(pc);
 	newl3state(pc, 19);
@@ -918,7 +918,7 @@
 }
 
 static void
-l3ni1_release_cmpl(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_release_cmpl(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -936,8 +936,8 @@
 
 #if EXT_BEARER_CAPS
 
-static u_char *
-EncodeASyncParams(u_char * p, u_char si2)
+static u8 *
+EncodeASyncParams(u8 * p, u8 si2)
 {				// 7c 06 88  90 21 42 00 bb
 
 	p[0] = 0;
@@ -1001,8 +1001,8 @@
 	return p + 3;
 }
 
-static u_char
-EncodeSyncParams(u_char si2, u_char ai)
+static u8
+EncodeSyncParams(u8 si2, u8 ai)
 {
 
 	switch (si2) {
@@ -1046,10 +1046,10 @@
 }
 
 
-static u_char
-DecodeASyncParams(u_char si2, u_char * p)
+static u8
+DecodeASyncParams(u8 si2, u8 * p)
 {
-	u_char info;
+	u8 info;
 
 	switch (p[5]) {
 		case 66:	// 1200 bit/s
@@ -1103,8 +1103,8 @@
 }
 
 
-static u_char
-DecodeSyncParams(u_char si2, u_char info)
+static u8
+DecodeSyncParams(u8 si2, u8 info)
 {
 	info &= 0x7f;
 	switch (info) {
@@ -1144,10 +1144,10 @@
 	}
 }
 
-static u_char
+static u8
 DecodeSI2(struct sk_buff *skb)
 {
-	u_char *p;		//, *pend=skb->data + skb->len;
+	u8 *p;		//, *pend=skb->data + skb->len;
 
 	if ((p = findie(skb->data, skb->len, 0x7c, 0))) {
 		switch (p[4] & 0x0f) {
@@ -1174,16 +1174,16 @@
 
 
 static void
-l3ni1_setup_req(struct l3_process *pc, u_char pr,
+l3ni1_setup_req(struct l3_process *pc, u8 pr,
 		 void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[128];
-	u_char *p = tmp;
+	u8 tmp[128];
+	u8 *p = tmp;
 
-	u_char *teln;
-	u_char *sub;
-	u_char *sp;
+	u8 *teln;
+	u8 *sub;
+	u8 *sp;
 	int l;
 
 	MsgHead(p, pc->callref, MT_SETUP);
@@ -1289,7 +1289,7 @@
 }
 
 static void
-l3ni1_call_proc(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_call_proc(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int id, ret;
@@ -1328,7 +1328,7 @@
 }
 
 static void
-l3ni1_setup_ack(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_setup_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int id, ret;
@@ -1367,12 +1367,12 @@
 }
 
 static void
-l3ni1_disconnect(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_disconnect(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 	int ret;
-	u_char cause = 0;
+	u8 cause = 0;
 
 	StopAllL3Timer(pc);
 	if ((ret = l3ni1_get_cause(pc, skb))) {
@@ -1405,7 +1405,7 @@
 }
 
 static void
-l3ni1_connect(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_connect(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -1425,7 +1425,7 @@
 }
 
 static void
-l3ni1_alerting(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_alerting(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -1443,9 +1443,9 @@
 }
 
 static void
-l3ni1_setup(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_setup(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	int bcfound = 0;
 	char tmp[80];
 	struct sk_buff *skb = arg;
@@ -1609,19 +1609,19 @@
 }
 
 static void
-l3ni1_reset(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_reset(struct l3_process *pc, u8 pr, void *arg)
 {
 	ni1_release_l3_process(pc);
 }
 
 static void
-l3ni1_disconnect_req(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_disconnect_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[16+40];
-	u_char *p = tmp;
+	u8 tmp[16+40];
+	u8 *p = tmp;
 	int l;
-	u_char cause = 16;
+	u8 cause = 16;
 
 	if (pc->para.cause != NO_CAUSE)
 		cause = pc->para.cause;
@@ -1654,7 +1654,7 @@
 }
 
 static void
-l3ni1_setup_rsp(struct l3_process *pc, u_char pr,
+l3ni1_setup_rsp(struct l3_process *pc, u8 pr,
 		 void *arg)
 {
         if (!pc->para.bchannel) 
@@ -1672,7 +1672,7 @@
 }
 
 static void
-l3ni1_connect_ack(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_connect_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -1690,13 +1690,13 @@
 }
 
 static void
-l3ni1_reject_req(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_reject_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
-	u_char cause = 21;
+	u8 cause = 21;
 
 	if (pc->para.cause != NO_CAUSE)
 		cause = pc->para.cause;
@@ -1719,10 +1719,10 @@
 }
 
 static void
-l3ni1_release(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_release(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 	int ret, cause=0;
 
 	StopAllL3Timer(pc);
@@ -1753,7 +1753,7 @@
 }
 
 static void
-l3ni1_alert_req(struct l3_process *pc, u_char pr,
+l3ni1_alert_req(struct l3_process *pc, u8 pr,
 		 void *arg)
 {
 	newl3state(pc, 7);
@@ -1764,7 +1764,7 @@
 }
 
 static void
-l3ni1_proceed_req(struct l3_process *pc, u_char pr,
+l3ni1_proceed_req(struct l3_process *pc, u8 pr,
 		   void *arg)
 {
 	newl3state(pc, 9);
@@ -1773,7 +1773,7 @@
 }
 
 static void
-l3ni1_setup_ack_req(struct l3_process *pc, u_char pr,
+l3ni1_setup_ack_req(struct l3_process *pc, u8 pr,
 		   void *arg)
 {
 	newl3state(pc, 25);
@@ -1786,8 +1786,8 @@
 /* deliver a incoming display message to HL */
 /********************************************/
 static void
-l3ni1_deliver_display(struct l3_process *pc, int pr, u_char *infp)
-{       u_char len;
+l3ni1_deliver_display(struct l3_process *pc, int pr, u8 *infp)
+{       u8 len;
         isdn_ctrl ic; 
 	struct IsdnCardState *cs;
         char *p; 
@@ -1809,11 +1809,11 @@
 
 
 static void
-l3ni1_progress(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_progress(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int err = 0;
-	u_char *p;
+	u8 *p;
 
 	if ((p = findie(skb->data, skb->len, IE_PROGRESS, 0))) {
 		if (p[1] != 2) {
@@ -1866,11 +1866,11 @@
 }
 
 static void
-l3ni1_notify(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_notify(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int err = 0;
-	u_char *p;
+	u8 *p;
 
 	if ((p = findie(skb->data, skb->len, IE_NOTIFY, 0))) {
 		if (p[1] != 1) {
@@ -1907,7 +1907,7 @@
 }
 
 static void
-l3ni1_status_enq(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_status_enq(struct l3_process *pc, u8 pr, void *arg)
 {
 	int ret;
 	struct sk_buff *skb = arg;
@@ -1919,11 +1919,11 @@
 }
 
 static void
-l3ni1_information(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_information(struct l3_process *pc, u8 pr, void *arg)
 {
 	int ret;
 	struct sk_buff *skb = arg;
-	u_char *p;
+	u8 *p;
 	char tmp[32];
 
 	ret = check_infoelements(pc, skb, ie_INFORMATION);
@@ -1944,14 +1944,14 @@
 /******************************/
 /* handle deflection requests */
 /******************************/
-static void l3ni1_redir_req(struct l3_process *pc, u_char pr, void *arg)
+static void l3ni1_redir_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[128];
-	u_char *p = tmp;
-        u_char *subp;
-        u_char len_phone = 0;
-        u_char len_sub = 0;
+	u8 tmp[128];
+	u8 *p = tmp;
+        u8 *subp;
+        u8 len_phone = 0;
+        u8 len_sub = 0;
 	int l; 
 
 
@@ -2016,7 +2016,7 @@
 /********************************************/
 /* handle deflection request in early state */
 /********************************************/
-static void l3ni1_redir_req_early(struct l3_process *pc, u_char pr, void *arg)
+static void l3ni1_redir_req_early(struct l3_process *pc, u8 pr, void *arg)
 {
   l3ni1_proceed_req(pc,pr,arg);
   l3ni1_redir_req(pc,pr,arg);
@@ -2028,9 +2028,9 @@
 /* remote operations with dummy  callref.      */
 /***********************************************/
 static int l3ni1_cmd_global(struct PStack *st, isdn_ctrl *ic)
-{ u_char id;
-  u_char temp[265];
-  u_char *p = temp;
+{ u8 id;
+  u8 temp[265];
+  u8 *p = temp;
   int i, l, proc_len; 
   struct sk_buff *skb;
   struct l3_process *pc = NULL;
@@ -2134,9 +2134,9 @@
 } /* l3ni1_io_timer */
 
 static void
-l3ni1_release_ind(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_release_ind(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 	int callState = 0;
 	p = skb->data;
@@ -2159,12 +2159,12 @@
 }
 
 static void
-l3ni1_dummy(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_dummy(struct l3_process *pc, u8 pr, void *arg)
 {
 }
 
 static void
-l3ni1_t302(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t302(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2174,7 +2174,7 @@
 }
 
 static void
-l3ni1_t303(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t303(struct l3_process *pc, u8 pr, void *arg)
 {
 	if (pc->N303 > 0) {
 		pc->N303--;
@@ -2189,7 +2189,7 @@
 }
 
 static void
-l3ni1_t304(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t304(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2200,13 +2200,13 @@
 }
 
 static void
-l3ni1_t305(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t305(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	struct sk_buff *skb;
-	u_char cause = 16;
+	u8 cause = 16;
 
 	L3DelTimer(&pc->timer);
 	if (pc->para.cause != NO_CAUSE)
@@ -2229,7 +2229,7 @@
 }
 
 static void
-l3ni1_t310(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t310(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2239,7 +2239,7 @@
 }
 
 static void
-l3ni1_t313(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t313(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.loc = 0;
@@ -2249,7 +2249,7 @@
 }
 
 static void
-l3ni1_t308_1(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t308_1(struct l3_process *pc, u8 pr, void *arg)
 {
 	newl3state(pc, 19);
 	L3DelTimer(&pc->timer);
@@ -2258,7 +2258,7 @@
 }
 
 static void
-l3ni1_t308_2(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t308_2(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	L3L4(pc->st, CC_RELEASE_ERR, pc);
@@ -2266,7 +2266,7 @@
 }
 
 static void
-l3ni1_t318(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t318(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.cause = 102;	/* Timer expiry */
@@ -2278,7 +2278,7 @@
 }
 
 static void
-l3ni1_t319(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_t319(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	pc->para.cause = 102;	/* Timer expiry */
@@ -2288,7 +2288,7 @@
 }
 
 static void
-l3ni1_restart(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_restart(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
 	L3L4(pc->st, CC_RELEASE | INDICATION, pc);
@@ -2296,12 +2296,12 @@
 }
 
 static void
-l3ni1_status(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_status(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 	int ret; 
-	u_char cause = 0, callState = 0;
+	u8 cause = 0, callState = 0;
 	
 	if ((ret = l3ni1_get_cause(pc, skb))) {
 		if (pc->debug & L3_DEB_WARN)
@@ -2329,7 +2329,7 @@
 			cause = 99;
 	}
 	if (cause) {
-		u_char tmp;
+		u8 tmp;
 		
 		if (pc->debug & L3_DEB_WARN)
 			l3_debug(pc->st, "STATUS error(%d/%d)",ret,cause);
@@ -2354,7 +2354,7 @@
 }
 
 static void
-l3ni1_facility(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_facility(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2362,20 +2362,20 @@
 	ret = check_infoelements(pc, skb, ie_FACILITY);
 	l3ni1_std_ie_err(pc, ret);
  	  {
-		u_char *p;
+		u8 *p;
 		if ((p = findie(skb->data, skb->len, IE_FACILITY, 0)))
 			l3ni1_parse_facility(pc->st, pc, pc->callref, p);
 	}
 }
 
 static void
-l3ni1_suspend_req(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_suspend_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[32];
-	u_char *p = tmp;
-	u_char i, l;
-	u_char *msg = pc->chan->setup.phone;
+	u8 tmp[32];
+	u8 *p = tmp;
+	u8 i, l;
+	u8 *msg = pc->chan->setup.phone;
 
 	MsgHead(p, pc->callref, MT_SUSPEND);
 	l = *msg++;
@@ -2398,7 +2398,7 @@
 }
 
 static void
-l3ni1_suspend_ack(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_suspend_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2415,7 +2415,7 @@
 }
 
 static void
-l3ni1_suspend_rej(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_suspend_rej(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2443,13 +2443,13 @@
 }
 
 static void
-l3ni1_resume_req(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_resume_req(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb;
-	u_char tmp[32];
-	u_char *p = tmp;
-	u_char i, l;
-	u_char *msg = pc->para.setup.phone;
+	u8 tmp[32];
+	u8 *p = tmp;
+	u8 i, l;
+	u8 *msg = pc->para.setup.phone;
 
 	MsgHead(p, pc->callref, MT_RESUME);
 
@@ -2473,7 +2473,7 @@
 }
 
 static void
-l3ni1_resume_ack(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_resume_ack(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int id, ret;
@@ -2507,7 +2507,7 @@
 }
 
 static void
-l3ni1_resume_rej(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_resume_rej(struct l3_process *pc, u8 pr, void *arg)
 {
 	struct sk_buff *skb = arg;
 	int ret;
@@ -2536,11 +2536,11 @@
 }
 
 static void
-l3ni1_global_restart(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_global_restart(struct l3_process *pc, u8 pr, void *arg)
 {
-	u_char tmp[32];
-	u_char *p;
-	u_char ri, ch = 0, chan = 0;
+	u8 tmp[32];
+	u8 *p;
+	u8 ri, ch = 0, chan = 0;
 	int l;
 	struct sk_buff *skb = arg;
 	struct l3_process *up;
@@ -2591,7 +2591,7 @@
 }
 
 static void
-l3ni1_dl_reset(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_dl_reset(struct l3_process *pc, u8 pr, void *arg)
 {
         pc->para.cause = 0x29;          /* Temporary failure */
         pc->para.loc = 0;
@@ -2600,7 +2600,7 @@
 }
 
 static void
-l3ni1_dl_release(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_dl_release(struct l3_process *pc, u8 pr, void *arg)
 {
         newl3state(pc, 0);
         pc->para.cause = 0x1b;          /* Destination out of order */
@@ -2610,7 +2610,7 @@
 }
 
 static void
-l3ni1_dl_reestablish(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_dl_reestablish(struct l3_process *pc, u8 pr, void *arg)
 {
         L3DelTimer(&pc->timer);
         L3AddTimer(&pc->timer, T309, CC_T309);
@@ -2618,7 +2618,7 @@
 }
  
 static void
-l3ni1_dl_reest_status(struct l3_process *pc, u_char pr, void *arg)
+l3ni1_dl_reest_status(struct l3_process *pc, u8 pr, void *arg)
 {
 	L3DelTimer(&pc->timer);
  
@@ -2626,9 +2626,9 @@
 	l3ni1_status_send(pc, 0, NULL);
 }
 
-static void l3ni1_SendSpid( struct l3_process *pc, u_char pr, struct sk_buff *skb, int iNewState )
+static void l3ni1_SendSpid( struct l3_process *pc, u8 pr, struct sk_buff *skb, int iNewState )
 {
-	u_char         * p;
+	u8         * p;
 	char           * pSPID;
 	struct Channel * pChan = pc->st->lli.userdata;
 	int              l;
@@ -2668,12 +2668,12 @@
 	L3L2( pc->st, DL_DATA | REQUEST, skb );
 }
 
-static void l3ni1_spid_send( struct l3_process *pc, u_char pr, void *arg )
+static void l3ni1_spid_send( struct l3_process *pc, u8 pr, void *arg )
 {
 	l3ni1_SendSpid( pc, pr, arg, 20 );
 }
 
-void l3ni1_spid_epid( struct l3_process *pc, u_char pr, void *arg )
+void l3ni1_spid_epid( struct l3_process *pc, u8 pr, void *arg )
 {
 	struct sk_buff *skb = arg;
 
@@ -2687,7 +2687,7 @@
 	dev_kfree_skb( skb);
 }
 
-static void l3ni1_spid_tout( struct l3_process *pc, u_char pr, void *arg )
+static void l3ni1_spid_tout( struct l3_process *pc, u8 pr, void *arg )
 {
 	if ( pc->state < 22 )
 		l3ni1_SendSpid( pc, pr, arg, pc->state+1 );
@@ -2856,8 +2856,8 @@
 static void
 global_handler(struct PStack *st, int mt, struct sk_buff *skb)
 {
-	u_char tmp[16];
-	u_char *p = tmp;
+	u8 tmp[16];
+	u8 *p = tmp;
 	int l;
 	int i;
 	struct l3_process *proc = st->l3.global;
@@ -2902,7 +2902,7 @@
 {
 	int i, mt, cr, cause, callState;
 	char *ptr;
-	u_char *p;
+	u8 *p;
 	struct sk_buff *skb = arg;
 	struct l3_process *proc;
 
diff -Nru a/drivers/isdn/hisax/l3ni1.h b/drivers/isdn/hisax/l3ni1.h
--- a/drivers/isdn/hisax/l3ni1.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/l3ni1.h	Wed Jan  8 20:04:43 2003
@@ -121,7 +121,7 @@
 typedef struct
   { unsigned char invoke_id; /* used invoke id in remote ops, 0 = not active */
     ulong ll_id; /* remebered ll id */
-    u_char remote_operation; /* handled remote operation, 0 = not active */ 
+    u8 remote_operation; /* handled remote operation, 0 = not active */ 
     int proc; /* rememered procedure */  
     ulong remote_result; /* result of remote operation for statcallb */
     char uus1_data[35]; /* data send during alerting or disconnect */
diff -Nru a/drivers/isdn/hisax/mic.c b/drivers/isdn/hisax/mic.c
--- a/drivers/isdn/hisax/mic.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/mic.c	Wed Jan  8 20:04:44 2003
@@ -31,14 +31,14 @@
 /* CARD_ADR (Write) */
 #define MIC_RESET      0x3	/* same as DOS driver */
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(struct IsdnCardState *cs, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&mic_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.mic.adr, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&mic_lock, flags);
 
@@ -46,124 +46,125 @@
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
-{
-	/* fifo read without cli because it's allready done  */
-
-	byteout(ale, off);
-	insb(adr, data, size);
-}
-
-
-static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&mic_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.mic.adr, off);
 	byteout(adr, data);
 	spin_unlock_irqrestore(&mic_lock, flags);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
 {
-	/* fifo write without cli because it's allready done  */
-	byteout(ale, off);
-	outsb(adr, data, size);
+	byteout(cs->hw.mic.adr, off);
+	insb(adr, data, size);
 }
 
-/* Interface functions */
+static inline void
+writefifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
+{
+	byteout(cs->hw.mic.adr, off);
+	outsb(adr, data, size);
+}
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.mic.adr, cs->hw.mic.isac, offset));
+	return readreg(cs, cs->hw.mic.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.mic.adr, cs->hw.mic.isac, offset, value);
+	writereg(cs, cs->hw.mic.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	readfifo(cs->hw.mic.adr, cs->hw.mic.isac, 0, data, size);
+	readfifo(cs, cs->hw.mic.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writefifo(cs->hw.mic.adr, cs->hw.mic.isac, 0, data, size);
+	writefifo(cs, cs->hw.mic.isac, 0, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.mic.adr,
-			cs->hw.mic.hscx, offset + (hscx ? 0x40 : 0)));
+	return readreg(cs, cs->hw.mic.hscx, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.mic.adr,
-		 cs->hw.mic.hscx, offset + (hscx ? 0x40 : 0), value);
+	writereg(cs, cs->hw.mic.hscx, offset + (hscx ? 0x40 : 0), value);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.mic.adr, \
-		cs->hw.mic.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.mic.adr, \
-		cs->hw.mic.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.mic.adr, \
-		cs->hw.mic.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	readfifo(cs, cs->hw.mic.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.mic.adr, \
-		cs->hw.mic.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs, cs->hw.mic.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 mic_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	spin_lock(&cs->lock);
-	val = readreg(cs->hw.mic.adr, cs->hw.mic.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readreg(cs->hw.mic.adr, cs->hw.mic.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = readreg(cs->hw.mic.adr, cs->hw.mic.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.mic.adr, cs->hw.mic.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
 		goto Start_ISAC;
 	}
-	writereg(cs->hw.mic.adr, cs->hw.mic.hscx, HSCX_MASK, 0xFF);
-	writereg(cs->hw.mic.adr, cs->hw.mic.hscx, HSCX_MASK + 0x40, 0xFF);
-	writereg(cs->hw.mic.adr, cs->hw.mic.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.mic.adr, cs->hw.mic.isac, ISAC_MASK, 0x0);
-	writereg(cs->hw.mic.adr, cs->hw.mic.hscx, HSCX_MASK, 0x0);
-	writereg(cs->hw.mic.adr, cs->hw.mic.hscx, HSCX_MASK + 0x40, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -213,28 +214,21 @@
 	cs->hw.mic.isac = cs->hw.mic.cfg_reg + MIC_ISAC;
 	cs->hw.mic.hscx = cs->hw.mic.cfg_reg + MIC_HSCX;
 
-	if (check_region((cs->hw.mic.cfg_reg), bytecnt)) {
+	if (!request_region((cs->hw.mic.cfg_reg), bytecnt, "mic isdn")) {
 		printk(KERN_WARNING
 		       "HiSax: %s config port %x-%x already in use\n",
 		       CardType[card->typ],
 		       cs->hw.mic.cfg_reg,
 		       cs->hw.mic.cfg_reg + bytecnt);
 		return (0);
-	} else {
-		request_region(cs->hw.mic.cfg_reg, bytecnt, "mic isdn");
 	}
 
 	printk(KERN_INFO
 	       "mic: defined at 0x%x IRQ %d\n",
 	       cs->hw.mic.cfg_reg,
 	       cs->irq);
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &mic_card_msg;
 	cs->irq_func = &mic_interrupt;
 	ISACVersion(cs, "mic:");
diff -Nru a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c
--- a/drivers/isdn/hisax/netjet.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/netjet.c	Wed Jan  8 20:04:43 2003
@@ -30,11 +30,11 @@
 
 /* Interface functions */
 
-u_char
-NETjet_ReadIC(struct IsdnCardState *cs, u_char offset)
+u8
+NETjet_ReadIC(struct IsdnCardState *cs, u8 offset)
 {
 	unsigned long flags;
-	u_char ret;
+	u8 ret;
 	
 	spin_lock_irqsave(&netjet_lock, flags);
 	cs->hw.njet.auxd &= 0xfc;
@@ -46,7 +46,7 @@
 }
 
 void
-NETjet_WriteIC(struct IsdnCardState *cs, u_char offset, u_char value)
+NETjet_WriteIC(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	unsigned long flags;
 	
@@ -59,14 +59,29 @@
 }
 
 void
-NETjet_ReadICfifo(struct IsdnCardState *cs, u_char *data, int size)
+NETjet_ReadICfifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	cs->hw.njet.auxd &= 0xfc;
 	byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
 	insb(cs->hw.njet.isac, data, size);
 }
 
-__u16 fcstab[256] =
+void 
+NETjet_WriteICfifo(struct IsdnCardState *cs, u8 *data, int size)
+{
+	cs->hw.njet.auxd &= 0xfc;
+	byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
+	outsb(cs->hw.njet.isac, data, size);
+}
+
+struct dc_hw_ops netjet_dc_ops = {
+	.read_reg   = NETjet_ReadIC,
+	.write_reg  = NETjet_WriteIC,
+	.read_fifo  = NETjet_ReadICfifo,
+	.write_fifo = NETjet_WriteICfifo,
+};
+
+static u16 fcstab[256] =
 {
 	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
 	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
@@ -102,15 +117,7 @@
 	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
 };
 
-void 
-NETjet_WriteICfifo(struct IsdnCardState *cs, u_char *data, int size)
-{
-	cs->hw.njet.auxd &= 0xfc;
-	byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
-	outsb(cs->hw.njet.isac, data, size);
-}
-
-void fill_mem(struct BCState *bcs, u_int *pos, u_int cnt, int chan, u_char fill)
+void fill_mem(struct BCState *bcs, u_int *pos, u_int cnt, int chan, u8 fill)
 {
 	u_int mask=0x000000ff, val = 0, *p=pos;
 	u_int i;
@@ -133,7 +140,7 @@
 mode_tiger(struct BCState *bcs, int mode, int bc)
 {
 	struct IsdnCardState *cs = bcs->cs;
-        u_char led;
+        u8 led;
 
 	if (cs->debug & L1_DEB_HSCX)
 		debugl1(cs, "Tiger mode %d bchan %d/%d",
@@ -209,11 +216,11 @@
 			bytein(cs->hw.njet.base + NETJET_PULSE_CNT));
 }
 
-static void printframe(struct IsdnCardState *cs, u_char *buf, int count, char *s) {
+static void printframe(struct IsdnCardState *cs, u8 *buf, int count, char *s) {
 	char tmp[128];
 	char *t = tmp;
 	int i=count,j;
-	u_char *p = buf;
+	u8 *p = buf;
 
 	t += sprintf(t, "tiger %s(%4d)", s, count);
 	while (i>0) {
@@ -262,11 +269,11 @@
 static int make_raw_data(struct BCState *bcs) {
 // this make_raw is for 64k
 	register u_int i,s_cnt=0;
-	register u_char j;
-	register u_char val;
-	register u_char s_one = 0;
-	register u_char s_val = 0;
-	register u_char bitcnt = 0;
+	register u8 j;
+	register u8 val;
+	register u8 s_one = 0;
+	register u8 s_val = 0;
+	register u8 bitcnt = 0;
 	u_int fcs;
 	
 	if (!bcs->tx_skb) {
@@ -352,11 +359,11 @@
 static int make_raw_data_56k(struct BCState *bcs) {
 // this make_raw is for 56k
 	register u_int i,s_cnt=0;
-	register u_char j;
-	register u_char val;
-	register u_char s_one = 0;
-	register u_char s_val = 0;
-	register u_char bitcnt = 0;
+	register u8 j;
+	register u8 val;
+	register u8 s_one = 0;
+	register u8 s_val = 0;
+	register u8 bitcnt = 0;
 	u_int fcs;
 	
 	if (!bcs->tx_skb) {
@@ -442,16 +449,16 @@
 
 static void read_raw(struct BCState *bcs, u_int *buf, int cnt){
 	int i;
-	register u_char j;
-	register u_char val;
+	register u8 j;
+	register u8 val;
 	u_int  *pend = bcs->hw.tiger.rec +NETJET_DMA_RXSIZE -1;
-	register u_char state = bcs->hw.tiger.r_state;
-	register u_char r_one = bcs->hw.tiger.r_one;
-	register u_char r_val = bcs->hw.tiger.r_val;
+	register u8 state = bcs->hw.tiger.r_state;
+	register u8 r_one = bcs->hw.tiger.r_one;
+	register u8 r_val = bcs->hw.tiger.r_val;
 	register u_int bitcnt = bcs->hw.tiger.r_bitcnt;
 	u_int *p = buf;
 	int bits;
-	u_char mask;
+	u8 mask;
 
         if (bcs->mode == L1_MODE_HDLC) { // it's 64k
 		mask = 0xff;
@@ -928,9 +935,15 @@
 }
 
  
+static struct bc_l1_ops netjet_l1_ops = {
+	.fill_fifo = netjet_fill_dma,
+};
+
 void __init
 inittiger(struct IsdnCardState *cs)
 {
+	cs->bc_l1_ops = &netjet_l1_ops;
+
 	cs->bcs[0].hw.tiger.send = 
 		pci_alloc_consistent(cs->hw.njet.pdev,
 				     NETJET_DMA_TXSIZE * sizeof(unsigned int),
diff -Nru a/drivers/isdn/hisax/netjet.h b/drivers/isdn/hisax/netjet.h
--- a/drivers/isdn/hisax/netjet.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/netjet.h	Wed Jan  8 20:04:44 2003
@@ -57,10 +57,12 @@
 
 #define HDLC_FLAG_VALUE	0x7e
 
-u_char NETjet_ReadIC(struct IsdnCardState *cs, u_char offset);
-void NETjet_WriteIC(struct IsdnCardState *cs, u_char offset, u_char value);
-void NETjet_ReadICfifo(struct IsdnCardState *cs, u_char *data, int size);
-void NETjet_WriteICfifo(struct IsdnCardState *cs, u_char *data, int size);
+extern struct dc_hw_ops netjet_dc_ops;
+
+u8 NETjet_ReadIC(struct IsdnCardState *cs, u8 offset);
+void NETjet_WriteIC(struct IsdnCardState *cs, u8 offset, u8 value);
+void NETjet_ReadICfifo(struct IsdnCardState *cs, u8 *data, int size);
+void NETjet_WriteICfifo(struct IsdnCardState *cs, u8 *data, int size);
 
 void read_tiger(struct IsdnCardState *cs);
 void write_tiger(struct IsdnCardState *cs);
diff -Nru a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
--- a/drivers/isdn/hisax/niccy.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/niccy.c	Wed Jan  8 20:04:43 2003
@@ -47,106 +47,115 @@
 #define PCI_IRQ_DISABLE		0xff0000
 #define PCI_IRQ_ASSERT		0x800000
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(unsigned int ale, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&niccy_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&niccy_lock, flags);
-	return (ret);
+	return ret;
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+writereg(unsigned int ale, unsigned int adr, u8 off, u8 data)
 {
-	/* fifo read without cli because it's allready done  */
+	unsigned long flags;
 
+	spin_lock_irqsave(&niccy_lock, flags);
 	byteout(ale, off);
-	insb(adr, data, size);
+	byteout(adr, data);
+	spin_unlock_irqrestore(&niccy_lock, flags);
 }
 
-
 static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+readfifo(unsigned int ale, unsigned int adr, u8 off, u8 * data, int size)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&niccy_lock, flags);
 	byteout(ale, off);
-	byteout(adr, data);
-	spin_unlock_irqrestore(&niccy_lock, flags);
+	insb(adr, data, size);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+writefifo(unsigned int ale, unsigned int adr, u8 off, u8 * data, int size)
 {
-	/* fifo write without cli because it's allready done  */
 	byteout(ale, off);
 	outsb(adr, data, size);
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset));
+	return readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	readfifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
 	writefifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.niccy.hscx_ale,
-			cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0)));
+	return readreg(cs->hw.niccy.hscx_ale,
+		       cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
 	writereg(cs->hw.niccy.hscx_ale,
 		 cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0), value);
 }
 
-#define READHSCX(cs, nr, reg) readreg(cs->hw.niccy.hscx_ale, \
-		cs->hw.niccy.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.niccy.hscx_ale, \
-		cs->hw.niccy.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.niccy.hscx_ale, \
-		cs->hw.niccy.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	readfifo(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx,
+		 hscx ? 0x40 : 0, data, size);
+}
 
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.niccy.hscx_ale, \
-		cs->hw.niccy.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx,
+		  hscx ? 0x40 : 0, data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg  = hscx_read,
+	.write_reg = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 	
 	spin_lock(&cs->lock);
 	if (cs->subtyp == NICCY_PCI) {
@@ -156,32 +165,32 @@
 			return;
 		outl(ival, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
 	}
-	val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
 		goto Start_ISAC;
 	}
-	writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0xFF);
-	writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, 0xFF);
-	writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0);
-	writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0);
-	writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, 0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -372,13 +381,8 @@
 		"HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n",
 		CardType[cs->typ], (cs->subtyp==1) ? "PnP":"PCI",
 		cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale);
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &niccy_card_msg;
 	cs->irq_func = &niccy_interrupt;
 	ISACVersion(cs, "Niccy:");
diff -Nru a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c
--- a/drivers/isdn/hisax/nj_s.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/nj_s.c	Wed Jan  8 20:04:43 2003
@@ -17,20 +17,11 @@
 
 const char *NETjet_S_revision = "$Revision: 2.7.6.6 $";
 
-static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
-{
-	return(5);
-}
-
-static void dummywr(struct IsdnCardState *cs, int chan, u_char off, u_char value)
-{
-}
-
 static void
 netjet_s_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val, sval;
+	u8 val, sval;
 
 	spin_lock(&cs->lock);
 	if (!((sval = bytein(cs->hw.njet.base + NETJET_IRQSTAT1)) &
@@ -235,13 +226,7 @@
 		request_region(cs->hw.njet.base, bytecnt, "netjet-s isdn");
 	}
 	reset_netjet_s(cs);
-	cs->readisac  = &NETjet_ReadIC;
-	cs->writeisac = &NETjet_WriteIC;
-	cs->readisacfifo  = &NETjet_ReadICfifo;
-	cs->writeisacfifo = &NETjet_WriteICfifo;
-	cs->BC_Read_Reg  = &dummyrr;
-	cs->BC_Write_Reg = &dummywr;
-	cs->BC_Send_Data = &netjet_fill_dma;
+	cs->dc_hw_ops = &netjet_dc_ops;
 	cs->cardmsg = &NETjet_S_card_msg;
 	cs->irq_func = &netjet_s_interrupt;
 	cs->irq_flags |= SA_SHIRQ;
diff -Nru a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c
--- a/drivers/isdn/hisax/nj_u.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/nj_u.c	Wed Jan  8 20:04:43 2003
@@ -17,20 +17,11 @@
 
 const char *NETjet_U_revision = "$Revision: 2.8.6.6 $";
 
-static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
-{
-	return(5);
-}
-
-static void dummywr(struct IsdnCardState *cs, int chan, u_char off, u_char value)
-{
-}
-
 static void
 netjet_u_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val, sval;
+	u8 val, sval;
 
 	spin_lock(&cs->lock);
 	if (!((sval = bytein(cs->hw.njet.base + NETJET_IRQSTAT1)) &
@@ -116,7 +107,7 @@
 			inittiger(cs);
 			initicc(cs);
 			/* Reenable all IRQ */
-			cs->writeisac(cs, ICC_MASK, 0);
+			NETjet_WriteIC(cs, ICC_MASK, 0);
 			return(0);
 		case CARD_TEST:
 			return(0);
@@ -222,24 +213,16 @@
 	printk(KERN_INFO
 		"NETspider-U: PCI card configured at %#lx IRQ %d\n",
 		cs->hw.njet.base, cs->irq);
-	if (check_region(cs->hw.njet.base, bytecnt)) {
+	if (!request_region(cs->hw.njet.base, bytecnt, "netspider-u isdn")) {
 		printk(KERN_WARNING
 		       "HiSax: %s config port %#lx-%#lx already in use\n",
 		       CardType[card->typ],
 		       cs->hw.njet.base,
 		       cs->hw.njet.base + bytecnt);
 		return (0);
-	} else {
-		request_region(cs->hw.njet.base, bytecnt, "netspider-u isdn");
 	}
 	reset_netjet_u(cs);
-	cs->readisac  = &NETjet_ReadIC;
-	cs->writeisac = &NETjet_WriteIC;
-	cs->readisacfifo  = &NETjet_ReadICfifo;
-	cs->writeisacfifo = &NETjet_WriteICfifo;
-	cs->BC_Read_Reg  = &dummyrr;
-	cs->BC_Write_Reg = &dummywr;
-	cs->BC_Send_Data = &netjet_fill_dma;
+	cs->dc_hw_ops = &netjet_dc_ops;
 	cs->cardmsg = &NETjet_U_card_msg;
 	cs->irq_func = &netjet_u_interrupt;
 	cs->irq_flags |= SA_SHIRQ;
diff -Nru a/drivers/isdn/hisax/q931.c b/drivers/isdn/hisax/q931.c
--- a/drivers/isdn/hisax/q931.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/q931.c	Wed Jan  8 20:04:43 2003
@@ -21,9 +21,9 @@
 #include "l3_1tr6.h"
 
 void
-iecpy(u_char * dest, u_char * iestart, int ieoffset)
+iecpy(u8 * dest, u8 * iestart, int ieoffset)
 {
-	u_char *p;
+	u8 *p;
 	int l;
 
 	p = iestart + ieoffset + 2;
@@ -38,7 +38,7 @@
  */
 static
 struct MessageType {
-	u_char nr;
+	u8 nr;
 	char *descr;
 } mtlist[] = {
 
@@ -198,7 +198,7 @@
 
 
 static int
-prbits(char *dest, u_char b, int start, int len)
+prbits(char *dest, u8 b, int start, int len)
 {
 	char *dp = dest;
 
@@ -214,8 +214,8 @@
 }
 
 static
-u_char *
-skipext(u_char * p)
+u8 *
+skipext(u8 * p)
 {
 	while (!(*p++ & 0x80));
 	return (p);
@@ -230,7 +230,7 @@
 
 static
 struct CauseValue {
-	u_char nr;
+	u8 nr;
 	char *edescr;
 	char *ddescr;
 } cvlist[] = {
@@ -442,9 +442,9 @@
 
 static
 int
-prcause(char *dest, u_char * p)
+prcause(char *dest, u8 * p)
 {
-	u_char *end;
+	u8 *end;
 	char *dp = dest;
 	int i, cause;
 
@@ -519,7 +519,7 @@
 int cause_1tr6_len = (sizeof(cause_1tr6) / sizeof(struct MessageType));
 
 static int
-prcause_1tr6(char *dest, u_char * p)
+prcause_1tr6(char *dest, u8 * p)
 {
 	char *dp = dest;
 	int i, cause;
@@ -554,7 +554,7 @@
 }
 
 static int
-prchident(char *dest, u_char * p)
+prchident(char *dest, u8 * p)
 {
 	char *dp = dest;
 
@@ -566,7 +566,7 @@
 }
 
 static int
-prcalled(char *dest, u_char * p)
+prcalled(char *dest, u8 * p)
 {
 	int l;
 	char *dp = dest;
@@ -583,7 +583,7 @@
 	return (dp - dest);
 }
 static int
-prcalling(char *dest, u_char * p)
+prcalling(char *dest, u8 * p)
 {
 	int l;
 	char *dp = dest;
@@ -610,7 +610,7 @@
 
 static
 int
-prbearer(char *dest, u_char * p)
+prbearer(char *dest, u8 * p)
 {
 	char *dp = dest, ch;
 
@@ -658,10 +658,10 @@
 
 static
 int
-prbearer_ni1(char *dest, u_char * p)
+prbearer_ni1(char *dest, u8 * p)
 {
 	char *dp = dest;
-	u_char len;
+	u8 len;
 
 	p++;
 	len = *p++;
@@ -715,7 +715,7 @@
 }
 
 static int
-general(char *dest, u_char * p)
+general(char *dest, u8 * p)
 {
 	char *dp = dest;
 	char ch = ' ';
@@ -742,7 +742,7 @@
 }
 
 static int
-general_ni1(char *dest, u_char * p)
+general_ni1(char *dest, u8 * p)
 {
 	char *dp = dest;
 	char ch = ' ';
@@ -769,7 +769,7 @@
 }
 
 static int
-prcharge(char *dest, u_char * p)
+prcharge(char *dest, u8 * p)
 {
 	char *dp = dest;
 	int l;
@@ -786,7 +786,7 @@
 	return (dp - dest);
 }
 static int
-prtext(char *dest, u_char * p)
+prtext(char *dest, u8 * p)
 {
 	char *dp = dest;
 	int l;
@@ -802,7 +802,7 @@
 }
 
 static int
-prfeatureind(char *dest, u_char * p)
+prfeatureind(char *dest, u8 * p)
 {
 	char *dp = dest;
 
@@ -839,7 +839,7 @@
 
 static
 struct DTag { /* Display tags */
-	u_char nr;
+	u8 nr;
 	char *descr;
 } dtaglist[] = {
 	{ 0x82, "Continuation" },
@@ -868,7 +868,7 @@
 #define DTAGSIZE sizeof(dtaglist)/sizeof(struct DTag)
 
 static int
-disptext_ni1(char *dest, u_char * p)
+disptext_ni1(char *dest, u8 * p)
 {
 	char *dp = dest;
 	int l, tag, len, i;
@@ -907,7 +907,7 @@
 	return (dp - dest);
 }
 static int
-display(char *dest, u_char * p)
+display(char *dest, u8 * p)
 {
 	char *dp = dest;
 	char ch = ' ';
@@ -936,7 +936,7 @@
 }
 
 int
-prfacility(char *dest, u_char * p)
+prfacility(char *dest, u8 * p)
 {
 	char *dp = dest;
 	int l, l2;
@@ -967,9 +967,9 @@
 
 static
 struct InformationElement {
-	u_char nr;
+	u8 nr;
 	char *descr;
-	int (*f) (char *, u_char *);
+	int (*f) (char *, u8 *);
 } ielist[] = {
 
 	{
@@ -1148,11 +1148,11 @@
 #define WE_6_LEN (sizeof(we_6) / sizeof(struct InformationElement))
 
 int
-QuickHex(char *txt, u_char * p, int cnt)
+QuickHex(char *txt, u8 * p, int cnt)
 {
 	register int i;
 	register char *t = txt;
-	register u_char w;
+	register u8 w;
 
 	for (i = 0; i < cnt; i++) {
 		*t++ = ' ';
@@ -1172,7 +1172,7 @@
 }
 
 void
-LogFrame(struct IsdnCardState *cs, u_char * buf, int size)
+LogFrame(struct IsdnCardState *cs, u8 * buf, int size)
 {
 	char *dp;
 
@@ -1196,7 +1196,7 @@
 void
 dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir)
 {
-	u_char *bend, *buf;
+	u8 *bend, *buf;
 	char *dp;
 	unsigned char pd, cr_l, cr, mt;
 	unsigned char sapi, tei, ftyp;
diff -Nru a/drivers/isdn/hisax/rawhdlc.c b/drivers/isdn/hisax/rawhdlc.c
--- a/drivers/isdn/hisax/rawhdlc.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/rawhdlc.c	Wed Jan  8 20:04:43 2003
@@ -48,8 +48,8 @@
  *
  *
  *
- * int make_raw_hdlc_data(u_char *src, u_int slen,
- *                        u_char *dst, u_int dsize)
+ * int make_raw_hdlc_data(u8 *src, u_int slen,
+ *                        u8 *dst, u_int dsize)
  *
  *   Used for transmission.  Copies slen bytes from src to dst, performing
  *   HDLC encapsulation (flag bytes, bit-stuffing, CRC) in the process.
@@ -73,8 +73,8 @@
  *             mode 1 -> B1  mode 2  -> B2 data is used
  *
  * int read_raw_hdlc_data(struct hdlc_state *saved_state,
- *                        u_char *src, u_int slen,
- *                        u_char *dst, u_int dsize)
+ *                        u8 *src, u_int slen,
+ *                        u8 *dst, u_int dsize)
  *
  *   Used for reception.  Scans source buffer bit-by-bit looking for
  *   valid HDLC frames, which are copied to destination buffer.  HDLC
@@ -241,14 +241,14 @@
  */
 
 
-int make_raw_hdlc_data(u_char *src, u_int slen, u_char *dst, u_int dsize)
+int make_raw_hdlc_data(u8 *src, u_int slen, u8 *dst, u_int dsize)
 {
 	register u_int i,d_cnt=0;
-	register u_char j;
-	register u_char val;
-	register u_char s_one = 0;
-	register u_char out_val = 0;
-	register u_char bitcnt = 0;
+	register u8 j;
+	register u8 val;
+	register u8 s_one = 0;
+	register u8 out_val = 0;
+	register u8 bitcnt = 0;
 	u_int fcs;
 	
 	
@@ -306,13 +306,13 @@
  */
 
 int read_raw_hdlc_data(struct hdlc_state *saved_state,
-                       u_char *src, u_int slen, u_char *dst, u_int dsize)
+                       u8 *src, u_int slen, u8 *dst, u_int dsize)
 {
 	int retval=0;
-	register u_char val;
-	register u_char state = saved_state->state;
-	register u_char r_one = saved_state->r_one;
-	register u_char r_val = saved_state->r_val;
+	register u8 val;
+	register u8 state = saved_state->state;
+	register u8 r_one = saved_state->r_one;
+	register u8 r_val = saved_state->r_val;
 	register u_int o_bitcnt = saved_state->o_bitcnt;
 	register u_int i_bitcnt = saved_state->i_bitcnt;
 	register u_int fcs    = saved_state->fcs;
diff -Nru a/drivers/isdn/hisax/rawhdlc.h b/drivers/isdn/hisax/rawhdlc.h
--- a/drivers/isdn/hisax/rawhdlc.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/rawhdlc.h	Wed Jan  8 20:04:44 2003
@@ -11,18 +11,18 @@
 #ifndef RAWHDLC_H
 struct hdlc_state {
 	char insane_mode;
-	u_char state;
-	u_char r_one;
-	u_char r_val;
+	u8 state;
+	u8 r_one;
+	u8 r_val;
 	u_int o_bitcnt;
 	u_int i_bitcnt;
 	u_int fcs;
 };
 
 
-int make_raw_hdlc_data(u_char *src, u_int slen, u_char *dst, u_int dsize);
+int make_raw_hdlc_data(u8 *src, u_int slen, u8 *dst, u_int dsize);
 void init_hdlc_state(struct hdlc_state *stateptr, int mode);
 int read_raw_hdlc_data(struct hdlc_state *saved_state,
-                       u_char *src, u_int slen, u_char *dst, u_int dsize);
+                       u8 *src, u_int slen, u8 *dst, u_int dsize);
 #define RAWHDLC_H
 #endif
diff -Nru a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c
--- a/drivers/isdn/hisax/s0box.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/s0box.c	Wed Jan  8 20:04:43 2003
@@ -21,8 +21,10 @@
 static spinlock_t s0box_lock = SPIN_LOCK_UNLOCKED;
 
 static inline void
-writereg(unsigned int padr, signed int addr, u_char off, u_char val) {
+writereg(struct IsdnCardState *cs, int addr, u8 off, u8 val)
+{
 	unsigned long flags;
+	unsigned long padr = cs->hw.teles3.cfg_reg;
 
 	spin_lock_irqsave(&s0box_lock, flags);
 	outb_p(0x1c,padr+2);
@@ -36,14 +38,16 @@
 	spin_unlock_irqrestore(&s0box_lock, flags);
 }
 
-static u_char nibtab[] = { 1, 9, 5, 0xd, 3, 0xb, 7, 0xf,
+static u8 nibtab[] = { 1, 9, 5, 0xd, 3, 0xb, 7, 0xf,
 			 0, 0, 0, 0, 0, 0, 0, 0,
 			 0, 8, 4, 0xc, 2, 0xa, 6, 0xe } ;
 
-static inline u_char
-readreg(unsigned int padr, signed int addr, u_char off) {
-	register u_char n1, n2;
+static inline u8
+readreg(struct IsdnCardState *cs, int addr, u8 off)
+{
+	u8 n1, n2;
 	unsigned long flags;
+	unsigned long padr = cs->hw.teles3.cfg_reg;
 
 	spin_lock_irqsave(&s0box_lock, flags);
 	outb_p(0x1c,padr+2);
@@ -61,10 +65,11 @@
 }
 
 static inline void
-read_fifo(unsigned int padr, signed int adr, u_char * data, int size)
+read_fifo(struct IsdnCardState *cs, signed int adr, u8 * data, int size)
 {
 	int i;
-	register u_char n1, n2;
+	u8 n1, n2;
+	unsigned long padr = cs->hw.teles3.cfg_reg;
 	
 	outb_p(0x1c, padr+2);
 	outb_p(0x14, padr+2);
@@ -79,13 +84,14 @@
 	}
 	outb_p(0x14,padr+2);
 	outb_p(0x1c,padr+2);
-	return;
 }
 
 static inline void
-write_fifo(unsigned int padr, signed int adr, u_char * data, int size)
+write_fifo(struct IsdnCardState *cs, signed int adr, u8 * data, int size)
 {
 	int i;
+	unsigned long padr = cs->hw.teles3.cfg_reg;
+
 	outb_p(0x1c, padr+2);
 	outb_p(0x14, padr+2);
 	outb_p(adr&0x7f, padr);
@@ -96,83 +102,95 @@
 	}
 	outb_p(0x14,padr+2);
 	outb_p(0x1c,padr+2);
-	return;
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, offset));
+	return readreg(cs, cs->hw.teles3.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, offset, value);
+	writereg(cs, cs->hw.teles3.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	read_fifo(cs->hw.teles3.cfg_reg, cs->hw.teles3.isacfifo, data, size);
+	read_fifo(cs, cs->hw.teles3.isacfifo, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	write_fifo(cs->hw.teles3.cfg_reg, cs->hw.teles3.isacfifo, data, size);
+	write_fifo(cs, cs->hw.teles3.isacfifo, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[hscx], offset));
+	return readreg(cs, cs->hw.teles3.hscx[hscx], offset);
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[hscx], offset, value);
+	writereg(cs, cs->hw.teles3.hscx[hscx], offset, value);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[nr], reg)
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[nr], reg, data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) read_fifo(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscxfifo[nr], ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) write_fifo(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscxfifo[nr], ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	read_fifo(cs, cs->hw.teles3.hscxfifo[hscx], data, size);
+}
 
-#include "hscx_irq.c"
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	write_fifo(cs, cs->hw.teles3.hscxfifo[hscx], data, size);
+}
 
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
+ 
 static void
 s0box_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 #define MAXCOUNT 5
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 	int count = 0;
 
 	spin_lock(&cs->lock);
-	val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_ISTA);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
 	count++;
-	val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_ISTA);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val && count < MAXCOUNT) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val && count < MAXCOUNT) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
@@ -180,12 +198,12 @@
 	}
 	if (count >= MAXCOUNT)
 		printk(KERN_WARNING "S0Box: more than %d loops in s0box_interrupt\n", count);
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[0], HSCX_MASK, 0xFF);
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_MASK, 0xFF);
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_MASK, 0x0);
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[0], HSCX_MASK, 0x0);
-	writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -232,15 +250,14 @@
 	cs->hw.teles3.hscxfifo[0] = cs->hw.teles3.hscx[0] + 0x3e;
 	cs->hw.teles3.hscxfifo[1] = cs->hw.teles3.hscx[1] + 0x3e;
 	cs->irq = card->para[0];
-	if (check_region(cs->hw.teles3.cfg_reg,8)) {
+	if (!request_region(cs->hw.teles3.cfg_reg,8, "S0Box parallel I/O")) {
 		printk(KERN_WARNING
 		       "HiSax: %s ports %x-%x already in use\n",
 		       CardType[cs->typ],
                        cs->hw.teles3.cfg_reg,
                        cs->hw.teles3.cfg_reg + 7);
 		return 0;
-	} else
-		request_region(cs->hw.teles3.cfg_reg, 8, "S0Box parallel I/O");
+	} 
 	printk(KERN_INFO
 	       "HiSax: %s config irq:%d isac:0x%x  cfg:0x%x\n",
 	       CardType[cs->typ], cs->irq,
@@ -248,13 +265,8 @@
 	printk(KERN_INFO
 	       "HiSax: hscx A:0x%x  hscx B:0x%x\n",
 	       cs->hw.teles3.hscx[0], cs->hw.teles3.hscx[1]);
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &S0Box_card_msg;
 	cs->irq_func = &s0box_interrupt;
 	ISACVersion(cs, "S0Box:");
diff -Nru a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c
--- a/drivers/isdn/hisax/saphir.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/isdn/hisax/saphir.c	Wed Jan  8 20:04:32 2003
@@ -32,123 +32,128 @@
 #define SPARE_REG	4
 #define RESET_REG	5
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(struct IsdnCardState *cs, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&saphir_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.saphir.ale, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&saphir_lock, flags);
-	return (ret);
+	return ret;
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
-{
-	/* fifo read without cli because it's allready done  */
-
-	byteout(ale, off);
-	insb(adr, data, size);
-}
-
-
-static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 data)
 {
 	unsigned long flags;
 
 	spin_lock_irqsave(&saphir_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.saphir.ale, off);
 	byteout(adr, data);
 	spin_unlock_irqrestore(&saphir_lock, flags);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 *data, int size)
 {
-	/* fifo write without cli because it's allready done  */
-	byteout(ale, off);
-	outsb(adr, data, size);
+	byteout(cs->hw.saphir.ale, off);
+	insb(adr, data, size);
 }
 
-/* Interface functions */
+static inline void
+writefifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 *data, int size)
+{
+	byteout(cs->hw.saphir.ale, off);
+	outsb(adr, data, size);
+}
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.saphir.ale, cs->hw.saphir.isac, offset));
+	return readreg(cs, cs->hw.saphir.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.isac, offset, value);
+	writereg(cs, cs->hw.saphir.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	readfifo(cs->hw.saphir.ale, cs->hw.saphir.isac, 0, data, size);
+	readfifo(cs, cs->hw.saphir.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writefifo(cs->hw.saphir.ale, cs->hw.saphir.isac, 0, data, size);
+	writefifo(cs, cs->hw.saphir.isac, 0, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx,
-		offset + (hscx ? 0x40 : 0)));
+	return readreg(cs, cs->hw.saphir.hscx, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx,
-		offset + (hscx ? 0x40 : 0), value);
+	writereg(cs, cs->hw.saphir.hscx, offset + (hscx ? 0x40 : 0), value);
 }
 
-#define READHSCX(cs, nr, reg) readreg(cs->hw.saphir.ale, \
-		cs->hw.saphir.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.saphir.ale, \
-		cs->hw.saphir.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.saphir.ale, \
-		cs->hw.saphir.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	readfifo(cs, cs->hw.saphir.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.saphir.ale, \
-		cs->hw.saphir.hscx, (nr ? 0x40 : 0), ptr, cnt)
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	writefifo(cs, cs->hw.saphir.hscx, hscx ? 0x40 : 0, data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 saphir_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	spin_lock(&cs->lock);
-	val = readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readreg(cs->hw.saphir.ale, cs->hw.saphir.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = readreg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.saphir.ale, cs->hw.saphir.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
@@ -159,12 +164,13 @@
 		mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ);
 	else
 		printk(KERN_WARNING "saphir: Spurious timer!\n");
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK, 0xFF);
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK + 0x40, 0xFF);
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.isac, ISAC_MASK, 0);
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK, 0);
-	writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK + 0x40, 0);
+
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -172,7 +178,7 @@
 SaphirWatchDog(struct IsdnCardState *cs)
 {
         /* 5 sec WatchDog, so read at least every 4 sec */
-	cs->readisac(cs, ISAC_RBCH);
+	isac_read(cs, ISAC_RBCH);
 	mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ);
 }
 
@@ -189,7 +195,7 @@
 static int
 saphir_reset(struct IsdnCardState *cs)
 {
-	u_char irq_val;
+	u8 irq_val;
 
 	switch(cs->irq) {
 		case 5: irq_val = 0;
@@ -259,15 +265,14 @@
 	cs->hw.saphir.hscx = card->para[1] + HSCX_DATA;
 	cs->hw.saphir.ale = card->para[1] + ADDRESS_REG;
 	cs->irq = card->para[0];
-	if (check_region((cs->hw.saphir.cfg_reg), 6)) {
+	if (!request_region((cs->hw.saphir.cfg_reg), 6, "saphir")) {
 		printk(KERN_WARNING
 			"HiSax: %s config port %x-%x already in use\n",
 			CardType[card->typ],
 			cs->hw.saphir.cfg_reg,
 			cs->hw.saphir.cfg_reg + 5);
 		return (0);
-	} else
-		request_region(cs->hw.saphir.cfg_reg,6, "saphir");
+	}
 
 	printk(KERN_INFO
 	       "HiSax: %s config irq:%d io:0x%X\n",
@@ -283,13 +288,8 @@
 		release_io_saphir(cs);
 		return (0);
 	}
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &saphir_card_msg;
 	cs->irq_func = &saphir_interrupt;
 	ISACVersion(cs, "saphir:");
diff -Nru a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c
--- a/drivers/isdn/hisax/sedlbauer.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/sedlbauer.c	Wed Jan  8 20:04:45 2003
@@ -118,162 +118,178 @@
 
 #define SEDL_RESET      0x3	/* same as DOS driver */
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(struct IsdnCardState *cs, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	u8 ret;
 	unsigned long flags;
 
 	spin_lock_irqsave(&sedlbauer_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.sedl.adr, off);
 	ret = bytein(adr);
 	spin_unlock_irqrestore(&sedlbauer_lock, flags);
-	return (ret);
+	return ret;
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
 {
-	/* fifo read without cli because it's allready done  */
+	unsigned long flags;
 
-	byteout(ale, off);
+	spin_lock_irqsave(&sedlbauer_lock, flags);
+	byteout(cs->hw.sedl.adr, off);
 	insb(adr, data, size);
+	spin_unlock_irqrestore(&sedlbauer_lock, flags);
 }
 
 
 static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 data)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&sedlbauer_lock, flags);
-	byteout(ale, off);
+	byteout(cs->hw.sedl.adr, off);
 	byteout(adr, data);
-	spin_unlock_irqrestore(&sedlbauer_lock, flags);
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+writefifo(struct IsdnCardState *cs, unsigned int adr, u8 off, u8 * data, int size)
 {
-	/* fifo write without cli because it's allready done  */
-	byteout(ale, off);
+	byteout(cs->hw.sedl.adr, off);
 	outsb(adr, data, size);
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset));
+	return readreg(cs, cs->hw.sedl.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset, value);
+	writereg(cs, cs->hw.sedl.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	readfifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0, data, size);
+	readfifo(cs, cs->hw.sedl.isac, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writefifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0, data, size);
+	writefifo(cs, cs->hw.sedl.isac, 0, data, size);
 }
 
-static u_char
-ReadISAC_IPAC(struct IsdnCardState *cs, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+ipac_dc_read(struct IsdnCardState *cs, u8 offset)
+{
+	return readreg(cs, cs->hw.sedl.isac, offset|0x80);
+}
+
+static void
+ipac_dc_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
-	return (readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80));
+	writereg(cs, cs->hw.sedl.isac, offset|0x80, value);
 }
 
 static void
-WriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value)
+ipac_dc_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80, value);
+	readfifo(cs, cs->hw.sedl.isac, 0x80, data, size);
 }
 
 static void
-ReadISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+ipac_dc_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
+{
+	writefifo(cs, cs->hw.sedl.isac, 0x80, data, size);
+}
+
+static struct dc_hw_ops ipac_dc_ops = {
+	.read_reg   = ipac_dc_read,
+	.write_reg  = ipac_dc_write,
+	.read_fifo  = ipac_dc_read_fifo,
+	.write_fifo = ipac_dc_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	readfifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size);
+	return readreg(cs, cs->hw.sedl.hscx, offset + (hscx ? 0x40 : 0));
 }
 
 static void
-WriteISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
-	writefifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size);
+	writereg(cs, cs->hw.sedl.hscx, offset + (hscx ? 0x40 : 0), value);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
 {
-	return (readreg(cs->hw.sedl.adr,
-			cs->hw.sedl.hscx, offset + (hscx ? 0x40 : 0)));
+	readfifo(cs, cs->hw.sedl.hscx, hscx ? 0x40 : 0, data, size);
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
 {
-	writereg(cs->hw.sedl.adr,
-		 cs->hw.sedl.hscx, offset + (hscx ? 0x40 : 0), value);
+	writefifo(cs, cs->hw.sedl.hscx, hscx ? 0x40 : 0, data, size);
 }
 
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
+
 /* ISAR access routines
  * mode = 0 access with IRQ on
  * mode = 1 access with IRQ off
  * mode = 2 access with IRQ off and using last offset
  */
 
-static u_char
-ReadISAR(struct IsdnCardState *cs, int mode, u_char offset)
+static u8
+isar_read(struct IsdnCardState *cs, int mode, u8 offset)
 {	
 	if (mode == 0)
-		return (readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, offset));
-	else if (mode == 1)
+		return readreg(cs, cs->hw.sedl.hscx, offset);
+
+	if (mode == 1)
 		byteout(cs->hw.sedl.adr, offset);
-	return(bytein(cs->hw.sedl.hscx));
+
+	return bytein(cs->hw.sedl.hscx);
 }
 
 static void
-WriteISAR(struct IsdnCardState *cs, int mode, u_char offset, u_char value)
+isar_write(struct IsdnCardState *cs, int mode, u8 offset, u8 value)
 {
 	if (mode == 0)
-		writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, offset, value);
-	else {
-		if (mode == 1)
-			byteout(cs->hw.sedl.adr, offset);
-		byteout(cs->hw.sedl.hscx, value);
-	}
-}
+		return writereg(cs, cs->hw.sedl.hscx, offset, value);
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.sedl.adr, \
-		cs->hw.sedl.hscx, reg + (nr ? 0x40 : 0))
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.sedl.adr, \
-		cs->hw.sedl.hscx, reg + (nr ? 0x40 : 0), data)
-
-#define READHSCXFIFO(cs, nr, ptr, cnt) readfifo(cs->hw.sedl.adr, \
-		cs->hw.sedl.hscx, (nr ? 0x40 : 0), ptr, cnt)
+	if (mode == 1)
+		byteout(cs->hw.sedl.adr, offset);
 
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) writefifo(cs->hw.sedl.adr, \
-		cs->hw.sedl.hscx, (nr ? 0x40 : 0), ptr, cnt)
+	byteout(cs->hw.sedl.hscx, value);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops isar_ops = {
+	.read_reg   = isar_read,
+	.write_reg  = isar_write,
+};
 
 static void
 sedlbauer_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	if (!cs) {
 		printk(KERN_WARNING "Sedlbauer: Spurious interrupt!\n");
@@ -287,50 +303,50 @@
 		return;
 	}
 
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
 		goto Start_ISAC;
 	}
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK, 0xFF);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK + 0x40, 0xFF);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0x0);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK, 0x0);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_MASK + 0x40, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 }
 
 static void
 sedlbauer_interrupt_ipac(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char ista, val, icnt = 5;
+	u8 ista, val, icnt = 5;
 
 	if (!cs) {
 		printk(KERN_WARNING "Sedlbauer: Spurious interrupt!\n");
 		return;
 	}
-	ista = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ISTA);
+	ista = readreg(cs, cs->hw.sedl.isac, IPAC_ISTA);
 Start_IPAC:
 	if (cs->debug & L1_DEB_IPAC)
 		debugl1(cs, "IPAC ISTA %02X", ista);
 	if (ista & 0x0f) {
-		val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, HSCX_ISTA + 0x40);
+		val = hscx_read(cs, 1, HSCX_ISTA);
 		if (ista & 0x01)
 			val |= 0x01;
 		if (ista & 0x04)
@@ -341,7 +357,7 @@
 			hscx_int_main(cs, val);
 	}
 	if (ista & 0x20) {
-		val = 0xfe & readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA | 0x80);
+		val = ipac_dc_read(cs, ISAC_ISTA) & 0xfe;
 		if (val) {
 			isac_interrupt(cs, val);
 		}
@@ -350,7 +366,7 @@
 		val = 0x01;
 		isac_interrupt(cs, val);
 	}
-	ista  = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ISTA);
+	ista  = readreg(cs, cs->hw.sedl.isac, IPAC_ISTA);
 	if ((ista & 0x3f) && icnt) {
 		icnt--;
 		goto Start_IPAC;
@@ -358,33 +374,33 @@
 	if (!icnt)
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "Sedlbauer IRQ LOOP");
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xFF);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xC0);
+	writereg(cs, cs->hw.sedl.isac, IPAC_MASK, 0xFF);
+	writereg(cs, cs->hw.sedl.isac, IPAC_MASK, 0xC0);
 }
 
 static void
 sedlbauer_interrupt_isar(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 	int cnt = 5;
 
 	spin_lock(&cs->lock);
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT);
+	val = isar_read(cs, 0, ISAR_IRQBIT);
       Start_ISAR:
 	if (val & ISAR_IRQSTA)
 		isar_int_main(cs);
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT);
+	val = isar_read(cs, 0, ISAR_IRQBIT);
 	if ((val & ISAR_IRQSTA) && --cnt) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "ISAR IntStat after IntRoutine");
 		goto Start_ISAR;
 	}
-	val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val && --cnt) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
@@ -394,10 +410,10 @@
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "Sedlbauer IRQ LOOP");
 
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT, 0);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, ISAC_MASK, 0x0);
-	writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, ISAR_IRQBIT, ISAR_IRQMSK);
+	isar_write(cs, 0, ISAR_IRQBIT, 0);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	isar_write(cs, 0, ISAR_IRQBIT, ISAR_IRQMSK);
 	spin_unlock(&cs->lock);
 }
 
@@ -423,17 +439,17 @@
 	if (!((cs->hw.sedl.bus == SEDL_BUS_PCMCIA) &&
 	   (cs->hw.sedl.chip == SEDL_CHIP_ISAC_HSCX))) {
 		if (cs->hw.sedl.chip == SEDL_CHIP_IPAC) {
-			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_POTA2, 0x20);
+			writereg(cs, cs->hw.sedl.isac, IPAC_POTA2, 0x20);
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout((10*HZ)/1000);
-			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_POTA2, 0x0);
+			writereg(cs, cs->hw.sedl.isac, IPAC_POTA2, 0x0);
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout((10*HZ)/1000);
-			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_CONF, 0x0);
-			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ACFG, 0xff);
-			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_AOE, 0x0);
-			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xc0);
-			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_PCFG, 0x12);
+			writereg(cs, cs->hw.sedl.isac, IPAC_CONF, 0x0);
+			writereg(cs, cs->hw.sedl.isac, IPAC_ACFG, 0xff);
+			writereg(cs, cs->hw.sedl.isac, IPAC_AOE, 0x0);
+			writereg(cs, cs->hw.sedl.isac, IPAC_MASK, 0xc0);
+			writereg(cs, cs->hw.sedl.isac, IPAC_PCFG, 0x12);
 		} else if ((cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) &&
 			(cs->hw.sedl.bus == SEDL_BUS_PCI)) {
 			byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
@@ -462,22 +478,17 @@
 			return(0);
 		case CARD_RELEASE:
 			if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
-				writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx,
-					ISAR_IRQBIT, 0);
-				writereg(cs->hw.sedl.adr, cs->hw.sedl.isac,
-					ISAC_MASK, 0xFF);
+				isar_write(cs, 0, ISAR_IRQBIT, 0);
+				isac_write(cs, ISAC_MASK, 0xFF);
 				reset_sedlbauer(cs);
-				writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx,
-					ISAR_IRQBIT, 0);
-				writereg(cs->hw.sedl.adr, cs->hw.sedl.isac,
-					ISAC_MASK, 0xFF);
+				isar_write(cs, 0, ISAR_IRQBIT, 0);
+				isac_write(cs, ISAC_MASK, 0xFF);
 			}
 			release_io_sedlbauer(cs);
 			return(0);
 		case CARD_INIT:
 			if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
-				writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx,
-					ISAR_IRQBIT, 0);
+				isar_write(cs, 0, ISAR_IRQBIT, 0);
 				initisac(cs);
 				initisar(cs);
 			} else {
@@ -678,15 +689,13 @@
 	 * here, it would fail.
 	 */
 	if (cs->hw.sedl.bus != SEDL_BUS_PCMCIA &&
-		check_region((cs->hw.sedl.cfg_reg), bytecnt)) {
+	    (!request_region((cs->hw.sedl.cfg_reg), bytecnt, "sedlbauer isdn"))) {
 		printk(KERN_WARNING
 			"HiSax: %s config port %x-%x already in use\n",
 			CardType[card->typ],
 			cs->hw.sedl.cfg_reg,
 			cs->hw.sedl.cfg_reg + bytecnt);
 			return (0);
-	} else {
-		request_region(cs->hw.sedl.cfg_reg, bytecnt, "sedlbauer isdn");
 	}
 
 	printk(KERN_INFO
@@ -695,9 +704,7 @@
 	       cs->hw.sedl.cfg_reg + bytecnt,
 	       cs->irq);
 
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Sedl_card_msg;
 
 /*
@@ -706,8 +713,9 @@
  * and PCI card uses only IPAC (for the moment)
  */	
 	if (cs->hw.sedl.bus != SEDL_BUS_PCI) {
-		val = readreg(cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR,
-			cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC, IPAC_ID);
+		cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_ADR;
+		val = readreg(cs, cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC,
+			      IPAC_ID);
 		printk(KERN_DEBUG "Sedlbauer: testing IPAC version %x\n", val);
 	        if ((val == 1) || (val == 2)) {
 			/* IPAC */
@@ -742,21 +750,15 @@
 			cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_IPAC_ANY_IPAC;
 		}
 		test_and_set_bit(HW_IPAC, &cs->HW_Flags);
-		cs->readisac = &ReadISAC_IPAC;
-		cs->writeisac = &WriteISAC_IPAC;
-		cs->readisacfifo = &ReadISACfifo_IPAC;
-		cs->writeisacfifo = &WriteISACfifo_IPAC;
+		cs->dc_hw_ops = &ipac_dc_ops;
 		cs->irq_func = &sedlbauer_interrupt_ipac;
 
-		val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ID);
+		val = readreg(cs, cs->hw.sedl.isac, IPAC_ID);
 		printk(KERN_INFO "Sedlbauer: IPAC version %x\n", val);
 		reset_sedlbauer(cs);
 	} else {
 		/* ISAC_HSCX oder ISAC_ISAR */
-		cs->readisac = &ReadISAC;
-		cs->writeisac = &WriteISAC;
-		cs->readisacfifo = &ReadISACfifo;
-		cs->writeisacfifo = &WriteISACfifo;
+		cs->dc_hw_ops = &isac_ops;
 		if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
 			if (cs->hw.sedl.bus == SEDL_BUS_PCI) {
 				cs->hw.sedl.adr = cs->hw.sedl.cfg_reg +
@@ -783,9 +785,7 @@
 			cs->irq_func = &sedlbauer_interrupt_isar;
 			cs->auxcmd = &isar_auxcmd;
 			ISACVersion(cs, "Sedlbauer:");
-			cs->BC_Read_Reg = &ReadISAR;
-			cs->BC_Write_Reg = &WriteISAR;
-			cs->BC_Send_Data = &isar_fill_fifo;
+			cs->bc_hw_ops = &isar_ops;
 			ver = ISARVersion(cs, "Sedlbauer:");
 			if (ver < 0) {
 				printk(KERN_WARNING
diff -Nru a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
--- a/drivers/isdn/hisax/sedlbauer_cs.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/sedlbauer_cs.c	Wed Jan  8 20:04:43 2003
@@ -342,7 +342,7 @@
     tuple_t tuple;
     cisparse_t parse;
     int last_fn, last_ret;
-    u_char buf[64];
+    u8 buf[64];
     config_info_t conf;
     win_req_t req;
     memreq_t map;
diff -Nru a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c
--- a/drivers/isdn/hisax/sportster.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/sportster.c	Wed Jan  8 20:04:43 2003
@@ -38,88 +38,101 @@
 }
 
 static inline void
-read_fifo(unsigned int adr, u_char * data, int size)
+read_fifo(unsigned int adr, u8 * data, int size)
 {
 	insb(adr, data, size);
 }
 
 static void
-write_fifo(unsigned int adr, u_char * data, int size)
+write_fifo(unsigned int adr, u8 * data, int size)
 {
 	outsb(adr, data, size);
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (bytein(calc_off(cs->hw.spt.isac, offset)));
+	return bytein(calc_off(cs->hw.spt.isac, offset));
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	byteout(calc_off(cs->hw.spt.isac, offset), value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	read_fifo(cs->hw.spt.isac, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	write_fifo(cs->hw.spt.isac, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (bytein(calc_off(cs->hw.spt.hscx[hscx], offset)));
+	return bytein(calc_off(cs->hw.spt.hscx[hscx], offset));
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
 	byteout(calc_off(cs->hw.spt.hscx[hscx], offset), value);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) bytein(calc_off(cs->hw.spt.hscx[nr], reg))
-#define WRITEHSCX(cs, nr, reg, data) byteout(calc_off(cs->hw.spt.hscx[nr], reg), data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) read_fifo(cs->hw.spt.hscx[nr], ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) write_fifo(cs->hw.spt.hscx[nr], ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	read_fifo(cs->hw.spt.hscx[hscx], data, size);
+}
+
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	write_fifo(cs->hw.spt.hscx[hscx], data, size);
+}
 
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 sportster_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	spin_lock(&cs->lock);
-	val = READHSCX(cs, 1, HSCX_ISTA);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = ReadISAC(cs, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
-	val = READHSCX(cs, 1, HSCX_ISTA);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = ReadISAC(cs, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
@@ -183,13 +196,12 @@
 	
 	for (i=0;i<64;i++) {
 		adr = cs->hw.spt.cfg_reg + i *1024;
-		if (check_region(adr, 8)) {
+		if (!request_region(adr, 8, "sportster")) {
 			printk(KERN_WARNING
 				"HiSax: %s config port %x-%x already in use\n",
 				CardType[cs->typ], adr, adr + 8);
 			break;
-		} else
-			request_region(adr, 8, "sportster");
+		}
 	}
 	if (i==64)
 		return(1);
@@ -246,13 +258,8 @@
 	       CardType[cs->typ], cs->irq,
 	       cs->hw.spt.cfg_reg);
 
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Sportster_card_msg;
 	cs->irq_func = &sportster_interrupt;
 	ISACVersion(cs, "Sportster:");
diff -Nru a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h
--- a/drivers/isdn/hisax/st5481.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/st5481.h	Wed Jan  8 20:04:44 2003
@@ -238,7 +238,7 @@
 
 /* Generic FIFO structure */ 
 struct fifo {
-	u_char r,w,count,size;
+	u8 r,w,count,size;
 	spinlock_t lock;
 };
 
@@ -346,7 +346,7 @@
 struct st5481_b_out {
 	struct hdlc_vars hdlc_state;
 	struct urb *urb[2]; /* double buffering */
-	u_char flow_event;
+	u8 flow_event;
 	u_long busy;
 	struct sk_buff *tx_skb;
 };
@@ -452,7 +452,7 @@
 
 int  st5481_isoc_flatten(struct urb *urb);
 void st5481_usb_pipe_reset(struct st5481_adapter *adapter,
-		    u_char pipe, ctrl_complete_t complete, void *context);
+		    u8 pipe, ctrl_complete_t complete, void *context);
 void st5481_usb_ctrl_msg(struct st5481_adapter *adapter,
 		  u8 request, u8 requesttype, u16 value, u16 index,
 		  ctrl_complete_t complete, void *context);
@@ -482,7 +482,7 @@
 {
 	int i,j;
 	int len,ofs;
-	u_char *data;
+	u8 *data;
 
 	printk(KERN_DEBUG "%s: packets=%d,errors=%d\n",
 	       name,urb->number_of_packets,urb->error_count);
diff -Nru a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
--- a/drivers/isdn/hisax/st5481_b.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/isdn/hisax/st5481_b.c	Wed Jan  8 20:04:43 2003
@@ -136,7 +136,7 @@
  */
 static void led_blink(struct st5481_adapter *adapter)
 {
-	u_char leds = adapter->leds;
+	u8 leds = adapter->leds;
 
 	// 50 frames/sec for each channel
 	if (++adapter->led_counter % 50) {
diff -Nru a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c
--- a/drivers/isdn/hisax/st5481_usb.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/st5481_usb.c	Wed Jan  8 20:04:44 2003
@@ -96,7 +96,7 @@
  * Asynchronous pipe reset (async version of usb_clear_halt).
  */
 void st5481_usb_pipe_reset(struct st5481_adapter *adapter,
-		    u_char pipe,
+		    u8 pipe,
 		    ctrl_complete_t complete, void *context)
 {
 	DBG(1,"pipe=%02x",pipe);
@@ -178,8 +178,8 @@
  */
 static void usb_int_complete(struct urb *urb, struct pt_regs *regs)
 {
-	u_char *data = urb->transfer_buffer;
-	u_char irqbyte;
+	u8 *data = urb->transfer_buffer;
+	u8 irqbyte;
 	struct st5481_adapter *adapter = urb->context;
 	int j;
 	int status;
@@ -248,7 +248,7 @@
 	struct usb_host_endpoint *endpoint;
 	int status;
 	struct urb *urb;
-	u_char *buf;
+	u8 *buf;
 	
 	DBG(1,"");
 	
diff -Nru a/drivers/isdn/hisax/tei.c b/drivers/isdn/hisax/tei.c
--- a/drivers/isdn/hisax/tei.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/tei.c	Wed Jan  8 20:04:45 2003
@@ -34,7 +34,7 @@
 
 static struct Fsm teifsm;
 
-void tei_handler(struct PStack *st, u_char pr, struct sk_buff *skb);
+void tei_handler(struct PStack *st, u8 pr, struct sk_buff *skb);
 
 enum {
 	ST_TEI_NOP,
@@ -100,10 +100,10 @@
 }
 
 static void
-put_tei_msg(struct PStack *st, u_char m_id, unsigned int ri, u_char tei)
+put_tei_msg(struct PStack *st, u8 m_id, unsigned int ri, u8 tei)
 {
 	struct sk_buff *skb;
-	u_char *bp;
+	u8 *bp;
 
 	if (!(skb = alloc_skb(8, GFP_ATOMIC))) {
 		printk(KERN_WARNING "HiSax: No skb for TEI manager\n");
diff -Nru a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c
--- a/drivers/isdn/hisax/teleint.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/teleint.c	Wed Jan  8 20:04:45 2003
@@ -24,10 +24,10 @@
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
-static inline u_char
-readreg(unsigned int ale, unsigned int adr, u_char off)
+static inline u8
+readreg(unsigned int ale, unsigned int adr, u8 off)
 {
-	register u_char ret;
+	register u8 ret;
 	int max_delay = 2000;
 	unsigned long flags;
 
@@ -47,9 +47,9 @@
 }
 
 static inline void
-readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+readfifo(unsigned int ale, unsigned int adr, u8 off, u8 * data, int size)
 {
-	register u_char ret;
+	register u8 ret;
 	register int max_delay = 20000;
 	register int i;
 	
@@ -68,9 +68,9 @@
 
 
 static inline void
-writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
+writereg(unsigned int ale, unsigned int adr, u8 off, u8 data)
 {
-	register u_char ret;
+	register u8 ret;
 	int max_delay = 2000;
 	unsigned long flags;
 
@@ -89,9 +89,9 @@
 }
 
 static inline void
-writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
+writefifo(unsigned int ale, unsigned int adr, u8 off, u8 * data, int size)
 {
-	register u_char ret;
+	register u8 ret;
 	register int max_delay = 20000;
 	register int i;
 	
@@ -111,38 +111,45 @@
 
 /* Interface functions */
 
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+ReadISAC(struct IsdnCardState *cs, u8 offset)
 {
 	cs->hw.hfc.cip = offset;
 	return (readreg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, offset));
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+WriteISAC(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	cs->hw.hfc.cip = offset;
 	writereg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+ReadISACfifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	cs->hw.hfc.cip = 0;
 	readfifo(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, 0, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+WriteISACfifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	cs->hw.hfc.cip = 0;
 	writefifo(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, 0, data, size);
 }
 
-static u_char
-ReadHFC(struct IsdnCardState *cs, int data, u_char reg)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = ReadISAC,
+	.write_reg  = WriteISAC,
+	.read_fifo  = ReadISACfifo,
+	.write_fifo = WriteISACfifo,
+};
+
+static u8
+ReadHFC(struct IsdnCardState *cs, int data, u8 reg)
 {
-	register u_char ret;
+	register u8 ret;
 
 	if (data) {
 		cs->hw.hfc.cip = reg;
@@ -156,7 +163,7 @@
 }
 
 static void
-WriteHFC(struct IsdnCardState *cs, int data, u_char reg, u_char value)
+WriteHFC(struct IsdnCardState *cs, int data, u8 reg, u8 value)
 {
 	byteout(cs->hw.hfc.addr | 1, reg);
 	cs->hw.hfc.cip = reg;
@@ -166,11 +173,16 @@
 		debugl1(cs, "hfc W%c %02x %02x", data ? 'D' : 'C', reg, value);
 }
 
+static struct bc_hw_ops hfc_ops = {
+	.read_reg  = ReadHFC,
+	.write_reg = WriteHFC,
+};
+
 static void
 TeleInt_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	spin_lock(&cs->lock);
 	val = readreg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, ISAC_ISTA);
@@ -319,12 +331,8 @@
 	       cs->irq);
 
 	reset_TeleInt(cs);
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHFC;
-	cs->BC_Write_Reg = &WriteHFC;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hfc_ops;
 	cs->cardmsg = &TeleInt_card_msg;
 	cs->irq_func = &TeleInt_interrupt;
 	ISACVersion(cs, "TeleInt:");
diff -Nru a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c
--- a/drivers/isdn/hisax/teles0.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/teles0.c	Wed Jan  8 20:04:44 2003
@@ -29,155 +29,122 @@
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
-static inline u_char
-readisac(unsigned long adr, u_char off)
+static u8
+isac_read(struct IsdnCardState *cs, u8 off)
 {
-	return readb(adr + ((off & 1) ? 0x2ff : 0x100) + off);
+	return readb(cs->hw.teles0.membase + 
+		     ((off & 1) ? 0x2ff : 0x100) + off);
 }
 
-static inline void
-writeisac(unsigned long adr, u_char off, u_char data)
-{
-	writeb(data, adr + ((off & 1) ? 0x2ff : 0x100) + off); mb();
-}
-
-
-static inline u_char
-readhscx(unsigned long adr, int hscx, u_char off)
-{
-	return readb(adr + (hscx ? 0x1c0 : 0x180) +
-		     ((off & 1) ? 0x1ff : 0) + off);
-}
-
-static inline void
-writehscx(unsigned long adr, int hscx, u_char off, u_char data)
-{
-	writeb(data, adr + (hscx ? 0x1c0 : 0x180) +
-	       ((off & 1) ? 0x1ff : 0) + off); mb();
-}
-
-static inline void
-read_fifo_isac(unsigned long adr, u_char * data, int size)
+static void
+isac_write(struct IsdnCardState *cs, u8 off, u8 data)
 {
-	register int i;
-	register u_char *ad = (u_char *)adr + 0x100;
-	for (i = 0; i < size; i++)
-		data[i] = readb(ad);
+	writeb(data, cs->hw.teles0.membase + 
+	       ((off & 1) ? 0x2ff : 0x100) + off); mb();
 }
 
-static inline void
-write_fifo_isac(unsigned long adr, u_char * data, int size)
-{
-	register int i;
-	register u_char *ad = (u_char *)adr + 0x100;
-	for (i = 0; i < size; i++) {
-		writeb(data[i], ad); mb();
-	}
-}
 
-static inline void
-read_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
+static void
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
-	register int i;
-	register u_char *ad = (u_char *) (adr + (hscx ? 0x1c0 : 0x180));
+	int i;
+	unsigned long ad = cs->hw.teles0.membase + 0x100;
 	for (i = 0; i < size; i++)
 		data[i] = readb(ad);
 }
 
-static inline void
-write_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
+static void
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	int i;
-	register u_char *ad = (u_char *) (adr + (hscx ? 0x1c0 : 0x180));
+	unsigned long ad = cs->hw.teles0.membase + 0x100;
 	for (i = 0; i < size; i++) {
 		writeb(data[i], ad); mb();
 	}
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
-{
-	return (readisac(cs->hw.teles0.membase, offset));
-}
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
 
-static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 off)
 {
-	writeisac(cs->hw.teles0.membase, offset, value);
+	return readb(cs->hw.teles0.membase + (hscx ? 0x1c0 : 0x180) +
+		     ((off & 1) ? 0x1ff : 0) + off);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 off, u8 data)
 {
-	read_fifo_isac(cs->hw.teles0.membase, data, size);
+	writeb(data, cs->hw.teles0.membase + (hscx ? 0x1c0 : 0x180) +
+	       ((off & 1) ? 0x1ff : 0) + off); mb();
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
-{
-	write_fifo_isac(cs->hw.teles0.membase, data, size);
-}
-
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
 {
-	return (readhscx(cs->hw.teles0.membase, hscx, offset));
+	int i;
+	unsigned long ad = cs->hw.teles0.membase + (hscx ? 0x1c0 : 0x180);
+	for (i = 0; i < size; i++)
+		data[i] = readb(ad);
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
 {
-	writehscx(cs->hw.teles0.membase, hscx, offset, value);
+	int i;
+	unsigned long ad = cs->hw.teles0.membase + (hscx ? 0x1c0 : 0x180);
+	for (i = 0; i < size; i++) {
+		writeb(data[i], ad);
+	}
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readhscx(cs->hw.teles0.membase, nr, reg)
-#define WRITEHSCX(cs, nr, reg, data) writehscx(cs->hw.teles0.membase, nr, reg, data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) read_fifo_hscx(cs->hw.teles0.membase, nr, ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) write_fifo_hscx(cs->hw.teles0.membase, nr, ptr, cnt)
-
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 teles0_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 	int count = 0;
 
 	spin_lock(&cs->lock);
-	val = readhscx(cs->hw.teles0.membase, 1, HSCX_ISTA);
+	val = hscx_read(cs, 1, HSCX_ISTA);
       Start_HSCX:
 	if (val)
 		hscx_int_main(cs, val);
-	val = readisac(cs->hw.teles0.membase, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
       Start_ISAC:
 	if (val)
 		isac_interrupt(cs, val);
 	count++;
-	val = readhscx(cs->hw.teles0.membase, 1, HSCX_ISTA);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val && count < 5) {
 		if (cs->debug & L1_DEB_HSCX)
 			debugl1(cs, "HSCX IntStat after IntRoutine");
 		goto Start_HSCX;
 	}
-	val = readisac(cs->hw.teles0.membase, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val && count < 5) {
 		if (cs->debug & L1_DEB_ISAC)
 			debugl1(cs, "ISAC IntStat after IntRoutine");
 		goto Start_ISAC;
 	}
-	writehscx(cs->hw.teles0.membase, 0, HSCX_MASK, 0xFF);
-	writehscx(cs->hw.teles0.membase, 1, HSCX_MASK, 0xFF);
-	writeisac(cs->hw.teles0.membase, ISAC_MASK, 0xFF);
-	writeisac(cs->hw.teles0.membase, ISAC_MASK, 0x0);
-	writehscx(cs->hw.teles0.membase, 0, HSCX_MASK, 0x0);
-	writehscx(cs->hw.teles0.membase, 1, HSCX_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -193,7 +160,7 @@
 static int
 reset_teles0(struct IsdnCardState *cs)
 {
-	u_char cfval;
+	u8 cfval;
 
 	if (cs->hw.teles0.cfg_reg) {
 		switch (cs->irq) {
@@ -260,7 +227,7 @@
 int __init
 setup_teles0(struct IsdnCard *card)
 {
-	u_char val;
+	u8 val;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
 
@@ -282,15 +249,13 @@
 	}
 	cs->irq = card->para[0];
 	if (cs->hw.teles0.cfg_reg) {
-		if (check_region(cs->hw.teles0.cfg_reg, 8)) {
+		if (!request_region(cs->hw.teles0.cfg_reg, 8, "teles cfg")) {
 			printk(KERN_WARNING
 			  "HiSax: %s config port %x-%x already in use\n",
 			       CardType[card->typ],
 			       cs->hw.teles0.cfg_reg,
 			       cs->hw.teles0.cfg_reg + 8);
 			return (0);
-		} else {
-			request_region(cs->hw.teles0.cfg_reg, 8, "teles cfg");
 		}
 	}
 	if (cs->hw.teles0.cfg_reg) {
@@ -344,13 +309,8 @@
 		release_io_teles0(cs);
 		return (0);
 	}
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Teles_card_msg;
 	cs->irq_func = &teles0_interrupt;
 	ISACVersion(cs, "Teles0:");
diff -Nru a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c
--- a/drivers/isdn/hisax/teles3.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/teles3.c	Wed Jan  8 20:04:45 2003
@@ -26,86 +26,99 @@
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
-static inline u_char
-readreg(unsigned int adr, u_char off)
+static inline u8
+readreg(unsigned int adr, u8 off)
 {
 	return (bytein(adr + off));
 }
 
 static inline void
-writereg(unsigned int adr, u_char off, u_char data)
+writereg(unsigned int adr, u8 off, u8 data)
 {
 	byteout(adr + off, data);
 }
 
 
 static inline void
-read_fifo(unsigned int adr, u_char * data, int size)
+read_fifo(unsigned int adr, u8 * data, int size)
 {
 	insb(adr, data, size);
 }
 
 static void
-write_fifo(unsigned int adr, u_char * data, int size)
+write_fifo(unsigned int adr, u8 * data, int size)
 {
 	outsb(adr, data, size);
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
+static u8
+isac_read(struct IsdnCardState *cs, u8 offset)
 {
-	return (readreg(cs->hw.teles3.isac, offset));
+	return readreg(cs->hw.teles3.isac, offset);
 }
 
 static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
+isac_write(struct IsdnCardState *cs, u8 offset, u8 value)
 {
 	writereg(cs->hw.teles3.isac, offset, value);
 }
 
 static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	read_fifo(cs->hw.teles3.isacfifo, data, size);
 }
 
 static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
 {
 	write_fifo(cs->hw.teles3.isacfifo, data, size);
 }
 
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 offset)
 {
-	return (readreg(cs->hw.teles3.hscx[hscx], offset));
+	return readreg(cs->hw.teles3.hscx[hscx], offset);
 }
 
 static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
+hscx_write(struct IsdnCardState *cs, int hscx, u8 offset, u8 value)
 {
 	writereg(cs->hw.teles3.hscx[hscx], offset, value);
 }
 
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readreg(cs->hw.teles3.hscx[nr], reg)
-#define WRITEHSCX(cs, nr, reg, data) writereg(cs->hw.teles3.hscx[nr], reg, data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) read_fifo(cs->hw.teles3.hscxfifo[nr], ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) write_fifo(cs->hw.teles3.hscxfifo[nr], ptr, cnt)
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	read_fifo(cs->hw.teles3.hscxfifo[hscx], data, size);
+}
 
-#include "hscx_irq.c"
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 *data, int size)
+{
+	write_fifo(cs->hw.teles3.hscxfifo[hscx], data, size);
+}
+
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 teles3_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 #define MAXCOUNT 5
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 	int count = 0;
 
 	spin_lock(&cs->lock);
@@ -132,12 +145,12 @@
 	}
 	if (count >= MAXCOUNT)
 		printk(KERN_WARNING "Teles3: more than %d loops in teles3_interrupt\n", count);
-	writereg(cs->hw.teles3.hscx[0], HSCX_MASK, 0xFF);
-	writereg(cs->hw.teles3.hscx[1], HSCX_MASK, 0xFF);
-	writereg(cs->hw.teles3.isac, ISAC_MASK, 0xFF);
-	writereg(cs->hw.teles3.isac, ISAC_MASK, 0x0);
-	writereg(cs->hw.teles3.hscx[0], HSCX_MASK, 0x0);
-	writereg(cs->hw.teles3.hscx[1], HSCX_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -172,7 +185,7 @@
 static int
 reset_teles3(struct IsdnCardState *cs)
 {
-	u_char irqcfg;
+	u8 irqcfg;
 
 	if (cs->typ != ISDN_CTYPE_TELESPCMCIA) {
 		if ((cs->hw.teles3.cfg_reg) && (cs->typ != ISDN_CTYPE_COMPAQ_ISA)) {
@@ -265,7 +278,7 @@
 int __devinit
 setup_teles3(struct IsdnCard *card)
 {
-	u_char val;
+	u8 val;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
 
@@ -466,13 +479,8 @@
 		release_io_teles3(cs);
 		return (0);
 	}
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &Teles_card_msg;
 	cs->irq_func = &teles3_interrupt;
 	ISACVersion(cs, "Teles3:");
diff -Nru a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c
--- a/drivers/isdn/hisax/telespci.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/isdn/hisax/telespci.c	Wed Jan  8 20:04:44 2003
@@ -39,216 +39,189 @@
 #define WRITE_DATA_HSCX	(ZORAN_PO_WR | ZORAN_PO_GID1 | ZORAN_PO_GREG1)
 
 #define ZORAN_WAIT_NOBUSY	do { \
-					portdata = readl(adr + 0x200); \
+					portdata = readl(adr); \
 				} while (portdata & ZORAN_PO_RQ_PEN)
 
-static inline u_char
-readisac(unsigned long adr, u_char off)
+static u8
+isac_read(struct IsdnCardState *cs, u8 off)
 {
-	register unsigned int portdata;
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
+	unsigned int portdata;
 
 	ZORAN_WAIT_NOBUSY;
 	
 	/* set address for ISAC */
-	writel(WRITE_ADDR_ISAC | off, adr + 0x200);
+	writel(WRITE_ADDR_ISAC | off, adr);
 	ZORAN_WAIT_NOBUSY;
 	
 	/* read data from ISAC */
-	writel(READ_DATA_ISAC, adr + 0x200);
+	writel(READ_DATA_ISAC, adr);
 	ZORAN_WAIT_NOBUSY;
-	return((u_char)(portdata & ZORAN_PO_DMASK));
+	return((u8)(portdata & ZORAN_PO_DMASK));
 }
 
-static inline void
-writeisac(unsigned long adr, u_char off, u_char data)
+static void
+isac_write(struct IsdnCardState *cs, u8 off, u8 data)
 {
-	register unsigned int portdata;
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
+	unsigned int portdata;
 
 	ZORAN_WAIT_NOBUSY;
 	
 	/* set address for ISAC */
-	writel(WRITE_ADDR_ISAC | off, adr + 0x200);
+	writel(WRITE_ADDR_ISAC | off, adr);
 	ZORAN_WAIT_NOBUSY;
 
 	/* write data to ISAC */
-	writel(WRITE_DATA_ISAC | data, adr + 0x200);
-	ZORAN_WAIT_NOBUSY;
-}
-
-static inline u_char
-readhscx(unsigned long adr, int hscx, u_char off)
-{
-	register unsigned int portdata;
-
-	ZORAN_WAIT_NOBUSY;
-	/* set address for HSCX */
-	writel(WRITE_ADDR_HSCX | ((hscx ? 0x40:0) + off), adr + 0x200);
+	writel(WRITE_DATA_ISAC | data, adr);
 	ZORAN_WAIT_NOBUSY;
-	
-	/* read data from HSCX */
-	writel(READ_DATA_HSCX, adr + 0x200);
-	ZORAN_WAIT_NOBUSY;
-	return ((u_char)(portdata & ZORAN_PO_DMASK));
 }
 
-static inline void
-writehscx(unsigned long adr, int hscx, u_char off, u_char data)
-{
-	register unsigned int portdata;
-
-	ZORAN_WAIT_NOBUSY;
-	/* set address for HSCX */
-	writel(WRITE_ADDR_HSCX | ((hscx ? 0x40:0) + off), adr + 0x200);
-	ZORAN_WAIT_NOBUSY;
-
-	/* write data to HSCX */
-	writel(WRITE_DATA_HSCX | data, adr + 0x200);
-	ZORAN_WAIT_NOBUSY;
-}
-
-static inline void
-read_fifo_isac(unsigned long adr, u_char * data, int size)
+static void
+isac_read_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
-	register unsigned int portdata;
-	register int i;
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
+	unsigned int portdata;
+	int i;
 
 	ZORAN_WAIT_NOBUSY;
 	/* read data from ISAC */
 	for (i = 0; i < size; i++) {
 		/* set address for ISAC fifo */
-		writel(WRITE_ADDR_ISAC | 0x1E, adr + 0x200);
+		writel(WRITE_ADDR_ISAC | 0x1E, adr);
 		ZORAN_WAIT_NOBUSY;
-		writel(READ_DATA_ISAC, adr + 0x200);
+		writel(READ_DATA_ISAC, adr);
 		ZORAN_WAIT_NOBUSY;
-		data[i] = (u_char)(portdata & ZORAN_PO_DMASK);
+		data[i] = (u8)(portdata & ZORAN_PO_DMASK);
 	}
 }
 
 static void
-write_fifo_isac(unsigned long adr, u_char * data, int size)
+isac_write_fifo(struct IsdnCardState *cs, u8 *data, int size)
 {
-	register unsigned int portdata;
-	register int i;
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
+	unsigned int portdata;
+	int i;
 
 	ZORAN_WAIT_NOBUSY;
 	/* write data to ISAC */
 	for (i = 0; i < size; i++) {
 		/* set address for ISAC fifo */
-		writel(WRITE_ADDR_ISAC | 0x1E, adr + 0x200);
+		writel(WRITE_ADDR_ISAC | 0x1E, adr);
 		ZORAN_WAIT_NOBUSY;
-		writel(WRITE_DATA_ISAC | data[i], adr + 0x200);
+		writel(WRITE_DATA_ISAC | data[i], adr);
 		ZORAN_WAIT_NOBUSY;
 	}
 }
 
-static inline void
-read_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
+static struct dc_hw_ops isac_ops = {
+	.read_reg   = isac_read,
+	.write_reg  = isac_write,
+	.read_fifo  = isac_read_fifo,
+	.write_fifo = isac_write_fifo,
+};
+
+static u8
+hscx_read(struct IsdnCardState *cs, int hscx, u8 off)
+{
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
+	unsigned int portdata;
+
+	ZORAN_WAIT_NOBUSY;
+	/* set address for HSCX */
+	writel(WRITE_ADDR_HSCX | ((hscx ? 0x40:0) + off), adr);
+	ZORAN_WAIT_NOBUSY;
+	
+	/* read data from HSCX */
+	writel(READ_DATA_HSCX, adr);
+	ZORAN_WAIT_NOBUSY;
+	return ((u8)(portdata & ZORAN_PO_DMASK));
+}
+
+static void
+hscx_write(struct IsdnCardState *cs, int hscx, u8 off, u8 data)
+{
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
+	unsigned int portdata;
+
+	ZORAN_WAIT_NOBUSY;
+	/* set address for HSCX */
+	writel(WRITE_ADDR_HSCX | ((hscx ? 0x40:0) + off), adr);
+	ZORAN_WAIT_NOBUSY;
+
+	/* write data to HSCX */
+	writel(WRITE_DATA_HSCX | data, adr);
+	ZORAN_WAIT_NOBUSY;
+}
+
+static void
+hscx_read_fifo(struct IsdnCardState *cs, int hscx, u8 * data, int size)
 {
-	register unsigned int portdata;
-	register int i;
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
+	unsigned int portdata;
+	int i;
 
 	ZORAN_WAIT_NOBUSY;
 	/* read data from HSCX */
 	for (i = 0; i < size; i++) {
 		/* set address for HSCX fifo */
-		writel(WRITE_ADDR_HSCX |(hscx ? 0x5F:0x1F), adr + 0x200);
+		writel(WRITE_ADDR_HSCX |(hscx ? 0x5F:0x1F), adr);
 		ZORAN_WAIT_NOBUSY;
-		writel(READ_DATA_HSCX, adr + 0x200);
+		writel(READ_DATA_HSCX, adr);
 		ZORAN_WAIT_NOBUSY;
-		data[i] = (u_char) (portdata & ZORAN_PO_DMASK);
+		data[i] = (u8) (portdata & ZORAN_PO_DMASK);
 	}
 }
 
-static inline void
-write_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
+static void
+hscx_write_fifo(struct IsdnCardState *cs, int hscx, u8 * data, int size)
 {
+	unsigned long adr = cs->hw.teles0.membase + 0x200;
 	unsigned int portdata;
-	register int i;
+	int i;
 
 	ZORAN_WAIT_NOBUSY;
 	/* write data to HSCX */
 	for (i = 0; i < size; i++) {
 		/* set address for HSCX fifo */
-		writel(WRITE_ADDR_HSCX |(hscx ? 0x5F:0x1F), adr + 0x200);
+		writel(WRITE_ADDR_HSCX |(hscx ? 0x5F:0x1F), adr);
 		ZORAN_WAIT_NOBUSY;
-		writel(WRITE_DATA_HSCX | data[i], adr + 0x200);
+		writel(WRITE_DATA_HSCX | data[i], adr);
 		ZORAN_WAIT_NOBUSY;
 		udelay(10);
 	}
 }
 
-/* Interface functions */
-
-static u_char
-ReadISAC(struct IsdnCardState *cs, u_char offset)
-{
-	return (readisac(cs->hw.teles0.membase, offset));
-}
-
-static void
-WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
-{
-	writeisac(cs->hw.teles0.membase, offset, value);
-}
-
-static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
-{
-	read_fifo_isac(cs->hw.teles0.membase, data, size);
-}
-
-static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
-{
-	write_fifo_isac(cs->hw.teles0.membase, data, size);
-}
-
-static u_char
-ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
-{
-	return (readhscx(cs->hw.teles0.membase, hscx, offset));
-}
-
-static void
-WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
-{
-	writehscx(cs->hw.teles0.membase, hscx, offset, value);
-}
-
-/*
- * fast interrupt HSCX stuff goes here
- */
-
-#define READHSCX(cs, nr, reg) readhscx(cs->hw.teles0.membase, nr, reg)
-#define WRITEHSCX(cs, nr, reg, data) writehscx(cs->hw.teles0.membase, nr, reg, data)
-#define READHSCXFIFO(cs, nr, ptr, cnt) read_fifo_hscx(cs->hw.teles0.membase, nr, ptr, cnt)
-#define WRITEHSCXFIFO(cs, nr, ptr, cnt) write_fifo_hscx(cs->hw.teles0.membase, nr, ptr, cnt)
-
-#include "hscx_irq.c"
+static struct bc_hw_ops hscx_ops = {
+	.read_reg   = hscx_read,
+	.write_reg  = hscx_write,
+	.read_fifo  = hscx_read_fifo,
+	.write_fifo = hscx_write_fifo,
+};
 
 static void
 telespci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 #define MAXCOUNT 20
 	struct IsdnCardState *cs = dev_id;
-	u_char val;
+	u8 val;
 
 	spin_lock(&cs->lock);
-	val = readhscx(cs->hw.teles0.membase, 1, HSCX_ISTA);
+	val = hscx_read(cs, 1, HSCX_ISTA);
 	if (val)
 		hscx_int_main(cs, val);
-	val = readisac(cs->hw.teles0.membase, ISAC_ISTA);
+	val = isac_read(cs, ISAC_ISTA);
 	if (val)
 		isac_interrupt(cs, val);
 	/* Clear interrupt register for Zoran PCI controller */
 	writel(0x70000000, cs->hw.teles0.membase + 0x3C);
 
-	writehscx(cs->hw.teles0.membase, 0, HSCX_MASK, 0xFF);
-	writehscx(cs->hw.teles0.membase, 1, HSCX_MASK, 0xFF);
-	writeisac(cs->hw.teles0.membase, ISAC_MASK, 0xFF);
-	writeisac(cs->hw.teles0.membase, ISAC_MASK, 0x0);
-	writehscx(cs->hw.teles0.membase, 0, HSCX_MASK, 0x0);
-	writehscx(cs->hw.teles0.membase, 1, HSCX_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0xFF);
+	hscx_write(cs, 1, HSCX_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0xFF);
+	isac_write(cs, ISAC_MASK, 0x0);
+	hscx_write(cs, 0, HSCX_MASK, 0x0);
+	hscx_write(cs, 1, HSCX_MASK, 0x0);
 	spin_unlock(&cs->lock);
 }
 
@@ -332,13 +305,8 @@
 	       CardType[cs->typ], cs->irq,
 	       cs->hw.teles0.membase);
 
-	cs->readisac = &ReadISAC;
-	cs->writeisac = &WriteISAC;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadHSCX;
-	cs->BC_Write_Reg = &WriteHSCX;
-	cs->BC_Send_Data = &hscx_fill_fifo;
+	cs->dc_hw_ops = &isac_ops;
+	cs->bc_hw_ops = &hscx_ops;
 	cs->cardmsg = &TelesPCI_card_msg;
 	cs->irq_func = &telespci_interrupt;
 	cs->irq_flags |= SA_SHIRQ;
diff -Nru a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
--- a/drivers/isdn/hisax/w6692.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/isdn/hisax/w6692.c	Wed Jan  8 20:04:45 2003
@@ -45,6 +45,42 @@
 
 #define DBUSY_TIMER_VALUE 80
 
+static inline u8
+w6692_read_reg(struct IsdnCardState *cs, u8 offset)
+{
+	return (inb(cs->hw.w6692.iobase + offset));
+}
+
+static inline void
+w6692_write_reg(struct IsdnCardState *cs, u8 offset, u8 value)
+{
+	outb(value, cs->hw.w6692.iobase + offset);
+}
+
+static inline void
+w6692_read_fifo(struct IsdnCardState *cs, u8 * data, int size)
+{
+	insb(cs->hw.w6692.iobase + W_D_RFIFO, data, size);
+}
+
+static inline void
+w6692_write_fifo(struct IsdnCardState *cs, u8 * data, int size)
+{
+	outsb(cs->hw.w6692.iobase + W_D_XFIFO, data, size);
+}
+
+static inline u8
+w6692_bc_read_reg(struct IsdnCardState *cs, int bchan, u8 offset)
+{
+	return (inb(cs->hw.w6692.iobase + (bchan ? 0x40 : 0) + offset));
+}
+
+static inline void
+w6692_bc_write_reg(struct IsdnCardState *cs, int bchan, u8 offset, u8 value)
+{
+	outb(value, cs->hw.w6692.iobase + (bchan ? 0x40 : 0) + offset);
+}
+
 static char *W6692Ver[] __initdata =
 {"W6692 V00", "W6692 V01", "W6692 V10",
  "W6692 V11"};
@@ -54,7 +90,7 @@
 {
 	int val;
 
-	val = cs->readW6692(cs, W_D_RBCH);
+	val = w6692_read_reg(cs, W_D_RBCH);
 	printk(KERN_INFO "%s Winbond W6692 version (%x): %s\n", s, val, W6692Ver[(val >> 6) & 3]);
 }
 
@@ -63,7 +99,7 @@
 {
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "ph_command %x", command);
-	cs->writeisac(cs, W_CIX, command);
+	w6692_write_reg(cs, W_CIX, command);
 }
 
 
@@ -135,7 +171,7 @@
 static void
 W6692_empty_fifo(struct IsdnCardState *cs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "W6692_empty_fifo");
@@ -144,14 +180,14 @@
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "W6692_empty_fifo overrun %d",
 				cs->rcvidx + count);
-		cs->writeW6692(cs, W_D_CMDR, W_D_CMDR_RACK);
+		w6692_write_reg(cs, W_D_CMDR, W_D_CMDR_RACK);
 		cs->rcvidx = 0;
 		return;
 	}
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
-	cs->readW6692fifo(cs, ptr, count);
-	cs->writeW6692(cs, W_D_CMDR, W_D_CMDR_RACK);
+	w6692_read_fifo(cs, ptr, count);
+	w6692_write_reg(cs, W_D_CMDR, W_D_CMDR_RACK);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
 
@@ -171,8 +207,8 @@
 	if (!p)
 		return;
 
-	cs->writeW6692fifo(cs, p, count);
-	cs->writeW6692(cs, W_D_CMDR, more ? W_D_CMDR_XMS : (W_D_CMDR_XMS | W_D_CMDR_XME));
+	w6692_write_fifo(cs, p, count);
+	w6692_write_reg(cs, W_D_CMDR, more ? W_D_CMDR_XMS : (W_D_CMDR_XMS | W_D_CMDR_XME));
 	if (test_and_set_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
 		debugl1(cs, "W6692_fill_fifo dbusytimer running");
 		del_timer(&cs->dbusytimer);
@@ -185,7 +221,7 @@
 static void
 W6692B_empty_fifo(struct BCState *bcs, int count)
 {
-	u_char *ptr;
+	u8 *ptr;
 	struct IsdnCardState *cs = bcs->cs;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
@@ -194,14 +230,14 @@
 	if (bcs->hw.w6692.rcvidx + count > HSCX_BUFMAX) {
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "W6692B_empty_fifo: incoming packet too large");
-		cs->BC_Write_Reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
+		w6692_bc_write_reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
 		bcs->hw.w6692.rcvidx = 0;
 		return;
 	}
 	ptr = bcs->hw.w6692.rcvbuf + bcs->hw.w6692.rcvidx;
 	bcs->hw.w6692.rcvidx += count;
 	READW6692BFIFO(cs, bcs->channel, ptr, count);
-	cs->BC_Write_Reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
+	w6692_bc_write_reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -224,27 +260,27 @@
 		return;
 
 	WRITEW6692BFIFO(cs, bcs->channel, p, count);
-	cs->BC_Write_Reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACT | W_B_CMDR_XMS | (more ? 0 : W_B_CMDR_XME));
+	w6692_bc_write_reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACT | W_B_CMDR_XMS | (more ? 0 : W_B_CMDR_XME));
 }
 
 static void
 reset_xmit(struct BCState *bcs)
 {
-	bcs->cs->BC_Write_Reg(bcs->cs, bcs->channel, W_B_CMDR,
-			      W_B_CMDR_XRST | W_B_CMDR_RACT);
+	w6692_bc_write_reg(bcs->cs, bcs->channel, W_B_CMDR,
+			   W_B_CMDR_XRST | W_B_CMDR_RACT);
 }
 
 static void
-W6692B_interrupt(struct IsdnCardState *cs, u_char bchan)
+W6692B_interrupt(struct IsdnCardState *cs, u8 bchan)
 {
-	u_char val;
-	u_char r;
+	u8 val;
+	u8 r;
 	struct BCState *bcs;
 	struct sk_buff *skb;
 	int count;
 
 	bcs = (cs->bcs->channel == bchan) ? cs->bcs : (cs->bcs+1);
-	val = cs->BC_Read_Reg(cs, bchan, W_B_EXIR);
+	val = w6692_bc_read_reg(cs, bchan, W_B_EXIR);
 	debugl1(cs, "W6692B chan %d B_EXIR 0x%02X", bchan, val);
 
 	if (!test_bit(BC_FLG_INIT, &bcs->Flag)) {
@@ -252,7 +288,7 @@
 		return;
 	}
 	if (val & W_B_EXI_RME) {	/* RME */
-		r = cs->BC_Read_Reg(cs, bchan, W_B_STAR);
+		r = w6692_bc_read_reg(cs, bchan, W_B_STAR);
 		if (r & (W_B_STAR_RDOV | W_B_STAR_CRCE | W_B_STAR_RMB | W_B_STAR_XDOW)) {
 			if ((r & W_B_STAR_RDOV) && bcs->mode)
 				if (cs->debug & L1_DEB_WARN)
@@ -261,9 +297,9 @@
 			if (r & W_B_STAR_CRCE)
 				if (cs->debug & L1_DEB_WARN)
 					debugl1(cs, "W6692 B CRC error");
-			cs->BC_Write_Reg(cs, bchan, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RRST | W_B_CMDR_RACT);
+			w6692_bc_write_reg(cs, bchan, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RRST | W_B_CMDR_RACT);
 		} else {
-			count = cs->BC_Read_Reg(cs, bchan, W_B_RBCL) & (W_B_FIFO_THRESH - 1);
+			count = w6692_bc_read_reg(cs, bchan, W_B_RBCL) & (W_B_FIFO_THRESH - 1);
 			if (count == 0)
 				count = W_B_FIFO_THRESH;
 			W6692B_empty_fifo(bcs, count);
@@ -307,21 +343,21 @@
 W6692_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
 	struct IsdnCardState *cs = dev_id;
-	u_char val, exval, v1;
+	u8 val, exval, v1;
 	struct sk_buff *skb;
 	unsigned int count;
 	int icnt = 5;
 
 	spin_lock(&cs->lock);
 
-	val = cs->readW6692(cs, W_ISTA);
+	val = w6692_read_reg(cs, W_ISTA);
 
       StartW6692:
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "W6692 ISTA %x", val);
 
 	if (val & W_INT_D_RME) {	/* RME */
-		exval = cs->readW6692(cs, W_D_RSTA);
+		exval = w6692_read_reg(cs, W_D_RSTA);
 		if (exval & (W_D_RSTA_RDOV | W_D_RSTA_CRCE | W_D_RSTA_RMB)) {
 			if (exval & W_D_RSTA_RDOV)
 				if (cs->debug & L1_DEB_WARN)
@@ -332,9 +368,9 @@
 			if (exval & W_D_RSTA_RMB)
 				if (cs->debug & L1_DEB_WARN)
 					debugl1(cs, "W6692 D-channel ABORT");
-			cs->writeW6692(cs, W_D_CMDR, W_D_CMDR_RACK | W_D_CMDR_RRST);
+			w6692_write_reg(cs, W_D_CMDR, W_D_CMDR_RACK | W_D_CMDR_RRST);
 		} else {
-			count = cs->readW6692(cs, W_D_RBCL) & (W_D_FIFO_THRESH - 1);
+			count = w6692_read_reg(cs, W_D_RBCL) & (W_D_FIFO_THRESH - 1);
 			if (count == 0)
 				count = W_D_FIFO_THRESH;
 			W6692_empty_fifo(cs, count);
@@ -362,7 +398,7 @@
 			debugl1(cs, "W6692 spurious XINT!");
 	}
 	if (val & W_INT_D_EXI) {	/* EXI */
-		exval = cs->readW6692(cs, W_D_EXIR);
+		exval = w6692_read_reg(cs, W_D_EXIR);
 		if (cs->debug & L1_DEB_WARN)
 			debugl1(cs, "W6692 D_EXIR %02x", exval);
 		if (exval & (W_D_EXI_XDUN | W_D_EXI_XCOL)) {	/* Transmit underrun/collision */
@@ -371,18 +407,18 @@
 		if (exval & W_D_EXI_RDOV) {	/* RDOV */
 			debugl1(cs, "W6692 D-channel RDOV");
 			printk(KERN_WARNING "HiSax: W6692 D-RDOV\n");
-			cs->writeW6692(cs, W_D_CMDR, W_D_CMDR_RRST);
+			w6692_write_reg(cs, W_D_CMDR, W_D_CMDR_RRST);
 		}
 		if (exval & W_D_EXI_TIN2) {	/* TIN2 - never */
 			debugl1(cs, "W6692 spurious TIN2 interrupt");
 		}
 		if (exval & W_D_EXI_MOC) {	/* MOC - not supported */
 			debugl1(cs, "W6692 spurious MOC interrupt");
-			v1 = cs->readW6692(cs, W_MOSR);
+			v1 = w6692_read_reg(cs, W_MOSR);
 			debugl1(cs, "W6692 MOSR %02x", v1);
 		}
 		if (exval & W_D_EXI_ISC) {	/* ISC - Level1 change */
-			v1 = cs->readW6692(cs, W_CIR);
+			v1 = w6692_read_reg(cs, W_CIR);
 			if (cs->debug & L1_DEB_ISAC)
 				debugl1(cs, "W6692 ISC CIR=0x%02X", v1);
 			if (v1 & W_CIR_ICC) {
@@ -392,7 +428,7 @@
 				sched_d_event(cs, D_L1STATECHANGE);
 			}
 			if (v1 & W_CIR_SCC) {
-				v1 = cs->readW6692(cs, W_SQR);
+				v1 = w6692_read_reg(cs, W_SQR);
 				debugl1(cs, "W6692 SCC SQR=0x%02X", v1);
 			}
 		}
@@ -411,14 +447,14 @@
 		debugl1(cs, "W6692 B channel 2 interrupt");
 		W6692B_interrupt(cs, 1);
 	}
-	val = cs->readW6692(cs, W_ISTA);
+	val = w6692_read_reg(cs, W_ISTA);
 	if (val && icnt) {
 		icnt--;
 		goto StartW6692;
 	}
 	if (!icnt) {
 		printk(KERN_WARNING "W6692 IRQ LOOP\n");
-		cs->writeW6692(cs, W_IMASK, 0xff);
+		w6692_write_reg(cs, W_IMASK, 0xff);
 	}
 	spin_unlock(&cs->lock);
 }
@@ -500,8 +536,8 @@
 	int rbch, star;
 
 	if (test_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
-		rbch = cs->readW6692(cs, W_D_RBCH);
-		star = cs->readW6692(cs, W_D_STAR);
+		rbch = w6692_read_reg(cs, W_D_RBCH);
+		star = w6692_read_reg(cs, W_D_STAR);
 		if (cs->debug)
 			debugl1(cs, "D-Channel Busy D_RBCH %02x D_STAR %02x",
 				rbch, star);
@@ -523,7 +559,7 @@
 				printk(KERN_WARNING "HiSax: W6692 D-Channel Busy no skb\n");
 				debugl1(cs, "D-Channel Busy no skb");
 			}
-			cs->writeW6692(cs, W_D_CMDR, W_D_CMDR_XRST);	/* Transmitter reset */
+			w6692_write_reg(cs, W_D_CMDR, W_D_CMDR_XRST);	/* Transmitter reset */
 			cs->irq_func(cs->irq, cs, NULL);
 		}
 	}
@@ -543,21 +579,21 @@
 
 	switch (mode) {
 		case (L1_MODE_NULL):
-			cs->BC_Write_Reg(cs, bchan, W_B_MODE, 0);
+			w6692_bc_write_reg(cs, bchan, W_B_MODE, 0);
 			break;
 		case (L1_MODE_TRANS):
-			cs->BC_Write_Reg(cs, bchan, W_B_MODE, W_B_MODE_MMS);
+			w6692_bc_write_reg(cs, bchan, W_B_MODE, W_B_MODE_MMS);
 			break;
 		case (L1_MODE_HDLC):
-			cs->BC_Write_Reg(cs, bchan, W_B_MODE, W_B_MODE_ITF);
-			cs->BC_Write_Reg(cs, bchan, W_B_ADM1, 0xff);
-			cs->BC_Write_Reg(cs, bchan, W_B_ADM2, 0xff);
+			w6692_bc_write_reg(cs, bchan, W_B_MODE, W_B_MODE_ITF);
+			w6692_bc_write_reg(cs, bchan, W_B_ADM1, 0xff);
+			w6692_bc_write_reg(cs, bchan, W_B_ADM2, 0xff);
 			break;
 	}
 	if (mode)
-		cs->BC_Write_Reg(cs, bchan, W_B_CMDR, W_B_CMDR_RRST |
+		w6692_bc_write_reg(cs, bchan, W_B_CMDR, W_B_CMDR_RRST |
 				 W_B_CMDR_RACT | W_B_CMDR_XRST);
-	cs->BC_Write_Reg(cs, bchan, W_B_EXIM, 0x00);
+	w6692_bc_write_reg(cs, bchan, W_B_EXIM, 0x00);
 }
 
 static void
@@ -660,23 +696,23 @@
 
 void resetW6692(struct IsdnCardState *cs)
 {
-	cs->writeW6692(cs, W_D_CTL, W_D_CTL_SRST);
+	w6692_write_reg(cs, W_D_CTL, W_D_CTL_SRST);
 	schedule_timeout((10*HZ)/1000);
-	cs->writeW6692(cs, W_D_CTL, 0x00);
+	w6692_write_reg(cs, W_D_CTL, 0x00);
 	schedule_timeout((10*HZ)/1000);
-	cs->writeW6692(cs, W_IMASK, 0xff);
-	cs->writeW6692(cs, W_D_SAM, 0xff);
-	cs->writeW6692(cs, W_D_TAM, 0xff);
-	cs->writeW6692(cs, W_D_EXIM, 0x00);
-	cs->writeW6692(cs, W_D_MODE, W_D_MODE_RACT);
-	cs->writeW6692(cs, W_IMASK, 0x18);
+	w6692_write_reg(cs, W_IMASK, 0xff);
+	w6692_write_reg(cs, W_D_SAM, 0xff);
+	w6692_write_reg(cs, W_D_TAM, 0xff);
+	w6692_write_reg(cs, W_D_EXIM, 0x00);
+	w6692_write_reg(cs, W_D_MODE, W_D_MODE_RACT);
+	w6692_write_reg(cs, W_IMASK, 0x18);
 	if (cs->subtyp == W6692_USR) {
 		/* seems that USR implemented some power control features
 		 * Pin 79 is connected to the oscilator circuit so we
 		 * have to handle it here
 		 */
-		cs->writeW6692(cs, W_PCTL, 0x80);
-		cs->writeW6692(cs, W_XDATA, 0x00);
+		w6692_write_reg(cs, W_PCTL, 0x80);
+		w6692_write_reg(cs, W_XDATA, 0x00);
 	}
 }
 
@@ -704,53 +740,15 @@
 	}
 	if (part & 2) {
 		/* Reenable all IRQ */
-		cs->writeW6692(cs, W_IMASK, 0x18);
-		cs->writeW6692(cs, W_D_EXIM, 0x00);
-		cs->BC_Write_Reg(cs, 0, W_B_EXIM, 0x00);
-		cs->BC_Write_Reg(cs, 1, W_B_EXIM, 0x00);
+		w6692_write_reg(cs, W_IMASK, 0x18);
+		w6692_write_reg(cs, W_D_EXIM, 0x00);
+		w6692_bc_write_reg(cs, 0, W_B_EXIM, 0x00);
+		w6692_bc_write_reg(cs, 1, W_B_EXIM, 0x00);
 		/* Reset D-chan receiver and transmitter */
-		cs->writeW6692(cs, W_D_CMDR, W_D_CMDR_RRST | W_D_CMDR_XRST);
+		w6692_write_reg(cs, W_D_CMDR, W_D_CMDR_RRST | W_D_CMDR_XRST);
 	}
 }
 
-/* Interface functions */
-
-static u_char
-ReadW6692(struct IsdnCardState *cs, u_char offset)
-{
-	return (inb(cs->hw.w6692.iobase + offset));
-}
-
-static void
-WriteW6692(struct IsdnCardState *cs, u_char offset, u_char value)
-{
-	outb(value, cs->hw.w6692.iobase + offset);
-}
-
-static void
-ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
-{
-	insb(cs->hw.w6692.iobase + W_D_RFIFO, data, size);
-}
-
-static void
-WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
-{
-	outsb(cs->hw.w6692.iobase + W_D_XFIFO, data, size);
-}
-
-static u_char
-ReadW6692B(struct IsdnCardState *cs, int bchan, u_char offset)
-{
-	return (inb(cs->hw.w6692.iobase + (bchan ? 0x40 : 0) + offset));
-}
-
-static void
-WriteW6692B(struct IsdnCardState *cs, int bchan, u_char offset, u_char value)
-{
-	outb(value, cs->hw.w6692.iobase + (bchan ? 0x40 : 0) + offset);
-}
-
 static int
 w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 {
@@ -759,10 +757,10 @@
 			resetW6692(cs);
 			return (0);
 		case CARD_RELEASE:
-			cs->writeW6692(cs, W_IMASK, 0xff);
+			w6692_write_reg(cs, W_IMASK, 0xff);
 			release_region(cs->hw.w6692.iobase, 256);
 			if (cs->subtyp == W6692_USR) {
-				cs->writeW6692(cs, W_XDATA, 0x04);
+				w6692_write_reg(cs, W_XDATA, 0x04);
 			}
 			return (0);
 		case CARD_INIT:
@@ -774,6 +772,10 @@
 	return (0);
 }
 
+static struct bc_l1_ops w6692_bc_l1_ops = {
+	.fill_fifo = W6692B_fill_fifo,
+};
+
 static int id_idx ;
 
 static struct pci_dev *dev_w6692 __initdata = NULL;
@@ -783,8 +785,8 @@
 {
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
-	u_char found = 0;
-	u_char pci_irq = 0;
+	u8 found = 0;
+	u8 pci_irq = 0;
 	u_int pci_ioaddr = 0;
 
 #ifdef __BIG_ENDIAN
@@ -842,16 +844,14 @@
 	printk(KERN_INFO "Found: %s %s, I/O base: 0x%x, irq: %d\n",
 	       id_list[cs->subtyp].vendor_name, id_list[cs->subtyp].card_name,
 	       pci_ioaddr, pci_irq);
-	if (check_region((cs->hw.w6692.iobase), 256)) {
+	if (!request_region((cs->hw.w6692.iobase), 256,
+			    id_list[cs->subtyp].card_name)) {
 		printk(KERN_WARNING
 		       "HiSax: %s I/O ports %x-%x already in use\n",
 		       id_list[cs->subtyp].card_name,
 		       cs->hw.w6692.iobase,
 		       cs->hw.w6692.iobase + 255);
 		return (0);
-	} else {
-		request_region(cs->hw.w6692.iobase, 256,
-			       id_list[cs->subtyp].card_name);
 	}
 #else
 	printk(KERN_WARNING "HiSax: W6692 and NO_PCI_BIOS\n");
@@ -864,22 +864,16 @@
 	       id_list[cs->subtyp].card_name, cs->irq,
 	       cs->hw.w6692.iobase);
 
-	cs->readW6692 = &ReadW6692;
-	cs->writeW6692 = &WriteW6692;
-	cs->readisacfifo = &ReadISACfifo;
-	cs->writeisacfifo = &WriteISACfifo;
-	cs->BC_Read_Reg = &ReadW6692B;
-	cs->BC_Write_Reg = &WriteW6692B;
-	cs->BC_Send_Data = &W6692B_fill_fifo;
+	cs->bc_l1_ops = &w6692_bc_l1_ops;
 	cs->DC_Send_Data = &W6692_fill_fifo;
 	cs->cardmsg = &w6692_card_msg;
 	cs->irq_func = &W6692_interrupt;
 	cs->irq_flags |= SA_SHIRQ;
 	W6692Version(cs, "W6692:");
-	printk(KERN_INFO "W6692 ISTA=0x%X\n", ReadW6692(cs, W_ISTA));
-	printk(KERN_INFO "W6692 IMASK=0x%X\n", ReadW6692(cs, W_IMASK));
-	printk(KERN_INFO "W6692 D_EXIR=0x%X\n", ReadW6692(cs, W_D_EXIR));
-	printk(KERN_INFO "W6692 D_EXIM=0x%X\n", ReadW6692(cs, W_D_EXIM));
-	printk(KERN_INFO "W6692 D_RSTA=0x%X\n", ReadW6692(cs, W_D_RSTA));
+	printk(KERN_INFO "W6692 ISTA=0x%X\n", w6692_read_reg(cs, W_ISTA));
+	printk(KERN_INFO "W6692 IMASK=0x%X\n", w6692_read_reg(cs, W_IMASK));
+	printk(KERN_INFO "W6692 D_EXIR=0x%X\n", w6692_read_reg(cs, W_D_EXIR));
+	printk(KERN_INFO "W6692 D_EXIM=0x%X\n", w6692_read_reg(cs, W_D_EXIM));
+	printk(KERN_INFO "W6692 D_RSTA=0x%X\n", w6692_read_reg(cs, W_D_RSTA));
 	return (1);
 }
diff -Nru a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
--- a/drivers/macintosh/ans-lcd.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/macintosh/ans-lcd.c	Wed Jan  8 20:04:45 2003
@@ -140,6 +140,7 @@
 anslcd_init(void)
 {
 	int a;
+	int retval;
 	struct device_node* node;
 
 	node = find_devices("lcd");
@@ -150,7 +151,12 @@
 
 	anslcd_ptr = (volatile unsigned char*)ioremap(ANSLCD_ADDR, 0x20);
 	
-	misc_register(&anslcd_dev);
+	retval = misc_register(&anslcd_dev);
+	if(retval < 0){
+		printk(KERN_INFO "LCD: misc_register failed\n");
+		iounmap(anslcd_ptr);
+		return retval;
+	}
 
 #ifdef DEBUG
 	printk(KERN_DEBUG "LCD: init\n");
diff -Nru a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c
--- a/drivers/macintosh/apm_emu.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/macintosh/apm_emu.c	Wed Jan  8 20:04:45 2003
@@ -183,7 +183,7 @@
 static ssize_t do_read(struct file *fp, char *buf, size_t count, loff_t *ppos)
 {
 	struct apm_user *	as;
-	int			i;
+	size_t			i;
 	apm_event_t		event;
 	DECLARE_WAITQUEUE(wait, current);
 
diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
--- a/drivers/macintosh/via-pmu.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/macintosh/via-pmu.c	Wed Jan  8 20:04:45 2003
@@ -2702,8 +2702,10 @@
 
 void pmu_device_init(void)
 {
-	if (via)
-		misc_register(&pmu_device);
+	if (!via)
+		return;
+	if (misc_register(&pmu_device) < 0)
+		printk(KERN_ERR "via-pmu: cannot register misc device.\n");
 }
 #endif /* CONFIG_PMAC_PBOOK */
 
diff -Nru a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c
--- a/drivers/macintosh/via-pmu68k.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/macintosh/via-pmu68k.c	Wed Jan  8 20:04:43 2003
@@ -1052,8 +1052,10 @@
 
 void pmu_device_init(void)
 {
-	if (via)
-		misc_register(&pmu_device);
+	if (!via)
+		return;
+	if (misc_register(&pmu_device) < 0)
+		printk(KERN_ERR "via-pmu68k: cannot register misc device.\n");
 }
 #endif /* CONFIG_PMAC_PBOOK */
 
diff -Nru a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
--- a/drivers/md/dm-ioctl.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/md/dm-ioctl.c	Wed Jan  8 20:04:43 2003
@@ -812,6 +812,24 @@
 		return -EINVAL;
 	}
 
+	/*
+	 * You may ask the interface to drop its reference to an
+	 * in use device.  This is no different to unlinking a
+	 * file that someone still has open.  The device will not
+	 * actually be destroyed until the last opener closes it.
+	 * The name and uuid of the device (both are interface
+	 * properties) will be available for reuse immediately.
+	 *
+	 * You don't want to drop a _suspended_ device from the
+	 * interface, since that will leave you with no way of
+	 * resuming it.
+	 */
+	if (dm_suspended(hc->md)) {
+		DMWARN("refusing to remove a suspended device.");
+		up_write(&_hash_lock);
+		return -EPERM;
+	}
+
 	__hash_remove(hc);
 	up_write(&_hash_lock);
 	return 0;
diff -Nru a/drivers/md/dm-table.c b/drivers/md/dm-table.c
--- a/drivers/md/dm-table.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/md/dm-table.c	Wed Jan  8 20:04:45 2003
@@ -250,12 +250,12 @@
 
 	/* free the targets */
 	for (i = 0; i < t->num_targets; i++) {
-		struct dm_target *tgt = &t->targets[i];
-
-		dm_put_target_type(t->targets[i].type);
+		struct dm_target *tgt = t->targets + i;
 
 		if (tgt->type->dtr)
 			tgt->type->dtr(tgt);
+
+		dm_put_target_type(tgt->type);
 	}
 
 	vfree(t->highs);
@@ -578,9 +578,8 @@
 int dm_table_add_target(struct dm_table *t, const char *type,
 			sector_t start, sector_t len, char *params)
 {
-	int r, argc;
+	int r = -EINVAL, argc;
 	char *argv[32];
-	struct target_type *tt;
 	struct dm_target *tgt;
 
 	if ((r = check_space(t)))
@@ -589,14 +588,13 @@
 	tgt = t->targets + t->num_targets;
 	memset(tgt, 0, sizeof(*tgt));
 
-	tt = dm_get_target_type(type);
-	if (!tt) {
+	tgt->type = dm_get_target_type(type);
+	if (!tgt->type) {
 		tgt->error = "unknown target type";
-		return -EINVAL;
+		goto bad;
 	}
 
 	tgt->table = t;
-	tgt->type = tt;
 	tgt->begin = start;
 	tgt->len = len;
 	tgt->error = "Unknown error";
@@ -605,23 +603,19 @@
 	 * Does this target adjoin the previous one ?
 	 */
 	if (!adjoin(t, tgt)) {
-		DMERR("Gap in table");
-		dm_put_target_type(tt);
-		return -EINVAL;
+		tgt->error = "Gap in table";
+		goto bad;
 	}
 
 	r = split_args(ARRAY_SIZE(argv), &argc, argv, params);
 	if (r) {
 		tgt->error = "couldn't split parameters";
-		dm_put_target_type(tt);
-		return r;
+		goto bad;
 	}
 
-	r = tt->ctr(tgt, argc, argv);
-	if (r) {
-		dm_put_target_type(tt);
-		return r;
-	}
+	r = tgt->type->ctr(tgt, argc, argv);
+	if (r)
+		goto bad;
 
 	t->highs[t->num_targets++] = tgt->begin + tgt->len - 1;
 
@@ -629,6 +623,11 @@
 	 * the merge fn apply the target level restrictions. */
 	combine_restrictions_low(&t->limits, &tgt->limits);
 	return 0;
+
+ bad:
+	printk(KERN_ERR DM_NAME ": %s\n", tgt->error);
+	dm_put_target_type(tgt->type);
+	return r;
 }
 
 static int setup_indexes(struct dm_table *t)
@@ -752,3 +751,4 @@
 EXPORT_SYMBOL(dm_get_device);
 EXPORT_SYMBOL(dm_put_device);
 EXPORT_SYMBOL(dm_table_event);
+EXPORT_SYMBOL(dm_table_get_mode);
diff -Nru a/drivers/md/dm-target.c b/drivers/md/dm-target.c
--- a/drivers/md/dm-target.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/md/dm-target.c	Wed Jan  8 20:04:45 2003
@@ -19,7 +19,7 @@
 };
 
 static LIST_HEAD(_targets);
-static rwlock_t _lock = RW_LOCK_UNLOCKED;
+static DECLARE_RWSEM(_lock);
 
 #define DM_MOD_NAME_SIZE 32
 
@@ -42,16 +42,17 @@
 {
 	struct tt_internal *ti;
 
-	read_lock(&_lock);
+	down_read(&_lock);
+
 	ti = __find_target_type(name);
-	if (ti && ti->use == 0) {
-		if (try_module_get(ti->tt.module))
-			ti->use++;
-		else
+	if (ti) {
+		if ((ti->use == 0) && !try_module_get(ti->tt.module))
 			ti = NULL;
+		else
+			ti->use++;
 	}
-	read_unlock(&_lock);
 
+	up_read(&_lock);
 	return ti;
 }
 
@@ -65,8 +66,6 @@
 
 	strcat(module_name, name);
 	request_module(module_name);
-
-	return;
 }
 
 struct target_type *dm_get_target_type(const char *name)
@@ -85,13 +84,13 @@
 {
 	struct tt_internal *ti = (struct tt_internal *) t;
 
-	read_lock(&_lock);
+	down_read(&_lock);
 	if (--ti->use == 0)
 		module_put(ti->tt.module);
 
 	if (ti->use < 0)
 		BUG();
-	read_unlock(&_lock);
+	up_read(&_lock);
 
 	return;
 }
@@ -116,13 +115,13 @@
 	if (!ti)
 		return -ENOMEM;
 
-	write_lock(&_lock);
+	down_write(&_lock);
 	if (__find_target_type(t->name))
 		rv = -EEXIST;
 	else
 		list_add(&ti->list, &_targets);
 
-	write_unlock(&_lock);
+	up_write(&_lock);
 	return rv;
 }
 
@@ -130,21 +129,21 @@
 {
 	struct tt_internal *ti;
 
-	write_lock(&_lock);
+	down_write(&_lock);
 	if (!(ti = __find_target_type(t->name))) {
-		write_unlock(&_lock);
+		up_write(&_lock);
 		return -EINVAL;
 	}
 
 	if (ti->use) {
-		write_unlock(&_lock);
+		up_write(&_lock);
 		return -ETXTBSY;
 	}
 
 	list_del(&ti->list);
 	kfree(ti);
 
-	write_unlock(&_lock);
+	up_write(&_lock);
 	return 0;
 }
 
@@ -160,13 +159,11 @@
 static void io_err_dtr(struct dm_target *ti)
 {
 	/* empty */
-	return;
 }
 
 static int io_err_map(struct dm_target *ti, struct bio *bio)
 {
-	bio_io_error(bio, 0);
-	return 0;
+	return -EIO;
 }
 
 static struct target_type error_target = {
diff -Nru a/drivers/md/dm.c b/drivers/md/dm.c
--- a/drivers/md/dm.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/md/dm.c	Wed Jan  8 20:04:44 2003
@@ -347,18 +347,15 @@
 	struct bio_vec *bv = bio->bi_io_vec + idx;
 
 	clone = bio_alloc(GFP_NOIO, 1);
+	memcpy(clone->bi_io_vec, bv, sizeof(*bv));
 
-	if (clone) {
-		memcpy(clone->bi_io_vec, bv, sizeof(*bv));
-
-		clone->bi_sector = sector;
-		clone->bi_bdev = bio->bi_bdev;
-		clone->bi_rw = bio->bi_rw;
-		clone->bi_vcnt = 1;
-		clone->bi_size = to_bytes(len);
-		clone->bi_io_vec->bv_offset = offset;
-		clone->bi_io_vec->bv_len = clone->bi_size;
-	}
+	clone->bi_sector = sector;
+	clone->bi_bdev = bio->bi_bdev;
+	clone->bi_rw = bio->bi_rw;
+	clone->bi_vcnt = 1;
+	clone->bi_size = to_bytes(len);
+	clone->bi_io_vec->bv_offset = offset;
+	clone->bi_io_vec->bv_len = clone->bi_size;
 
 	return clone;
 }
@@ -432,11 +429,6 @@
 
 		clone = split_bvec(bio, ci->sector, ci->idx,
 				   bv->bv_offset, max);
-		if (!clone) {
-			dec_pending(ci->io, -ENOMEM);
-			return;
-		}
-
 		__map_bio(ti, clone, ci->io);
 
 		ci->sector += max;
@@ -446,11 +438,6 @@
 		len = to_sector(bv->bv_len) - max;
 		clone = split_bvec(bio, ci->sector, ci->idx,
 				   bv->bv_offset + to_bytes(max), len);
-		if (!clone) {
-			dec_pending(ci->io, -ENOMEM);
-			return;
-		}
-
 		__map_bio(ti, clone, ci->io);
 
 		ci->sector += len;
@@ -475,7 +462,7 @@
 	ci.io->md = md;
 	ci.sector = bio->bi_sector;
 	ci.sector_count = bio_sectors(bio);
-	ci.idx = 0;
+	ci.idx = bio->bi_idx;
 
 	atomic_inc(&md->pending);
 	while (ci.sector_count)
diff -Nru a/drivers/md/md.c b/drivers/md/md.c
--- a/drivers/md/md.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/md/md.c	Wed Jan  8 20:04:43 2003
@@ -578,10 +578,19 @@
 		mddev->level = sb->level;
 		mddev->layout = sb->layout;
 		mddev->raid_disks = sb->raid_disks;
-		mddev->state = sb->state;
 		mddev->size = sb->size;
 		mddev->events = md_event(sb);
-	
+
+		if (sb->state & (1<<MD_SB_CLEAN))
+			mddev->recovery_cp = MaxSector;
+		else {
+			if (sb->events_hi == sb->cp_events_hi && 
+				sb->events_lo == sb->cp_events_lo) {
+				mddev->recovery_cp = sb->recovery_cp;
+			} else
+				mddev->recovery_cp = 0;
+		}
+
 		memcpy(mddev->uuid+0, &sb->set_uuid0, 4);
 		memcpy(mddev->uuid+4, &sb->set_uuid1, 4);
 		memcpy(mddev->uuid+8, &sb->set_uuid2, 4);
@@ -657,10 +666,22 @@
 	sb->md_minor = mddev->__minor;
 	sb->not_persistent = !mddev->persistent;
 	sb->utime = mddev->utime;
-	sb->state = mddev->state;
+	sb->state = 0;
 	sb->events_hi = (mddev->events>>32);
 	sb->events_lo = (u32)mddev->events;
 
+	if (mddev->in_sync)
+	{
+		sb->recovery_cp = mddev->recovery_cp;
+		sb->cp_events_hi = (mddev->events>>32);
+		sb->cp_events_lo = (u32)mddev->events;
+		if (mddev->recovery_cp == MaxSector) {
+			printk(KERN_INFO "md: marking sb clean...\n");
+			sb->state = (1<< MD_SB_CLEAN);
+		}
+	} else
+		sb->recovery_cp = 0;
+
 	sb->layout = mddev->layout;
 	sb->chunk_size = mddev->chunk_size;
 
@@ -1198,7 +1219,7 @@
 		goto abort;
 	}
 
-	if ((mddev->state != (1 << MD_SB_CLEAN)) && ((mddev->level == 1) ||
+	if ((mddev->recovery_cp != MaxSector) && ((mddev->level == 1) ||
 			(mddev->level == 4) || (mddev->level == 5)))
 		printk(NOT_CLEAN_IGNORE, mdidx(mddev));
 
@@ -1469,13 +1490,11 @@
 		mddev->pers = NULL;
 		return -EINVAL;
 	}
-
-	mddev->in_sync = (mddev->state & (1<<MD_SB_CLEAN));
-	/* if personality doesn't have "sync_request", then
-	 * a dirty array doesn't mean anything
-	 */
 	if (mddev->pers->sync_request)
-		mddev->state &= ~(1 << MD_SB_CLEAN);
+		mddev->in_sync = 0;
+	else
+		mddev->in_sync = 1;
+	
 	md_update_sb(mddev);
 	md_recover_arrays();
 	set_capacity(disk, md_size[mdidx(mddev)]<<1);
@@ -1502,6 +1521,8 @@
 		if (!mddev->ro)
 			goto out;
 
+		mddev->in_sync = 0;
+		md_update_sb(mddev);
 		mddev->ro = 0;
 		set_disk_ro(disk, 0);
 
@@ -1541,7 +1562,7 @@
 	if (mddev->pers) {
 		if (mddev->sync_thread) {
 			if (mddev->recovery_running > 0)
-				mddev->recovery_running = -EINTR;
+				mddev->recovery_running = -1;
 			md_unregister_thread(mddev->sync_thread);
 			mddev->sync_thread = NULL;
 		}
@@ -1567,14 +1588,8 @@
 				mddev->ro = 0;
 		}
 		if (mddev->raid_disks) {
-			/*
-			 * mark it clean only if there was no resync
-			 * interrupted.
-			 */
-			if (mddev->in_sync) {
-				printk(KERN_INFO "md: marking sb clean...\n");
-				mddev->state |= 1 << MD_SB_CLEAN;
-			}
+			/* mark array as shutdown cleanly */
+			mddev->in_sync = 1;
 			md_update_sb(mddev);
 		}
 		if (ro)
@@ -1840,7 +1855,9 @@
 	info.not_persistent= !mddev->persistent;
 
 	info.utime         = mddev->utime;
-	info.state         = mddev->state;
+	info.state         = 0;
+	if (mddev->recovery_cp == MaxSector)
+		info.state = (1<<MD_SB_CLEAN);
 	info.active_disks  = active;
 	info.working_disks = working;
 	info.failed_disks  = failed;
@@ -2111,7 +2128,10 @@
 	/* don't set __minor, it is determined by which /dev/md* was
 	 * openned
 	 */
-	mddev->state         = info->state;
+	if (info->state & (1<<MD_SB_CLEAN))
+		mddev->recovery_cp = MaxSector;
+	else
+		mddev->recovery_cp = 0;
 	mddev->persistent    = ! info->not_persistent;
 
 	mddev->layout        = info->layout;
@@ -2742,7 +2762,7 @@
 
 void md_sync_acct(mdk_rdev_t *rdev, unsigned long nr_sectors)
 {
-	rdev->bdev->bd_disk->sync_io += nr_sectors;
+	rdev->bdev->bd_contains->bd_disk->sync_io += nr_sectors;
 }
 
 static int is_mddev_idle(mddev_t *mddev)
@@ -2754,7 +2774,7 @@
 
 	idle = 1;
 	ITERATE_RDEV(mddev,rdev,tmp) {
-		struct gendisk *disk = rdev->bdev->bd_disk;
+		struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
 		curr_events = disk->read_sectors + disk->write_sectors - disk->sync_io;
 		if ((curr_events - rdev->last_events) > 32) {
 			rdev->last_events = curr_events;
@@ -2770,7 +2790,8 @@
 	atomic_sub(blocks, &mddev->recovery_active);
 	wake_up(&mddev->recovery_wait);
 	if (!ok) {
-		mddev->recovery_running = -EIO;
+		mddev->recovery_error = -EIO;
+		mddev->recovery_running = -1;
 		md_recover_arrays();
 		// stop recovery, signal do_sync ....
 	}
@@ -2815,8 +2836,10 @@
 				printk(KERN_INFO "md: delaying resync of md%d until md%d "
 				       "has finished resync (they share one or more physical units)\n",
 				       mdidx(mddev), mdidx(mddev2));
-				if (mddev < mddev2) /* arbitrarily yield */
+				if (mddev < mddev2) {/* arbitrarily yield */
 					mddev->curr_resync = 1;
+					yield();
+				}
 				if (wait_event_interruptible(resync_wait,
 							     mddev2->curr_resync < 2)) {
 					flush_curr_signals();
@@ -2839,7 +2862,7 @@
 	is_mddev_idle(mddev); /* this also initializes IO event counters */
 	for (m = 0; m < SYNC_MARKS; m++) {
 		mark[m] = jiffies;
-		mark_cnt[m] = 0;
+		mark_cnt[m] = mddev->recovery_cp;
 	}
 	last_mark = 0;
 	mddev->resync_mark = mark[last_mark];
@@ -2855,7 +2878,13 @@
 	atomic_set(&mddev->recovery_active, 0);
 	init_waitqueue_head(&mddev->recovery_wait);
 	last_check = 0;
-	for (j = 0; j < max_sectors;) {
+
+	mddev->recovery_error = 0;
+
+	if (mddev->recovery_cp)
+		printk(KERN_INFO "md: resuming recovery of md%d from checkpoint.\n", mdidx(mddev));
+
+	for (j = mddev->recovery_cp; j < max_sectors;) {
 		int sectors;
 
 		sectors = mddev->pers->sync_request(mddev, j, currspeed < sysctl_speed_limit_min);
@@ -2925,16 +2954,25 @@
 	 */
  out:
 	wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active));
+
+	if (mddev->recovery_running < 0 && 
+		!mddev->recovery_error && mddev->curr_resync > 2)
+	{
+		/* interrupted but no write errors */
+		printk(KERN_INFO "md: checkpointing recovery of md%d.\n", mdidx(mddev));
+		mddev->recovery_cp = mddev->curr_resync;
+	}
+
 	/* tell personality that we are finished */
 	mddev->pers->sync_request(mddev, max_sectors, 1);
  skip:
 	mddev->curr_resync = 0;
 	if (err)
-		mddev->recovery_running = err;
+		mddev->recovery_running = -1;
 	if (mddev->recovery_running > 0)
 		mddev->recovery_running = 0;
 	if (mddev->recovery_running == 0)
-		mddev->in_sync = 1;
+		mddev->recovery_cp = MaxSector;
 	md_recover_arrays();
 }
 
@@ -3015,14 +3053,16 @@
 			ITERATE_RDEV(mddev,rdev,rtmp)
 				if (rdev->raid_disk < 0
 				    && !rdev->faulty) {
-					if (mddev->pers->hot_add_disk(mddev,rdev))
+					if (mddev->pers->hot_add_disk(mddev,rdev)) {
 						mddev->spares++;
+						mddev->recovery_cp = 0;
+					}
 					else
 						break;
 				}
 		}
 
-		if (!mddev->spares && mddev->in_sync) {
+		if (!mddev->spares && (mddev->recovery_cp == MaxSector )) {
 			/* nothing we can do ... */
 			goto unlock;
 		}
diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c
--- a/drivers/md/raid1.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/md/raid1.c	Wed Jan  8 20:04:44 2003
@@ -975,7 +975,7 @@
 	sector_t max_sector, nr_sectors;
 	int disk, partial;
 
-	if (sector_nr == 0)
+	if (!conf->r1buf_pool)
 		if (init_resync(conf))
 			return -ENOMEM;
 
@@ -1149,7 +1149,7 @@
 	conf->mddev = mddev;
 	conf->device_lock = SPIN_LOCK_UNLOCKED;
 	if (conf->working_disks == 1)
-		mddev->state |= (1 << MD_SB_CLEAN);
+		mddev->recovery_cp = MaxSector;
 
 	conf->resync_lock = SPIN_LOCK_UNLOCKED;
 	init_waitqueue_head(&conf->wait_idle);
diff -Nru a/drivers/md/raid5.c b/drivers/md/raid5.c
--- a/drivers/md/raid5.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/md/raid5.c	Wed Jan  8 20:04:43 2003
@@ -1471,7 +1471,7 @@
 	}
 
 	if (mddev->degraded == 1 &&
-	    !(mddev->state & (1<<MD_SB_CLEAN))) {
+	    mddev->recovery_cp != MaxSector) {
 		printk(KERN_ERR "raid5: cannot start dirty degraded array for md%d\n", mdidx(mddev));
 		goto abort;
 	}
diff -Nru a/drivers/media/video/Makefile b/drivers/media/video/Makefile
--- a/drivers/media/video/Makefile	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/Makefile	Wed Jan  8 20:04:43 2003
@@ -1,21 +1,21 @@
 #
-# Makefile for the kernel character device drivers.
+# Makefile for the video capture/playback device drivers.
 #
 
 # All of the (potential) objects that export symbols.
 # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
 
-export-objs     :=	videodev.o v4l2-common.o \
+export-objs     :=	videodev.o v4l2-common.o v4l1-compat.o \
 			bttv-if.o cpia.o video-buf.o
 
 bttv-objs	:=	bttv-driver.o bttv-cards.o bttv-if.o \
 			bttv-risc.o bttv-vbi.o
 zoran-objs      :=	zr36120.o zr36120_i2c.o zr36120_mem.o
 
-obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o
+obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o
 
 obj-$(CONFIG_VIDEO_BT848) += bttv.o msp3400.o tvaudio.o \
-	tda7432.o tda9875.o tuner.o video-buf.o
+	tda7432.o tda9875.o tuner.o video-buf.o tda9887.o
 obj-$(CONFIG_SOUND_TVMIXER) += tvmixer.o
 
 obj-$(CONFIG_VIDEO_ZR36120) += zoran.o
diff -Nru a/drivers/media/video/audiochip.h b/drivers/media/video/audiochip.h
--- a/drivers/media/video/audiochip.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/audiochip.h	Wed Jan  8 20:04:43 2003
@@ -30,41 +30,7 @@
  * make sense in v4l context only.  So I think that's acceptable...
  */
 
-#if 0
-
-/* TODO (if it is ever [to be] accessible in the V4L[2] spec):
- *   maybe fade? (back/front)
- * notes:
- * NEWCHANNEL and SWITCH_MUTE are here because the MSP3400 has a special
- * routine to go through when it tunes in to a new channel before turning
- * back on the sound.
- * Either SET_RADIO, NEWCHANNEL, and SWITCH_MUTE or SET_INPUT need to be
- * implemented (MSP3400 uses SET_RADIO to select inputs, and SWITCH_MUTE for
- * channel-change mute -- TEA6300 et al use SET_AUDIO to select input [TV, 
- * radio, external, or MUTE]).  If both methods are implemented, you get a
- * cookie for doing such a good job! :)
- */
-
-#define AUDC_SET_TVNORM       _IOW('m',1,int)  /* TV mode + PAL/SECAM/NTSC  */
-#define AUDC_NEWCHANNEL       _IO('m',3)       /* indicate new chan - off mute */
-
-#define AUDC_GET_VOLUME_LEFT  _IOR('m',4,__u16)
-#define AUDC_GET_VOLUME_RIGHT _IOR('m',5,__u16)
-#define AUDC_SET_VOLUME_LEFT  _IOW('m',6,__u16)
-#define AUDC_SET_VOLUME_RIGHT _IOW('m',7,__u16)
-
-#define AUDC_GET_STEREO       _IOR('m',8,__u16)
-#define AUDC_SET_STEREO       _IOW('m',9,__u16)
-
-#define AUDC_GET_DC           _IOR('m',10,__u16)/* ??? */
-
-#define AUDC_GET_BASS         _IOR('m',11,__u16)
-#define AUDC_SET_BASS         _IOW('m',12,__u16)
-#define AUDC_GET_TREBLE       _IOR('m',13,__u16)
-#define AUDC_SET_TREBLE       _IOW('m',14,__u16)
-
-#define AUDC_GET_UNIT         _IOR('m',15,int) /* ??? - unimplemented in MSP3400 */
-#define AUDC_SWITCH_MUTE      _IO('m',16)      /* turn on mute */
-#endif
+/* misc stuff to pass around config info to i2c chips */
+#define AUDC_CONFIG_PINNACLE  _IOW('m',32,int)
 
 #endif /* AUDIOCHIP_H */
diff -Nru a/drivers/media/video/bt832.c b/drivers/media/video/bt832.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/video/bt832.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,289 @@
+/* Driver for Bt832 CMOS Camera Video Processor
+    i2c-adresses: 0x88 or 0x8a
+
+  The BT832 interfaces to a Quartzsight Digital Camera (352x288, 25 or 30 fps)
+  via a 9 pin connector ( 4-wire SDATA, 2-wire i2c, SCLK, VCC, GND).
+  It outputs an 8-bit 4:2:2 YUV or YCrCb video signal which can be directly
+  connected to bt848/bt878 GPIO pins on this purpose.
+  (see: VLSI Vision Ltd. www.vvl.co.uk for camera datasheets)
+  
+  Supported Cards:
+  -  Pixelview Rev.4E: 0x8a
+		GPIO 0x400000 toggles Bt832 RESET, and the chip changes to i2c 0x88 !
+
+  (c) Gunther Mayer, 2002
+
+  STATUS:
+  - detect chip and hexdump
+  - reset chip and leave low power mode
+  - detect camera present
+
+  TODO:
+  - make it work (find correct setup for Bt832 and Bt878)
+*/
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/i2c.h>
+#include <linux/types.h>
+#include <linux/videodev.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include "id.h"
+#include "audiochip.h"
+#include "bttv.h"
+#include "bt832.h"
+
+MODULE_LICENSE("GPL");
+
+/* Addresses to scan */
+static unsigned short normal_i2c[] = {I2C_CLIENT_END};
+static unsigned short normal_i2c_range[] = {I2C_BT832_ALT1>>1,I2C_BT832_ALT2>>1,I2C_CLIENT_END};
+I2C_CLIENT_INSMOD;
+
+/* ---------------------------------------------------------------------- */
+
+#define dprintk     if (debug) printk
+
+static int bt832_detach(struct i2c_client *client);
+
+
+static struct i2c_driver driver;
+static struct i2c_client client_template;
+
+struct bt832 {
+        struct i2c_client client;
+};
+
+int bt832_hexdump(struct i2c_client *i2c_client_s, unsigned char *buf)
+{
+	int i,rc;
+	buf[0]=0x80; // start at register 0 with auto-increment
+        if (1 != (rc = i2c_master_send(i2c_client_s,buf,1)))
+                printk("bt832: i2c i/o error: rc == %d (should be 1)\n",rc);
+
+        for(i=0;i<65;i++)
+                buf[i]=0;
+        if (65 != (rc=i2c_master_recv(i2c_client_s,buf,65)))
+                printk("bt832: i2c i/o error: rc == %d (should be 65)\n",rc);
+
+        // Note: On READ the first byte is the current index
+        //  (e.g. 0x80, what we just wrote)
+
+        if(1) {
+                int i;
+                printk("BT832 hexdump:\n");
+                for(i=1;i<65;i++) {
+			if(i!=1) {
+			  if(((i-1)%8)==0) printk(" ");
+                          if(((i-1)%16)==0) printk("\n");
+			}
+                        printk(" %02x",buf[i]);
+                }
+                printk("\n");
+        }
+	return 0;
+}
+
+// Return: 1 (is a bt832), 0 (No bt832 here)
+int bt832_init(struct i2c_client *i2c_client_s)
+{
+	unsigned char *buf;
+	int rc;
+
+	buf=kmalloc(65,GFP_KERNEL);
+	bt832_hexdump(i2c_client_s,buf);
+	
+	if(buf[0x40] != 0x31) {
+		printk("bt832: this i2c chip is no bt832 (id=%02x). Detaching.\n",buf[0x40]);
+		kfree(buf);
+		return 0;
+	}
+
+        printk("Write 0 tp VPSTATUS\n");
+        buf[0]=BT832_VP_STATUS; // Reg.52
+        buf[1]= 0x00;
+        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+                printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
+
+        bt832_hexdump(i2c_client_s,buf);
+
+
+	// Leave low power mode:
+	printk("Bt832: leave low power mode.\n");
+	buf[0]=BT832_CAM_SETUP0; //0x39 57
+	buf[1]=0x08;
+	if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+                printk("bt832: i2c i/o error LLPM: rc == %d (should be 2)\n",rc);
+
+        bt832_hexdump(i2c_client_s,buf);
+
+	printk("Write 0 tp VPSTATUS\n");
+        buf[0]=BT832_VP_STATUS; // Reg.52
+        buf[1]= 0x00;
+        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+                printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
+
+        bt832_hexdump(i2c_client_s,buf);
+
+
+	// Enable Output
+	printk("Enable Output\n");
+	buf[0]=BT832_VP_CONTROL1; // Reg.40
+	buf[1]= 0x27 & (~0x01); // Default | !skip
+	if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+                printk("bt832: i2c i/o error EO: rc == %d (should be 2)\n",rc);
+	
+        bt832_hexdump(i2c_client_s,buf);
+
+#if 0
+	// Full 30/25 Frame rate
+	printk("Full 30/25 Frame rate\n");
+	buf[0]=BT832_VP_CONTROL0; // Reg.39
+        buf[1]= 0x00;
+        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+                printk("bt832: i2c i/o error FFR: rc == %d (should be 2)\n",rc);
+
+        bt832_hexdump(i2c_client_s,buf);
+#endif
+
+#if 1
+	// for testing (even works when no camera attached)
+	printk("bt832: *** Generate NTSC M Bars *****\n");
+	buf[0]=BT832_VP_TESTCONTROL0; // Reg. 42
+	buf[1]=3; // Generate NTSC System M bars, Generate Frame timing internally
+        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+                printk("bt832: i2c i/o error MBAR: rc == %d (should be 2)\n",rc);
+#endif
+
+	printk("Bt832: Camera Present: %s\n",
+		(buf[1+BT832_CAM_STATUS] & BT832_56_CAMERA_PRESENT) ? "yes":"no");
+
+        bt832_hexdump(i2c_client_s,buf);
+	kfree(buf);
+	return 1;
+}
+
+
+
+static int bt832_attach(struct i2c_adapter *adap, int addr,
+			  unsigned short flags, int kind)
+{
+	struct bt832 *t;
+
+	printk("bt832_attach\n");
+
+        client_template.adapter = adap;
+        client_template.addr    = addr;
+
+        printk("bt832: chip found @ 0x%x\n", addr<<1);
+
+        if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL)))
+                return -ENOMEM;
+	memset(t,0,sizeof(*t));
+	t->client = client_template;
+        t->client.data = t;
+        i2c_attach_client(&t->client);
+
+	MOD_INC_USE_COUNT;
+	if(! bt832_init(&t->client)) {
+		bt832_detach(&t->client);
+		return -1;
+	}
+        
+	return 0;
+}
+
+static int bt832_probe(struct i2c_adapter *adap)
+{
+	int rc;
+
+	printk("bt832_probe\n");
+
+	switch (adap->id) {
+	case I2C_ALGO_BIT | I2C_HW_B_BT848:
+	case I2C_ALGO_BIT | I2C_HW_B_RIVA:
+	case I2C_ALGO_SAA7134:
+		printk("bt832: probing %s i2c adapter [id=0x%x]\n",
+		       adap->name,adap->id);
+		rc = i2c_probe(adap, &addr_data, bt832_attach);
+		break;
+	default:
+		printk("bt832: ignoring %s i2c adapter [id=0x%x]\n",
+		       adap->name,adap->id);
+		rc = 0;
+		/* nothing */
+	}
+	return rc;
+}
+
+static int bt832_detach(struct i2c_client *client)
+{
+	struct bt832 *t = (struct bt832*)client->data;
+
+	printk("bt832: detach.\n");
+	i2c_detach_client(client);
+	kfree(t);
+	MOD_DEC_USE_COUNT;
+	return 0;
+}
+
+static int
+bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
+{
+	struct bt832 *t = (struct bt832*)client->data;
+
+	printk("bt832: command %x\n",cmd);
+
+        switch (cmd) {
+		case BT832_HEXDUMP: {
+			unsigned char *buf;
+			buf=kmalloc(65,GFP_KERNEL);
+			bt832_hexdump(&t->client,buf);
+			kfree(buf);
+		}
+		break;
+		case BT832_REATTACH:
+			printk("bt832: re-attach\n");
+			i2c_del_driver(&driver);
+			i2c_add_driver(&driver);
+		break;
+	}
+	return 0;
+}
+
+/* ----------------------------------------------------------------------- */
+
+static struct i2c_driver driver = {
+	.owner          = THIS_MODULE,
+        .name           = "i2c bt832 driver",
+        .id             = -1, /* FIXME */
+        .flags          = I2C_DF_NOTIFY,
+        .attach_adapter = bt832_probe,
+        .detach_client  = bt832_detach,
+        .command        = bt832_command,
+};
+static struct i2c_client client_template =
+{
+        .name   = "bt832",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
+};
+
+
+int bt832_init_module(void)
+{
+	i2c_add_driver(&driver);
+	return 0;
+}
+
+static void bt832_cleanup_module(void)
+{
+	i2c_del_driver(&driver);
+}
+
+module_init(bt832_init_module);
+module_exit(bt832_cleanup_module);
+
diff -Nru a/drivers/media/video/bt832.h b/drivers/media/video/bt832.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/video/bt832.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,305 @@
+/* Bt832 CMOS Camera Video Processor (VP)
+
+ The Bt832 CMOS Camera Video Processor chip connects a Quartsight CMOS 
+  color digital camera directly to video capture devices via an 8-bit,
+  4:2:2 YUV or YCrCb video interface.
+
+ i2c adresses: 0x88 or 0x8a
+ */
+
+/* The 64 registers: */
+
+// Input Processor
+#define BT832_OFFSET 0
+#define BT832_RCOMP	1
+#define BT832_G1COMP	2
+#define BT832_G2COMP	3
+#define BT832_BCOMP	4
+// Exposures:
+#define BT832_FINEH	5
+#define BT832_FINEL	6
+#define BT832_COARSEH	7
+#define BT832_COARSEL   8
+#define BT832_CAMGAIN	9
+// Main Processor:
+#define BT832_M00	10
+#define BT832_M01	11
+#define BT832_M02	12
+#define BT832_M10	13
+#define BT832_M11	14
+#define BT832_M12	15
+#define BT832_M20	16
+#define BT832_M21	17
+#define BT832_M22	18
+#define BT832_APCOR	19
+#define BT832_GAMCOR	20
+// Level Accumulator Inputs
+#define BT832_VPCONTROL2	21
+#define BT832_ZONECODE0	22
+#define BT832_ZONECODE1	23
+#define BT832_ZONECODE2	24
+#define BT832_ZONECODE3	25
+// Level Accumulator Outputs:
+#define BT832_RACC	26
+#define BT832_GACC	27
+#define BT832_BACC	28
+#define BT832_BLACKACC	29
+#define BT832_EXP_AGC	30
+#define BT832_LACC0	31
+#define BT832_LACC1	32
+#define BT832_LACC2	33
+#define BT832_LACC3	34
+#define BT832_LACC4	35
+#define BT832_LACC5	36
+#define BT832_LACC6	37
+#define BT832_LACC7	38
+// System:
+#define BT832_VP_CONTROL0	39
+#define BT832_VP_CONTROL1	40
+#define BT832_THRESH	41
+#define BT832_VP_TESTCONTROL0	42
+#define BT832_VP_DMCODE	43
+#define BT832_ACB_CONFIG	44
+#define BT832_ACB_GNBASE	45
+#define BT832_ACB_MU	46
+#define BT832_CAM_TEST0	47
+#define BT832_AEC_CONFIG	48
+#define BT832_AEC_TL	49
+#define BT832_AEC_TC	50
+#define BT832_AEC_TH	51
+// Status:
+#define BT832_VP_STATUS	52
+#define BT832_VP_LINECOUNT	53
+#define BT832_CAM_DEVICEL	54 // e.g. 0x19
+#define BT832_CAM_DEVICEH	55 // e.g. 0x40  == 0x194 Mask0, 0x194 = 404 decimal (VVL-404 camera)
+#define BT832_CAM_STATUS		56
+ #define BT832_56_CAMERA_PRESENT 0x20
+//Camera Setups:
+#define BT832_CAM_SETUP0	57
+#define BT832_CAM_SETUP1	58
+#define BT832_CAM_SETUP2	59
+#define BT832_CAM_SETUP3	60
+// System:
+#define BT832_DEFCOR		61
+#define BT832_VP_TESTCONTROL1	62
+#define BT832_DEVICE_ID		63
+# define BT832_DEVICE_ID__31		0x31 // Bt832 has ID 0x31
+
+/* STMicroelectronivcs VV5404 camera module 
+   i2c: 0x20: sensor address
+   i2c: 0xa0: eeprom for ccd defect map
+ */
+#define VV5404_device_h		0x00  // 0x19
+#define VV5404_device_l		0x01  // 0x40
+#define VV5404_status0		0x02
+#define VV5404_linecountc	0x03 // current line counter
+#define VV5404_linecountl	0x04
+#define VV5404_setup0		0x10
+#define VV5404_setup1		0x11
+#define VV5404_setup2		0x12
+#define VV5404_setup4		0x14
+#define VV5404_setup5		0x15
+#define VV5404_fine_h		0x20  // fine exposure
+#define VV5404_fine_l		0x21
+#define VV5404_coarse_h		0x22  //coarse exposure
+#define VV5404_coarse_l		0x23
+#define VV5404_gain		0x24 // ADC pre-amp gain setting
+#define VV5404_clk_div		0x25
+#define VV5404_cr		0x76 // control register
+#define VV5404_as0		0x77 // ADC setup register
+
+
+// IOCTL
+#define BT832_HEXDUMP   _IOR('b',1,int)
+#define BT832_REATTACH	_IOR('b',2,int)
+
+/* from BT8x8VXD/capdrv/dialogs.cpp */
+
+/*
+typedef enum { SVI, Logitech, Rockwell } CAMERA;
+
+static COMBOBOX_ENTRY gwCameraOptions[] =
+{
+   { SVI,      "Silicon Vision 512N" },
+   { Logitech, "Logitech VideoMan 1.3"  },
+   { Rockwell, "Rockwell QuartzSight PCI 1.0"   }
+};
+
+// SRAM table values
+//===========================================================================
+typedef enum { TGB_NTSC624, TGB_NTSC780, TGB_NTSC858, TGB_NTSC392 } TimeGenByte;
+
+BYTE SRAMTable[][ 60 ] =
+{
+   // TGB_NTSC624
+   {
+      0x33, // size of table = 51
+      0x0E, 0xC0, 0x00, 0x00, 0x90, 0x02, 0x03, 0x10, 0x03, 0x06,
+      0x10, 0x04, 0x12, 0x12, 0x05, 0x02, 0x13, 0x04, 0x19, 0x00,
+      0x04, 0x39, 0x00, 0x06, 0x59, 0x08, 0x03, 0x85, 0x08, 0x07,
+      0x03, 0x50, 0x00, 0x91, 0x40, 0x00, 0x11, 0x01, 0x01, 0x4D,
+      0x0D, 0x02, 0x03, 0x11, 0x01, 0x05, 0x37, 0x00, 0x37, 0x21, 0x00
+   },
+   // TGB_NTSC780
+   {
+      0x33, // size of table = 51
+      0x0e, 0xc0, 0x00, 0x00, 0x90, 0xe2, 0x03, 0x10, 0x03, 0x06,
+      0x10, 0x34, 0x12, 0x12, 0x65, 0x02, 0x13, 0x24, 0x19, 0x00,
+      0x24, 0x39, 0x00, 0x96, 0x59, 0x08, 0x93, 0x85, 0x08, 0x97,
+      0x03, 0x50, 0x50, 0xaf, 0x40, 0x30, 0x5f, 0x01, 0xf1, 0x7f,
+      0x0d, 0xf2, 0x03, 0x11, 0xf1, 0x05, 0x37, 0x30, 0x85, 0x21, 0x50
+   },
+   // TGB_NTSC858
+   {
+      0x33, // size of table = 51
+      0x0c, 0xc0, 0x00, 0x00, 0x90, 0xc2, 0x03, 0x10, 0x03, 0x06,
+      0x10, 0x34, 0x12, 0x12, 0x65, 0x02, 0x13, 0x24, 0x19, 0x00,
+      0x24, 0x39, 0x00, 0x96, 0x59, 0x08, 0x93, 0x83, 0x08, 0x97,
+      0x03, 0x50, 0x30, 0xc0, 0x40, 0x30, 0x86, 0x01, 0x01, 0xa6,
+      0x0d, 0x62, 0x03, 0x11, 0x61, 0x05, 0x37, 0x30, 0xac, 0x21, 0x50
+   },
+   // TGB_NTSC392
+   // This table has been modified to be used for Fusion Rev D
+   {
+      0x2A, // size of table = 42
+      0x06, 0x08, 0x04, 0x0a, 0xc0, 0x00, 0x18, 0x08, 0x03, 0x24,
+      0x08, 0x07, 0x02, 0x90, 0x02, 0x08, 0x10, 0x04, 0x0c, 0x10,
+      0x05, 0x2c, 0x11, 0x04, 0x55, 0x48, 0x00, 0x05, 0x50, 0x00,
+      0xbf, 0x0c, 0x02, 0x2f, 0x3d, 0x00, 0x2f, 0x3f, 0x00, 0xc3,
+      0x20, 0x00
+   }
+};
+
+//===========================================================================
+// This is the structure of the camera specifications
+//===========================================================================
+typedef struct tag_cameraSpec
+{
+   SignalFormat signal;       // which digital signal format the camera has
+   VideoFormat  vidFormat;    // video standard
+   SyncVideoRef syncRef;      // which sync video reference is used
+   State        syncOutput;   // enable sync output for sync video input?
+   DecInputClk  iClk;         // which input clock is used
+   TimeGenByte  tgb;          // which timing generator byte does the camera use
+   int          HReset;       // select 64, 48, 32, or 16 CLKx1 for HReset
+   PLLFreq      pllFreq;      // what synthesized frequency to set PLL to
+   VSIZEPARMS   vSize;        // video size the camera produces
+   int          lineCount;    // expected total number of half-line per frame - 1
+   BOOL         interlace;    // interlace signal?
+} CameraSpec;
+
+//===========================================================================
+// <UPDATE REQUIRED>
+// Camera specifications database. Update this table whenever camera spec
+// has been changed or added/deleted supported camera models
+//===========================================================================
+static CameraSpec dbCameraSpec[ N_CAMERAOPTIONS ] =
+{  // Silicon Vision 512N
+   { Signal_CCIR656, VFormat_NTSC, VRef_alignedCb, Off, DecClk_GPCLK, TGB_NTSC624, 64, KHz19636,
+      // Clkx1_HACTIVE, Clkx1_HDELAY, VActive, VDelay, linesPerField; lineCount, Interlace
+   {         512,           0x64,       480,    0x13,      240 },         0,       TRUE
+   },
+   // Logitech VideoMan 1.3
+   { Signal_CCIR656, VFormat_NTSC, VRef_alignedCb, Off, DecClk_GPCLK, TGB_NTSC780, 64, KHz24545,
+      // Clkx1_HACTIVE, Clkx1_HDELAY, VActive, VDelay, linesPerField; lineCount, Interlace
+      {      640,           0x80,       480,    0x1A,      240 },         0,       TRUE
+   },
+   // Rockwell QuartzSight
+   // Note: Fusion Rev D (rev ID 0x02) and later supports 16 pixels for HReset which is preferable.
+   //       Use 32 for earlier version of hardware. Clkx1_HDELAY also changed from 0x27 to 0x20.
+   { Signal_CCIR656, VFormat_NTSC, VRef_alignedCb, Off, DecClk_GPCLK, TGB_NTSC392, 16, KHz28636,
+      // Clkx1_HACTIVE, Clkx1_HDELAY, VActive, VDelay, linesPerField; lineCount, Interlace
+      {      352,           0x20,       576,    0x08,      288 },       607,       FALSE
+   }
+};
+*/
+
+/*
+The corresponding APIs required to be invoked are:
+SetConnector( ConCamera, TRUE/FALSE );
+SetSignalFormat( spec.signal );
+SetVideoFormat( spec.vidFormat );
+SetSyncVideoRef( spec.syncRef );
+SetEnableSyncOutput( spec.syncOutput );
+SetTimGenByte( SRAMTable[ spec.tgb ], SRAMTableSize[ spec.tgb ] );
+SetHReset( spec.HReset );
+SetPLL( spec.pllFreq );
+SetDecInputClock( spec.iClk );
+SetVideoInfo( spec.vSize );
+SetTotalLineCount( spec.lineCount );
+SetInterlaceMode( spec.interlace );
+*/
+
+/* from web:
+ Video Sampling
+Digital video is a sampled form of analog video. The most common sampling schemes in use today are:
+                  Pixel Clock   Horiz    Horiz    Vert
+                   Rate         Total    Active
+NTSC square pixel  12.27 MHz    780      640      525
+NTSC CCIR-601      13.5  MHz    858      720      525
+NTSC 4FSc          14.32 MHz    910      768      525
+PAL  square pixel  14.75 MHz    944      768      625
+PAL  CCIR-601      13.5  MHz    864      720      625
+PAL  4FSc          17.72 MHz   1135      948      625
+
+For the CCIR-601 standards, the sampling is based on a static orthogonal sampling grid. The luminance component (Y) is sampled at 13.5 MHz, while the two color difference signals, Cr and Cb are sampled at half that, or 6.75 MHz. The Cr and Cb samples are colocated with alternate Y samples, and they are taken at the same position on each line, such that one sample is coincident with the 50% point of the falling edge of analog sync. The samples are coded to either 8 or 10 bits per component.
+*/
+
+/* from DScaler:*/
+/*
+//===========================================================================
+// CCIR656 Digital Input Support: The tables were taken from DScaler proyect
+//
+// 13 Dec 2000 - Michael Eskin, Conexant Systems - Initial version
+//
+
+//===========================================================================
+// Timing generator SRAM table values for CCIR601 720x480 NTSC
+//===========================================================================
+// For NTSC CCIR656 
+BYTE BtCard::SRAMTable_NTSC[] =
+{
+    // SRAM Timing Table for NTSC
+    0x0c, 0xc0, 0x00, 
+    0x00, 0x90, 0xc2, 
+    0x03, 0x10, 0x03, 
+    0x06, 0x10, 0x34, 
+    0x12, 0x12, 0x65, 
+    0x02, 0x13, 0x24, 
+    0x19, 0x00, 0x24, 
+    0x39, 0x00, 0x96, 
+    0x59, 0x08, 0x93, 
+    0x83, 0x08, 0x97,
+    0x03, 0x50, 0x30, 
+    0xc0, 0x40, 0x30, 
+    0x86, 0x01, 0x01, 
+    0xa6, 0x0d, 0x62, 
+    0x03, 0x11, 0x61, 
+    0x05, 0x37, 0x30, 
+    0xac, 0x21, 0x50
+};
+
+//===========================================================================
+// Timing generator SRAM table values for CCIR601 720x576 NTSC
+//===========================================================================
+// For PAL CCIR656
+BYTE BtCard::SRAMTable_PAL[] =
+{
+    // SRAM Timing Table for PAL
+    0x36, 0x11, 0x01,
+    0x00, 0x90, 0x02,
+    0x05, 0x10, 0x04,
+    0x16, 0x14, 0x05,
+    0x11, 0x00, 0x04,
+    0x12, 0xc0, 0x00,
+    0x31, 0x00, 0x06,
+    0x51, 0x08, 0x03,
+    0x89, 0x08, 0x07,
+    0xc0, 0x44, 0x00,
+    0x81, 0x01, 0x01,
+    0xa9, 0x0d, 0x02,
+    0x02, 0x50, 0x03,
+    0x37, 0x3d, 0x00,
+    0xaf, 0x21, 0x00,
+};
+*/
diff -Nru a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c
--- a/drivers/media/video/bttv-cards.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/bttv-cards.c	Wed Jan  8 20:04:44 2003
@@ -37,15 +37,15 @@
 
 #include "bttvp.h"
 #include "tuner.h"
-#if 0
-# include "bt832.h"
-#endif
+#include "bt832.h"
 
 /* fwd decl */
 static void boot_msp34xx(struct bttv *btv, int pin);
+static void boot_bt832(struct bttv *btv);
 static void hauppauge_eeprom(struct bttv *btv);
 static void avermedia_eeprom(struct bttv *btv);
 static void osprey_eeprom(struct bttv *btv);
+static void modtec_eeprom(struct bttv *btv);
 static void init_PXC200(struct bttv *btv);
 
 static void winview_audio(struct bttv *btv, struct video_audio *v, int set);
@@ -64,12 +64,15 @@
 static int terratec_active_radio_upgrade(struct bttv *btv);
 static int tea5757_read(struct bttv *btv);
 static int tea5757_write(struct bttv *btv, int value);
+int is_MM20xPCTV(unsigned char eeprom_data[256]);
 
 
 /* config variables */
 static int triton1=0;
 static int vsfx=0;
-int no_overlay=-1;
+static int no_overlay=-1;
+static int latency = -1;
+
 static unsigned int card[BTTV_MAX]  = { [ 0 ... (BTTV_MAX-1) ] = -1};
 static unsigned int pll[BTTV_MAX]   = { [ 0 ... (BTTV_MAX-1) ] = -1};
 static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = -1};
@@ -90,6 +93,8 @@
 MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
 		 "[yet another chipset flaw workaround]");
 MODULE_PARM(no_overlay,"i");
+MODULE_PARM(latency,"i");
+MODULE_PARM_DESC(latency,"pci latency timer");
 MODULE_PARM(card,"1-" __stringify(BTTV_MAX) "i");
 MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
 MODULE_PARM(pll,"1-" __stringify(BTTV_MAX) "i");
@@ -153,7 +158,7 @@
 
 	{ 0x1200bd11, BTTV_PINNACLE,      "Pinnacle PCTV" },
 	{ 0x001211bd, BTTV_PINNACLE,      "Pinnacle PCTV" },
-	{ 0x001c11bd, BTTV_PINNACLE,      "Pinnacle PCTV Sat" },
+	{ 0x001c11bd, BTTV_PINNACLESAT,   "Pinnacle PCTV Sat" },
 
 	{ 0x3000121a, BTTV_VOODOOTV_FM,   "3Dfx VoodooTV FM/ VoodooTV 200" },
 	{ 0x3060121a, BTTV_STB2,	  "3Dfx VoodooTV 100/ STB OEM" },
@@ -166,21 +171,23 @@
 	{ 0x00021461, BTTV_AVERMEDIA98,   "AVermedia TVCapture 98" },
 	{ 0x00031461, BTTV_AVPHONE98,     "AVerMedia TVPhone98" },
 	{ 0x00041461, BTTV_AVERMEDIA98,   "AVerMedia TVCapture 98" },
+	{ 0x03001461, BTTV_AVERMEDIA98,   "VDOMATE TV TUNER CARD" },
 
 	{ 0x300014ff, BTTV_MAGICTVIEW061, "TView 99 (CPH061)" },
 	{ 0x300214ff, BTTV_PHOEBE_TVMAS,  "Phoebe TV Master (CPH060)" },
 
-	{ 0x1117153b, BTTV_TERRATVALUE,   "Terratec TValue" },
-	{ 0x1118153b, BTTV_TERRATVALUE,   "Terratec TValue" },
-	{ 0x1119153b, BTTV_TERRATVALUE,   "Terratec TValue" },
-	{ 0x111a153b, BTTV_TERRATVALUE,   "Terratec TValue" },
+	{ 0x1117153b, BTTV_TERRATVALUE,   "Terratec TValue (Philips PAL B/G)" },
+	{ 0x1118153b, BTTV_TERRATVALUE,   "Terratec TValue (Temic PAL B/G)" },
+	{ 0x1119153b, BTTV_TERRATVALUE,   "Terratec TValue (Philips PAL I)" },
+	{ 0x111a153b, BTTV_TERRATVALUE,   "Terratec TValue (Temic PAL I)" },
+ 
 	{ 0x1123153b, BTTV_TERRATVRADIO,  "Terratec TV Radio+" },
-	{ 0x1127153b, BTTV_TERRATV,       "Terratec TV+"    },
+	{ 0x1127153b, BTTV_TERRATV,       "Terratec TV+ (V1.05)"    },
 	// clashes with FlyVideo
-	//{ 0x18521852, BTTV_TERRATV,     "Terratec TV+"    },
-	{ 0x1134153b, BTTV_TERRATVALUE,   "Terratec TValue" },
-	{ 0x1135153b, BTTV_TERRATVALUER,  "Terratec TValue Radio" },
-	{ 0x5018153b, BTTV_TERRATVALUE,   "Terratec TValue" },
+	//{ 0x18521852, BTTV_TERRATV,     "Terratec TV+ (V1.10)"    },
+	{ 0x1134153b, BTTV_TERRATVALUE,   "Terratec TValue (LR102)" },
+	{ 0x1135153b, BTTV_TERRATVALUER,  "Terratec TValue Radio" }, // LR102
+	{ 0x5018153b, BTTV_TERRATVALUE,   "Terratec TValue" }, // ??
 
 	{ 0x400015b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
 	{ 0x400a15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
@@ -189,7 +196,7 @@
 	{ 0x401615b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
 
     	{ 0x010115cb, BTTV_GMV1,          "AG GMV1" },
-	{ 0x010114c7, BTTV_MODTEC_205,    "Modular Technology MM205 PCTV" },
+	{ 0x010114c7, BTTV_MODTEC_205,    "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
 	{ 0x18501851, BTTV_CHRONOS_VS2,   "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
 	{ 0x18511851, BTTV_FLYVIDEO98EZ,  "FlyVideo 98EZ (LR51)/ CyberMail AV" },
 	{ 0x18521852, BTTV_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
@@ -198,6 +205,7 @@
 	{ 0x03116000, BTTV_SENSORAY311,   "Sensoray 311" },
 	{ 0x00790e11, BTTV_WINDVR,        "Canopus WinDVR PCI" },
 	{ 0xa0fca1a0, BTTV_ZOLTRIX,       "Face to Face Tvmax" },
+	{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" },
 
 	{ 0, -1, NULL }
 };
@@ -479,13 +487,14 @@
 	.pll		= PLL_28,
 	.tuner_type	= -1,
 },{
-	.name		= "Modular Technology MM205 PCTV, bt878",
-	.video_inputs	= 2,
+	.name		= "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
+	.video_inputs	= 3,
 	.audio_inputs	= 1,
 	.tuner		= 0,
 	.svhs		= -1,
 	.gpiomask	= 7,
-	.muxsel		= { 2, 3 },
+	.muxsel		= { 2, 3, -1 },
+        .digital_mode   = DIGITAL_MODE_CAMERA,
 	.audiomux	= { 0, 0, 0, 0, 0 },
 	.no_msp34xx	= 1,
 	.pll            = PLL_28,
@@ -608,14 +617,15 @@
 	.tuner_type	= -1,
 },{
 	.name		= "Formac iProTV",
-	.video_inputs	= 3,
+	.video_inputs	= 4,
 	.audio_inputs	= 1,
 	.tuner		= 0,
-	.svhs		= 2,
+	.svhs		= 3,
 	.gpiomask	= 1,
 	.muxsel		= { 2, 3, 1, 1},
 	.audiomux	= { 1, 0, 0, 0, 0 },
-	.tuner_type	= -1,
+	.pll            = PLL_28,
+	.tuner_type	= TUNER_PHILIPS_PAL,
 },{
 
 /* ---- card 0x20 ---------------------------------- */
@@ -861,12 +871,13 @@
 	.audio_hook	= gvbctv3pci_audio,
 },{
 	.name		= "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
-	.video_inputs	= 4,
+	.video_inputs	= 5,
 	.audio_inputs	= 1,
 	.tuner		= 0,
 	.svhs		= 3,
 	.gpiomask	= 0xAA0000,
-	.muxsel		= { 2,3,1,1 },
+	.muxsel		= { 2,3,1,1,-1 },
+	.digital_mode   = DIGITAL_MODE_CAMERA,
 	.audiomux	= { 0x20000, 0, 0x80000, 0x80000, 0xa8000, 0x46000  },
 	.no_msp34xx	= 1,
 	.pll		= PLL_28,
@@ -902,7 +913,7 @@
 	.svhs           = 2,
 	.gpiomask       = 0x03000F,
 	.muxsel		= { 2, 3, 1, 1},
-	.audiomux	= { 1, 0x10001, 0, 0, 10},
+	.audiomux	= { 1, 0xd0001, 0, 0, 10},
 			/* sound path (5 sources):
 			   MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
 				0= ext. Audio IN
@@ -1165,10 +1176,10 @@
 	.tuner_type     = -1,
 	.pll            = PLL_28,
 	.muxsel         = { 2 },
-	.gpiomask       = 0
+	gpiomask:       0
 },{
         /* Tomasz Pyra <hellfire@sedez.iq.pl> */
-        .name           = "Prolink Pixelview PV-BT878P+ (Rev.4C)",
+        .name           = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
         .video_inputs   = 3,
         .audio_inputs   = 4,
         .tuner          = 0,
@@ -1252,7 +1263,7 @@
 },{
         .name           = "Powercolor MTV878/ MTV878R/ MTV878F",
         .video_inputs   = 3,
-        .audio_inputs   = 2, 
+        audio_inputs:   2, 
 	.tuner		= 0,
         .svhs           = 2,
         .gpiomask       = 0x1C800F,  // Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset
@@ -1292,7 +1303,7 @@
 },{
         .name           = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
         .video_inputs   = 4,
-        .audio_inputs   = 3, 
+        audio_inputs:   3, 
         .tuner          = 0,
         .svhs           = 2,
         .gpiomask       = 7,
@@ -1313,7 +1324,7 @@
 		GPIO0,1:   HEF4052 A0,A1
 		GPIO2:     HEF4052 nENABLE
 		GPIO3-7:   n.c.
-		GPIO8-13:  IRDC357 data0,5 (data6 n.c. ?) [chip not present on my card]
+		GPIO8-13:  IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
 		GPIO14,15: ??
 		GPIO16-21: n.c.
 		GPIO22,23: ??
@@ -1513,6 +1524,65 @@
 	.no_msp34xx     = 1,
 	.no_tda9875     = 1,
 	.pll            = PLL_28,
+},{
+	.name           = "Pinnacle PCTV Sat",
+	.video_inputs   = 2,
+	.audio_inputs   = 0,
+	.svhs           = 1,
+	.tuner          = -1,
+	.tuner_type     = -1,
+	.no_msp34xx     = 1,
+	.no_tda9875     = 1,
+	.no_tda7432     = 1,   
+	.muxsel         = { 3, 0, 1, 2},
+	.needs_tvaudio  = 0, 
+	.pll            = PLL_28,
+},{
+        .name           = "Formac ProTV II",
+        .video_inputs   = 4,
+        .audio_inputs   = 1,
+        .tuner          = 0,
+        .svhs           = 3,
+        .gpiomask       = 2,
+	// TV, Comp1, Composite over SVID con, SVID
+        .muxsel         = { 2, 3, 1, 1},
+        .audiomux       = { 2, 2, 0, 0, 0 }, 
+        .pll            = PLL_28,
+	.has_radio      = 1,
+        .tuner_type     = TUNER_PHILIPS_PAL,
+      /* sound routing:
+           GPIO=0x00,0x01,0x03: mute (?)
+              0x02: both TV and radio (tuner: FM1216/I)
+         The card has onboard audio connectors labeled "cdrom" and "board",
+	 not soldered here, though unknown wiring.
+         Card lacks: external audio in, pci subsystem id.
+       */
+
+},{
+	/* ---- card 0x60 ---------------------------------- */
+	.name           = "MachTV",
+        .video_inputs   = 3,
+        .audio_inputs   = 1,
+        .tuner          = 0,
+        .svhs           = -1,
+        .gpiomask       = 7,
+        .muxsel         = { 2, 3, 1, 1},
+        .audiomux       = { 0, 1, 2, 3, 4},
+        .needs_tvaudio  = 1,
+        .tuner_type     = 5,
+	.pll            = 1,
+},{
+	.name           = "Euresys Picolo",
+	.video_inputs   = 3,
+	.audio_inputs   = 0,
+	.tuner          = -1,
+	.svhs           = 2,
+	.gpiomask       = 0,
+	.no_msp34xx     = 1,
+	.no_tda9875     = 1,
+	.no_tda7432     = 1,
+	.muxsel         = { 2, 0, 1},
+	.pll            = PLL_28,
 }};
 
 const int bttv_num_tvcards = (sizeof(bttv_tvcards)/sizeof(struct tvcard));
@@ -1556,7 +1626,7 @@
 			printk(KERN_DEBUG "please mail id, board name and "
 			       "the correct card= insmod option to kraxel@bytesex.org\n");
 		}
-	}
+	} 
 
 	/* let the user override the autodetected type */
 	if (card[btv->nr] >= 0 && card[btv->nr] < bttv_num_tvcards)
@@ -1601,6 +1671,16 @@
  * (most) board specific initialisations goes here
  */
 
+/* Some Modular Technology cards have an eeprom, but no subsystem ID */
+int is_MM20xPCTV(unsigned char eeprom_data[256])
+{
+	if (0 == strncmp(eeprom_data,"GET.MM20xPCTV",13)) {
+		printk("bttv: GET.MM20xPCTV found\n");
+		return 1; // found
+	}
+	return 0;
+}
+
 static void flyvideo_gpio(struct bttv *btv)
 { 
 	int gpio,outbits,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
@@ -1624,7 +1704,7 @@
 
 	ttype=(gpio&0x0f0000)>>16;
 	switch(ttype) {
-	case 0x0: tuner=4; // None
+	case 0x0: tuner=2; // NTSC, e.g. TPI8NSR11P
 		break;
         case 0x2: tuner=39;// LG NTSC (newer TAPC series) TAPC-H701P
 		break;
@@ -1647,6 +1727,9 @@
 	is_lr90             = !(gpio & 0x002000); // else LR26/LR50 (LR38/LR51 f. capture only)
         //		        gpio & 0x001000 // output bit for audio routing
 
+	if(is_capture_only) 
+		tuner=4; // No tuner present 
+
 	printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n", 
 	       btv->nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio); 
 	printk(KERN_INFO "bttv%d: FlyVideo  LR90=%s tda9821/tda9820=%s capture_only=%s\n",
@@ -1659,7 +1742,7 @@
 
 	// LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
         // LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
-	// Audio options: from tuner, from tda9821/tda9821(mono,stereo.sap), from tda9874, ext., mute
+	// Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute
 	if(has_tda9820_tda9821) btv->audio_hook = lt9415_audio;
 	//todo: if(has_tda9874) btv->audio_hook = fv2000s_audio;
 }
@@ -1816,6 +1899,16 @@
 {
         btv->tuner_type = -1;
 
+	if (BTTV_UNKNOWN == btv->type) {
+		printk("bttv%d: Looking for eeprom\n",btv->nr);
+		bttv_readee(btv,eeprom_data,0xa0);
+                if(is_MM20xPCTV(eeprom_data)) {
+                        btv->type = BTTV_MODTEC_205;
+			printk("bttv%d: Autodetect by eeprom:(%s) [card=%d]\n",
+			       btv->nr, bttv_tvcards[btv->type].name, btv->type);
+		}
+	}
+
 	switch (btv->type) {
 	case BTTV_MIRO:
 	case BTTV_MIROPRO:
@@ -1896,6 +1989,10 @@
 	case BTTV_IDS_EAGLE:
 		init_ids_eagle(btv);
 		break;
+	case BTTV_MODTEC_205:
+		bttv_readee(btv,eeprom_data,0xa0);
+		modtec_eeprom(btv);
+		break;
 	}
 
 	/* pll configuration */
@@ -1930,6 +2027,7 @@
                         break;
                 }
         }
+	btv->pll.pll_current = -1;
 
 	/* tuner configuration (from card list / autodetect / insmod option) */
  	if (-1 != bttv_tvcards[btv->type].tuner_type)
@@ -1947,33 +2045,12 @@
 	if (bttv_tvcards[btv->type].audio_hook)
 		btv->audio_hook=bttv_tvcards[btv->type].audio_hook;
 
-#if 0
-	/* detect Bt832 chip for quartzsight digital camera */
-	if((bttv_I2CRead(btv, I2C_BT832_ALT1, "Bt832") >=0) ||
-	   (bttv_I2CRead(btv, I2C_BT832_ALT2, "Bt832") >=0)) {
-		int outbits,databits;
-		request_module("bt832");
-
-		bttv_call_i2c_clients(btv, BT832_HEXDUMP, NULL);
-
-		printk("Reset Bt832 (0x400000 for Pixelview 4E)\n");
-		btwrite(0, BT848_GPIO_DATA);
-		outbits = btread(BT848_GPIO_OUT_EN);
-		databits= btread(BT848_GPIO_DATA);
-		btwrite(0x400000, BT848_GPIO_OUT_EN);
-		udelay(5);
-		btwrite(0x400000, BT848_GPIO_DATA);
-        	udelay(5);
-		btwrite(0, BT848_GPIO_DATA);
-		udelay(5);
-		btwrite(outbits, BT848_GPIO_OUT_EN);
-		btwrite(databits, BT848_GPIO_DATA);
-
-		// bt832 on pixelview changes from i2c 0x8a to 0x88 after
-		// being reset as above. So we must follow by this:
-		bttv_call_i2c_clients(btv, BT832_REATTACH, NULL);
+	if (bttv_tvcards[btv->type].digital_mode == DIGITAL_MODE_CAMERA) {
+		/* detect Bt832 chip for quartzsight digital camera */
+		if ((bttv_I2CRead(btv, I2C_BT832_ALT1, "Bt832") >=0) ||
+		    (bttv_I2CRead(btv, I2C_BT832_ALT2, "Bt832") >=0))
+			boot_bt832(btv);
 	}
-#endif
 
 	/* try to detect audio/fader chips */
 	if (!bttv_tvcards[btv->type].no_msp34xx &&
@@ -2069,6 +2146,16 @@
 	{ TUNER_LG_PAL_I,      "LG TAPC-I701D"}
 };
 
+static void modtec_eeprom(struct bttv *btv)
+{
+	if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
+		btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
+		printk("bttv Modtec: Tuner autodetected %s\n",&eeprom_data[0x1e]);
+	}
+	else
+		printk("bttv Modtec: Unknown TunerString:%s\n",&eeprom_data[0x1e]);
+}
+
 static void __devinit hauppauge_eeprom(struct bttv *btv)
 {
 	int blk2,tuner,radio,model;
@@ -2316,8 +2403,8 @@
 /* AVermedia specific stuff, from  bktr_card.c                             */
 
 int tuner_0_table[] = {
-        TUNER_PHILIPS_NTSC,  TUNER_PHILIPS_PAL,
-        TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL,
+        TUNER_PHILIPS_NTSC,  TUNER_PHILIPS_PAL /* PAL-BG*/,
+        TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL /* PAL-I*/,
         TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL,
         TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
         TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL};
@@ -2408,6 +2495,41 @@
 		       "init [%d]\n", btv->nr, pin);
 }
 
+static void __devinit boot_bt832(struct bttv *btv)
+{
+	int outbits,databits,resetbit=0;
+
+	switch (btv->type) {
+	case BTTV_PXELVWPLTVPAK:
+		resetbit = 0x400000;
+		break;
+	case BTTV_MODTEC_205:
+		resetbit = 1<<9;
+		break;
+	default:
+		BUG();
+	}
+
+	request_module("bt832");
+	bttv_call_i2c_clients(btv, BT832_HEXDUMP, NULL);
+
+	printk("bttv%d: Reset Bt832 [line=0x%x]\n",btv->nr,resetbit);
+	btwrite(0, BT848_GPIO_DATA);
+	outbits = btread(BT848_GPIO_OUT_EN);
+	databits= btread(BT848_GPIO_DATA);
+	btwrite(resetbit, BT848_GPIO_OUT_EN);
+	udelay(5);
+	btwrite(resetbit, BT848_GPIO_DATA);
+	udelay(5);
+	btwrite(0, BT848_GPIO_DATA);
+	udelay(5);
+	btwrite(outbits, BT848_GPIO_OUT_EN);
+	btwrite(databits, BT848_GPIO_DATA);
+
+	// bt832 on pixelview changes from i2c 0x8a to 0x88 after
+	// being reset as above. So we must follow by this:
+	bttv_call_i2c_clients(btv, BT832_REATTACH, NULL);
+}
 
 /* ----------------------------------------------------------------------- */
 /*  Imagenation L-Model PXC200 Framegrabber */
@@ -2980,13 +3102,16 @@
 	int pcipci_fail = 0;
 	struct pci_dev *dev = NULL;
 
-	/* for 2.4.x we'll use the pci quirks (drivers/pci/quirks.c) */
 	if (pci_pci_problems & PCIPCI_FAIL)
 		pcipci_fail = 1;
 	if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
 		triton1 = 1;
 	if (pci_pci_problems & PCIPCI_VSFX)
 		vsfx = 1;
+#ifdef PCIPCI_ALIMAGIK
+	if (pci_pci_problems & PCIPCI_ALIMAGIK)
+		latency = 0x0A;
+#endif
 
 	/* print which chipset we have */
 	while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev)))
@@ -2997,7 +3122,6 @@
 		printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
 	if (vsfx)
 		printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
-
 	if (pcipci_fail) {
 		printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n");
 		if (-1 == no_overlay) {
@@ -3005,30 +3129,34 @@
 			no_overlay = 1;
 		}
 	}
+	if (-1 != latency)
+		printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
 
 	while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL,
 				      PCI_DEVICE_ID_INTEL_82441, dev))) {
                 unsigned char b;
-                pci_read_config_byte(dev, 0x53, &b);
+		pci_read_config_byte(dev, 0x53, &b);
 		if (bttv_debug)
 			printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
 			       "bufcon=0x%02x\n",b);
 	}
-
 }
 
 int __devinit bttv_handle_chipset(struct bttv *btv)
 {
  	unsigned char command;
 
-	if (!triton1 && !vsfx)
+	if (!triton1 && !vsfx && -1 == latency)
 		return 0;
 
 	if (bttv_verbose) {
 		if (triton1)
-			printk("bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->nr);
+			printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->nr);
 		if (vsfx && btv->id >= 878)
-			printk("bttv%d: enabling VSFX\n",btv->nr);
+			printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->nr);
+		if (-1 != latency)
+			printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
+			       btv->nr,latency);
 	}
 
 	if (btv->id < 878) {
@@ -3044,6 +3172,8 @@
 			command |= BT878_EN_VSFX;
                 pci_write_config_byte(btv->dev, BT878_DEVCTRL, command);
         }
+	if (-1 != latency)
+		pci_write_config_byte(btv->dev, PCI_LATENCY_TIMER, latency);
 	return 0;
 }
 
diff -Nru a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c
--- a/drivers/media/video/bttv-driver.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/bttv-driver.c	Wed Jan  8 20:04:44 2003
@@ -39,8 +39,6 @@
 #include "bttvp.h"
 #include "tuner.h"
 
-/* 2.4 / 2.5 driver compatibility stuff */
-
 int bttv_num;			/* number of Bt848s in use */
 struct bttv bttvs[BTTV_MAX];
 
@@ -58,13 +56,14 @@
 static unsigned int irq_debug = 0;
 static unsigned int gbuffers = 8;
 static unsigned int gbufsize = 0x208000;
-static unsigned int fdsr = 0;
-static unsigned int latency = -1;
 
 static int video_nr = -1;
 static int radio_nr = -1;
 static int vbi_nr = -1;
 
+static unsigned int fdsr = 0;
+static unsigned int gpint = 1;
+
 /* options */
 static unsigned int combfilter = 0;
 static unsigned int lumafilter = 0;
@@ -94,14 +93,14 @@
 MODULE_PARM_DESC(gbuffers,"number of capture buffers. range 2-32, default 8");
 MODULE_PARM(gbufsize,"i");
 MODULE_PARM_DESC(gbufsize,"size of the capture buffers, default is 0x208000");
-MODULE_PARM(fdsr,"i");
-MODULE_PARM(latency,"i");
-MODULE_PARM_DESC(latency,"pci latency timer");
 
 MODULE_PARM(video_nr,"i");
 MODULE_PARM(radio_nr,"i");
 MODULE_PARM(vbi_nr,"i");
 
+MODULE_PARM(fdsr,"i");
+MODULE_PARM(gpint,"i");
+
 MODULE_PARM(combfilter,"i");
 MODULE_PARM(lumafilter,"i");
 MODULE_PARM(automute,"i");
@@ -132,6 +131,7 @@
 {
 	/* PAL digital input over GPIO[7:0] */
 	{
+		45, // 45 bytes following
 		0x36,0x11,0x01,0x00,0x90,0x02,0x05,0x10,0x04,0x16,
 		0x12,0x05,0x11,0x00,0x04,0x12,0xC0,0x00,0x31,0x00,
 		0x06,0x51,0x08,0x03,0x89,0x08,0x07,0xC0,0x44,0x00,
@@ -140,6 +140,7 @@
 	},
 	/* NTSC digital input over GPIO[7:0] */
 	{
+		51, // 51 bytes following
 		0x0C,0xC0,0x00,0x00,0x90,0x02,0x03,0x10,0x03,0x06,
 		0x10,0x04,0x12,0x12,0x05,0x02,0x13,0x04,0x19,0x00,
 		0x04,0x39,0x00,0x06,0x59,0x08,0x03,0x83,0x08,0x07,
@@ -147,6 +148,16 @@
 		0x0D,0x02,0x03,0x11,0x01,0x05,0x37,0x00,0xAC,0x21,
 		0x00,
 	},
+	// TGB_NTSC392 // quartzsight
+	// This table has been modified to be used for Fusion Rev D
+	{
+		0x2A, // size of table = 42
+		0x06, 0x08, 0x04, 0x0a, 0xc0, 0x00, 0x18, 0x08, 0x03, 0x24,
+		0x08, 0x07, 0x02, 0x90, 0x02, 0x08, 0x10, 0x04, 0x0c, 0x10,
+		0x05, 0x2c, 0x11, 0x04, 0x55, 0x48, 0x00, 0x05, 0x50, 0x00,
+		0xbf, 0x0c, 0x02, 0x2f, 0x3d, 0x00, 0x2f, 0x3f, 0x00, 0xc3,
+		0x20, 0x00
+	}
 };
 
 const struct bttv_tvnorm bttv_tvnorms[] = {
@@ -170,7 +181,7 @@
 		.vbipack        = 255,
 		.sram           = 0,
 	},{
-		.v4l2_id        = V4L2_STD_NTSC,
+		.v4l2_id        = V4L2_STD_NTSC_M,
 		.name           = "NTSC",
 		.Fsc            = 28636363,
 		.swidth         = 768,
@@ -635,28 +646,31 @@
         btwrite(fi|BT848_PLL_X, BT848_PLL_XCI);
 }
 
-static int set_pll(struct bttv *btv)
+static void set_pll(struct bttv *btv)
 {
         int i;
 
         if (!btv->pll.pll_crystal)
-                return 0;
+                return;
+
+	if (btv->pll.pll_ofreq == btv->pll.pll_current) {
+		dprintk("bttv%d: PLL: no change required\n",btv->nr);
+                return;
+        }
 
         if (btv->pll.pll_ifreq == btv->pll.pll_ofreq) {
                 /* no PLL needed */
                 if (btv->pll.pll_current == 0)
-                        return 0;
-		vprintk("bttv%d: PLL: switching off\n",btv->nr);
+                        return;
+		vprintk(KERN_INFO "bttv%d: PLL can sleep, using XTAL (%d).\n",
+			btv->nr,btv->pll.pll_ifreq);
                 btwrite(0x00,BT848_TGCTRL);
                 btwrite(0x00,BT848_PLL_XCI);
                 btv->pll.pll_current = 0;
-                return 0;
+                return;
         }
 
-        if (btv->pll.pll_ofreq == btv->pll.pll_current)
-                return 0;
-
-	vprintk("bttv%d: PLL: %d => %d ",btv->nr,
+	vprintk(KERN_INFO "bttv%d: PLL: %d => %d ",btv->nr,
 		btv->pll.pll_ifreq, btv->pll.pll_ofreq);
 	set_pll_freq(btv, btv->pll.pll_ifreq, btv->pll.pll_ofreq);
 
@@ -672,40 +686,43 @@
                         btwrite(0x08,BT848_TGCTRL);
                         btv->pll.pll_current = btv->pll.pll_ofreq;
 			vprintk(" ok\n");
-                        return 0;
+                        return;
                 }
         }
         btv->pll.pll_current = -1;
 	vprintk("failed\n");
-        return -1;
+        return;
 }
 
 /* used to switch between the bt848's analog/digital video capture modes */
 void bt848A_set_timing(struct bttv *btv)
 {
-       u8 dvsif_val = 0;
-       int table_idx = bttv_tvnorms[btv->tvnorm].sram;
-       int i;
-
-       /* timing change...reset timing generator address */
-       btwrite(0x00, BT848_TGCTRL);
-       btwrite(0x02, BT848_TGCTRL);
-       btwrite(0x00, BT848_TGCTRL);
-       
-       if (btv->digital_video  &&  -1 != table_idx) {
-               dprintk("bttv%d: load digital timing table (table_idx=%d)\n",
-		       btv->nr,table_idx);
-	       dvsif_val = 0x41;
-               for(i = 0; i < 51; i++)
-                       btwrite(SRAM_Table[table_idx][i],BT848_TGLB);
-
-	       btwrite(0x75,BT848_PLL_F_LO);
-               btwrite(0x50,BT848_PLL_F_HI);
-               btwrite(0x8B,BT848_PLL_XCI);
-               btwrite(0x11,BT848_TGCTRL);
-	       btv->pll.pll_current = 0;
-       }
-       btwrite(dvsif_val,BT848_DVSIF);
+	int i, len;
+	int table_idx = bttv_tvnorms[btv->tvnorm].sram;
+	int fsc       = bttv_tvnorms[btv->tvnorm].Fsc;
+
+	if (bttv_tvcards[btv->type].muxsel[btv->input] < 0) {
+		dprintk("bttv%d: load digital timing table (table_idx=%d)\n",
+			btv->nr,table_idx);
+
+		/* timing change...reset timing generator address */
+       		btwrite(0x00, BT848_TGCTRL);
+       		btwrite(0x02, BT848_TGCTRL);
+       		btwrite(0x00, BT848_TGCTRL);
+
+		len=SRAM_Table[table_idx][0];
+		for(i = 1; i <= len; i++)
+			btwrite(SRAM_Table[table_idx][i],BT848_TGLB);
+		btv->pll.pll_ofreq = 27000000;
+
+		set_pll(btv);
+		btwrite(0x11, BT848_TGCTRL);
+		btwrite(0x41, BT848_DVSIF);
+	} else {
+		btv->pll.pll_ofreq = fsc;
+		set_pll(btv);
+		btwrite(0x0, BT848_DVSIF);
+	}
 }
 
 /* ----------------------------------------------------------------------- */
@@ -878,13 +895,7 @@
 	      BT848_IFORM);
 	btwrite(tvnorm->vbipack, BT848_VBI_PACK_SIZE);
 	btwrite(1, BT848_VBI_PACK_DEL);
-
-	if (btv->digital_video) {
-		bt848A_set_timing(btv);
-	} else {
-		btv->pll.pll_ofreq = tvnorm->Fsc;
-		set_pll(btv);
-	}
+	bt848A_set_timing(btv);
 
 	switch (btv->type) {
 	case BTTV_VOODOOTV_FM:
@@ -1133,9 +1144,7 @@
 {
 	int need_count = 0;
 
-	if (locked_btres(btv,RESOURCE_VIDEO))
-		need_count++;
-	if (locked_btres(btv,RESOURCE_VBI))
+	if (btv->users)
 		need_count++;
 
 	if (need_count) {
@@ -1245,7 +1254,7 @@
 	}
 
 #if 0
-	if (STATE_NEEDS_INIT == buf->vb.state)
+	if (STATE_NEEDS_INIT == buf->vb.state) {
 		if (redo_dma_risc)
 			bttv_dma_free(btv,buf);
 	}
@@ -1275,7 +1284,7 @@
 {
 	struct bttv_fh *fh = file->private_data;
 	
-	*size = fh->buf.fmt->depth*fh->buf.vb.width*fh->buf.vb.height >> 3;
+	*size = fh->fmt->depth*fh->width*fh->height >> 3;
 	if (0 == *count)
 		*count = gbuffers;
 	while (*size * *count > gbuffers * gbufsize)
@@ -1284,14 +1293,14 @@
 }
 
 static int
-buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+	       enum v4l2_field field)
 {
 	struct bttv_buffer *buf = (struct bttv_buffer*)vb;
 	struct bttv_fh *fh = file->private_data;
 
-	return bttv_prepare_buffer(fh->btv,buf,fh->buf.fmt,
-				   fh->buf.vb.width,fh->buf.vb.height,
-				   fh->buf.vb.field);
+	return bttv_prepare_buffer(fh->btv, buf, fh->fmt,
+				   fh->width, fh->height, field);
 }
 
 static void
@@ -1357,6 +1366,8 @@
 	{
 		struct video_tuner *v = arg;
 		
+		if (-1 == bttv_tvcards[btv->type].tuner)
+			return -EINVAL;
 		if (v->tuner) /* Only tuner 0 */
 			return -EINVAL;
 		strcpy(v->name, "Television");
@@ -1517,10 +1528,15 @@
 	case VIDIOC_ENUMINPUT:
 	{
 		struct v4l2_input *i = arg;
-
-		if (i->index >= bttv_tvcards[btv->type].video_inputs)
+		int n;
+		
+		n = i->index;
+		if (n >= bttv_tvcards[btv->type].video_inputs)
 			return -EINVAL;
-		i->type = V4L2_INPUT_TYPE_CAMERA;
+		memset(i,0,sizeof(*i));
+		i->index    = n;
+		i->type     = V4L2_INPUT_TYPE_CAMERA;
+		i->audioset = 1;
 		if (i->index == bttv_tvcards[btv->type].tuner) {
 			sprintf(i->name, "Television");
 			i->type  = V4L2_INPUT_TYPE_TUNER;
@@ -1530,6 +1546,15 @@
 		} else {
                         sprintf(i->name,"Composite%d",i->index);
 		}
+		if (i->index == btv->input) {
+			__u32 dstatus = btread(BT848_DSTATUS);
+			if (0 == (dstatus & BT848_DSTATUS_PRES))
+				i->status |= V4L2_IN_ST_NO_SIGNAL;
+			if (0 == (dstatus & BT848_DSTATUS_HLOC))
+				i->status |= V4L2_IN_ST_NO_H_LOCK;
+		}
+		for (n = 0; n < BTTV_TVNORMS; n++)
+			i->std |= bttv_tvnorms[n].v4l2_id;
 		return 0;
 	}
 	case VIDIOC_G_INPUT:
@@ -1562,8 +1587,9 @@
 		down(&btv->lock);
 		memset(t,0,sizeof(*t));
 		strcpy(t->name, "Television");
+		t->type       = V4L2_TUNER_ANALOG_TV;
 		t->capability = V4L2_TUNER_CAP_NORM;
-		t->rangehigh = 0xffffffffUL;
+		t->rangehigh  = 0xffffffffUL;
 		t->rxsubchans = V4L2_TUNER_SUB_MONO;
 		if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC)
 			t->signal = 0xffff;
@@ -1680,6 +1706,15 @@
 	if (!fixup && (win->w.width > maxw || win->w.height > maxh))
 		return -EINVAL;
 
+	if (1 /* depth < 4bpp */) {
+		/* adjust and align writes */
+		int left     = (win->w.left + 3) & ~3;
+		int width    = win->w.width & ~3;
+		while (left + width > win->w.left + win->w.width)
+			width -= 4;
+		win->w.left  = left;
+		win->w.width = width;
+	}
 	if (win->w.width > maxw)
 		win->w.width = maxw;
 	if (win->w.height > maxh)
@@ -1796,15 +1831,17 @@
 	switch (f->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
 		memset(&f->fmt.pix,0,sizeof(struct v4l2_pix_format));
-		f->fmt.pix.width        = fh->buf.vb.width;
-		f->fmt.pix.height       = fh->buf.vb.height;
-		f->fmt.pix.pixelformat  = fh->buf.fmt->fourcc;
+		f->fmt.pix.width        = fh->width;
+		f->fmt.pix.height       = fh->height;
+		f->fmt.pix.field        = fh->cap.field;
+		f->fmt.pix.pixelformat  = fh->fmt->fourcc;
 		f->fmt.pix.sizeimage    =
-			(fh->buf.vb.width*fh->buf.vb.height*fh->buf.fmt->depth)/8;
+			(fh->width * fh->height * fh->fmt->depth)/8;
 		return 0;
 	case V4L2_BUF_TYPE_VIDEO_OVERLAY:
 		memset(&f->fmt.win,0,sizeof(struct v4l2_window));
-		f->fmt.win.w   = fh->ov.w;
+		f->fmt.win.w     = fh->ov.w;
+		f->fmt.win.field = fh->ov.field;
 		return 0;
 	case V4L2_BUF_TYPE_VBI_CAPTURE:
 		bttv_vbi_fmt(fh,f);
@@ -1866,7 +1903,7 @@
 		if (f->fmt.pix.height > maxh)
 			f->fmt.pix.height = maxh;
 		f->fmt.pix.sizeimage =
-			(fh->buf.vb.width * fh->buf.vb.height * fmt->depth)/8;
+			(fh->width * fh->height * fmt->depth)/8;
 		
 		return 0;
 	}
@@ -1909,14 +1946,13 @@
 		
 		/* update our state informations */
 		down(&fh->cap.lock);
-		fh->buf.fmt             = fmt;
-		fh->buf.vb.field        = f->fmt.pix.field;
-		fh->buf.vb.width        = f->fmt.pix.width;
-		fh->buf.vb.height       = f->fmt.pix.height;
-		btv->init.buf.fmt       = fmt;
-		btv->init.buf.vb.field  = f->fmt.pix.field;
-		btv->init.buf.vb.width  = f->fmt.pix.width;
-		btv->init.buf.vb.height = f->fmt.pix.height;
+		fh->fmt              = fmt;
+		fh->cap.field        = f->fmt.pix.field;
+		fh->width            = f->fmt.pix.width;
+		fh->height           = f->fmt.pix.height;
+		btv->init.fmt        = fmt;
+		btv->init.width      = f->fmt.pix.width;
+		btv->init.height     = f->fmt.pix.height;
 		up(&fh->cap.lock);
 		
 		return 0;
@@ -1953,7 +1989,7 @@
 			       v4l1_ioctls[_IOC_NR(cmd)] : "???");
 			break;
 		case 'V':
-			printk("bttv%d: ioctl 0x%x (v4l2, VIDIOC_%s)\n",
+			printk("bttv%d: ioctl 0x%x (v4l2, %s)\n",
 			       btv->nr, cmd,  v4l2_ioctl_names[_IOC_NR(cmd)]);
 			break;
 		default:
@@ -2002,9 +2038,9 @@
 		pic->contrast   = btv->contrast;
 		pic->hue        = btv->hue;
 		pic->colour     = btv->saturation;
-		if (fh->buf.fmt) {
-			pic->depth   = fh->buf.fmt->depth;
-			pic->palette = fh->buf.fmt->palette;
+		if (fh->fmt) {
+			pic->depth   = fh->fmt->depth;
+			pic->palette = fh->fmt->palette;
 		}
 		return 0;
 	}
@@ -2021,9 +2057,9 @@
 		if (fmt->depth != pic->depth && !sloppy)
 			goto fh_unlock_and_return;
 		fh->ovfmt   = fmt;
-		fh->buf.fmt = fmt;
+		fh->fmt     = fmt;
 		btv->init.ovfmt   = fmt;
-		btv->init.buf.fmt = fmt;
+		btv->init.fmt     = fmt;
 		if (bigendian) {
 			/* dirty hack time:  swap bytes for overlay if the
 			   display adaptor is big endian (insmod option) */
@@ -2067,10 +2103,10 @@
 		retval = setup_window(fh, btv, &w2, 0);
 		if (0 == retval) {
 			/* on v4l1 this ioctl affects the read() size too */
-			fh->buf.vb.width  = fh->ov.w.width;
-			fh->buf.vb.height = fh->ov.w.height;
-			btv->init.buf.vb.width  = fh->ov.w.width;
-			btv->init.buf.vb.height = fh->ov.w.height;
+			fh->width  = fh->ov.w.width;
+			fh->height = fh->ov.w.height;
+			btv->init.width  = fh->ov.w.width;
+			btv->init.height = fh->ov.w.height;
 		}
 		return retval;
 	}
@@ -2120,10 +2156,10 @@
 			}
 			if (NULL == fmt)
 				goto fh_unlock_and_return;
-			fh->ovfmt   = fmt;
-			fh->buf.fmt = fmt;
-			btv->init.ovfmt   = fmt;
-			btv->init.buf.fmt = fmt;
+			fh->ovfmt = fmt;
+			fh->fmt   = fmt;
+			btv->init.ovfmt = fmt;
+			btv->init.fmt   = fmt;
 		} else {
 			if (15 == fbuf->depth)
 				fbuf->depth = 16;
@@ -2266,11 +2302,6 @@
 	case VIDIOCSAUDIO:
 		return bttv_common_ioctls(btv,cmd,arg);
 
-	/* vbi/teletext ioctls */
-	case BTTV_VBISIZE:
-		bttv_switch_type(fh,V4L2_BUF_TYPE_VBI_CAPTURE);
-		return fh->lines * 2 * 2048;
-
 	/* ***  v4l2  *** ************************************************ */
 	case VIDIOC_QUERYCAP:
 	{
@@ -2295,8 +2326,24 @@
 	case VIDIOC_ENUM_FMT:
 	{
 		struct v4l2_fmtdesc *f = arg;
+		enum v4l2_buf_type type;
 		int i, index;
 
+		type  = f->type;
+		if (V4L2_BUF_TYPE_VBI_CAPTURE == type) {
+			/* vbi */
+			index = f->index;
+			if (0 != index)
+				return -EINVAL;
+			memset(f,0,sizeof(*f));
+			f->index       = index;
+			f->type        = type;
+			f->pixelformat = V4L2_PIX_FMT_GREY;
+			strcpy(f->description,"vbi data");
+			return 0;
+		}
+
+		/* video capture + overlay */
 		index = -1;
 		for (i = 0; i < BTTV_FORMATS; i++) {
 			if (bttv_formats[i].fourcc != -1)
@@ -2318,9 +2365,10 @@
 			return -EINVAL;
 		}
 		memset(f,0,sizeof(*f));
-		f->index = index;
-		strncpy(f->description,bttv_formats[i].name,31);
+		f->index       = index;
+		f->type        = type;
 		f->pixelformat = bttv_formats[i].fourcc;
+		strncpy(f->description,bttv_formats[i].name,31);
 		return 0;
 	}
 
@@ -2438,7 +2486,6 @@
 
 		if (!check_alloc_btres(btv,fh,res))
 			return -EBUSY;
-		bttv_field_count(btv);
 		return videobuf_streamon(file,bttv_queue(fh));
 	}
 	case VIDIOC_STREAMOFF:
@@ -2449,7 +2496,6 @@
 		if (retval < 0)
 			return retval;
 		free_btres(btv,fh,res);
-		bttv_field_count(btv);
 		return 0;
 	}
 
@@ -2540,7 +2586,15 @@
 static int bttv_ioctl(struct inode *inode, struct file *file,
 		      unsigned int cmd, unsigned long arg)
 {
-	return video_usercopy(inode, file, cmd, arg, bttv_do_ioctl);
+	struct bttv_fh *fh  = file->private_data;
+
+	switch (cmd) {
+	case BTTV_VBISIZE:
+		bttv_switch_type(fh,V4L2_BUF_TYPE_VBI_CAPTURE);
+		return fh->lines * 2 * 2048;
+	default:
+		return video_usercopy(inode, file, cmd, arg, bttv_do_ioctl);
+	}
 }
 
 static ssize_t bttv_read(struct file *file, char *data,
@@ -2561,6 +2615,8 @@
 		retval = videobuf_read_one(file, &fh->cap, data, count, ppos);
 		break;
 	case V4L2_BUF_TYPE_VBI_CAPTURE:
+		if (!check_alloc_btres(fh->btv,fh,RESOURCE_VBI))
+			return -EBUSY;
 		retval = videobuf_read_stream(file, &fh->vbi, data, count, ppos, 1);
 		break;
 	default:
@@ -2574,8 +2630,11 @@
 	struct bttv_fh *fh = file->private_data;
 	struct bttv_buffer *buf;
 
-	if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type)
+	if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
+		if (!check_alloc_btres(fh->btv,fh,RESOURCE_VBI))
+			return -EBUSY;
 		return videobuf_poll_stream(file, &fh->vbi, wait);
+	}
 
 	if (check_btres(fh,RESOURCE_VIDEO)) {
 		/* streaming capture */
@@ -2596,7 +2655,7 @@
 				up(&fh->cap.lock);
 				return POLLERR;
 			}
-			if (0 != fh->cap.ops->buf_prepare(file,fh->cap.read_buf)) {
+			if (0 != fh->cap.ops->buf_prepare(file,fh->cap.read_buf,fh->cap.field)) {
 				up(&fh->cap.lock);
 				return POLLERR;
 			}
@@ -2652,14 +2711,18 @@
 	videobuf_queue_init(&fh->cap, &bttv_video_qops,
 			    btv->dev, &btv->s_lock,
 			    V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			    V4L2_FIELD_INTERLACED,
 			    sizeof(struct bttv_buffer));
 	videobuf_queue_init(&fh->vbi, &bttv_vbi_qops,
 			    btv->dev, &btv->s_lock,
 			    V4L2_BUF_TYPE_VBI_CAPTURE,
+			    V4L2_FIELD_SEQ_TB,
 			    sizeof(struct bttv_buffer));
-	
 	i2c_vidiocschan(btv);
-        return 0;
+
+	btv->users++;
+	bttv_field_count(btv);
+	return 0;
 }
 
 static int bttv_release(struct inode *inode, struct file *file)
@@ -2667,7 +2730,7 @@
 	struct bttv_fh *fh = file->private_data;
 	struct bttv *btv = fh->btv;
 
-	/* turn off overlay, stop outstanding captures */
+	/* turn off overlay */
 	if (check_btres(fh, RESOURCE_OVERLAY))
 		bttv_switch_overlay(btv,fh,NULL);
 	
@@ -2675,7 +2738,6 @@
 	if (check_btres(fh, RESOURCE_VIDEO)) {
 		videobuf_streamoff(file,&fh->cap);
 		free_btres(btv,fh,RESOURCE_VIDEO);
-		bttv_field_count(btv);
 	}
 	if (fh->cap.read_buf) {
 		buffer_release(file,fh->cap.read_buf);
@@ -2683,13 +2745,19 @@
 	}
 
 	/* stop vbi capture */
-	if (fh->vbi.streaming)
-		videobuf_streamoff(file,&fh->vbi);
-	if (fh->vbi.reading)
-		videobuf_read_stop(file,&fh->vbi);
+	if (check_btres(fh, RESOURCE_VBI)) {
+		if (fh->vbi.streaming)
+			videobuf_streamoff(file,&fh->vbi);
+		if (fh->vbi.reading)
+			videobuf_read_stop(file,&fh->vbi);
+		free_btres(btv,fh,RESOURCE_VBI);
+	}
 
 	file->private_data = NULL;
 	kfree(fh);
+
+	btv->users--;
+	bttv_field_count(btv);
 	return 0;
 }
 
@@ -2719,7 +2787,7 @@
 static struct video_device bttv_video_template =
 {
 	.name     = "UNSET",
-	.type     = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
+	type:     VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
 	          VID_TYPE_CLIPPING|VID_TYPE_SCALES,
 	.hardware = VID_HARDWARE_BT848,
 	.fops     = &bttv_fops,
@@ -2965,6 +3033,7 @@
 {
 	struct bttv_buffer *o_bottom,*o_top,*o_vcurr;
 	struct bttv_buffer *capture;
+	dma_addr_t rc;
 	int irqflags = 0;
 	struct timeval ts;
 
@@ -3032,9 +3101,17 @@
 	}
 
 	if (irq_debug)
-		printk(KERN_DEBUG
-		       "bttv: irq top=%p bottom=%p screen=%p vbi=%p\n",
-		       btv->top,btv->bottom,btv->screen,btv->vcurr);
+		printk(KERN_DEBUG "bttv%d: irq top=0x%08x bottom=0x%08x"
+		       " vbi=0x%08x/0x%08x\n", btv->nr,
+		       btv->top    ? btv->top->top.dma       : 0,
+		       btv->bottom ? btv->bottom->bottom.dma : 0,
+		       btv->vcurr  ? btv->vcurr->top.dma     : 0,
+		       btv->vcurr  ? btv->vcurr->bottom.dma  : 0);
+
+	rc = btread(BT848_RISC_COUNT);
+	if (rc < btv->main.dma || rc > btv->main.dma + 0x100)
+		printk("bttv%d: Huh? IRQ latency? main=0x%x rc=0x%x\n",
+		       btv->nr,btv->main.dma,rc);
 	
 	/* activate new fields */
 	bttv_buffer_activate(btv,btv->top,btv->bottom);
@@ -3270,11 +3347,6 @@
 		goto fail1;
 	}
 
-	if (-1 != latency) {
-		printk(KERN_INFO "bttv%d: setting pci latency timer to %d\n",
-		       bttv_num,latency);
-		pci_write_config_byte(dev, PCI_LATENCY_TIMER, latency);
-	}
         pci_read_config_byte(dev, PCI_CLASS_REVISION, &btv->revision);
         pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
         printk(KERN_INFO "bttv%d: Bt%d (rev %d) at %s, ",
@@ -3315,14 +3387,13 @@
 	btv->opt_adc_crush  = adc_crush;
 	
 	/* fill struct bttv with some useful defaults */
-	btv->init.btv = btv;
-	btv->init.ov.w.width    = 320;
-	btv->init.ov.w.height   = 240;
-	btv->init.buf.fmt       = format_by_palette(VIDEO_PALETTE_RGB24);
-	btv->init.buf.vb.width  = 320;
-	btv->init.buf.vb.height = 240;
-	btv->init.buf.vb.field  = V4L2_FIELD_BOTTOM;
-	btv->init.lines         = 16;
+	btv->init.btv         = btv;
+	btv->init.ov.w.width  = 320;
+	btv->init.ov.w.height = 240;
+	btv->init.fmt         = format_by_palette(VIDEO_PALETTE_RGB24);
+	btv->init.width       = 320;
+	btv->init.height      = 240;
+	btv->init.lines       = 16;
 	btv->input = 0;
 
 	/* initialize hardware */
@@ -3341,7 +3412,7 @@
         /* interrupt */
         btwrite(0xfffffUL, BT848_INT_STAT);
         btwrite((btv->triton1) |
-                BT848_INT_GPINT|
+                (gpint ? BT848_INT_GPINT : 0) |
                 BT848_INT_SCERR|
                 (fdsr ? BT848_INT_FDSR : 0) |
                 BT848_INT_RISCI|BT848_INT_OCERR|BT848_INT_VPRES|
diff -Nru a/drivers/media/video/bttv-if.c b/drivers/media/video/bttv-if.c
--- a/drivers/media/video/bttv-if.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/bttv-if.c	Wed Jan  8 20:04:43 2003
@@ -54,7 +54,7 @@
 /*                      gpio ports (IR for example)                        */
 /*                      see bttv.h for comments                            */
 
-int bttv_get_cardinfo(unsigned int card, int *type, int *cardid)
+int bttv_get_cardinfo(unsigned int card, int *type, unsigned *cardid)
 {
 	if (card >= bttv_num) {
 		return -1;
@@ -194,6 +194,7 @@
 	return state;
 }
 
+
 static int attach_inform(struct i2c_client *client)
 {
         struct bttv *btv = (struct bttv*)client->adapter->data;
@@ -262,7 +263,7 @@
 };
 
 static struct i2c_adapter bttv_i2c_adap_template = {
-	.owner		   = THIS_MODULE,
+	.owner          = THIS_MODULE,
 	.name              = "bt848",
 	.id                = I2C_HW_B_BT848,
 	.client_register   = attach_inform,
diff -Nru a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c
--- a/drivers/media/video/bttv-risc.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/bttv-risc.c	Wed Jan  8 20:04:44 2003
@@ -453,7 +453,7 @@
 	int totalwidth   = tvnorm->totalwidth;
 	int scaledtwidth = tvnorm->scaledtwidth;
 
-	if (btv->digital_video) {
+	if (bttv_tvcards[btv->type].muxsel[btv->input] < 0) {
 		swidth       = 720;
 		totalwidth   = 858;
 		scaledtwidth = 858;
@@ -764,15 +764,15 @@
 		case V4L2_FIELD_INTERLACED:
 			bttv_calc_geo(btv,&buf->geo,buf->vb.width,
 				      buf->vb.height,1,buf->tvnorm);
-			lines     = buf->vb.height >> 1;
-			ypadding  = buf->vb.width;
+			lines    = buf->vb.height >> 1;
+			ypadding = buf->vb.width;
 			cpadding = buf->vb.width >> buf->fmt->hshift;
 			bttv_risc_planar(btv,&buf->top,
 					 buf->vb.dma.sglist,
 					 0,buf->vb.width,ypadding,lines,
 					 uoffset,voffset,
 					 buf->fmt->hshift,
-					 buf->fmt->vshift >> 1,
+					 buf->fmt->vshift,
 					 cpadding);
 			bttv_risc_planar(btv,&buf->bottom,
 					 buf->vb.dma.sglist,
@@ -780,7 +780,7 @@
 					 uoffset+cpadding,
 					 voffset+cpadding,
 					 buf->fmt->hshift,
-					 buf->fmt->vshift >> 1,
+					 buf->fmt->vshift,
 					 cpadding);
 			break;
 		default:
diff -Nru a/drivers/media/video/bttv-vbi.c b/drivers/media/video/bttv-vbi.c
--- a/drivers/media/video/bttv-vbi.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/bttv-vbi.c	Wed Jan  8 20:04:44 2003
@@ -65,14 +65,17 @@
 static int vbi_buffer_setup(struct file *file, int *count, int *size)
 {
 	struct bttv_fh *fh = file->private_data;
+	struct bttv *btv = fh->btv;
 
 	if (0 == *count)
 		*count = vbibufs;
 	*size = fh->lines * 2 * 2048;
+	dprintk("setup: lines=%d\n",fh->lines);
 	return 0;
 }
 
-static int vbi_buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static int vbi_buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+			      enum v4l2_field field)
 {
 	struct bttv_fh *fh = file->private_data;
 	struct bttv *btv = fh->btv;
@@ -90,8 +93,10 @@
 			goto fail;
 	}
 	buf->vb.state = STATE_PREPARED;
-	dprintk("buf prepare %p: top=%p bottom=%p\n",
-		vb,&buf->top,&buf->bottom);
+	buf->vb.field = field;
+	dprintk("buf prepare %p: top=%p bottom=%p field=%s\n",
+		vb, &buf->top, &buf->bottom,
+		v4l2_field_names[buf->vb.field]);
 	return 0;
 
  fail:
diff -Nru a/drivers/media/video/bttv.h b/drivers/media/video/bttv.h
--- a/drivers/media/video/bttv.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/bttv.h	Wed Jan  8 20:04:43 2003
@@ -90,6 +90,7 @@
 #define BTTV_SENSORAY311    0x49
 #define BTTV_RV605          0x4a
 #define BTTV_WINDVR         0x4c
+#define BTTV_KWORLD         0x4e
 #define BTTV_HAUPPAUGEPVR   0x50
 #define BTTV_GVBCTV5PCI     0x51
 #define BTTV_OSPREY1x0      0x52
@@ -104,6 +105,9 @@
 #define BTTV_OSPREY540      0x5b
 #define BTTV_OSPREY2000     0x5c
 #define BTTV_IDS_EAGLE      0x5d
+#define BTTV_PINNACLESAT    0x5e
+#define BTTV_FORMAC_PROTV   0x5f
+#define BTTV_EURESYS_PICOLO 0x61
 
 /* i2c address list */
 #define I2C_TSA5522        0xc2
@@ -132,6 +136,10 @@
 #define WINVIEW_PT2254_DATA 0x20
 #define WINVIEW_PT2254_STROBE 0x80
 
+/* digital_mode */
+#define DIGITAL_MODE_VIDEO 1
+#define DIGITAL_MODE_CAMERA 2
+
 struct bttv;
 
 struct tvcard
@@ -141,6 +149,7 @@
         int audio_inputs;
         int tuner;
         int svhs;
+	int digital_mode; // DIGITAL_MODE_CAMERA or DIGITAL_MODE_VIDEO
         u32 gpiomask;
         u32 muxsel[16];
         u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
@@ -191,7 +200,8 @@
    for possible values see lines below beginning with #define BTTV_UNKNOWN
    returns negative value if error occurred 
 */
-extern int bttv_get_cardinfo(unsigned int card, int *type, int *cardid);
+extern int bttv_get_cardinfo(unsigned int card, int *type,
+			     unsigned int *cardid);
 extern struct pci_dev* bttv_get_pcidev(unsigned int card);
 
 /* obsolete, use bttv_get_cardinfo instead */
diff -Nru a/drivers/media/video/bttvp.h b/drivers/media/video/bttvp.h
--- a/drivers/media/video/bttvp.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/bttvp.h	Wed Jan  8 20:04:43 2003
@@ -24,7 +24,7 @@
 #ifndef _BTTVP_H_
 #define _BTTVP_H_
 
-#define BTTV_VERSION_CODE KERNEL_VERSION(0,9,1)
+#define BTTV_VERSION_CODE KERNEL_VERSION(0,9,4)
 
 #include <linux/types.h>
 #include <linux/wait.h>
@@ -55,7 +55,7 @@
 
 #define RESOURCE_OVERLAY       1
 #define RESOURCE_VIDEO         2
-#define RESOURCE_VBI           3
+#define RESOURCE_VBI           4
 
 #define RAW_LINES            640
 #define RAW_BPL             1024
@@ -136,7 +136,10 @@
 
 	/* video capture */
 	struct videobuf_queue    cap;
-	struct bttv_buffer       buf;
+	/* struct bttv_buffer       buf; */
+	const struct bttv_format *fmt;
+	int                      width;
+	int                      height;
 
 	/* current settings */
 	const struct bttv_format *ovfmt;
@@ -255,7 +258,7 @@
 	/* card configuration info */
         unsigned int nr;       /* dev nr (for printk("bttv%d: ...");  */
 	char name[8];          /* dev name */
-	int cardid;            /* pci subsystem id (bt878 based ones) */
+	unsigned int cardid;   /* pci subsystem id (bt878 based ones) */
 	int type;              /* card type (pointer into tvcards[])  */
         int tuner_type;        /* tuner chip type */
 	struct bttv_pll_info pll;
@@ -291,7 +294,6 @@
 	int tvnorm,hue,contrast,bright,saturation;
 	struct video_buffer fbuf;
 	int field_count;
-	int digital_video;
 
 	/* various options */
 	int opt_combfilter;
@@ -334,7 +336,7 @@
 	struct timer_list timeout;
 	int errors;
 
-	int user;
+	int users;
 	struct bttv_fh init;
 };
 
diff -Nru a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c
--- a/drivers/media/video/msp3400.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/msp3400.c	Wed Jan  8 20:04:44 2003
@@ -62,17 +62,7 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] = {I2C_CLIENT_END};
 static unsigned short normal_i2c_range[] = {0x40,0x40,I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 /* insmod parameters */
 static int debug   = 0;    /* debug output */
@@ -145,17 +135,33 @@
 /* ----------------------------------------------------------------------- */
 /* functions for talking to the MSP3400C Sound processor                   */
 
+#ifndef I2C_M_IGNORE_NAK
+# define I2C_M_IGNORE_NAK 0x1000
+#endif
+
 static int msp3400c_reset(struct i2c_client *client)
 {
-        static char reset_off[3] = { 0x00, 0x80, 0x00 };
-        static char reset_on[3]  = { 0x00, 0x00, 0x00 };
-
-        i2c_master_send(client,reset_off,3);  /* XXX ignore errors here */
-        if (3 != i2c_master_send(client,reset_on, 3)) {
-		printk(KERN_ERR "msp3400: chip reset failed, penguin on i2c bus?\n");
-                return -1;
-	}
-        return 0;
+	/* reset and read revision code */
+	static char reset_off[3] = { 0x00, 0x80, 0x00 };
+	static char reset_on[3]  = { 0x00, 0x00, 0x00 };
+	static char write[3]     = { I2C_MSP3400C_DFP + 1, 0x00, 0x1e };
+	char read[2];
+	struct i2c_msg reset[2] = {
+		{ client->addr, I2C_M_IGNORE_NAK, 3, reset_off },
+		{ client->addr, I2C_M_IGNORE_NAK, 3, reset_on  },
+	};
+	struct i2c_msg test[2] = {
+		{ client->addr, 0,        3, write },
+		{ client->addr, I2C_M_RD, 2, read  },
+	};
+	
+	if ( (1 != i2c_transfer(client->adapter,&reset[0],1)) ||
+	     (1 != i2c_transfer(client->adapter,&reset[1],1)) ||
+	     (2 != i2c_transfer(client->adapter,test,2)) ) {
+		printk(KERN_ERR "msp3400: chip reset failed\n");
+		return -1;
+        }
+	return 0; 
 }
 
 static int
@@ -1213,19 +1219,20 @@
 static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg);
 
 static struct i2c_driver driver = {
-	.name		= "i2cmsp3400driver",
-	.id		= I2C_DRIVERID_MSP3400,
-	.flags		= I2C_DF_NOTIFY,
-	.attach_adapter	= msp_probe,
-	.detach_client	= msp_detach,
-	.command	= msp_command,
+	.owner          = THIS_MODULE,
+        .name           = "i2c msp3400 driver",
+        .id             = I2C_DRIVERID_MSP3400,
+        .flags          = I2C_DF_NOTIFY,
+        .attach_adapter = msp_probe,
+        .detach_client  = msp_detach,
+        .command        = msp_command,
 };
 
 static struct i2c_client client_template = 
 {
-	.name	= "(unset)",
-	.flags	= I2C_CLIENT_ALLOW_USE,
-	.driver	= &driver,
+	.name   = "(unset)",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
 };
 
 static int msp_attach(struct i2c_adapter *adap, int addr,
@@ -1258,6 +1265,7 @@
 	msp->bass   = 32768;
 	msp->treble = 32768;
 	msp->input  = -1;
+	msp->muted  = 1;
 	for (i = 0; i < DFP_COUNT; i++)
 		msp->dfp_regs[i] = -1;
 
@@ -1283,8 +1291,9 @@
 
 #if 0
 	/* this will turn on a 1kHz beep - might be useful for debugging... */
-	msp3400c_write(client,I2C_MSP3400C_DFP, 0x0014, 0x1040);
+	msp3400c_write(c,I2C_MSP3400C_DFP, 0x0014, 0x1040);
 #endif
+	msp3400c_setvolume(c,msp->muted,msp->left,msp->right);
 
 	sprintf(c->name,"MSP34%02d%c-%c%d",
 		(rev2>>8)&0xff, (rev1&0xff)+'@', ((rev1>>8)&0xff)+'@', rev2&0x1f);
diff -Nru a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
--- a/drivers/media/video/saa7134/saa7134-cards.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/media/video/saa7134/saa7134-cards.c	Wed Jan  8 20:04:45 2003
@@ -288,6 +288,81 @@
 			.amux = LINE2,
 		},
 	},
+	[SAA7134_BOARD_KWORLD] = {
+                .name           = "Kworld/KuroutoShikou SAA7130-TVPCI",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_NTSC_M,
+                .inputs         = {{
+                        .name = name_svideo,
+                        .vmux = 8,
+                        .amux = LINE1,
+                },{
+                        .name = name_comp1,
+                        .vmux = 3,
+                        .amux = LINE1,
+                },{
+                        .name = name_tv,
+                        .vmux = 1,
+                        .amux = TV,
+                        .tv   = 1,
+                }},
+        },
+	[SAA7134_BOARD_CINERGY600] = {
+                .name           = "Terratec Cinergy 600 TV",
+                .audio_clock    = 0x00200000,
+                .tuner_type     = TUNER_PHILIPS_PAL,
+                .inputs         = {{
+                        .name = name_tv,
+                        .vmux = 1,
+                        .amux = TV,
+                        .tv   = 1,
+                },{
+                        .name = name_comp1,
+                        .vmux = 4,
+                        .amux = LINE1,
+                },{
+                        .name = name_svideo,
+                        .vmux = 8,
+                        .amux = LINE1,
+                },{
+                        .name = name_comp2, // CVideo over SVideo Connector
+                        .vmux = 0,
+                        .amux = LINE1,
+                }},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+               },
+
+        },
+	[SAA7134_BOARD_MD7134] = {
+		.name           = "Medion 7134",
+		.audio_clock    = 0x00200000,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.need_tda9887   = 1,
+		.inputs = {{
+			.name   = name_tv,
+			.vmux   = 1,
+			.amux   = LINE2,
+			.tv     =   1,
+		},{
+			.name   = name_comp1,
+			.vmux   = 0,
+			.amux   = LINE2,
+		},{
+			.name   = name_comp2,
+			.vmux   = 3,
+			.amux   = LINE2,
+		},{
+			.name   = name_svideo,
+			.vmux   = 8,
+			.amux   = LINE2,
+		}},
+		.radio = {
+			.name   = name_radio,
+			.amux   = LINE2,
+		},
+      },
 };
 const int saa7134_bcount = (sizeof(saa7134_boards)/sizeof(struct saa7134_board));
 
@@ -320,7 +395,25 @@
                 .subdevice    = 0x1142,
                 .driver_data  = SAA7134_BOARD_CINERGY400,
         },{
-
+                .vendor       = PCI_VENDOR_ID_PHILIPS,
+                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+                .subvendor    = 0x153B,
+                .subdevice    = 0x1143,
+                .driver_data  = SAA7134_BOARD_CINERGY600,
+        },{
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+		.subvendor    = 0x5168,
+		.subdevice    = 0x0138,
+		.driver_data  = SAA7134_BOARD_FLYVIDEO3000,
+        },{
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+		.subvendor    = 0x16be,
+		.subdevice    = 0x0003,
+		.driver_data  = SAA7134_BOARD_MD7134,
+	},{
+		
 		/* --- boards without eeprom + subsystem ID --- */
                 .vendor       = PCI_VENDOR_ID_PHILIPS,
                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
diff -Nru a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c
--- a/drivers/media/video/saa7134/saa7134-i2c.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/saa7134/saa7134-i2c.c	Wed Jan  8 20:04:43 2003
@@ -318,6 +318,7 @@
 	return I2C_FUNC_SMBUS_EMUL;
 }
 
+
 static int attach_inform(struct i2c_client *client)
 {
         struct saa7134_dev *dev = client->adapter->algo_data;
diff -Nru a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
--- a/drivers/media/video/saa7134/saa7134-oss.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/saa7134/saa7134-oss.c	Wed Jan  8 20:04:44 2003
@@ -102,11 +102,13 @@
 	/* prepare buffer */
 	if (0 != (err = videobuf_dma_pci_map(dev->pci,&dev->oss.dma)))
 		return err;
+	if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->oss.pt)))
+		goto fail1;
 	if (0 != (err = saa7134_pgtable_build(dev->pci,&dev->oss.pt,
 					      dev->oss.dma.sglist,
 					      dev->oss.dma.sglen,
 					      0)))
-		goto fail1;
+		goto fail2;
 
 	/* sample format */
 	switch (dev->oss.afmt) {
diff -Nru a/drivers/media/video/saa7134/saa7134-ts.c b/drivers/media/video/saa7134/saa7134-ts.c
--- a/drivers/media/video/saa7134/saa7134-ts.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/media/video/saa7134/saa7134-ts.c	Wed Jan  8 20:04:32 2003
@@ -52,21 +52,24 @@
 			   struct saa7134_buf *buf,
 			   struct saa7134_buf *next)
 {
-	unsigned long control,status;
-
+	u32 control;
+	
 	dprintk("buffer_activate [%p]\n",buf);
 	buf->vb.state = STATE_ACTIVE;
 	
-	/* dma: setup channel 5 (= TS) */
-	control = SAA7134_RS_CONTROL_BURST_16 |
-		SAA7134_RS_CONTROL_ME |
-		(buf->pt->dma >> 12);
-
-	status = saa_readl(SAA7134_IRQ_STATUS);
-	if (0 == (status & 0x100000)) {
+        /* dma: setup channel 5 (= TS) */
+        control = SAA7134_RS_CONTROL_BURST_16 |
+                SAA7134_RS_CONTROL_ME |
+                (buf->pt->dma >> 12);
+
+	if (NULL == next)
+		next = buf;
+	if (V4L2_FIELD_TOP == buf->vb.field) {
+		dprintk("[top]     buf=%p next=%p",buf,next);
 		saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(buf));
 		saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(next));
 	} else {
+		dprintk("[bottom]  buf=%p next=%p",buf,next);
 		saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(next));
 		saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(buf));
 	}
@@ -80,7 +83,8 @@
 	return 0;
 }
 
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+			  enum v4l2_field field)
 {
 	struct saa7134_dev *dev = file->private_data;
 	struct saa7134_buf *buf = (struct saa7134_buf *)vb;
@@ -116,7 +120,7 @@
 	buf->vb.state = STATE_PREPARED;
 	buf->top_seen = 0;
 	buf->activate = buffer_activate;
-	buf->vb.field = V4L2_FIELD_SEQ_TB;
+	buf->vb.field = field;
 	return 0;
 
  oops:
@@ -408,11 +412,13 @@
 		tsbufs = VIDEO_MAX_FRAME;
 
 	INIT_LIST_HEAD(&dev->ts_q.queue);
+	init_timer(&dev->ts_q.timeout);
 	dev->ts_q.timeout.function = saa7134_buffer_timeout;
 	dev->ts_q.timeout.data     = (unsigned long)(&dev->ts_q);
 	dev->ts_q.dev              = dev;
 	videobuf_queue_init(&dev->ts.ts, &ts_qops, dev->pci, &dev->slock,
 			    V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			    V4L2_FIELD_ALTERNATE,
 			    sizeof(struct saa7134_buf));
 	saa7134_pgtable_alloc(dev->pci,&dev->ts.pt_ts);
 
@@ -437,11 +443,23 @@
 
 void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status)
 {
+	enum v4l2_field field;
+
 	spin_lock(&dev->slock);
 	if (dev->ts_q.curr) {
+		field = dev->video_q.curr->vb.field;
+		if (field == V4L2_FIELD_TOP) {
+			if ((status & 0x100000) != 0x100000)
+				goto done;
+		} else {
+			if ((status & 0x100000) != 0x000000)
+				goto done;
+		}
 		saa7134_buffer_finish(dev,&dev->ts_q,STATE_DONE);
 	}
 	saa7134_buffer_next(dev,&dev->ts_q);
+
+ done:
 	spin_unlock(&dev->slock);
 }
 
diff -Nru a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c
--- a/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed Jan  8 20:04:32 2003
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 #include <linux/smp_lock.h>
 #include <asm/div64.h>
 
@@ -119,6 +120,10 @@
 
 	/* init all audio registers */
 	saa_writeb(SAA7134_AUDIO_PLL_CTRL,   0x00);
+	if (need_resched())
+		schedule();
+	else
+		udelay(10);
 		
 	saa_writeb(SAA7134_AUDIO_CLOCK0,      clock        & 0xff);
 	saa_writeb(SAA7134_AUDIO_CLOCK1,     (clock >>  8) & 0xff);
@@ -357,6 +362,7 @@
 	return value;
 }
 
+#if 0
 static void sifdebug_dump_regs(struct saa7134_dev *dev)
 {
 	print_regb(AUDIO_STATUS);
@@ -372,6 +378,7 @@
 	print_regb(SIF_SAMPLE_FREQ);
 	print_regb(ANALOG_IO_SELECT);
 }
+#endif
 
 static int tvaudio_thread(void *data)
 {
@@ -440,9 +447,8 @@
 		}
 		if (0 == carrier) {
 			/* Oops: autoscan didn't work for some reason :-/ */
-			printk("%s/audio: oops: audio carrier scan failed\n",
-			       dev->name);
-			sifdebug_dump_regs(dev);
+			printk(KERN_WARNING "%s/audio: oops: audio carrier "
+			       "scan failed\n", dev->name);
 		} else {
 			dprintk("found %s main sound carrier @ %d.%03d MHz\n",
 				dev->tvnorm->name,
diff -Nru a/drivers/media/video/saa7134/saa7134-vbi.c b/drivers/media/video/saa7134/saa7134-vbi.c
--- a/drivers/media/video/saa7134/saa7134-vbi.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/media/video/saa7134/saa7134-vbi.c	Wed Jan  8 20:04:45 2003
@@ -114,7 +114,8 @@
 	return 0;
 }
 
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+			  enum v4l2_field field)
 {
 	struct saa7134_fh *fh   = file->private_data;
 	struct saa7134_dev *dev = fh->dev;
@@ -158,7 +159,7 @@
 	buf->vb.state = STATE_PREPARED;
 	buf->top_seen = 0;
 	buf->activate = buffer_activate;
-	buf->vb.field = V4L2_FIELD_SEQ_TB;
+	buf->vb.field = field;
 	return 0;
 
  oops:
@@ -218,6 +219,7 @@
 int saa7134_vbi_init(struct saa7134_dev *dev)
 {
 	INIT_LIST_HEAD(&dev->vbi_q.queue);
+	init_timer(&dev->vbi_q.timeout);
 	dev->vbi_q.timeout.function = saa7134_buffer_timeout;
 	dev->vbi_q.timeout.data     = (unsigned long)(&dev->vbi_q);
 	dev->vbi_q.dev              = dev;
diff -Nru a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
--- a/drivers/media/video/saa7134/saa7134-video.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/saa7134/saa7134-video.c	Wed Jan  8 20:04:43 2003
@@ -133,10 +133,9 @@
 };
 #define FORMATS (sizeof(formats)/sizeof(struct saa7134_format))
 
-
 static struct saa7134_tvnorm tvnorms[] = {
 	{
-		.name          = "PAL-BGHI",
+		.name          = "PAL",
 		.id            = V4L2_STD_PAL,
 		.width         = 720,
 		.height        = 576,
@@ -154,7 +153,7 @@
 		.vbi_v_start   = 7-3,  /* FIXME */
 		.vbi_v_stop    = 22-3,
 	},{
-		.name          = "NTSC-M",
+		.name          = "NTSC",
 		.id            = V4L2_STD_NTSC,
 		.width         = 720,
 		.height        = 480,
@@ -189,9 +188,10 @@
 		.video_v_stop  = 311,
 		.vbi_v_start   = 7,
 		.vbi_v_stop    = 22,
+#if 0
 	},{
 		.name          = "AUTO",
-		.id            = -1,
+		.id            = V4L2_STD_PAL|V4L2_STD_NTSC|V4L2_STD_SECAM,
 		.width         = 768,
 		.height        = 576,
 
@@ -207,6 +207,7 @@
 		.video_v_stop  = 311,
 		.vbi_v_start   = 7,
 		.vbi_v_stop    = 22,
+#endif
 	}
 };
 #define TVNORMS (sizeof(tvnorms)/sizeof(struct saa7134_tvnorm))
@@ -825,7 +826,8 @@
 	return 0;
 }
 
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
+			  enum v4l2_field field)
 {
 	struct saa7134_fh *fh = file->private_data;
 	struct saa7134_dev *dev = fh->dev;
@@ -845,12 +847,12 @@
 		return -EINVAL;
 
 	dprintk("buffer_prepare [size=%dx%d,bytes=%d,fields=%s,%s]\n",
-		fh->width,fh->height,size,v4l2_field_names[fh->field],
+		fh->width,fh->height,size,v4l2_field_names[field],
 		fh->fmt->name);
 	if (buf->vb.width  != fh->width  ||
 	    buf->vb.height != fh->height ||
 	    buf->vb.size   != size       ||
-	    buf->vb.field  != fh->field  ||
+	    buf->vb.field  != field      ||
 	    buf->fmt       != fh->fmt) {
 		saa7134_dma_free(dev,buf);
 	}
@@ -859,8 +861,8 @@
 		buf->vb.width  = fh->width;
 		buf->vb.height = fh->height;
 		buf->vb.size   = size;
+		buf->vb.field  = field;
 		buf->fmt       = fh->fmt;
-		buf->vb.field  = fh->field;
 		buf->pt        = &fh->pt_cap;
 
 		err = videobuf_iolock(dev->pci,&buf->vb);
@@ -1125,6 +1127,7 @@
 	videobuf_queue_init(&fh->cap, &video_qops,
 			    dev->pci, &dev->slock,
 			    V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			    V4L2_FIELD_INTERLACED,
 			    sizeof(struct saa7134_buf));
 	init_MUTEX(&fh->cap.lock);
 	saa7134_pgtable_alloc(dev->pci,&fh->pt_cap);
@@ -1132,6 +1135,7 @@
 	videobuf_queue_init(&fh->vbi, &saa7134_vbi_qops,
 			    dev->pci, &dev->slock,
 			    V4L2_BUF_TYPE_VBI_CAPTURE,
+			    V4L2_FIELD_SEQ_TB,
 			    sizeof(struct saa7134_buf));
         init_MUTEX(&fh->vbi.lock);
 	saa7134_pgtable_alloc(dev->pci,&fh->pt_vbi);
@@ -1155,9 +1159,13 @@
 
 	switch (fh->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+		if (res_locked(fh->dev,RESOURCE_VIDEO))
+			return -EBUSY;
 		return videobuf_read_one(file, saa7134_queue(fh),
 					 data, count, ppos);
 	case V4L2_BUF_TYPE_VBI_CAPTURE:
+		if (!res_get(fh->dev,fh,RESOURCE_VBI))
+			return -EBUSY;
 		return videobuf_read_stream(file, saa7134_queue(fh),
 					    data, count, ppos, 1);
 		break;
@@ -1187,7 +1195,7 @@
                                 up(&fh->cap.lock);
                                 return POLLERR;
                         }
-                        if (0 != fh->cap.ops->buf_prepare(file,fh->cap.read_buf)) {
+                        if (0 != fh->cap.ops->buf_prepare(file,fh->cap.read_buf,fh->cap.field)) {
                                 up(&fh->cap.lock);
                                 return POLLERR;
                         }
@@ -1214,12 +1222,15 @@
 	struct saa7134_dev *dev = fh->dev;
 	unsigned long flags;
 
+	/* turn off overlay */
 	if (res_check(fh, RESOURCE_OVERLAY)) {
 		spin_lock_irqsave(&dev->slock,flags);
 		stop_preview(dev,fh);
 		spin_unlock_irqrestore(&dev->slock,flags);
 		res_free(dev,fh,RESOURCE_OVERLAY);
 	}
+
+	/* stop video capture */
 	if (res_check(fh, RESOURCE_VIDEO)) {
 		videobuf_queue_cancel(file,&fh->cap);
 		res_free(dev,fh,RESOURCE_VIDEO);
@@ -1228,10 +1239,15 @@
 		buffer_release(file,fh->cap.read_buf);
 		kfree(fh->cap.read_buf);
 	}
-	if (fh->vbi.streaming)
-		videobuf_streamoff(file,&fh->vbi);
-	if (fh->vbi.reading)
-		videobuf_read_stop(file,&fh->vbi);
+
+	/* stop vbi capture */
+	if (res_check(fh, RESOURCE_VBI)) {
+		if (fh->vbi.streaming)
+			videobuf_streamoff(file,&fh->vbi);
+		if (fh->vbi.reading)
+			videobuf_read_stop(file,&fh->vbi);
+		res_free(dev,fh,RESOURCE_VBI);
+	}
 
 	saa7134_pgtable_free(dev->pci,&fh->pt_cap);
 	saa7134_pgtable_free(dev->pci,&fh->pt_vbi);
@@ -1259,6 +1275,7 @@
 		memset(&f->fmt.pix,0,sizeof(f->fmt.pix));
 		f->fmt.pix.width        = fh->width;
 		f->fmt.pix.height       = fh->height;
+		f->fmt.pix.field        = fh->cap.field;
 		f->fmt.pix.pixelformat  = fh->fmt->fourcc;
 		f->fmt.pix.sizeimage    =
 			(fh->width*fh->height*fh->fmt->depth)/8;
@@ -1354,10 +1371,10 @@
 		if (0 != err)
 			return err;
 			
-		fh->fmt    = format_by_fourcc(f->fmt.pix.pixelformat);
-		fh->width  = f->fmt.pix.width;
-		fh->height = f->fmt.pix.height;
-		fh->field  = f->fmt.pix.field;
+		fh->fmt       = format_by_fourcc(f->fmt.pix.pixelformat);
+		fh->width     = f->fmt.pix.width;
+		fh->height    = f->fmt.pix.height;
+		fh->cap.field = f->fmt.pix.field;
 		return 0;
 	case V4L2_BUF_TYPE_VIDEO_OVERLAY:
 		err = verify_preview(dev,&f->fmt.win);
@@ -1429,11 +1446,14 @@
 	case VIDIOC_ENUMSTD:
 	{
 		struct v4l2_standard *e = arg;
+		int i;
 
-		if (e->index < 0 || e->index >= TVNORMS)
+		i = e->index;
+		if (i < 0 || i >= TVNORMS)
 			return -EINVAL;
 		err = v4l2_video_std_construct(e, tvnorms[e->index].id,
 					       tvnorms[e->index].name);
+		e->index = i;
 		if (err < 0)
 			return err;
 		return 0;
@@ -1473,15 +1493,33 @@
 	case VIDIOC_ENUMINPUT:
 	{
 		struct v4l2_input *i = arg;
-		
-		if (i->index >= SAA7134_INPUT_MAX)
+		int n;
+
+		n = i->index;
+		if (n >= SAA7134_INPUT_MAX)
 			return -EINVAL;
 		if (NULL == card_in(dev,i->index).name)
 			return -EINVAL;
-		i->type = V4L2_INPUT_TYPE_CAMERA;
-		strcpy(i->name,card_in(dev,i->index).name);
-		if (card_in(dev,i->index).tv)
+		memset(i,0,sizeof(*i));
+		i->index = n;
+		i->type  = V4L2_INPUT_TYPE_CAMERA;
+		strcpy(i->name,card_in(dev,n).name);
+		if (card_in(dev,n).tv)
 			i->type = V4L2_INPUT_TYPE_TUNER;
+		i->audioset = 1;
+		if (n == dev->ctl_input) {
+			int v1 = saa_readb(SAA7134_STATUS_VIDEO1);
+			int v2 = saa_readb(SAA7134_STATUS_VIDEO2);
+
+			if (0 != (v1 & 0x40))
+				i->status |= V4L2_IN_ST_NO_H_LOCK;
+			if (0 != (v2 & 0x40))
+				i->status |= V4L2_IN_ST_NO_SYNC;
+			if (0 != (v2 & 0x0e))
+				i->status |= V4L2_IN_ST_MACROVISION;
+		}
+		for (n = 0; n < TVNORMS; n++)
+			i->std |= tvnorms[n].id;
 		return 0;
 	}
 	case VIDIOC_G_INPUT:
@@ -1510,6 +1548,8 @@
 		struct v4l2_tuner *t = arg;
 		int n;
 
+		if (0 != t->index)
+			return -EINVAL;
 		memset(t,0,sizeof(*t));
 		for (n = 0; n < SAA7134_INPUT_MAX; n++)
 			if (card_in(dev,n).tv)
@@ -1521,12 +1561,12 @@
 				V4L2_TUNER_CAP_LANG1 |
 				V4L2_TUNER_CAP_LANG2;
 			t->rangehigh = 0xffffffffUL;
-			if (dev->tvaudio) {
+			t->rxsubchans = -1;
+			if (dev->tvaudio)
 				t->rxsubchans = saa7134_tvaudio_getstereo
 					(dev,dev->tvaudio);
-			} else {
+			if (-1 == t->rxsubchans)
 				t->rxsubchans = V4L2_TUNER_SUB_MONO;
-			}
 #if 1
 			/* fill audmode -- FIXME: allow manual switching */
 			t->audmode = V4L2_TUNER_MODE_MONO;
@@ -1618,12 +1658,14 @@
 	case VIDIOC_ENUM_FMT:
 	{
 		struct v4l2_fmtdesc *f = arg;
+		enum v4l2_buf_type type;
 		int index;
 
-		switch (f->type) {
+		index = f->index;
+		type  = f->type;
+		switch (type) {
 		case V4L2_BUF_TYPE_VIDEO_CAPTURE:
 		case V4L2_BUF_TYPE_VIDEO_OVERLAY:
-			index = f->index;
 			if (index < 0 || index >= FORMATS)
 				return -EINVAL;
 			if (f->type == V4L2_BUF_TYPE_VIDEO_OVERLAY &&
@@ -1631,9 +1673,19 @@
 				return -EINVAL;
 			memset(f,0,sizeof(*f));
 			f->index = index;
+			f->type  = type;
 			strncpy(f->description,formats[index].name,31);
 			f->pixelformat = formats[index].fourcc;
 			break;
+		case V4L2_BUF_TYPE_VBI_CAPTURE:
+			if (0 != index)
+				return -EINVAL;
+			memset(f,0,sizeof(*f));
+			f->index = index;
+			f->type  = type;
+			f->pixelformat = V4L2_PIX_FMT_GREY;
+			strcpy(f->description,"vbi data");
+			break;
 		default:
 			return -EINVAL;	
 		}
@@ -1898,8 +1950,8 @@
 struct video_device saa7134_video_template =
 {
 	.name          = "saa7134-video",
-	type:          VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
-	               VID_TYPE_CLIPPING|VID_TYPE_SCALES,
+	.type          = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
+	                 VID_TYPE_CLIPPING|VID_TYPE_SCALES,
 	.hardware      = 0,
 	.fops          = &video_fops,
 	.minor         = -1,
@@ -1944,6 +1996,7 @@
 	dev->automute       = 0;
 
         INIT_LIST_HEAD(&dev->video_q.queue);
+	init_timer(&dev->video_q.timeout);
 	dev->video_q.timeout.function = saa7134_buffer_timeout;
 	dev->video_q.timeout.data     = (unsigned long)(&dev->video_q);
 	dev->video_q.dev              = dev;
@@ -1984,7 +2037,7 @@
 	int norm;
 
 	norm = saa_readb(SAA7134_STATUS_VIDEO1) & 0x03;
-	printk("%s/video: DCSDT: %s\n",dev->name,st[norm]);
+	dprintk("DCSDT: %s\n",st[norm]);
 	
 	if (0 != norm) {
 		/* wake up tvaudio audio carrier scan thread */
diff -Nru a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
--- a/drivers/media/video/saa7134/saa7134.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/saa7134/saa7134.h	Wed Jan  8 20:04:44 2003
@@ -117,6 +117,9 @@
 #define SAA7134_BOARD_TVSTATION_RDS     7
 #define SAA7134_BOARD_CINERGY400	8
 #define SAA7134_BOARD_MD5044		9
+#define SAA7134_BOARD_KWORLD           10
+#define SAA7134_BOARD_CINERGY600       11
+#define SAA7134_BOARD_MD7134           12
 
 #define SAA7134_INPUT_MAX 8
 
@@ -159,7 +162,7 @@
 
 #define RESOURCE_OVERLAY       1
 #define RESOURCE_VIDEO         2
-#define RESOURCE_VBI           3
+#define RESOURCE_VBI           4
 
 #define INTERLACE_AUTO         0
 #define INTERLACE_ON           1
@@ -224,7 +227,6 @@
 	/* video capture */
 	struct saa7134_format      *fmt;
 	int                        width,height;
-	enum v4l2_field            field;
 	struct videobuf_queue      cap;
 	struct saa7134_pgtable     pt_cap;
 
diff -Nru a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c
--- a/drivers/media/video/tda7432.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/tda7432.c	Wed Jan  8 20:04:44 2003
@@ -18,8 +18,12 @@
  *
  * loudness - set between 0 and 15 for varying degrees of loudness effect
  *
+ * maxvol   - set maximium volume to +20db (1), default is 0db(0)
  *
  *
+ *  Revision: 0.7 - maxvol module parm to set maximium volume 0db or +20db
+ *  				store if muted so we can return it
+ *  				change balance only if flaged to
  *  Revision: 0.6 - added tone controls
  *  Revision: 0.5 - Fixed odd balance problem
  *  Revision: 0.4 - added muting
@@ -48,12 +52,19 @@
 #include "audiochip.h"
 #include "id.h"
 
+#ifndef VIDEO_AUDIO_BALANCE
+# define VIDEO_AUDIO_BALANCE 32
+#endif
+
 MODULE_AUTHOR("Eric Sandeen <eric_sandeen@bigfoot.com>");
 MODULE_DESCRIPTION("bttv driver for the tda7432 audio processor chip");
 MODULE_LICENSE("GPL");
 
 MODULE_PARM(debug,"i");
 MODULE_PARM(loudness,"i");
+MODULE_PARM_DESC(maxvol,"Set maximium volume to +20db (0), default is 0db(1)");
+MODULE_PARM(maxvol,"i");
+static int maxvol = 0;
 static int loudness = 0; /* disable loudness by default */
 static int debug = 0;	 /* insmod parameter */
 
@@ -61,19 +72,10 @@
 /* Address to scan (I2C address of this chip) */
 static unsigned short normal_i2c[] = {
 	I2C_TDA7432 >> 1,
-	I2C_CLIENT_END};
-static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
+	I2C_CLIENT_END,
 };
+static unsigned short normal_i2c_range[] = { I2C_CLIENT_END, I2C_CLIENT_END };
+I2C_CLIENT_INSMOD;
 
 /* Structure of address and subaddresses for the tda7432 */
 
@@ -81,12 +83,12 @@
 	int addr;
 	int input;
 	int volume;
+	int muted;
 	int bass, treble;
 	int lf, lr, rf, rr;
 	int loud;
 	struct i2c_client c;
 };
-
 static struct i2c_driver driver;
 static struct i2c_client client_template;
 
@@ -291,9 +293,10 @@
 	t->input  = TDA7432_STEREO_IN |  /* Main (stereo) input   */
 		    TDA7432_BASS_SYM  |  /* Symmetric bass cut    */
 		    TDA7432_BASS_NORM;   /* Normal bass range     */ 
-	t->volume = TDA7432_VOL_0DB;	 /* 0dB Volume            */
+	t->volume =  0x3b ;				 /* -27dB Volume            */
 	if (loudness)			 /* Turn loudness on?     */
 		t->volume |= TDA7432_LD_ON;	
+	t->muted    = VIDEO_AUDIO_MUTE;
 	t->treble   = TDA7432_TREBLE_0DB; /* 0dB Treble            */
 	t->bass		= TDA7432_BASS_0DB; 	 /* 0dB Bass              */
 	t->lf     = TDA7432_ATTEN_0DB;	 /* 0dB attenuation       */
@@ -374,17 +377,24 @@
 
 		va->flags |= VIDEO_AUDIO_VOLUME |
 			VIDEO_AUDIO_BASS |
-			VIDEO_AUDIO_TREBLE;
+			VIDEO_AUDIO_TREBLE |
+			VIDEO_AUDIO_MUTABLE;
+		if (t->muted)
+			va->flags |= VIDEO_AUDIO_MUTE;
 		va->mode |= VIDEO_SOUND_STEREO;
 		/* Master volume control
 		 * V4L volume is min 0, max 65535
 		 * TDA7432 Volume: 
 		 * Min (-79dB) is 0x6f
-		 * Max (+20dB) is 0x07
+		 * Max (+20dB) is 0x07 (630)
+		 * Max (0dB) is 0x20 (829)
 		 * (Mask out bit 7 of vol - it's for the loudness setting)
 		 */
-
-		va->volume = ( 0x6f - (t->volume & 0x7F) ) * 630;
+		if (!maxvol){  /* max +20db */
+			va->volume = ( 0x6f - (t->volume & 0x7F) ) * 630;
+		} else {       /* max 0db   */
+			va->volume = ( 0x6f - (t->volume & 0x7F) ) * 829;
+		}
 		
 		/* Balance depends on L,R attenuation
 		 * V4L balance is 0 to 65535, middle is 32768
@@ -401,15 +411,15 @@
 			/* left is attenuated, balance shifted right */
 			va->balance = (32768 + 1057*(t->lf));
 		
-		/* Bass/treble */	
+		/* Bass/treble 4 bits each */	
 		va->bass=t->bass;
 		if(va->bass >= 0x8)
-				va->bass = ~(va->bass - 0x8) & 0xf;
-		va->bass = va->bass << 12;
+			va->bass = ~(va->bass - 0x8) & 0xf;
+		va->bass = (va->bass << 12)+(va->bass << 8)+(va->bass << 4)+(va->bass);
 		va->treble=t->treble;
 		if(va->treble >= 0x8)
-				va->treble = ~(va->treble - 0x8) & 0xf;
-		va->treble = va->treble << 12;
+			va->treble = ~(va->treble - 0x8) & 0xf;
+		va->treble = (va->treble << 12)+(va->treble << 8)+(va->treble << 4)+(va->treble);
 								
 		break; /* VIDIOCGAUDIO case */
 	}
@@ -420,26 +430,35 @@
 		struct video_audio *va = arg;
 		dprintk("tda7432: VIDEOCSAUDIO\n");
 
-		t->volume = 0x6f - ( (va->volume)/630 );
+		if(va->flags & VIDEO_AUDIO_VOLUME){
+			if(!maxvol){ /* max +20db */
+				t->volume = 0x6f - ((va->volume)/630);
+			} else {    /* max 0db   */
+				t->volume = 0x6f - ((va->volume)/829);
+			}
 		
 		if (loudness)		/* Turn on the loudness bit */
 			t->volume |= TDA7432_LD_ON;
 		
+			tda7432_write(client,TDA7432_VL, t->volume);
+		}
+		
 		if(va->flags & VIDEO_AUDIO_BASS)
 		{
 			t->bass = va->bass >> 12;
 			if(t->bass>= 0x8)
 					t->bass = (~t->bass & 0xf) + 0x8 ;
-			t->bass = t->bass | 0x10;
 		}
 		if(va->flags & VIDEO_AUDIO_TREBLE)
 		{
 			t->treble= va->treble >> 12;
 			if(t->treble>= 0x8)
 					t->treble = (~t->treble & 0xf) + 0x8 ;
-						
 		}
+		if(va->flags & (VIDEO_AUDIO_TREBLE| VIDEO_AUDIO_BASS))
+			tda7432_write(client,TDA7432_TN, 0x10 | (t->bass << 4) | t->treble );
 		
+		if(va->flags & VIDEO_AUDIO_BALANCE)	{
 		if (va->balance < 32768) 
 		{
 			/* shifted to left, attenuate right */
@@ -464,20 +483,17 @@
 			t->lf = TDA7432_ATTEN_0DB;
 			t->lr = TDA7432_ATTEN_0DB;
 		}
+		}
 					
-		tda7432_write(client,TDA7432_TN, (t->bass << 4)| t->treble );		
-		tda7432_write(client,TDA7432_VL, t->volume);
-		
-		if (va->flags & VIDEO_AUDIO_MUTE)
+	 	t->muted=(va->flags & VIDEO_AUDIO_MUTE);	
+		if (t->muted)
 		{
 			/* Mute & update balance*/	
 			tda7432_write(client,TDA7432_LF, t->lf | TDA7432_MUTE);
 			tda7432_write(client,TDA7432_LR, t->lr | TDA7432_MUTE);
 			tda7432_write(client,TDA7432_RF, t->rf | TDA7432_MUTE);
 			tda7432_write(client,TDA7432_RR, t->rr | TDA7432_MUTE);
-		}
-		else
-		{	
+		} else {
 			tda7432_write(client,TDA7432_LF, t->lf);
 			tda7432_write(client,TDA7432_LR, t->lr);
 			tda7432_write(client,TDA7432_RF, t->rf);
@@ -498,35 +514,29 @@
 	return 0;
 }
 
-
 static struct i2c_driver driver = {
-        "i2c tda7432 driver",
-	I2C_DRIVERID_TDA7432,
-        I2C_DF_NOTIFY,
-	tda7432_probe,
-        tda7432_detach,
-        tda7432_command,
+	.owner           = THIS_MODULE,
+        .name            = "i2c tda7432 driver",
+	.id              = I2C_DRIVERID_TDA7432,
+        .flags           = I2C_DF_NOTIFY,
+	.attach_adapter  = tda7432_probe,
+        .detach_client   = tda7432_detach,
+        .command         = tda7432_command,
 };
 
 static struct i2c_client client_template =
 {
-        "(unset)",		/* name */
-        -1,
-        0,
-        0,
-        NULL,
-        &driver
+        .name   = "tda7432",
+        .id     = -1,
+	.driver = &driver, 
 };
 
 static int tda7432_init(void)
 {
-
-	if ( (loudness < 0) || (loudness > 15) )
-	{
+	if ( (loudness < 0) || (loudness > 15) ) {
 		printk(KERN_ERR "tda7432: loudness parameter must be between 0 and 15\n");
 		return -EINVAL;
 	}
-
 	i2c_add_driver(&driver);
 	return 0;
 }
diff -Nru a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c
--- a/drivers/media/video/tda9875.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/tda9875.c	Wed Jan  8 20:04:43 2003
@@ -42,19 +42,10 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] =  {
     I2C_TDA9875 >> 1,
-    I2C_CLIENT_END};
-static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
+    I2C_CLIENT_END
 };
+static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
+I2C_CLIENT_INSMOD;
 
 /* This is a superset of the TDA9875 */
 struct tda9875 {
@@ -64,7 +55,6 @@
 	struct i2c_client c;
 };
 
-
 static struct i2c_driver driver;
 static struct i2c_client client_template;
 
@@ -397,22 +387,20 @@
 
 
 static struct i2c_driver driver = {
-        "i2c tda9875 driver",
-        I2C_DRIVERID_TDA9875, /* Get new one for TDA9875 */
-        I2C_DF_NOTIFY,
-	tda9875_probe,
-        tda9875_detach,
-        tda9875_command,
+	.owner          = THIS_MODULE,
+        .name           = "i2c tda9875 driver",
+        .id             = I2C_DRIVERID_TDA9875,
+        .flags          = I2C_DF_NOTIFY,
+	.attach_adapter = tda9875_probe,
+        .detach_client  = tda9875_detach,
+        .command        = tda9875_command,
 };
 
 static struct i2c_client client_template =
 {
-        "(unset)",		/* name */
-        -1,
-        0,
-        0,
-        NULL,
-        &driver
+        .name    = "tda9875",
+        .id      = -1,
+        .driver  = &driver,
 };
 
 static int tda9875_init(void)
diff -Nru a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/video/tda9887.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,484 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/i2c.h>
+#include <linux/types.h>
+#include <linux/videodev.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include "id.h"
+#include "audiochip.h"
+
+/* Chips:
+   TDA9885 (PAL, NTSC)
+   TDA9886 (PAL, SECAM, NTSC)
+   TDA9887 (PAL, SECAM, NTSC, FM Radio)
+
+   found on:
+   - Pinnacle PCTV (Jul.2002 Version with MT2032, bttv)
+      TDA9887 (world), TDA9885 (USA)
+      Note: OP2 of tda988x must be set to 1, else MT2032 is disabled!
+   - KNC One TV-Station RDS (saa7134)
+*/
+    
+
+/* Addresses to scan */
+static unsigned short normal_i2c[] = {I2C_CLIENT_END};
+static unsigned short normal_i2c_range[] = {0x86>>1,0x86>>1,I2C_CLIENT_END};
+I2C_CLIENT_INSMOD;
+
+/* insmod options */
+static int debug =  0;
+static char *pal =  "b";
+static char *secam =  "l";
+MODULE_PARM(debug,"i");
+MODULE_PARM(pal,"s");
+MODULE_PARM(secam,"s");
+MODULE_LICENSE("GPL");
+
+/* ---------------------------------------------------------------------- */
+
+#define dprintk     if (debug) printk
+
+struct tda9887 {
+	struct i2c_client client;
+	int radio,tvnorm;
+	int pinnacle_id;
+};
+
+static struct i2c_driver driver;
+static struct i2c_client client_template;
+
+/* ---------------------------------------------------------------------- */
+
+//
+// TDA defines
+//
+
+//// first reg
+#define cVideoTrapBypassOFF     0x00    // bit b0
+#define cVideoTrapBypassON      0x01    // bit b0
+
+#define cAutoMuteFmInactive     0x00    // bit b1
+#define cAutoMuteFmActive       0x02    // bit b1
+
+#define cIntercarrier           0x00    // bit b2
+#define cQSS                    0x04    // bit b2
+
+#define cPositiveAmTV           0x00    // bit b3:4
+#define cFmRadio                0x08    // bit b3:4
+#define cNegativeFmTV           0x10    // bit b3:4
+
+
+#define cForcedMuteAudioON      0x20    // bit b5
+#define cForcedMuteAudioOFF     0x00    // bit b5
+
+#define cOutputPort1Active      0x00    // bit b6
+#define cOutputPort1Inactive    0x40    // bit b6
+
+#define cOutputPort2Active      0x00    // bit b7
+#define cOutputPort2Inactive    0x80    // bit b7
+
+
+//// second reg
+#define cDeemphasisOFF          0x00    // bit c5
+#define cDeemphasisON           0x20    // bit c5
+
+#define cDeemphasis75           0x00    // bit c6
+#define cDeemphasis50           0x40    // bit c6
+
+#define cAudioGain0             0x00    // bit c7
+#define cAudioGain6             0x80    // bit c7
+
+
+//// third reg
+#define cAudioIF_4_5             0x00    // bit e0:1
+#define cAudioIF_5_5             0x01    // bit e0:1
+#define cAudioIF_6_0             0x02    // bit e0:1
+#define cAudioIF_6_5             0x03    // bit e0:1
+
+
+#define cVideoIF_58_75           0x00    // bit e2:4
+#define cVideoIF_45_75           0x04    // bit e2:4
+#define cVideoIF_38_90           0x08    // bit e2:4
+#define cVideoIF_38_00           0x0C    // bit e2:4
+#define cVideoIF_33_90           0x10    // bit e2:4
+#define cVideoIF_33_40           0x14    // bit e2:4
+#define cRadioIF_45_75           0x18    // bit e2:4
+#define cRadioIF_38_90           0x1C    // bit e2:4
+
+
+#define cTunerGainNormal         0x00    // bit e5
+#define cTunerGainLow            0x20    // bit e5
+
+#define cGating_18               0x00    // bit e6
+#define cGating_36               0x40    // bit e6
+
+#define cAgcOutON                0x80    // bit e7
+#define cAgcOutOFF               0x00    // bit e7
+
+static int tda9887_miro(struct tda9887 *t)
+{
+	int rc;
+	u8   bData[4]     = { 0 };
+	u8   bVideoIF     = 0;
+	u8   bAudioIF     = 0;
+	u8   bDeEmphasis  = 0;
+	u8   bDeEmphVal   = 0;
+	u8   bModulation  = 0;
+	u8   bCarrierMode = 0;
+	u8   bOutPort1    = cOutputPort1Inactive;
+#if 0
+	u8   bOutPort2    = cOutputPort2Inactive & mbTADState; // store i2c tuner state
+#else
+	u8   bOutPort2    = cOutputPort2Inactive;
+#endif
+	u8   bVideoTrap   = cVideoTrapBypassOFF;
+#if 1
+	u8   bTopAdjust   = 0x0e /* -2dB */;
+#else
+	u8   bTopAdjust   = 0;
+#endif
+
+#if 0
+	if (mParams.fVideoTrap)
+		bVideoTrap   = cVideoTrapBypassON;
+#endif
+
+	if (t->radio) {
+		bVideoTrap   = cVideoTrapBypassOFF;
+		bCarrierMode = cQSS;
+		bModulation  = cFmRadio;
+		bOutPort1    = cOutputPort1Inactive;
+		bDeEmphasis  = cDeemphasisON;
+		if (3 == t->pinnacle_id) {
+			/* ntsc */
+			bDeEmphVal   = cDeemphasis75;
+			bAudioIF     = cAudioIF_4_5;
+			bVideoIF     = cRadioIF_45_75;
+		} else {
+			/* pal */
+			bAudioIF     = cAudioIF_5_5;
+			bVideoIF     = cRadioIF_38_90;
+			bDeEmphVal   = cDeemphasis50;
+		}
+
+	} else if (t->tvnorm == VIDEO_MODE_PAL) {
+		bDeEmphasis  = cDeemphasisON;
+		bDeEmphVal   = cDeemphasis50;
+		bModulation  = cNegativeFmTV;
+		bOutPort1    = cOutputPort1Inactive;
+		if (1 == t->pinnacle_id) {
+			bCarrierMode = cIntercarrier;
+		} else {
+			// stereo boards
+			bCarrierMode = cQSS;
+		}
+		switch (pal[0]) {
+		case 'b':
+		case 'g':
+		case 'h':
+			bVideoIF     = cVideoIF_38_90;
+			bAudioIF     = cAudioIF_5_5;
+			break;
+		case 'd':
+			bVideoIF     = cVideoIF_38_00;
+			bAudioIF     = cAudioIF_6_5;
+			break;
+		case 'i':
+			bVideoIF     = cVideoIF_38_90;
+			bAudioIF     = cAudioIF_6_0;
+			break;
+		case 'm':
+		case 'n':
+			bVideoIF     = cVideoIF_45_75;
+			bAudioIF     = cAudioIF_4_5;
+			bDeEmphVal   = cDeemphasis75;
+			if ((5 == t->pinnacle_id) || (6 == t->pinnacle_id)) {
+				bCarrierMode = cIntercarrier;
+			} else {
+				bCarrierMode = cQSS;
+			}
+			break;
+		}
+
+	} else if (t->tvnorm == VIDEO_MODE_SECAM) {
+		bAudioIF     = cAudioIF_6_5;
+		bDeEmphasis  = cDeemphasisON;
+		bDeEmphVal   = cDeemphasis50;
+		bModulation  = cNegativeFmTV;
+		bCarrierMode = cQSS;
+		bOutPort1    = cOutputPort1Inactive;                
+		switch (secam[0]) {
+		case 'd':
+			bVideoIF     = cVideoIF_38_00;
+			break;
+		case 'k':
+			bVideoIF     = cVideoIF_38_90;
+			break;
+		case 'l':
+			bVideoIF     = cVideoIF_38_90;
+			bDeEmphasis  = cDeemphasisOFF;
+			bDeEmphVal   = cDeemphasis75;
+			bModulation  = cPositiveAmTV;
+			break;
+		case 'L' /* L1 */:
+			bVideoIF     = cVideoIF_33_90;
+			bDeEmphasis  = cDeemphasisOFF;
+			bDeEmphVal   = cDeemphasis75;
+			bModulation  = cPositiveAmTV;
+			break;
+		}
+
+	} else if (t->tvnorm == VIDEO_MODE_NTSC) {
+                bVideoIF     = cVideoIF_45_75;
+                bAudioIF     = cAudioIF_4_5;
+                bDeEmphasis  = cDeemphasisON;
+                bDeEmphVal   = cDeemphasis75;
+                bModulation  = cNegativeFmTV;                
+                bOutPort1    = cOutputPort1Inactive;
+                if ((5 == t->pinnacle_id) || (6 == t->pinnacle_id)) {
+			bCarrierMode = cIntercarrier;
+		} else {
+			bCarrierMode = cQSS;
+                }
+	}
+
+	bData[1] = bVideoTrap        |  // B0: video trap bypass
+		cAutoMuteFmInactive  |  // B1: auto mute
+		bCarrierMode         |  // B2: InterCarrier for PAL else QSS 
+		bModulation          |  // B3 - B4: positive AM TV for SECAM only
+		cForcedMuteAudioOFF  |  // B5: forced Audio Mute (off)
+		bOutPort1            |  // B6: Out Port 1 
+		bOutPort2;              // B7: Out Port 2 
+	bData[2] = bTopAdjust |   // C0 - C4: Top Adjust 0 == -16dB  31 == 15dB
+		bDeEmphasis   |   // C5: De-emphasis on/off
+		bDeEmphVal    |   // C6: De-emphasis 50/75 microsec
+		cAudioGain0;      // C7: normal audio gain
+	bData[3] = bAudioIF      |  // E0 - E1: Sound IF
+		bVideoIF         |  // E2 - E4: Video IF
+		cTunerGainNormal |  // E5: Tuner gain (normal)
+		cGating_18       |  // E6: Gating (18%)
+		cAgcOutOFF;         // E7: VAGC  (off)
+	
+	dprintk("tda9885/6/7: 0x%02x 0x%02x 0x%02x [pinnacle_id=%d]\n",
+		bData[1],bData[2],bData[3],t->pinnacle_id);
+	if (4 != (rc = i2c_master_send(&t->client,bData,4)))
+		printk("tda9885/6/7: i2c i/o error: rc == %d (should be 4)\n",rc);
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+#if 0
+/* just for reference: old knc-one saa7134 stuff */
+static unsigned char buf_pal_bg[]    = { 0x00, 0x16, 0x70, 0x49 };
+static unsigned char buf_pal_i[]     = { 0x00, 0x16, 0x70, 0x4a };
+static unsigned char buf_pal_dk[]    = { 0x00, 0x16, 0x70, 0x4b };
+static unsigned char buf_pal_l[]     = { 0x00, 0x06, 0x50, 0x4b };
+static unsigned char buf_fm_stereo[] = { 0x00, 0x0e, 0x0d, 0x77 };
+#endif
+
+static unsigned char buf_pal_bg[]    = { 0x00, 0x96, 0x70, 0x49 };
+static unsigned char buf_pal_i[]     = { 0x00, 0x96, 0x70, 0x4a };
+static unsigned char buf_pal_dk[]    = { 0x00, 0x96, 0x70, 0x4b };
+static unsigned char buf_pal_l[]     = { 0x00, 0x86, 0x50, 0x4b };
+static unsigned char buf_fm_stereo[] = { 0x00, 0x8e, 0x0d, 0x77 };
+static unsigned char buf_ntsc[]	     = { 0x00, 0x96, 0x70, 0x44 };
+static unsigned char buf_ntsc_jp[]   = { 0x00, 0x96, 0x70, 0x40 };
+
+static int tda9887_configure(struct tda9887 *t)
+{
+	unsigned char *buf = NULL;
+	int rc;
+
+	printk("tda9887_configure\n");
+
+	if (t->radio) {
+		dprintk("tda9885/6/7: FM Radio mode\n");
+		buf = buf_fm_stereo;
+
+	} else if (t->tvnorm == VIDEO_MODE_PAL) {
+		dprintk("tda9885/6/7: PAL-%c mode\n",pal[0]);
+		switch (pal[0]) {
+		case 'b':
+		case 'g':
+			buf = buf_pal_bg;
+			break;
+		case 'i':
+			buf = buf_pal_i;
+			break;
+		case 'd':
+		case 'k':
+			buf = buf_pal_dk;
+			break;
+		case 'l':
+			buf = buf_pal_l;
+			break;
+		}
+
+	} else if (t->tvnorm == VIDEO_MODE_NTSC) {
+		dprintk("tda9885/6/7: NTSC mode\n");
+		buf = buf_ntsc;
+
+	} else if (t->tvnorm == VIDEO_MODE_SECAM) {
+		dprintk("tda9885/6/7: SECAM mode\n");
+                buf = buf_pal_l;
+
+        } else if (t->tvnorm == 6 /* BTTV hack */) {
+		dprintk("tda9885/6/7: NTSC-Japan mode\n");
+                buf = buf_ntsc_jp;
+        }
+
+	if (NULL == buf) {
+		printk("tda9885/6/7 unknown norm=%d\n",t->tvnorm);
+		return 0;
+	}
+
+	dprintk("tda9885/6/7: 0x%02x 0x%02x 0x%02x\n",
+		buf[1],buf[2],buf[3]);
+        if (4 != (rc = i2c_master_send(&t->client,buf,4)))
+                printk("tda9885/6/7: i2c i/o error: rc == %d (should be 4)\n",rc);
+	return 0;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static int tda9887_attach(struct i2c_adapter *adap, int addr,
+			  unsigned short flags, int kind)
+{
+	struct tda9887 *t;
+
+        client_template.adapter = adap;
+        client_template.addr    = addr;
+
+        printk("tda9887: chip found @ 0x%x\n", addr<<1);
+
+        if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL)))
+                return -ENOMEM;
+	memset(t,0,sizeof(*t));
+	t->client = client_template;
+        t->client.data = t;
+	t->pinnacle_id = -1;
+        i2c_attach_client(&t->client);
+        
+	MOD_INC_USE_COUNT;
+	return 0;
+}
+
+static int tda9887_probe(struct i2c_adapter *adap)
+{
+	int rc;
+
+	switch (adap->id) {
+	case I2C_ALGO_BIT | I2C_HW_B_BT848:
+	case I2C_ALGO_BIT | I2C_HW_B_RIVA:
+	case I2C_ALGO_SAA7134:
+		printk("tda9887: probing %s i2c adapter [id=0x%x]\n",
+		       adap->name,adap->id);
+		rc = i2c_probe(adap, &addr_data, tda9887_attach);
+		break;
+	default:
+		printk("tda9887: ignoring %s i2c adapter [id=0x%x]\n",
+		       adap->name,adap->id);
+		rc = 0;
+		/* nothing */
+	}
+	return rc;
+}
+
+static int tda9887_detach(struct i2c_client *client)
+{
+	struct tda9887 *t = (struct tda9887*)client->data;
+
+	i2c_detach_client(client);
+	kfree(t);
+	MOD_DEC_USE_COUNT;
+	return 0;
+}
+
+static int
+tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
+{
+	struct tda9887 *t = (struct tda9887*)client->data;
+
+        switch (cmd) {
+
+	/* --- configuration --- */
+	case AUDC_SET_RADIO:
+		t->radio = 1;
+		if (-1 != t->pinnacle_id)
+			tda9887_miro(t);
+		else
+			tda9887_configure(t);
+		break;
+		
+	case AUDC_CONFIG_PINNACLE:
+	{
+		int *i = arg;
+
+		t->pinnacle_id = *i;
+		break;
+	}
+	/* --- v4l ioctls --- */
+	/* take care: bttv does userspace copying, we'll get a
+	   kernel pointer here... */
+	case VIDIOCSCHAN:
+	{
+		struct video_channel *vc = arg;
+
+		t->radio  = 0;
+		t->tvnorm = vc->norm;
+		if (-1 != t->pinnacle_id)
+			tda9887_miro(t);
+		else
+			tda9887_configure(t);
+		break;
+	}
+	default:
+		/* nothing */
+		break;
+	}
+	return 0;
+}
+
+/* ----------------------------------------------------------------------- */
+
+static struct i2c_driver driver = {
+	.owner          = THIS_MODULE,
+        .name           = "i2c tda9887 driver",
+        .id             = -1, /* FIXME */
+        .flags          = I2C_DF_NOTIFY,
+        .attach_adapter = tda9887_probe,
+        .detach_client  = tda9887_detach,
+        .command        = tda9887_command,
+};
+static struct i2c_client client_template =
+{
+        .name   = "tda9887",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
+};
+
+static int tda9887_init_module(void)
+{
+	i2c_add_driver(&driver);
+	return 0;
+}
+
+static void tda9887_cleanup_module(void)
+{
+	i2c_del_driver(&driver);
+}
+
+module_init(tda9887_init_module);
+module_exit(tda9887_cleanup_module);
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-basic-offset: 8
+ * End:
+ */
diff -Nru a/drivers/media/video/tuner.c b/drivers/media/video/tuner.c
--- a/drivers/media/video/tuner.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/media/video/tuner.c	Wed Jan  8 20:04:45 2003
@@ -18,17 +18,7 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] = {I2C_CLIENT_END};
 static unsigned short normal_i2c_range[] = {0x60,0x6f,I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 /* insmod options */
 static int debug =  0;
@@ -142,7 +132,7 @@
 	  16*140.25,16*463.25,0x02,0x04,0x01,0x8e,623},
 	{ "Philips PAL_I (FI1246 and compatibles)", Philips, PAL_I,
 	  16*140.25,16*463.25,0xa0,0x90,0x30,0x8e,623},
-	{ "Philips NTSC (FI1236 and compatibles)", Philips, NTSC,
+	{ "Philips NTSC (FI1236,FM1236 and compatibles)", Philips, NTSC,
 	  16*157.25,16*451.25,0xA0,0x90,0x30,0x8e,732},
 	{ "Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)", Philips, SECAM,
 	  16*168.25,16*447.25,0xA7,0x97,0x37,0x8e,623},
@@ -736,6 +726,7 @@
 
         if2=10700*1000; //  10.7MHz FM intermediate frequency
 
+	// per Manual for FM tuning: first if center freq. 1085 MHz
         mt2032_set_if_freq(c,freq* 1000*1000/16, 1085*1000*1000,if2,if2,if2);
 }
 
@@ -811,6 +802,7 @@
         memset(t,0,sizeof(struct tuner));
 	if (type >= 0 && type < TUNERS) {
 		t->type = type;
+		printk("tuner(bttv): type forced to %d (%s) [insmod]\n",t->type,tuners[t->type].name);
 		strncpy(client->name, tuners[t->type].name, sizeof(client->name));
 	} else {
 		t->type = -1;
@@ -820,7 +812,6 @@
                  mt2032_init(client);
 
 	MOD_INC_USE_COUNT;
-
 	return 0;
 }
 
@@ -837,6 +828,7 @@
 	case I2C_ALGO_BIT | I2C_HW_B_BT848:
 	case I2C_ALGO_BIT | I2C_HW_B_RIVA:
 	case I2C_ALGO_SAA7134:
+	case I2C_ALGO_SAA7146:
 		printk("tuner: probing %s i2c adapter [id=0x%x]\n",
 		       adap->name,adap->id);
 		rc = i2c_probe(adap, &addr_data, tuner_attach);
@@ -875,7 +867,7 @@
 	/* --- configuration --- */
 	case TUNER_SET_TYPE:
 		if (t->type != -1) {
-			printk("tuner: type already set\n");
+			printk("tuner: type already set (%d)\n",t->type);
 			return 0;
 		}
 		if (*iarg < 0 || *iarg >= TUNERS)
@@ -975,18 +967,19 @@
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-	.name		= "i2cTVtunerdriver",
-	.id		= I2C_DRIVERID_TUNER,
-	.flags		= I2C_DF_NOTIFY,
-	.attach_adapter	= tuner_probe,
-	.detach_client	= tuner_detach,
-	.command	= tuner_command,
+	.owner          = THIS_MODULE,
+        .name           = "i2c TV tuner driver",
+        .id             = I2C_DRIVERID_TUNER,
+        .flags          = I2C_DF_NOTIFY,
+        .attach_adapter = tuner_probe,
+        .detach_client  = tuner_detach,
+        .command        = tuner_command,
 };
-static struct i2c_client client_template = 
+static struct i2c_client client_template =
 {
-	.name	= "(tunerunset)",
-	.flags	= I2C_CLIENT_ALLOW_USE,
-	.driver	= &driver,
+        .name   = "(tuner unset)",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
 };
 
 static int tuner_init_module(void)
diff -Nru a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
--- a/drivers/media/video/tvaudio.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/media/video/tvaudio.c	Wed Jan  8 20:04:43 2003
@@ -146,17 +146,7 @@
 	I2C_PIC16C54  >> 1,
 	I2C_CLIENT_END };
 static unsigned short normal_i2c_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe[2]            = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]      = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]           = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2]     = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]            = { I2C_CLIENT_END, I2C_CLIENT_END };
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 static struct i2c_driver driver;
 static struct i2c_client client_template;
@@ -1088,6 +1078,19 @@
 static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; }
 static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; }
 
+static int tda8425_initialize(struct CHIPSTATE *chip)
+{
+	struct CHIPDESC *desc = chiplist + chip->type;
+	int inputmap[8] = { /* tuner	*/ TDA8425_S1_CH2, /* radio  */ TDA8425_S1_CH1,
+			    /* extern	*/ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF,
+			    /* off	*/ TDA8425_S1_OFF, /* on     */ TDA8425_S1_CH2};
+
+	if (chip->c.adapter->id == (I2C_ALGO_BIT | I2C_HW_B_RIVA)) {
+		memcpy (desc->inputmap, inputmap, sizeof (inputmap));
+	}
+	return 0;
+}
+
 static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
 {
 	int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1;
@@ -1188,7 +1191,7 @@
 		.inputreg   = TDA9873_SW,
 		.inputmute  = TDA9873_MUTE | TDA9873_AUTOMUTE,
 		.inputmap   = {0xa0, 0xa2, 0xa0, 0xa0, 0xc0},
-		.inputmask  = TDA9873_INP_MASK | TDA9873_MUTE | TDA9873_AUTOMUTE
+		.inputmask  = TDA9873_INP_MASK|TDA9873_MUTE|TDA9873_AUTOMUTE,
 		
 	},
 	{
@@ -1285,8 +1288,8 @@
 		.registers  = 9,
 		.flags      = CHIP_HAS_VOLUME | CHIP_HAS_BASSTREBLE | CHIP_HAS_INPUTSEL,
 
-		.leftreg    = TDA8425_VR,
-		.rightreg   = TDA8425_VL,
+		.leftreg    = TDA8425_VL,
+		.rightreg   = TDA8425_VR,
 		.bassreg    = TDA8425_BA,
 		.treblereg  = TDA8425_TR,
 		.volfunc    = tda8425_shift10,
@@ -1298,6 +1301,7 @@
 		.inputmute  = TDA8425_S1_OFF,
 
 		.setmode    = tda8425_setmode,
+		.initialize = tda8425_initialize,
 	},
 	{
 		.name       = "pic16c54 (PV951)",
@@ -1316,7 +1320,7 @@
 			     PIC16C54_MISC_SND_NOTMUTE},
 		.inputmute  = PIC16C54_MISC_SND_MUTE,
 	},
-	{ .name = NULL } /* EOF */
+	{ name: NULL } /* EOF */
 };
 
 
@@ -1544,19 +1548,20 @@
 
 
 static struct i2c_driver driver = {
-	.name		= "generic i2c audio driver",
-	.id		= I2C_DRIVERID_TVAUDIO,
-	.flags		= I2C_DF_NOTIFY,
-	.attach_adapter	= chip_probe,
-	.detach_client	= chip_detach,
-	.command	= chip_command,
+	.owner           = THIS_MODULE,
+        .name            = "generic i2c audio driver",
+        .id              = I2C_DRIVERID_TVAUDIO,
+        .flags           = I2C_DF_NOTIFY,
+        .attach_adapter  = chip_probe,
+        .detach_client   = chip_detach,
+        .command         = chip_command,
 };
 
 static struct i2c_client client_template =
 {
-	.name		= "(unset)",
-	.flags		= I2C_CLIENT_ALLOW_USE,
-	.driver		= &driver,
+        .name   = "(unset)",
+	.flags  = I2C_CLIENT_ALLOW_USE,
+        .driver = &driver,
 };
 
 static int audiochip_init_module(void)
diff -Nru a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c
--- a/drivers/media/video/tvmixer.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/media/video/tvmixer.c	Wed Jan  8 20:04:45 2003
@@ -195,9 +195,8 @@
 
 	/* lock bttv in memory while the mixer is in use  */
 	file->private_data = mix;
-
-	if (!try_module_get(client->adapter->owner))
-		return -ENODEV;
+	if (client->adapter->owner)
+		try_module_get(client->adapter->owner);
         return 0;
 }
 
@@ -211,25 +210,26 @@
 		return -ENODEV;
 	}
 
-	module_put(client->adapter->owner);
+	if (client->adapter->owner)
+		module_put(client->adapter->owner);
 	return 0;
 }
 
-
 static struct i2c_driver driver = {
-	.name		= "tv card mixer driver",
-	.id		= I2C_DRIVERID_TVMIXER,
-	.flags		= I2C_DF_DUMMY,
-	.attach_adapter	= tvmixer_adapters,
-	.detach_client	= tvmixer_clients,
+	.owner           = THIS_MODULE,
+	.name            = "tv card mixer driver",
+        .id              = I2C_DRIVERID_TVMIXER,
+	.flags           = I2C_DF_DUMMY,
+        .attach_adapter  = tvmixer_adapters,
+        .detach_client   = tvmixer_clients,
 };
 
 static struct file_operations tvmixer_fops = {
 	.owner		= THIS_MODULE,
-	.llseek		= no_llseek,
-	.ioctl		= tvmixer_ioctl,
-	.open		= tvmixer_open,
-	.release	= tvmixer_release,
+	.llseek         = no_llseek,
+	.ioctl          = tvmixer_ioctl,
+	.open           = tvmixer_open,
+	.release        = tvmixer_release,
 };
 
 /* ----------------------------------------------------------------------- */
diff -Nru a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/video/v4l1-compat.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,1010 @@
+/*
+ *	Video for Linux Two
+ *	Backward Compatibility Layer
+ *
+ *	Support subroutines for providing V4L2 drivers with backward
+ *	compatibility with applications using the old API.
+ *
+ *	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.
+ *
+ * Author:	Bill Dirks <bdirks@pacbell.net>
+ *		et al.
+ *
+ */
+
+#ifndef __KERNEL__
+#define __KERNEL__
+#endif
+
+#include <linux/config.h>
+
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
+#include <linux/mm.h>
+#include <linux/fs.h>
+#include <linux/file.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/videodev.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/pgtable.h>
+
+#ifdef CONFIG_KMOD
+#include <linux/kmod.h>
+#endif
+
+static unsigned int debug  = 0;
+MODULE_PARM(debug,"i");
+MODULE_PARM_DESC(debug,"enable debug messages");
+MODULE_AUTHOR("Bill Dirks");
+MODULE_DESCRIPTION("v4l(1) compatibility layer for v4l2 drivers.");
+MODULE_LICENSE("GPL");
+
+#define dprintk(fmt, arg...)	if (debug) \
+	printk(KERN_DEBUG "v4l1-compat: " fmt, ## arg)
+
+/*
+ *	I O C T L   T R A N S L A T I O N
+ *
+ *	From here on down is the code for translating the numerous
+ *	ioctl commands from the old API to the new API.
+ */
+
+static int
+get_v4l_control(struct inode            *inode,
+		struct file             *file,
+		int			cid,
+		v4l2_kioctl             drv)
+{
+	struct v4l2_queryctrl	qctrl2;
+	struct v4l2_control	ctrl2;
+	int			err;
+
+	qctrl2.id = cid;
+	err = drv(inode, file, VIDIOC_QUERYCTRL, &qctrl2);
+	if (err < 0)
+		dprintk("VIDIOC_QUERYCTRL: %d\n",err);
+	if (err == 0 &&
+	    !(qctrl2.flags & V4L2_CTRL_FLAG_DISABLED))
+	{
+		ctrl2.id = qctrl2.id;
+		err = drv(inode, file, VIDIOC_G_CTRL, &ctrl2);
+		if (err < 0)
+			dprintk("VIDIOC_G_CTRL: %d\n",err);
+		return ((ctrl2.value - qctrl2.minimum) * 65535
+			 + (qctrl2.maximum - qctrl2.minimum) / 2)
+			/ (qctrl2.maximum - qctrl2.minimum);
+	}
+	return 0;
+}
+
+static int
+set_v4l_control(struct inode            *inode,
+		struct file             *file,
+		int			cid,
+		int			value,
+		v4l2_kioctl             drv)
+{
+	struct v4l2_queryctrl	qctrl2;
+	struct v4l2_control	ctrl2;
+	int			err;
+
+	qctrl2.id = cid;
+	err = drv(inode, file, VIDIOC_QUERYCTRL, &qctrl2);
+	if (err < 0)
+		dprintk("VIDIOC_QUERYCTRL: %d\n",err);
+	if (err == 0 &&
+	    !(qctrl2.flags & V4L2_CTRL_FLAG_DISABLED) &&
+	    !(qctrl2.flags & V4L2_CTRL_FLAG_GRABBED))
+	{
+		if (value < 0)
+			value = 0;
+		if (value > 65535)
+			value = 65535;
+		if (value && qctrl2.type == V4L2_CTRL_TYPE_BOOLEAN)
+			value = 65535;
+		ctrl2.id = qctrl2.id;
+		ctrl2.value = 
+			(value * (qctrl2.maximum - qctrl2.minimum)
+			 + 32767)
+			/ 65535;
+		ctrl2.value += qctrl2.minimum;
+		err = drv(inode, file, VIDIOC_S_CTRL, &ctrl2);
+		if (err < 0)
+			dprintk("VIDIOC_S_CTRL: %d\n",err);
+	}
+	return 0;
+}
+
+static int palette2pixelformat[] = {
+	[VIDEO_PALETTE_GREY]    = V4L2_PIX_FMT_GREY,
+	[VIDEO_PALETTE_RGB555]  = V4L2_PIX_FMT_RGB555,
+	[VIDEO_PALETTE_RGB565]  = V4L2_PIX_FMT_RGB565,
+	[VIDEO_PALETTE_RGB24]   = V4L2_PIX_FMT_BGR24,
+	[VIDEO_PALETTE_RGB32]   = V4L2_PIX_FMT_BGR32,
+	/* yuv packed pixel */
+	[VIDEO_PALETTE_YUYV]    = V4L2_PIX_FMT_YUYV,
+	[VIDEO_PALETTE_YUV422]  = V4L2_PIX_FMT_YUYV,
+	[VIDEO_PALETTE_UYVY]    = V4L2_PIX_FMT_UYVY,
+	/* yuv planar */
+	[VIDEO_PALETTE_YUV410P] = V4L2_PIX_FMT_YUV410,
+	[VIDEO_PALETTE_YUV420]  = V4L2_PIX_FMT_YUV420,
+	[VIDEO_PALETTE_YUV420P] = V4L2_PIX_FMT_YUV420,
+	[VIDEO_PALETTE_YUV411P] = V4L2_PIX_FMT_YUV411P,
+	[VIDEO_PALETTE_YUV422P] = V4L2_PIX_FMT_YUV422P,
+};
+
+static int
+palette_to_pixelformat(int palette)
+{
+	if (palette < sizeof(palette2pixelformat)/sizeof(int))
+		return palette2pixelformat[palette];
+	else
+		return 0;
+}
+
+static int
+pixelformat_to_palette(int pixelformat)
+{
+	int	palette = 0;
+	switch (pixelformat)
+	{
+	case V4L2_PIX_FMT_GREY:
+		palette = VIDEO_PALETTE_GREY;
+		break;
+	case V4L2_PIX_FMT_RGB555:
+		palette = VIDEO_PALETTE_RGB555;
+		break;
+	case V4L2_PIX_FMT_RGB565:
+		palette = VIDEO_PALETTE_RGB565;
+		break;
+	case V4L2_PIX_FMT_BGR24:
+		palette = VIDEO_PALETTE_RGB24;
+		break;
+	case V4L2_PIX_FMT_BGR32:
+		palette = VIDEO_PALETTE_RGB32;
+		break;
+	/* yuv packed pixel */
+	case V4L2_PIX_FMT_YUYV:
+		palette = VIDEO_PALETTE_YUYV;
+		break;
+	case V4L2_PIX_FMT_UYVY:
+		palette = VIDEO_PALETTE_UYVY;
+		break;
+	/* yuv planar */
+	case V4L2_PIX_FMT_YUV410:
+		palette = VIDEO_PALETTE_YUV420;
+		break;
+	case V4L2_PIX_FMT_YUV420:
+		palette = VIDEO_PALETTE_YUV420;
+		break;
+	case V4L2_PIX_FMT_YUV411P:
+		palette = VIDEO_PALETTE_YUV411P;
+		break;
+	case V4L2_PIX_FMT_YUV422P:
+		palette = VIDEO_PALETTE_YUV422P;
+		break;
+	}
+	return palette;
+}
+
+/*  Do an 'in' (wait for input) select on a single file descriptor  */
+/*  This stuff plaigarized from linux/fs/select.c     */
+#define __FD_IN(fds, n)	(fds->in + n)
+#define BIT(i)		(1UL << ((i)&(__NFDBITS-1)))
+#define SET(i,m)	(*(m) |= (i))
+extern int do_select(int n, fd_set_bits *fds, long *timeout);
+
+
+static int
+simple_select(struct file *file)
+{
+	fd_set_bits fds;
+	char *bits;
+	long timeout;
+	int i, fd, n, ret, size;
+
+	for (i = 0; i < current->files->max_fds; ++i)
+		if (file == current->files->fd[i])
+			break;
+	if (i == current->files->max_fds)
+		return -EINVAL;
+	fd = i;
+	n = fd + 1;
+
+	timeout = MAX_SCHEDULE_TIMEOUT;
+	/*
+	 * We need 6 bitmaps (in/out/ex for both incoming and outgoing),
+	 * since we used fdset we need to allocate memory in units of
+	 * long-words. 
+	 */
+	ret = -ENOMEM;
+	size = FDS_BYTES(n);
+	bits = kmalloc(6 * size, GFP_KERNEL);
+	if (!bits)
+		goto out_nofds;
+	fds.in      = (unsigned long *)  bits;
+	fds.out     = (unsigned long *) (bits +   size);
+	fds.ex      = (unsigned long *) (bits + 2*size);
+	fds.res_in  = (unsigned long *) (bits + 3*size);
+	fds.res_out = (unsigned long *) (bits + 4*size);
+	fds.res_ex  = (unsigned long *) (bits + 5*size);
+
+	/*  All zero except our one file descriptor bit, for input  */
+	memset(bits, 0, 6 * size);
+	SET(BIT(fd), __FD_IN((&fds), fd / __NFDBITS));
+
+	ret = do_select(n, &fds, &timeout);
+
+	if (ret < 0)
+		goto out;
+	if (!ret) {
+		ret = -ERESTARTNOHAND;
+		if (signal_pending(current))
+			goto out;
+		ret = 0;
+	}
+out:
+	kfree(bits);
+out_nofds:
+	return ret;
+}
+
+static int count_inputs(struct inode         *inode,
+			struct file          *file,
+			v4l2_kioctl          drv)
+{
+	struct v4l2_input input2;
+	int i;
+
+	for (i = 0;; i++) {
+		memset(&input2,0,sizeof(input2));
+		input2.index = i;
+		if (0 != drv(inode,file,VIDIOC_ENUMINPUT, &input2))
+			break;
+	}
+	return i;
+}
+
+static int check_size(struct inode         *inode,
+		      struct file          *file,
+		      v4l2_kioctl          drv,
+		      int *maxw, int *maxh)
+{
+	struct v4l2_fmtdesc desc2;
+	struct v4l2_format  fmt2;
+
+	memset(&desc2,0,sizeof(desc2));
+	memset(&fmt2,0,sizeof(fmt2));
+	
+	desc2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+	if (0 != drv(inode,file,VIDIOC_ENUM_FMT, &desc2))
+		goto done;
+
+	fmt2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+	fmt2.fmt.pix.width       = 10000;
+	fmt2.fmt.pix.height      = 10000;
+	fmt2.fmt.pix.pixelformat = desc2.pixelformat;
+	if (0 != drv(inode,file,VIDIOC_TRY_FMT, &fmt2))
+		goto done;
+
+	*maxw = fmt2.fmt.pix.width;
+	*maxh = fmt2.fmt.pix.height;
+
+ done:
+	return 0;
+}
+
+
+/*
+ *	This function is exported.
+ */
+int
+v4l_compat_translate_ioctl(struct inode         *inode,
+			   struct file		*file,
+			   int			cmd,
+			   void			*arg,
+			   v4l2_kioctl          drv)
+{
+	int	             err = -ENOIOCTLCMD;
+
+	switch (cmd)
+	{
+	case VIDIOCGCAP:	/* capability */
+	{
+		struct video_capability *cap = arg;
+		struct v4l2_capability cap2;
+		struct v4l2_framebuffer fbuf2;
+		
+		memset(cap, 0, sizeof(*cap));
+		memset(&cap2, 0, sizeof(cap2));
+		memset(&fbuf2, 0, sizeof(fbuf2));
+
+		err = drv(inode, file, VIDIOC_QUERYCAP, &cap2);
+		if (err < 0) {
+			dprintk("VIDIOCGCAP / VIDIOC_QUERYCAP: %d\n",err);
+			break;
+		}
+		if (cap2.capabilities & V4L2_CAP_VIDEO_OVERLAY) {
+			err = drv(inode, file, VIDIOC_G_FBUF, &fbuf2);
+			if (err < 0) {
+				dprintk("VIDIOCGCAP / VIDIOC_G_FBUF: %d\n",err);
+				memset(&fbuf2, 0, sizeof(fbuf2));
+			}
+			err = 0;
+		}
+
+		memcpy(cap->name, cap2.card, 
+		       min(sizeof(cap->name), sizeof(cap2.card)));
+		cap->name[sizeof(cap->name) - 1] = 0;
+		if (cap2.capabilities & V4L2_CAP_VIDEO_CAPTURE)
+			cap->type |= VID_TYPE_CAPTURE;
+		if (cap2.capabilities & V4L2_CAP_TUNER)
+			cap->type |= VID_TYPE_TUNER;
+		if (cap2.capabilities & V4L2_CAP_VBI_CAPTURE)
+			cap->type |= VID_TYPE_TELETEXT;
+		if (cap2.capabilities & V4L2_CAP_VIDEO_OVERLAY)
+			cap->type |= VID_TYPE_OVERLAY;
+		if (fbuf2.capability & V4L2_FBUF_CAP_LIST_CLIPPING)
+			cap->type |= VID_TYPE_CLIPPING;
+
+		cap->channels  = count_inputs(inode,file,drv);
+		check_size(inode,file,drv,
+			   &cap->maxwidth,&cap->maxheight);
+		cap->audios    =  0; /* FIXME */
+		cap->minwidth  = 48; /* FIXME */
+		cap->minheight = 32; /* FIXME */
+		break;
+	}
+	case VIDIOCGFBUF: /*  get frame buffer  */
+	{
+		struct video_buffer	*buffer = arg;
+		struct v4l2_framebuffer	fbuf2;
+
+		err = drv(inode, file, VIDIOC_G_FBUF, &fbuf2);
+		if (err < 0) {
+			dprintk("VIDIOCGFBUF / VIDIOC_G_FBUF: %d\n",err);
+			break;
+		}
+		buffer->base   = fbuf2.base;
+		buffer->height = fbuf2.fmt.height;
+		buffer->width  = fbuf2.fmt.width;
+
+		switch (fbuf2.fmt.pixelformat) {
+		case V4L2_PIX_FMT_RGB332:
+			buffer->depth = 8;
+				break;
+		case V4L2_PIX_FMT_RGB555:
+			buffer->depth = 15;
+			break;
+		case V4L2_PIX_FMT_RGB565:
+			buffer->depth = 16;
+			break;
+		case V4L2_PIX_FMT_BGR24:
+			buffer->depth = 24;
+			break;
+		case V4L2_PIX_FMT_BGR32:
+			buffer->depth = 32;
+			break;
+		default:
+			buffer->depth = 0;
+		}
+		if (0 != fbuf2.fmt.bytesperline)
+			buffer->bytesperline = fbuf2.fmt.bytesperline;
+		else {
+			buffer->bytesperline = 
+				(buffer->width * buffer->depth + 7) & 7;
+			buffer->bytesperline >>= 3;
+		}
+		break;
+	}
+	case VIDIOCSFBUF: /*  set frame buffer  */
+	{
+		struct video_buffer	*buffer = arg;
+		struct v4l2_framebuffer	fbuf2;
+
+		memset(&fbuf2, 0, sizeof(fbuf2));
+		fbuf2.base       = buffer->base;
+		fbuf2.fmt.height = buffer->height;
+		fbuf2.fmt.width  = buffer->width;
+		switch (buffer->depth) {
+		case 8:
+			fbuf2.fmt.pixelformat = V4L2_PIX_FMT_RGB332;
+			break;
+		case 15:
+			fbuf2.fmt.pixelformat = V4L2_PIX_FMT_RGB555;
+			break;
+		case 16:
+			fbuf2.fmt.pixelformat = V4L2_PIX_FMT_RGB565;
+			break;
+		case 24:
+			fbuf2.fmt.pixelformat = V4L2_PIX_FMT_BGR24;
+			break;
+		case 32:
+			fbuf2.fmt.pixelformat = V4L2_PIX_FMT_BGR32;
+			break;
+		}
+		fbuf2.fmt.bytesperline = buffer->bytesperline;
+		err = drv(inode, file, VIDIOC_S_FBUF, &fbuf2);
+		if (err < 0)
+			dprintk("VIDIOCSFBUF / VIDIOC_S_FBUF: %d\n",err);
+		break;
+	}
+	case VIDIOCGWIN: /*  get window or capture dimensions  */
+	{
+		struct video_window	*win = arg;
+		struct v4l2_format	fmt2;
+
+		memset(win,0,sizeof(*win));
+		memset(&fmt2,0,sizeof(fmt2));
+
+		fmt2.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
+		err = drv(inode, file, VIDIOC_G_FMT, &fmt2);
+		if (err < 0)
+			dprintk("VIDIOCGWIN / VIDIOC_G_WIN: %d\n",err);
+		if (err == 0) {
+			win->x         = fmt2.fmt.win.w.left;
+			win->y         = fmt2.fmt.win.w.top;
+			win->width     = fmt2.fmt.win.w.width;
+			win->height    = fmt2.fmt.win.w.height;
+			win->chromakey = fmt2.fmt.win.chromakey;
+			win->clips     = NULL;
+			win->clipcount = 0;
+			break;
+		}
+
+		fmt2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		err = drv(inode, file, VIDIOC_G_FMT, &fmt2);
+		if (err < 0) {
+			dprintk("VIDIOCGWIN / VIDIOC_G_FMT: %d\n",err);
+			break;
+		}
+		win->x         = 0;
+		win->y         = 0;
+		win->width     = fmt2.fmt.pix.width;
+		win->height    = fmt2.fmt.pix.height;
+		win->chromakey = 0;
+		win->clips     = NULL;
+		win->clipcount = 0;
+		break;
+	}
+	case VIDIOCSWIN: /*  set window and/or capture dimensions  */
+	{
+		struct video_window	*win = arg;
+		struct v4l2_format	fmt2;
+
+		memset(&fmt2,0,sizeof(fmt2));
+		fmt2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		err = drv(inode, file, VIDIOC_G_FMT, &fmt2);
+		if (err < 0)
+			dprintk("VIDIOCSWIN / VIDIOC_G_FMT: %d\n",err);
+		if (err == 0) {
+			fmt2.fmt.pix.width  = win->width;
+			fmt2.fmt.pix.height = win->height;
+			fmt2.fmt.pix.field  = V4L2_FIELD_ANY;
+			err = drv(inode, file, VIDIOC_S_FMT, &fmt2);
+			if (err < 0)
+				dprintk("VIDIOCSWIN / VIDIOC_S_FMT #1: %d\n",
+					err);
+			win->width  = fmt2.fmt.pix.width;
+			win->height = fmt2.fmt.pix.height;
+		}
+
+		memset(&fmt2,0,sizeof(fmt2));
+		fmt2.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
+		fmt2.fmt.win.w.left    = win->x;
+		fmt2.fmt.win.w.top     = win->y;
+		fmt2.fmt.win.w.width   = win->width;
+		fmt2.fmt.win.w.height  = win->height;
+		fmt2.fmt.win.chromakey = win->chromakey;
+		fmt2.fmt.win.clips     = (void *)win->clips;
+		fmt2.fmt.win.clipcount = win->clipcount;
+		err = drv(inode, file, VIDIOC_S_FMT, &fmt2);
+		if (err < 0)
+			dprintk("VIDIOCSWIN / VIDIOC_S_FMT #2: %d\n",err);
+		break;
+	}
+	case VIDIOCCAPTURE: /*  turn on/off preview  */
+	{
+		err = drv(inode, file, VIDIOC_OVERLAY, arg);
+		if (err < 0)
+			dprintk("VIDIOCCAPTURE / VIDIOC_PREVIEW: %d\n",err);
+		break;
+	}
+	case VIDIOCGCHAN: /*  get input information  */
+	{
+		struct video_channel	*chan = arg;
+		struct v4l2_input	input2;
+		v4l2_std_id    		sid;
+
+		memset(&input2,0,sizeof(input2));
+		input2.index = chan->channel;
+		err = drv(inode, file, VIDIOC_ENUMINPUT, &input2);
+		if (err < 0) {
+			dprintk("VIDIOCGCHAN / VIDIOC_ENUMINPUT: "
+				"channel=%d err=%d\n",chan->channel,err);
+			break;
+		}
+		chan->channel = input2.index;
+		memcpy(chan->name, input2.name,
+		       min(sizeof(chan->name), sizeof(input2.name)));
+		chan->name[sizeof(chan->name) - 1] = 0;
+		chan->tuners = (input2.type == V4L2_INPUT_TYPE_TUNER) ? 1 : 0;
+		chan->flags = (chan->tuners) ? VIDEO_VC_TUNER : 0;
+		switch (input2.type) {
+		case V4L2_INPUT_TYPE_TUNER:
+			chan->type = VIDEO_TYPE_TV;
+			break;
+		default:
+		case V4L2_INPUT_TYPE_CAMERA:
+			chan->type = VIDEO_TYPE_CAMERA;
+			break;
+		}
+		chan->norm = 0;
+		err = drv(inode, file, VIDIOC_G_STD, &sid);
+		if (err < 0)
+			dprintk("VIDIOCGCHAN / VIDIOC_G_STD: %d\n",err);
+		if (err == 0) {
+			if (sid & V4L2_STD_PAL)
+				chan->norm = VIDEO_MODE_PAL;
+			if (sid & V4L2_STD_NTSC)
+				chan->norm = VIDEO_MODE_NTSC;
+			if (sid & V4L2_STD_SECAM)
+				chan->norm = VIDEO_MODE_SECAM;
+		}
+		break;
+	}
+	case VIDIOCSCHAN: /*  set input  */
+	{
+		struct video_channel *chan = arg;
+		
+		err = drv(inode, file, VIDIOC_S_INPUT, &chan->channel);
+		if (err < 0)
+			dprintk("VIDIOCSCHAN / VIDIOC_S_INPUT: %d\n",err);
+		break;
+	}
+	case VIDIOCGPICT: /*  get tone controls & partial capture format  */
+	{
+		struct video_picture	*pict = arg;
+		struct v4l2_format	fmt2;
+
+		pict->brightness = get_v4l_control(inode, file,
+						   V4L2_CID_BRIGHTNESS,drv);
+		pict->hue = get_v4l_control(inode, file,
+					    V4L2_CID_HUE, drv);
+		pict->contrast = get_v4l_control(inode, file,
+						 V4L2_CID_CONTRAST, drv);
+		pict->colour = get_v4l_control(inode, file,
+					       V4L2_CID_SATURATION, drv);
+		pict->whiteness = get_v4l_control(inode, file,
+						  V4L2_CID_WHITENESS, drv);
+
+		memset(&fmt2,0,sizeof(fmt2));
+		fmt2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		err = drv(inode, file, VIDIOC_G_FMT, &fmt2);
+		if (err < 0) {
+			dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err);
+			break;
+		}
+#if 0 /* FIXME */
+		pict->depth   = fmt2.fmt.pix.depth;
+#endif
+		pict->palette = pixelformat_to_palette(
+			fmt2.fmt.pix.pixelformat);
+		break;
+	}
+	case VIDIOCSPICT: /*  set tone controls & partial capture format  */
+	{
+		struct video_picture	*pict = arg;
+		struct v4l2_format	fmt2;
+		struct v4l2_framebuffer	fbuf2;
+
+		set_v4l_control(inode, file,
+				V4L2_CID_BRIGHTNESS, pict->brightness, drv);
+		set_v4l_control(inode, file,
+				V4L2_CID_HUE, pict->hue, drv);
+		set_v4l_control(inode, file,
+				V4L2_CID_CONTRAST, pict->contrast, drv);
+		set_v4l_control(inode, file,
+				V4L2_CID_SATURATION, pict->colour, drv);
+		set_v4l_control(inode, file,
+				V4L2_CID_WHITENESS, pict->whiteness, drv);
+
+		memset(&fmt2,0,sizeof(fmt2));
+		fmt2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		err = drv(inode, file, VIDIOC_G_FMT, &fmt2);
+		if (err < 0)
+			dprintk("VIDIOCSPICT / VIDIOC_G_FMT: %d\n",err);
+		if (fmt2.fmt.pix.pixelformat != 
+		    palette_to_pixelformat(pict->palette)) {
+			fmt2.fmt.pix.pixelformat = palette_to_pixelformat(
+				pict->palette);
+			err = drv(inode, file, VIDIOC_S_FMT, &fmt2);
+			if (err < 0)
+				dprintk("VIDIOCSPICT / VIDIOC_S_FMT: %d\n",err);
+		}
+
+		err = drv(inode, file, VIDIOC_G_FBUF, &fbuf2);
+		if (err < 0)
+			dprintk("VIDIOCSPICT / VIDIOC_G_FBUF: %d\n",err);
+		if (fbuf2.fmt.pixelformat !=
+		    palette_to_pixelformat(pict->palette)) {
+			fbuf2.fmt.pixelformat = palette_to_pixelformat(
+				pict->palette);
+			err = drv(inode, file, VIDIOC_S_FBUF, &fbuf2);
+			if (err < 0)
+				dprintk("VIDIOCSPICT / VIDIOC_S_FBUF: %d\n",err);
+			err = 0; /* likely fails for non-root */
+		}
+		break;
+	}
+	case VIDIOCGTUNER: /*  get tuner information  */
+	{
+		struct video_tuner	*tun = arg;
+		struct v4l2_tuner	tun2;
+		v4l2_std_id    		sid;
+
+		memset(&tun2,0,sizeof(tun2));
+		err = drv(inode, file, VIDIOC_G_TUNER, &tun2);
+		if (err < 0) {
+			dprintk("VIDIOCGTUNER / VIDIOC_G_TUNER: %d\n",err);
+			break;
+		}
+		memcpy(tun->name, tun2.name,
+		       min(sizeof(tun->name), sizeof(tun2.name)));
+		tun->name[sizeof(tun->name) - 1] = 0;
+		tun->rangelow = tun2.rangelow;
+		tun->rangehigh = tun2.rangehigh;
+		tun->flags = 0;
+		tun->mode = VIDEO_MODE_AUTO;
+
+		err = drv(inode, file, VIDIOC_G_STD, &sid);
+		if (err < 0)
+			dprintk("VIDIOCGTUNER / VIDIOC_G_STD: %d\n",err);
+		if (err == 0) {
+			if (sid & V4L2_STD_PAL)
+				tun->mode = VIDEO_MODE_PAL;
+			if (sid & V4L2_STD_NTSC)
+				tun->mode = VIDEO_MODE_NTSC;
+			if (sid & V4L2_STD_SECAM)
+				tun->mode = VIDEO_MODE_SECAM;
+		}
+
+		if (tun2.capability & V4L2_TUNER_CAP_LOW)
+			tun->flags |= VIDEO_TUNER_LOW;
+		if (tun2.rxsubchans & V4L2_TUNER_SUB_STEREO)
+			tun->flags |= VIDEO_TUNER_STEREO_ON;
+		tun->signal = tun2.signal;
+		break;
+	}
+#if 0 /* FIXME */
+	case VIDIOCSTUNER: /*  select a tuner input  */
+	{
+		int	i;
+
+		err = drv(inode, file, VIDIOC_S_INPUT, &i);
+		if (err < 0)
+			dprintk("VIDIOCSTUNER / VIDIOC_S_INPUT: %d\n",err);
+		break;
+	}
+#endif
+	case VIDIOCGFREQ: /*  get frequency  */
+	{
+		int *freq = arg;
+		struct v4l2_frequency freq2;
+		
+		err = drv(inode, file, VIDIOC_G_FREQUENCY, &freq2);
+		if (err < 0)
+			dprintk("VIDIOCGFREQ / VIDIOC_G_FREQUENCY: %d\n",err);
+		if (0 == err)
+			*freq = freq2.frequency;
+		break;
+	}
+	case VIDIOCSFREQ: /*  set frequency  */
+	{
+		int *freq = arg;
+		struct v4l2_frequency freq2;
+
+		drv(inode, file, VIDIOC_G_FREQUENCY, &freq2);
+		freq2.frequency = *freq;
+		err = drv(inode, file, VIDIOC_S_FREQUENCY, &freq2);
+		if (err < 0)
+			dprintk("VIDIOCSFREQ / VIDIOC_S_FREQUENCY: %d\n",err);
+		break;
+	}
+	case VIDIOCGAUDIO: /*  get audio properties/controls  */
+	{
+		struct video_audio	*aud = arg;
+		struct v4l2_audio	aud2;
+		struct v4l2_queryctrl	qctrl2;
+		struct v4l2_tuner	tun2;
+		int			v;
+
+		err = drv(inode, file, VIDIOC_G_AUDIO, &aud2);
+		if (err < 0) {
+			dprintk("VIDIOCGAUDIO / VIDIOC_G_AUDIO: %d\n",err);
+			break;
+		}
+		memcpy(aud->name, aud2.name,
+		       min(sizeof(aud->name), sizeof(aud2.name)));
+		aud->name[sizeof(aud->name) - 1] = 0;
+		aud->audio = aud2.index;
+		aud->flags = 0;
+		v = get_v4l_control(inode, file, V4L2_CID_AUDIO_VOLUME, drv);
+		if (v >= 0)
+		{
+			aud->volume = v;
+			aud->flags |= VIDEO_AUDIO_VOLUME;
+		}
+		v = get_v4l_control(inode, file, V4L2_CID_AUDIO_BASS, drv);
+		if (v >= 0)
+		{
+			aud->bass = v;
+			aud->flags |= VIDEO_AUDIO_BASS;
+		}
+		v = get_v4l_control(inode, file, V4L2_CID_AUDIO_TREBLE, drv);
+		if (v >= 0)
+		{
+			aud->treble = v;
+			aud->flags |= VIDEO_AUDIO_TREBLE;
+		}
+		v = get_v4l_control(inode, file, V4L2_CID_AUDIO_BALANCE, drv);
+		if (v >= 0)
+		{
+			aud->balance = v;
+			aud->flags |= VIDEO_AUDIO_BALANCE;
+		}
+		v = get_v4l_control(inode, file, V4L2_CID_AUDIO_MUTE, drv);
+		if (v >= 0)
+		{
+			if (v)
+				aud->flags |= VIDEO_AUDIO_MUTE;
+			aud->flags |= VIDEO_AUDIO_MUTABLE;
+		}
+		aud->step = 1;
+		qctrl2.id = V4L2_CID_AUDIO_VOLUME;
+		if (drv(inode, file, VIDIOC_QUERYCTRL, &qctrl2) == 0 &&
+		    !(qctrl2.flags & V4L2_CTRL_FLAG_DISABLED))
+			aud->step = qctrl2.step;
+		aud->mode = 0;
+		err = drv(inode, file, VIDIOC_G_TUNER, &tun2);
+		if (err < 0) {
+			dprintk("VIDIOCGAUDIO / VIDIOC_G_TUNER: %d\n",err);
+			err = 0;
+			break;
+		}
+		if (tun2.rxsubchans & V4L2_TUNER_SUB_LANG2)
+			aud->mode = VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
+		else if (tun2.rxsubchans & V4L2_TUNER_SUB_STEREO)
+			aud->mode = VIDEO_SOUND_STEREO;
+		else if (tun2.rxsubchans & V4L2_TUNER_SUB_MONO)
+			aud->mode = VIDEO_SOUND_MONO;
+		break;
+	}
+	case VIDIOCSAUDIO: /*  set audio controls  */
+	{
+		struct video_audio	*aud = arg;
+		struct v4l2_audio	aud2;
+		struct v4l2_tuner	tun2;
+
+		memset(&aud2,0,sizeof(aud2));
+		memset(&tun2,0,sizeof(tun2));
+		
+		aud2.index = aud->audio;
+		err = drv(inode, file, VIDIOC_S_AUDIO, &aud2);
+		if (err < 0) {
+			dprintk("VIDIOCSAUDIO / VIDIOC_S_AUDIO: %d\n",err);
+			break;
+		}
+
+		set_v4l_control(inode, file, V4L2_CID_AUDIO_VOLUME, 
+				aud->volume, drv);
+		set_v4l_control(inode, file, V4L2_CID_AUDIO_BASS,
+				aud->bass, drv);
+		set_v4l_control(inode, file, V4L2_CID_AUDIO_TREBLE,
+				aud->treble, drv);
+		set_v4l_control(inode, file, V4L2_CID_AUDIO_BALANCE,
+				aud->balance, drv);
+		set_v4l_control(inode, file, V4L2_CID_AUDIO_MUTE,
+				!!(aud->flags & VIDEO_AUDIO_MUTE), drv);
+
+		err = drv(inode, file, VIDIOC_G_TUNER, &tun2);
+		if (err < 0)
+			dprintk("VIDIOCSAUDIO / VIDIOC_G_TUNER: %d\n",err);
+		if (err == 0) {
+			switch (aud->mode) {
+			default:
+			case VIDEO_SOUND_MONO:
+			case VIDEO_SOUND_LANG1:
+				tun2.audmode = V4L2_TUNER_MODE_MONO;
+				break;
+			case VIDEO_SOUND_STEREO:
+				tun2.audmode = V4L2_TUNER_MODE_STEREO;
+				break;
+			case VIDEO_SOUND_LANG2:
+				tun2.audmode = V4L2_TUNER_MODE_LANG2;
+				break;
+			}
+			err = drv(inode, file, VIDIOC_S_TUNER, &tun2);
+			if (err < 0)
+				dprintk("VIDIOCSAUDIO / VIDIOC_S_TUNER: %d\n",err);
+		}
+		err = 0;
+		break;
+	}
+#if 0
+	case VIDIOCGMBUF: /*  get mmap parameters  */
+	{
+		struct video_mbuf		*mbuf = arg;
+		struct v4l2_requestbuffers	reqbuf2;
+		struct v4l2_buffer		buf2;
+		struct v4l2_format		fmt2, fmt2o;
+		struct v4l2_capability		cap2;
+		int				i;
+
+		/*  Set the format to maximum dimensions  */
+		if ((err = drv(inode, file, VIDIOC_QUERYCAP, &cap2)) < 0)
+			break;
+		fmt2o.type = V4L2_BUF_TYPE_CAPTURE;
+		if ((err = drv(inode, file, VIDIOC_G_FMT, &fmt2o)) < 0)
+			break;
+		fmt2 = fmt2o;
+		fmt2.fmt.pix.width = cap2.maxwidth;
+		fmt2.fmt.pix.height = cap2.maxheight;
+		fmt2.fmt.pix.flags |= V4L2_FMT_FLAG_INTERLACED;
+		if ((err = drv(inode, file, VIDIOC_S_FMT, &fmt2)) < 0)
+			break;
+		reqbuf2.count = 2; /* v4l always used two buffers */
+		reqbuf2.type = V4L2_BUF_TYPE_CAPTURE | V4L2_BUF_REQ_CONTIG;
+		err = drv(inode, file, VIDIOC_REQBUFS, &reqbuf2);
+		if (err < 0 || reqbuf2.count < 2 || reqbuf2.type
+		    != (V4L2_BUF_TYPE_CAPTURE | V4L2_BUF_REQ_CONTIG))
+		{/*	Driver doesn't support v4l back-compatibility  */
+			fmt2o.fmt.pix.flags |= V4L2_FMT_FLAG_INTERLACED;
+			drv(inode, file, VIDIOC_S_FMT, &fmt2o);
+			reqbuf2.count = 1;
+			reqbuf2.type = V4L2_BUF_TYPE_CAPTURE;
+			err = drv(inode, file, VIDIOC_REQBUFS, &reqbuf2);
+			if (err < 0)
+			{
+				err = -EINVAL;
+				break;
+			}
+			printk(KERN_INFO"V4L2: Device \"%s\" doesn't support"
+			       " v4l memory mapping\n", vfl->name);
+		}
+		buf2.index = 0;
+		buf2.type = V4L2_BUF_TYPE_CAPTURE;
+		err = drv(inode, file, VIDIOC_QUERYBUF, &buf2);
+		mbuf->size = buf2.length * reqbuf2.count;
+		mbuf->frames = reqbuf2.count;
+		memset(mbuf->offsets, 0, sizeof(mbuf->offsets));
+		for (i = 0; i < mbuf->frames; ++i)
+			mbuf->offsets[i] = i * buf2.length;
+		break;
+	}
+#endif
+	case VIDIOCMCAPTURE: /*  capture a frame  */
+	{
+		struct video_mmap	*mm = arg;
+		struct v4l2_buffer	buf2;
+		struct v4l2_format	fmt2;
+
+		memset(&buf2,0,sizeof(buf2));
+		memset(&fmt2,0,sizeof(fmt2));
+		
+		fmt2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		err = drv(inode, file, VIDIOC_G_FMT, &fmt2);
+		if (err < 0) {
+			dprintk("VIDIOCMCAPTURE / VIDIOC_G_FMT: %d\n",err);
+			break;
+		}
+		if (mm->width   != fmt2.fmt.pix.width || 
+		    mm->height != fmt2.fmt.pix.height ||
+		    palette_to_pixelformat(mm->format) != 
+		    fmt2.fmt.pix.pixelformat)
+		{/* New capture format...  */
+			fmt2.fmt.pix.width = mm->width;
+			fmt2.fmt.pix.height = mm->height;
+			fmt2.fmt.pix.pixelformat =
+				palette_to_pixelformat(mm->format);
+			fmt2.fmt.pix.field = V4L2_FIELD_ANY;
+			err = drv(inode, file, VIDIOC_S_FMT, &fmt2);
+			if (err < 0) {
+				dprintk("VIDIOCMCAPTURE / VIDIOC_S_FMT: %d\n",err);
+				break;
+			}
+		}
+		buf2.index = mm->frame;
+		buf2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		err = drv(inode, file, VIDIOC_QUERYBUF, &buf2);
+		if (err < 0) {
+			dprintk("VIDIOCMCAPTURE / VIDIOC_QUERYBUF: %d\n",err);
+			break;
+		}
+		err = drv(inode, file, VIDIOC_QBUF, &buf2);
+		if (err < 0) {
+			dprintk("VIDIOCMCAPTURE / VIDIOC_QBUF: %d\n",err);
+			break;
+		}
+		err = drv(inode, file, VIDIOC_STREAMON, &buf2.type);
+		if (err < 0)
+			dprintk("VIDIOCMCAPTURE / VIDIOC_STREAMON: %d\n",err);
+		break;
+	}
+	case VIDIOCSYNC: /*  wait for a frame  */
+	{
+		int			*i = arg;
+		struct v4l2_buffer	buf2;
+
+		buf2.index = *i;
+		buf2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+		err = drv(inode, file, VIDIOC_QUERYBUF, &buf2);
+		if (err < 0) {
+			/*  No such buffer */
+			dprintk("VIDIOCSYNC / VIDIOC_QUERYBUF: %d\n",err);
+			break;
+		}
+		if (!(buf2.flags & V4L2_BUF_FLAG_MAPPED)) {
+			/* Buffer is not mapped  */
+			err = -EINVAL;
+			break;
+		}
+
+		/*  Loop as long as the buffer is queued, but not done  */
+		while ((buf2.flags &
+			(V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE))
+		       == V4L2_BUF_FLAG_QUEUED)
+		{
+			err = simple_select(file);
+			if (err < 0 ||	/* error or sleep was interrupted  */
+			    err == 0)	/* timeout? Shouldn't occur.  */
+				break;
+			err = drv(inode, file, VIDIOC_QUERYBUF, &buf2);
+			if (err < 0)
+				dprintk("VIDIOCSYNC / VIDIOC_QUERYBUF: %d\n",err);
+		}
+		if (!(buf2.flags & V4L2_BUF_FLAG_DONE)) /* not done */
+			break;
+		do {
+			err = drv(inode, file, VIDIOC_DQBUF, &buf2);
+			if (err < 0)
+				dprintk("VIDIOCSYNC / VIDIOC_DQBUF: %d\n",err);
+		} while (err == 0 && buf2.index != *i);
+		break;
+	}
+	case VIDIOCGUNIT: /*  get related device minors  */
+		/*  No translation  */
+		break;
+	case VIDIOCGCAPTURE: /*    */
+		/*  No translation, yet...  */
+		printk(KERN_INFO"v4l1-compat: VIDIOCGCAPTURE not implemented."
+		       " Send patches to bdirks@pacbell.net :-)\n");
+		break;
+	case VIDIOCSCAPTURE: /*    */
+		/*  No translation, yet...  */
+		printk(KERN_INFO"v4l1-compat: VIDIOCSCAPTURE not implemented."
+		       " Send patches to bdirks@pacbell.net :-)\n");
+		break;
+	}
+	return err;
+}
+
+EXPORT_SYMBOL(v4l_compat_translate_ioctl);
+
+/*
+ * Local variables:
+ * c-basic-offset: 8
+ * End:
+ */
diff -Nru a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c
--- a/drivers/media/video/video-buf.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/video-buf.c	Wed Jan  8 20:04:44 2003
@@ -339,6 +339,7 @@
 		    struct pci_dev *pci,
 		    spinlock_t *irqlock,
 		    enum v4l2_buf_type type,
+		    enum v4l2_field field,
 		    int msize)
 {
 	memset(q,0,sizeof(*q));
@@ -346,6 +347,7 @@
 	q->irqlock = irqlock;
 	q->pci     = pci;
 	q->type    = type;
+	q->field   = field;
 	q->msize   = msize;
 	q->ops     = ops;
 
@@ -406,6 +408,25 @@
 
 /* --------------------------------------------------------------------- */
 
+enum v4l2_field
+videobuf_next_field(struct videobuf_queue *q)
+{
+	enum v4l2_field field = q->field;
+
+	BUG_ON(V4L2_FIELD_ANY == field);
+
+	if (V4L2_FIELD_ALTERNATE == field) {
+		if (V4L2_FIELD_TOP == q->last) {
+			field   = V4L2_FIELD_TOP;
+			q->last = V4L2_FIELD_TOP;
+		} else {
+			field   = V4L2_FIELD_BOTTOM;
+			q->last = V4L2_FIELD_BOTTOM;
+		}
+	}
+	return field;
+}
+
 void
 videobuf_status(struct v4l2_buffer *b, struct videobuf_buffer *vb,
 		enum v4l2_buf_type type)
@@ -486,6 +507,7 @@
 	      struct v4l2_buffer *b)
 {
 	struct videobuf_buffer *buf;
+	enum v4l2_field field;
 	unsigned long flags;
 	int retval;
 
@@ -507,7 +529,8 @@
 	    buf->state == STATE_ACTIVE)
 		goto done;
 
-	retval = q->ops->buf_prepare(file,buf);
+	field = videobuf_next_field(q);
+	retval = q->ops->buf_prepare(file,buf,field);
 	if (0 != retval)
 		goto done;
 	
@@ -613,6 +636,8 @@
 videobuf_read_zerocopy(struct file *file, struct videobuf_queue *q,
 		       char *data, size_t count, loff_t *ppos)
 {
+	enum v4l2_field field;
+	unsigned long flags;
         int retval;
 
         /* setup stuff */
@@ -623,12 +648,15 @@
 
 	q->read_buf->baddr = (unsigned long)data;
         q->read_buf->bsize = count;
-	retval = q->ops->buf_prepare(file,q->read_buf);
+	field = videobuf_next_field(q);
+	retval = q->ops->buf_prepare(file,q->read_buf,field);
 	if (0 != retval)
 		goto done;
 	
         /* start capture & wait */
+	spin_lock_irqsave(q->irqlock,flags);
 	q->ops->buf_queue(file,q->read_buf);
+	spin_unlock_irqrestore(q->irqlock,flags);
         retval = videobuf_waiton(q->read_buf,0,0);
         if (0 == retval) {
 		videobuf_dma_pci_sync(q->pci,&q->read_buf->dma);
@@ -646,6 +674,8 @@
 ssize_t videobuf_read_one(struct file *file, struct videobuf_queue *q,
 			  char *data, size_t count, loff_t *ppos)
 {
+	enum v4l2_field field;
+	unsigned long flags;
 	int retval, bytes, size, nbufs;
 
 	down(&q->lock);
@@ -668,10 +698,13 @@
 		q->read_buf = videobuf_alloc(q->msize);
 		if (NULL == q->read_buf)
 			goto done;
-		retval = q->ops->buf_prepare(file,q->read_buf);
+		field = videobuf_next_field(q);
+		retval = q->ops->buf_prepare(file,q->read_buf,field);
 		if (0 != retval)
 			goto done;
+		spin_lock_irqsave(q->irqlock,flags);
 		q->ops->buf_queue(file,q->read_buf);
+		spin_unlock_irqrestore(q->irqlock,flags);
 		q->read_off = 0;
 	}
 
@@ -705,6 +738,7 @@
 
 int videobuf_read_start(struct file *file, struct videobuf_queue *q)
 {
+	enum v4l2_field field;
 	unsigned long flags;
 	int count = 0, size = 0;
 	int err, i;
@@ -720,7 +754,8 @@
 	if (err)
 		return err;
 	for (i = 0; i < count; i++) {
-		err = q->ops->buf_prepare(file,q->bufs[i]);
+		field = videobuf_next_field(q);
+		err = q->ops->buf_prepare(file,q->bufs[i],field);
 		if (err)
 			return err;
 		list_add_tail(&q->bufs[i]->stream, &q->stream);
@@ -793,6 +828,7 @@
 			fc  = (unsigned int*)q->read_buf->dma.vmalloc;
 			fc += (q->read_buf->size>>2) -1;
 			*fc = q->read_buf->field_count >> 1;
+			dprintk(1,"vbihack: %d\n",*fc);
 		}
 
 		/* copy stuff */
diff -Nru a/drivers/media/video/video-buf.h b/drivers/media/video/video-buf.h
--- a/drivers/media/video/video-buf.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/media/video/video-buf.h	Wed Jan  8 20:04:44 2003
@@ -154,7 +154,8 @@
 
 struct videobuf_queue_ops {
 	int (*buf_setup)(struct file *file, int *count, int *size);
-	int (*buf_prepare)(struct file *file,struct videobuf_buffer *vb);
+	int (*buf_prepare)(struct file *file,struct videobuf_buffer *vb,
+			   enum v4l2_field field);
 	void (*buf_queue)(struct file *file,struct videobuf_buffer *vb);
 	void (*buf_release)(struct file *file,struct videobuf_buffer *vb);
 };
@@ -166,6 +167,8 @@
 
 	enum v4l2_buf_type         type;
 	int                        msize;
+	enum v4l2_field            field;
+	enum v4l2_field            last; /* for field=V4L2_FIELD_ALTERNATE */
 	struct videobuf_buffer     *bufs[VIDEO_MAX_FRAME];
 	struct videobuf_queue_ops  *ops;
 
@@ -186,7 +189,8 @@
 void videobuf_queue_init(struct videobuf_queue *q,
 			 struct videobuf_queue_ops *ops,
 			 struct pci_dev *pci, spinlock_t *irqlock,
-			 enum v4l2_buf_type type, int msize);
+			 enum v4l2_buf_type type,
+			 enum v4l2_field field, int msize);
 int  videobuf_queue_is_busy(struct videobuf_queue *q);
 void videobuf_queue_cancel(struct file *file, struct videobuf_queue *q);
 
diff -Nru a/drivers/media/video/zr36067.c b/drivers/media/video/zr36067.c
--- a/drivers/media/video/zr36067.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/media/video/zr36067.c	Wed Jan  8 20:04:45 2003
@@ -4158,7 +4158,6 @@
 		{
 			struct zoran_status bs;
 			int norm, input, status;
-			unsigned long timeout;
 
 			if (zr->codec_mode != BUZ_MODE_IDLE) {
 				DEBUG1(printk(KERN_ERR
@@ -4204,9 +4203,8 @@
 
 			/* sleep 1 second */
 
-			timeout = jiffies + 1 * HZ;
-			while (jiffies < timeout)
-				schedule();
+			set_current_state(TASK_UNINTERRUPTIBLE);
+			schedule_timeout(HZ);
 
 			/* Get status of video decoder */
 
diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c	Wed Jan  8 20:04:31 2003
+++ b/drivers/net/3c59x.c	Wed Jan  8 20:04:31 2003
@@ -460,6 +460,7 @@
 
 	CH_3CCFEM656_1,
 	CH_3C450,
+	CH_3C920,
 };
 
 
@@ -551,6 +552,8 @@
 									MAX_COLLISION_RESET|HAS_HWCKSM, 128, },
 	{"3c450 HomePNA Tornado",						/* AKPM: from Don's 0.99Q */
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
+	{"3c920 Tornado",
+	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
 	{0,}, /* 0 terminated list. */
 };
 
@@ -594,6 +597,7 @@
 
 	{ 0x10B7, 0x6564, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3CCFEM656_1 },
 	{ 0x10B7, 0x4500, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C450 },
+	{ 0x10B7, 0x9201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C920 },
 	{0,}						/* 0 terminated list. */
 };
 MODULE_DEVICE_TABLE(pci, vortex_pci_tbl);
diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig
--- a/drivers/net/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/drivers/net/Kconfig	Wed Jan  8 20:04:45 2003
@@ -1,7 +1,42 @@
 #
 # Network device configuration
 #
-source "drivers/net/arcnet/Kconfig"
+
+config NETDEVICES
+	depends on NET
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+if NETDEVICES
+	source "drivers/net/arcnet/Kconfig"
+endif
 
 config DUMMY
 	tristate "Dummy net driver support"
@@ -245,6 +280,19 @@
 	  want). The module is called ariadne.o. If you want to compile it as
 	  a module, say M here and read <file:Documentation/modules.txt>.
 
+config ARIADNE2
+	tristate "Ariadne II support"
+	depends on NETDEVICES && ZORRO
+	help
+	  This driver is for the Village Tronic Ariadne II and the Individual
+	  Computers X-Surf Ethernet cards. If you have such a card, say Y.
+	  Otherwise, say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ariadne2.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
 config NE2K_ZORRO
 	tristate "Ariadne II and X-Surf support"
 	depends on NET_ETHERNET && ZORRO
@@ -272,6 +320,156 @@
 	  want). The module is called hydra.o. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+config APNE
+	tristate "PCMCIA NE2000 support"
+	depends on NETDEVICES && AMIGA_PCMCIA
+	help
+	  If you have a PCMCIA NE2000 compatible adapter, say Y.  Otherwise,
+	  say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). The module is called apne.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config APOLLO_ELPLUS
+	tristate "Apollo 3c505 support"
+	depends on NETDEVICES && APOLLO
+	help
+	  Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card.
+	  If you don't have one made for Apollos, you can use one from a PC,
+	  except that your Apollo won't be able to boot from it (because the
+	  code in the ROM will be for a PC).
+
+config MAC8390
+	bool "Macintosh NS 8390 based ethernet cards"
+	depends on NETDEVICES && MAC
+	help
+	  If you want to include a driver to support Nubus or LC-PDS
+	  Ethernet cards using an NS8390 chipset or its equivalent, say Y
+	  and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config MAC89x0
+	tristate "Macintosh CS89x0 based ethernet cards"
+	depends on NETDEVICES && MAC
+	---help---
+	  Support for CS89x0 chipset based Ethernet cards.  If you have a
+	  Nubus or LC-PDS network (Ethernet) card of this type, say Y and
+	  read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  This module will
+	  be called mac89x0.o.
+
+config MACSONIC
+	tristate "Macintosh SONIC based ethernet (onboard, NuBus, LC, CS)"
+	depends on NETDEVICES && MAC
+	---help---
+	  Support for NatSemi SONIC based Ethernet devices.  This includes
+	  the onboard Ethernet in many Quadras as well as some LC-PDS,
+	  a few Nubus and all known Comm Slot Ethernet cards.  If you have
+	  one of these say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  This module will
+	  be called macsonic.o.
+
+config MACMACE
+	bool "Macintosh (AV) onboard MACE ethernet (EXPERIMENTAL)"
+	depends on NETDEVICES && MAC && EXPERIMENTAL
+	help
+	  Support for the onboard AMD 79C940 MACE Ethernet controller used in
+	  the 660AV and 840AV Macintosh.  If you have one of these Macintoshes
+	  say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config MVME147_NET
+	tristate "MVME147 (Lance) Ethernet support"
+	depends on NETDEVICES && MVME147
+	help
+	  Support for the on-board Ethernet interface on the Motorola MVME147
+	  single-board computer.  Say Y here to include the
+	  driver for this chip in your kernel.   If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config MVME16x_NET
+	tristate "MVME16x Ethernet support"
+	depends on NETDEVICES && MVME16x
+	help
+	  This is the driver for the Ethernet interface on the Motorola
+	  MVME162, 166, 167, 172 and 177 boards.  Say Y here to include the
+	  driver for this chip in your kernel.   If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config BVME6000_NET
+	tristate "BVME6000 Ethernet support"
+	depends on NETDEVICES && BVME6000
+	help
+	  This is the driver for the Ethernet interface on BVME4000 and
+	  BVME6000 VME boards.  Say Y here to include the driver for this chip
+	  in your kernel.   If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.
+
+config ATARILANCE
+	tristate "Atari Lance support"
+	depends on NETDEVICES && ATARI
+	help
+	  Say Y to include support for several Atari Ethernet adapters based
+	  on the AMD Lance chipset: RieblCard (with or without battery), or
+	  PAMCard VME (also the version by Rhotron, with different addresses).
+
+config ATARI_BIONET
+	tristate "BioNet-100 support"
+	depends on NETDEVICES && ATARI && ATARI_ACSI!=n
+	help
+	  Say Y to include support for BioData's BioNet-100 Ethernet adapter
+	  for the ACSI port. The driver works (has to work...) with a polled
+	  I/O scheme, so it's rather slow :-(
+
+config ATARI_PAMSNET
+	tristate "PAMsNet support"
+	depends on NETDEVICES && ATARI && ATARI_ACSI!=n
+	help
+	  Say Y to include support for the PAMsNet Ethernet adapter for the
+	  ACSI port ("ACSI node"). The driver works (has to work...) with a
+	  polled I/O scheme, so it's rather slow :-(
+
+config SUN3LANCE
+	tristate "Sun3/Sun3x on-board LANCE support"
+	depends on NETDEVICES && (SUN3 || SUN3X)
+	help
+	  Most Sun3 and Sun3x motherboards (including the 3/50, 3/60 and 3/80)
+	  featured an AMD Lance 10Mbit Ethernet controller on board; say Y
+	  here to compile in the Linux driver for this and enable Ethernet.
+	  General Linux information on the Sun 3 and 3x series (now
+	  discontinued) is at
+	  <http://www.angelfire.com/ca2/tech68k/sun3.html>.
+
+	  If you're not building a kernel for a Sun 3, say N.
+
+config SUN3_82586
+	tristate "Sun3 on-board Intel 82586 support"
+	depends on NETDEVICES && SUN3
+	help
+	  This driver enables support for the on-board Intel 82586 based
+	  Ethernet adapter found on Sun 3/1xx and 3/2xx motherboards.  Note
+	  that this driver does not support 82586-based adapters on additional
+	  VME boards.
+
+config HPLANCE
+	bool "HP on-board LANCE support"
+	depends on NETDEVICES && HP300
+	help
+	  If you want to use the builtin "LANCE" Ethernet controller on an
+	  HP300 machine, say Y here.
+
 config LASI_82596
 	tristate "Lasi ethernet"
 	depends on NET_ETHERNET && PARISC && GSC_LASI
@@ -384,7 +582,7 @@
 
 config NET_VENDOR_3COM
 	bool "3COM cards"
-	depends on NET_ETHERNET
+	depends on NET_ETHERNET && (ISA || EISA || MCA || PCI)
 	help
 	  If you have a network (Ethernet) card belonging to this class, say Y
 	  and read the Ethernet-HOWTO, available from
@@ -555,7 +753,7 @@
 
 config NET_VENDOR_SMC
 	bool "Western Digital/SMC cards"
-	depends on NET_ETHERNET
+	depends on NET_ETHERNET && (ISA || MCA || EISA || MAC)
 	help
 	  If you have a network (Ethernet) card belonging to this class, say Y
 	  and read the Ethernet-HOWTO, available from
@@ -631,7 +829,7 @@
 
 config SMC9194
 	tristate "SMC 9194 support"
-	depends on NET_VENDOR_SMC && ISA
+	depends on NET_VENDOR_SMC && (ISA || MAC)
 	---help---
 	  This is support for the SMC9xxx based Ethernet cards. Choose this
 	  option if you have a DELL laptop with the docking station, or
@@ -648,7 +846,7 @@
 
 config NET_VENDOR_RACAL
 	bool "Racal-Interlan (Micom) NI cards"
-	depends on NET_ETHERNET
+	depends on NET_ETHERNET && ISA
 	help
 	  If you have a network (Ethernet) card belonging to this class, such
 	  as the NI5010, NI5210 or NI6210, say Y and read the Ethernet-HOWTO,
@@ -898,7 +1096,7 @@
 
 config NE2000
 	tristate "NE2000/NE1000 support"
-	depends on NET_ISA
+	depends on NET_ISA || (Q40 && m)
 	---help---
 	  If you have a network (Ethernet) card of this type, say Y and read
 	  the Ethernet-HOWTO, available from
@@ -1024,6 +1222,20 @@
 	  module, say M here and read <file:Documentation/modules.txt> as well
 	  as <file:Documentation/networking/net-modules.txt>.
 
+config AMD8111_ETH
+	tristate "AMD 8111 (new PCI lance) support"
+	depends on NET_PCI && PCI
+	help
+	  If you have an AMD 8111-based PCI lance ethernet card,
+	  answer Y here and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called amd8111e.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/networking/net-modules.txt>.
+
 config ADAPTEC_STARFIRE
 	tristate "Adaptec Starfire/DuraLAN support"
 	depends on NET_PCI && PCI
@@ -1459,7 +1671,7 @@
 
 config NET_POCKET
 	bool "Pocket and portable adapters"
-	depends on NET_ETHERNET
+	depends on NET_ETHERNET && ISA
 	---help---
 	  Cute little network (Ethernet) devices which attach to the parallel
 	  port ("pocket adapters"), commonly used with laptops. If you have
@@ -1777,7 +1989,7 @@
 
 config FDDI
 	bool "FDDI driver support"
-	depends on NETDEVICES
+	depends on NETDEVICES && (PCI || EISA)
 	help
 	  Fiber Distributed Data Interface is a high speed local area network
 	  design; essentially a replacement for high speed Ethernet. FDDI can
@@ -1828,7 +2040,7 @@
 
 config HIPPI
 	bool "HIPPI driver support (EXPERIMENTAL)"
-	depends on NETDEVICES && EXPERIMENTAL && INET
+	depends on NETDEVICES && EXPERIMENTAL && INET && PCI
 	help
 	  HIgh Performance Parallel Interface (HIPPI) is a 800Mbit/sec and
 	  1600Mbit/sec dual-simplex switched or point-to-point network. HIPPI
@@ -2166,7 +2378,7 @@
 
 config ARLAN
 	tristate "Aironet Arlan 655 & IC2200 DS support"
-	depends on NET_RADIO
+	depends on NET_RADIO && ISA
 	---help---
 	  Aironet makes Arlan, a class of wireless LAN adapters. These use the
 	  www.Telxon.com chip, which is also used on several similar cards.
@@ -2181,7 +2393,7 @@
 
 config AIRONET4500
 	tristate "Aironet 4500/4800 series adapters"
-	depends on NET_RADIO
+	depends on NET_RADIO && (PCI || ISA || PCMCIA)
 	---help---
 	  www.aironet.com (recently bought by Cisco) makes these 802.11 DS
 	  adapters.  Driver by Elmer Joandi (elmer@ylenurme.ee).
@@ -2286,7 +2498,7 @@
 
 config NET_FC
 	bool "Fibre Channel driver support"
-	depends on NETDEVICES
+	depends on NETDEVICES && SCSI && PCI
 	help
 	  Fibre Channel is a high speed serial protocol mainly used to connect
 	  large storage devices to the computer; it is compatible with and
@@ -2348,3 +2560,4 @@
 
 source "drivers/net/pcmcia/Kconfig"
 
+source "drivers/atm/Kconfig"
diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile
--- a/drivers/net/Makefile	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/Makefile	Wed Jan  8 20:04:43 2003
@@ -183,6 +183,7 @@
 obj-$(CONFIG_TUN) += tun.o
 obj-$(CONFIG_DL2K) += dl2k.o
 obj-$(CONFIG_R8169) += r8169.o
+obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
 
 # non-drivers/net drivers who want mii lib
 obj-$(CONFIG_PCMCIA_SMC91C92) += mii.o
diff -Nru a/drivers/net/Makefile.lib b/drivers/net/Makefile.lib
--- a/drivers/net/Makefile.lib	Wed Jan  8 20:04:45 2003
+++ b/drivers/net/Makefile.lib	Wed Jan  8 20:04:45 2003
@@ -37,6 +37,7 @@
 obj-$(CONFIG_YELLOWFIN)		+= crc32.o
 obj-$(CONFIG_WINBOND_840)	+= crc32.o
 obj-$(CONFIG_R8169)		+= crc32.o
+obj-$(CONFIG_AMD8111_ETH)	+= crc32.o
 
 
 # These rely on drivers/net/7990.o which requires crc32.o
diff -Nru a/drivers/net/aironet4500_proc.c b/drivers/net/aironet4500_proc.c
--- a/drivers/net/aironet4500_proc.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/aironet4500_proc.c	Wed Jan  8 20:04:43 2003
@@ -42,6 +42,8 @@
 #define DEV_AWC_INFO 	1
 #define DEV_AWC 	1
 
+spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
+
 struct awc_proc_private{
 	struct ctl_table_header *	sysctl_header;
   	struct ctl_table	*	proc_table;
@@ -293,10 +295,9 @@
 	};
 
 	if (!write && rid->selector->may_change) {
-		save_flags(flags);
-		cli();	
+		spin_lock_irqsave(&driver_lock, flags);
 		awc_readrid(dev,rid,rid_dir->buff + rid->offset);
-		restore_flags(flags);
+		spin_unlock_irqrestore(&driver_lock, flags);
 	};
 	
 	if (rid->array > 1 || rid->bits > 32){
@@ -325,9 +326,8 @@
 		}
         }
 	if (write) {
-		save_flags(flags);
-		cli();	
-
+		spin_lock_irqsave(&driver_lock, flags);
+		
 		if (rid->selector->MAC_Disable_at_write){
 			awc_disable_MAC(dev);
 		};
@@ -335,8 +335,7 @@
 		if (rid->selector->MAC_Disable_at_write){
 			awc_enable_MAC(dev);
 		};
-		restore_flags(flags);
-
+		spin_lock_irqsave(&driver_lock, flags);
 	};
 
        	DEBUG(0x20000,"awc proc ret  %x \n",retv);
diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/amd8111e.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,1651 @@
+
+/* Advanced  Micro Devices Inc. AMD8111E Linux Network Driver 
+ * Copyright (C) 2002 Advanced Micro Devices 
+ *
+ * 
+ * Copyright 2001,2002 Jeff Garzik <jgarzik@mandrakesoft.com> [ 8139cp.c,tg3.c ]
+ * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com)[ tg3.c]
+ * Copyright 1996-1999 Thomas Bogendoerfer [ pcnet32.c ]
+ * Derived from the lance driver written 1993,1994,1995 by Donald Becker.
+ * Copyright 1993 United States Government as represented by the
+ *	Director, National Security Agency.[ pcnet32.c ]
+ * Carsten Langgaard, carstenl@mips.com [ pcnet32.c ]
+ * Copyright (C) 2000 MIPS Technologies, Inc.  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.
+ *
+ * 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
+  
+Module Name:
+
+	amd8111e.c
+
+Abstract:
+	
+ 	 AMD8111 based 10/100 Ethernet Controller Driver. 
+
+Environment:
+
+	Kernel Mode
+
+Revision History:
+
+*/
+
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/compiler.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/pci.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/ethtool.h>
+#include <linux/mii.h>
+#include <linux/if_vlan.h>
+#include <linux/ctype.h>	
+#include <linux/crc32.h>
+
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/byteorder.h>
+#include <asm/uaccess.h>
+
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#define AMD8111E_VLAN_TAG_USED 1
+#else
+#define AMD8111E_VLAN_TAG_USED 0
+#endif
+
+#include "amd8111e.h"
+#define MODULE_NAME	"amd8111e"
+#define MODULE_VERSION	"3.0.0"
+MODULE_AUTHOR("Advanced Micro Devices, Inc.");
+MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version 3.0.0"); 
+MODULE_LICENSE("GPL");
+
+MODULE_PARM(speed_duplex, "1-" __MODULE_STRING (MAX_UNITS) "i");
+MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotitate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
+
+static struct pci_device_id amd8111e_pci_tbl[] __devinitdata = {
+		
+	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD8111E_7462,
+	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+	{ 0, }
+
+};
+
+/*
+This function will set PHY speed. During initialization sets the original speed to 100 full.
+*/
+static void amd8111e_set_ext_phy(struct net_device *dev)
+{
+	struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+	unsigned long  reg_val = 0;
+	void * mmio = lp->mmio;
+	struct amd8111e_link_config *link_config = &lp->link_config;
+	
+	if(!lp->opened){
+		/* Initializing SPEED_100 and DUPLEX_FULL as original values */
+		link_config->orig_speed = SPEED_100;
+		link_config->orig_duplex = DUPLEX_FULL;
+		link_config->orig_phy_option = XPHYSP |XPHYFD;
+	}
+	reg_val = lp->ext_phy_option;
+
+	/* Disable port manager */
+	writel((u32) EN_PMGR, mmio + CMD3 );
+
+	/* Reset PHY */
+	writel((u32)XPHYRST | lp->ext_phy_option, mmio + CTRL2);
+
+	/* Enable port manager */
+	writel((u32)VAL1 | EN_PMGR, mmio + CMD3 );
+}
+
+/* 
+This function will unmap skb->data space and will free 
+all transmit and receive skbuffs.
+*/
+static int amd8111e_free_skbs(struct net_device *dev)
+{
+	struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+	struct sk_buff* rx_skbuff;
+	int i;
+
+	/* Freeing transmit skbs */
+	for(i = 0; i < NUM_TX_BUFFERS; i++){
+		if(lp->tx_skbuff[i]){
+			pci_unmap_single(lp->pci_dev,lp->tx_dma_addr[i],					lp->tx_skbuff[i]->len,PCI_DMA_TODEVICE);
+			dev_kfree_skb (lp->tx_skbuff[i]);
+			lp->tx_skbuff[i] = NULL;
+			lp->tx_dma_addr[i] = 0;
+		}
+	}
+	/* Freeing previously allocated receive buffers */
+	for (i = 0; i < NUM_RX_BUFFERS; i++){
+		rx_skbuff = lp->rx_skbuff[i];
+		if(rx_skbuff != NULL){
+			pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[i],
+				  lp->rx_buff_len - 2,PCI_DMA_FROMDEVICE);
+			dev_kfree_skb(lp->rx_skbuff[i]);
+			lp->rx_skbuff[i] = NULL;
+			lp->rx_dma_addr[i] = 0;
+		}
+	}
+	
+	return 0;
+}
+
+/*
+ This will set the receive buffer length corresponding to the mtu size of network interface.
+*/
+static inline void amd8111e_set_rx_buff_len(struct net_device* dev)
+{
+	struct amd8111e_priv* lp = dev->priv;
+	unsigned int mtu = dev->mtu;
+	
+	if (mtu > ETH_DATA_LEN){
+		/* MTU + ethernet header + FCS + optional VLAN tag */
+		lp->rx_buff_len = mtu + ETH_HLEN + 8;
+		lp->options |= OPTION_JUMBO_ENABLE;
+	} else{
+		lp->rx_buff_len = PKT_BUFF_SZ;
+		lp->options &= ~OPTION_JUMBO_ENABLE;
+	}
+}
+
+/* 
+This function will free all the previously allocated buffers, determine new receive buffer length  and will allocate new receive buffers. This function also allocates and initializes both the transmitter and receive hardware descriptors.
+ */
+static int amd8111e_init_ring(struct net_device *dev)
+{
+	struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+	int i;
+
+	lp->rx_idx = lp->tx_idx = 0;
+	lp->tx_complete_idx = 0;
+	lp->tx_ring_idx = 0;
+	
+
+	if(lp->opened)
+		/* Free previously allocated transmit and receive skbs */
+		amd8111e_free_skbs(dev);	
+
+	else{
+		 /* allocate the tx and rx descriptors */
+	     	if((lp->tx_ring = pci_alloc_consistent(lp->pci_dev, 
+			sizeof(struct amd8111e_tx_dr)*NUM_TX_RING_DR,
+			&lp->tx_ring_dma_addr)) == NULL)
+		
+			goto err_no_mem;
+	
+	     	if((lp->rx_ring = pci_alloc_consistent(lp->pci_dev, 
+			sizeof(struct amd8111e_rx_dr)*NUM_RX_RING_DR,
+			&lp->rx_ring_dma_addr)) == NULL)
+		
+			goto err_free_tx_ring;
+
+	}
+	/* Set new receive buff size */
+	amd8111e_set_rx_buff_len(dev);
+
+	/* Allocating receive  skbs */
+	for (i = 0; i < NUM_RX_BUFFERS; i++) {
+
+		if (!(lp->rx_skbuff[i] = dev_alloc_skb(lp->rx_buff_len))) {
+				/* Release previos allocated skbs */
+				for(--i; i >= 0 ;i--)
+					dev_kfree_skb(lp->rx_skbuff[i]);
+				goto err_free_rx_ring;
+		}
+		skb_reserve(lp->rx_skbuff[i],2);
+	}
+        /* Initilaizing receive descriptors */
+	for (i = 0; i < NUM_RX_BUFFERS; i++) {
+		lp->rx_dma_addr[i] = pci_map_single(lp->pci_dev, 
+			lp->rx_skbuff[i]->data,lp->rx_buff_len-2, PCI_DMA_FROMDEVICE);
+
+		lp->rx_ring[i].buff_phy_addr = cpu_to_le32(lp->rx_dma_addr[i]);
+		lp->rx_ring[i].buff_count = cpu_to_le16(lp->rx_buff_len);
+		lp->rx_ring[i].rx_dr_offset10 = cpu_to_le16(OWN_BIT);
+	}
+
+	/* Initializing transmit descriptors */
+	for (i = 0; i < NUM_TX_RING_DR; i++) {
+		lp->tx_ring[i].buff_phy_addr = 0;
+		lp->tx_ring[i].tx_dr_offset2 = 0;
+		lp->tx_ring[i].buff_count = 0;
+	}
+
+	return 0;
+
+err_free_rx_ring:
+	
+	pci_free_consistent(lp->pci_dev, 
+		sizeof(struct amd8111e_rx_dr)*NUM_RX_RING_DR,lp->rx_ring,
+		lp->rx_ring_dma_addr);
+
+err_free_tx_ring:
+	
+	pci_free_consistent(lp->pci_dev,
+		 sizeof(struct amd8111e_tx_dr)*NUM_TX_RING_DR,lp->tx_ring, 
+		 lp->tx_ring_dma_addr);
+
+err_no_mem:
+	return -ENOMEM;
+}
+/* 
+This function initializes the device registers  and starts the device.  
+*/
+static int amd8111e_restart(struct net_device *dev)
+{
+	struct amd8111e_priv *lp = (struct amd8111e_priv* )dev->priv;
+	void * mmio = lp->mmio;
+	int i,reg_val;
+
+	/* stop the chip */
+	 writel(RUN, mmio + CMD0);
+
+	if(amd8111e_init_ring(dev))
+		return -ENOMEM;
+	
+	amd8111e_set_ext_phy(dev);
+
+	/* set control registers */
+	reg_val = readl(mmio + CTRL1);
+	
+	writel( reg_val| XMTSP_128 | CACHE_ALIGN | B1_MASK, mmio + CTRL1 );
+
+	/* enable interrupt */
+	writel( APINT5EN | APINT4EN | APINT3EN | APINT2EN | APINT1EN | 
+		APINT0EN | MIIPDTINTEN | MCCIINTEN | MCCINTEN | MREINTEN |
+		SPNDINTEN | MPINTEN | SINTEN | STINTEN, mmio + INTEN0);
+
+	writel(VAL3 | LCINTEN | VAL1 | TINTEN0 | VAL0 | RINTEN0, mmio + INTEN0);
+
+	/* initialize tx and rx ring base addresses */
+	writel((u32)lp->tx_ring_dma_addr,mmio + XMT_RING_BASE_ADDR0);
+	writel((u32)lp->rx_ring_dma_addr,mmio+ RCV_RING_BASE_ADDR0);
+
+	writew((u32)NUM_TX_RING_DR, mmio + XMT_RING_LEN0);
+	writew((u16)NUM_RX_RING_DR, mmio + RCV_RING_LEN0);
+
+	if(lp->options & OPTION_JUMBO_ENABLE){
+		writel((u32)VAL2|JUMBO, mmio + CMD3);
+		/* Reset REX_UFLO */
+		writel( REX_UFLO, mmio + CMD2);
+		/* Should not set REX_UFLO for jumbo frames */
+		writel( VAL0 | APAD_XMT | REX_RTRY, mmio + CMD2);
+	}else
+		writel( VAL0 | APAD_XMT | REX_RTRY|REX_UFLO, mmio + CMD2);
+
+#if AMD8111E_VLAN_TAG_USED
+	writel((u32) VAL2|VSIZE|VL_TAG_DEL, mmio + CMD3);
+#endif
+	writel( VAL0 | APAD_XMT | REX_RTRY, mmio + CMD2 );
+	
+	/* Setting the MAC address to the device */
+	for(i = 0; i < ETH_ADDR_LEN; i++)
+		writeb( dev->dev_addr[i], mmio + PADR + i ); 
+	
+	/* set RUN bit to start the chip */
+	writel(VAL2 | RDMD0, mmio + CMD0);
+	writel(VAL0 | INTREN | RUN, mmio + CMD0);
+	
+	return 0;
+}
+/* 
+This function clears necessary the device registers. 
+*/	
+static void amd8111e_init_hw_default( struct amd8111e_priv* lp)
+{
+	unsigned int reg_val;
+	unsigned int logic_filter[2] ={0,};
+	void * mmio = lp->mmio;
+
+
+	/* AUTOPOLL0 Register *//*TBD default value is 8100 in FPS */
+	writew( 0x8101, mmio + AUTOPOLL0);
+
+	/* Clear RCV_RING_BASE_ADDR */
+	writel(0, mmio + RCV_RING_BASE_ADDR0);
+
+	/* Clear XMT_RING_BASE_ADDR */
+	writel(0, mmio + XMT_RING_BASE_ADDR0);
+	writel(0, mmio + XMT_RING_BASE_ADDR1);
+	writel(0, mmio + XMT_RING_BASE_ADDR2);
+	writel(0, mmio + XMT_RING_BASE_ADDR3);
+
+	/* Clear CMD0  */
+	writel(CMD0_CLEAR,mmio + CMD0);
+	
+	/* Clear CMD2 */
+	writel(CMD2_CLEAR, mmio +CMD2);
+
+	/* Clear CMD7 */
+	writel(CMD7_CLEAR , mmio + CMD7);
+
+	/* Clear DLY_INT_A and DLY_INT_B */
+	writel(0x0, mmio + DLY_INT_A);
+	writel(0x0, mmio + DLY_INT_B);
+
+	/* Clear FLOW_CONTROL */
+	writel(0x0, mmio + FLOW_CONTROL);
+
+	/* Clear INT0  write 1 to clear register */
+	reg_val = readl(mmio + INT0);
+	writel(reg_val, mmio + INT0);
+
+	/* Clear STVAL */
+	writel(0x0, mmio + STVAL);
+
+	/* Clear INTEN0 */
+	writel( INTEN0_CLEAR, mmio + INTEN0);
+
+	/* Clear LADRF */
+	writel(0x0 , mmio + LADRF);
+
+	/* Set SRAM_SIZE & SRAM_BOUNDARY registers  */
+	writel( 0x80010,mmio + SRAM_SIZE);
+
+	/* Clear RCV_RING0_LEN */
+	writel(0x0, mmio +  RCV_RING_LEN0);
+
+	/* Clear XMT_RING0/1/2/3_LEN */
+	writel(0x0, mmio +  XMT_RING_LEN0);
+	writel(0x0, mmio +  XMT_RING_LEN1);
+	writel(0x0, mmio +  XMT_RING_LEN2);
+	writel(0x0, mmio +  XMT_RING_LEN3);
+
+	/* Clear XMT_RING_LIMIT */
+	writel(0x0, mmio + XMT_RING_LIMIT);
+
+	/* Clear MIB */
+	writew(MIB_CLEAR, mmio + MIB_ADDR);
+
+	/* Clear LARF */
+	AMD8111E_WRITE_REG64(mmio, LADRF,logic_filter);
+
+	/* SRAM_SIZE register */
+	reg_val = readl(mmio + SRAM_SIZE);
+	
+	if(lp->options & OPTION_JUMBO_ENABLE)
+		writel( VAL2|JUMBO, mmio + CMD3);
+#if AMD8111E_VLAN_TAG_USED
+	writel(VAL2|VSIZE|VL_TAG_DEL, mmio + CMD3 );
+#endif
+	/* CMD2 register */
+	reg_val = readl(mmio + CMD2);
+
+}
+
+/* 
+This function disables the interrupt and clears all the pending 
+interrupts in INT0
+ */
+static void amd8111e_disable_interrupt(struct amd8111e_priv* lp)
+{	
+	u32 intr0;
+
+	/* Disable interrupt */
+	writel(INTREN, lp->mmio + CMD0);
+	
+	/* Clear INT0 */
+	intr0 = readl(lp->mmio + INT0);
+	writel(intr0, lp->mmio + INT0);
+
+}
+
+/*
+This function stops the chip. 
+*/
+static void amd8111e_stop_chip(struct amd8111e_priv* lp)
+{
+	writel(RUN, lp->mmio + CMD0);
+}
+
+/* 
+This function frees the  transmiter and receiver descriptor rings.
+*/
+static void amd8111e_free_ring(struct amd8111e_priv* lp)
+{	
+
+	/* Free transmit and receive skbs */
+	amd8111e_free_skbs(lp->amd8111e_net_dev);
+
+	/* Free transmit and receive descriptor rings */
+	if(lp->rx_ring){
+		pci_free_consistent(lp->pci_dev, 
+			sizeof(struct amd8111e_rx_dr)*NUM_RX_RING_DR,
+			lp->rx_ring, lp->rx_ring_dma_addr);
+		lp->rx_ring = NULL;
+	}
+	
+	if(lp->tx_ring){
+		pci_free_consistent(lp->pci_dev, 
+			sizeof(struct amd8111e_tx_dr)*NUM_TX_RING_DR,
+			lp->tx_ring, lp->tx_ring_dma_addr);
+
+		lp->tx_ring = NULL;
+	}
+
+}
+#if AMD8111E_VLAN_TAG_USED	
+/* 
+This is the receive indication function for packets with vlan tag.
+*/	
+static int amd8111e_vlan_rx(struct amd8111e_priv *lp, struct sk_buff *skb, u16 vlan_tag)
+{
+	return vlan_hwaccel_rx(skb, lp->vlgrp, vlan_tag);
+}
+#endif
+
+/*
+This function will free all the transmit skbs that are actually transmitted by the device. It will check the ownership of the skb before freeing the skb. 
+*/
+static int amd8111e_tx(struct net_device *dev)
+{
+	struct amd8111e_priv* lp = dev->priv;
+	int tx_index = lp->tx_complete_idx & TX_RING_DR_MOD_MASK;
+	int status;
+	
+	/* Complete all the transmit packet */
+	while (lp->tx_complete_idx != lp->tx_idx){
+		tx_index =  lp->tx_complete_idx & TX_RING_DR_MOD_MASK;
+		status = le16_to_cpu(lp->tx_ring[tx_index].tx_dr_offset2);
+
+		if(status & OWN_BIT)
+			break;	/* It still hasn't been Txed */
+
+		lp->tx_ring[tx_index].buff_phy_addr = 0;
+
+		/* We must free the original skb */
+		if (lp->tx_skbuff[tx_index]) {
+			pci_unmap_single(lp->pci_dev, lp->tx_dma_addr[tx_index],
+				  	lp->tx_skbuff[tx_index]->len,
+					PCI_DMA_TODEVICE);
+			dev_kfree_skb_irq (lp->tx_skbuff[tx_index]);
+			lp->tx_skbuff[tx_index] = 0;
+			lp->tx_dma_addr[tx_index] = 0;
+		}
+		lp->tx_complete_idx++;	
+
+		if (netif_queue_stopped(dev) &&
+			lp->tx_complete_idx > lp->tx_idx - NUM_TX_BUFFERS +2){
+			/* The ring is no longer full, clear tbusy. */
+			netif_wake_queue (dev);
+		}
+	}
+	return 0;
+}
+
+/* 
+This function will check the ownership of receive buffers and descriptors. It will indicate to kernel up to half the number of maximum receive buffers in the descriptor ring, in a single receive interrupt. It will also replenish the descriptors with new skbs.
+*/
+static int amd8111e_rx(struct net_device *dev)
+{
+	struct amd8111e_priv *lp = dev->priv;
+	struct sk_buff *skb,*new_skb;
+	int rx_index = lp->rx_idx & RX_RING_DR_MOD_MASK;
+	int min_pkt_len, status;
+	int num_rx_pkt = 0;
+	int max_rx_pkt = NUM_RX_BUFFERS/2;
+	short pkt_len;
+#if AMD8111E_VLAN_TAG_USED		
+	short vtag;
+#endif
+	
+	/* If we own the next entry, it's a new packet. Send it up. */
+	while(++num_rx_pkt <= max_rx_pkt){
+		if(lp->rx_ring[rx_index].rx_dr_offset10 & OWN_BIT)
+			return 0;
+	       
+		/* check if err summary bit is set */ 
+		if(le16_to_cpu(lp->rx_ring[rx_index].rx_dr_offset10) & ERR_BIT){
+			/* 
+			 * There is a tricky error noted by John Murphy,
+			 * <murf@perftech.com> to Russ Nelson: Even with full-sized
+			 * buffers it's possible for a jabber packet to use two
+			 * buffers, with only the last correctly noting the error.			 */
+			/* reseting flags */
+			lp->rx_ring[rx_index].rx_dr_offset10 &= 
+						cpu_to_le16(RESET_RX_FLAGS);
+			goto err_next_pkt;
+		}
+		/* check for STP and ENP */
+		status = le16_to_cpu(lp->rx_ring[rx_index].rx_dr_offset10);
+		if(!((status & STP_BIT) && (status & ENP_BIT))){
+			/* reseting flags */
+			lp->rx_ring[rx_index].rx_dr_offset10 &= 
+						cpu_to_le16(RESET_RX_FLAGS);
+			goto err_next_pkt;
+		}
+		pkt_len = le16_to_cpu(lp->rx_ring[rx_index].msg_count) - 4;
+
+#if AMD8111E_VLAN_TAG_USED		
+		vtag = le16_to_cpu(lp->rx_ring[rx_index].rx_dr_offset10) & TT_MASK;
+		/*MAC will strip vlan tag*/ 
+		if(lp->vlgrp != NULL && vtag !=0)
+			min_pkt_len =MIN_PKT_LEN - 4;
+		else
+#endif
+			min_pkt_len =MIN_PKT_LEN;
+
+		if (pkt_len < min_pkt_len) {
+			lp->rx_ring[rx_index].rx_dr_offset10 &= 
+				cpu_to_le16(RESET_RX_FLAGS);
+			lp->stats.rx_errors++;
+			goto err_next_pkt;
+		}
+		if(!(new_skb = dev_alloc_skb(lp->rx_buff_len))){
+			/* if allocation fail, 
+				ignore that pkt and go to next one */
+			lp->rx_ring[rx_index].rx_dr_offset10 &= 
+				cpu_to_le16(RESET_RX_FLAGS);
+			lp->stats.rx_errors++;
+			goto err_next_pkt;
+		}
+		
+		skb_reserve(new_skb, 2);
+		skb = lp->rx_skbuff[rx_index];
+		pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[rx_index],
+			lp->rx_buff_len-2, PCI_DMA_FROMDEVICE);
+		skb_put(skb, pkt_len);
+		skb->dev = dev;
+		lp->rx_skbuff[rx_index] = new_skb;
+		new_skb->dev = dev;
+		lp->rx_dma_addr[rx_index] = pci_map_single(lp->pci_dev,
+			new_skb->data, lp->rx_buff_len-2,PCI_DMA_FROMDEVICE);
+	
+		skb->protocol = eth_type_trans(skb, dev);
+
+#if AMD8111E_VLAN_TAG_USED		
+		
+		vtag = lp->rx_ring[rx_index].rx_dr_offset10 & TT_MASK;
+		if(lp->vlgrp != NULL && (vtag == TT_VLAN_TAGGED)){
+			amd8111e_vlan_rx(lp, skb,
+				    lp->rx_ring[rx_index].tag_ctrl_info);
+		} else
+#endif
+			
+			dev->last_rx = jiffies;
+			netif_rx (skb);
+	
+err_next_pkt:
+		lp->rx_ring[rx_index].buff_phy_addr
+			 = cpu_to_le32(lp->rx_dma_addr[rx_index]);
+		lp->rx_ring[rx_index].buff_count = 
+				cpu_to_le16(lp->rx_buff_len-2);
+		lp->rx_ring[rx_index].rx_dr_offset10 |= cpu_to_le16(OWN_BIT);
+		rx_index = (++lp->rx_idx) & RX_RING_DR_MOD_MASK;
+	}
+
+	return 0;
+}
+
+/* 
+This function will store the original speed to restore later, if autoneg is turned on. This speed will be set later when the autoneg is turned off. If the link status indicates that link is down, that will be indicated to the kernel */
+
+static int amd8111e_link_change(struct net_device* dev)
+{	
+	struct amd8111e_priv *lp = dev->priv;
+	int status0,speed;
+
+	/* read the link change */
+     	status0 = readl(lp->mmio + STAT0);
+	
+	if(status0 & LINK_STATS){
+		if(status0 & AUTONEG_COMPLETE){
+			/* keeping the original speeds */
+			if((lp->link_config.speed != SPEED_INVALID)&&
+				(lp->link_config.duplex != DUPLEX_INVALID)){
+			lp->link_config.orig_speed = lp->link_config.speed;
+			lp->link_config.orig_duplex = lp->link_config.duplex;
+			lp->link_config.orig_phy_option = lp->ext_phy_option;
+			}
+	
+			lp->link_config.speed = SPEED_INVALID;
+			lp->link_config.duplex = DUPLEX_INVALID;
+			lp->link_config.autoneg = AUTONEG_ENABLE;
+			netif_carrier_on(dev);
+			return 0;
+		}
+		if(status0 & FULL_DPLX)
+			lp->link_config.duplex = DUPLEX_FULL;
+		else 
+			lp->link_config.duplex = DUPLEX_HALF;
+		speed = (status0 & SPEED_MASK) >> 7;
+		if(speed == PHY_SPEED_10)
+			lp->link_config.speed = SPEED_10;
+		else if(speed == PHY_SPEED_100)
+			lp->link_config.speed = SPEED_100;
+		lp->link_config.autoneg = AUTONEG_DISABLE;
+		netif_carrier_on(dev);
+	}
+	else{	
+		lp->link_config.speed = SPEED_INVALID;
+		lp->link_config.duplex = DUPLEX_INVALID;
+		lp->link_config.autoneg = AUTONEG_INVALID;
+		netif_carrier_off(dev);
+	}
+		
+	return 0;
+}
+/*
+This function reads the mib counters. 	 
+*/
+static int amd8111e_read_mib(void* mmio, u8 MIB_COUNTER)
+{
+	unsigned int  status;
+	unsigned  int data;
+	unsigned int repeat = REPEAT_CNT;
+
+	writew( MIB_RD_CMD | MIB_COUNTER, mmio + MIB_ADDR);
+	do {
+		status = readw(mmio + MIB_ADDR);
+		udelay(2);	/* controller takes MAX 2 us to get mib data */
+	}
+	while (--repeat && (status & MIB_CMD_ACTIVE));
+
+	data = readl(mmio + MIB_DATA);
+	return data;
+}
+
+/*
+This function retuurns the reads the mib registers and returns the hardware statistics. It adds the previous statistics with new values.*/ 
+static struct net_device_stats *amd8111e_get_stats(struct net_device * dev)
+{
+	struct amd8111e_priv *lp = dev->priv;
+	void * mmio = lp->mmio;
+	unsigned long flags;
+	struct net_device_stats *prev_stats = &lp->prev_stats;
+	struct net_device_stats* new_stats = &lp->stats;
+	
+	if(!lp->opened)
+		return prev_stats;	
+	spin_lock_irqsave (&lp->lock, flags);
+
+	/* stats.rx_packets */
+	new_stats->rx_packets = prev_stats->rx_packets+
+		amd8111e_read_mib(mmio, rcv_broadcast_pkts)+
+		amd8111e_read_mib(mmio, rcv_multicast_pkts)+
+		amd8111e_read_mib(mmio, rcv_unicast_pkts);
+
+	/* stats.tx_packets */
+	new_stats->tx_packets = prev_stats->tx_packets+
+		amd8111e_read_mib(mmio, xmt_packets);
+
+	/*stats.rx_bytes */
+	new_stats->rx_bytes = prev_stats->rx_bytes+
+		amd8111e_read_mib(mmio, rcv_octets);
+
+	/* stats.tx_bytes */
+	new_stats->tx_bytes = prev_stats->tx_bytes+
+		amd8111e_read_mib(mmio, xmt_octets);
+
+	/* stats.rx_errors */
+	new_stats->rx_errors = prev_stats->rx_errors+
+		amd8111e_read_mib(mmio, rcv_undersize_pkts)+
+		amd8111e_read_mib(mmio, rcv_fragments)+
+		amd8111e_read_mib(mmio, rcv_jabbers)+
+		amd8111e_read_mib(mmio, rcv_alignment_errors)+
+		amd8111e_read_mib(mmio, rcv_fcs_errors)+
+		amd8111e_read_mib(mmio, rcv_miss_pkts);
+
+	/* stats.tx_errors */
+	new_stats->tx_errors = prev_stats->tx_errors+
+		amd8111e_read_mib(mmio, xmt_underrun_pkts);
+
+	/* stats.rx_dropped*/
+	new_stats->rx_dropped = prev_stats->rx_dropped+
+		amd8111e_read_mib(mmio, rcv_miss_pkts);
+
+	/* stats.tx_dropped*/
+	new_stats->tx_dropped = prev_stats->tx_dropped+
+		amd8111e_read_mib(mmio,  xmt_underrun_pkts);
+
+	/* stats.multicast*/
+	new_stats->multicast = prev_stats->multicast+
+		amd8111e_read_mib(mmio, rcv_multicast_pkts);
+
+	/* stats.collisions*/
+	new_stats->collisions = prev_stats->collisions+
+		amd8111e_read_mib(mmio, xmt_collisions);
+
+	/* stats.rx_length_errors*/
+	new_stats->rx_length_errors = prev_stats->rx_length_errors+
+		amd8111e_read_mib(mmio, rcv_undersize_pkts)+
+		amd8111e_read_mib(mmio, rcv_oversize_pkts);
+
+	/* stats.rx_over_errors*/
+	new_stats->rx_over_errors = prev_stats->rx_over_errors+
+		amd8111e_read_mib(mmio, rcv_miss_pkts);
+
+	/* stats.rx_crc_errors*/
+	new_stats->rx_crc_errors = prev_stats->rx_crc_errors+
+		amd8111e_read_mib(mmio, rcv_fcs_errors);
+
+	/* stats.rx_frame_errors*/
+	new_stats->rx_frame_errors = prev_stats->rx_frame_errors+
+		amd8111e_read_mib(mmio, rcv_alignment_errors);
+
+	/* stats.rx_fifo_errors */
+	new_stats->rx_fifo_errors = prev_stats->rx_fifo_errors+
+		amd8111e_read_mib(mmio, rcv_miss_pkts);
+
+	/* stats.rx_missed_errors */
+	new_stats->rx_missed_errors = prev_stats->rx_missed_errors+
+		amd8111e_read_mib(mmio, rcv_miss_pkts);
+
+	/* stats.tx_aborted_errors*/
+	new_stats->tx_aborted_errors = prev_stats->tx_aborted_errors+
+		amd8111e_read_mib(mmio, xmt_excessive_collision);
+
+	/* stats.tx_carrier_errors*/
+	new_stats->tx_carrier_errors = prev_stats->tx_carrier_errors+
+		amd8111e_read_mib(mmio, xmt_loss_carrier);
+
+	/* stats.tx_fifo_errors*/
+	new_stats->tx_fifo_errors = prev_stats->tx_fifo_errors+
+		amd8111e_read_mib(mmio, xmt_underrun_pkts);
+
+	/* stats.tx_window_errors*/
+	new_stats->tx_window_errors = prev_stats->tx_window_errors+
+		amd8111e_read_mib(mmio, xmt_late_collision);
+
+	spin_unlock_irqrestore (&lp->lock, flags);
+
+	return new_stats;
+}
+
+/*
+This is device interrupt function. It handles transmit, receive and link change interrupts.
+*/
+static void amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+
+	struct net_device * dev = (struct net_device *) dev_id;
+	struct amd8111e_priv *lp = dev->priv;
+	void * mmio = lp->mmio;
+	unsigned int intr0;
+
+	if(dev == NULL)
+		return;
+
+	spin_lock (&lp->lock);
+	/* disabling interrupt */
+	writel(INTREN, mmio + CMD0);
+
+	/* Read interrupt status */
+	intr0 = readl(mmio + INT0);
+
+	/* Process all the INT event until INTR bit is clear. */
+
+	if (!(intr0 & INTR))
+		goto err_no_interrupt;
+		 
+	/* Current driver processes 3 interrupts : RINT,TINT,LCINT */
+	writel(intr0, mmio + INT0);
+
+	/* Check if Receive Interrupt has occurred. */
+	if(intr0 & RINT0){
+		amd8111e_rx(dev);
+		writel(VAL2 | RDMD0, mmio + CMD0);
+	}
+
+	/* Check if  Transmit Interrupt has occurred. */
+	if(intr0 & TINT0)
+		amd8111e_tx(dev);
+		
+	/* Check if  Link Change Interrupt has occurred. */
+	if (intr0 & LCINT)
+		amd8111e_link_change(dev);
+	
+err_no_interrupt:
+	writel( VAL0 | INTREN,mmio + CMD0);
+	spin_unlock(&lp->lock);
+	return;
+
+}
+/*
+This function closes the network interface and copies the new set of statistics into the previous statistics structure so that most recent statistics will be available after the interface is down.
+*/
+static int amd8111e_close(struct net_device * dev)
+{
+	struct amd8111e_priv *lp = dev->priv;
+	netif_stop_queue(dev);
+	
+	spin_lock_irq(&lp->lock);
+	
+	amd8111e_disable_interrupt(lp);
+	amd8111e_stop_chip(lp);
+	amd8111e_free_ring(lp);
+	
+	netif_carrier_off(lp->amd8111e_net_dev);
+
+	spin_unlock_irq(&lp->lock);
+
+	free_irq(dev->irq, dev);
+	memcpy(&lp->prev_stats,amd8111e_get_stats(dev), sizeof(lp->prev_stats));
+	lp->opened = 0;
+	return 0;
+}
+/* This function opens new interface.It requests irq for the device, initializes the device,buffers and descriptors, and starts the device. 
+*/
+static int amd8111e_open(struct net_device * dev )
+{
+	struct amd8111e_priv *lp = (struct amd8111e_priv *)dev->priv;
+
+	if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ,
+					 dev->name, dev)) 
+		return -EAGAIN;
+
+	spin_lock_irq(&lp->lock);
+
+	amd8111e_init_hw_default(lp);
+
+	if(amd8111e_restart(dev)){
+		spin_unlock_irq(&lp->lock);
+		return -ENOMEM;
+	}
+	
+	lp->opened = 1;
+
+	spin_unlock_irq(&lp->lock);
+
+	netif_start_queue(dev);
+
+	return 0;		
+}
+/* 
+This function checks if there is any transmit  descriptors available to queue more packet.
+*/
+static int amd8111e_tx_queue_avail(struct amd8111e_priv* lp )
+{	
+	int tx_index = lp->tx_idx & TX_BUFF_MOD_MASK;
+	if(lp->tx_skbuff[tx_index] != 0)
+		return -1;
+	else
+		return 0;
+	
+}
+/* 
+This function will queue the transmit packets to the descriptors and will trigger the send operation. It also initializes the transmit descriptors with buffer physical address, byte count, ownership to hardware etc.
+*/
+
+static int amd8111e_start_xmit(struct sk_buff *skb, struct net_device * dev)
+{
+	struct amd8111e_priv *lp = dev->priv;
+	int tx_index;
+	unsigned long flags;
+
+	spin_lock_irqsave(&lp->lock, flags);
+
+	tx_index = lp->tx_idx & TX_RING_DR_MOD_MASK;
+
+	lp->tx_ring[tx_index].buff_count = cpu_to_le16(skb->len);
+
+	lp->tx_skbuff[tx_index] = skb;
+	lp->tx_ring[tx_index].tx_dr_offset2 = 0;
+
+#if AMD8111E_VLAN_TAG_USED
+	if((lp->vlgrp != NULL) && vlan_tx_tag_present(skb)){
+
+		lp->tx_ring[tx_index].tag_ctrl_cmd |= 
+				cpu_to_le32(TCC_VLAN_INSERT);	
+		lp->tx_ring[tx_index].tag_ctrl_info = 
+				cpu_to_le16(vlan_tx_tag_get(skb));
+
+	}
+#endif
+	lp->tx_dma_addr[tx_index] =
+	    pci_map_single(lp->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE);
+	lp->tx_ring[tx_index].buff_phy_addr =
+	    (u32) cpu_to_le32(lp->tx_dma_addr[tx_index]);
+
+	/*  Set FCS and LTINT bits */
+	lp->tx_ring[tx_index].tx_dr_offset2 |=
+	    cpu_to_le16(OWN_BIT | STP_BIT | ENP_BIT|ADD_FCS_BIT|LTINT_BIT);
+
+	lp->tx_idx++;
+
+	/* Trigger an immediate send poll. */
+	writel( VAL1 | TDMD0, lp->mmio + CMD0);
+	writel( VAL2 | RDMD0,lp->mmio + CMD0);
+
+	dev->trans_start = jiffies;
+
+	if(amd8111e_tx_queue_avail(lp) < 0){
+		netif_stop_queue(dev);
+	}
+	spin_unlock_irqrestore(&lp->lock, flags);
+	return 0;
+}
+/*
+This function returns all the memory mapped registers of the device.
+*/
+static char* amd8111e_read_regs(struct amd8111e_priv* lp)
+{    	
+	void * mmio = lp->mmio;
+        unsigned char * reg_buff;
+
+     	int i;
+     
+     	reg_buff = kmalloc( AMD8111E_REG_DUMP_LEN,GFP_KERNEL);
+	if(NULL == reg_buff)
+		return NULL;
+    	for( i=0; i< AMD8111E_REG_DUMP_LEN;i+=4);
+		reg_buff[i]= readl(mmio + i);	
+	return reg_buff;
+}
+/*
+This function sets promiscuos mode, all-multi mode or the multicast address 
+list to the device.
+*/
+static void amd8111e_set_multicast_list(struct net_device *dev)
+{
+	struct dev_mc_list* mc_ptr;
+	struct amd8111e_priv *lp = dev->priv;
+	u32 mc_filter[2] ;
+	int i,bit_num;
+
+	if(dev->flags & IFF_PROMISC){
+		printk("%s: Setting  promiscuous mode.\n",dev->name);
+		writel( VAL2 | PROM, lp->mmio + CMD2);
+		return;
+	}
+	else
+		writel( PROM, lp->mmio + CMD2);
+	if(dev->flags & IFF_ALLMULTI || dev->mc_count > MAX_FILTER_SIZE){
+		/* get all multicast packet */
+		mc_filter[1] = mc_filter[0] = 0xffffffff;
+		lp->mc_list = dev->mc_list;
+		lp->options |= OPTION_MULTICAST_ENABLE;
+		AMD8111E_WRITE_REG64(lp->mmio, LADRF,mc_filter);
+		return;
+	}
+	if( dev->mc_count == 0 ){
+		/* get only own packets */
+		mc_filter[1] = mc_filter[0] = 0;
+		lp->mc_list = 0;
+		lp->options &= ~OPTION_MULTICAST_ENABLE;
+		AMD8111E_WRITE_REG64(lp->mmio, LADRF,mc_filter);
+		/* disable promiscous mode */
+		writel(PROM, lp->mmio + CMD2);
+		return;
+	}
+	/* load all the multicast addresses in the logic filter */
+	lp->options |= OPTION_MULTICAST_ENABLE;
+	lp->mc_list = dev->mc_list;
+	mc_filter[1] = mc_filter[0] = 0;
+	for (i = 0, mc_ptr = dev->mc_list; mc_ptr && i < dev->mc_count;
+		     i++, mc_ptr = mc_ptr->next) {
+		bit_num = ether_crc(ETH_ALEN, mc_ptr->dmi_addr) >> 26;
+			
+		mc_filter[bit_num >> 5] |= 1 << (bit_num & 31);
+	}	
+
+	AMD8111E_WRITE_REG64(lp->mmio, LADRF, mc_filter);
+	return;
+}
+/*
+This function handles all the  ethtool ioctls. It gives driver info, gets/sets driver speed, gets memory mapped register values, forces auto negotiation, sets/gets WOL options for ethtool application. 
+*/
+	
+static int amd8111e_ethtool_ioctl(struct net_device* dev, void* useraddr)
+{
+	struct amd8111e_priv *lp = dev->priv;
+	struct pci_dev *pci_dev = lp->pci_dev;
+	u32 ethcmd;
+	
+	if( useraddr == NULL) 
+		return -EINVAL;
+	if(copy_from_user (&ethcmd, useraddr, sizeof (ethcmd)))
+		return -EFAULT;
+	
+	switch(ethcmd){
+	
+	case ETHTOOL_GDRVINFO:{
+		struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
+		strcpy (info.driver, MODULE_NAME);
+		strcpy (info.version, MODULE_VERSION);
+		memset(&info.fw_version, 0, sizeof(info.fw_version));
+		strcpy (info.bus_info, pci_dev->slot_name);
+		info.eedump_len = 0;
+		info.regdump_len = AMD8111E_REG_DUMP_LEN;
+		if (copy_to_user (useraddr, &info, sizeof(info)))
+			return -EFAULT;
+		return 0;
+	}
+	case ETHTOOL_GSET:{
+		struct ethtool_cmd cmd = { ETHTOOL_GSET };
+
+		if (!lp->opened) 
+			return -EAGAIN;
+
+		cmd.supported = SUPPORTED_Autoneg |
+				SUPPORTED_100baseT_Half |
+				SUPPORTED_100baseT_Full |
+			  	SUPPORTED_10baseT_Half |
+			        SUPPORTED_10baseT_Full |
+			        SUPPORTED_MII;
+
+		cmd.advertising = ADVERTISED_Autoneg |
+				ADVERTISED_100baseT_Half |
+				ADVERTISED_100baseT_Full |
+			  	ADVERTISED_10baseT_Half |
+			        ADVERTISED_10baseT_Full |
+			        ADVERTISED_MII;
+		cmd.speed = lp->link_config.speed;
+		cmd.duplex = lp->link_config.duplex;
+		cmd.port = 0;
+		cmd.phy_address = PHY_ID;
+		cmd.transceiver = XCVR_EXTERNAL;
+		cmd.autoneg = lp->link_config.autoneg;
+		cmd.maxtxpkt = 0; /* not implemented interrupt coalasing */
+		cmd.maxrxpkt = 0; /* not implemented interrupt coalasing */
+		if (copy_to_user(useraddr, &cmd, sizeof(cmd)))
+			return -EFAULT;
+		return 0;
+		}
+	case ETHTOOL_SSET: {
+	
+		struct ethtool_cmd cmd;
+
+		if (!lp->opened)
+			return -EAGAIN;
+		if (copy_from_user(&cmd, useraddr, sizeof(cmd)))
+			return -EFAULT;
+
+		spin_lock_irq(&lp->lock);
+
+		if(cmd.autoneg == AUTONEG_ENABLE){
+			/* keeping the original speeds */
+			if((lp->link_config.speed != SPEED_INVALID)&&
+				(lp->link_config.duplex != DUPLEX_INVALID)){
+			lp->link_config.orig_speed = lp->link_config.speed;
+			lp->link_config.orig_duplex = lp->link_config.duplex;
+			lp->link_config.orig_phy_option = lp->ext_phy_option;
+			}
+
+			lp->ext_phy_option = XPHYANE;
+		}
+		else if(cmd.speed == SPEED_100 && cmd.duplex ==  DUPLEX_HALF)
+			lp->ext_phy_option = XPHYSP;
+		else if(cmd.speed == SPEED_100 && cmd.duplex ==  DUPLEX_FULL)
+			lp->ext_phy_option = XPHYSP |XPHYFD;
+		else if(cmd.speed == SPEED_10 && cmd.duplex ==  DUPLEX_HALF)
+			lp->ext_phy_option = 0;
+		else if(cmd.speed == SPEED_10 && cmd.duplex ==  DUPLEX_FULL)
+			lp->ext_phy_option = XPHYFD;
+		else {	
+			/* setting the original speed */
+			cmd.speed = lp->link_config.orig_speed;
+			cmd.duplex = lp->link_config.orig_duplex;
+			lp->ext_phy_option = lp->link_config.orig_phy_option;
+		}
+		lp->link_config.autoneg = cmd.autoneg;
+		if (cmd.autoneg == AUTONEG_ENABLE) {
+			
+			lp->link_config.speed = SPEED_INVALID;
+			lp->link_config.duplex = DUPLEX_INVALID;
+		} else {
+			lp->link_config.speed = cmd.speed;
+			lp->link_config.duplex = cmd.duplex;
+		}
+		amd8111e_set_ext_phy(dev);
+		spin_unlock_irq(&lp->lock);
+		return 0;
+	}
+	case ETHTOOL_GREGS: {
+		struct ethtool_regs regs;
+		u8 *regbuf;
+		int ret;
+
+		if (copy_from_user(&regs, useraddr, sizeof(regs)))
+			return -EFAULT;
+		if (regs.len > AMD8111E_REG_DUMP_LEN)
+			regs.len = AMD8111E_REG_DUMP_LEN;
+		regs.version = 0;
+		if (copy_to_user(useraddr, &regs, sizeof(regs)))
+			return -EFAULT;
+
+		regbuf = amd8111e_read_regs(lp);
+		if (!regbuf)
+			return -ENOMEM;
+
+		useraddr += offsetof(struct ethtool_regs, data);
+		ret = 0;
+		if (copy_to_user(useraddr, regbuf, regs.len))
+			ret = -EFAULT;
+		kfree(regbuf);
+		return ret;
+	}
+	case ETHTOOL_NWAY_RST: {
+		int ret;
+		spin_lock_irq(&lp->lock);
+		if(lp->link_config.autoneg == AUTONEG_ENABLE){
+			lp->ext_phy_option = XPHYANE;
+			amd8111e_set_ext_phy(dev);
+			ret = 0;
+		}else
+			ret =  -EINVAL;
+		spin_unlock_irq(&lp->lock);
+		return ret;
+	}
+	case ETHTOOL_GLINK: {
+		struct ethtool_value val = { ETHTOOL_GLINK };
+
+		val.data = netif_carrier_ok(dev) ? 1 : 0;
+		if (copy_to_user(useraddr, &val, sizeof(val)))
+			return -EFAULT;
+	}
+	case ETHTOOL_GWOL: {
+		struct ethtool_wolinfo wol_info = { ETHTOOL_GWOL };
+
+		wol_info.supported = WAKE_MAGIC|WAKE_PHY;
+		wol_info.wolopts = 0;
+		if (lp->options & OPTION_WOL_ENABLE)
+			wol_info.wolopts = WAKE_MAGIC;
+		memset(&wol_info.sopass, 0, sizeof(wol_info.sopass));
+		if (copy_to_user(useraddr, &wol_info, sizeof(wol_info)))
+			return -EFAULT;
+		return 0;
+	}
+	case ETHTOOL_SWOL: {
+		struct ethtool_wolinfo wol_info;
+
+		if (copy_from_user(&wol_info, useraddr, sizeof(wol_info)))
+			return -EFAULT;
+		if (wol_info.wolopts & ~(WAKE_MAGIC |WAKE_PHY))
+			return -EINVAL;
+		spin_lock_irq(&lp->lock);
+		if(wol_info.wolopts & WAKE_MAGIC)
+			lp->options |= 
+				(OPTION_WOL_ENABLE | OPTION_WAKE_MAGIC_ENABLE);
+		else if(wol_info.wolopts & WAKE_PHY)
+			lp->options |= 
+				(OPTION_WOL_ENABLE | OPTION_WAKE_PHY_ENABLE);
+		else
+			lp->options &= ~OPTION_WOL_ENABLE; 
+		spin_unlock_irq(&lp->lock);
+		return 0;
+	}
+	
+	default:
+		break;
+	}
+		return -EOPNOTSUPP;
+}
+static int amd8111e_read_phy(struct amd8111e_priv* lp, int phy_id, int reg, u32* val)
+{
+	void * mmio = lp->mmio;
+	unsigned int reg_val;
+	unsigned int repeat= REPEAT_CNT;
+
+	reg_val = readl(mmio + PHY_ACCESS);
+	while (reg_val & PHY_CMD_ACTIVE)
+		reg_val = readl( mmio + PHY_ACCESS );
+
+	writel( PHY_RD_CMD | ((phy_id & 0x1f) << 21) |
+			   ((reg & 0x1f) << 16),  mmio +PHY_ACCESS);
+	do{
+		reg_val = readl(mmio + PHY_ACCESS);
+		udelay(30);  /* It takes 30 us to read/write data */
+	} while (--repeat && (reg_val & PHY_CMD_ACTIVE));
+	if(reg_val & PHY_RD_ERR)
+		goto err_phy_read;
+	
+	*val = reg_val & 0xffff;
+	return 0;
+err_phy_read:	
+	*val = 0;
+	return -EINVAL;
+	
+}
+static int amd8111e_write_phy(struct amd8111e_priv* lp,int phy_id, int reg, u32 val)
+{
+	unsigned int repeat = REPEAT_CNT
+	void * mmio = lp->mmio;
+	unsigned int reg_val;
+	
+
+	reg_val = readl(mmio + PHY_ACCESS);
+	while (reg_val & PHY_CMD_ACTIVE)
+		reg_val = readl( mmio + PHY_ACCESS );
+
+	writel( PHY_WR_CMD | ((phy_id & 0x1f) << 21) |
+			   ((reg & 0x1f) << 16)|val, mmio + PHY_ACCESS);
+
+	do{
+		reg_val = readl(mmio + PHY_ACCESS);
+		udelay(30);  /* It takes 30 us to read/write the data */
+	} while (--repeat && (reg_val & PHY_CMD_ACTIVE));
+	
+	if(reg_val & PHY_RD_ERR)
+		goto err_phy_write;
+	
+	return 0;
+
+err_phy_write:	
+	return -EINVAL;
+	
+}
+static int amd8111e_ioctl(struct net_device * dev , struct ifreq *ifr, int cmd)
+{
+	struct mii_ioctl_data *data = (struct mii_ioctl_data *)&ifr->ifr_data;
+	struct amd8111e_priv *lp = dev->priv;
+	int err;
+	u32 mii_regval;
+
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
+	switch(cmd) {
+	case SIOCETHTOOL:
+		return amd8111e_ethtool_ioctl(dev, (void *) ifr->ifr_data);
+	case SIOCGMIIPHY:
+		data->phy_id = PHY_ID;
+
+	/* fallthru */
+	case SIOCGMIIREG: 
+
+		spin_lock_irq(&lp->lock);
+		err = amd8111e_read_phy(lp, data->phy_id,
+			data->reg_num & PHY_REG_ADDR_MASK, &mii_regval);
+		spin_unlock_irq(&lp->lock);
+
+		data->val_out = mii_regval;
+		return err;
+
+	case SIOCSMIIREG:
+
+		spin_lock_irq(&lp->lock);
+		err = amd8111e_write_phy(lp, data->phy_id,
+			data->reg_num & PHY_REG_ADDR_MASK, data->val_in);
+		spin_unlock_irq(&lp->lock);
+
+		return err;
+
+	default:
+		/* do nothing */
+		break;
+	}
+	return -EOPNOTSUPP;
+}
+/* 
+This function changes the mtu of the device. It restarts the device  to initialize the descriptor with new receive buffers.
+*/  
+int amd8111e_change_mtu(struct net_device *dev, int new_mtu)
+{
+	struct amd8111e_priv *lp = dev->priv;
+	int err;
+
+	if ((new_mtu < AMD8111E_MIN_MTU) || (new_mtu > AMD8111E_MAX_MTU))
+		return -EINVAL;
+
+	if (!netif_running(dev)) {
+		/* new_mtu will be used
+		   when device starts netxt time */ 
+		dev->mtu = new_mtu;
+		return 0;
+	}
+
+	spin_lock_irq(&lp->lock);
+
+        /* stop the chip */
+	writel(RUN, lp->mmio + CMD0);
+
+	dev->mtu = new_mtu;
+
+	/* if (new_mtu > ETH_DATA_LEN)
+		lp->options |= OPTION_JUMBO_ENABLE;
+	else
+		lp->options &= ~OPTION_JUMBO_ENABLE;
+	*/
+	err = amd8111e_restart(dev);
+	spin_unlock_irq(&lp->lock);
+
+	netif_start_queue(dev);
+	return err;
+}
+
+#if AMD8111E_VLAN_TAG_USED
+static void amd8111e_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
+{
+	struct  amd8111e_priv *lp = dev->priv;
+	spin_lock_irq(&lp->lock);
+	lp->vlgrp = grp;
+	spin_unlock_irq(&lp->lock);
+}
+	
+static void amd8111e_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
+{
+	struct amd8111e_priv *lp = dev->priv;
+	spin_lock_irq(&lp->lock);
+	if (lp->vlgrp)
+		lp->vlgrp->vlan_devices[vid] = NULL;
+	spin_unlock_irq(&lp->lock);
+}
+#endif
+static int amd8111e_enable_magicpkt(struct amd8111e_priv* lp)
+{
+	writel( VAL1|MPPLBA, lp->mmio + CMD3);
+	writel( VAL0|MPEN_SW, lp->mmio + CMD7);
+	return 0;
+}
+
+static int amd8111e_enable_link_change(struct amd8111e_priv* lp)
+{
+	/* Adapter is already stoped/suspended/interrupt-disabled */
+	writel(VAL0|LCMODE_SW,lp->mmio + CMD7);
+	return 0;
+}	
+
+/* 
+This function sets the power state of the device. When the device go to lower power states 1,2, and 3 it enables the wake on lan 
+*/  	
+static int amd8111e_set_power_state(struct amd8111e_priv* lp, u32 state)
+{
+	u16 power_control;
+	int pm = lp->pm_cap;
+
+	pci_read_config_word(lp->pci_dev,
+			     pm + PCI_PM_CTRL,
+			     &power_control);
+
+	power_control |= PCI_PM_CTRL_PME_STATUS;
+	power_control &= ~(PCI_PM_CTRL_STATE_MASK);
+	switch (state) {
+	case 0:
+		power_control |= 0;
+		pci_write_config_word(lp->pci_dev,
+				      pm + PCI_PM_CTRL,
+				      power_control);
+		return 0;
+
+	case 1:
+		power_control |= 1;
+		break;
+
+	case 2:
+		power_control |= 2;
+		break;
+
+	case 3:
+		power_control |= 3;
+		break;
+	default:
+
+		printk(KERN_WARNING "%s: Invalid power state (%d) requested.\n",
+		       lp->amd8111e_net_dev->name, state);
+		return -EINVAL;
+	}
+	
+	if(lp->options & OPTION_WAKE_MAGIC_ENABLE)
+		amd8111e_enable_magicpkt(lp);	
+	if(lp->options & OPTION_WAKE_PHY_ENABLE)
+		amd8111e_enable_link_change(lp);	
+
+	/*  Setting new power state. */
+	pci_write_config_word(lp->pci_dev, pm + PCI_PM_CTRL, power_control);
+
+	return 0;
+
+
+}
+static int amd8111e_suspend(struct pci_dev *pci_dev, u32 state)
+{	
+	struct net_device *dev = pci_get_drvdata(pci_dev);
+	struct amd8111e_priv *lp = dev->priv;
+	int err;
+	
+	if (!netif_running(dev))
+		return 0;
+
+	/* disable the interrupt */
+	spin_lock_irq(&lp->lock);
+	amd8111e_disable_interrupt(lp);
+	spin_unlock_irq(&lp->lock);
+
+	netif_device_detach(dev);
+	
+	/* stop chip */
+	spin_lock_irq(&lp->lock);
+	amd8111e_stop_chip(lp);
+	spin_unlock_irq(&lp->lock);
+
+	err = amd8111e_set_power_state(lp, state);
+	if (err) {
+		
+		spin_lock_irq(&lp->lock);
+		amd8111e_restart(dev);
+		spin_unlock_irq(&lp->lock);
+
+		netif_device_attach(dev);
+	}
+	return err;
+}
+static int amd8111e_resume(struct pci_dev *pci_dev)
+{
+	struct net_device *dev = pci_get_drvdata(pci_dev);
+	struct amd8111e_priv *lp = dev->priv;
+	int err;
+	
+	if (!netif_running(dev))
+		return 0;
+
+	err = amd8111e_set_power_state(lp, 0);
+	if (err)
+		return err;
+
+	netif_device_attach(dev);
+
+	spin_lock_irq(&lp->lock);
+	amd8111e_restart(dev);
+	spin_unlock_irq(&lp->lock);
+
+	return 0;
+}
+
+
+static void __devexit amd8111e_remove_one(struct pci_dev *pdev)
+{
+	struct net_device *dev = pci_get_drvdata(pdev);
+	if (dev) {
+		unregister_netdev(dev);
+		iounmap((void *) ((struct amd8111e_priv *)(dev->priv))->mmio);
+		kfree(dev);
+		pci_release_regions(pdev);
+		pci_disable_device(pdev);
+		pci_set_drvdata(pdev, NULL);
+	}
+}
+
+static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
+				  const struct pci_device_id *ent)
+{
+	int err,i,pm_cap;
+	unsigned long reg_addr,reg_len;
+	struct amd8111e_priv* lp;
+	struct net_device* dev;
+	unsigned int chip_version;
+
+	err = pci_enable_device(pdev);
+	if(err){
+		printk(KERN_ERR "amd8111e: Cannot enable new PCI device,"
+			"exiting.\n");
+		return err;
+	}
+
+	if(!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)){
+		printk(KERN_ERR "amd8111e: Cannot find PCI base address"
+		       "exiting.\n");
+		err = -ENODEV;
+		goto err_disable_pdev;
+	}
+
+	err = pci_request_regions(pdev, MODULE_NAME);
+	if(err){
+		printk(KERN_ERR "amd8111e: Cannot obtain PCI resources, "
+		       "exiting.\n");
+		goto err_disable_pdev;
+	}
+
+	pci_set_master(pdev);
+
+	/* Find power-management capability. */
+	if((pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM))==0){
+		printk(KERN_ERR "amd8111e: No Power Management capability, "
+		       "exiting.\n");
+		goto err_free_reg;
+	}
+
+	/* Initialize DMA */
+	if(!pci_dma_supported(pdev, 0xffffffff)){
+		printk(KERN_ERR "amd8111e: DMA not supported,"
+			"exiting.\n");
+		goto  err_free_reg;
+	} else
+		pdev->dma_mask = 0xffffffff;
+	
+	reg_addr = pci_resource_start(pdev, 0);
+	reg_len = pci_resource_len(pdev, 0);
+
+	dev = alloc_etherdev(sizeof(struct amd8111e_priv));
+	if (!dev) {
+		printk(KERN_ERR "amd8111e: Etherdev alloc failed, exiting.\n");
+		err = -ENOMEM;
+		goto err_free_reg;
+	}
+
+	SET_MODULE_OWNER(dev);
+
+#if AMD8111E_VLAN_TAG_USED
+	dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX ;
+	dev->vlan_rx_register =amd8111e_vlan_rx_register;
+	dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid;
+#endif	
+	
+	lp = dev->priv;
+	memset (lp, 0, sizeof (*lp));
+	lp->pci_dev = pdev;
+	lp->amd8111e_net_dev = dev;
+	lp->pm_cap = pm_cap;
+
+	spin_lock_init(&lp->lock);
+
+	lp->mmio = ioremap(reg_addr, reg_len);
+	if (lp->mmio == 0) {
+		printk(KERN_ERR "amd8111e: Cannot map device registers, "
+		       "exiting\n");
+		err = -ENOMEM;
+		goto err_free_dev;
+	}
+	
+	/* Initializing MAC address */
+	for(i = 0; i < ETH_ADDR_LEN; i++)
+			dev->dev_addr[i] =readb(lp->mmio + PADR + i);
+	/* Setting user defined speed */
+	if (speed_duplex[card_idx] > sizeof(speed_duplex_mapping))
+		lp->ext_phy_option = XPHYANE;
+	else
+		lp->ext_phy_option = 
+				speed_duplex_mapping[speed_duplex[card_idx]];
+	/* Initialize driver entry points */
+	dev->open = amd8111e_open;
+	dev->hard_start_xmit = amd8111e_start_xmit;
+	dev->stop = amd8111e_close;
+	dev->get_stats = amd8111e_get_stats;
+	dev->set_multicast_list = amd8111e_set_multicast_list;
+	dev->do_ioctl = amd8111e_ioctl;
+	dev->change_mtu = amd8111e_change_mtu;
+	dev->irq =pdev->irq;
+
+#if AMD8111E_VLAN_TAG_USED
+	dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
+	dev->vlan_rx_register =amd8111e_vlan_rx_register;
+	dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid;
+#endif	
+	
+	/* Set receive buffer length and set jumbo option*/
+	amd8111e_set_rx_buff_len(dev);
+	
+
+	/* dev->tx_timeout = tg3_tx_timeout; */
+	/* dev->watchdog_timeo = TG3_TX_TIMEOUT; */
+
+	err = register_netdev(dev);
+	if (err) {
+		printk(KERN_ERR "amd8111e: Cannot register net device, "
+		       "exiting.\n");
+		goto err_iounmap;
+	}
+
+	pci_set_drvdata(pdev, dev);
+	
+	/*  display driver and device information */
+
+    chip_version = (readl(lp->mmio + CHIPID) & 0xf0000000)>>28;
+    printk("%s: AMD-8111e Driver Version: %s\n",dev->name,MODULE_VERSION);
+    printk("%s: [ Rev %x ] PCI 10/100BaseT Ethernet ", dev->name, chip_version);
+    for (i = 0; i < 6; i++)
+	printk("%2.2x%c", dev->dev_addr[i],i == 5 ? ' ' : ':');
+     printk("\n");	
+	return 0;
+err_iounmap:
+	iounmap((void *) lp->mmio);
+
+err_free_dev:
+	kfree(dev);
+
+err_free_reg:
+	pci_release_regions(pdev);
+
+err_disable_pdev:
+	pci_disable_device(pdev);
+	pci_set_drvdata(pdev, NULL);
+	return err;
+
+}
+
+static struct pci_driver amd8111e_driver = {
+	name:		MODULE_NAME,
+	id_table:	amd8111e_pci_tbl,
+	probe:		amd8111e_probe_one,
+	remove:		__devexit_p(amd8111e_remove_one),
+	suspend:	amd8111e_suspend,
+	resume:		amd8111e_resume
+};
+
+static int __init amd8111e_init(void)
+{
+	return pci_module_init(&amd8111e_driver);
+}
+
+static void __exit amd8111e_cleanup(void)
+{
+	pci_unregister_driver(&amd8111e_driver);
+}
+
+module_init(amd8111e_init);
+module_exit(amd8111e_cleanup);
diff -Nru a/drivers/net/amd8111e.h b/drivers/net/amd8111e.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/amd8111e.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,786 @@
+/*
+ * 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.
+ *
+ * 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
+
+Module Name:
+
+    amd8111e.h
+
+Abstract:
+	
+ 	 AMD8111 based 10/100 Ethernet Controller driver definitions. 
+
+Environment:
+    
+	Kernel Mode
+
+Revision History:
+
+*/
+
+#ifndef _AMD811E_H
+#define _AMD811E_H
+
+/* Hardware definitions */
+
+#define B31_MASK	0x80000000
+#define B30_MASK	0X40000000
+#define B29_MASK	0x20000000
+#define B28_MASK	0x10000000
+#define B27_MASK	0x08000000
+#define B26_MASK	0x04000000
+#define B25_MASK	0x02000000
+#define B24_MASK	0x01000000
+#define B23_MASK	0x00800000
+#define B22_MASK	0x00400000
+#define B21_MASK	0x00200000
+#define B20_MASK	0x00100000
+#define B19_MASK	0x00080000
+#define B18_MASK	0x00040000
+#define B17_MASK	0x00020000
+#define B16_MASK	0x00010000
+
+#define B15_MASK	0x8000
+#define B14_MASK	0x4000
+#define B13_MASK	0x2000
+#define B12_MASK	0x1000
+#define B11_MASK	0x0800
+#define B10_MASK	0x0400
+#define B9_MASK		0x0200
+#define B8_MASK		0x0100
+#define B7_MASK		0x0080
+#define B6_MASK		0x0040
+#define B5_MASK		0x0020
+#define B4_MASK		0x0010
+#define B3_MASK		0x0008
+#define B2_MASK		0x0004
+#define B1_MASK		0x0002
+#define B0_MASK		0x0001
+
+/* PCI register offset */
+#define PCI_ID_REG		0x00
+#define PCI_COMMAND_REG		0x04
+/* #define MEMEN_BIT		B1_MASK */
+/* #define IOEN_BIT		B0_MASK */
+#define PCI_REV_ID_REG		0x08
+#define PCI_MEM_BASE_REG	0x10
+/* #define MEMBASE_MASK		0xFFFFF000 */
+/* #define MEMBASE_SIZE		4096 */
+#define PCI_INTR_REG		0x3C
+#define PCI_STATUS_REG		0x06
+#define PCI_CAP_ID_REG_OFFSET	0x34
+#define PCI_PMC_REG_OFFSET	0x36
+#define PCI_PMCSR_REG_OFFSET	0x38
+
+/* #define NEW_CAP		0x0010  */
+#define PME_EN			0x0100
+
+#define PARTID_MASK		0xFFFFF000
+#define PARTID_START_BIT	12
+
+/* #define LANCE_DWIO_RESET_PORT	0x18
+#define LANCE_WIO_RESET_PORT	0x14 */
+#define MIB_OFFSET		0x28
+
+/* Command style register access
+
+Registers CMD0, CMD2, CMD3,CMD7 and INTEN0 uses a write access technique called command style access. It allows the write to selected bits of this register without altering the bits that are not selected. Command style registers are divided into 4 bytes that can be written independently. Higher order bit of each byte is the  value bit that specifies the value that will be written into the selected bits of register. 
+
+eg., if the value 10011010b is written into the least significant byte of a command style register, bits 1,3 and 4 of the register will be set to 1, and the other bits will not be altered. If the value 00011010b is written into the same byte, bits 1,3 and 4 will be cleared to 0 and the other bits will not be altered.
+
+*/
+
+/*  Offset for Memory Mapped Registers. */
+/* 32 bit registers */
+
+#define  ASF_STAT		0x00	/* ASF status register */
+#define CHIPID			0x04	/* Chip ID regsiter */
+#define	MIB_DATA		0x10	/* MIB data register */
+#define MIB_ADDR		0x14	/* MIB address register */
+#define STAT0			0x30	/* Status0 register */
+#define INT0			0x38	/* Interrupt0 register */
+#define INTEN0			0x40	/* Interrupt0  enable register*/
+#define CMD0			0x48	/* Command0 register */
+#define CMD2			0x50	/* Command2 register */
+#define CMD3			0x54	/* Command3 resiter */
+#define CMD7			0x64	/* Command7 register */
+
+#define CTRL1 			0x6C	/* Control1 register */
+#define CTRL2 			0x70	/* Control2 register */
+
+#define XMT_RING_LIMIT		0x7C	/* Transmit ring limit register */
+
+#define AUTOPOLL0		0x88	/* Auto-poll0 register */
+#define AUTOPOLL1		0x8A	/* Auto-poll1 register */
+#define AUTOPOLL2		0x8C	/* Auto-poll2 register */
+#define AUTOPOLL3		0x8E	/* Auto-poll3 register */
+#define AUTOPOLL4		0x90	/* Auto-poll4 register */
+#define	AUTOPOLL5		0x92	/* Auto-poll5 register */
+
+#define AP_VALUE		0x98	/* Auto-poll value register */
+#define DLY_INT_A		0xA8	/* Group A delayed interrupt register */
+#define DLY_INT_B		0xAC	/* Group B delayed interrupt register */
+
+#define FLOW_CONTROL		0xC8	/* Flow control register */
+#define PHY_ACCESS		0xD0	/* PHY access register */
+
+#define STVAL			0xD8	/* Software timer value register */
+
+#define XMT_RING_BASE_ADDR0	0x100	/* Transmit ring0 base addr register */
+#define XMT_RING_BASE_ADDR1	0x108	/* Transmit ring1 base addr register */
+#define XMT_RING_BASE_ADDR2	0x110	/* Transmit ring2 base addr register */
+#define XMT_RING_BASE_ADDR3	0x118	/* Transmit ring2 base addr register */
+
+#define RCV_RING_BASE_ADDR0	0x120	/* Transmit ring0 base addr register */
+
+#define PMAT0			0x190	/* OnNow pattern register0 */
+#define PMAT1			0x194	/* OnNow pattern register1 */
+
+/* 16bit registers */
+
+#define XMT_RING_LEN0		0x140	/* Transmit Ring0 length register */
+#define XMT_RING_LEN1		0x144	/* Transmit Ring1 length register */
+#define XMT_RING_LEN2		0x148 	/* Transmit Ring2 length register */
+#define XMT_RING_LEN3		0x14C	/* Transmit Ring3 length register */
+
+#define RCV_RING_LEN0		0x150	/* Transmit Ring0 length register */
+
+#define SRAM_SIZE		0x178	/* SRAM size register */
+#define SRAM_BOUNDARY		0x17A	/* SRAM boundary register */
+
+/* 48bit register */
+
+#define PADR			0x160	/* Physical address register */
+
+/* 64bit register */
+
+#define LADRF			0x168	/* Logical address filter register */
+
+/* 8bit regsisters */
+
+#define IFS1			0x18C	/* Inter-frame spacing Part1 register */
+#define IFS			0x18D	/* Inter-frame spacing register */
+
+/* Register Bit Definitions */
+
+/* STAT_ASF			0x00, 32bit register */
+#define ASF_INIT_DONE		B1_MASK
+#define ASF_INIT_PRESENT	B0_MASK
+
+/* MIB_ADDR			0x14, 16bit register */
+#define	MIB_CMD_ACTIVE		B15_MASK
+#define	MIB_RD_CMD		B13_MASK
+#define	MIB_CLEAR		B12_MASK
+#define	MIB_ADDRESS		0x0000003F	/* 5:0 */
+
+/* QOS_ADDR			0x1C, 16bit register */
+#define QOS_CMD_ACTIVE		B15_MASK
+#define QOS_WR_CMD		B14_MASK
+#define QOS_RD_CMD		B13_MASK
+#define QOS_ADDRESS		0x0000001F	/* 4:0 */
+
+/* STAT0			0x30, 32bit register */
+#define PAUSE_PEND		B14_MASK
+#define PAUSING			B13_MASK
+#define PMAT_DET		B12_MASK
+#define MP_DET			B11_MASK
+#define LC_DET			B10_MASK
+#define SPEED_MASK		0x0380	/* 9:7 */
+#define FULL_DPLX		B6_MASK
+#define LINK_STATS		B5_MASK
+#define AUTONEG_COMPLETE	B4_MASK
+#define MIIPD			B3_MASK
+#define RX_SUSPENDED		B2_MASK
+#define TX_SUSPENDED		B1_MASK
+#define RUNNING			B0_MASK
+#define PHY_SPEED_10		0x2
+#define PHY_SPEED_100		0x3
+
+/* INT0				0x38, 32bit register */
+#define INTR			B31_MASK
+#define PCSINT			B28_MASK
+#define LCINT			B27_MASK
+#define APINT5			B26_MASK
+#define APINT4			B25_MASK
+#define APINT3			B24_MASK
+#define TINT_SUM		B23_MASK
+#define APINT2			B22_MASK
+#define APINT1			B21_MASK
+#define APINT0			B20_MASK
+#define MIIPDTINT		B19_MASK
+#define MCCIINT			B18_MASK
+#define MCCINT			B17_MASK
+#define MREINT			B16_MASK
+#define RINT_SUM		B15_MASK
+#define SPNDINT			B14_MASK
+#define MPINT			B13_MASK
+#define SINT			B12_MASK
+#define TINT3			B11_MASK
+#define TINT2			B10_MASK
+#define TINT1			B9_MASK
+#define TINT0			B8_MASK
+#define UINT			B7_MASK
+#define STINT			B4_MASK
+#define RINT3			B3_MASK
+#define RINT2			B2_MASK
+#define RINT1			B1_MASK
+#define RINT0			B0_MASK
+
+/* INTEN0			0x40, 32bit register */
+#define VAL3			B31_MASK   /* VAL bit for byte 3 */
+#define VAL2			B23_MASK   /* VAL bit for byte 2 */
+#define VAL1			B15_MASK   /* VAL bit for byte 1 */
+#define VAL0			B7_MASK    /* VAL bit for byte 0 */
+/* VAL3 */
+#define PSCINTEN		B28_MASK
+#define LCINTEN			B27_MASK
+#define APINT5EN		B26_MASK
+#define APINT4EN		B25_MASK
+#define APINT3EN		B24_MASK
+/* VAL2 */
+#define APINT2EN		B22_MASK
+#define APINT1EN		B21_MASK
+#define APINT0EN		B20_MASK
+#define MIIPDTINTEN		B19_MASK
+#define MCCIINTEN		B18_MASK
+#define MCCINTEN		B17_MASK
+#define MREINTEN		B16_MASK
+/* VAL1 */
+#define SPNDINTEN		B14_MASK
+#define MPINTEN			B13_MASK
+#define SINTEN			B12_MASK
+#define TINTEN3			B11_MASK
+#define TINTEN2			B10_MASK
+#define TINTEN1			B9_MASK
+#define TINTEN0			B8_MASK
+/* VAL0 */
+#define STINTEN			B4_MASK
+#define RINTEN3			B3_MASK
+#define RINTEN2			B2_MASK
+#define RINTEN1			B1_MASK
+#define RINTEN0			B0_MASK
+
+#define INTEN0_CLEAR 		0x1F7F7F1F /* Command style register */		
+
+/* CMD0				0x48, 32bit register */
+/* VAL2 */
+#define RDMD3			B19_MASK
+#define RDMD2			B18_MASK
+#define RDMD1			B17_MASK
+#define RDMD0			B16_MASK
+/* VAL1 */
+#define TDMD3			B11_MASK
+#define TDMD2			B10_MASK
+#define TDMD1			B9_MASK
+#define TDMD0			B8_MASK
+/* VAL0 */
+#define UINTCMD			B6_MASK
+#define RX_FAST_SPND		B5_MASK
+#define TX_FAST_SPND		B4_MASK
+#define RX_SPND			B3_MASK
+#define TX_SPND			B2_MASK
+#define INTREN			B1_MASK
+#define RUN			B0_MASK
+
+#define CMD0_CLEAR 		0x000F0F7F   /* Command style register */	
+
+/* CMD2 			0x50, 32bit register */
+/* VAL3 */
+#define CONDUIT_MODE		B29_MASK
+/* VAL2 */
+#define RPA			B19_MASK
+#define DRCVPA			B18_MASK
+#define DRCVBC			B17_MASK
+#define PROM			B16_MASK
+/* VAL1 */
+#define ASTRP_RCV		B13_MASK
+#define FCOLL			B12_MASK
+#define EMBA			B11_MASK
+#define DXMT2PD			B10_MASK
+#define LTINTEN			B9_MASK
+#define DXMTFCS			B8_MASK
+/* VAL0 */
+#define APAD_XMT		B6_MASK
+#define DRTY			B5_MASK
+#define INLOOP			B4_MASK
+#define EXLOOP			B3_MASK
+#define REX_RTRY		B2_MASK
+#define REX_UFLO		B1_MASK
+#define REX_LCOL		B0_MASK
+
+#define CMD2_CLEAR 		0x3F7F3F7F   /* Command style register */
+
+/* CMD3				0x54, 32bit register */
+/* VAL3 */
+#define ASF_INIT_DONE_ALIAS	B29_MASK
+/* VAL2 */
+#define JUMBO			B21_MASK
+#define VSIZE			B20_MASK
+#define VLONLY			B19_MASK
+#define VL_TAG_DEL		B18_MASK
+/* VAL1 */
+#define EN_PMGR			B14_MASK
+#define INTLEVEL		B13_MASK
+#define FORCE_FULL_DUPLEX	B12_MASK
+#define FORCE_LINK_STATUS	B11_MASK
+#define APEP			B10_MASK
+#define MPPLBA			B9_MASK
+/* VAL0 */
+#define RESET_PHY_PULSE		B2_MASK
+#define RESET_PHY		B1_MASK
+#define PHY_RST_POL		B0_MASK
+/* CMD7				0x64, 32bit register */
+/* VAL0 */
+#define PMAT_SAVE_MATCH		B4_MASK
+#define PMAT_MODE		B3_MASK
+#define MPEN_SW			B1_MASK
+#define LCMODE_SW		B0_MASK
+
+#define CMD7_CLEAR  		0x0000001B		/* Command style register */
+/* CTRL0			0x68, 32bit register */
+#define PHY_SEL			0x03000000	/* 25:24 */
+#define RESET_PHY_WIDTH		0x00FF0000	/* 23:16 */
+#define BSWP_REGS		B10_MASK
+#define BSWP_DESC		B9_MASK
+#define BSWP_DATA		B8_MASK
+#define CACHE_ALIGN		B4_MASK
+#define BURST_LIMIT		0x0000000F	/* 3:0 */
+
+/* CTRL1			0x6C, 32bit register */
+#define SLOTMOD_MASK		0x03000000	/* 25:24 */
+#define XMTSP_MASK		0x300	/* 17:16 */
+#define XMTSP_128		0x200
+#define XMTSP_64		0x100
+#define CRTL1_DEFAULT		0x00000017
+
+/* CTRL2			0x70, 32bit register */
+#define FS_MASK			0x00070000	/* 18:16 */
+#define FMDC_MASK		0x00000300	/* 9:8 */
+#define XPHYRST			B7_MASK
+#define XPHYANE			B6_MASK
+#define XPHYFD			B5_MASK
+#define XPHYSP			B3_MASK	/* 4:3 */
+#define APDW_MASK		0x00000007	/* 2:0 */
+
+/* RCV_RING_CFG			0x78, 16bit register */
+#define RCV_DROP3		B11_MASK
+#define RCV_DROP2		B10_MASK
+#define RCV_DROP1		B9_MASK
+#define RCV_DROP0		B8_MASK
+#define RCV_RING_DEFAULT	0x0030	/* 5:4 */
+#define RCV_RING3_EN		B3_MASK
+#define RCV_RING2_EN		B2_MASK
+#define RCV_RING1_EN		B1_MASK
+#define RCV_RING0_EN		B0_MASK
+
+/* XMT_RING_LIMIT		0x7C, 32bit register */
+#define XMT_RING2_LIMIT		0x00FF0000	/* 23:16 */
+#define XMT_RING1_LIMIT		0x0000FF00	/* 15:8 */
+#define XMT_RING0_LIMIT		0x000000FF	/* 7:0 */
+
+/* AUTOPOLL0			0x88, 16bit register */
+#define AP_REG0_EN		B15_MASK
+#define AP_REG0_ADDR_MASK	0x1F00	/* 12:8 */
+#define AP_PHY0_ADDR_MASK	0x001F	/* 4:0 */
+
+/* AUTOPOLL1			0x8A, 16bit register */
+#define AP_REG1_EN		B15_MASK
+#define AP_REG1_ADDR_MASK	0x1F00	/* 12:8 */
+#define AP_PRE_SUP1		B6_MASK
+#define AP_PHY1_DFLT		B5_MASK
+#define AP_PHY1_ADDR_MASK	0x001F	/* 4:0 */
+
+/* AUTOPOLL2			0x8C, 16bit register */
+#define AP_REG2_EN		B15_MASK
+#define AP_REG2_ADDR_MASK	0x1F00	/* 12:8 */
+#define AP_PRE_SUP2		B6_MASK
+#define AP_PHY2_DFLT		B5_MASK
+#define AP_PHY2_ADDR_MASK	0x001F	/* 4:0 */
+
+/* AUTOPOLL3			0x8E, 16bit register */
+#define AP_REG3_EN		B15_MASK
+#define AP_REG3_ADDR_MASK	0x1F00	/* 12:8 */
+#define AP_PRE_SUP3		B6_MASK
+#define AP_PHY3_DFLT		B5_MASK
+#define AP_PHY3_ADDR_MASK	0x001F	/* 4:0 */
+
+/* AUTOPOLL4			0x90, 16bit register */
+#define AP_REG4_EN		B15_MASK
+#define AP_REG4_ADDR_MASK	0x1F00	/* 12:8 */
+#define AP_PRE_SUP4		B6_MASK
+#define AP_PHY4_DFLT		B5_MASK
+#define AP_PHY4_ADDR_MASK	0x001F	/* 4:0 */
+
+/* AUTOPOLL5			0x92, 16bit register */
+#define AP_REG5_EN		B15_MASK
+#define AP_REG5_ADDR_MASK	0x1F00	/* 12:8 */
+#define AP_PRE_SUP5		B6_MASK
+#define AP_PHY5_DFLT		B5_MASK
+#define AP_PHY5_ADDR_MASK	0x001F	/* 4:0 */
+
+/* AP_VALUE 			0x98, 32bit ragister */
+#define AP_VAL_ACTIVE		B31_MASK
+#define AP_VAL_RD_CMD		B29_MASK
+#define AP_ADDR			0x00070000	/* 18:16 */
+#define AP_VAL			0x0000FFFF	/* 15:0 */
+
+/* PCS_ANEG			0x9C, 32bit register */
+#define SYNC_LOST		B10_MASK
+#define IMATCH			B9_MASK
+#define CMATCH			B8_MASK
+#define PCS_AN_IDLE		B1_MASK
+#define PCS_AN_CFG		B0_MASK
+
+/* DLY_INT_A			0xA8, 32bit register */
+#define DLY_INT_A_R3		B31_MASK
+#define DLY_INT_A_R2		B30_MASK
+#define DLY_INT_A_R1		B29_MASK
+#define DLY_INT_A_R0		B28_MASK
+#define DLY_INT_A_T3		B27_MASK
+#define DLY_INT_A_T2		B26_MASK
+#define DLY_INT_A_T1		B25_MASK
+#define DLY_INT_A_T0		B24_MASK
+#define EVENT_COUNT_A		0x00FF0000	/* 20:16 */
+#define MAX_DELAY_TIME_A	0x000007FF	/* 10:0 */
+
+/* DLY_INT_B			0xAC, 32bit register */
+#define DLY_INT_B_R3		B31_MASK
+#define DLY_INT_B_R2		B30_MASK
+#define DLY_INT_B_R1		B29_MASK
+#define DLY_INT_B_R0		B28_MASK
+#define DLY_INT_B_T3		B27_MASK
+#define DLY_INT_B_T2		B26_MASK
+#define DLY_INT_B_T1		B25_MASK
+#define DLY_INT_B_T0		B24_MASK
+#define EVENT_COUNT_B		0x00FF0000	/* 20:16 */
+#define MAX_DELAY_TIME_B	0x000007FF	/* 10:0 */
+
+/* DFC_THRESH2			0xC0, 16bit register */
+#define DFC_THRESH2_HIGH	0xFF00	/* 15:8 */
+#define DFC_THRESH2_LOW		0x00FF	/* 7:0 */
+
+/* DFC_THRESH3			0xC2, 16bit register */
+#define DFC_THRESH3_HIGH	0xFF00	/* 15:8 */
+#define DFC_THRESH3_LOW		0x00FF	/* 7:0 */
+
+/* DFC_THRESH0			0xC4, 16bit register */
+#define DFC_THRESH0_HIGH	0xFF00	/* 15:8 */
+#define DFC_THRESH0_LOW		0x00FF	/* 7:0 */
+
+/* DFC_THRESH1			0xC6, 16bit register */
+#define DFC_THRESH1_HIGH	0xFF00	/* 15:8 */
+#define DFC_THRESH1_LOW		0x00FF	/* 7:0 */
+
+/* FLOW_CONTROL 		0xC8, 32bit register */
+#define PAUSE_LEN_CHG		B30_MASK
+#define	FFC_EN			B28_MASK
+#define DFC_RING3_EN		B27_MASK
+#define DFC_RING2_EN		B26_MASK
+#define DFC_RING1_EN		B25_MASK
+#define DFC_RING0_EN		B24_MASK
+#define FIXP_CONGEST		B21_MASK
+#define FPA			B20_MASK
+#define NPA			B19_MASK
+#define FIXP			B18_MASK
+#define FCPEN			B17_MASK
+#define FCCMD			B16_MASK
+#define PAUSE_LEN		0x0000FFFF	/* 15:0 */
+
+/* FFC THRESH			0xCC, 32bit register */
+#define FFC_HIGH		0xFFFF0000	/* 31:16 */
+#define FFC_LOW			0x0000FFFF	/* 15:0 */
+
+/* PHY_ ACCESS			0xD0, 32bit register */
+#define	PHY_CMD_ACTIVE		B31_MASK
+#define PHY_WR_CMD		B30_MASK
+#define PHY_RD_CMD		B29_MASK
+#define PHY_RD_ERR		B28_MASK
+#define PHY_PRE_SUP		B27_MASK
+#define PHY_ADDR		0x03E00000	/* 25:21 */
+#define PHY_REG_ADDR		0x001F0000	/* 20:16 */
+#define PHY_DATA		0x0000FFFF	/* 15:0 */
+
+/* LED0..3			0xE0..0xE6, 16bit register */
+#define LEDOUT			B15_MASK
+#define LEDPOL			B14_MASK
+#define LEDDIS			B13_MASK
+#define LEDSTRETCH		B12_MASK
+#define LED1000			B8_MASK
+#define LED100			B7_MASK
+#define LEDMP			B6_MASK
+#define LEDFD			B5_MASK
+#define LEDLINK			B4_MASK
+#define LEDRCVMAT		B3_MASK
+#define LEDXMT			B2_MASK
+#define LEDRCV			B1_MASK
+#define LEDCOLOUT		B0_MASK
+
+/* EEPROM_ACC			0x17C, 16bit register */
+#define PVALID			B15_MASK
+#define PREAD			B14_MASK
+#define EEDET			B13_MASK
+#define	EEN			B4_MASK
+#define ECS			B2_MASK
+#define EESK			B1_MASK
+#define edi_edo			b0_MASK
+
+/* PMAT0			0x190,	 32bit register */
+#define PMR_ACTIVE		B31_MASK
+#define PMR_WR_CMD		B30_MASK
+#define PMR_RD_CMD		B29_MASK
+#define PMR_BANK		B28_MASK
+#define PMR_ADDR		0x007F0000	/* 22:16 */
+#define PMR_B4			0x000000FF	/* 15:0 */
+
+/* PMAT1			0x194,	 32bit register */
+#define PMR_B3			0xFF000000	/* 31:24 */
+#define PMR_B2			0x00FF0000	/* 23:16 */
+#define PMR_B1			0x0000FF00	/* 15:8 */
+#define PMR_B0			0x000000FF	/* 7:0 */
+
+/************************************************************************/
+/*                                                                      */
+/*                      MIB counter definitions                         */
+/*                                                                      */
+/************************************************************************/
+
+#define rcv_miss_pkts				0x00
+#define rcv_octets				0x01
+#define rcv_broadcast_pkts			0x02
+#define rcv_multicast_pkts			0x03
+#define rcv_undersize_pkts			0x04
+#define rcv_oversize_pkts			0x05
+#define rcv_fragments				0x06
+#define rcv_jabbers				0x07
+#define rcv_unicast_pkts			0x08
+#define rcv_alignment_errors			0x09
+#define rcv_fcs_errors				0x0A
+#define rcv_good_octets				0x0B
+#define rcv_mac_ctrl				0x0C
+#define rcv_flow_ctrl				0x0D
+#define rcv_pkts_64_octets			0x0E
+#define rcv_pkts_65to127_octets			0x0F
+#define rcv_pkts_128to255_octets		0x10
+#define rcv_pkts_256to511_octets		0x11
+#define rcv_pkts_512to1023_octets		0x12
+#define rcv_pkts_1024to1518_octets		0x13
+#define rcv_unsupported_opcode			0x14
+#define rcv_symbol_errors			0x15
+#define rcv_drop_pkts_ring1			0x16
+#define rcv_drop_pkts_ring2			0x17
+#define rcv_drop_pkts_ring3			0x18
+#define rcv_drop_pkts_ring4			0x19
+#define rcv_jumbo_pkts				0x1A
+
+#define xmt_underrun_pkts			0x20
+#define xmt_octets				0x21
+#define xmt_packets				0x22
+#define xmt_broadcast_pkts			0x23
+#define xmt_multicast_pkts			0x24
+#define xmt_collisions				0x25
+#define xmt_unicast_pkts			0x26
+#define xmt_one_collision			0x27
+#define xmt_multiple_collision			0x28
+#define xmt_deferred_transmit			0x29
+#define xmt_late_collision			0x2A
+#define xmt_excessive_defer			0x2B
+#define xmt_loss_carrier			0x2C
+#define xmt_excessive_collision			0x2D
+#define xmt_back_pressure			0x2E
+#define xmt_flow_ctrl				0x2F
+#define xmt_pkts_64_octets			0x30
+#define xmt_pkts_65to127_octets			0x31
+#define xmt_pkts_128to255_octets		0x32
+#define xmt_pkts_256to511_octets		0x33
+#define xmt_pkts_512to1023_octets		0x34
+#define xmt_pkts_1024to1518_octet		0x35
+#define xmt_oversize_pkts			0x36
+#define xmt_jumbo_pkts				0x37
+
+
+/* Driver definitions */
+
+#define	 PCI_VENDOR_ID_AMD		0x1022
+#define  PCI_DEVICE_ID_AMD8111E_7462	0x7462
+
+#define MAX_UNITS			16 /* Maximum number of devices possible */
+
+#define NUM_TX_BUFFERS			32 /* Number of transmit buffers */
+#define NUM_RX_BUFFERS			32 /* Number of receive buffers */	
+
+#define TX_BUFF_MOD_MASK         	31 /* (NUM_TX_BUFFERS -1) */
+#define RX_BUFF_MOD_MASK         	31 /* (NUM_RX_BUFFERS -1) */
+
+#define NUM_TX_RING_DR			32  
+#define NUM_RX_RING_DR			32 
+
+#define TX_RING_DR_MOD_MASK         	31 /* (NUM_TX_RING_DR -1) */
+#define RX_RING_DR_MOD_MASK         	31 /* (NUM_RX_RING_DR -1) */
+
+#define MAX_FILTER_SIZE			64 /* Maximum multicast address */ 
+#define AMD8111E_MIN_MTU	 	60 	
+#define AMD8111E_MAX_MTU		9000			
+
+#define PKT_BUFF_SZ			1536
+#define MIN_PKT_LEN			60
+#define ETH_ADDR_LEN			6
+
+#define OPTION_VLAN_ENABLE		0x0001
+#define OPTION_JUMBO_ENABLE		0x0002
+#define OPTION_MULTICAST_ENABLE		0x0004
+#define OPTION_WOL_ENABLE		0x0008
+#define OPTION_WAKE_MAGIC_ENABLE	0x0010
+#define OPTION_WAKE_PHY_ENABLE		0x0020
+
+#define PHY_REG_ADDR_MASK		0x1f
+
+/* Assume contoller gets data 10 times the maximum processing time */
+#define  REPEAT_CNT			10; 
+     
+/* amd8111e decriptor flag definitions */
+
+#define OWN_BIT			B15_MASK
+#define ADD_FCS_BIT		B13_MASK
+#define LTINT_BIT		B12_MASK
+#define STP_BIT			B9_MASK
+#define ENP_BIT			B8_MASK
+#define KILL_BIT		B6_MASK
+#define TCC_MASK		0x0003
+#define TCC_VLAN_INSERT		B1_MASK
+#define TCC_VLAN_REPLACE	0x0003
+#define RESET_RX_FLAGS		0x0000
+
+#define ERR_BIT 		B14_MASK
+#define FRAM_BIT		B13_MASK
+#define OFLO_BIT		B12_MASK
+#define CRC_BIT			B11_MASK
+#define PAM_BIT			B6_MASK
+#define LAFM_BIT		B5_MASK
+#define BAM_BIT			B4_MASK
+#define TT_MASK			0x000c
+#define TT_VLAN_TAGGED		0x000c
+#define TT_PRTY_TAGGED		0x0008
+
+/* driver ioctl parameters */
+#define PHY_ID 			0x01	/* currently it is fixed */
+#define AMD8111E_REG_DUMP_LEN	4096	/* Memory mapped register length */
+
+/* amd8111e desriptor format */
+
+struct amd8111e_tx_dr{
+
+	u16 buff_count; /* Size of the buffer pointed by this descriptor */
+
+	u16 tx_dr_offset2;
+
+	u16 tag_ctrl_info;
+
+	u16 tag_ctrl_cmd;
+
+	u32 buff_phy_addr;
+
+	u32 reserved;
+}; 
+
+struct amd8111e_rx_dr{
+	
+	u32 reserved;
+
+	u16 msg_count; /* Received message len */
+
+	u16 tag_ctrl_info; 
+
+	u16 buff_count;  /* Len of the buffer pointed by descriptor. */
+
+	u16 rx_dr_offset10;
+
+	u32 buff_phy_addr;
+
+};
+struct amd8111e_link_config{
+
+#define SPEED_INVALID		0xffff
+#define DUPLEX_INVALID		0xff
+#define AUTONEG_INVALID		0xff
+	
+	unsigned long			orig_phy_option;
+	u16				speed;
+	u8				duplex;
+	u8				autoneg;
+	u16 				orig_speed;
+	u8				orig_duplex;
+	u8				reserved;  /* 32bit alignment */
+};
+struct amd8111e_priv{
+	
+	struct amd8111e_tx_dr*  tx_ring;
+	struct amd8111e_rx_dr* rx_ring;
+	dma_addr_t tx_ring_dma_addr;	/* tx descriptor ring base address */
+	dma_addr_t rx_ring_dma_addr;	/* rx descriptor ring base address */
+	const char *name;
+	struct pci_dev *pci_dev;	/* Ptr to the associated pci_dev */
+	struct net_device* amd8111e_net_dev; 	/* ptr to associated net_device */
+	/* Transmit and recive skbs */
+	struct sk_buff *tx_skbuff[NUM_TX_BUFFERS];
+	struct sk_buff *rx_skbuff[NUM_RX_BUFFERS];
+	/* Transmit and receive dma mapped addr */
+	dma_addr_t tx_dma_addr[NUM_TX_BUFFERS];
+	dma_addr_t rx_dma_addr[NUM_RX_BUFFERS];
+	/* Reg memory mapped address */
+	void *  mmio;
+	
+	spinlock_t lock;	/* Guard lock */
+	unsigned long  rx_idx, tx_idx;	/* The next free ring entry */
+	unsigned long  tx_complete_idx;
+	unsigned long tx_ring_complete_idx;
+	unsigned long tx_ring_idx;
+	int rx_buff_len;	/* Buffer length of rx buffers */
+	int options;		/* Options enabled/disabled for the device */
+	unsigned long ext_phy_option;
+	struct amd8111e_link_config link_config;
+	int pm_cap;
+
+	struct net_device *next;
+#if AMD8111E_VLAN_TAG_USED
+	struct vlan_group		*vlgrp;
+#endif	
+	char opened;
+	struct net_device_stats stats;
+	struct net_device_stats prev_stats;
+	struct dev_mc_list* mc_list;
+	
+};
+#define AMD8111E_READ_REG64(_memMapBase, _offset, _pUlData)	\
+			*(u32*)(_pUlData) = readl(_memMapBase + (_offset));	\
+			*((u32*)(_pUlData))+1) = readl(_memMapBase + ((_offset)+4))
+
+#define AMD8111E_WRITE_REG64(_memMapBase, _offset, _pUlData)	\
+			writel(*(u32*)(_pUlData), _memMapBase + (_offset));	\
+			writel(*(u32*)((u8*)(_pUlData)+4), _memMapBase + ((_offset)+4))	\
+
+/* maps the external speed options to internal value */
+static unsigned char speed_duplex_mapping[] = {
+
+	XPHYANE,		/* Auto-negotiation, speed_duplex option 0 */
+	0,			/* 10M Half,  speed_duplex option 1 */
+	XPHYFD,			/* 10M Full,  speed_duplex option 2 */
+	XPHYSP,			/* 100M Half, speed_duplex option 3 */
+	XPHYFD | XPHYSP		/* 100M Full, speed_duplex option 4 */
+};
+static int card_idx;
+static int speed_duplex[MAX_UNITS] = { 0, };
+
+#endif /* _AMD8111E_H */
+
diff -Nru a/drivers/net/appletalk/Kconfig b/drivers/net/appletalk/Kconfig
--- a/drivers/net/appletalk/Kconfig	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/appletalk/Kconfig	Wed Jan  8 20:04:43 2003
@@ -13,7 +13,7 @@
 
 config LTPC
 	tristate "Apple/Farallon LocalTalk PC support"
-	depends on DEV_APPLETALK
+	depends on DEV_APPLETALK && (ISA || EISA)
 	help
 	  This allows you to use the AppleTalk PC card to connect to LocalTalk
 	  networks. The card is also known as the Farallon PhoneNet PC card.
@@ -24,7 +24,7 @@
 
 config COPS
 	tristate "COPS LocalTalk PC support"
-	depends on DEV_APPLETALK
+	depends on DEV_APPLETALK && (ISA || EISA)
 	help
 	  This allows you to use COPS AppleTalk cards to connect to LocalTalk
 	  networks. You also need version 1.3.3 or later of the netatalk
diff -Nru a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
--- a/drivers/net/arcnet/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/drivers/net/arcnet/Kconfig	Wed Jan  8 20:04:45 2003
@@ -3,7 +3,7 @@
 #
 
 menu "ARCnet devices"
-	depends on NETDEVICES
+	depends on NETDEVICES && (ISA || PCI)
 
 config ARCNET
 	tristate "ARCnet support"
diff -Nru a/drivers/net/atari_bionet.c b/drivers/net/atari_bionet.c
--- a/drivers/net/atari_bionet.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/net/atari_bionet.c	Wed Jan  8 20:04:44 2003
@@ -114,8 +114,6 @@
 #include <asm/atari_stdma.h>
 
 
-extern struct net_device *init_etherdev(struct net_device *dev, int sizeof_private);
-
 /* use 0 for production, 1 for verification, >2 for debug
  */
 #ifndef NET_DEBUG
diff -Nru a/drivers/net/e100/e100.h b/drivers/net/e100/e100.h
--- a/drivers/net/e100/e100.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/e100/e100.h	Wed Jan  8 20:04:43 2003
@@ -268,6 +268,7 @@
 #define SCB_CUC_NOOP            0
 #define SCB_CUC_START           BIT_4	/* CU Start */
 #define SCB_CUC_RESUME          BIT_5	/* CU Resume */
+#define SCB_CUC_UNKNOWN         BIT_7	/* CU unknown command */
 /* Changed for 82558 enhancements */
 #define SCB_CUC_STATIC_RESUME   (BIT_5 | BIT_7)	/* 82558/9 Static Resume */
 #define SCB_CUC_DUMP_ADDR       BIT_6	/* CU Dump Counters Address */
@@ -953,6 +954,10 @@
 	u32 pci_state[16];
 #endif
 	char ifname[IFNAMSIZ];
+#ifdef E100_CU_DEBUG	
+	u8 last_cmd;
+	u8 last_sub_cmd;
+#endif	
 };
 
 #define E100_AUTONEG        0
@@ -964,7 +969,7 @@
 /********* function prototypes *************/
 extern void e100_isolate_driver(struct e100_private *bdp);
 extern void e100_sw_reset(struct e100_private *bdp, u32 reset_cmd);
-extern void e100_start_cu(struct e100_private *bdp, tcb_t *tcb);
+extern u8 e100_start_cu(struct e100_private *bdp, tcb_t *tcb);
 extern void e100_free_non_tx_cmd(struct e100_private *bdp,
 				 nxmit_cb_entry_t *non_tx_cmd);
 extern nxmit_cb_entry_t *e100_alloc_non_tx_cmd(struct e100_private *bdp);
@@ -976,8 +981,10 @@
 extern unsigned char e100_wait_scb(struct e100_private *bdp);
 
 extern void e100_deisolate_driver(struct e100_private *bdp, u8 full_reset);
-extern unsigned char e100_hw_reset_recover(struct e100_private *bdp,
-					   u32 reset_cmd);
+extern unsigned char e100_configure_device(struct e100_private *bdp);
+#ifdef E100_CU_DEBUG
+extern unsigned char e100_cu_unknown_state(struct e100_private *bdp);
+#endif
 
 #define ROM_TEST_FAIL		0x01
 #define REGISTER_TEST_FAIL	0x02
diff -Nru a/drivers/net/e100/e100_config.c b/drivers/net/e100/e100_config.c
--- a/drivers/net/e100/e100_config.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/e100/e100_config.c	Wed Jan  8 20:04:43 2003
@@ -494,8 +494,7 @@
  * e100_config_wol
  * @bdp: atapter's private data struct
  *
- * This sets configuration options for Wake On LAN functionality (WOL) in the
- * config record. WOL options are retrieved from wolinfo_wolopts in @bdp
+ * This sets configuration options for PHY and Magic Packet WoL 
  */
 void
 e100_config_wol(struct e100_private *bdp)
@@ -504,14 +503,21 @@
 
 	if (bdp->wolopts & WAKE_PHY) {
 		bdp->config[9] |= CB_LINK_STATUS_WOL;
-		E100_CONFIG(bdp, 9);
+	}
+	else {
+		/* Disable PHY WoL */
+		bdp->config[9] &= ~CB_LINK_STATUS_WOL;
 	}
 
-	if (!(bdp->wolopts & WAKE_MAGIC)) {
+	if (bdp->wolopts & WAKE_MAGIC) {
+		bdp->config[19] &= ~CB_DISABLE_MAGPAK_WAKE;
+	}
+	else {
+		/* Disable Magic Packet WoL */
 		bdp->config[19] |= CB_DISABLE_MAGPAK_WAKE;
-		E100_CONFIG(bdp, 19);
 	}
 
+	E100_CONFIG(bdp, 19);
 	spin_unlock_bh(&(bdp->config_lock));
 }
 
diff -Nru a/drivers/net/e100/e100_main.c b/drivers/net/e100/e100_main.c
--- a/drivers/net/e100/e100_main.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/net/e100/e100_main.c	Wed Jan  8 20:04:44 2003
@@ -46,6 +46,21 @@
 
 /* Change Log
  *
+ * 2.1.29	12/20/02
+ *   o Bug fix: Device command timeout due to SMBus processing during init
+ *   o Bug fix: Not setting/clearing I (Interrupt) bit in tcb correctly
+ *   o Bug fix: Not using EEPROM WoL setting as default in ethtool
+ *   o Bug fix: Not able to set autoneg on using ethtool when interface down
+ *   o Bug fix: Not able to change speed/duplex using ethtool/mii
+ *     when interface up
+ *   o Bug fix: Ethtool shows autoneg on when forced to 100/Full
+ *   o Bug fix: Compiler error when CONFIG_PROC_FS not defined
+ *   o Bug fix: 2.5.44 e100 doesn't load with preemptive kernel enabled
+ *     (sleep while holding spinlock)
+ *   o Bug fix: 2.1.24-k1 doesn't display complete statistics
+ *   o Bug fix: System panic due to NULL watchdog timer dereference during
+ *     ifconfig down, rmmod and insmod
+ *
  * 2.1.24       10/7/02
  *   o Bug fix: Wrong files under /proc/net/PRO_LAN_Adapters/ when interface
  *     name is changed
@@ -56,21 +71,6 @@
  *   o Removed misleading printks
  *
  * 2.1.12       8/2/02
- *   o Feature: ethtool register dump
- *   o Bug fix: Driver passes wrong name to /proc/interrupts
- *   o Bug fix: Ethernet bridging not working 
- *   o Bug fix: Promiscuous mode is not working
- *   o Bug fix: Checked return value from copy_from_user (William Stinson,
- *     wstinson@infonie.fr)
- *   o Bug fix: ARP wake on LAN fails
- *   o Bug fix: mii-diag does not update driver level's speed, duplex and
- *     re-configure flow control
- *   o Bug fix: Ethtool shows wrong speed/duplex when not connected
- *   o Bug fix: Ethtool shows wrong speed/duplex when reconnected if forced 
- *     speed/duplex
- *   o Bug fix: PHY loopback diagnostic fails
- *
- * 2.1.6        7/5/02
  */
  
 #include <linux/config.h>
@@ -135,7 +135,7 @@
 
 /* Global Data structures and variables */
 char e100_copyright[] __devinitdata = "Copyright (c) 2002 Intel Corporation";
-char e100_driver_version[]="2.1.24-k2";
+char e100_driver_version[]="2.1.29-k1";
 const char *e100_full_driver_name = "Intel(R) PRO/100 Network Driver";
 char e100_short_driver_name[] = "e100";
 static int e100nics = 0;
@@ -224,7 +224,7 @@
 static void e100_set_int_option(int *, int, int, int, int, char *);
 static void e100_set_bool_option(struct e100_private *bdp, int, u32, int,
 				 char *);
-unsigned char e100_wait_exec_cmplx(struct e100_private *, u32, u8);
+unsigned char e100_wait_exec_cmplx(struct e100_private *, u32, u8, u8);
 void e100_exec_cmplx(struct e100_private *, u32, u8);
 
 /**
@@ -443,9 +443,21 @@
 	if (!e100_wait_scb(bdp)) {
 		printk(KERN_DEBUG "e100: %s: e100_wait_exec_simple: failed\n",
 		       bdp->device->name);
+#ifdef E100_CU_DEBUG		
+		printk(KERN_ERR "e100: %s: Last command (%x/%x) "
+			"timeout\n", bdp->device->name, 
+			bdp->last_cmd, bdp->last_sub_cmd);
+		printk(KERN_ERR "e100: %s: Current simple command (%x) "
+			"can't be executed\n", 
+			bdp->device->name, scb_cmd_low);
+#endif		
 		return false;
 	}
 	e100_exec_cmd(bdp, scb_cmd_low);
+#ifdef E100_CU_DEBUG	
+	bdp->last_cmd = scb_cmd_low;
+	bdp->last_sub_cmd = 0;
+#endif	
 	return true;
 }
 
@@ -458,12 +470,24 @@
 }
 
 unsigned char
-e100_wait_exec_cmplx(struct e100_private *bdp, u32 phys_addr, u8 cmd)
+e100_wait_exec_cmplx(struct e100_private *bdp, u32 phys_addr, u8 cmd, u8 sub_cmd)
 {
 	if (!e100_wait_scb(bdp)) {
+#ifdef E100_CU_DEBUG		
+		printk(KERN_ERR "e100: %s: Last command (%x/%x) "
+			"timeout\n", bdp->device->name, 
+			bdp->last_cmd, bdp->last_sub_cmd);
+		printk(KERN_ERR "e100: %s: Current complex command "
+			"(%x/%x) can't be executed\n", 
+			bdp->device->name, cmd, sub_cmd);
+#endif		
 		return false;
 	}
 	e100_exec_cmplx(bdp, phys_addr, cmd);
+#ifdef E100_CU_DEBUG	
+	bdp->last_cmd = cmd;
+	bdp->last_sub_cmd = sub_cmd;
+#endif	
 	return true;
 }
 
@@ -494,18 +518,23 @@
 }
 
 /**
- * e100_dis_intr - disable interrupts
+ * e100_disable_clear_intr - disable and clear/ack interrupts
  * @bdp: atapter's private data struct
  *
  * This routine disables interrupts at the hardware, by setting
  * the M (mask) bit in the adapter's CSR SCB command word.
+ * It also clear/ack interrupts.
  */
 static inline void
-e100_dis_intr(struct e100_private *bdp)
+e100_disable_clear_intr(struct e100_private *bdp)
 {
+	u16 intr_status;
 	/* Disable interrupts on our PCI board by setting the mask bit */
 	writeb(SCB_INT_MASK, &bdp->scb->scb_cmd_hi);
-	readw(&(bdp->scb->scb_status));	/* flushes last write, read-safe */
+	intr_status = readw(&bdp->scb->scb_status);
+	/* ack and clear intrs */
+	writew(intr_status, &bdp->scb->scb_status);
+	readw(&bdp->scb->scb_status);
 }
 
 /**
@@ -623,7 +652,7 @@
 	cal_checksum = e100_eeprom_calculate_chksum(bdp);
 	read_checksum = e100_eeprom_read(bdp, (bdp->eeprom_size - 1));
 	if (cal_checksum != read_checksum) {
-                printk(KERN_ERR "e100: Corrupted EERPROM on instance #%d\n",
+                printk(KERN_ERR "e100: Corrupted EEPROM on instance #%d\n",
 		       e100nics);
                 rc = -ENODEV;
                 goto err_pci;
@@ -673,12 +702,17 @@
 		       bdp->device->name);
 	}
 
-	/* Disabling all WOLs as initialization */
-	bdp->wolsupported = bdp->wolopts = 0;
-	if (bdp->rev_id >= D101A4_REV_ID) {
-		bdp->wolsupported = WAKE_PHY | WAKE_MAGIC;
+	bdp->wolsupported = 0;
+	bdp->wolopts = 0;
+	
+	/* Check if WoL is enabled on EEPROM */
+	if (e100_eeprom_read(bdp, EEPROM_ID_WORD) & BIT_5) {
+		if (bdp->rev_id >= D101A4_REV_ID)
+			bdp->wolsupported = WAKE_PHY | WAKE_MAGIC;
 		if (bdp->rev_id >= D101MA_REV_ID)
 			bdp->wolsupported |= WAKE_UCAST | WAKE_ARP;
+		/* Magic Packet WoL is enabled on device by default */
+		/* if EEPROM WoL bit is TRUE                        */
 		bdp->wolopts = WAKE_MAGIC;
 	}
 
@@ -953,12 +987,12 @@
 		goto err_exit;
 	}
 
-	if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE)) {
+	if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE, 0)) {
 		rc = -EAGAIN;
 		goto err_exit;
 	}
 
-	if (!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE)) {
+	if (!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE, 0)) {
 		rc = -EAGAIN;
 		goto err_exit;
 	}
@@ -1235,7 +1269,8 @@
 		printk(KERN_ERR "e100: hw init failed\n");
 		return false;
 	}
-	e100_dis_intr(bdp);
+	/* Interrupts are enabled after device reset */
+	e100_disable_clear_intr(bdp);
 
 	return true;
 }
@@ -1303,10 +1338,10 @@
 	e100_sw_reset(bdp, reset_cmd);
 
 	/* Load the CU BASE (set to 0, because we use linear mode) */
-	if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE))
+	if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE, 0))
 		return false;
 
-	if (!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE))
+	if (!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE, 0))
 		return false;
 
 	/* Load interrupt microcode  */
@@ -1590,6 +1625,12 @@
 {
 	struct e100_private *bdp = dev->priv;
 
+#ifdef E100_CU_DEBUG
+	if (e100_cu_unknown_state(bdp)) {
+		printk(KERN_ERR "e100: %s: CU unknown state in e100_watchdog\n",
+			dev->name);
+	}
+#endif	
 	if (!netif_running(dev)) {
 		return;
 	}
@@ -1646,7 +1687,8 @@
 		if (netif_running(dev))
 			netif_wake_queue(dev);
 	} else {
-		netif_stop_queue(dev);
+		if (netif_running(dev))
+			netif_stop_queue(dev);
 	}
 
 	rmb();
@@ -1774,11 +1816,8 @@
 		return;
 	}
 
-	/* disable intr before we ack & after identifying the intr as ours */
-	e100_dis_intr(bdp);
-
-	writew(intr_status, &bdp->scb->scb_status);	/* ack intrs */
-	readw(&bdp->scb->scb_status);
+	/* disable and ack intr */
+	e100_disable_clear_intr(bdp);
 
 	/* the device is closed, don't continue or else bad things may happen. */
 	if (!netif_running(dev)) {
@@ -2208,10 +2247,11 @@
  *
  * e100_start_cu must be called while holding the tx_lock ! 
  */
-void
+u8
 e100_start_cu(struct e100_private *bdp, tcb_t *tcb)
 {
 	unsigned long lock_flag;
+	u8 ret = true;
 
 	spin_lock_irqsave(&(bdp->bd_lock), lock_flag);
 	switch (bdp->next_cu_cmd) {
@@ -2242,12 +2282,13 @@
 			       "e100: %s: cu_start: timeout waiting for cu\n",
 			       bdp->device->name);
 		if (!e100_wait_exec_cmplx(bdp, (u32) (tcb->tcb_phys),
-					  SCB_CUC_START)) {
+					  SCB_CUC_START, CB_TRANSMIT)) {
 			printk(KERN_DEBUG
 			       "e100: %s: cu_start: timeout waiting for scb\n",
 			       bdp->device->name);
 			e100_exec_cmplx(bdp, (u32) (tcb->tcb_phys),
 					SCB_CUC_START);
+			ret = false;
 		}
 
 		bdp->next_cu_cmd = RESUME_WAIT;
@@ -2259,6 +2300,7 @@
 	bdp->last_tcb = tcb;
 
 	spin_unlock_irqrestore(&(bdp->bd_lock), lock_flag);
+	return ret;
 }
 
 /* ====================================================================== */
@@ -2306,8 +2348,9 @@
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout(HZ / 100 + 1);
 
-	/* disable interrupts since the're now enabled */
-	e100_dis_intr(bdp);
+	/* disable interrupts since they are enabled */
+	/* after device reset during selftest        */
+	e100_disable_clear_intr(bdp);
 
 	/* if The First Self Test DWORD Still Zero, We've timed out. If the
 	 * second DWORD is not zero then we have an error. */
@@ -2405,7 +2448,7 @@
 
 	spin_lock(&bdp->bd_lock);
 
-	if (!e100_wait_exec_cmplx(bdp, rx_struct->dma_addr, SCB_RUC_START)) {
+	if (!e100_wait_exec_cmplx(bdp, rx_struct->dma_addr, SCB_RUC_START, 0)) {
 		printk(KERN_DEBUG
 		       "e100: %s: start_ru: wait_scb failed\n", 
 		       bdp->device->name);
@@ -2473,7 +2516,7 @@
 	*pcmd_complete = 0;
 	wmb();
 
-	if (!e100_wait_exec_cmplx(bdp, bdp->stat_cnt_phys, SCB_CUC_DUMP_ADDR))
+	if (!e100_wait_exec_cmplx(bdp, bdp->stat_cnt_phys, SCB_CUC_DUMP_ADDR, 0))
 		return false;
 
 	/* wait 10 microseconds for the command to complete */
@@ -2595,8 +2638,10 @@
 	unsigned long lock_flag;
 	unsigned long expiration_time;
 	unsigned char rc = true;
+	u8 sub_cmd;
 
 	ntcb_hdr = (cb_header_t *) command->non_tx_cmd;	/* get hdr of non tcb cmd */
+	sub_cmd = cpu_to_le16(ntcb_hdr->cb_cmd);
 
 	/* Set the Command Block to be the last command block */
 	ntcb_hdr->cb_cmd |= __constant_cpu_to_le16(CB_EL_BIT);
@@ -2629,7 +2674,7 @@
 
 	spin_lock_irqsave(&bdp->bd_lock, lock_flag);
 
-	if (!e100_wait_exec_cmplx(bdp, command->dma_addr, SCB_CUC_START)) {
+	if (!e100_wait_exec_cmplx(bdp, command->dma_addr, SCB_CUC_START, sub_cmd)) {
 		spin_unlock_irqrestore(&(bdp->bd_lock), lock_flag);
 		rc = false;
 		goto exit;
@@ -2649,6 +2694,10 @@
 			yield();
 			spin_lock_bh(&(bdp->bd_non_tx_lock));
 		} else {
+#ifdef E100_CU_DEBUG			
+			printk(KERN_ERR "e100: %s: non-TX command (%x) "
+				"timeout\n", bdp->device->name, sub_cmd);
+#endif			
 			rc = false;
 			goto exit;
 		}
@@ -2694,7 +2743,12 @@
 	}
 
 	/* Mask off our interrupt line -- its unmasked after reset */
-	e100_dis_intr(bdp);
+	e100_disable_clear_intr(bdp);
+#ifdef E100_CU_DEBUG	
+	bdp->last_cmd = 0;
+	bdp->last_sub_cmd = 0;
+#endif	
+
 }
 
 /**
@@ -2894,19 +2948,6 @@
 void __devinit
 e100_print_brd_conf(struct e100_private *bdp)
 {
-	if (netif_carrier_ok(bdp->device)) {
-		printk(KERN_NOTICE
-		       "  Mem:0x%08lx  IRQ:%d  Speed:%d Mbps  Dx:%s\n",
-		       (unsigned long) bdp->device->mem_start,
-		       bdp->device->irq, bdp->cur_line_speed,
-		       (bdp->cur_dplx_mode == FULL_DUPLEX) ? "Full" : "Half");
-	} else {
-		printk(KERN_NOTICE
-		       "  Mem:0x%08lx  IRQ:%d  Speed:%d Mbps  Dx:%s\n",
-		       (unsigned long) bdp->device->mem_start,
-		       bdp->device->irq, 0, "N/A");
-	}
-
 	/* Print the string if checksum Offloading was enabled */
 	if (bdp->flags & DF_CSUM_OFFLOAD)
 		printk(KERN_NOTICE "  Hardware receive checksums enabled\n");
@@ -3005,8 +3046,13 @@
 void
 e100_isolate_driver(struct e100_private *bdp)
 {
-	if (netif_running(bdp->device)) {
-		e100_dis_intr(bdp);
+
+	/* Check if interface is up                              */
+	/* NOTE: Can't use netif_running(bdp->device) because    */
+	/* dev_close clears __LINK_STATE_START before calling    */
+	/* e100_close (aka dev->stop)                            */
+	if (bdp->device->flags & IFF_UP) {
+		e100_disable_clear_intr(bdp);
 		del_timer_sync(&bdp->watchdog_timer);
 		del_timer_sync(&bdp->hwi_timer);
 		/* If in middle of cable diag, */
@@ -3045,63 +3091,51 @@
 }
 
 /* 
- * Procedure:   e100_hw_reset_recover
+ * Procedure:   e100_configure_device
  *
- * Description: This routine will recover the hw after reset.
+ * Description: This routine will configure device
  *
  * Arguments:
  *      bdp - Ptr to this card's e100_bdconfig structure
- *        reset_cmd - s/w reset or selective reset. 
  *
  * Returns:
  *        true upon success
  *        false upon failure
  */
 unsigned char
-e100_hw_reset_recover(struct e100_private *bdp, u32 reset_cmd)
+e100_configure_device(struct e100_private *bdp)
 {
-	bdp->last_tcb = NULL;
-	if (reset_cmd == PORT_SOFTWARE_RESET) {
+	/*load CU & RU base */
+	if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE, 0))
+		return false;
 
-		/*load CU & RU base */
-		if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE)) {
-			return false;
-		}
+	if (e100_load_microcode(bdp))
+		bdp->flags |= DF_UCODE_LOADED;
 
-		if (e100_load_microcode(bdp)) {
-			bdp->flags |= DF_UCODE_LOADED;
-		}
+	if (!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE, 0))
+		return false;
 
-		if (!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE)) {
-			return false;
-		}
+	/* Issue the load dump counters address command */
+	if (!e100_wait_exec_cmplx(bdp, bdp->stat_cnt_phys, SCB_CUC_DUMP_ADDR, 0))
+		return false;
 
-		/* Issue the load dump counters address command */
-		if (!e100_wait_exec_cmplx(bdp, bdp->stat_cnt_phys,
-					  SCB_CUC_DUMP_ADDR)) {
-			return false;
-		}
+	if (!e100_setup_iaaddr(bdp, bdp->device->dev_addr)) {
+		printk(KERN_ERR "e100: e100_configure_device: "
+			"setup iaaddr failed\n");
+		return false;
+	}
 
-		if (!e100_setup_iaaddr(bdp, bdp->device->dev_addr)) {
-			printk(KERN_ERR
-			       "e100: e100_hw_reset_recover: "
-			       "setup iaaddr failed\n");
-			return false;
-		}
-
-		e100_set_multi_exec(bdp->device);
-
-		/* Change for 82558 enhancement */
-		/* If 82558/9 and if the user has enabled flow control, set up * the
-		 * Flow Control Reg. in the CSR */
-		if ((bdp->flags & IS_BACHELOR)
-		    && (bdp->params.b_params & PRM_FC)) {
-			writeb(DFLT_FC_THLD,
-			       &bdp->scb->scb_ext.d101_scb.scb_fc_thld);
-			writeb(DFLT_FC_CMD,
-			       &bdp->scb->scb_ext.d101_scb.scb_fc_xon_xoff);
-		}
+	e100_set_multi_exec(bdp->device);
 
+	/* Change for 82558 enhancement                                */
+	/* If 82558/9 and if the user has enabled flow control, set up */
+	/* flow Control Reg. in the CSR                                */
+	if ((bdp->flags & IS_BACHELOR)
+	    && (bdp->params.b_params & PRM_FC)) {
+		writeb(DFLT_FC_THLD,
+			&bdp->scb->scb_ext.d101_scb.scb_fc_thld);
+		writeb(DFLT_FC_CMD,
+			&bdp->scb->scb_ext.d101_scb.scb_fc_xon_xoff);
 	}
 
 	e100_force_config(bdp);
@@ -3115,7 +3149,7 @@
 	u32 cmd = full_reset ? PORT_SOFTWARE_RESET : PORT_SELECTIVE_RESET;
 	e100_sw_reset(bdp, cmd);
 	if (cmd == PORT_SOFTWARE_RESET) {
-		if (!e100_hw_reset_recover(bdp, cmd))
+		if (!e100_configure_device(bdp))
 			printk(KERN_ERR "e100: e100_deisolate_driver:" 
 		       		" device configuration failed\n");
 	} 
@@ -3253,10 +3287,8 @@
 e100_ethtool_set_settings(struct net_device *dev, struct ifreq *ifr)
 {
 	struct e100_private *bdp;
-	int current_duplex;
 	int e100_new_speed_duplex;
 	int ethtool_new_speed_duplex;
-	int speed_duplex_change_required;
 	struct ethtool_cmd ecmd;
 
 	if (!capable(CAP_NET_ADMIN)) {
@@ -3264,64 +3296,48 @@
 	}
 
 	bdp = dev->priv;
-	if (netif_running(dev)) {
-		return -EBUSY;
-	}
 	if (copy_from_user(&ecmd, ifr->ifr_data, sizeof (ecmd))) {
 		return -EFAULT;
 	}
-	current_duplex =
-		(bdp->cur_dplx_mode == HALF_DUPLEX) ? DUPLEX_HALF : DUPLEX_FULL;
-	speed_duplex_change_required = (ecmd.speed != bdp->cur_line_speed)
-		|| (ecmd.duplex != current_duplex);
-
-	if ((ecmd.autoneg == AUTONEG_ENABLE) && speed_duplex_change_required) {
-		return -EINVAL;
-	}
 
 	if ((ecmd.autoneg == AUTONEG_ENABLE)
 	    && (bdp->speed_duplex_caps & SUPPORTED_Autoneg)) {
 		bdp->params.e100_speed_duplex = E100_AUTONEG;
 		e100_set_speed_duplex(bdp);
 	} else {
-		if (speed_duplex_change_required) {
-			if (ecmd.speed == SPEED_10) {
-				if (ecmd.duplex == DUPLEX_HALF) {
-					e100_new_speed_duplex =
-						E100_SPEED_10_HALF;
-					ethtool_new_speed_duplex =
-						SUPPORTED_10baseT_Half;
-
-				} else {
-					e100_new_speed_duplex =
-						E100_SPEED_10_FULL;
-					ethtool_new_speed_duplex =
-						SUPPORTED_10baseT_Full;
-				}
-
-			} else {
-				if (ecmd.duplex == DUPLEX_HALF) {
-					e100_new_speed_duplex =
-						E100_SPEED_100_HALF;
-					ethtool_new_speed_duplex =
-						SUPPORTED_100baseT_Half;
-
-				} else {
-					e100_new_speed_duplex =
-						E100_SPEED_100_FULL;
-					ethtool_new_speed_duplex =
-						SUPPORTED_100baseT_Full;
-				}
-			}
-
-			if (bdp->speed_duplex_caps & ethtool_new_speed_duplex) {
-				bdp->params.e100_speed_duplex =
-					e100_new_speed_duplex;
-				e100_set_speed_duplex(bdp);
-			} else {
-				return -EOPNOTSUPP;
-			}
-		}
+		if (ecmd.speed == SPEED_10) {
+			if (ecmd.duplex == DUPLEX_HALF) {
+				e100_new_speed_duplex =
+					E100_SPEED_10_HALF;
+				ethtool_new_speed_duplex =
+					SUPPORTED_10baseT_Half;
+			} else { 
+				e100_new_speed_duplex =
+					E100_SPEED_10_FULL;
+				ethtool_new_speed_duplex =
+					SUPPORTED_10baseT_Full;
+			} 
+		} else { 
+			if (ecmd.duplex == DUPLEX_HALF) {
+				e100_new_speed_duplex =
+					E100_SPEED_100_HALF;
+				ethtool_new_speed_duplex =
+					SUPPORTED_100baseT_Half;
+			} else { 
+				e100_new_speed_duplex =
+					E100_SPEED_100_FULL;
+				ethtool_new_speed_duplex =
+					SUPPORTED_100baseT_Full;
+			} 
+		}
+
+		if (bdp->speed_duplex_caps & ethtool_new_speed_duplex) {
+			bdp->params.e100_speed_duplex =
+				e100_new_speed_duplex;
+			e100_set_speed_duplex(bdp);
+		} else {
+			return -EOPNOTSUPP;
+		} 
 	}
 
 	return 0;
@@ -3838,9 +3854,6 @@
 	case SIOCSMIIREG:
 		if (!capable(CAP_NET_ADMIN))
 			return -EPERM;
-		if (netif_running(dev)) {
-			return -EBUSY;
-		}
 		/* If reg = 0 && change speed/duplex */
 		if (data_ptr->reg_num == 0 && 
 			(data_ptr->val_in == (BMCR_ANENABLE | BMCR_ANRESTART) /* restart cmd */
@@ -3860,10 +3873,9 @@
 					bdp->params.e100_speed_duplex = E100_SPEED_10_HALF;
 				e100_set_speed_duplex(bdp);
 		}
-		else {
-			e100_mdi_write(bdp, data_ptr->reg_num, bdp->phy_addr,
-			       data_ptr->val_in);
-		}
+		else 
+			/* Only allows changing speed/duplex */
+			return -EINVAL;
 		
 		break;
 
@@ -3960,6 +3972,8 @@
 	struct e100_private *bdp = (struct e100_private *) ptr;
 	nxmit_cb_entry_t *active_command;
 	int restart = true;
+	cb_header_t *non_tx_cmd;
+	u8 sub_cmd;
 
 	spin_lock_bh(&(bdp->bd_non_tx_lock));
 
@@ -3987,6 +4001,15 @@
 		    && time_before(jiffies, active_command->expiration_time)) {
 			goto exit;
 		} else {
+			non_tx_cmd = (cb_header_t *) active_command->non_tx_cmd;
+			sub_cmd = CB_CMD_MASK & le16_to_cpu(non_tx_cmd->cb_cmd);
+#ifdef E100_CU_DEBUG			
+			if (!(non_tx_cmd->cb_status 
+			    & __constant_cpu_to_le16(CB_STATUS_COMPLETE)))
+				printk(KERN_ERR "e100: %s: Queued "
+					"command (%x) timeout\n", 
+					bdp->device->name, sub_cmd);
+#endif			
 			list_del(&(active_command->list_elem));
 			e100_free_non_tx_cmd(bdp, active_command);
 		}
@@ -4009,9 +4032,10 @@
 		bdp->non_tx_command_state = E100_WAIT_NON_TX_FINISH;
 		active_command = list_entry(bdp->non_tx_cmd_list.next,
 					    nxmit_cb_entry_t, list_elem);
+		sub_cmd = ((cb_header_t *) active_command->non_tx_cmd)->cb_cmd;
 		spin_lock_irq(&(bdp->bd_lock));
 		e100_wait_exec_cmplx(bdp, active_command->dma_addr,
-				     SCB_CUC_START);
+				     SCB_CUC_START, sub_cmd);
 		spin_unlock_irq(&(bdp->bd_lock));
 		active_command->expiration_time = jiffies + HZ;
 		cmd_type = CB_CMD_MASK &
@@ -4084,9 +4108,11 @@
 	e100_isolate_driver(bdp);
 	pci_save_state(pcid, bdp->pci_state);
 
+	/* Enable or disable WoL */
+	e100_do_wol(pcid, bdp);
+	
 	/* If wol is enabled */
 	if (bdp->wolopts) {
-		e100_do_wol(pcid, bdp);
 		pci_enable_wake(pcid, 3, 1);	/* Enable PME for power state D3 */
 		pci_set_power_state(pcid, 3);	/* Set power state to D3.        */
 	} else {
@@ -4102,17 +4128,13 @@
 {
 	struct net_device *netdev = pci_get_drvdata(pcid);
 	struct e100_private *bdp = netdev->priv;
-	u8 full_reset = false;
 
 	pci_set_power_state(pcid, 0);
 	pci_enable_wake(pcid, 0, 0);	/* Clear PME status and disable PME */
 	pci_restore_state(pcid, bdp->pci_state);
 
-	if (bdp->wolopts & (WAKE_UCAST | WAKE_ARP)) {
-		full_reset = true;
-	}
-
-	e100_deisolate_driver(bdp, full_reset);
+	/* Also do device full reset because device was in D3 state */
+	e100_deisolate_driver(bdp, true);
 
 	return 0;
 }
@@ -4239,3 +4261,20 @@
 	e100_mdi_write(bdp, MII_BMCR, bdp->phy_addr, control);
 	return;
 }
+
+#ifdef E100_CU_DEBUG
+unsigned char
+e100_cu_unknown_state(struct e100_private *bdp)
+{
+	u8 scb_cmd_low;
+	u16 scb_status;
+	scb_cmd_low = bdp->scb->scb_cmd_low;
+	scb_status = le16_to_cpu(bdp->scb->scb_status);
+	/* If CU is active and executing unknown cmd */
+	if (scb_status & SCB_CUS_ACTIVE && scb_cmd_low & SCB_CUC_UNKNOWN)
+		return true;
+	else
+		return false;
+}
+#endif
+
diff -Nru a/drivers/net/e100/e100_test.c b/drivers/net/e100/e100_test.c
--- a/drivers/net/e100/e100_test.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/e100/e100_test.c	Wed Jan  8 20:04:43 2003
@@ -29,7 +29,7 @@
 #include "e100_config.h"
 
 extern u16 e100_eeprom_read(struct e100_private *, u16);
-extern int e100_wait_exec_cmplx(struct e100_private *, u32,u8);
+extern int e100_wait_exec_cmplx(struct e100_private *, u32,u8, u8);
 extern void e100_phy_reset(struct e100_private *bdp);
 extern void e100_phy_autoneg(struct e100_private *bdp);
 extern void e100_phy_set_loopback(struct e100_private *bdp);
@@ -95,11 +95,9 @@
 		test_info [E100_EEPROM_TEST_FAIL] = true;
 	}
 
-	e100_deisolate_driver(bdp, false);
-
-	/*Let card recover from the test*/
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout(HZ * 2);
+    	e100_deisolate_driver(bdp, false);
 
 	return flags | (test_result ? 0 : ETH_TEST_FL_FAILED);
 }
@@ -128,7 +126,7 @@
 		}
 	}
 
-	e100_hw_reset_recover(bdp,PORT_SOFTWARE_RESET);
+	e100_configure_device(bdp);
 
 	return retval;
 }
@@ -166,13 +164,19 @@
 {
 	u8 rc = 0;
 
+	printk(KERN_DEBUG "%s: PHY loopback test starts\n", dev->name);
+	e100_sw_reset(dev->priv, PORT_SELECTIVE_RESET);
 	if (!e100_diag_one_loopback(dev, PHY_LOOPBACK)) {
 		rc |= PHY_LOOPBACK;
 	}
+	printk(KERN_DEBUG "%s: PHY loopback test ends\n", dev->name);
 
+	printk(KERN_DEBUG "%s: MAC loopback test starts\n", dev->name);
+	e100_sw_reset(dev->priv, PORT_SELECTIVE_RESET);
 	if (!e100_diag_one_loopback(dev, MAC_LOOPBACK)) {
 		rc |= MAC_LOOPBACK;
 	}
+	printk(KERN_DEBUG "%s: MAC loopback test ends\n", dev->name);
 
 	return rc;
 }
@@ -341,12 +345,12 @@
 e100_diag_loopback_cu_ru_exec(struct e100_private *bdp)
 {
 	/*load CU & RU base */ 
-	if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE))
-		printk("e100: SCB_CUC_LOAD_BASE failed\n");
-	if(!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE))
-		printk("e100: SCB_RUC_LOAD_BASE failed!\n");
-	if(!e100_wait_exec_cmplx(bdp, bdp->loopback.dma_handle, SCB_RUC_START))
-		printk("e100: SCB_RUC_START failed!\n");
+	if (!e100_wait_exec_cmplx(bdp, 0, SCB_CUC_LOAD_BASE, 0))
+		printk(KERN_ERR "e100: SCB_CUC_LOAD_BASE failed\n");
+	if(!e100_wait_exec_cmplx(bdp, 0, SCB_RUC_LOAD_BASE, 0))
+		printk(KERN_ERR "e100: SCB_RUC_LOAD_BASE failed!\n");
+	if(!e100_wait_exec_cmplx(bdp, bdp->loopback.dma_handle, SCB_RUC_START, 0))
+		printk(KERN_ERR "e100: SCB_RUC_START failed!\n");
 
 	bdp->next_cu_cmd = START_WAIT;
 	e100_start_cu(bdp, bdp->loopback.tcb);
diff -Nru a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
--- a/drivers/net/e1000/e1000.h	Wed Jan  8 20:04:32 2003
+++ b/drivers/net/e1000/e1000.h	Wed Jan  8 20:04:32 2003
@@ -113,6 +113,7 @@
 #define E1000_DEFAULT_PBA    0x00000030
 
 #define AUTO_ALL_MODES       0
+#define E1000_EEPROM_APME    4
 
 /* only works for sizes that are powers of 2 */
 #define E1000_ROUNDUP(i, size) ((i) = (((i) + (size) - 1) & ~((size) - 1)))
diff -Nru a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
--- a/drivers/net/e1000/e1000_ethtool.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/net/e1000/e1000_ethtool.c	Wed Jan  8 20:04:44 2003
@@ -194,7 +194,7 @@
 	regs_buff[4]  = E1000_READ_REG(hw, RDH);
 	regs_buff[5]  = E1000_READ_REG(hw, RDT);
 	regs_buff[6]  = E1000_READ_REG(hw, RDTR);
-	
+
 	regs_buff[7]  = E1000_READ_REG(hw, TCTL);
 	regs_buff[8]  = E1000_READ_REG(hw, TDLEN);
 	regs_buff[9]  = E1000_READ_REG(hw, TDH);
@@ -233,7 +233,7 @@
 	return 0;
 }
 
-static int 
+static int
 e1000_ethtool_seeprom(struct e1000_adapter *adapter,
                       struct ethtool_eeprom *eeprom, void *user_data)
 {
@@ -306,12 +306,10 @@
 		/* Fall Through */
 
 	default:
-		wol->supported = WAKE_PHY | WAKE_UCAST | 
-				 WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC;
-		
+		wol->supported = WAKE_UCAST | WAKE_MCAST
+			         | WAKE_BCAST | WAKE_MAGIC;
+
 		wol->wolopts = 0;
-		if(adapter->wol & E1000_WUFC_LNKC)
-			wol->wolopts |= WAKE_PHY;
 		if(adapter->wol & E1000_WUFC_EX)
 			wol->wolopts |= WAKE_UCAST;
 		if(adapter->wol & E1000_WUFC_MC)
@@ -343,13 +341,11 @@
 		/* Fall Through */
 
 	default:
-		if(wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
+		if(wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | WAKE_PHY))
 			return -EOPNOTSUPP;
 
 		adapter->wol = 0;
 
-		if(wol->wolopts & WAKE_PHY)
-			adapter->wol |= E1000_WUFC_LNKC;
 		if(wol->wolopts & WAKE_UCAST)
 			adapter->wol |= E1000_WUFC_EX;
 		if(wol->wolopts & WAKE_MCAST)
@@ -374,7 +370,7 @@
 e1000_led_blink_callback(unsigned long data)
 {
 	struct e1000_adapter *adapter = (struct e1000_adapter *) data;
-	
+
 	if(test_and_change_bit(E1000_LED_ON, &adapter->led_status))
 		e1000_led_off(&adapter->hw);
 	else
@@ -394,13 +390,13 @@
 
 	e1000_setup_led(&adapter->hw);
 	mod_timer(&adapter->blink_timer, jiffies);
-	
+
 	set_current_state(TASK_INTERRUPTIBLE);
 	if(id->data)
 		schedule_timeout(id->data * HZ);
 	else
 		schedule_timeout(MAX_SCHEDULE_TIMEOUT);
-	
+
 	del_timer_sync(&adapter->blink_timer);
 	e1000_led_off(&adapter->hw);
 	clear_bit(E1000_LED_ON, &adapter->led_status);
diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
--- a/drivers/net/e1000/e1000_main.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/e1000/e1000_main.c	Wed Jan  8 20:04:43 2003
@@ -26,11 +26,21 @@
 
 *******************************************************************************/
 
-#define __E1000_MAIN__
 #include "e1000.h"
 
 /* Change Log
  *
+ * 4.4.19       11/27/02
+ *   o Feature: Added user-settable knob for interrupt throttle rate (ITR).
+ *   o Cleanup: removed large static array allocations.
+ *   o Cleanup: C99 struct initializer format.
+ *   o Bug fix: restore VLAN settings when interface is brought up.
+ *   o Bug fix: return cleanly in probe if error in detecting MAC type.
+ *   o Bug fix: Wake up on magic packet by default only if enabled in eeprom.
+ *   o Bug fix: Validate MAC address in set_mac.
+ *   o Bug fix: Throw away zero-length Tx skbs.
+ *   o Bug fix: Make ethtool EEPROM acceses work on older versions of ethtool.
+ * 
  * 4.4.12       10/15/02
  *   o Clean up: use members of pci_device rather than direct calls to
  *     pci_read_config_word.
@@ -43,30 +53,13 @@
  *   o Now setting netdev->mem_end in e1000_probe.
  *   o Clean up: Moved tx_timeout from interrupt context to process context
  *     using schedule_task.
- *
- *   o Feature: merged in modified NAPI patch from Robert Olsson
- *     <Robert.Olsson@its.uu.se> Uppsala Univeristy, Sweden.
- *
- * 4.3.15      8/9/02
- *   o Converted from Dual BSD/GPL license to GPL license.
- *   o Clean up: use pci_[clear|set]_mwi rather than direct calls to
- *     pci_write_config_word.
- *   o Bug fix: added read-behind-write calls to post writes before delays.
- *   o Bug fix: removed mdelay busy-waits in interrupt context.
- *   o Clean up: direct clear of descriptor bits rather than using memset.
- *   o Bug fix: added wmb() for ia-64 between descritor writes and advancing
- *     descriptor tail.
- *   o Feature: added locking mechanism for asf functionality.
- *   o Feature: exposed two Tx and one Rx interrupt delay knobs for finer
- *     control over interurpt rate tuning.
- *   o Misc ethtool bug fixes.
- *
- * 4.3.2       7/5/02
+ * 
+ * 4.3.15       8/9/02
  */
- 
+
 char e1000_driver_name[] = "e1000";
 char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
-char e1000_driver_version[] = "4.4.12-k1";
+char e1000_driver_version[] = "4.4.19-k1";
 char e1000_copyright[] = "Copyright (c) 1999-2002 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
@@ -175,6 +168,7 @@
 static void e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp);
 static void e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
 static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
+static void e1000_restore_vlan(struct e1000_adapter *adapter);
 
 static int e1000_notify_reboot(struct notifier_block *, unsigned long event, void *ptr);
 static int e1000_notify_netdev(struct notifier_block *, unsigned long event, void *ptr);
@@ -274,6 +268,7 @@
 	/* hardware has been reset, we need to reload some things */
 
 	e1000_set_multi(netdev);
+	e1000_restore_vlan(adapter);
 
 	e1000_configure_tx(adapter);
 	e1000_setup_rctl(adapter);
@@ -349,6 +344,7 @@
 	int mmio_len;
 	int pci_using_dac;
 	int i;
+	uint16_t eeprom_data;
 
 	if((i = pci_enable_device(pdev)))
 		return i;
@@ -501,8 +497,9 @@
 	 * enable the ACPI Magic Packet filter
 	 */
 
+	e1000_read_eeprom(&adapter->hw, EEPROM_INIT_CONTROL2_REG, &eeprom_data);
 	if((adapter->hw.mac_type >= e1000_82544) &&
-	   (E1000_READ_REG(&adapter->hw, WUC) & E1000_WUC_APME))
+	   (eeprom_data & E1000_EEPROM_APME))
 		adapter->wol |= E1000_WUFC_MAG;
 
 	/* reset the hardware with the new settings */
@@ -583,6 +580,7 @@
 	hw->subsystem_id = pdev->subsystem_device;
 
 	pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id);
+
 	pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word);
 
 	adapter->rx_buffer_len = E1000_RXBUFFER_2048;
@@ -627,7 +625,7 @@
 	hw->adaptive_ifs = TRUE;
 
 	/* Copper options */
-	
+
 	if(hw->media_type == e1000_media_type_copper) {
 		hw->mdix = AUTO_ALL_MODES;
 		hw->disable_polarity_correction = FALSE;
@@ -1144,6 +1142,9 @@
 	struct e1000_adapter *adapter = netdev->priv;
 	struct sockaddr *addr = p;
 
+	if(!is_valid_ether_addr(addr->sa_data))
+		return -EADDRNOTAVAIL;
+
 	/* 82542 2.0 needs to be in reset to write receive address registers */
 
 	if(adapter->hw.mac_type == e1000_82542_rev2_0)
@@ -1400,7 +1401,6 @@
 
 	int f;
 	len = skb->len - skb->data_len;
-
 	i = (tx_ring->next_to_use + tx_ring->count - 1) % tx_ring->count;
 	count = 0;
 
@@ -1507,11 +1507,16 @@
 {
 	struct e1000_adapter *adapter = netdev->priv;
 	int tx_flags = 0, count;
-
 	int f;
 
 	count = TXD_USE_COUNT(skb->len - skb->data_len,
 	                      adapter->max_data_per_txd);
+
+	if(count == 0) {
+		dev_kfree_skb_any(skb);
+		return 0;
+	}
+
 	for(f = 0; f < skb_shinfo(skb)->nr_frags; f++)
 		count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size,
 		                       adapter->max_data_per_txd);
@@ -2392,6 +2397,21 @@
 	e1000_write_vfta(&adapter->hw, index, vfta);
 }
 
+static void
+e1000_restore_vlan(struct e1000_adapter *adapter)
+{
+	e1000_vlan_rx_register(adapter->netdev, adapter->vlgrp);
+
+	if(adapter->vlgrp) {
+		uint16_t vid;
+		for(vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) {
+			if(!adapter->vlgrp->vlan_devices[vid])
+				continue;
+			e1000_vlan_rx_add_vid(adapter->netdev, vid);
+		}
+	}
+}
+
 static int
 e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
 {
@@ -2437,14 +2457,19 @@
 {
 	struct net_device *netdev = pci_get_drvdata(pdev);
 	struct e1000_adapter *adapter = netdev->priv;
-	uint32_t ctrl, ctrl_ext, rctl, manc;
+	uint32_t ctrl, ctrl_ext, rctl, manc, status;
+	uint32_t wufc = adapter->wol;
 
 	netif_device_detach(netdev);
 
 	if(netif_running(netdev))
 		e1000_down(adapter);
 
-	if(adapter->wol) {
+	status = E1000_READ_REG(&adapter->hw, STATUS);
+	if(status & E1000_STATUS_LU)
+		wufc &= ~E1000_WUFC_LNKC;
+
+	if(wufc) {
 		e1000_setup_rctl(adapter);
 		e1000_set_multi(netdev);
 
@@ -2474,7 +2499,7 @@
 		}
 
 		E1000_WRITE_REG(&adapter->hw, WUC, E1000_WUC_PME_EN);
-		E1000_WRITE_REG(&adapter->hw, WUFC, adapter->wol);
+		E1000_WRITE_REG(&adapter->hw, WUFC, wufc);
 		pci_enable_wake(pdev, 3, 1);
 		pci_enable_wake(pdev, 4, 1); /* 4 == D3 cold */
 	} else {
diff -Nru a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h
--- a/drivers/net/e1000/e1000_osdep.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/e1000/e1000_osdep.h	Wed Jan  8 20:04:43 2003
@@ -27,7 +27,7 @@
 *******************************************************************************/
 
 
-/* glue for the OS independant part of e1000 
+/* glue for the OS independant part of e1000
  * includes register access macros
  */
 
diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
--- a/drivers/net/e1000/e1000_param.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/net/e1000/e1000_param.c	Wed Jan  8 20:04:44 2003
@@ -230,7 +230,6 @@
 	} arg;
 };
 
-
 static int __devinit
 e1000_validate_option(int *value, struct e1000_option *opt)
 {
@@ -273,7 +272,7 @@
 	default:
 		BUG();
 	}
-		
+
 	printk(KERN_INFO "Invalid %s specified (%i) %s\n",
 	       opt->name, *value, opt->err);
 	*value = opt->def;
@@ -298,7 +297,7 @@
 {
 	int bd = adapter->bd_number;
 	if(bd >= E1000_MAX_NIC) {
-		printk(KERN_NOTICE 
+		printk(KERN_NOTICE
 		       "Warning: no configuration for board #%i\n", bd);
 		printk(KERN_NOTICE "Using defaults for all values\n");
 		bd = E1000_MAX_NIC;
@@ -314,7 +313,7 @@
 		};
 		struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 		e1000_mac_type mac_type = adapter->hw.mac_type;
-		opt.arg.r.max = mac_type < e1000_82544 ? 
+		opt.arg.r.max = mac_type < e1000_82544 ?
 			MAX_TXD : MAX_82544_TXD;
 
 		tx_ring->count = TxDescriptors[bd];
@@ -344,13 +343,13 @@
 			.err  = "defaulting to Enabled",
 			.def  = OPTION_ENABLED
 		};
-		
+
 		int rx_csum = XsumRX[bd];
 		e1000_validate_option(&rx_csum, &opt);
 		adapter->rx_csum = rx_csum;
 	}
 	{ /* Flow Control */
-		
+
 		struct e1000_opt_list fc_list[] =
 			{{ e1000_fc_none,    "Flow Control Disabled" },
 			 { e1000_fc_rx_pause,"Flow Control Receive Only" },
@@ -478,9 +477,10 @@
 
 	{ /* Speed */
 		struct e1000_opt_list speed_list[] = {{          0, "" },
-		                                      {   SPEED_10, "" },
-		                                      {  SPEED_100, "" },
-		                                      { SPEED_1000, "" }};
+						      {   SPEED_10, "" },
+						      {  SPEED_100, "" },
+						      { SPEED_1000, "" }};
+
 		struct e1000_option opt = {
 			.type = list_option,
 			.name = "Speed",
@@ -494,8 +494,9 @@
 	}
 	{ /* Duplex */
 		struct e1000_opt_list dplx_list[] = {{           0, "" },
-		                                     { HALF_DUPLEX, "" },
-		                                     { FULL_DUPLEX, "" }};
+						     { HALF_DUPLEX, "" },
+						     { FULL_DUPLEX, "" }};
+
 		struct e1000_option opt = {
 			.type = list_option,
 			.name = "Duplex",
@@ -572,7 +573,7 @@
 		printk(KERN_INFO "Half Duplex specified without Speed\n");
 		printk(KERN_INFO "Using Autonegotiation at Half Duplex only\n");
 		adapter->hw.autoneg = 1;
-		adapter->hw.autoneg_advertised = ADVERTISE_10_HALF | 
+		adapter->hw.autoneg_advertised = ADVERTISE_10_HALF |
 		                                 ADVERTISE_100_HALF;
 		break;
 	case FULL_DUPLEX:
diff -Nru a/drivers/net/e1000/e1000_proc.c b/drivers/net/e1000/e1000_proc.c
--- a/drivers/net/e1000/e1000_proc.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/net/e1000/e1000_proc.c	Wed Jan  8 20:04:44 2003
@@ -109,7 +109,7 @@
 		if(!strlen(elem->tag))
 			p += sprintf(p, "\n");
 		else
-			p += sprintf(p, "%-*.*s %.*s\n", 
+			p += sprintf(p, "%-*.*s %.*s\n",
 				TAG_MAX_LENGTH, TAG_MAX_LENGTH,
 				elem->tag, FIELD_MAX_LENGTH,
 				elem->func(elem->data, elem->len, buf));
@@ -126,7 +126,7 @@
 {
 	struct proc_list *elem = data;
 
-	sprintf(page, "%.*s", FIELD_MAX_LENGTH, elem->func(elem->data, 
+	sprintf(page, "%.*s", FIELD_MAX_LENGTH, elem->func(elem->data,
 	        elem->len, page));
 
 	return e1000_proc_read(page, start, off, count, eof);
@@ -216,7 +216,7 @@
 }
 
 static void
-e1000_proc_dirs_create(void *data, char *name, 
+e1000_proc_dirs_create(void *data, char *name,
                        struct list_head *proc_list_head)
 {
 	struct proc_dir_entry *intel_proc_dir, *proc_dir, *info_entry;
@@ -257,7 +257,7 @@
 
 static void
 e1000_proc_list_add(struct list_head *proc_list_head, char *tag,
-                    void *data, size_t len, 
+                    void *data, size_t len,
 		    char *(*func)(void *, size_t, char *))
 {
 	struct proc_list *new = (struct proc_list *)
@@ -509,8 +509,8 @@
 {
 	struct e1000_adapter *adapter = data;
 	e1000_auto_x_mode mdix_mode = adapter->phy_info.mdix_mode;
-	sprintf(buf, 
-		mdix_mode == e1000_auto_x_mode_manual_mdi  ? "MDI"   : 
+	sprintf(buf,
+		mdix_mode == e1000_auto_x_mode_manual_mdi  ? "MDI"   :
 		mdix_mode == e1000_auto_x_mode_manual_mdix ? "MDI-X" :
 		"Unknown");
 	return buf;
@@ -531,7 +531,7 @@
  * e1000_proc_list_setup - build link list of proc praramters
  * @adapter: board private structure
  *
- * Order matters - ethx.info entries are ordered in the order links 
+ * Order matters - ethx.info entries are ordered in the order links
  * are added to list.
  */
 
@@ -610,7 +610,7 @@
 	LIST_ADD_U("Tx_Aborted_Errors", &adapter->net_stats.tx_aborted_errors);
 	LIST_ADD_U("Tx_Carrier_Errors", &adapter->net_stats.tx_carrier_errors);
 	LIST_ADD_U("Tx_FIFO_Errors", &adapter->net_stats.tx_fifo_errors);
-	LIST_ADD_U("Tx_Heartbeat_Errors", 
+	LIST_ADD_U("Tx_Heartbeat_Errors",
 	           &adapter->net_stats.tx_heartbeat_errors);
 	LIST_ADD_U("Tx_Window_Errors", &adapter->net_stats.tx_window_errors);
 
@@ -649,17 +649,17 @@
 		           adapter, e1000_proc_cable_polarity);
 		LIST_ADD_F("PHY_Disable_Polarity_Correction",
 		           adapter, e1000_proc_polarity_correction);
-		LIST_ADD_U("PHY_Idle_Errors", 
+		LIST_ADD_U("PHY_Idle_Errors",
 		           &adapter->phy_stats.idle_errors);
 		LIST_ADD_U("PHY_Receive_Errors",
 		           &adapter->phy_stats.receive_errors);
 		LIST_ADD_F("PHY_MDI_X_Enabled",
 		           adapter, e1000_proc_mdi_x_enabled);
 		LIST_ADD_F("PHY_Local_Receiver_Status",
-		           &adapter->phy_info.local_rx, 
+		           &adapter->phy_info.local_rx,
 			   e1000_proc_rx_status);
 		LIST_ADD_F("PHY_Remote_Receiver_Status",
-		           &adapter->phy_info.remote_rx, 
+		           &adapter->phy_info.remote_rx,
 			   e1000_proc_rx_status);
 	}
 
@@ -675,7 +675,7 @@
 {
 	e1000_proc_list_setup(adapter);
 
-	e1000_proc_dirs_create(adapter, 
+	e1000_proc_dirs_create(adapter,
 	                       adapter->ifname,
 	                       &adapter->proc_list_head);
 }
diff -Nru a/drivers/net/eepro100.c b/drivers/net/eepro100.c
--- a/drivers/net/eepro100.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/net/eepro100.c	Wed Jan  8 20:04:44 2003
@@ -2383,6 +2383,7 @@
 	{ PCI_VENDOR_ID_INTEL, 0x103C, PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_INTEL, 0x103D, PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_INTEL, 0x103E, PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_INTEL, 0x1059, PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_INTEL, 0x1227, PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_INTEL, 0x1228, PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_INTEL, 0x2449, PCI_ANY_ID, PCI_ANY_ID, },
diff -Nru a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
--- a/drivers/net/irda/ali-ircc.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/irda/ali-ircc.c	Wed Jan  8 20:04:43 2003
@@ -1303,6 +1303,9 @@
 {
 	IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
 	
+	/* Keep track of module usage */
+	SET_MODULE_OWNER(dev);
+
 	/* Setup to be a normal IrDA network device driver */
 	irda_device_setup(dev);
 
@@ -1369,8 +1372,6 @@
 	 */
 	self->irlap = irlap_open(dev, &self->qos, hwname);
 		
-	MOD_INC_USE_COUNT;
-
 	IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );	
 	
 	return 0;
@@ -1410,8 +1411,6 @@
 	       
 	free_irq(self->io.irq, dev);
 	free_dma(self->io.dma);
-
-	MOD_DEC_USE_COUNT;
 
 	IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );	
 	
diff -Nru a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
--- a/drivers/net/irda/donauboe.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/irda/donauboe.c	Wed Jan  8 20:04:43 2003
@@ -1388,6 +1388,9 @@
 {
   IRDA_DEBUG (4, "%s()\n", __FUNCTION__);
 
+  /* Keep track of module usage */
+  SET_MODULE_OWNER(dev);
+
   /* Setup to be a normal IrDA network device driver */
   irda_device_setup (dev);
 
@@ -1435,8 +1438,6 @@
 
   self->irdad = 1;
 
-  MOD_INC_USE_COUNT;
-
   return 0;
 }
 
@@ -1466,8 +1467,6 @@
     {
       toshoboe_stopchip (self);
     }
-
-  MOD_DEC_USE_COUNT;
 
   return 0;
 }
diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
--- a/drivers/net/irda/irda-usb.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/net/irda/irda-usb.c	Wed Jan  8 20:04:44 2003
@@ -904,6 +904,9 @@
 {
 	IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
 	
+	/* Keep track of module usage */
+	SET_MODULE_OWNER(dev);
+
 	/* Set up to be a normal IrDA network device driver */
 	irda_device_setup(dev);
 
@@ -974,7 +977,6 @@
 		irda_usb_submit(self, NULL, self->rx_urb[i]);
 
 	/* Ready to play !!! */
-	MOD_INC_USE_COUNT;
 	return 0;
 }
 
@@ -1025,8 +1027,6 @@
 	if (self->irlap)
 		irlap_close(self->irlap);
 	self->irlap = NULL;
-
-	MOD_DEC_USE_COUNT;
 
 	return 0;
 }
diff -Nru a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
--- a/drivers/net/irda/nsc-ircc.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/net/irda/nsc-ircc.c	Wed Jan  8 20:04:32 2003
@@ -1866,6 +1866,9 @@
 {
 	IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
 
+	/* Keep track of module usage */
+	SET_MODULE_OWNER(dev);
+
 	/* Setup to be a normal IrDA network device driver */
 	irda_device_setup(dev);
 
@@ -1934,8 +1937,6 @@
 	 */
 	self->irlap = irlap_open(dev, &self->qos, hwname);
 
-	MOD_INC_USE_COUNT;
-
 	return 0;
 }
 
@@ -1982,8 +1983,6 @@
 
 	/* Restore bank register */
 	outb(bank, iobase+BSR);
-
-	MOD_DEC_USE_COUNT;
 
 	return 0;
 }
diff -Nru a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
--- a/drivers/net/irda/sa1100_ir.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/irda/sa1100_ir.c	Wed Jan  8 20:04:43 2003
@@ -189,8 +189,7 @@
 		break;
 
 	case 4000000:
-		save_flags(flags);
-		cli();
+		local_irq_save(flags);
 
 		si->hscr0 = 0;
 
@@ -210,7 +209,7 @@
 		sa1100_irda_rx_alloc(si);
 		sa1100_irda_rx_dma_start(si);
 
-		restore_flags(flags);
+		local_irq_restore(flags);
 
 		break;
 
diff -Nru a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
--- a/drivers/net/irda/w83977af_ir.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/irda/w83977af_ir.c	Wed Jan  8 20:04:43 2003
@@ -1197,6 +1197,9 @@
 {
 	IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
 
+	/* Keep track of module usage */
+	SET_MODULE_OWNER(dev);
+
 	/* Set up to be a normal IrDA network device driver */
 	irda_device_setup(dev);
 
@@ -1267,8 +1270,6 @@
 	 */
 	self->irlap = irlap_open(dev, &self->qos, hwname);
 
-	MOD_INC_USE_COUNT;
-
 	return 0;
 }
 
@@ -1316,8 +1317,6 @@
 
 	/* Restore bank register */
 	outb(set, iobase+SSR);
-
-	MOD_DEC_USE_COUNT;
 
 	return 0;
 }
diff -Nru a/drivers/net/mii.c b/drivers/net/mii.c
--- a/drivers/net/mii.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/mii.c	Wed Jan  8 20:04:43 2003
@@ -124,13 +124,13 @@
 		/* advertise only what has been requested */
 		advert = mii->mdio_read(dev, mii->phy_id, MII_ADVERTISE);
 		tmp = advert & ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
-		if (ADVERTISED_10baseT_Half)
+		if (ecmd->advertising & ADVERTISED_10baseT_Half)
 			tmp |= ADVERTISE_10HALF;
-		if (ADVERTISED_10baseT_Full)
+		if (ecmd->advertising & ADVERTISED_10baseT_Full)
 			tmp |= ADVERTISE_10FULL;
-		if (ADVERTISED_100baseT_Half)
+		if (ecmd->advertising & ADVERTISED_100baseT_Half)
 			tmp |= ADVERTISE_100HALF;
-		if (ADVERTISED_100baseT_Full)
+		if (ecmd->advertising & ADVERTISED_100baseT_Full)
 			tmp |= ADVERTISE_100FULL;
 		if (advert != tmp) {
 			mii->mdio_write(dev, mii->phy_id, MII_ADVERTISE, tmp);
diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c
--- a/drivers/net/natsemi.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/net/natsemi.c	Wed Jan  8 20:04:32 2003
@@ -164,6 +164,7 @@
 #include <linux/delay.h>
 #include <linux/rtnetlink.h>
 #include <linux/mii.h>
+#include <linux/crc32.h>
 #include <asm/processor.h>	/* Processor type for cache alignment. */
 #include <asm/bitops.h>
 #include <asm/io.h>
@@ -1898,44 +1899,6 @@
 	return &np->stats;
 }
 
-/**
- * dp83815_crc - computer CRC for hash table entries
- *
- * Note - this is, for some reason, *not* the same function
- * as ether_crc_le() or ether_crc(), though it uses the
- * same big-endian polynomial.
- */
-#define DP_POLYNOMIAL			0x04C11DB7
-static unsigned dp83815_crc(int length, unsigned char *data)
-{
-	u32 crc;
-	u8 cur_byte;
-	u8 msb;
-	u8 byte, bit;
-
-	crc = ~0;
-	for (byte=0; byte<length; byte++) {
-		cur_byte = *data++;
-		for (bit=0; bit<8; bit++) {
-			msb = crc >> 31;
-			crc <<= 1;
-			if (msb ^ (cur_byte & 1)) {
-				crc ^= DP_POLYNOMIAL;
-				crc |= 1;
-			}
-			cur_byte >>= 1;
-		}
-	}
-	crc >>= 23;
-
-	return (crc);
-}
-
-
-void set_bit_le(int offset, unsigned char * data)
-{
-	data[offset >> 3] |= (1 << (offset & 0x07));
-}
 #define HASH_TABLE	0x200
 static void __set_rx_mode(struct net_device *dev)
 {
@@ -1960,9 +1923,8 @@
 		memset(mc_filter, 0, sizeof(mc_filter));
 		for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
 			 i++, mclist = mclist->next) {
-			set_bit_le(
-				dp83815_crc(ETH_ALEN, mclist->dmi_addr) & 0x1ff,
-				mc_filter);
+			int i = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 23) & 0x1ff;
+			mc_filter[i/8] |= (1 << (i & 0x07));
 		}
 		rx_mode = RxFilterEnable | AcceptBroadcast
 			| AcceptMulticast | AcceptMyPhys;
diff -Nru a/drivers/net/starfire.c b/drivers/net/starfire.c
--- a/drivers/net/starfire.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/starfire.c	Wed Jan  8 20:04:43 2003
@@ -1847,15 +1847,15 @@
 
 #ifdef __i386__
 	if (debug > 2) {
-		printk("\n"KERN_DEBUG"  Tx ring at %8.8x:\n",
-			   np->tx_ring_dma);
+		printk("\n"KERN_DEBUG"  Tx ring at %9.9Lx:\n",
+			   (u64) np->tx_ring_dma);
 		for (i = 0; i < 8 /* TX_RING_SIZE is huge! */; i++)
 			printk(KERN_DEBUG " #%d desc. %8.8x %8.8x -> %8.8x.\n",
 			       i, le32_to_cpu(np->tx_ring[i].status),
 			       le32_to_cpu(np->tx_ring[i].first_addr),
 			       le32_to_cpu(np->tx_done_q[i].status));
-		printk(KERN_DEBUG "  Rx ring at %8.8x -> %p:\n",
-		       np->rx_ring_dma, np->rx_done_q);
+		printk(KERN_DEBUG "  Rx ring at %9.9Lx -> %p:\n",
+		       (u64) np->rx_ring_dma, np->rx_done_q);
 		if (np->rx_done_q)
 			for (i = 0; i < 8 /* RX_RING_SIZE */; i++) {
 				printk(KERN_DEBUG " #%d desc. %8.8x -> %8.8x\n",
diff -Nru a/drivers/net/sungem.c b/drivers/net/sungem.c
--- a/drivers/net/sungem.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/net/sungem.c	Wed Jan  8 20:04:45 2003
@@ -2850,6 +2850,7 @@
 		printk(KERN_ERR "%s: can't get mac-address\n", dev->name);
 		return -1;
 	}
+#warning MAX_ADDR_LEN is now 32 bytes instead of 8, please fix this as appropriate
 	memcpy(dev->dev_addr, addr, MAX_ADDR_LEN);
 #else
 	get_gem_mac_nonobp(gp->pdev, gp->dev->dev_addr);
diff -Nru a/drivers/net/sunlance.c b/drivers/net/sunlance.c
--- a/drivers/net/sunlance.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/sunlance.c	Wed Jan  8 20:04:43 2003
@@ -1496,6 +1496,7 @@
 #ifdef CONFIG_SUN4
 
 #include <asm/sun4paddr.h>
+#include <asm/machines.h>
 
 /* Find all the lance cards on the system and initialize them */
 static int __init sparc_lance_probe(void)
diff -Nru a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig
--- a/drivers/net/tokenring/Kconfig	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/tokenring/Kconfig	Wed Jan  8 20:04:43 2003
@@ -91,7 +91,7 @@
 
 config TMS380TR
 	tristate "Generic TMS380 Token Ring ISA/PCI adapter support"
-	depends on TR
+	depends on TR && (PCI || ISA)
 	---help---
 	  This driver provides generic support for token ring adapters
 	  based on the Texas Instruments TMS380 series chipsets.  This
diff -Nru a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
--- a/drivers/net/tulip/de4x5.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/net/tulip/de4x5.c	Wed Jan  8 20:04:32 2003
@@ -1223,6 +1223,7 @@
 	lp->pdev = pdev;
 	memcpy((char *)&lp->srom,(char *)&bus.srom,sizeof(struct de4x5_srom));
 	lp->lock = (spinlock_t) SPIN_LOCK_UNLOCKED;
+	init_timer(&lp->timer);
 	de4x5_parse_params(dev);
 
 	/*
diff -Nru a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
--- a/drivers/net/wan/Kconfig	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/wan/Kconfig	Wed Jan  8 20:04:43 2003
@@ -62,7 +62,7 @@
 #
 config COMX
 	tristate "MultiGate (COMX) synchronous serial boards support"
-	depends on WAN
+	depends on WAN && (ISA || PCI)
 	---help---
 	  Say Y if you want to use any board from the MultiGate (COMX) family.
 	  These boards are synchronous serial adapters for the PC,
@@ -176,7 +176,7 @@
 #
 config DSCC4
 	tristate "Etinc PCISYNC serial board support"
-	depends on WAN && m
+	depends on WAN && PCI && m
 	help
 	  This is a driver for Etinc PCISYNC boards based on the Infineon
 	  (ex. Siemens) DSCC4 chipset. It is supposed to work with the four
@@ -193,7 +193,7 @@
 #
 config LANMEDIA
 	tristate "LanMedia Corp. SSI/V.35, T1/E1, HSSI, T3 boards"
-	depends on WAN
+	depends on WAN && PCI
 	---help---
 	  This is a driver for the following Lan Media family of serial
 	  boards.
@@ -222,7 +222,7 @@
 # There is no way to detect a Sealevel board. Force it modular
 config SEALEVEL_4021
 	tristate "Sealevel Systems 4021 support"
-	depends on WAN && m
+	depends on WAN && ISA && m
 	help
 	  This is a driver for the Sealevel Systems ACB 56 serial I/O adapter.
 
@@ -336,7 +336,7 @@
 
 config N2
 	tristate "SDL RISCom/N2 support"
-	depends on HDLC
+	depends on HDLC && ISA
 	help
 	  This driver is for RISCom/N2 single or dual channel ISA cards
 	  made by SDL Communications Inc.  If you have such a card,
@@ -348,7 +348,7 @@
 
 config C101
 	tristate "Moxa C101 support"
-	depends on HDLC
+	depends on HDLC && ISA
 	help
 	  This driver is for C101 SuperSync ISA cards made by Moxa
 	  Technologies Co., Ltd. If you have such a card,
@@ -358,7 +358,7 @@
 
 config FARSYNC
 	tristate "FarSync T-Series support"
-	depends on HDLC
+	depends on HDLC && PCI
 	---help---
 	  This driver supports the FarSync T-Series X.21 (and V.35/V.24) cards
 	  from FarSite Communications Ltd.
@@ -432,7 +432,7 @@
 
 config SDLA
 	tristate "SDLA (Sangoma S502/S508) support"
-	depends on DLCI
+	depends on DLCI && ISA
 	help
 	  Say Y here if you need a driver for the Sangoma S502A, S502E, and
 	  S508 Frame Relay Access Devices. These are multi-protocol cards, but
@@ -465,7 +465,7 @@
 
 config VENDOR_SANGOMA
 	tristate "Sangoma WANPIPE(tm) multiprotocol cards"
-	depends on WAN_ROUTER_DRIVERS && WAN_ROUTER
+	depends on WAN_ROUTER_DRIVERS && WAN_ROUTER && (PCI || ISA)
 	---help---
 	  WANPIPE from Sangoma Technologies Inc. (<http://www.sangoma.com/>)
 	  is a family of intelligent multiprotocol WAN adapters with data
@@ -559,7 +559,7 @@
 
 config CYCLADES_SYNC
 	tristate "Cyclom 2X(tm) cards (EXPERIMENTAL)"
-	depends on WAN_ROUTER_DRIVERS
+	depends on WAN_ROUTER_DRIVERS && (PCI || ISA)
 	---help---
 	  Cyclom 2X from Cyclades Corporation (<http://www.cyclades.com/> and
 	  <http://www.cyclades.com.br/>) is an intelligent multiprotocol WAN
diff -Nru a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
--- a/drivers/net/wireless/Kconfig	Wed Jan  8 20:04:43 2003
+++ b/drivers/net/wireless/Kconfig	Wed Jan  8 20:04:43 2003
@@ -2,12 +2,12 @@
 # Wireless LAN device configuration
 #
 comment "Wireless ISA/PCI cards support"
-	depends on NET_RADIO
+	depends on NET_RADIO && (ISA || PCI || ALL_PPC || PCMCIA)
 
 # Good old obsolete Wavelan.
 config WAVELAN
 	tristate "AT&T/Lucent old WaveLAN & DEC RoamAbout DS ISA support"
-	depends on NET_RADIO
+	depends on NET_RADIO && ISA
 	---help---
 	  The Lucent WaveLAN (formerly NCR and AT&T; or DEC RoamAbout DS) is
 	  a Radio LAN (wireless Ethernet-like Local Area Network) using the
@@ -54,7 +54,7 @@
 
 config HERMES
 	tristate "Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)"
-	depends on NET_RADIO
+	depends on NET_RADIO && (ALL_PPC || PCI || PCMCIA)
 	---help---
 	  A driver for 802.11b wireless cards based based on the "Hermes" or
 	  Intersil HFA384x (Prism 2) MAC controller.  This includes the vast
diff -Nru a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h
--- a/drivers/net/wireless/wavelan_cs.p.h	Wed Jan  8 20:04:45 2003
+++ b/drivers/net/wireless/wavelan_cs.p.h	Wed Jan  8 20:04:45 2003
@@ -499,7 +499,7 @@
 #undef DEBUG_RX_INFO		/* Header of the transmitted packet */
 #undef DEBUG_RX_FAIL		/* Normal failure conditions */
 #define DEBUG_RX_ERROR		/* Unexpected conditions */
-#undef DEBUG_PACKET_DUMP	32	/* Dump packet on the screen */
+#undef DEBUG_PACKET_DUMP	/* Dump packet on the screen */
 #undef DEBUG_IOCTL_TRACE	/* Misc call by Linux */
 #undef DEBUG_IOCTL_INFO		/* Various debug info */
 #define DEBUG_IOCTL_ERROR	/* What's going wrong */
diff -Nru a/drivers/pci/Kconfig b/drivers/pci/Kconfig
--- a/drivers/pci/Kconfig	Wed Jan  8 20:04:43 2003
+++ b/drivers/pci/Kconfig	Wed Jan  8 20:04:43 2003
@@ -1,18 +1,36 @@
 #
 # PCI configuration
 #
+config PCI_LEGACY_PROC
+	bool "Legacy /proc/pci interface"
+	---help---
+	  This feature enables a procfs file -- /proc/pci -- that provides a 
+	  summary of PCI devices in the system. 
+
+	  This feature has been deprecated as of v2.5.53, in favor of using the 
+	  tool lspci(8). This feature may be removed at a future date. 
+
+	  lspci can provide the same data, as well as much more. lspci is a part of
+	  the pci-utils package, which should be installed by your distribution. 
+	  See Documentation/Changes for information on where to get the latest 
+	  version. 
+
+	  When in doubt, say N.
+
 config PCI_NAMES
 	bool "PCI device name database"
 	depends on PCI
 	---help---
 	  By default, the kernel contains a database of all known PCI device
 	  names to make the information in /proc/pci, /proc/ioports and
-	  similar files comprehensible to the user. This database increases
-	  size of the kernel image by about 80KB, but it gets freed after the
-	  system boots up, so it doesn't take up kernel memory. Anyway, if you
-	  are building an installation floppy or kernel for an embedded system
-	  where kernel image size really matters, you can disable this feature
-	  and you'll get device ID numbers instead of names.
+	  similar files comprehensible to the user. 
+
+	  This database increases size of the kernel image by about 80KB. This 
+	  memory is freed after the system boots up if CONFIG_HOTPLUG is not set.
+
+	  Anyway, if you are building an installation floppy or kernel for an 
+	  embedded system where kernel image size really matters, you can disable 
+	  this feature and you'll get device ID numbers instead of names.
 
 	  When in doubt, say Y.
 
diff -Nru a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
--- a/drivers/pci/hotplug.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/pci/hotplug.c	Wed Jan  8 20:04:45 2003
@@ -105,7 +105,7 @@
 void
 pci_remove_device(struct pci_dev *dev)
 {
-	put_device(&dev->dev);
+	device_unregister(&dev->dev);
 	list_del(&dev->bus_list);
 	list_del(&dev->global_list);
 	pci_free_resources(dev);
diff -Nru a/drivers/pci/pci.ids b/drivers/pci/pci.ids
--- a/drivers/pci/pci.ids	Wed Jan  8 20:04:44 2003
+++ b/drivers/pci/pci.ids	Wed Jan  8 20:04:44 2003
@@ -7,7 +7,7 @@
 #	so if you have anything to contribute, please visit the home page or
 #	send a diff -u against the most recent pci.ids to pci-ids@ucw.cz.
 #
-#	$Id: pci.ids,v 1.46 2002/08/14 17:38:51 mares Exp $
+#	$Id: pci.ids,v 1.48 2002/12/26 13:03:41 mares Exp $
 #
 
 # Vendors, devices and subsystems. Please keep sorted.
@@ -21,6 +21,8 @@
 001a  Ascend Communications, Inc.
 0033  Paradyne corp.
 003d  Lockheed Martin-Marietta Corp
+# Real TJN ID is e159, but they got it wrong several times --mj
+0059  Tiger Jet Network Inc. (Wrong ID)
 0070  Hauppauge computer works Inc.
 0100  Ncipher Corp Ltd
 0675  Dynalink
@@ -98,7 +100,8 @@
 	f130  NetFlex-3/P ThunderLAN 1.0
 	f150  NetFlex-3/P ThunderLAN 2.3
 0e55  HaSoTec GmbH
-1000  LSI Logic / Symbios Logic (formerly NCR)
+# Formerly NCR
+1000  LSI Logic / Symbios Logic
 	0001  53c810
 		1000 1000  8100S
 	0002  53c820
@@ -159,8 +162,9 @@
 	9100  INI-9100/9100W SCSI Host
 1002  ATI Technologies Inc
 	4158  68800AX [Mach32]
-	4242  Radeon 8500 DV
+	4242  Radeon R200 BB [Radeon All in Wonder 8500DV]
 		1002 02aa  Radeon 8500 AIW DV Edition
+	4336  Radeon Mobility U1
 	4354  215CT [Mach64 CT]
 	4358  210888CX [Mach64 CX]
 	4554  210888ET [Mach64 ET]
@@ -210,6 +214,7 @@
 	4752  Rage XL
 		1002 0008  Rage XL
 		1002 4752  Rage XL
+		1028 00d1  PowerEdge 2550
 	4753  Rage XC
 		1002 4753  Rage XC
 	4754  3D Rage I/II 215GT [Mach64 GT]
@@ -227,6 +232,18 @@
 	475a  3D Rage IIC AGP
 		1002 0087  Rage 3D IIC
 		1002 475a  Rage IIC AGP
+	4964  Radeon R250 Id [Radeon 9000]
+	4965  Radeon R250 Ie [Radeon 9000]
+	4966  Radeon R250 If [Radeon 9000]
+		10f1 0002  R250 If [Tachyon G9000 PRO]
+		148c 2039  R250 If [Radeon 9000 Pro "Evil Commando"]
+		1509 9a00  R250 If [Radeon 9000 "AT009"]
+		174b 7176  R250 If [Sapphire Radeon 9000 Pro]
+		174b 7192  R250 If [Radeon 9000 "Atlantis"]
+		17af 2005  R250 If [Excalibur Radeon 9000 Pro]
+		17af 2006  R250 If [Excalibur Radeon 9000]
+	4967  Radeon R250 Ig [Radeon 9000]
+	496e  Radeon R250 [Radeon 9000] (Secondary)
 	4c42  3D Rage LT Pro AGP-133
 		0e11 b0e8  Rage 3D LT Pro
 		0e11 b10e  3D Rage LT Pro (Compaq Armada 1750)
@@ -246,6 +263,7 @@
 		1002 4c49  Rage LT Pro
 	4c4d  Rage Mobility P/M AGP 2x
 		1002 0084  Xpert 98 AGP 2X (Mobility)
+		1014 0154  ThinkPad A20m
 	4c4e  Rage Mobility L AGP 2x
 	4c50  3D Rage LT Pro
 		1002 4c50  Rage LT Pro
@@ -253,7 +271,8 @@
 	4c52  Rage Mobility P/M
 	4c53  Rage Mobility L
 	4c54  264LT [Mach64 LT]
-	4c57  Radeon Mobility M7 LW
+	4c57  Radeon Mobility M7 LW [Radeon Mobility 7500]
+		1014 0517  ThinkPad T30
 		1028 00e6  Radeon Mobility M7 LW (Dell Inspiron 8100)
 	4c58  Radeon Mobility M7 LX [Radeon Mobility FireGL 7800]
 	4c59  Radeon Mobility M6 LY
@@ -261,8 +280,17 @@
 		1014 0239  ThinkPad X22/X23/X24
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 	4c5a  Radeon Mobility M6 LZ
+	4c64  Radeon R250 Ld [Radeon Mobility 9000]
+	4c65  Radeon R250 Le [Radeon Mobility 9000]
+	4c66  Radeon R250 Lf [Radeon Mobility 9000]
+	4c67  Radeon R250 Lg [Radeon Mobility 9000]
 	4d46  Rage Mobility M4 AGP
 	4d4c  Rage Mobility M4 AGP
+	4e44  Radeon R300 ND [Radeon 9700]
+	4e45  Radeon R300 NE [Radeon 9700]
+	4e46  Radeon R300 NF [Radeon 9700]
+	4e47  Radeon R300 NG [Radeon 9700]
+	4e64  Radeon R300 [Radeon 9700] (Secondary)
 	5041  Rage 128 PA/PRO
 	5042  Rage 128 PB/PRO AGP 2x
 	5043  Rage 128 PC/PRO AGP 4x
@@ -289,7 +317,7 @@
 	504d  Rage 128 PM/PRO
 	504e  Rage 128 PN/PRO AGP 2x
 	504f  Rage 128 PO/PRO AGP 4x
-	5050  Rage 128 PP/PRO TMDS
+	5050  Rage 128 PP/PRO TMDS [Xpert 128]
 		1002 0008  Xpert 128
 	5051  Rage 128 PQ/PRO AGP 2x TMDS
 	5052  Rage 128 PR/PRO AGP 4x TMDS
@@ -299,7 +327,7 @@
 	5056  Rage 128 PV/PRO TMDS
 	5057  Rage 128 PW/PRO AGP 2x TMDS
 	5058  Rage 128 PX/PRO AGP 4x TMDS
-	5144  Radeon QD
+	5144  Radeon R100 QD [Radeon 64 DDR]
 		1002 0008  Radeon 7000/Radeon VE
 		1002 0009  Radeon 7000/Radeon
 		1002 000a  Radeon 7000/Radeon
@@ -313,9 +341,9 @@
 		1002 028a  Radeon 7000/Radeon
 		1002 02aa  Radeon AIW
 		1002 053a  Radeon 7000/Radeon
-	5145  Radeon QE
-	5146  Radeon QF
-	5147  Radeon QG
+	5145  Radeon R100 QE
+	5146  Radeon R100 QF
+	5147  Radeon R100 QG
 	5148  Radeon R200 QH [Radeon 8500]
 		1002 0152  FireGL 8800
 		1002 0172  FireGL 8700
@@ -325,17 +353,30 @@
 	514c  Radeon R200 QL [Radeon 8500 LE]
 		1002 003a  Radeon R200 QL [Radeon 8500 LE]
 		1002 013a  Radeon 8500
-	5157  Radeon 7500 QW
+		148c 2026  R200 QL [Radeon 8500 Evil Master II Multi Display Edition]
+		174b 7149  Radeon R200 QL [Sapphire Radeon 8500 LE]
+	5157  Radeon RV200 QW [Radeon 7500]
 		1002 013a  Radeon 7500
+		1458 4000  RV200 QW [RADEON 7500 PRO MAYA AR]
+		148c 2024  RV200 QW [Radeon 7500LE Dual Display]
+		148c 2025  RV200 QW [Radeon 7500 Evil Master Multi Display Edition]
+		148c 2036  RV200 QW [Radeon 7500 PCI Dual Display]
+		174b 7147  RV200 QW [Sapphire Radeon 7500LE]
 		174b 7161  Radeon RV200 QW [Radeon 7500 LE]
-	5158  Radeon 7500 QX
+		17af 0202  RV200 QW [Excalibur Radeon 7500LE]
+	5158  Radeon RV200 QX [Radeon 7500]
 	5159  Radeon VE QY
 		1002 000a  Radeon 7000/Radeon VE
+		1002 000b  Radeon 7000
 		1002 0038  Radeon 7000/Radeon VE
 		1002 003a  Radeon 7000/Radeon VE
 		1002 00ba  Radeon 7000/Radeon VE
 		1002 013a  Radeon 7000/Radeon VE
-		174b 7112  Radeon 7000 64M TVO
+		1458 4002  RV100 QY [RADEON 7000 PRO MAYA AV Series]
+		148c 2003  RV100 QY [Radeon 7000 Multi-Display Edition]
+		148c 2023  RV100 QY [Radeon 7000 Evil Master Multi-Display]
+		174b 7112  RV100 QY [Sapphire Radeon VE 7000]
+		1787 0202  RV100 QY [Excalibur Radeon 7000]
 	515a  Radeon VE QZ
 	5168  Radeon R200 Qh
 	5169  Radeon R200 Qi
@@ -390,6 +431,7 @@
 		1002 5654  Mach64VT Reference
 	5655  264VT3 [Mach64 VT3]
 	5656  264VT4 [Mach64 VT4]
+	700f  U1/A3 AGP Bridge [IGP 320M]
 1003  ULSI Systems
 	0201  US201
 1004  VLSI Technology Inc
@@ -419,7 +461,10 @@
 		1004 0306  QSound ThunderBird PCI Audio Support Registers
 		122d 1208  DSP368 Audio Support Registers
 		1483 5022  XWave Thunder 3D Audio Support Registers
+	0307  Thunderbird
+	0308  Thunderbird
 	0702  VAS96011 [Golden Gate II]
+	0703  Tollgate
 1005  Avance Logic Inc. [ALI]
 	2064  ALG2032/2064
 	2128  ALG2364A
@@ -581,7 +626,8 @@
 		1014 1010  CS4610 SoundFusion Audio Accelerator
 	6003  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]
 		1013 4280  Crystal SoundFusion PCI Audio Accelerator
-		1681 0050  Hercules Game Theater XP
+		1681 0050  Game Theater XP
+		1681 a011  Fortissimo III 7.1
 	6004  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]
 	6005  Crystal CS4281 PCI Audio
 		1013 4281  Crystal CS4281 PCI Audio
@@ -607,7 +653,9 @@
 	0020  MCA
 	0022  IBM27-82351
 	002d  Python
-	002e  ServeRAID-3x
+	002e  ServeRAID Controller
+		1014 002e  ServeRAID-3x
+		1014 022e  ServeRAID-4H
 	0036  Miami
 	003a  CPU to PCI Bridge
 	003e  16/4 Token ring UTP/STP controller
@@ -641,20 +689,26 @@
 	00a5  ATM Controller (1410a500)
 	00a6  ATM 155MBPS MM Controller (1410a600)
 	00b7  256-bit Graphics Rasterizer [Fire GL1]
-		1902 00b8  Fire GL1
 	00be  ATM 622MBPS Controller (1410be00)
+	00dc  Advanced Systems Management Adapter (ASMA)
 	00fc  CPC710 Dual Bridge and Memory Controller (PCI-64)
 	0105  CPC710 Dual Bridge and Memory Controller (PCI-32)
+	010f  Remote Supervisor Adapter (RSA)
 	0142  Yotta Video Compositor Input
 		1014 0143  Yotta Input Controller (ytin)
 	0144  Yotta Video Compositor Output
 		1014 0145  Yotta Output Controller (ytout)
 	0156  405GP PLB to PCI Bridge
 	01a7  PCI-X to PCI-X Bridge
-	01bd  Netfinity ServeRAID controller
-	01be  ServeRAID-4M
-	01bf  ServeRAID-4L
-	022e  ServeRAID-4H
+	01bd  ServeRAID Controller
+		1014 01be  ServeRAID-4M
+		1014 01bf  ServeRAID-4L
+		1014 0208  ServeRAID-4Mx
+		1014 020e  ServeRAID-4Lx
+		1014 022e  ServeRAID-4H
+		1014 0258  ServeRAID-5i
+		1014 0259  ServeRAID-5i
+	0302  XA-32 chipset [Summit]
 	ffff  MPIC-2 interrupt controller
 1015  LSI Logic Corp of Canada
 1016  ICL Personal Systems
@@ -699,7 +753,11 @@
 1020  Hitachi Computer Products
 1021  OKI Electric Industry Co. Ltd.
 1022  Advanced Micro Devices [AMD]
-	2000  79c970 [PCnet LANCE]
+	1100  K8 NorthBridge
+	1101  K8 NorthBridge
+	1102  K8 NorthBridge
+	1103  K8 NorthBridge
+	2000  79c970 [PCnet32 LANCE]
 		1014 2000  NetFinity 10/100 Fast Ethernet
 		103c 104c  Ethernet with LAN remote power Adapter
 		103c 1064  Ethernet with LAN remote power Adapter
@@ -742,19 +800,23 @@
 	7443  AMD-768 [Opus] ACPI
 		1043 8044  A7M-D Mainboard
 	7445  AMD-768 [Opus] Audio
+	7446  AMD-768 [Opus] MC97 Modem (Smart Link HAMR5600 compatible)
 	7448  AMD-768 [Opus] PCI
 	7449  AMD-768 [Opus] USB
+	7450  AMD-8131 PCI-X Bridge
+	7451  AMD-8131 PCI-X APIC
 	7454  AMD-8151 System Controller
 	7455  AMD-8151 AGP Bridge
 	7460  AMD-8111 PCI
 	7461  AMD-8111 USB
 	7462  AMD-8111 Ethernet
+	7464  AMD-8111 USB
 	7468  AMD-8111 LPC
 	7469  AMD-8111 IDE
 	746a  AMD-8111 SMBus 2.0
 	746b  AMD-8111 ACPI
 	746d  AMD-8111 AC97 Audio
-	756b  AMD-8111 ACPI
+	746e  AMD-8111 MC97 Modem
 1023  Trident Microsystems
 	0194  82C194
 	2000  4DWave DX
@@ -767,6 +829,8 @@
 	8520  CyberBlade i1
 		0e11 b16e  CyberBlade i1 AGP
 		1023 8520  CyberBlade i1 AGP
+	8620  CyberBlade/i1
+		1014 0502  ThinkPad T30
 	8820  CyberBlade XPAi1
 	9320  TGUI 9320
 	9350  GUI Accelerator
@@ -878,9 +942,9 @@
 	0007  Remote Assistant Card 3
 	0008  PowerEdge Expandable RAID Controller 3/Di
 	000a  PowerEdge Expandable RAID Controller 3
-		1027 0121  PowerEdge Expandable RAID Controller 3/Di
 		1028 0106  PowerEdge Expandable RAID Controller 3/Di
 		1028 011b  PowerEdge Expandable RAID Controller 3/Di
+		1028 0121  PowerEdge Expandable RAID Controller 3/Di
 	000c  Embedded Systems Management Device 4
 	000e  PowerEdge Expandable RAID Controller
 	000f  PowerEdge Expandable RAID Controller 4/Di
@@ -988,11 +1052,10 @@
 		102b 5f52  4Sight II
 		102b 9010  Millennium G400 Dual Head
 		1458 0400  GA-G400
-		1705 0001  Digital First Millennium G450 32MB SGRAM
-		1705 0002  Digital First Millennium G450 16MB SGRAM
-		1705 0003  Digital First Millennium G450 32MB
-		1705 0004  Digital First Millennium G450 16MB
-		b16f 0e11  MGA-G400 AGP
+		1705 0001  Millennium G450 32MB SGRAM
+		1705 0002  Millennium G450 16MB SGRAM
+		1705 0003  Millennium G450 32MB
+		1705 0004  Millennium G450 16MB
 	0527  MGA Parhelia AGP
 		102b 0840  Parhelia 128Mb
 	0d10  MGA Ultima/Impression
@@ -1063,6 +1126,7 @@
 	0035  USB
 		1179 0001  USB
 		12ee 7000  Root Hub
+		1799 0001  Root Hub
 	003b  PCI to C-bus Bridge
 	003e  NAPCCARD Cardbus Controller
 	0046  PowerVR PCX2 [midas]
@@ -1085,6 +1149,7 @@
 		12ee 8011  Root hub
 	00e0  USB 2.0
 		12ee 7001  Root hub
+		1799 0002  Root Hub
 1034  Framatome Connectors USA Inc.
 1035  Comp. & Comm. Research Lab
 1036  Future Domain Corp.
@@ -1114,9 +1179,10 @@
 	0630  630 Host
 	0633  633 Host
 	0635  635 Host
-	0645  645 Host
-	0646  645DX Host
+	0645  SiS645 Host & Memory & AGP Controller
+	0646  SiS645DX Host & Memory & AGP Controller
 	0650  650 Host
+	0651  SiS651 Host
 	0730  730 Host
 	0733  733 Host
 	0735  735 Host
@@ -1125,12 +1191,14 @@
 	0900  SiS900 10/100 Ethernet
 		1039 0900  SiS900 10/100 Ethernet Adapter
 	0961  SiS961 [MuTIOL Media IO]
+	0962  SiS962 [MuTIOL Media IO]
 	3602  83C602
 	5107  5107
 	5300  SiS540 PCI Display Adapter
 	5401  486 PCI Chipset
 	5511  5511/5512
 	5513  5513 [IDE]
+		1019 0970  P6STP-FL motherboard
 		1039 5513  SiS5513 EIDE Controller (A,B step)
 	5517  5517
 	5571  5571
@@ -1144,7 +1212,8 @@
 	6205  VGA Controller
 	6236  6236 3D-AGP
 	6300  SiS630 GUI Accelerator+3D
-	6306  6306 3D-AGP
+		1019 0970  P6STP-FL motherboard
+	6306  SiS530 3D PCI/AGP
 		1039 6306  SiS530,620 GUI Accelerator+3D
 	6326  86C326 5598/6326
 		1039 6326  SiS6326 GUI Accelerator
@@ -1154,6 +1223,9 @@
 		1092 4920  SpeedStar A70
 		1569 6326  SiS6326 GUI Accelerator
 	7001  7001
+		1039 7000  Onboard USB Controller
+	7002  SiS7002 USB 2.0
+		1509 7002  Onboard USB Controller
 	7007  FireWire Controller
 	7012  SiS7012 PCI Audio Accelerator
 	7013  56k Winmodem (Smart Link HAMR5600 compatible)
@@ -1241,7 +1313,6 @@
 	3020  Samurai_IDE
 1043  Asustek Computer, Inc.
 	0675  ISDNLink P-IN100-ST-D
-	4057  V8200 GeForce 3
 1044  Distributed Processing Technology
 	1012  Domino RAID Engine
 	a400  SmartCache/Raid I-IV Controller
@@ -1316,6 +1387,7 @@
 104a  SGS Thomson Microelectronics
 	0008  STG 2000X
 	0009  STG 1764X
+	0010  STG4000 [3D Prophet Kyro Series]
 	0981  DEC-Tulip compatible 10/100 Ethernet
 	1746  STG 1764X
 	2774  DEC-Tulip compatible 10/100 Ethernet
@@ -1371,9 +1443,11 @@
 	8026  TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)
 	8027  PCI4451 IEEE-1394 Controller
 		1028 00e6  PCI4451 IEEE-1394 Controller (Dell Inspiron 8100)
+	8400  USR2210 22Mbps Wireless PC Card
 	a001  TDC1570
 	a100  TDC1561
 	a102  TNETA1575 HyperSAR Plus w/PCI Host i/f & UTOPIA i/f
+	a106  TMS320C6205
 	ac10  PCI1050
 	ac11  PCI1053
 	ac12  PCI1130
@@ -1407,6 +1481,7 @@
 	ac52  PCI1451 PC card Cardbus Controller
 	ac53  PCI1421 PC card Cardbus Controller
 	ac55  PCI1250 PC card Cardbus Controller
+		1014 0512  ThinkPad T30
 	ac60  PCI2040 PCI to DSP Bridge Controller
 	fe00  FireWire Host Controller
 	fe03  12C01A FireWire Host Controller
@@ -1432,6 +1507,7 @@
 		1050 0840  W89C840 Ethernet Adapter
 	0940  W89C940
 	5a5a  W89C940F
+	6692  W6692
 	9970  W9970CF
 1051  Anigma, Inc.
 1052  ?Young Micro Systems
@@ -1448,6 +1524,8 @@
 	0001  MPC105 [Eagle]
 	0002  MPC106 [Grackle]
 	0003  MPC8240 [Kahlua]
+	0004  MPC107
+	0006  MPC8245 [Unity]
 	0100  MC145575 [HFC-PCI]
 	0431  KTI829c 100VG
 	1801  Audio I/O Controller (MIDI)
@@ -1485,6 +1563,7 @@
 	0d38  20263
 		105a 4d39  Fasttrak66
 	1275  20275
+	3376  PDC20376
 	4d30  20267
 		105a 4d33  Ultra100
 		105a 4d39  Fasttrak100
@@ -1502,7 +1581,8 @@
 	5300  DC5300
 	6268  20268R
 	6269  PDC20271
-		105a 6269  Fasttrack tx2
+		105a 6269  FastTrak TX2/TX2000
+	6621  PDC20621 [SX4000] 4 Channel IDE RAID Controller
 	7275  PDC20277
 105b  Foxconn International, Inc.
 105c  Wipro Infotech Limited
@@ -1617,6 +1697,11 @@
 	002e  UniNorth 1.5 PCI
 	002f  UniNorth 1.5 Internal PCI
 	0030  UniNorth/Pangea FireWire
+	0031  UniNorth 2 FireWire
+	0032  UniNorth 2 GMAC (Sun GEM)
+	0033  UniNorth 2 ATA/100
+	0034  UniNorth 2 AGP
+	1645  Tigon3 Gigabit Ethernet NIC (BCM5701)
 106c  Hyundai Electronics America
 	8801  Dual Pentium ISA/PCI Motherboard
 	8802  PowerPC ISA/PCI Motherboard
@@ -1728,7 +1813,8 @@
 1087  Cache Computer
 1088  Microcomputer Systems (M) Son
 1089  Data General Corporation
-108a  SBS Technologies (formerly Bit3 Computer Corp.)
+# Formerly Bit3 Computer Corp.
+108a  SBS Technologies
 	0001  VME Bridge Model 617
 	0010  VME Bridge Model 618
 	0040  dataBLIZZARD
@@ -1820,6 +1906,7 @@
 	b081  IMAQ-PXI-1422
 	b091  IMAQ-PXI-1411
 	c801  PCI-GPIB
+	c831  PCI-GPIB bridge
 1094  First International Computers [FIC]
 1095  CMD Technology Inc
 	0640  PCI0640
@@ -1871,6 +1958,7 @@
 		1851 1850  FlyVideo'98 - Video
 		1851 1851  FlyVideo II
 		1852 1852  FlyVideo'98 - Video (with FM Tuner)
+		bd11 1200  PCTV pro (TV + FM stereo receiver)
 	036f  Bt879 Video Capture
 		127a 0044  Bt879 Video Capture NTSC
 		127a 0122  Bt879 Video Capture PAL I
@@ -1922,6 +2010,7 @@
 		14f1 0002  Bt878 Video Capture (Audio Section)
 		14f1 0003  Bt878 Video Capture (Audio Section)
 		14f1 0048  Bt878 Video Capture (Audio Section)
+		bd11 1200  PCTV pro (TV + FM stereo receiver, audio section)
 	0879  Bt879 Audio Capture
 		127a 0044  Bt879 Video Capture (Audio Section)
 		127a 0122  Bt879 Video Capture (Audio Section)
@@ -1963,7 +2052,8 @@
 10a2  Quantum Corporation
 10a3  Everex Systems Inc
 10a4  Globe Manufacturing Sales
-10a5  Racal Interlan
+10a5  Smart Link Ltd.
+	5449  SmartPCI561 modem
 10a6  Informtech Industrial Ltd.
 10a7  Benchmarq Microelectronics
 10a8  Sierra Semiconductor
@@ -2029,7 +2119,9 @@
 		15ed 1003  MCCS 16-port Serial Hot Swap
 	9036  9036
 	9050  PCI <-> IOBus Bridge
+		10b5 2036  SatPak GPS
 		10b5 2273  SH-ARC SoHard ARCnet card
+		10b5 9050  MP9050
 		1522 0001  RockForce 4 Port V.90 Data/Fax/Voice Modem
 		1522 0002  RockForce 2 Port V.90 Data/Fax/Voice Modem
 		1522 0003  RockForce 6 Port V.90 Data/Fax/Voice Modem
@@ -2067,8 +2159,6 @@
 	9080  9080
 		10b5 9080  9080 [real subsystem ID not set]
 		129d 0002  Aculab PCI Prosidy card
-	a001  GTEK Jetport II 2 port serial adaptor
-	c001  GTEK Cyclone 16/32 port serial adaptor
 10b6  Madge Networks
 	0001  Smart 16/4 PCI Ringnode
 	0002  Smart 16/4 PCI Ringnode Mk2
@@ -2174,19 +2264,26 @@
 		1028 0095  Integrated 3C905C-TX Fast Etherlink for PC Management NIC
 		10b7 1000  3C905C-TX Fast Etherlink for PC Management NIC
 		10b7 7000  10/100 Mini PCI Ethernet Adapter
+	9300  3CSOHO100B-TX  [910-A01]
 	9800  3c980-TX [Fast Etherlink XL Server Adapter]
 		10b7 9800  3c980-TX Fast Etherlink XL Server Adapter
 	9805  3c980-TX 10/100baseTX NIC [Python-T]
 		10b7 1201  3c982-TXM 10/100baseTX Dual Port A [Hydra]
 		10b7 1202  3c982-TXM 10/100baseTX Dual Port B [Hydra]
 		10b7 9805  3c980 10/100baseTX NIC [Python-T]
-	9900  3C990-TX Typhoon
-	9902  3CR990-TX-95 56-bit Typhoon Client
-	9903  3CR990-TX-97 168-bit Typhoon Client
+	9900  3C990-TX [Typhoon]
+	9902  3CR990-TX-95 [Typhoon 56-bit]
+	9903  3CR990-TX-97 [Typhoon 168-bit]
 	9904  3C990B-TX-M/3C990BSVR [Typhoon2]
+		10b7 1000  3CR990B-TX-M [Typhoon2]
+		10b7 2000  3CR990BSVR [Typhoon2 Server]
 	9905  3CR990-FX-95/97/95 [Typhon Fiber]
-	9908  3CR990SVR95 56-bit Typhoon Server
-	9909  3CR990SVR97 Typhoon Server
+		10b7 1101  3CR990-FX-95 [Typhoon Fiber 56-bit]
+		10b7 1102  3CR990-FX-97 [Typhoon Fiber 168-bit]
+		10b7 2101  3CR990-FX-95 Server [Typhoon Fiber 56-bit]
+		10b7 2102  3CR990-FX-97 Server [Typhoon Fiber 168-bit]
+	9908  3CR990SVR95 [Typhoon Server 56-bit]
+	9909  3CR990SVR97 [Typhoon Server 168-bit]
 	990b  3C990SVR [Typhoon Server]
 10b8  Standard Microsystems Corp [SMC]
 	0005  83C170QF
@@ -2240,9 +2337,9 @@
 	1646  M1646 Northbridge+Trident
 	1647  M1647 Northbridge [MAGiK 1 / MobileMAGiK 1]
 	1651  M1651/M1651T Northbridge [Aladdin-Pro 5/5M,Aladdin-Pro 5T/5TM]
-	1671  M1671 P4 Northbridge
-	1681  M1681 P4 HyperTransport Northbridge
-	1687  M1687 K8 HyperTransport Northbridge
+	1671  M1671 Super P4 Northbridge [AGP4X,PCI and SDR/DDR]
+	1681  M1681 P4 Northbridge [AGP8X,HyperTransport and SDR/DDR]
+	1687  M1687 K8 Northbridge [AGP8X and HyperTransport]
 	3141  M3141
 	3143  M3143
 	3145  M3145
@@ -2263,14 +2360,16 @@
 	5239  USB 2.0 Controller
 	5243  M1541 PCI to AGP Controller
 	5247  PCI to AGP Controller
-	5249  HTT to PCI Bridge
+	5249  M5249 HTT to PCI Bridge
 	5251  M5251 P1394 OHCI 1.0 Controller
 	5253  M5253 P1394 OHCI 1.1 Controller
 	5261  M5261 Ethernet Controller
 	5451  M5451 PCI AC-Link Controller Audio Device
+		1014 0506  ThinkPad R30
 	5453  M5453 PCI AC-Link Controller Modem Device
 	5455  M5455 PCI AC-Link Controller Audio Device
 	5457  M5457 AC-Link Modem Interface Controller
+	5459  SmartPCI561 56K Modem
 	5471  M5471 Memory Stick Controller
 	5473  M5473 SD-MMC Controller
 	7101  M7101 PMU
@@ -2293,7 +2392,7 @@
 10c6  Rambus Inc.
 10c7  Media Vision
 10c8  Neomagic Corporation
-	0001  NM2070 [MagicGraph NM2070]
+	0001  NM2070 [MagicGraph 128]
 	0002  NM2090 [MagicGraph 128V]
 	0003  NM2093 [MagicGraph 128ZV]
 	0004  NM2160 [MagicGraph 128XD]
@@ -2315,13 +2414,14 @@
 		10f7 830b  MagicGraph 128XD
 		10f7 830d  MagicGraph 128XD
 		10f7 8312  MagicGraph 128XD
-	0005  [MagicMedia 256AV]
+	0005  NM2200 [MagicGraph 256AV]
+		1014 00dd  ThinkPad 570
 	0006  NM2360 [MagicMedia 256ZX]
 	0016  NM2380 [MagicMedia 256XL+]
 		10c8 0016  MagicMedia 256XL+
-	0025  [MagicMedia 256AV+]
-	0083  [MagicGraph 128ZV Plus]
-	8005  [MagicMedia 256AV Audio]
+	0025  NM2230 [MagicGraph 256AV+]
+	0083  NM2093 [MagicGraph 128ZV+]
+	8005  NM2200 [MagicMedia 256AV Audio]
 		0e11 b0d1  MagicMedia 256AV Audio Device on Discovery
 		0e11 b126  MagicMedia 256AV Audio Device on Durango
 		1014 00dd  MagicMedia 256AV Audio Device on BlackTip Thinkpad
@@ -2334,7 +2434,7 @@
 		110a 8005  MagicMedia 256AV Audio Device
 		14c0 0004  MagicMedia 256AV Audio Device
 	8006  NM2360 [MagicMedia 256ZX Audio]
-	8016  NM2360 [MagicMedia 256ZX Audio]
+	8016  NM2380 [MagicMedia 256XL+ Audio]
 10c9  Dataexpert Corporation
 10ca  Fujitsu Microelectr., Inc.
 10cb  Omron Corporation
@@ -2396,6 +2496,7 @@
 		1092 4914  Viper V550
 		1092 8225  Viper V550
 		10b4 273d  Velocity 4400
+		10b4 273e  Velocity 4400
 		10b4 2740  Velocity 4400
 		10de 0020  Riva TNT
 		1102 1015  Graphics Blaster CT6710
@@ -2436,6 +2537,7 @@
 	002d  RIVA TNT2 Model 64
 		1043 0200  AGP-V3800M
 		1043 0201  AGP-V3800M
+		1048 0c3a  Erazor III LT
 		1102 1023  CT6892 RIVA TNT2 Value
 		1102 1024  CT6932 RIVA TNT2 Value 32Mb
 		1102 102c  CT6931 RIVA TNT2 Value [Jumper]
@@ -2462,6 +2564,7 @@
 	0110  NV11 [GeForce2 MX]
 		1043 4015  AGP-V7100 Pro
 		1043 4031  V7100 Pro with TV output
+		14af 7102  3D Prophet II MX
 		14af 7103  3D Prophet II MX Dual-Display
 	0111  NV11 [GeForce2 MX DDR]
 	0112  NV11 [GeForce2 Go]
@@ -2471,11 +2574,13 @@
 		107d 2840  WinFast GeForce2 GTS with TV output
 		1462 8831  Creative GeForce2 Pro
 	0151  NV15 [GeForce2 Ti]
+		1043 405f  V7700Ti
 	0152  NV15 [GeForce2 Ultra, Bladerunner]
 		1048 0c56  GLADIAC Ultra
 	0153  NV15 [Quadro2 Pro]
 	0170  NV17 [GeForce4 MX460]
 	0171  NV17 [GeForce4 MX440]
+		1462 8661  G4MX440-VTP
 	0172  NV17 [GeForce4 MX420]
 	0173  NV1x
 	0174  NV17 [GeForce4 440 Go]
@@ -2486,6 +2591,7 @@
 	017a  Quadro4 200/400NVS
 	017b  Quadro4 550XGL
 	017c  Quadro4 550 GoGL
+	0181  NV18 [GeForce4 MX440 AGP 8x]
 	01a0  NV15 [GeForce2 - nForce GPU]
 	01a4  nForce CPU bridge
 	01ab  nForce 420 Memory Controller (DDR)
@@ -2497,31 +2603,40 @@
 	01b7  nForce AGP to PCI Bridge
 	01b8  nForce PCI-to-PCI bridge
 	01bc  nForce IDE
+	01c1  nForce MC97 Modem (Smart Link HAMR5600 compatible)
+	01c2  nForce USB Controller
+	01c3  nForce Ethernet Controller
 	0200  NV20 [GeForce3]
 		1043 402f  AGP-V8200 DDR
 	0201  NV20 [GeForce3 Ti200]
 	0202  NV20 [GeForce3 Ti500]
 		1043 405b  V8200 T5
+		1545 002f  Xtasy 6964
 	0203  NV20 [Quadro DCC]
 	0250  NV25 [GeForce4 Ti4600]
 	0251  NV25 [GeForce4 Ti4400]
 	0253  NV25 [GeForce4 Ti4200]
+		107d 2896  WinFast A250 LE TD (Dual VGA/TV-out/DVI)
+		147b 8f09  Siluro (Dual VGA/TV-out/DVI)
 	0258  Quadro4 900XGL
 	0259  Quadro4 750XGL
 	025b  Quadro4 700XGL
 10df  Emulex Corporation
-	10df  Light Pulse Fibre Channel Adapter
 	1ae5  LP6000 Fibre Channel Host Adapter
+	f085  LP850 Fibre Channel Adapter
+	f095  LP952 Fibre Channel Adapter
+	f098  LP982 Fibre Channel Adapter
 	f700  LP7000 Fibre Channel Host Adapter
 	f800  LP8000 Fibre Channel Host Adapter
 	f900  LP9000 Fibre Channel Host Adapter
+	f980  LP9802 Fibre Channel Adapter
 10e0  Integrated Micro Solutions Inc.
 	5026  IMS5026/27/28
 	5027  IMS5027
 	5028  IMS5028
 	8849  IMS8849
 	8853  IMS8853
-	9128  IMS9129 [Twin turbo 128]
+	9128  IMS9128 [Twin turbo 128]
 10e1  Tekram Technology Co.,Ltd.
 	0391  TRM-S1040
 		10e1 0391  DC-315U SCSI-3 Host Adapter
@@ -2582,6 +2697,7 @@
 		1186 1300  DFE-538TX
 		1186 1320  SN5200
 		1186 8139  DRN-32TX
+		11f6 8139  FN22-3(A) LinxPRO Ethernet Adapter
 		1259 2500  AT-2500TX
 		1259 2503  AT-2500TX/ACPI
 		1429 d010  ND010
@@ -2597,9 +2713,10 @@
 		8e2e 7100  KF-230TX/2
 		a0a0 0007  ALN-325C
 	8169  RTL-8169
+	8197  SmartLAN56 56K Modem
 10ed  Ascii Corporation
 	7310  V7310
-10ee  Xilinx, Inc.
+10ee  Xilinx Corporation
 	3fc0  RME Digi96
 	3fc1  RME Digi96/8
 	3fc2  RME Digi96/8 Pro
@@ -2622,6 +2739,7 @@
 10fa  Truevision
 	000c  TARGA 1000
 10fb  Thesys Gesellschaft für Mikroelektronik mbH
+	186f  TH 6255
 10fc  I-O Data Device, Inc.
 # What's in the cardbus end of a Sony ACR-A01 card, comes with newer Vaio CD-RW drives
 	0003  Cardbus IDE Controller
@@ -2655,11 +2773,15 @@
 		1102 8061  SBLive! Player 5.1
 	0004  SB Audigy
 		1102 0051  SB0090 Audigy Player
+		1102 0053  SB0090 Audigy Player/OEM
+	0006  [SB Live! Value] EMU10k1X
 	4001  SB Audigy FireWire Port
+		1102 0010  SB Audigy FireWire Port
 	7002  SB Live! MIDI/Game Port
 		1102 0020  Gameport Joystick
 	7003  SB Audigy MIDI/Game port
-		1102 0040  SB Audigy MIDI/Gameport
+		1102 0040  SB Audigy MIDI/Game Port
+	7004  [SB Live! Value] Input device controller
 	8938  ES1371
 1103  Triones Technologies, Inc.
 	0003  HPT343
@@ -2677,6 +2799,7 @@
 	8300  REALmagic Hollywood Plus DVD Decoder
 	8400  EM840x REALmagic DVD/MPEG-2 Audio/Video Decoder
 1106  VIA Technologies, Inc.
+	0102  Embedded VIA Ethernet Controller
 	0130  VT6305 1394.A Controller
 	0305  VT8363/8365 [KT133/KM133]
 		1043 8033  A7V Mainboard
@@ -2686,7 +2809,10 @@
 	0501  VT8501 [Apollo MVP4]
 	0505  VT82C505
 	0561  VT82C561
-	0571  VT82C586B PIPC Bus Master IDE
+	0571  VT82C586/B/686A/B PIPC Bus Master IDE
+		1043 8052  VT8233A Bus Master ATA100/66/33 IDE
+		1106 0571  VT8235 Bus Master ATA133/100/66/33 IDE
+		1458 5002  GA-7VAX Mainboard
 	0576  VT82C576 3V [Apollo Master]
 	0585  VT82C585VP [Apollo VP1/VPX]
 	0586  VT82C586/A/B PCI-to-ISA [Apollo VP]
@@ -2702,6 +2828,7 @@
 	0680  VT82C680 [Apollo P6]
 	0686  VT82C686 [Apollo Super South]
 		1043 8033  A7V Mainboard
+		1043 8040  A7M266 Mainboard
 		1043 8042  A7V133/A7V133-C Mainboard
 		1106 0000  VT82C686/A PCI to ISA Bridge
 		1106 0686  VT82C686/A PCI to ISA Bridge
@@ -2715,8 +2842,7 @@
 	1571  VT82C416MV
 	1595  VT82C595/97 [Apollo VP2/97]
 	3038  USB
-		0925 1234  USB Controller
-		1234 0925  MVP3 USB Controller
+		0925 1234  MVP3 USB Controller
 	3040  VT82C586B ACPI
 	3043  VT86C100A [Rhine]
 		10bd 0000  VT86C100A Fast Ethernet Adapter
@@ -2727,6 +2853,7 @@
 	3051  VT82C596 Power Management
 	3057  VT82C686 [Apollo Super ACPI]
 		1043 8033  A7V Mainboard
+		1043 8040  A7M266 Mainboard
 		1043 8042  A7V133/A7V133-C Mainboard
 	3058  VT82C686 AC97 Audio Controller
 		0e11 b194  Soundmax integrated digital audio
@@ -2735,27 +2862,37 @@
 		1462 3091  MS-6309 Onboard Audio
 		15dd 7609  Onboard Audio
 	3059  VT8233 AC97 Audio Controller
+		1458 a002  GA-7VAX Onboard Audio (Realtek ALC650)
 	3065  VT6102 [Rhine-II]
+		1106 0102  VT6102 [Rhine II] Embeded Ethernet Controller on VT8235
 		1186 1400  DFE-530TX rev A
 		1186 1401  DFE-530TX rev B
 	3068  AC97 Modem Controller
 	3074  VT8233 PCI to ISA Bridge
+		1043 8052  VT8233A
 	3091  VT8633 [Apollo Pro266]
-	3099  VT8367 [KT266]
-		1043 8064  A7V266-E
-		1043 807f  A7V333
+	3099  VT8366/A/7 [Apollo KT266/A/333]
+		1043 8064  A7V266-E Mainboard
+		1043 807f  A7V333 Mainboard
 	3101  VT8653 Host Bridge
 	3102  VT8662 Host Bridge
 	3103  VT8615 Host Bridge
 	3104  USB 2.0
+		1458 5004  GA-7VAX Mainboard
+	3106  VT6105 [Rhine-III]
 	3109  VT8233C PCI to ISA Bridge
 	3112  VT8361 [KLE133] Host Bridge
+	3116  VT8375 [KM266] Host Bridge
 	3128  VT8753 [P4X266 AGP]
 	3133  VT3133 Host Bridge
 	3147  VT8233A ISA Bridge
 	3148  P4M266 Host Bridge
 	3156  P/KN266 Host Bridge
-	3177  VT8233A ISA Bridge
+	3168  VT8374 P4X400 Host Controller/AGP Bridge
+	3177  VT8235 ISA Bridge
+		1458 5001  GA-7VAX Mainboard
+	3189  VT8377 [KT400 AGP] Host Bridge
+		1458 5000  GA-7VAX Mainboard
 	5030  VT82C596 ACPI [Apollo PRO]
 	6100  VT85C100A [Rhine II]
 	8231  VT8231 [PCI-to-ISA Bridge]
@@ -2771,11 +2908,12 @@
 	8691  VT82C691 [Apollo Pro]
 	8693  VT82C693 [Apollo Pro Plus] PCI Bridge
 	b091  VT8633 [Apollo Pro266 AGP]
-	b099  VT8367 [KT333 AGP]
+	b099  VT8366/A/7 [Apollo KT266/A/333 AGP]
 	b101  VT8653 AGP Bridge
 	b102  VT8362 AGP Bridge
 	b103  VT8615 AGP Bridge
 	b112  VT8361 [KLE133] AGP Bridge
+	b168  VT8235 PCI Bridge
 1107  Stratus Computers
 	0576  VIA VT82C570MV [Apollo] (Wrong vendor ID!)
 1108  Proteon, Inc.
@@ -2806,8 +2944,8 @@
 	6037  Firepower Powerized SMP I/O ASIC
 	6073  Firepower Powerized SMP I/O ASIC
 1111  Santa Cruz Operation
-# DJ: Some people say that 0x1112 is Rockwell International
-1112  RNS - Div. of Meret Communications Inc
+# Also claimed to be RNS or Rockwell International, current PCISIG records list Osicom
+1112  Osicom Technologies Inc
 	2200  FDDI Adapter
 	2300  Fast Ethernet Adapter
 	2340  4 Port Fast Ethernet Adapter
@@ -2817,6 +2955,7 @@
 		103c 1207  EN-1207D Fast Ethernet Adapter
 		1113 1211  EN-1207D Fast Ethernet Adapter
 	1216  EN-1216 Ethernet Adapter
+		111a 1020  SpeedStream 1020 PCI 10/100 Ethernet Adaptor [EN-1207F-TX ?]
 	1217  EN-1217 Ethernet Adapter
 	5105  10Mbps Network card
 	9211  EN-1207D Fast Ethernet Adapter
@@ -2957,6 +3096,7 @@
 	0001  MVC IM-PCI Video frame grabber/processor
 1130  Computervision
 1131  Philips Semiconductors
+	3400  SmartPCI56(UCB1500) 56K Modem
 	7130  SAA7130 Video Broadcast Decoder
 # PCI audio and video broadcast decoder (http://www.semiconductors.philips.com/pip/saa7134hl)
 	7134  SAA7134
@@ -2988,6 +3128,7 @@
 		1133 e004  DIVA 2.0 U
 	e005  DIVA LOW
 		1133 e005  DIVA 2.01 S/T
+	e00b  Eicon Diva 2.02
 	e010  DIVA Server BRI-2M
 		1133 e010  DIVA Server BRI-2M
 	e012  DIVA Server BRI-8M
@@ -3036,8 +3177,8 @@
 1144  Cincinnati Milacron
 	0001  Noservo controller
 1145  Workbit Corporation
-	f007  NinjaSCSI-32 KME
 	8007  NinjaSCSI-32 Workbit
+	f007  NinjaSCSI-32 KME
 	f010  NinjaSCSI-32 Workbit
 	f012  NinjaSCSI-32 Logitec
 	f013  NinjaSCSI-32 Logitec
@@ -3075,6 +3216,8 @@
 1149  Win System Corporation
 114a  VMIC
 	5579  VMIPCI-5579 (Reflective Memory Card)
+	5587  VMIPCI-5587 (Reflective Memory Card)
+	6504  VMIC PCI 7755 FPGA
 	7587  VMIVME-7587
 114b  Canopus Co., Ltd
 114c  Annabooks
@@ -3190,15 +3333,22 @@
 	0009  CNB20LE Host Bridge
 	0010  CIOB30
 	0011  CMIC-HE
+	0012  CMIC-LE
 	0013  CNB20-HE Host Bridge
 	0014  CNB20-HE Host Bridge
 	0015  CMIC-GC Host Bridge
 	0016  CMIC-GC Host Bridge
+	0017  GCNB-LE Host Bridge
 	0200  OSB4 South Bridge
 	0201  CSB5 South Bridge
+	0203  CSB6 South Bridge
 	0211  OSB4 IDE Controller
 	0212  CSB5 IDE Controller
-	0220  OSB4/CSB5 USB Controller
+	0213  CSB6 RAID/IDE Controller
+	0220  OSB4/CSB5 OHCI USB Controller
+	0221  CSB6 OHCI USB Controller
+	0225  GCLE Host Bridge
+	0227  GCLE-2 Host Bridge
 1167  Mutoh Industries Inc
 1168  Thine Electronics Inc
 1169  Centre for Development of Advanced Computing
@@ -3350,7 +3500,9 @@
 	4240  AMCC S933Q Intelligent Serial Card
 11aa  Actel
 11ab  Galileo Technology Ltd.
-	0146  GT-64010
+	0146  GT-64010/64010A System Controller
+	4611  GT-64115 System Controller
+	4620  GT-64120/64120A/64121A System Controller
 	4801  GT-48001
 	f003  GT-64010 Primary Image Piranha Image Generator
 11ac  Canon Information Systems Research Aust.
@@ -3391,7 +3543,6 @@
 11c0  Hewlett Packard
 11c1  Lucent Microelectronics
 	0440  56k WinModem
-		0001 0440  LT WinModem 56k Data+Fax+Voice+Dsvd
 		1033 8015  LT WinModem 56k Data+Fax+Voice+Dsvd
 		1033 8047  LT WinModem 56k Data+Fax+Voice+Dsvd
 		1033 804f  LT WinModem 56k Data+Fax+Voice+Dsvd
@@ -3433,7 +3584,6 @@
 		1468 0441  Presario 56k V.90 DF Modem
 		1668 0440  Lucent Win Modem
 	0442  56k WinModem
-		0001 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd
 		11c1 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd
 		11c1 0442  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd
 		13e0 0412  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd
@@ -3475,6 +3625,7 @@
 	044e  LT WinModem
 	044f  V90 WildWire Modem
 	0450  LT WinModem
+		144f 4005  Magnia SG20
 	0451  LT WinModem
 	0452  LT WinModem
 	0453  LT WinModem
@@ -3485,6 +3636,7 @@
 	0458  LT WinModem
 	0459  LT WinModem
 	045a  LT WinModem
+	045c  LT WinModem
 	0461  V90 WildWire Modem
 	0462  V90 WildWire Modem
 	0480  Venus Modem (V90, 56KFlex)
@@ -3547,6 +3699,7 @@
 11e1  GEC Plessey Semi Inc.
 11e2  Samsung Information Systems America
 11e3  Quicklogic Corporation
+	5030  PC Watchdog
 11e4  Second Wave Inc
 11e5  IIX Consulting
 11e6  Mitsui-Zosen System Research
@@ -3675,7 +3828,6 @@
 		139c 0016  Raven
 		139c 0017  Raven
 		14af 0002  Maxi Gamer Phoenix
-		3030 3030  Skywell Magic TwinPower
 	0004  Voodoo Banshee [Velocity 100]
 	0005  Voodoo 3
 		121a 0004  Voodoo3 AGP
@@ -3766,11 +3918,12 @@
 		1328 0001  Cinemaster C 3.0 DVD Decoder
 1240  Marathon Technologies Corp.
 1241  DSC Communications
-1242  Jaycor Networks, Inc.
-	1242  JNI Corporation (former Jaycor Networks, Inc.)
+# Formerly Jaycor Networks, Inc.
+1242  JNI Corporation
+	1560  JNIC-1560 PCI-X Fibre Channel Controller
+		1242 6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter
+		1242 656a  FCX-6562 PCI-X Fibre Channel Adapter
 	4643  FCI-1063 Fibre Channel Adapter
-	6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter
-	656a  FCX-6562 PCI-X Fibre Channel Adapter
 1243  Delphax
 1244  AVM Audiovisuelles MKTG & Computer System GmbH
 	0700  B1 ISDN
@@ -3787,7 +3940,7 @@
 1249  Samsung Electronics Co., Ltd.
 124a  AEG Electrocom GmbH
 124b  SBS/Greenspring Modular I/O
-	0040  cPCI-200 Four Slot IndustryPack carrier
+	0040  PCI-40A or cPCI-200 Quad IndustryPack carrier
 		124b 9080  PCI9080 Bridge
 124c  Solitron Technologies, Inc.
 124d  Stallion Technologies, Inc.
@@ -3830,7 +3983,6 @@
 	1969  ES1969 Solo-1 Audiodrive
 		1014 0166  ES1969 SOLO-1 AudioDrive on IBM Aptiva Mainboard
 		125d 8888  Solo-1 Audio Adapter
-		525f c888  ES1969 SOLO-1 AudioDrive (+ES1938)
 	1978  ES1978 Maestro 2E
 		1033 803c  ES1978 Maestro-2E Audiodrive
 		1033 8058  ES1978 Maestro-2E Audiodrive
@@ -3863,6 +4015,9 @@
 1260  Harris Semiconductor
 	3873  Prism 2.5 Wavelan chipset
 		1186 3501  DWL-520 Wireless PCI Adapter
+		1668 0414  HWP01170-01 802.11b PCI Wireless Adapter
+		1737 3874  WMP11 Wireless 802.11b PCI Adaptor
+		8086 2513  Wireless 802.11b MiniPCI Adapter
 	8130  HMP8130 NTSC/PAL Video Decoder
 	8131  HMP8131 NTSC/PAL Video Decoder
 1261  Matsushita-Kotobuki Electronics Industries, Ltd.
@@ -3953,7 +4108,6 @@
 		8086 5643  ES1371, ES1373 AudioPCI On Motherboard Vancouver
 		8086 5753  ES1371, ES1373 AudioPCI On Motherboard WS440BX
 	5000  ES1370 [AudioPCI]
-		4942 4c4c  Creative Sound Blaster AudioPCI128
 	5880  5880 AudioPCI
 		1274 2000  Creative Sound Blaster AudioPCI128
 		1274 2003  Creative SoundBlaster AudioPCI 128
@@ -4193,7 +4347,7 @@
 		12b9 00ab  USR 56k Internal Voice Modem (Model 5609)
 		12b9 00ac  USR 56k Internal Voice Modem (Model 3298)
 		12b9 00ad  USR 56k Internal FAX Modem (Model 5610)
-12ba  PMC Sierra
+12ba  BittWare, Inc.
 12bb  Nippon Unisoft Corporation
 12bc  Array Microsystems
 12bd  Computerm Corp.
@@ -4465,6 +4619,7 @@
 1330  MMC Networks
 1331  Radisys Corp.
 1332  Micro Memory
+	5415  MM-5415CN PCI Memory Module with Battery Backup
 1334  Redcreek Communications, Inc
 1335  Videomail, Inc
 1337  Third Planet Publishing
@@ -4502,7 +4657,11 @@
 134f  Algo System Co Ltd
 1350  Systec Co. Ltd
 1351  Sonix Inc
-1353  Dassault A.T.
+1353  Thales Idatys
+	0002  Proserver
+	0003  PCI-FUT
+	0004  PCI-S0
+	0005  PCI-FUT-S0
 1354  Dwave System Inc
 1355  Kratos Analytical Ltd
 1356  The Logical Co
@@ -4510,7 +4669,19 @@
 135a  Brain Boxes
 135b  Giganet Inc
 135c  Quatech Inc
+	0010  QSC-100
+	0020  DSC-100
+	0030  DSC-200/300
+	0040  QSC-200/300
+	0050  ESC-100D
+	0060  ESC-100M
 	00f0  MPAC-100 Syncronous Serial Card (Zilog 85230)
+	0170  QSCLP-100
+	0180  DSCLP-100
+	0190  SSCLP-100
+	01a0  QSCLP-200/300
+	01b0  DSCLP-200/300
+	01c0  SSCLP-200/300
 135d  ABB Network Partner AB
 135e  Sealevel Systems Inc
 	7101  Single Port RS-232/422/485/530
@@ -4610,6 +4781,10 @@
 	0006  6500 Public Key Processor
 	0007  7811 Security Processor
 	0012  7951 Security Processor
+	0014  78XX Security Processor
+	0016  8065 Security Processor
+	0017  8165 Security Processor
+	0018  8154 Security Processor
 13a4  Rascom Inc
 13a5  Audio Digital Imaging Inc
 13a6  Videonics Inc
@@ -4661,6 +4836,7 @@
 13cf  Studio Audio & Video Ltd
 13d0  Techsan Electronics Co Ltd
 13d1  Abocom Systems Inc
+	ab02  ADMtek Centaur-C rev 17 [D-Link DFE-680TX] CardBus Fast Ethernet Adapter
 	ab06  RTL8139 [FE2000VX] CardBus Fast Ethernet Attached Port Adapter
 13d2  Shark Multimedia Inc
 13d3  IMC Networks
@@ -4708,6 +4884,7 @@
 	0101  CM8338B
 		13f6 0101  CMI8338-031 PCI Audio Device
 	0111  CM8738
+		1019 0970  P6STP-FL motherboard
 		1043 8077  CMI8738 6-channel audio controller
 		1043 80e2  CMI8738 6ch-MX
 		13f6 0111  CMI8738/C3DX PCI Audio Device
@@ -4757,6 +4934,7 @@
 1411  Ikos Systems Inc
 1412  IC Ensemble Inc
 	1712  ICE1712 [Envy24]
+	1724  ICE1724 [Envy24HT]
 1413  Addonics
 1414  Microsoft Corporation
 1415  Oxford Semiconductor Ltd
@@ -4933,6 +5111,7 @@
 14ad  Time Space Radio AB
 14ae  CTI, Inc
 14af  Guillemot Corporation
+	7102  3D Prophet II MX
 14b0  BST Communication Technology Ltd
 14b1  Nextcom K.K.
 14b2  ENNOVATE Networks Inc
@@ -4950,6 +5129,7 @@
 	0350  PC4800
 	4500  PC4500
 	4800  PC4800
+	a504  Cisco Aironet Wireless 802.11b
 14ba  INTERNIX Inc.
 14bb  SEMTECH Corporation
 14bc  Globespan Semiconductor Inc.
@@ -5022,40 +5202,41 @@
 14e3  AMTELCO
 14e4  Broadcom Corporation
 	1644  NetXtreme BCM5700 Gigabit Ethernet
-		1014 0277  Broadcom Vigil B5700 1000BaseTX
+		1014 0277  Broadcom Vigil B5700 1000Base-T
 		1028 00d1  Broadcom BCM5700
 		1028 0106  Broadcom BCM5700
-		1028 0109  Broadcom BCM5700 1000BaseTX
+		1028 0109  Broadcom BCM5700 1000Base-T
 		1028 010a  Broadcom BCM5700 1000BaseTX
-		10b7 1000  3C996-T 1000BaseTX
-		10b7 1001  3C996B-T 1000BaseTX
-		10b7 1002  3C996C-T 1000BaseTX
-		10b7 1003  3C997-T 1000BaseTX Dual Port
-		10b7 1004  3C996-SX 1000BaseSX
-		10b7 1005  3C997-SX 1000BaseSX Dual Port
+		10b7 1000  3C996-T 1000Base-T
+		10b7 1001  3C996B-T 1000Base-T
+		10b7 1002  3C996C-T 1000Base-T
+		10b7 1003  3C997-T 1000Base-T Dual Port
+		10b7 1004  3C996-SX 1000Base-SX
+		10b7 1005  3C997-SX 1000Base-SX Dual Port
 		10b7 1008  3C942 Gigabit LOM (31X31)
-		14e4 0002  NetXtreme 1000BaseSX
-		14e4 0003  NetXtreme 1000BaseSX
-		14e4 0004  NetXtreme 1000BaseTX
+		14e4 0002  NetXtreme 1000Base-SX
+		14e4 0003  NetXtreme 1000Base-SX
+		14e4 0004  NetXtreme 1000Base-T
 		14e4 1028  NetXtreme 1000BaseTX
-		14e4 1644  BCM5700 1000BaseTX
+		14e4 1644  BCM5700 1000Base-T
 	1645  NetXtreme BCM5701 Gigabit Ethernet
 		0e11 007c  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
 		0e11 007d  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)
 		0e11 0085  NC7780 Gigabit Server Adapter (embedded, WOL)
 		0e11 0099  NC7780 Gigabit Server Adapter (embedded, WOL)
 		0e11 009a  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
-		1028 0121  Broadcom BCM5701 1000BaseTX
-		10b7 1004  3C996-SX 1000BaseSX
-		10b7 1006  3C996B-T 1000BaseTX
-		10b7 1007  3C1000-T 1000BaseTX
-		10b7 1008  3C940-BR01 1000BaseTX
-		14e4 0001  BCM5701 1000BaseTX
-		14e4 0005  BCM5701 1000BaseTX
-		14e4 0006  BCM5701 1000BaseTX
-		14e4 0007  BCM5701 1000BaseSX
-		14e4 0008  BCM5701 1000BaseTX
-		14e4 8008  BCM5701 1000BaseTX
+		0e11 00c1  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)
+		1028 0121  Broadcom BCM5701 1000Base-T
+		10b7 1004  3C996-SX 1000Base-SX
+		10b7 1006  3C996B-T 1000Base-T
+		10b7 1007  3C1000-T 1000Base-T
+		10b7 1008  3C940-BR01 1000Base-T
+		14e4 0001  BCM5701 1000Base-T
+		14e4 0005  BCM5701 1000Base-T
+		14e4 0006  BCM5701 1000Base-T
+		14e4 0007  BCM5701 1000Base-SX
+		14e4 0008  BCM5701 1000Base-T
+		14e4 8008  BCM5701 1000Base-T
 	1646  NetXtreme BCM5702 Gigabit Ethernet
 		0e11 00bb  NC7760 1000BaseTX
 		1028 0126  Broadcom BCM5702 1000BaseTX
@@ -5069,10 +5250,47 @@
 		14e4 8009  BCM5703 1000BaseTX
 		14e4 800a  BCM5703 1000BaseTX
 	1648  NetXtreme BCM5704 Gigabit Ethernet
+		0e11 00cf  NC7772 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
+		0e11 00d0  NC7782 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
+		0e11 00d1  NC7783 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
+		10b7 2000  3C998-T Dual Port 10/100/1000 PCI-X
+		10b7 3000  3C999-T Quad Port 10/100/1000 PCI-X
+		1166 1648  NetXtreme CIOB-E 1000Base-T
 	164d  NetXtreme BCM5702FE Gigabit Ethernet
-	16a6  NetXtreme BCM5702X Gigabit Ethernet
-	16a7  NetXtreme BCM5703X Gigabit Ethernet
-	4212  BCM v.90 56k modem
+	1653  NetXtreme BCM5705 Gigabit Ethernet
+	165d  NetXtreme BCM5705M Gigabit Ethernet
+	1696  NetXtreme BCM5782 Gigabit Ethernet
+		14e4 000d  NetXtreme BCM5782 1000Base-T
+	16a6  NetXtreme BCM5702 Gigabit Ethernet
+		0e11 00bb  NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
+		1028 0126  BCM5702 1000Base-T
+		14e4 000c  BCM5702 1000Base-T
+		14e4 8009  BCM5702 1000Base-T
+	16a7  NetXtreme BCM5703 Gigabit Ethernet
+		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
+		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)
+		14e4 0009  NetXtreme BCM5703 1000Base-T
+		14e4 000a  NetXtreme BCM5703 1000Base-SX
+		14e4 000b  NetXtreme BCM5703 1000Base-T
+		14e4 800a  NetXtreme BCM5703 1000Base-T
+	16a8  NetXtreme BCM5704S Gigabit Ethernet
+		10b7 2001  3C998-SX Dual Port 1000-SX PCI-X
+	16c6  NetXtreme BCM5702 Gigabit Ethernet
+		10b7 1100  3C1000B-T 10/100/1000 PCI
+		14e4 000c  BCM5702 1000Base-T
+		14e4 8009  BCM5702 1000Base-T
+	16c7  NetXtreme BCM5703 Gigabit Ethernet
+		14e4 0009  NetXtreme BCM5703 1000Base-T
+		14e4 000a  NetXtreme BCM5703 1000Base-SX
+	4210  BCM4210 iLine10 HomePNA 2.0
+	4211  BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem
+	4212  BCM4212 v.90 56k modem
+	4301  BCM4301 802.11b
+	4401  BCM4401 100Base-T
+	4402  BCM4402 Integrated 10/100BaseT
+	4410  BCM4413 iLine32 HomePNA 2.0
+	4411  BCM4413 V.90 56k modem
+	4412  BCM4413 10/100BaseT
 	5820  BCM5820 Crypto Accelerator
 	5821  BCM5821 Crypto Accelerator
 14e5  Pixelfusion Ltd
@@ -5294,6 +5512,10 @@
 		1522 0600  RockForce+ 2 Port V.90 Data/Fax/Voice Modem
 1523  MUSIC Semiconductors
 1524  ENE Technology Inc
+	1211  CB1211 Cardbus Controller
+	1225  CB1225 Cardbus Controller
+	1410  CB1410 Cardbus Controller
+	1420  CB1420 Cardbus Controller
 1525  IMPACT Technologies
 1526  ISS, Inc
 1527  SOLECTRON
@@ -5324,6 +5546,7 @@
 1541  MACHONE Communications
 1542  VIVID Technology Inc
 1543  SILICON Laboratories
+	4c22  Si3036 MC'97 DAA
 1544  DCM DATA Systems
 1545  VISIONTEK
 1546  IOI Technology Corp
@@ -5553,6 +5776,7 @@
 1607  Lava Semiconductor Manufacturing Inc
 1608  Automated Wagering International
 1609  Scimetric Instruments Inc
+1612  Telesynergy Research Inc.
 1619  FarSite Communications Ltd
 	0400  FarSync T2P (2 port X.21/V.35/V.24)
 	0440  FarSync T4P (4 port X.21/V.35/V.24)
@@ -5561,15 +5785,28 @@
 	2002  Fast Universal Data Output
 1638  Standard Microsystems Corp [SMC]
 	1100  SMC2602W EZConnect / Addtron AWA-100
+163c  Smart Link Ltd.
+	5449  SmartPCI561 Modem
 1657  Brocade Communications Systems, Inc.
+165a  Epix Inc
+	c100  PIXCI(R) CL1 Camera Link Video Capture Board [custom QL5232]
+	d200  PIXCI(R) D2X Digital Video Capture Board [custom QL5232]
+	d300  PIXCI(R) D3X Digital Video Capture Board [custom QL5232]
 165d  Hsing Tech. Enterprise Co., Ltd.
 1661  Worldspace Corp.
-1668  Action Tec Electronics Inc
+1668  Actiontec Electronics Inc
+1681  Hercules
+16ab  Global Sun Technology Inc
+	1102  PCMCIA-to-PCI Wireless Network Bridge
+16be  Creatix Polymedia GmbH
 16ec  U.S. Robotics
 	3685  Wireless Access PCI Adapter Model 022415
 16f6  VideoTele.com, Inc.
+1705  Digital First, Inc.
 170b  NetOctave Inc
 170c  YottaYotta Inc.
+172a  Accelerated Encryption
+1737  Linksys
 173b  Altima (nee Broadcom)
 	03e8  AC1000 Gigabit Ethernet
 	03ea  AC9100 Gigabit Ethernet
@@ -5577,6 +5814,7 @@
 	8139  ROL/F-100 Fast Ethernet Adapter with ROL
 174b  PC Partner Limited
 175e  Sanera Systems, Inc.
+1787  Hightech Information System Ltd.
 # also used by Struck Innovative Systeme for joint developments
 1796  Research Centre Juelich
 	0001  SIS1100 [Gigabit link]
@@ -5585,7 +5823,15 @@
 	0004  CAMAC Controller
 	0005  PROFIBUS
 	0006  AMCC HOTlink
+1799  Belkin
+17af  Hightech Information System Ltd.
 1813  Ambient Technologies Inc
+	4000  HaM controllerless modem
+		16be 0001  V9x HAM Data Fax Modem
+	4100  HaM plus Data Fax Modem
+		16be 0002  V9x HAM 1394
+1851  Microtune, Inc.
+1852  Anritsu Corp.
 1a08  Sierra semiconductor
 	0000  SC15064
 1b13  Jaton Corp
@@ -5641,6 +5887,8 @@
 		3d3d 0127  Permedia3 Create!
 	000a  GLINT R3
 		3d3d 0121  Oxygen VX1
+	000c  GLINT R3 [Oxygen VX1]
+		3d3d 0144  Oxygen VX1-4X AGP [Permedia 4]
 	0100  Permedia II 2D+3D
 	1004  Permedia
 	3d04  Permedia
@@ -5821,6 +6069,7 @@
 	8c10  86C270-294 Savage/MX-MV
 	8c11  82C270-294 Savage/MX
 	8c12  86C270-294 Savage/IX-MV
+		1014 017f  ThinkPad T20
 	8c13  86C270-294 Savage/IX
 	8c22  SuperSavage MX/128
 	8c24  SuperSavage MX/64
@@ -5889,7 +6138,7 @@
 		0e11 b123  NC1634 Gigabit Ethernet Adapter (1000-SX)
 		1014 0119  Netfinity Gigabit Ethernet SX Adapter
 		8086 1000  PRO/1000 Gigabit Server Adapter
-	1001  82543GC Gigabit Ethernet Controller
+	1001  82543GC Gigabit Ethernet Controller (Fiber)
 		0e11 004a  NC6136 Gigabit Server Adapter
 		1014 01ea  Netfinity Gigabit Ethernet SX Adapter
 		8086 1003  PRO/1000 F Server Adapter
@@ -5897,38 +6146,39 @@
 		8086 200e  Pro 100 LAN+Modem 56 Cardbus II
 		8086 2013  Pro 100 SR Mobile Combo Adapter
 		8086 2017  Pro 100 S Combo Mobile Adapter
-	1004  82543GC Gigabit Ethernet Controller
+	1004  82543GC Gigabit Ethernet Controller (Copper)
 		0e11 0049  NC7132 Gigabit Upgrade Module
 		0e11 b1a4  NC7131 Gigabit Server Adapter
 		1014 10f2  Gigabit Ethernet Server Adapter
 		8086 1004  PRO/1000 T Server Adapter
 		8086 2004  PRO/1000 T Server Adapter
-	1008  82544EI Gigabit Ethernet Controller
+	1008  82544EI Gigabit Ethernet Controller (Copper)
 		8086 1107  PRO/1000 XT Server Adapter
 		8086 2107  PRO/1000 XT Server Adapter
 		8086 2110  PRO/1000 XT Server Adapter
-	1009  82544EI Gigabit Ethernet Controller
+	1009  82544EI Gigabit Ethernet Controller (Fiber)
 		8086 1109  PRO/1000 XF Server Adapter
 		8086 2109  PRO/1000 XF Server Adapter
-	100c  82544GC Gigabit Ethernet Controller
+	100c  82544GC Gigabit Ethernet Controller (Copper)
 		8086 1112  PRO/1000 T Desktop Adapter
 		8086 2112  PRO/1000 T Desktop Adapter
-	100d  82544GC Gigabit Ethernet Controller
+	100d  82544GC Gigabit Ethernet Controller (LOM)
 	100e  82540EM Gigabit Ethernet Controller
 		8086 001e  PRO/1000 MT Desktop Adapter
 		8086 002e  PRO/1000 MT Desktop Adapter
-	100f  82545EM Gigabit Ethernet Controller
+	100f  82545EM Gigabit Ethernet Controller (Copper)
 		8086 1001  PRO/1000 MT Server Adapter
-	1010  82546EB Gigabit Ethernet Controller
+	1010  82546EB Gigabit Ethernet Controller (Copper)
 		8086 1011  PRO/1000 MT Dual Port Server Adapter
-	1011  82545EM Gigabit Ethernet Controller
+	1011  82545EM Gigabit Ethernet Controller (Fiber)
 		8086 1002  PRO/1000 MF Server Adapter
-	1012  82546EB Gigabit Ethernet Controller
+	1012  82546EB Gigabit Ethernet Controller (Fiber)
 		8086 1012  PRO/1000 MF Dual Port Server Adapter
+	1015  82540EM Gigabit Ethernet Controller (LOM)
 	1029  82559 Ethernet Controller
 	1030  82559 InBusiness 10/100
 	1031  82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller
-		1014 0209  ThinkPad A30p (2653-64G)
+		1014 0209  ThinkPad A30p/T30
 		104d 80e7  Vaio PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 		107b 5350  EtherExpress PRO/100 VE
 		1179 0001  EtherExpress PRO/100 VE
@@ -5948,8 +6198,11 @@
 	103c  82801BD PRO/100 VM (CNR) Ethernet Controller
 	103d  82801BD PRO/100 VE (MOB) Ethernet Controller
 	103e  82801BD PRO/100 VM (MOB) Ethernet Controller
+	1040  536EP Data Fax Modem
+		16be 1040  V.9X DSP Data Fax Modem
 	1059  82551QM Ethernet Controller
 	1130  82815 815 Chipset Host Bridge and Memory Controller Hub
+		1025 1016  Travelmate 612 TX
 		1043 8027  TUSL2-C Mainboard
 		104d 80df  Vaio PCG-FX403
 	1131  82815 815 Chipset AGP Bridge
@@ -5958,6 +6211,7 @@
 		104d 80df  Vaio PCG-FX403
 	1161  82806AA PCI64 Hub Advanced Programmable Interrupt Controller
 		8086 1161  82806AA PCI64 Hub APIC
+	1162  Xscale 80200 Big Endian Companion Chip
 	1200  Intel IXP1200 Network Processor
 		172a 0000  AEP SSL Accelerator
 	1209  82559ER
@@ -5999,13 +6253,16 @@
 		1014 01f2  10/100 Ethernet Server Adapter
 		1014 0207  Ethernet Pro/100 S
 		1014 0232  10/100 Dual Port Server Adapter
+		1014 023a  ThinkPad R30
 		1014 105c  Netfinity 10/100
+		1014 2205  ThinkPad A22p
 		1014 305c  10/100 EtherJet Management Adapter
 		1014 405c  10/100 EtherJet Adapter with Alert on LAN
 		1014 505c  10/100 EtherJet Secure Management Adapter
 		1014 605c  10/100 EtherJet Secure Management Adapter
 		1014 705c  10/100 Netfinity 10/100 Ethernet Security Adapter
 		1014 805c  10/100 Netfinity 10/100 Ethernet Security Adapter
+		1028 009b  PowerEdge 2550
 		1033 8000  PC-9821X-B06
 		1033 8016  PK-UG-X006
 		1033 801f  PK-UG-X006
@@ -6190,17 +6447,21 @@
 		104d 80df  Vaio PCG-FX403
 		147b 0507  TH7II-RAID
 	2443  82801BA/BAM SMBus
+		1025 1016  Travelmate 612 TX
 		1043 8027  TUSL2-C Mainboard
 		104d 80df  Vaio PCG-FX403
 		147b 0507  TH7II-RAID
 	2444  82801BA/BAM USB (Hub #2)
+		1025 1016  Travelmate 612 TX
 		104d 80df  Vaio PCG-FX403
 		147b 0507  TH7II-RAID
 	2445  82801BA/BAM AC'97 Audio
+		1025 1016  Travelmate 612 TX
 		104d 80df  Vaio PCG-FX403
 		1462 3370  STAC9721 AC
 		147b 0507  TH7II-RAID
 	2446  82801BA/BAM AC'97 Modem
+		1025 1016  Travelmate 612 TX
 		104d 80df  Vaio PCG-FX403
 	2448  82801BAM/CAM PCI Bridge
 	2449  82801BA/BAM/CA/CAM Ethernet Controller
@@ -6247,27 +6508,30 @@
 	245e  82801E PCI Bridge
 	2480  82801CA ISA Bridge (LPC)
 	2482  82801CA/CAM USB (Hub #1)
-		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
+		1014 0220  ThinkPad T23/A30p/T30
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 	2483  82801CA/CAM SMBus
-		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
+		1014 0220  ThinkPad T23/A30p/T30
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 	2484  82801CA/CAM USB (Hub #2)
-		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
+		1014 0220  ThinkPad T23/A30p/T30
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 	2485  82801CA/CAM AC'97 Audio
-		1014 0222  ThinkPad T23 (2647-4MG)
+		1014 0222  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
+		1014 0508  ThinkPad T30
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 	2486  82801CA/CAM AC'97 Modem
 		1014 0223  ThinkPad A30p (2653-64G)
 		1014 0503  ThinkPad R31 2656BBG
+		1014 051a  ThinkPad T30
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 		134d 4c21  Dell Inspiron 2100 internal modem
+		14f1 5421  MD56ORD V.92 MDC Modem
 	2487  82801CA/CAM USB (Hub #3)
-		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
+		1014 0220  ThinkPad T23/A30p/T30
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 	248a  82801CAM IDE U100
-		1014 0220  ThinkPad T23 (2647-4MG) or A30p (2653-64G)
+		1014 0220  ThinkPad T23/A30p/T30
 		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
 	248b  82801CA IDE U100
 	248c  82801CAM ISA Bridge (LPC)
@@ -6416,6 +6680,8 @@
 	5575  AVA-2930
 	5578  AIC-7855
 	5647  ANA-7711 TCP Offload Engine
+		9004 7710  ANA-7711F TCP Offload Engine - Optical
+		9004 7711  ANA-7711LP TCP Offload Engine - Copper
 	5675  AIC-755x
 	5678  AIC-7856
 	5775  AIC-755x
@@ -6539,9 +6805,32 @@
 	00c1  AIC-7899B U160/m
 	00c3  AIC-7899D U160/m
 	00c5  RAID subsystem HBA
+		1028 00c5  PowerEdge 2550
 	00cf  AIC-7899P U160/m
+		1028 00d1  PowerEdge 2550
+	0250  ServeRAID Controller
+		1014 0279  ServeRAID-xx
+		1014 028c  ServeRAID-xx
 	0285  AAC-RAID
 		1028 0287  PowerEdge Expandable RAID Controller 320/DC
+	8000  ASC-29320A U320
+	800f  AIC-7901 U320
+	8010  ASC-39320 U320
+	8011  ASC-32320D U320
+		0e11 00ac  U320
+		9005 0041  ASC-39320D U320
+	8012  ASC-29320 U320
+	8013  ASC-29320B U320
+	8014  ASC-29320LP U320
+	801e  AIC-7901A U320
+	801f  AIC-7902 U320
+	8090  ASC-39320 U320 w/HostRAID
+	8091  ASC-39320D U320 w/HostRAID
+	8092  ASC-29320 U320 w/HostRAID
+	8093  ASC-29320B U320 w/HostRAID
+	8094  ASC-29320LP U320 w/HostRAID
+	809e  AIC-7901A U320 w/HostRAID
+	809f  AIC-7902 U320 w/HostRAID
 907f  Atronics
 	2015  IDE-2015PL
 919a  Gigapixel Corp
@@ -6562,6 +6851,8 @@
 aa42  Scitex Digital Video
 ac1e  Digital Receiver Technology Inc
 b1b3  Shiva Europe Limited
+# Pinnacle should be 11bd, but they got it wrong several times --mj
+bd11  Pinnacle Systems, Inc. (Wrong ID)
 c001  TSI Telsys
 c0a9  Micron/Crucial Technology
 c0de  Motorola
@@ -6569,6 +6860,9 @@
 ca50  Varian Australia Pty Ltd
 cafe  Chrysalis-ITS
 cccc  Catapult Communications
+cddd  Tyzx, Inc.
+	0101  DeepSea 1 High Speed Stereo Vision Frame Grabber
+	0200  DeepSea 2 High Speed Stereo Vision Frame Grabber
 d4d4  Dy4 Systems Inc
 	0601  PCI Mezzanine Card
 d531  I+ME ACTIA GmbH
@@ -6577,12 +6871,17 @@
 e000  Winbond
 	e000  W89C940
 e159  Tiger Jet Network Inc.
-	0001  Model 300 128k
+	0001  Model 300 128k [Catawba TJ]
 		0059 0001  128k ISDN-S/T Adapter
 		0059 0003  128k ISDN-U Adapter
 	0002  Tiger100APC ISDN chipset
 e4bf  EKF Elektronik GmbH
 ea01  Eagle Technology
+# The main chip of all these devices is by Xilinx -> It could also be a Xilinx ID.
+ea60  RME
+	9896  Digi32
+	9897  Digi32 Pro
+	9898  Digi32/8
 eabb  Aashima Technology B.V.
 eace  Endace Measurement Systems, Ltd
 	3100  DAG 3.10 OC-3/OC-12
@@ -6598,12 +6897,24 @@
 	422e  DAG 4.2E Dual Gigabit Ethernet
 ec80  Belkin Corporation
 	ec00  F5D6000
-ecc0  Echo Corporation
+ecc0  Echo Digital Audio Corporation
+	0050  Gina24_301
+	0051  Gina24_361
+	0060  Layla24
+	0070  Mona_301_80
+	0071  Mona_301_66
+	0072  Mona_361
+	0080  Mia
 edd8  ARK Logic Inc
 	a091  1000PV [Stingray]
 	a099  2000PV [Stingray]
 	a0a1  2000MT
 	a0a9  2000MI
+f1d0  AJA Video
+# All boards I have seen have this ID not efac, though all docs say efac...
+	cafe  KONA SD SMPTE 259M I/O
+	efac  KONA SD SMPTE 259M I/O
+	facd  KONA HD SMPTE 292M I/O
 fa57  Fast Search & Transfer ASA
 febd  Ultraview Corp.
 feda  Epigram Inc
diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c
--- a/drivers/pci/probe.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/pci/probe.c	Wed Jan  8 20:04:44 2003
@@ -558,9 +558,15 @@
 	b = pci_alloc_bus();
 	if (!b)
 		return NULL;
+	
+	b->dev = kmalloc(sizeof(*(b->dev)),GFP_KERNEL);
+	if (!b->dev){
+		kfree(b);
+		return NULL;
+	}
+	
 	list_add_tail(&b->node, &pci_root_buses);
 
-	b->dev = kmalloc(sizeof(*(b->dev)),GFP_KERNEL);
 	memset(b->dev,0,sizeof(*(b->dev)));
 	sprintf(b->dev->bus_id,"pci%d",bus);
 	strcpy(b->dev->name,"Host/PCI Bridge");
diff -Nru a/drivers/pci/proc.c b/drivers/pci/proc.c
--- a/drivers/pci/proc.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/pci/proc.c	Wed Jan  8 20:04:44 2003
@@ -472,6 +472,7 @@
 	return 0;
 }
 
+#ifdef CONFIG_PCI_LEGACY_PROC
 
 /*
  *  Backward compatible /proc/pci interface.
@@ -573,22 +574,39 @@
 	.show	= show_dev_config
 };
 
-static int proc_bus_pci_dev_open(struct inode *inode, struct file *file)
+static int proc_pci_open(struct inode *inode, struct file *file)
 {
-	return seq_open(file, &proc_bus_pci_devices_op);
+	return seq_open(file, &proc_pci_op);
 }
-static struct file_operations proc_bus_pci_dev_operations = {
-	.open		= proc_bus_pci_dev_open,
+static struct file_operations proc_pci_operations = {
+	.open		= proc_pci_open,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
 	.release	= seq_release,
 };
-static int proc_pci_open(struct inode *inode, struct file *file)
+
+static void legacy_proc_init(void)
 {
-	return seq_open(file, &proc_pci_op);
+	struct proc_dir_entry * entry = create_proc_entry("pci", 0, NULL);
+	if (entry)
+		entry->proc_fops = &proc_pci_operations;
 }
-static struct file_operations proc_pci_operations = {
-	.open		= proc_pci_open,
+
+#else
+
+static void legacy_proc_init(void)
+{
+
+}
+
+#endif /* CONFIG_PCI_LEGACY_PROC */
+
+static int proc_bus_pci_dev_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &proc_bus_pci_devices_op);
+}
+static struct file_operations proc_bus_pci_dev_operations = {
+	.open		= proc_bus_pci_dev_open,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
 	.release	= seq_release,
@@ -607,9 +625,7 @@
 		pci_for_each_dev(dev) {
 			pci_proc_attach_device(dev);
 		}
-		entry = create_proc_entry("pci", 0, NULL);
-		if (entry)
-			entry->proc_fops = &proc_pci_operations;
+		legacy_proc_init();
 	}
 	return 0;
 }
diff -Nru a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c
--- a/drivers/pcmcia/sa1100_jornada720.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/pcmcia/sa1100_jornada720.c	Wed Jan  8 20:04:43 2003
@@ -6,9 +6,12 @@
  */
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/device.h>
+#include <linux/errno.h>
 #include <linux/init.h>
 
 #include <asm/hardware.h>
+#include <asm/hardware/sa1111.h>
 #include <asm/mach-types.h>
 
 #include "sa1100_generic.h"
@@ -76,6 +79,9 @@
     case 50:	pa_dwr_set = SOCKET1_POWER;			break;
     }
     break;
+
+  default:
+    return -1;
   }
 
   if (conf->vpp != conf->vcc && conf->vpp != 0) {
@@ -90,7 +96,7 @@
 
     local_irq_save(flags);
     PA_DWR = (PA_DWR & ~pa_dwr_mask) | pa_dwr_set;
-    locla_irq_restore(flags);
+    local_irq_restore(flags);
   }
 
   return ret;
@@ -117,7 +123,7 @@
 	return ret;
 }
 
-void __exit pcmcia_jornada720_exit(void)
+void __devexit pcmcia_jornada720_exit(void)
 {
 	sa1100_unregister_pcmcia(&jornada720_pcmcia_ops);
 }
diff -Nru a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
--- a/drivers/pcmcia/sa1111_generic.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/pcmcia/sa1111_generic.c	Wed Jan  8 20:04:43 2003
@@ -36,11 +36,11 @@
 	int i, ret;
 
 	for (i = ret = 0; i < ARRAY_SIZE(irqs); i++) {
-		set_irq_type(irqs[i].irq, IRQT_FALLING);
 		ret = request_irq(irqs[i].irq, init->handler, SA_INTERRUPT,
 				  irqs[i].str, NULL);
 		if (ret)
 			break;
+		set_irq_type(irqs[i].irq, IRQT_FALLING);
 	}
 
 	if (i < ARRAY_SIZE(irqs)) {
@@ -280,7 +280,7 @@
 
 static struct sa1111_driver pcmcia_driver = {
 	.drv = {
-		.name		= "SA1111 PCMCIA",
+		.name		= "sa1111-pcmcia",
 		.bus		= &sa1111_bus_type,
 		.probe		= pcmcia_probe,
 		.remove		= __devexit_p(pcmcia_remove),
diff -Nru a/drivers/pcmcia/yenta.c b/drivers/pcmcia/yenta.c
--- a/drivers/pcmcia/yenta.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/pcmcia/yenta.c	Wed Jan  8 20:04:44 2003
@@ -695,7 +695,7 @@
 
 	/*
 	 * This does not work currently. The controller
-	 * loses too much informationduring D3 to come up
+	 * loses too much information during D3 to come up
 	 * cleanly. We should probably fix yenta_init()
 	 * to update all the critical registers, notably
 	 * the IO and MEM bridging region data.. That is
diff -Nru a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
--- a/drivers/sbus/char/bpp.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/sbus/char/bpp.c	Wed Jan  8 20:04:32 2003
@@ -886,7 +886,7 @@
       instances[idx].run_flag = 0;
       init_timer(&instances[idx].timer_list);
       instances[idx].timer_list.function = bpp_wake_up;
-      if (check_region(lpAddr,3)) return;
+      if (!request_region(lpAddr,3, dev_name)) return;
 
       /*
        * First, make sure the instance exists. Do this by writing to
@@ -904,7 +904,6 @@
             unsigned save;
             instances[idx].present = 1;
 
-            request_region(lpAddr,3, dev_name);
             save = inb_p(lpAddr+2);
             for (testvalue=0; testvalue<BPP_DELAY; testvalue++)
                   ;
@@ -921,7 +920,9 @@
                   instances[idx].enhanced = 1;
             outb_p(save, lpAddr+2);
       }
-
+      else {
+            release_region(lpAddr,3);
+      }
       /*
        * Leave the port in compat idle mode.
        */
diff -Nru a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
--- a/drivers/sbus/char/envctrl.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/sbus/char/envctrl.c	Wed Jan  8 20:04:43 2003
@@ -892,6 +892,10 @@
 		}
 
                 pchild->tables = kmalloc(tbls_size, GFP_KERNEL);
+		if (pchild->tables == NULL){
+			printk("envctrl: Failed to allocate table.\n");
+			return;
+		}
                 len = prom_getproperty(node, "tables",
 				       (char *) pchild->tables, tbls_size);
                 if (len <= 0) {
diff -Nru a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c
--- a/drivers/sbus/sbus.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/sbus/sbus.c	Wed Jan  8 20:04:43 2003
@@ -20,6 +20,9 @@
 struct sbus_bus *sbus_root = NULL;
 
 static struct linux_prom_irqs irqs[PROMINTR_MAX] __initdata = { { 0 } };
+#ifdef CONFIG_SPARC32
+static int interrupts[PROMINTR_MAX] __initdata = { 0 };
+#endif
 
 #ifdef CONFIG_PCI
 extern int pcic_present(void);
@@ -108,7 +111,7 @@
 	 * XXX Pull this crud out into an arch specific area
 	 * XXX at some point. -DaveM
 	 */
-#ifdef __sparc_v9__
+#ifdef CONFIG_SPARC64
 	len = prom_getproperty(prom_node, "interrupts",
 			       (char *) irqs, sizeof(irqs));
 	if (len == -1 || len == 0) {
@@ -123,24 +126,43 @@
 
 		sdev->irqs[0] =	sbus_build_irq(sdev->bus, pri);
 	}
-#else
+#endif /* CONFIG_SPARC64 */
+
+#ifdef CONFIG_SPARC32
 	len = prom_getproperty(prom_node, "intr",
 			       (char *)irqs, sizeof(irqs));
-	if (len == -1)
-		len = 0;
-	sdev->num_irqs = len / 8;
-	if (sdev->num_irqs == 0) {
-		sdev->irqs[0] = 0;
-	} else if (sparc_cpu_model == sun4d) {
-		extern unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq);
+	if (len != -1) {
+		sdev->num_irqs = len / 8;
+		if (sdev->num_irqs == 0) {
+			sdev->irqs[0] = 0;
+		} else if (sparc_cpu_model == sun4d) {
+			extern unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq);
 
-		for (len = 0; len < sdev->num_irqs; len++)
-			sdev->irqs[len] = sun4d_build_irq(sdev, irqs[len].pri);
+			for (len = 0; len < sdev->num_irqs; len++)
+				sdev->irqs[len] = sun4d_build_irq(sdev, irqs[len].pri);
+		} else {
+			for (len = 0; len < sdev->num_irqs; len++)
+				sdev->irqs[len] = irqs[len].pri;
+		}
 	} else {
-		for (len = 0; len < sdev->num_irqs; len++)
-			sdev->irqs[len] = irqs[len].pri;
-	}
-#endif /* !__sparc_v9__ */
+		/* No "intr" node found-- check for "interrupts" node.
+		 * This node contains SBus interrupt levels, not IPLs
+		 * as in "intr", and no vector values.  We convert 
+		 * SBus interrupt levels to PILs (platform specific).
+		 */
+		len = prom_getproperty(prom_node, "interrupts", 
+					(char *)interrupts, sizeof(interrupts));
+		if (len == -1) {
+			sdev->irqs[0] = 0;
+			sdev->num_irqs = 0;
+		} else {
+			sdev->num_irqs = len / sizeof(int);
+			for (len = 0; len < sdev->num_irqs; len++) {
+				sdev->irqs[len] = sbint_to_irq(sdev, interrupts[len]);
+			}
+		}
+	} 
+#endif /* CONFIG_SPARC32 */
 }
 
 /* This routine gets called from whoever needs the sbus first, to scan
@@ -295,7 +317,7 @@
 	struct sbus_dev *this_dev;
 	int num_sbus = 0;  /* How many did we find? */
 
-#ifndef __sparc_v9__
+#ifdef CONFIG_SPARC32
 	register_proc_sparc_ioport();
 #endif
 
@@ -316,7 +338,7 @@
 				prom_printf("Neither SBUS nor PCI found.\n");
 				prom_halt();
 			} else {
-#ifdef __sparc_v9__
+#ifdef CONFIG_SPARC64
 				firetruck_init();
 #endif
 			}
@@ -362,18 +384,19 @@
 
 	/* Loop until we find no more SBUS's */
 	while(this_sbus) {
-#ifdef __sparc_v9__						  
+#ifdef CONFIG_SPARC64
 		/* IOMMU hides inside SBUS/SYSIO prom node on Ultra. */
 		if(sparc_cpu_model == sun4u) {
 			extern void sbus_iommu_init(int prom_node, struct sbus_bus *sbus);
 
 			sbus_iommu_init(this_sbus, sbus);
 		}
-#endif
-#ifndef __sparc_v9__						  
+#endif /* CONFIG_SPARC64 */
+
+#ifdef CONFIG_SPARC32
 		if (sparc_cpu_model == sun4d)
 			iounit_init(this_sbus, iommund, sbus);
-#endif						   
+#endif /* CONFIG_SPARC32 */
 		printk("sbus%d: ", num_sbus);
 		sbus_clock = prom_getint(this_sbus, "clock-frequency");
 		if(sbus_clock == -1)
@@ -385,7 +408,7 @@
 		prom_getstring(this_sbus, "name",
 			       sbus->prom_name, sizeof(sbus->prom_name));
 		sbus->clock_freq = sbus_clock;
-#ifndef __sparc_v9__		
+#ifdef CONFIG_SPARC32
 		if (sparc_cpu_model == sun4d) {
 			sbus->devid = prom_getint(iommund, "device-id");
 			sbus->board = prom_getint(iommund, "board#");
@@ -498,7 +521,7 @@
 		sun4d_init_sbi_irq();
 	}
 	
-#ifdef __sparc_v9__
+#ifdef CONFIG_SPARC64
 	if (sparc_cpu_model == sun4u) {
 		firetruck_init();
 	}
@@ -507,7 +530,7 @@
 	if (sparc_cpu_model == sun4u)
 		auxio_probe ();
 #endif
-#ifdef __sparc_v9__
+#ifdef CONFIG_SPARC64
 	if (sparc_cpu_model == sun4u) {
 		extern void clock_probe(void);
 
diff -Nru a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
--- a/drivers/scsi/53c700.h	Wed Jan  8 20:04:32 2003
+++ b/drivers/scsi/53c700.h	Wed Jan  8 20:04:32 2003
@@ -8,6 +8,8 @@
 #ifndef _53C700_H
 #define _53C700_H
 
+#include <asm/io.h>
+
 /* Turn on for general debugging---too verbose for normal use */
 #undef	NCR_700_DEBUG
 /* Debug the tag queues, checking hash queue allocation and deallocation
diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
--- a/drivers/scsi/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/Kconfig	Wed Jan  8 20:04:45 2003
@@ -964,6 +964,16 @@
 	  Please read <file:drivers/scsi/sym53c8xx_2/Documentation.txt> for more
 	  information.
 
+config SCSI_ZALON
+	tristate "Zalon SCSI support"
+	depends on GSC && SCSI
+	help
+	  The Zalon is a GSC/HSC bus interface chip that sits between the
+	  PA-RISC processor and the NCR 53c720 SCSI controller on C100,
+	  C110, J200, J210 and some D, K & R-class machines.  It's also
+	  used on the add-in Bluefish, Barracuda & Shrike SCSI cards.
+	  Say Y here if you have one of these machines or cards.
+
 config SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
 	int "DMA addressing mode"
 	depends on SCSI_SYM53C8XX_2
@@ -1068,7 +1078,7 @@
 
 config SCSI_NCR53C8XX_DEFAULT_TAGS
 	int "default tagged command queue depth"
-	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX || SCSI_ZALON)
 	default "8"
 	---help---
 	  "Tagged command queuing" is a feature of SCSI-2 which improves
@@ -1094,7 +1104,7 @@
 
 config SCSI_NCR53C8XX_MAX_TAGS
 	int "maximum number of queued commands"
-	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX || SCSI_ZALON)
 	default "32"
 	---help---
 	  This option allows you to specify the maximum number of commands
@@ -1111,7 +1121,7 @@
 
 config SCSI_NCR53C8XX_SYNC
 	int "synchronous transfers frequency in MHz"
-	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX || SCSI_ZALON)
 	default "20"
 	---help---
 	  The SCSI Parallel Interface-2 Standard defines 5 classes of transfer
@@ -1145,7 +1155,7 @@
 
 config SCSI_NCR53C8XX_PROFILE
 	bool "enable profiling"
-	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX || SCSI_ZALON)
 	help
 	  This option allows you to enable profiling information gathering.
 	  These statistics are not very accurate due to the low frequency
@@ -1156,7 +1166,7 @@
 
 config SCSI_NCR53C8XX_IOMAPPED
 	bool "use normal IO"
-	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && !SCSI_ZALON
 	help
 	  If you say Y here, the driver will use normal IO, as opposed to
 	  memory mapped IO. Memory mapped IO has less latency than normal IO
@@ -1181,7 +1191,7 @@
 
 config SCSI_NCR53C8XX_NO_DISCONNECT
 	bool "not allow targets to disconnect"
-	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && SCSI_NCR53C8XX_DEFAULT_TAGS=0
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX || SCSI_ZALON) && SCSI_NCR53C8XX_DEFAULT_TAGS=0
 	help
 	  This option is only provided for safety if you suspect some SCSI
 	  device of yours to not support properly the target-disconnect
@@ -1191,7 +1201,7 @@
 
 config SCSI_NCR53C8XX_SYMBIOS_COMPAT
 	bool "assume boards are SYMBIOS compatible (EXPERIMENTAL)"
-	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && EXPERIMENTAL
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX || SCSI_ZALON) && EXPERIMENTAL
 	---help---
 	  This option allows you to enable some features depending on GPIO
 	  wiring. These General Purpose Input/Output pins can be used for
diff -Nru a/drivers/scsi/Makefile b/drivers/scsi/Makefile
--- a/drivers/scsi/Makefile	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/Makefile	Wed Jan  8 20:04:45 2003
@@ -84,6 +84,7 @@
 obj-$(CONFIG_SCSI_SYM53C8XX_2)	+= sym53c8xx_2/
 obj-$(CONFIG_SCSI_SYM53C8XX)	+= sym53c8xx.o 
 obj-$(CONFIG_SCSI_NCR53C8XX)	+= ncr53c8xx.o 
+obj-$(CONFIG_SCSI_ZALON)	+= zalon7xx.o
 obj-$(CONFIG_SCSI_EATA_DMA)	+= eata_dma.o
 obj-$(CONFIG_SCSI_EATA_PIO)	+= eata_pio.o
 obj-$(CONFIG_SCSI_7000FASST)	+= wd7000.o
@@ -135,6 +136,7 @@
 sr_mod-objs	:= sr.o sr_ioctl.o sr_vendor.o
 initio-objs	:= ini9100u.o i91uscsi.o
 a100u2w-objs	:= inia100.o i60uscsi.o
+zalon7xx-objs	:= zalon.o ncr53c8xx.o
 cpqfc-objs	:= cpqfcTSinit.o cpqfcTScontrol.o cpqfcTSi2c.o \
 		   cpqfcTSworker.o cpqfcTStrigger.o
 
diff -Nru a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
--- a/drivers/scsi/aic7xxx/Makefile	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/aic7xxx/Makefile	Wed Jan  8 20:04:45 2003
@@ -1,7 +1,7 @@
 #
 # Makefile for the Linux aic7xxx SCSI driver.
 #
-# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#3 $
+# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#5 $
 #
 
 # Let kbuild descend into aicasm when cleaning
@@ -44,40 +44,39 @@
 
 $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h
 $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h
+$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
+$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
 
 $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h
 $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h
 
+aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE)	:= $(obj)/aic7xxx_seq.h \
+						   $(obj)/aic7xxx_reg.h
+aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)	+= $(obj)/aic7xxx_reg_print.c
+
+aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
+	-p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
+
 ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
-aic7xxx_gen = $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
-ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y)
-aic7xxx_gen += $(obj)/aic7xxx_reg_print.c
-aic7xxx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
-		 -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h	   \
-		 -o $(obj)/aic7xxx_seq.h $(src)/aic7xxx.seq
-else
-aic7xxx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
-		 -o $(obj)/aic7xxx_seq.h $(src)/aic7xxx.seq
+$(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
+	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
+			      $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
+			      $(src)/aic7xxx.seq
 endif
 
-$(aic7xxx_gen): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
-	$(aic7xxx_asm_cmd)
-endif
+aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE)	:= $(obj)/aic79xx_seq.h \
+						   $(obj)/aic79xx_reg.h
+aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT)	+= $(obj)/aic79xx_reg_print.c
+
+aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
+	-p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
 
 ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
-aic79xx_gen = $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
-ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y)
-aic79xx_gen += $(obj)/aic79xx_reg_print.c
-aic79xx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
-		 -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h	   \
-		 -o $(obj)/aic79xx_seq.h $(src)/aic79xx.seq
-else
-aic79xx_asm_cmd = $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
-		 -o $(obj)/aic79xx_seq.h $(src)/aic79xx.seq
+$(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
+	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
+			      $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
+			      $(src)/aic79xx.seq
 endif
-$(aic79xx_gen): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
-	$(aic79xx_asm_cmd)
-endif 
 
 $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl]
 	$(MAKE) -C $(src)/aicasm
diff -Nru a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
--- a/drivers/scsi/aic7xxx/aic79xx_core.c	Wed Jan  8 20:04:31 2003
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c	Wed Jan  8 20:04:32 2003
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#148 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#150 $
  *
  * $FreeBSD$
  */
@@ -2321,13 +2321,13 @@
 
 	/* Skip all PACED only entries if IU is not available */
 	if ((*ppr_options & MSG_EXT_PPR_IU_REQ) == 0
-	 && maxsync < AHD_SYNCRATE_DT)
-		maxsync = AHD_SYNCRATE_DT;
+	 && *period < AHD_SYNCRATE_DT)
+		*period = AHD_SYNCRATE_DT;
 
 	/* Skip all DT only entries if DT is not available */
 	if ((*ppr_options & MSG_EXT_PPR_DT_REQ) == 0
-	 && maxsync < AHD_SYNCRATE_ULTRA2)
-		maxsync = AHD_SYNCRATE_ULTRA2;
+	 && *period < AHD_SYNCRATE_ULTRA2)
+		*period = AHD_SYNCRATE_ULTRA2;
 }
 
 /*
@@ -5680,7 +5680,8 @@
 			       /*lowaddr*/BUS_SPACE_MAXADDR,
 			       /*highaddr*/BUS_SPACE_MAXADDR,
 			       /*filter*/NULL, /*filterarg*/NULL,
-			       /*maxsize*/MAXBSIZE, /*nsegments*/AHD_NSEG,
+			       /*maxsize*/(AHD_NSEG - 1) * PAGE_SIZE,
+			       /*nsegments*/AHD_NSEG,
 			       /*maxsegsz*/AHD_MAXTRANSFER_SIZE,
 			       /*flags*/BUS_DMA_ALLOCNOW,
 			       &ahd->buffer_dmat) != 0) {
@@ -7856,7 +7857,8 @@
 #ifdef AHD_DEBUG
 	if ((ahd_debug & AHD_SHOW_MISC) != 0) {
 		ahd_print_path(ahd, scb);
-		printf("Handled Residual of %d bytes\n", resid);
+		printf("Handled %sResidual of %d bytes\n",
+		       (scb->flags & SCB_SENSE) ? "Sense " : "", resid);
 	}
 #endif
 }
diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c	Wed Jan  8 20:04:32 2003
@@ -1,7 +1,7 @@
 /*
  * Adaptec AIC79xx device driver for Linux.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#103 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#104 $
  *
  * --------------------------------------------------------------------------
  * Copyright (c) 1994-2000 Justin T. Gibbs.
@@ -2058,7 +2058,7 @@
 	 * negotiation will occur for the first command, and DV
 	 * will comence should that first command be successful.
 	 */
-	for (target = 0; target < AHD_NUM_TARGETS; target++)
+	for (target = 0; target < host->max_id; target++)
 		ahd_linux_alloc_target(ahd, 0, target);
 	ahd_intr_enable(ahd, TRUE);
 	ahd_linux_start_dv(ahd);
@@ -2883,6 +2883,23 @@
 				break;
 			}
 
+#ifdef AHD_DEBUG
+			if (ahd_debug & AHD_SHOW_DV) {
+				int i;
+
+				ahd_print_devinfo(ahd, devinfo);
+				printf("Inquiry buffer mismatch:");
+				for (i = 0; i < AHD_LINUX_DV_INQ_LEN; i++) {
+					if ((i & 0xF) == 0)
+						printf("\n        ");
+					printf("0x%x:0x0%x ",
+					       ((uint8_t *)targ->inq_data)[i], 
+					       targ->dv_buffer[i]);
+				}
+				printf("\n");
+			}
+#endif
+
 			if (ahd_linux_dv_fallback(ahd, devinfo) != 0) {
 				AHD_SET_DV_STATE(ahd, targ, AHD_DV_STATE_EXIT);
 				break;
@@ -3525,6 +3542,8 @@
 		targ->dv_next_narrow_period = MAX(period, AHD_SYNCRATE_ULTRA2);
 	if (targ->dv_next_wide_period == 0)
 		targ->dv_next_wide_period = period;
+	if (targ->dv_max_width == 0)
+		targ->dv_max_width = width;
 	if (targ->dv_max_ppr_options == 0)
 		targ->dv_max_ppr_options = ppr_options;
 	if (targ->dv_last_ppr_options == 0)
@@ -3619,7 +3638,7 @@
 				period++;
 			}
 		} else if ((ahd->features & AHD_WIDE) != 0
-			&& tinfo->user.width != 0
+			&& targ->dv_max_width != 0
 			&& wide_speed >= fallback_speed
 			&& (targ->dv_next_wide_period <= AHD_ASYNC_XFER_PERIOD
 			 || period >= AHD_ASYNC_XFER_PERIOD)) {
diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
--- a/drivers/scsi/aic7xxx/aic79xx_osm.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.h	Wed Jan  8 20:04:44 2003
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#99 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#102 $
  *
  */
 #ifndef _AIC79XX_LINUX_H_
@@ -288,7 +288,7 @@
 #include <linux/smp.h>
 #endif
 
-#define AIC79XX_DRIVER_VERSION "1.3.0.ALPHA6"
+#define AIC79XX_DRIVER_VERSION "1.3.0.BETA2"
 
 /**************************** Front End Queues ********************************/
 /*
@@ -458,10 +458,11 @@
 	/*
 	 * The next "fallback" period to use for narrow/wide transfers.
 	 */
-	u_int			  dv_next_narrow_period;
-	u_int			  dv_next_wide_period;
-	u_int			  dv_max_ppr_options;
-	u_int			  dv_last_ppr_options;
+	uint8_t			  dv_next_narrow_period;
+	uint8_t			  dv_next_wide_period;
+	uint8_t			  dv_max_width;
+	uint8_t			  dv_max_ppr_options;
+	uint8_t			  dv_last_ppr_options;
 	u_int			  dv_echo_size;
 	ahd_dv_state		  dv_state;
 	u_int			  dv_state_retry;
diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	Wed Jan  8 20:04:43 2003
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#19 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#20 $
  */
 
 #include "aic79xx_osm.h"
@@ -170,6 +170,9 @@
 			ahd->platform_data->hw_dma_mask =
 			    (bus_addr_t)(0x7FFFFFFFFFULL & (bus_addr_t)~0);
 		}
+	} else {
+		ahd_pci_set_dma_mask(pdev, 0xFFFFFFFF);
+		ahd->platform_data->hw_dma_mask = 0xFFFFFFFF;
 	}
 #endif
 	ahd->dev_softc = pci;
diff -Nru a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c
--- a/drivers/scsi/aic7xxx/aic79xx_pci.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/aic7xxx/aic79xx_pci.c	Wed Jan  8 20:04:44 2003
@@ -38,7 +38,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#60 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#61 $
  *
  * $FreeBSD$
  */
@@ -379,15 +379,20 @@
 ahd_pci_test_register_access(struct ahd_softc *ahd)
 {
 	ahd_mode_state	saved_modes;
+	uint32_t	cmd;
 	int		error;
-	uint8_t		seqctl;
+	uint8_t		hcntrl;
 
 	saved_modes = ahd_save_modes(ahd);
 	error = EIO;
 
-	/* Enable PCI error interrupt status */
-	seqctl = ahd_inb(ahd, SEQCTL0);
-	ahd_outb(ahd, SEQCTL0, seqctl & ~FAILDIS);
+	/*
+	 * Enable PCI error interrupt status, but suppress NMIs
+	 * generated by SERR raised due to target aborts.
+	 */
+	cmd = ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
+	ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
+			     cmd & ~PCIM_CMD_SERRESPEN, /*bytes*/2);
 
 	/*
 	 * First a simple test to see if any
@@ -397,7 +402,8 @@
 	 * be zero so it is a good register to
 	 * use for this test.
 	 */
-	if (ahd_inb(ahd, HCNTRL) == 0xFF)
+	hcntrl = ahd_inb(ahd, HCNTRL);
+	if (hcntrl == 0xFF)
 		goto fail;
 
 	/*
@@ -407,6 +413,10 @@
 	 * either, so look for data corruption and/or flaged
 	 * PCI errors.
 	 */
+	ahd_outb(ahd, HCNTRL, hcntrl|PAUSE);
+	while (ahd_is_paused(ahd) == 0)
+		;
+	ahd_outb(ahd, SEQCTL0, PERRORDIS);
 	ahd_outl(ahd, SRAM_BASE, 0x5aa555aa);
 	if (ahd_inl(ahd, SRAM_BASE) != 0x5aa555aa)
 		goto fail;
@@ -440,7 +450,8 @@
 	}
 
 	ahd_restore_modes(ahd, saved_modes);
-	ahd_outb(ahd, SEQCTL0, seqctl);
+	ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS);
+	ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
 	return (error);
 }
 
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h
--- a/drivers/scsi/aic7xxx/aic7xxx.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx.h	Wed Jan  8 20:04:44 2003
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#66 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#67 $
  *
  * $FreeBSD$
  */
@@ -1053,7 +1053,6 @@
 	u_int			  pci_cachesize;
 
 	u_int			  stack_size;
-	uint16_t		 *saved_stack;
 
 	/* Per-Unit descriptive information */
 	const char		 *description;
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx.reg b/drivers/scsi/aic7xxx/aic7xxx.reg
--- a/drivers/scsi/aic7xxx/aic7xxx.reg	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx.reg	Wed Jan  8 20:04:45 2003
@@ -39,7 +39,7 @@
  *
  * $FreeBSD$
  */
-VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $"
+VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $"
 
 /*
  * This file is processed by the aic7xxx_asm utility for use in assembling
@@ -672,6 +672,8 @@
 	address			0x06f
 	access_mode RO
 }
+
+const	STACK_SIZE	4
 
 /*
  * Board Control (p. 3-43)
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx.seq b/drivers/scsi/aic7xxx/aic7xxx.seq
--- a/drivers/scsi/aic7xxx/aic7xxx.seq	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx.seq	Wed Jan  8 20:04:45 2003
@@ -40,7 +40,7 @@
  * $FreeBSD$
  */
 
-VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $"
+VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $"
 PATCH_ARG_LIST = "struct ahc_softc *ahc"
 PREFIX = "ahc_"
 
@@ -70,7 +70,7 @@
 	 * Turn off the selection hardware.  We need to reset the
 	 * selection request in order to perform a new selection.
 	 */
-	and	SCSISEQ, TEMODE|ENSELI|ENRSELI|ENAUTOATNP, SCSISEQ;
+	and	SCSISEQ, TEMODE|ENSELI|ENRSELI|ENAUTOATNP;
 	and	SIMODE1, ~ENBUSFREE;
 poll_for_work:
 	call	clear_target_state;
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c	Wed Jan  8 20:04:44 2003
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#105 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#108 $
  *
  * $FreeBSD$
  */
@@ -230,7 +230,6 @@
 					u_int start_instr, u_int *skip_addr);
 static void		ahc_download_instr(struct ahc_softc *ahc,
 					   u_int instrptr, uint8_t *dconsts);
-static int		ahc_probe_stack_size(struct ahc_softc *ahc);
 #ifdef AHC_TARGET_MODE
 static void		ahc_queue_lstate_event(struct ahc_softc *ahc,
 					       struct ahc_tmode_lstate *lstate,
@@ -1166,6 +1165,13 @@
 			       ahc_name(ahc), scbptr, scb_index);
 			ahc_dump_card_state(ahc);
 		} else {
+#ifdef AHC_DEBUG
+			if ((ahc_debug & AHC_SHOW_SELTO) != 0) {
+				ahc_print_path(ahc, scb);
+				printf("Saw Selection Timeout for SCB 0x%x\n",
+				       scb_index);
+			}
+#endif
 			/*
 			 * Force a renegotiation with this target just in
 			 * case the cable was pulled and will later be
@@ -1178,13 +1184,6 @@
 			ahc_force_renegotiation(ahc);
 			ahc_set_transaction_status(scb, CAM_SEL_TIMEOUT);
 			ahc_freeze_devq(ahc, scb);
-#ifdef AHC_DEBUG
-			if ((ahc_debug & AHC_SHOW_SELTO) != 0) {
-				ahc_print_path(ahc, scb);
-				printf("Saw Selection Timeout for SCB 0x%x\n",
-				       scb_index);
-			}
-#endif
 		}
 		ahc_outb(ahc, CLRINT, CLRSCSIINT);
 		ahc_restart(ahc);
@@ -4005,8 +4004,6 @@
 		free(ahc->name, M_DEVBUF);
 	if (ahc->seep_config != NULL)
 		free(ahc->seep_config, M_DEVBUF);
-	if (ahc->saved_stack != NULL)
-		free(ahc->saved_stack, M_DEVBUF);
 #ifndef __FreeBSD__
 	free(ahc, M_DEVBUF);
 #endif
@@ -4542,12 +4539,6 @@
 	size_t	 driver_data_size;
 	uint32_t physaddr;
 
-	ahc->stack_size = ahc_probe_stack_size(ahc);
-	ahc->saved_stack = malloc(ahc->stack_size * sizeof(uint16_t),
-				  M_DEVBUF, M_NOWAIT);
-	if (ahc->saved_stack == NULL)
-		return (ENOMEM);
-
 #ifdef AHC_DEBUG_SEQUENCER
 	ahc->flags |= AHC_SEQUENCER_DEBUG;
 #endif
@@ -4602,7 +4593,8 @@
 			       /*lowaddr*/BUS_SPACE_MAXADDR,
 			       /*highaddr*/BUS_SPACE_MAXADDR,
 			       /*filter*/NULL, /*filterarg*/NULL,
-			       /*maxsize*/MAXBSIZE, /*nsegments*/AHC_NSEG,
+			       /*maxsize*/(AHC_NSEG - 1) * PAGE_SIZE,
+			       /*nsegments*/AHC_NSEG,
 			       /*maxsegsz*/AHC_MAXTRANSFER_SIZE,
 			       /*flags*/BUS_DMA_ALLOCNOW,
 			       &ahc->buffer_dmat) != 0) {
@@ -6275,7 +6267,8 @@
 #ifdef AHC_DEBUG
 	if ((ahc_debug & AHC_SHOW_MISC) != 0) {
 		ahc_print_path(ahc, scb);
-		printf("Handled Residual of %d bytes\n", resid);
+		printf("Handled %sResidual of %d bytes\n",
+		       (scb->flags & SCB_SENSE) ? "Sense " : "", resid);
 	}
 #endif
 }
@@ -6655,41 +6648,6 @@
 	}
 }
 
-static int
-ahc_probe_stack_size(struct ahc_softc *ahc)
-{
-	int last_probe;
-
-	last_probe = 0;
-	while (1) {
-		int i;
-
-		/*
-		 * We avoid using 0 as a pattern to avoid
-		 * confusion if the stack implementation
-		 * "back-fills" with zeros when "poping'
-		 * entries.
-		 */
-		for (i = 1; i <= last_probe+1; i++) {
-		       ahc_outb(ahc, STACK, i & 0xFF);
-		       ahc_outb(ahc, STACK, (i >> 8) & 0xFF);
-		}
-
-		/* Verify */
-		for (i = last_probe+1; i > 0; i--) {
-			u_int stack_entry;
-
-			stack_entry = ahc_inb(ahc, STACK)
-				    |(ahc_inb(ahc, STACK) << 8);
-			if (stack_entry != i)
-				goto sized;
-		}
-		last_probe++;
-	}
-sized:
-	return (last_probe);
-}
-
 int
 ahc_print_register(ahc_reg_parse_entry_t *table, u_int num_entries,
 		   const char *name, u_int address, u_int value,
@@ -6768,6 +6726,7 @@
 	cur_col = 0;
 	if ((ahc->features & AHC_DT) != 0)
 		ahc_scsisigi_print(ahc_inb(ahc, SCSISIGI), &cur_col, 50);
+	ahc_error_print(ahc_inb(ahc, ERROR), &cur_col, 50);
 	ahc_scsiphase_print(ahc_inb(ahc, SCSIPHASE), &cur_col, 50);
 	ahc_scsibusl_print(ahc_inb(ahc, SCSIBUSL), &cur_col, 50);
 	ahc_lastphase_print(ahc_inb(ahc, LASTPHASE), &cur_col, 50);
@@ -6787,11 +6746,8 @@
 	if (cur_col != 0)
 		printf("\n");
 	printf("STACK:");
-	for (i = 0; i < ahc->stack_size; i++) {
-		ahc->saved_stack[i] =
-		    ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8);
-	       printf(" 0x%x", ahc->saved_stack[i]);
-	}
+	for (i = 0; i < STACK_SIZE; i++)
+	       printf(" 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8));
 	printf("\nSCB count = %d\n", ahc->scb_data->numscbs);
 	printf("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag);
 	printf("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB));
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c	Wed Jan  8 20:04:32 2003
@@ -1,7 +1,7 @@
 /*
  * Adaptec AIC7xxx device driver for Linux.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#166 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#169 $
  *
  * Copyright (c) 1994 John Aycock
  *   The University of Calgary Department of Computer Science.
@@ -576,6 +576,7 @@
 static void ahc_linux_setup_tag_info(char *p, char *end, char *s);
 static void ahc_linux_setup_tag_info_global(char *p);
 static void ahc_linux_setup_dv(char *p, char *end, char *s);
+static int  aic7xxx_setup(char *s);
 static int  ahc_linux_next_unit(void);
 static void ahc_runq_tasklet(unsigned long data);
 static int  ahc_linux_halt(struct notifier_block *nb, u_long event, void *buf);
@@ -1297,6 +1298,7 @@
 	 */
 	.max_sectors		= 8192,
 #endif
+#if defined CONFIG_HIGHIO || LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
 /* Assume RedHat Distribution with its different HIGHIO conventions. */
 	.can_dma_32		= 1,
@@ -1304,6 +1306,7 @@
 #else
 	.highmem_io		= 1,
 #endif
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 	.name			= "aic7xxx",
 	.slave_alloc		= ahc_linux_slave_alloc,
@@ -1764,7 +1767,7 @@
  * to a parameter with a ':' between the parameter and the value.
  * ie. aic7xxx=stpwlev:1,extended
  */
-int
+static int
 aic7xxx_setup(char *s)
 {
 	int	i, n;
@@ -1888,7 +1891,7 @@
 	 * negotiation will occur for the first command, and DV
 	 * will comence should that first command be successful.
 	 */
-	for (target = 0; target < AHC_NUM_TARGETS; target++) {
+	for (target = 0; target < host->max_id*host->max_channel+1; target++) {
 		u_int channel;
 
 		channel = 0;
@@ -2732,6 +2735,22 @@
 				AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT);
 				break;
 			}
+#ifdef AHC_DEBUG
+			if (ahc_debug & AHC_SHOW_DV) {
+				int i;
+
+				ahc_print_devinfo(ahc, devinfo);
+				printf("Inquiry buffer mismatch:");
+				for (i = 0; i < AHC_LINUX_DV_INQ_LEN; i++) {
+					if ((i & 0xF) == 0)
+						printf("\n        ");
+					printf("0x%x:0x0%x ",
+					       ((uint8_t *)targ->inq_data)[i], 
+					       targ->dv_buffer[i]);
+				}
+				printf("\n");
+			}
+#endif
 
 			if (ahc_linux_fallback(ahc, devinfo) != 0) {
 				AHC_SET_DV_STATE(ahc, targ, AHC_DV_STATE_EXIT);
@@ -3365,6 +3384,8 @@
 		targ->dv_next_narrow_period = MAX(period, AHC_SYNCRATE_ULTRA2);
 	if (targ->dv_next_wide_period == 0)
 		targ->dv_next_wide_period = period;
+	if (targ->dv_max_width == 0)
+		targ->dv_max_width = width;
 	if (targ->dv_max_ppr_options == 0)
 		targ->dv_max_ppr_options = ppr_options;
 	if (targ->dv_last_ppr_options == 0)
@@ -3459,7 +3480,7 @@
 				period++;
 			}
 		} else if ((ahc->features & AHC_WIDE) != 0
-			&& tinfo->user.width != 0
+			&& targ->dv_max_width != 0
 			&& wide_speed >= fallback_speed
 			&& (targ->dv_next_wide_period <= AHC_ASYNC_XFER_PERIOD
 			 || period >= AHC_ASYNC_XFER_PERIOD)) {
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h	Wed Jan  8 20:04:43 2003
@@ -53,7 +53,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#114 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#118 $
  *
  */
 #ifndef _AIC7XXX_LINUX_H_
@@ -301,7 +301,7 @@
 #include <linux/smp.h>
 #endif
 
-#define AIC7XXX_DRIVER_VERSION "6.2.25"
+#define AIC7XXX_DRIVER_VERSION "6.2.26"
 
 /**************************** Front End Queues ********************************/
 /*
@@ -471,10 +471,11 @@
 	/*
 	 * The next "fallback" period to use for narrow/wide transfers.
 	 */
-	u_int			  dv_next_narrow_period;
-	u_int			  dv_next_wide_period;
-	u_int			  dv_max_ppr_options;
-	u_int			  dv_last_ppr_options;
+	uint8_t			  dv_next_narrow_period;
+	uint8_t			  dv_next_wide_period;
+	uint8_t			  dv_max_width;
+	uint8_t			  dv_max_ppr_options;
+	uint8_t			  dv_last_ppr_options;
 	u_int			  dv_echo_size;
 	ahc_dv_state		  dv_state;
 	u_int			  dv_state_retry;
@@ -863,6 +864,7 @@
 #define PCIM_CMD_BUSMASTEREN	0x0004
 #define PCIM_CMD_MWRICEN	0x0010
 #define PCIM_CMD_PERRESPEN	0x0040
+#define	PCIM_CMD_SERRESPEN	0x0100
 #define PCIR_STATUS		0x06
 #define PCIR_REVID		0x08
 #define PCIR_PROGIF		0x09
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	Wed Jan  8 20:04:43 2003
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#42 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#43 $
  */
 
 #include "aic7xxx_osm.h"
@@ -167,8 +167,8 @@
 		ahc->platform_data->hw_dma_mask =
 		    (bus_addr_t)(0x7FFFFFFFFFULL & (bus_addr_t)~0);
 	} else {
-		ahc_pci_set_dma_mask(pdev, 0xffffffffULL);
-		ahc->platform_data->hw_dma_mask = 0xffffffffULL;
+		ahc_pci_set_dma_mask(pdev, 0xFFFFFFFF);
+		ahc->platform_data->hw_dma_mask = 0xFFFFFFFF;
 	}
 #endif
 	ahc->dev_softc = pci;
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c
--- a/drivers/scsi/aic7xxx/aic7xxx_pci.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c	Wed Jan  8 20:04:32 2003
@@ -39,7 +39,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#54 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#55 $
  *
  * $FreeBSD$
  */
@@ -1202,15 +1202,20 @@
 int
 ahc_pci_test_register_access(struct ahc_softc *ahc)
 {
-	int	error;
-	u_int	status1;
-	uint8_t	seqctl;
+	int	 error;
+	u_int	 status1;
+	uint32_t cmd;
+	uint8_t	 hcntrl;
 
 	error = EIO;
 
-	/* Enable PCI error interrupt status */
-	seqctl = ahc_inb(ahc, SEQCTL);
-	ahc_outb(ahc, SEQCTL, seqctl & ~FAILDIS);
+	/*
+	 * Enable PCI error interrupt status, but suppress NMIs
+	 * generated by SERR raised due to target aborts.
+	 */
+	cmd = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/2);
+	ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
+			     cmd & ~PCIM_CMD_SERRESPEN, /*bytes*/2);
 
 	/*
 	 * First a simple test to see if any
@@ -1220,7 +1225,8 @@
 	 * be zero so it is a good register to
 	 * use for this test.
 	 */
-	if (ahc_inb(ahc, HCNTRL) == 0xFF)
+	hcntrl = ahc_inb(ahc, HCNTRL);
+	if (hcntrl == 0xFF)
 		goto fail;
 
 	/*
@@ -1230,8 +1236,13 @@
 	 * either, so look for data corruption and/or flagged
 	 * PCI errors.
 	 */
-	ahc_outl(ahc, SRAM_BASE, 0x5aa555aa);
-	if (ahc_inl(ahc, SRAM_BASE) != 0x5aa555aa)
+	ahc_outb(ahc, HCNTRL, hcntrl|PAUSE);
+	while (ahc_is_paused(ahc) == 0)
+		;
+	ahc_outb(ahc, SEQCTL, PERRORDIS);
+	ahc_outb(ahc, SCBPTR, 0);
+	ahc_outl(ahc, SCB_BASE, 0x5aa555aa);
+	if (ahc_inl(ahc, SCB_BASE) != 0x5aa555aa)
 		goto fail;
 
 	status1 = ahc_pci_read_config(ahc->dev_softc,
@@ -1248,7 +1259,8 @@
 	ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
 			     status1, /*bytes*/1);
 	ahc_outb(ahc, CLRINT, CLRPARERR);
-	ahc_outb(ahc, SEQCTL, seqctl);
+	ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS);
+	ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
 	return (error);
 }
 
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped b/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped
--- a/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped	Wed Jan  8 20:04:44 2003
@@ -2,8 +2,8 @@
  * DO NOT EDIT - This file is automatically generated
  *		 from the following source files:
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $
  */
 typedef int (ahc_reg_print_t)(u_int, u_int *, u_int);
 typedef struct ahc_reg_parse_entry {
@@ -1779,6 +1779,7 @@
 #define	MAX_OFFSET	0xff
 #define	BUS_16_BIT	0x01
 #define	SCB_UPLOAD_SIZE	0x20
+#define	STACK_SIZE	0x04
 
 
 /* Downloaded Constant Definitions */
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped b/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped
--- a/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped	Wed Jan  8 20:04:44 2003
@@ -2,8 +2,8 @@
  * DO NOT EDIT - This file is automatically generated
  *		 from the following source files:
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $
  */
 
 #include "aic7xxx_osm.h"
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped b/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped
--- a/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped	Wed Jan  8 20:04:45 2003
@@ -2,8 +2,8 @@
  * DO NOT EDIT - This file is automatically generated
  *		 from the following source files:
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#52 $
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#36 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#53 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#37 $
  */
 static uint8_t seqprog[] = {
 	0xb2, 0x00, 0x00, 0x08,
diff -Nru a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y	Wed Jan  8 20:04:43 2003
@@ -38,7 +38,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#28 $
+ * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#29 $
  *
  * $FreeBSD$
  */
@@ -209,7 +209,7 @@
 
 %type <value> export ret f1_opcode f2_opcode jmp_jc_jnc_call jz_jnz je_jne
 
-%type <value> numerical_value mode_value mode_list macro_arglist
+%type <value> mode_value mode_list macro_arglist
 
 %left '|'
 %left '&'
@@ -781,17 +781,6 @@
 		}
 		$$ = $1 + 1;
 		add_macro_arg($3, $1);
-	}
-;
-
-numerical_value:
-	T_NUMBER
-	{
-		$$ = $1;
-	}
-|	'-' T_NUMBER
-	{
-		$$ = -$2;
 	}
 ;
 
diff -Nru a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
--- a/drivers/scsi/gdth.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/gdth.c	Wed Jan  8 20:04:44 2003
@@ -4,9 +4,11 @@
  * Intel Corporation:  Storage RAID Controllers                         *
  *                                                                      *
  * gdth.c                                                               *
- * Copyright (C) 1995-01 ICP vortex, an Intel company,  Achim Leubner   *
+ * Copyright (C) 1995-02 ICP vortex, an Intel company,  Achim Leubner   *
+ * <achim.leubner@intel.com>                                            *
  *                                                                      *
- * <achim@vortex.de>                                                    *
+ * Additions/Fixes: Boji Tony Kannanthanam                              *
+ * <boji.t.kannanthanam@intel.com>                                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published    *
@@ -22,9 +24,23 @@
  * along with this kernel; if not, write to the Free Software           *
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.            *
  *                                                                      *
- * Tested with Linux 1.2.13, ..., 2.2.19, ..., 2.4.7                    *
+ * Tested with Linux 1.2.13, ..., 2.2.20, ..., 2.4.18                   *
  *                                                                      *
  * $Log: gdth.c,v $
+ * Revision 1.61  2002/10/03 09:35:22  boji
+ * Fixed SCREENSERVICE intialisation in SMP cases.
+ * Added checks for gdth_polling before GDTH_HA_LOCK
+ *
+ * Revision 1.60  2002/02/05 09:35:22  achim
+ * MODULE_LICENSE only if kernel >= 2.4.11
+ *
+ * Revision 1.59  2002/01/30 09:46:33  achim
+ * Small changes
+ *
+ * Revision 1.58  2002/01/29 15:30:02  achim
+ * Set default value of shared_access to Y
+ * New status S_CACHE_RESERV for clustering added
+ *
  * Revision 1.57  2001/08/21 11:16:35  achim
  * Bugfix free_irq()
  *
@@ -232,7 +248,7 @@
  * Initial revision
  *
  ************************************************************************/
-#ident "$Id: gdth.c,v 1.57 2001/08/21 11:16:35 achim Exp $" 
+#ident "$Id: gdth.c,v 1.60 2002/02/05 09:35:22 achim Exp $" 
 
 /* All GDT Disk Array Controllers are fully supported by this driver.
  * This includes the PCI/EISA/ISA SCSI Disk Array Controllers and the
@@ -269,7 +285,7 @@
  *
  * The default values are: "gdth=disable:N,reserve_mode:1,reverse_scan:N,
  *                          max_ids:127,rescan:N,virt_ctr:N,hdr_channel:0,
- *                          shared_access:N".
+ *                          shared_access:Y".
  * Here is another example: "gdth=reserve_list:0,1,2,0,0,1,3,0,rescan:Y".
  * 
  * When loading the gdth driver as a module, the same options are available. 
@@ -670,7 +686,7 @@
 /* map channels to virtual controllers */
 static int virt_ctr = 0;
 /* shared access */
-static int shared_access = 0;
+static int shared_access = 1;
 
 #ifdef MODULE
 #if LINUX_VERSION_CODE >= 0x02011A
@@ -2343,12 +2359,13 @@
     register Scsi_Cmnd *nscp;
     unchar b, t, firsttime;
     unchar this_cmd, next_cmd;
-    ulong flags;
+    ulong flags = 0;
     int cmd_index;
 
     TRACE(("gdth_next() hanum %d\n",hanum));
     ha = HADATA(gdth_ctr_tab[hanum]);
-    GDTH_LOCK_HA(ha, flags);
+    if (!gdth_polling) 
+    	GDTH_LOCK_HA(ha, flags);
 
     ha->cmd_cnt = ha->cmd_offs_dpmem = 0;
     this_cmd = firsttime = TRUE;
@@ -2443,10 +2460,12 @@
                 if (!nscp->SCp.have_data_in)
                     nscp->SCp.have_data_in++;
                 else {
-                    GDTH_UNLOCK_HA(ha,flags);
+                    if (!gdth_polling) 
+                        GDTH_UNLOCK_HA(ha,flags);
                     /* io_request_lock already active ! */
                     nscp->scsi_done(nscp);
-                    GDTH_LOCK_HA(ha,flags);
+                    if (!gdth_polling) 
+                    	GDTH_LOCK_HA(ha,flags);
                 }
             }
         } else
@@ -2471,10 +2490,12 @@
             if (!nscp->SCp.have_data_in)
                 nscp->SCp.have_data_in++;
             else {
-                GDTH_UNLOCK_HA(ha,flags);
+                if (!gdth_polling) 
+                	GDTH_UNLOCK_HA(ha,flags);
                 /* io_request_lock already active ! */      
                 nscp->scsi_done(nscp);
-                GDTH_LOCK_HA(ha,flags);
+                if (!gdth_polling) 
+                	GDTH_LOCK_HA(ha,flags);
             }
         } else {
             switch (nscp->cmnd[0]) {
@@ -2500,16 +2521,20 @@
                     if (!nscp->SCp.have_data_in)
                         nscp->SCp.have_data_in++;
                     else {
-                        GDTH_UNLOCK_HA(ha,flags);
+                	if (!gdth_polling) 
+                        	GDTH_UNLOCK_HA(ha,flags);
                         /* io_request_lock already active ! */      
                         nscp->scsi_done(nscp);
-                        GDTH_LOCK_HA(ha,flags);
+                	if (!gdth_polling) 
+                        	GDTH_LOCK_HA(ha,flags);
                     }
                 } else if (gdth_internal_cache_cmd(hanum,nscp)) {
-                    GDTH_UNLOCK_HA(ha,flags);
+                    if (!gdth_polling) 
+                    	GDTH_UNLOCK_HA(ha,flags);
                     /* io_request_lock already active ! */      
                     nscp->scsi_done(nscp);
-                    GDTH_LOCK_HA(ha,flags);
+                    if (!gdth_polling) 
+                    	GDTH_LOCK_HA(ha,flags);
                 }
                 break;
 
@@ -2524,10 +2549,12 @@
                     if (!nscp->SCp.have_data_in)
                         nscp->SCp.have_data_in++;
                     else {
-                        GDTH_UNLOCK_HA(ha,flags);
+                    	if (!gdth_polling) 
+                        	GDTH_UNLOCK_HA(ha,flags);
                         /* io_request_lock already active ! */      
                         nscp->scsi_done(nscp);
-                        GDTH_LOCK_HA(ha,flags);
+                    	if (!gdth_polling) 
+                        	GDTH_LOCK_HA(ha,flags);
                     }
                 } else {
                     nscp->cmnd[3] = (ha->hdr[t].devtype&1) ? 1:0;
@@ -2562,10 +2589,12 @@
                     if (!nscp->SCp.have_data_in)
                         nscp->SCp.have_data_in++;
                     else {
-                        GDTH_UNLOCK_HA(ha,flags);
+                    	if (!gdth_polling) 
+                        	GDTH_UNLOCK_HA(ha,flags);
                         /* io_request_lock already active ! */      
                         nscp->scsi_done(nscp);
-                        GDTH_LOCK_HA(ha,flags);
+                    	if (!gdth_polling) 
+                        	GDTH_LOCK_HA(ha,flags);
                     }
                 } else if (!(cmd_index=gdth_fill_cache_cmd(hanum,nscp,t)))
                     this_cmd = FALSE;
@@ -2581,10 +2610,12 @@
                 if (!nscp->SCp.have_data_in)
                     nscp->SCp.have_data_in++;
                 else {
-                    GDTH_UNLOCK_HA(ha,flags);
+                    if (!gdth_polling) 
+                    	GDTH_UNLOCK_HA(ha,flags);
                     /* io_request_lock already active ! */  
                     nscp->scsi_done(nscp);
-                    GDTH_LOCK_HA(ha,flags);
+                    if (!gdth_polling) 
+                    	GDTH_LOCK_HA(ha,flags);
                 }
                 break;
             }
@@ -2604,7 +2635,8 @@
         gdth_release_event(hanum);
     }
 
-    GDTH_UNLOCK_HA(ha, flags);
+    if (!gdth_polling) 
+    	GDTH_UNLOCK_HA(ha, flags);
 
     if (gdth_polling && ha->cmd_cnt > 0) {
         if (!gdth_wait(hanum,cmd_index,POLL_TIMEOUT))
@@ -3512,9 +3544,13 @@
                     ha->hdr[scp->target].cluster_type &= ~CLUSTER_RESERVED;
                 }
                 memset((char*)scp->sense_buffer,0,16);
-                scp->sense_buffer[0] = 0x70;
-                scp->sense_buffer[2] = NOT_READY;
-                scp->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+                if (ha->status == (ushort)S_CACHE_RESERV) {
+                    scp->result = (DID_OK << 16) | (RESERVATION_CONFLICT << 1);
+                } else {
+                    scp->sense_buffer[0] = 0x70;
+                    scp->sense_buffer[2] = NOT_READY;
+                    scp->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+                }
 #if LINUX_VERSION_CODE >= 0x010300
                 if (scp->done != gdth_scsi_done)
 #endif  
@@ -3981,6 +4017,7 @@
         return 0;
     }
 
+    printk("GDT: Storage RAID Controller Driver. Version: %s \n",GDTH_VERSION_STR);
     /* initializations */
     gdth_polling = TRUE; b = 0;
     gdth_clear_events();
@@ -4215,6 +4252,7 @@
         gdth_pci_str pcistr[MAXHA];
 
         cnt = gdth_search_pci(pcistr);
+	printk("GDT: Found %d PCI Storage RAID Controllers\n",cnt);
         gdth_sort_pci(pcistr,cnt);
         for (ctr = 0; ctr < cnt; ++ctr) {
             if (gdth_ctr_count >= MAXHA)
@@ -4229,8 +4267,8 @@
                 continue;
             }
             /* controller found and initialized */
-            printk("Configuring GDT-PCI HA at %d/%d IRQ %u\n",
-                   pcistr[ctr].bus,PCI_SLOT(pcistr[ctr].device_fn),ha->irq);
+            printk("GDT CTR%d: Configuring GDT-PCI HA at %d/%d IRQ %u\n",
+                   ctr,pcistr[ctr].bus,PCI_SLOT(pcistr[ctr].device_fn),ha->irq);
 
 #if LINUX_VERSION_CODE >= 0x010346 
             if (request_irq(ha->irq, gdth_interrupt,
@@ -4703,9 +4741,7 @@
     del_timer(&gdth_timer);
 #endif
 #if LINUX_VERSION_CODE >= 0x020100
-#if LINUX_VERSION_CODE < 0x020322
     unregister_reboot_notifier(&gdth_notifier);
-#endif
     return NOTIFY_OK;
 #endif
 }
diff -Nru a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h
--- a/drivers/scsi/gdth.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/gdth.h	Wed Jan  8 20:04:43 2003
@@ -2,15 +2,15 @@
 #define _GDTH_H
 
 /*
- * Header file for the GDT ISA/EISA/PCI Disk Array Controller driver for Linux
+ * Header file for the GDT Disk Array/Storage RAID controllers driver for Linux
  * 
- * gdth.h Copyright (C) 1995-01 ICP vortex Computersysteme GmbH, Achim Leubner
+ * gdth.h Copyright (C) 1995-02 ICP vortex, an Intel company, Achim Leubner
  * See gdth.c for further informations and 
  * below for supported controller types
  *
- * <achim@vortex.de>
+ * <achim.leubner@intel.com>
  *
- * $Id: gdth.h,v 1.44 2001/08/21 11:19:05 achim Exp $
+ * $Id: gdth.h,v 1.46 2002/02/05 09:39:53 achim Exp $
  */
 
 #include <linux/version.h>
@@ -29,9 +29,9 @@
 /* defines, macros */
 
 /* driver version */
-#define GDTH_VERSION_STR        "2.03"
+#define GDTH_VERSION_STR        "2.05"
 #define GDTH_VERSION            2
-#define GDTH_SUBVERSION         3
+#define GDTH_SUBVERSION         5
 
 /* protocol version */
 #define PROTOCOL_VERSION        1
@@ -265,6 +265,7 @@
 #define S_CACHE_UNKNOWN 12                      /* cache serv.: drive unknown */
 #define S_RAW_SCSI      12                      /* raw serv.: target error */
 #define S_RAW_ILL       0xff                    /* raw serv.: illegal */
+#define S_CACHE_RESERV	-24			/* cache: reserv. conflict */	
 
 /* timeout values */
 #define INIT_RETRIES    100000                  /* 100000 * 1ms = 100s */
diff -Nru a/drivers/scsi/i91uscsi.c b/drivers/scsi/i91uscsi.c
--- a/drivers/scsi/i91uscsi.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/i91uscsi.c	Wed Jan  8 20:04:43 2003
@@ -79,15 +79,6 @@
 #define DEBUG_STATE     0
 #define INT_DISC	0
 
-
-#ifndef CVT_LINUX_VERSION
-#define	CVT_LINUX_VERSION(V,P,S)	(V * 65536 + P * 256 + S)
-#endif
-
-#ifndef LINUX_VERSION_CODE
-#include <linux/version.h>
-#endif
-
 #include <linux/jiffies.h>
 #include <linux/delay.h>
 #include <linux/blk.h>
@@ -221,11 +212,7 @@
 {				/* Pause for amount jiffies */
 	unsigned long the_time = jiffies + amount;
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	while (time_before_eq(jiffies, the_time));
-#else
-	while (jiffies < the_time);
-#endif
 }
 
 /*-- forward reference --*/
@@ -596,9 +583,7 @@
 
 	pCurHcb->HCS_NumScbs = tul_num_scb;
 	pCurHcb->HCS_Semaph = 1;
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	pCurHcb->HCS_SemaphLock = SPIN_LOCK_UNLOCKED;
-#endif
 	pCurHcb->HCS_JSStatus0 = 0;
 	pCurHcb->HCS_Scb = scbp;
 	pCurHcb->HCS_NxtPend = scbp;
@@ -613,9 +598,7 @@
 	pCurHcb->HCS_ScbEnd = pTmpScb;
 	pCurHcb->HCS_FirstAvail = scbp;
 	pCurHcb->HCS_LastAvail = pPrevScb;
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	pCurHcb->HCS_AvailLock = SPIN_LOCK_UNLOCKED;
-#endif
 	pCurHcb->HCS_FirstPend = NULL;
 	pCurHcb->HCS_LastPend = NULL;
 	pCurHcb->HCS_FirstBusy = NULL;
@@ -713,12 +696,7 @@
 {
 	SCB *pTmpScb;
 	ULONG flags;
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_lock_irqsave(&(hcsp->HCS_AvailLock), flags);
-#else
-	save_flags(flags);
-	cli();
-#endif
 	if ((pTmpScb = hcsp->HCS_FirstAvail) != NULL) {
 #if DEBUG_QUEUE
 		printk("find scb at %08lx\n", (ULONG) pTmpScb);
@@ -728,11 +706,7 @@
 		pTmpScb->SCB_NxtScb = NULL;
 		pTmpScb->SCB_Status = SCB_RENT;
 	}
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_unlock_irqrestore(&(hcsp->HCS_AvailLock), flags);
-#else
-	restore_flags(flags);
-#endif
 	return (pTmpScb);
 }
 
@@ -744,12 +718,7 @@
 #if DEBUG_QUEUE
 	printk("Release SCB %lx; ", (ULONG) scbp);
 #endif
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_lock_irqsave(&(hcsp->HCS_AvailLock), flags);
-#else
-	save_flags(flags);
-	cli();
-#endif
 	scbp->SCB_Srb = 0;
 	scbp->SCB_Status = 0;
 	scbp->SCB_NxtScb = NULL;
@@ -760,11 +729,7 @@
 		hcsp->HCS_FirstAvail = scbp;
 		hcsp->HCS_LastAvail = scbp;
 	}
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_unlock_irqrestore(&(hcsp->HCS_AvailLock), flags);
-#else
-	restore_flags(flags);
-#endif
 }
 
 /***************************************************************************/
@@ -1017,35 +982,22 @@
 	ULONG flags;
 	SCB *pTmpScb, *pPrevScb;
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	save_flags(flags);
-	cli();
-#endif
 
 	if ((pCurHcb->HCS_Semaph == 0) && (pCurHcb->HCS_ActScb == NULL)) {
 		TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x1F);
 		/* disable Jasmin SCSI Int        */
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
                 spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 		tulip_main(pCurHcb);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         	spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 		pCurHcb->HCS_Semaph = 1;
 		TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x0F);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 		spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-		restore_flags(flags);
-#endif
 
 		return SCSI_ABORT_SNOOZE;
 	}
@@ -1054,11 +1006,7 @@
 		/* 07/27/98 */
 		if (pTmpScb->SCB_Srb == (unsigned char *) srbp) {
 			if (pTmpScb == pCurHcb->HCS_ActScb) {
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 				spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-				restore_flags(flags);
-#endif
 				return SCSI_ABORT_BUSY;
 			} else if (pTmpScb == pCurHcb->HCS_FirstPend) {
 				if ((pCurHcb->HCS_FirstPend = pTmpScb->SCB_NxtScb) == NULL)
@@ -1072,11 +1020,7 @@
 			pTmpScb->SCB_Flags |= SCF_DONE;
 			if (pTmpScb->SCB_Flags & SCF_POST)
 				(*pTmpScb->SCB_Post) ((BYTE *) pCurHcb, (BYTE *) pTmpScb);
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 			spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-			restore_flags(flags);
-#endif
 			return SCSI_ABORT_SUCCESS;
 		}
 		pPrevScb = pTmpScb;
@@ -1089,18 +1033,10 @@
 		if (pTmpScb->SCB_Srb == (unsigned char *) srbp) {
 
 			if (pTmpScb == pCurHcb->HCS_ActScb) {
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 				spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-				restore_flags(flags);
-#endif
 				return SCSI_ABORT_BUSY;
 			} else if (pTmpScb->SCB_TagMsg == 0) {
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 				spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-				restore_flags(flags);
-#endif
 				return SCSI_ABORT_BUSY;
 			} else {
 				pCurHcb->HCS_ActTags[pTmpScb->SCB_Target]--;
@@ -1119,22 +1055,14 @@
 				pTmpScb->SCB_Flags |= SCF_DONE;
 				if (pTmpScb->SCB_Flags & SCF_POST)
 					(*pTmpScb->SCB_Post) ((BYTE *) pCurHcb, (BYTE *) pTmpScb);
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 				spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-				restore_flags(flags);
-#endif
 				return SCSI_ABORT_SUCCESS;
 			}
 		}
 		pPrevScb = pTmpScb;
 		pTmpScb = pTmpScb->SCB_NxtScb;
 	}
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	restore_flags(flags);
-#endif
 	return (SCSI_ABORT_NOT_RUNNING);
 }
 
@@ -1163,12 +1091,7 @@
 {
 	ULONG flags;
 	SCB *pScb;
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	save_flags(flags);
-	cli();
-#endif
 
 	if (ResetFlags & SCSI_RESET_ASYNCHRONOUS) {
 
@@ -1176,24 +1099,16 @@
 			TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x1F);
 			/* disable Jasmin SCSI Int        */
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         		spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 			tulip_main(pCurHcb);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         		spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 			pCurHcb->HCS_Semaph = 1;
 			TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x0F);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 			spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-			restore_flags(flags);
-#endif
 
 			return SCSI_RESET_SNOOZE;
 		}
@@ -1206,20 +1121,12 @@
 		if (pScb == NULL) {
 			printk("Unable to Reset - No SCB Found\n");
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 			spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-			restore_flags(flags);
-#endif
 			return SCSI_RESET_NOT_RUNNING;
 		}
 	}
 	if ((pScb = tul_alloc_scb(pCurHcb)) == NULL) {
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 		spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-		restore_flags(flags);
-#endif
 		return SCSI_RESET_NOT_RUNNING;
 	}
 	pScb->SCB_Opcode = BusDevRst;
@@ -1238,24 +1145,16 @@
 		/* disable Jasmin SCSI Int        */
 		pCurHcb->HCS_Semaph = 0;
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         	spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 		tulip_main(pCurHcb);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
                 spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 		pCurHcb->HCS_Semaph = 1;
 		TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x0F);
 	}
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	restore_flags(flags);
-#endif
 	return SCSI_RESET_PENDING;
 }
 
@@ -1263,50 +1162,28 @@
 {
 	ULONG flags;
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	save_flags(flags);
-	cli();
-#endif
 	TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x1F);
 	pCurHcb->HCS_Semaph = 0;
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	restore_flags(flags);
-#endif
 
 	tul_stop_bm(pCurHcb);
 
 	tul_reset_scsi(pCurHcb, 2);	/* 7/29/98 */
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	save_flags(flags);
-	cli();
-#endif
 	tul_post_scsi_rst(pCurHcb);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 	tulip_main(pCurHcb);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 	pCurHcb->HCS_Semaph = 1;
 	TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x0F);
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	restore_flags(flags);
-#endif
 	return (SCSI_RESET_SUCCESS | SCSI_RESET_HOST_RESET);
 }
 
@@ -1320,12 +1197,7 @@
 	pCurScb->SCB_SGIdx = 0;
 	pCurScb->SCB_SGMax = pCurScb->SCB_SGLen;
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	save_flags(flags);
-	cli();
-#endif
 
 	tul_append_pend_scb(pCurHcb, pCurScb);	/* Append this SCB to Pending queue */
 
@@ -1335,24 +1207,16 @@
 		/* disable Jasmin SCSI Int        */
 		pCurHcb->HCS_Semaph = 0;
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         	spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 		tulip_main(pCurHcb);
 
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
         	spin_lock_irqsave(&(pCurHcb->HCS_SemaphLock), flags);
-#endif
 
 		pCurHcb->HCS_Semaph = 1;
 		TUL_WR(pCurHcb->HCS_Base + TUL_Mask, 0x0F);
 	}
-#if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
 	spin_unlock_irqrestore(&(pCurHcb->HCS_SemaphLock), flags);
-#else
-	restore_flags(flags);
-#endif
 	return;
 }
 
diff -Nru a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
--- a/drivers/scsi/ide-scsi.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/ide-scsi.c	Wed Jan  8 20:04:44 2003
@@ -289,6 +289,7 @@
 	pc->timeout = jiffies + WAIT_READY;
 	/* NOTE! Save the failed packet command in "rq->buffer" */
 	rq->buffer = (void *) failed_command->special;
+	pc->scsi_cmd = ((idescsi_pc_t *) failed_command->special)->scsi_cmd;
 	if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
 		printk ("ide-scsi: %s: queue cmd = ", drive->name);
 		hexdump(pc->c, 6);
@@ -590,6 +591,7 @@
 	set_bit(IDESCSI_LOG_CMD, &scsi->log);
 #endif /* IDESCSI_DEBUG_LOG */
 	idescsi_add_settings(drive);
+	DRIVER(drive)->busy--;
 }
 
 static int idescsi_cleanup (ide_drive_t *drive)
@@ -876,7 +878,8 @@
 			/* is cmd active?
 			 *  need to lock so this stuff doesn't change under us */
 			spin_lock_irqsave(&ide_lock, flags);
-			if (scsi->pc && scsi->pc->scsi_cmd->serial_number == cmd->serial_number) {
+			if (scsi->pc && scsi->pc->scsi_cmd && 
+					scsi->pc->scsi_cmd->serial_number == cmd->serial_number) {
 				/* yep - let's give it some more time - 
 				 * we can do that, we're in _our_ error kernel thread */
 				spin_unlock_irqrestore(&ide_lock, flags);
@@ -995,7 +998,7 @@
 	for (id = 0; id < MAX_HWIFS * MAX_DRIVES; id++) {
 		drive = idescsi_drives[id];
 		if (drive)
-			DRIVER(drive)->busy--;
+			DRIVER(drive)->busy = 0;
 	}
 	scsi_unregister   (idescsi_host);
 	device_unregister(&idescsi_primary);
diff -Nru a/drivers/scsi/ips.c b/drivers/scsi/ips.c
--- a/drivers/scsi/ips.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/scsi/ips.c	Wed Jan  8 20:04:32 2003
@@ -178,12 +178,8 @@
 #include <linux/stat.h>
 #include <linux/config.h>
 
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
-  #include <linux/spinlock.h>
-  #include <linux/init.h>
-#else
-  #include <asm/spinlock.h>
-#endif
+#include <linux/spinlock.h>
+#include <linux/init.h>
 
 #include <linux/smp.h>
 
@@ -199,45 +195,10 @@
 #define IPS_VERSION_HIGH        "5.10"
 #define IPS_VERSION_LOW         ".13-BETA "
 
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
-struct proc_dir_entry proc_scsi_ips = {
-   0,
-   3, "ips",
-   S_IFDIR | S_IRUGO | S_IXUGO, 2
-};
-#endif
-
 #if !defined(__i386__) && !defined(__ia64__)
    #error "This driver has only been tested on the x86/ia64 platforms"
 #endif
 
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,0)
-   #error "This driver only works with kernel 2.2.0 and later"
-#elif LINUX_VERSION_CODE <= LinuxVersionCode(2,3,18)
-    #define dma_addr_t uint32_t
-    
-    static inline void *pci_alloc_consistent(struct pci_dev *dev,int size,
-                                             dma_addr_t *dmahandle) {
-       void * ptr = kmalloc(size, GFP_ATOMIC); 
-       if(ptr){     
-          *dmahandle = (uint32_t)virt_to_bus(ptr);
-       }
-       return ptr;
-    }
-    
-    #define pci_free_consistent(a,size,address,dmahandle) kfree(address)
-    
-    #define pci_map_sg(a,b,n,z)       (n)
-    #define pci_unmap_sg(a,b,c,d)     
-    #define pci_map_single(a,b,c,d)   ((uint32_t)virt_to_bus(b))
-    #define pci_unmap_single(a,b,c,d) 
-    #ifndef sg_dma_address
-      #define sg_dma_address(x)         ((uint32_t)virt_to_bus((x)->address))
-      #define sg_dma_len(x)             ((x)->length)
-    #endif
-    #define pci_unregister_driver(x)
-#endif
-
 #if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0)
     #define IPS_SG_ADDRESS(sg)       ((sg)->address)
     #define IPS_LOCK_SAVE(lock,flags) spin_lock_irqsave(&io_request_lock,flags)
@@ -289,7 +250,6 @@
 IPS_DEFINE_COMPAT_TABLE( Compatable );               /* Version Compatability Table      */
 
 
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
    /* This table describes any / all ServeRAID Adapters */
    static struct  pci_device_id  ips_pci_table[]  __devinitdata = {
            { 0x1014, 0x002E, PCI_ANY_ID, PCI_ANY_ID, 0, 0 },
@@ -338,7 +298,6 @@
        .remove		= __devexit_p(ips_remove_device),
    };
 
-#endif
 
 /*
  * Necessary forward function protoypes
@@ -497,6 +456,7 @@
 static void ips_free(ips_ha_t *);
 static void ips_init_scb(ips_ha_t *, ips_scb_t *);
 static void ips_freescb(ips_ha_t *, ips_scb_t *);
+static void ips_setup_funclist(ips_ha_t *);
 static void ips_statinit(ips_ha_t *);
 static void ips_statinit_memio(ips_ha_t *);
 static void ips_fix_ffdc_time(ips_ha_t *, ips_scb_t *, time_t);
@@ -533,9 +493,7 @@
 static int ips_abort_init(ips_ha_t *ha, struct Scsi_Host *sh, int index);
 static int ips_init_phase2( int index );
 
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
 static int ips_init_phase1( struct pci_dev *pci_dev, int *indexPtr );
-#endif
 
 /*--------------------------------------------------------------------------*/
 /* Exported Functions                                                       */
@@ -550,13 +508,8 @@
 /*   setup parameters to the driver                                         */
 /*                                                                          */
 /****************************************************************************/
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
 static int
 ips_setup(char *ips_str) {
-#else
-void
-ips_setup(char *ips_str, int *dummy) {
-#endif
 
    int        i;
    char      *key;
@@ -570,7 +523,6 @@
    };
     
    /* Don't use strtok() anymore ( if 2.4 Kernel or beyond ) */
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
    /* Search for value */
    while ((key = strsep(&ips_str, ",."))) {
       if (!*key)
@@ -598,43 +550,6 @@
 
 __setup("ips=", ips_setup);
 
-#else
-
-  char      *p;
-   char       tokens[3] = {',', '.', 0};
-
-   for (key = strtok(ips_str, tokens); key; key = strtok(NULL, tokens)) {
-      p = key;
-
-      /* Search for value */
-      while ((p) && (*p != ':'))
-         p++;
-
-      if (p) {
-         *p = '\0';
-         value = p+1;
-      } else
-         value = NULL;
-
-      /*
-       * We now have key/value pairs.
-       * Update the variables
-       */
-      for (i = 0; i < (sizeof(options) / sizeof(options[0])); i++) {
-         if (strnicmp(key, options[i].option_name, strlen(ips_str)) == 0) {
-            if (value)
-               *options[i].option_flag = simple_strtoul(value, NULL, 0);
-            else
-               *options[i].option_flag = options[i].option_value;
-
-            break;
-         }
-      }
-   }
-}
-
-#endif
-
 /****************************************************************************/
 /*                                                                          */
 /* Routine Name: ips_detect                                                 */
@@ -648,42 +563,12 @@
 /****************************************************************************/
 int
 ips_detect(Scsi_Host_Template *SHT) {
-   struct Scsi_Host *sh;
-   ips_ha_t         *ha;
-   uint32_t          io_addr;
-   uint32_t          mem_addr;
-   uint32_t          io_len;
-   uint32_t          mem_len;
-   uint16_t          planer;
-   uint8_t           revision_id;
-   uint8_t           bus;
-   uint8_t           func;
-   uint8_t           irq;
-   uint16_t          deviceID[2];
-   uint16_t          subdevice_id;
-   int               i;
-   int               j;
-   uint32_t          count;
-   char             *ioremap_ptr;
-   char             *mem_ptr;
-   struct pci_dev   *dev[2];
-   struct pci_dev   *morpheus = NULL;
-   struct pci_dev   *trombone = NULL;
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
-   uint32_t          currbar;
-   uint32_t          maskbar;
-   uint8_t           barnum;
-#endif
 
    METHOD_TRACE("ips_detect", 1);
 
 #ifdef MODULE
    if (ips)
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
       ips_setup(ips);
-#else
-      ips_setup(ips, NULL);
-#endif
 #endif
 
    /* If Booting from the ServeRAID Manager CD, Allocate a large Flash  */
@@ -697,69 +582,8 @@
    }                                                                               
 
    SHT->proc_info = ips_proc_info;
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
-   SHT->proc_dir = &proc_scsi_ips;
-#else
    SHT->proc_name = "ips";
-#endif
-
-#if defined(CONFIG_PCI)
-
-   /* initalize number of controllers */
-   ips_num_controllers = 0;
-   ips_next_controller = 0;
-   ips_released_controllers = 0;
 
-   if (!pci_present())
-      return (0);
-
-   morpheus = pci_find_device(IPS_VENDORID, IPS_DEVICEID_MORPHEUS, morpheus);
-   trombone = pci_find_device(IPS_VENDORID, IPS_DEVICEID_COPPERHEAD, trombone);
-
-   /* determine which controller to probe first */
-   if (!morpheus) {
-      /* we only have trombone */
-      dev[0] = trombone;
-      dev[1] = NULL;
-      deviceID[0] = IPS_DEVICEID_COPPERHEAD;
-   } else if (!trombone) {
-      /* we only have morpheus */
-      dev[0] = morpheus;
-      dev[1] = NULL;
-      deviceID[0] = IPS_DEVICEID_MORPHEUS;
-   } else {
-      /* we have both in the system */
-      if (trombone->bus->number < morpheus->bus->number) {
-         dev[0] = trombone;
-         dev[1] = morpheus;
-         deviceID[0] = IPS_DEVICEID_COPPERHEAD;
-         deviceID[1] = IPS_DEVICEID_MORPHEUS;
-      } else if (trombone->bus->number > morpheus->bus->number) {
-         dev[0] = morpheus;
-         dev[1] = trombone;
-         deviceID[0] = IPS_DEVICEID_MORPHEUS;
-         deviceID[1] = IPS_DEVICEID_COPPERHEAD;
-      } else {
-         /* further detection required */
-         if (trombone->devfn < morpheus->devfn) {
-            dev[0] = trombone;
-            dev[1] = morpheus;
-            deviceID[0] = IPS_DEVICEID_COPPERHEAD;
-            deviceID[1] = IPS_DEVICEID_MORPHEUS;
-         } else {
-            dev[0] = morpheus;
-            dev[1] = trombone;
-            deviceID[0] = IPS_DEVICEID_MORPHEUS;
-            deviceID[1] = IPS_DEVICEID_COPPERHEAD;
-         }
-      }
-   }
-
-/**********************************************************************************/
-/* For Kernel Versions 2.4 or greater, use new PCI ( Hot Pluggable ) architecture */
-/**********************************************************************************/
-
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
  #if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0)
    spin_unlock_irq(&io_request_lock);
  #endif
@@ -779,485 +603,64 @@
       register_reboot_notifier(&ips_notifier);
 
    return (ips_num_controllers);
-#endif
-
-   /* Now scan the controllers */
-   for (i = 0; i < 2; i++) {
-      if (!dev[i])
-         break;
-
-      do {
-         if (ips_next_controller >= IPS_MAX_ADAPTERS)
-            break;
-
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
-         if (pci_enable_device(dev[i]))
-            break;
-#endif
-
-         /* stuff that we get in dev */
-         irq = dev[i]->irq;
-         bus = dev[i]->bus->number;
-         func = dev[i]->devfn;
-
-         /* Init MEM/IO addresses to 0 */
-         mem_addr = 0;
-         io_addr = 0;
-         mem_len = 0;
-         io_len = 0;
-
-         for (j = 0; j < 2; j++) {
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
-            if (!pci_resource_start(dev[i], j))
-               break;
-
-            if (pci_resource_flags(dev[i], j) & IORESOURCE_IO) {
-               io_addr = pci_resource_start(dev[i], j);
-               io_len = pci_resource_len(dev[i], j);
-            } else {
-               mem_addr = pci_resource_start(dev[i], j);
-               mem_len = pci_resource_len(dev[i], j);
-            }
-#else
-            if (!dev[i]->base_address[j])
-               break;
-
-            if ((dev[i]->base_address[j] & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) {
-               barnum = PCI_BASE_ADDRESS_0 + (j * 4);
-               io_addr = dev[i]->base_address[j] & PCI_BASE_ADDRESS_IO_MASK;
-
-               /* Get Size */
-               pci_read_config_dword(dev[i], barnum, &currbar);
-               pci_write_config_dword(dev[i], barnum, ~0);
-               pci_read_config_dword(dev[i], barnum, &maskbar);
-               pci_write_config_dword(dev[i], barnum, currbar);
-
-               io_len = ~(maskbar & PCI_BASE_ADDRESS_IO_MASK) + 1;
-            } else {
-               barnum = PCI_BASE_ADDRESS_0 + (j * 4);
-               mem_addr = dev[i]->base_address[j] & PCI_BASE_ADDRESS_MEM_MASK;
-
-               /* Get Size */
-               pci_read_config_dword(dev[i], barnum, &currbar);
-               pci_write_config_dword(dev[i], barnum, ~0);
-               pci_read_config_dword(dev[i], barnum, &maskbar);
-               pci_write_config_dword(dev[i], barnum, currbar);
-
-               mem_len = ~(maskbar & PCI_BASE_ADDRESS_MEM_MASK) + 1;
-            }
-#endif
-         }
-
-         /* setup memory mapped area (if applicable) */
-         if (mem_addr) {
-            uint32_t base;
-            uint32_t offs;
-
-            DEBUG_VAR(1, "(%s%d) detect, Memory region %x, size: %d",
-                      ips_name, ips_next_controller, mem_addr, mem_len);
-
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
-            if (!request_mem_region(mem_addr, mem_len, "ips")) {
-               /* Couldn't allocate io space */
-               printk(KERN_WARNING "(%s%d) couldn't allocate IO space %x len %d.\n",
-                      ips_name, ips_next_controller, io_addr, io_len);
-
-               ips_next_controller++;
-
-               continue;
-            }
-
-#endif
-
-            base = mem_addr & PAGE_MASK;
-            offs = mem_addr - base;
-
-            ioremap_ptr = ioremap(base, PAGE_SIZE);
-            mem_ptr = ioremap_ptr + offs;
-         } else {
-            ioremap_ptr = NULL;
-            mem_ptr = NULL;
-         }
-
-         /* setup I/O mapped area (if applicable) */
-         if (io_addr) {
-            DEBUG_VAR(1, "(%s%d) detect, IO region %x, size: %d",
-                      ips_name, ips_next_controller, io_addr, io_len);
-
-            if (!request_region(io_addr, io_len, "ips")) {
-               /* Couldn't allocate io space */
-               printk(KERN_WARNING "(%s%d) couldn't allocate IO space %x len %d.\n",
-                      ips_name, ips_next_controller, io_addr, io_len);
-
-               ips_next_controller++;
-
-               continue;
-            }
-         }
-
-         /* get planer status */
-         if (pci_read_config_word(dev[i], 0x04, &planer)) {
-            printk(KERN_WARNING "(%s%d) can't get planer status.\n",
-                   ips_name, ips_next_controller);
-
-            ips_next_controller++;
-
-            continue;
-         }
-
-         /* check to see if an onboard planer controller is disabled */
-         if (!(planer & 0x000C)) {
-
-            DEBUG_VAR(1, "(%s%d) detect, Onboard ServeRAID disabled by BIOS",
-                      ips_name, ips_next_controller);
-
-            ips_next_controller++;
-
-            continue;
-         }
-
-         DEBUG_VAR(1, "(%s%d) detect bus %d, func %x, irq %d, io %x, mem: %x, ptr: %p",
-                   ips_name, ips_next_controller, bus, func, irq, io_addr, mem_addr, mem_ptr);
-
-         /* get the revision ID */
-         if (pci_read_config_byte(dev[i], PCI_REVISION_ID, &revision_id)) {
-            printk(KERN_WARNING "(%s%d) can't get revision id.\n",
-                   ips_name, ips_next_controller);
-
-            ips_next_controller++;
-
-            continue;
-         }
-
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
-         /* get the subdevice id */
-         if (pci_read_config_word(dev[i], PCI_SUBSYSTEM_ID, &subdevice_id)) {
-            printk(KERN_WARNING "(%s%d) can't get subdevice id.\n",
-                   ips_name, ips_next_controller);
-
-            ips_next_controller++;
-
-            continue;
-         }
-#else
-         subdevice_id = dev[i]->subsystem_device;
-#endif
-
-         /* found a controller */
-         sh = scsi_register(SHT, sizeof(ips_ha_t));
-
-         if (sh == NULL) {
-            printk(KERN_WARNING "(%s%d) Unable to register controller with SCSI subsystem - skipping controller\n",
-                   ips_name, ips_next_controller);
-
-            ips_next_controller++;
-
-            continue;
-         }
-
-         ha = IPS_HA(sh);
-         memset(ha, 0, sizeof(ips_ha_t));
-
-         ips_sh[ips_next_controller] = sh;
-         ips_ha[ips_next_controller] = ha;
-         ips_num_controllers++;
-         ha->active = 1;
-
-         ha->enq = kmalloc(sizeof(IPS_ENQ), GFP_KERNEL);
-
-         if (!ha->enq) {
-            printk(KERN_WARNING "(%s%d) Unable to allocate host inquiry structure - skipping contoller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            ips_next_controller++;
-            ips_num_controllers--;
-
-            continue;
-         }
-
-         ha->adapt = kmalloc(sizeof(IPS_ADAPTER), GFP_KERNEL);
-
-         if (!ha->adapt) {
-            printk(KERN_WARNING "(%s%d) Unable to allocate host adapt structure - skipping controller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            ips_next_controller++;
-            ips_num_controllers--;
-
-            continue;
-         }
-
-         ha->conf = kmalloc(sizeof(IPS_CONF), GFP_KERNEL);
-
-         if (!ha->conf) {
-            printk(KERN_WARNING "(%s%d) Unable to allocate host conf structure - skipping controller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            ips_next_controller++;
-            ips_num_controllers--;
-
-            continue;
-         }
-
-         ha->nvram = kmalloc(sizeof(IPS_NVRAM_P5), GFP_KERNEL);
-
-         if (!ha->nvram) {
-            printk(KERN_WARNING "(%s%d) Unable to allocate host nvram structure - skipping controller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            ips_next_controller++;
-            ips_num_controllers--;
-
-            continue;
-         }
-
-         ha->subsys = kmalloc(sizeof(IPS_SUBSYS), GFP_KERNEL);
-
-         if (!ha->subsys) {
-            printk(KERN_WARNING "(%s%d) Unable to allocate host subsystem structure - skipping controller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            ips_next_controller++;
-            ips_num_controllers--;
-
-            continue;
-         }
-
-         ha->dummy = kmalloc(sizeof(IPS_IO_CMD), GFP_KERNEL);
-
-         if (!ha->dummy) {
-            printk(KERN_WARNING "(%s%d) Unable to allocate host dummy structure - skipping controller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            ips_next_controller++;
-            ips_num_controllers--;
-
-            continue;
-         }
-
-         for (count = PAGE_SIZE, ha->ioctl_order = 0;
-              count < ips_ioctlsize;
-              ha->ioctl_order++, count <<= 1);
-
-         ha->ioctl_data = (char *) __get_free_pages(GFP_KERNEL, ha->ioctl_order);
-         ha->ioctl_datasize = count;
-
-         if (!ha->ioctl_data) {
-            printk(KERN_WARNING "(%s%d) Unable to allocate ioctl data\n",
-                   ips_name, ips_next_controller);
-
-            ha->ioctl_data = NULL;
-            ha->ioctl_order = 0;
-            ha->ioctl_datasize = 0;
-         }
-
-         /* Store away needed values for later use */
-         sh->io_port = io_addr;
-         sh->n_io_port = io_addr ? 255 : 0;
-         sh->unique_id = (io_addr) ? io_addr : mem_addr;
-         sh->irq = irq;
-         //sh->select_queue_depths = ips_select_queue_depth;
-         sh->sg_tablesize = sh->hostt->sg_tablesize;
-         sh->can_queue = sh->hostt->can_queue;
-         sh->cmd_per_lun = sh->hostt->cmd_per_lun;
-         sh->unchecked_isa_dma = sh->hostt->unchecked_isa_dma;
-         sh->use_clustering = sh->hostt->use_clustering;
-
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,7)
-         sh->max_sectors = 128;
-#endif                      
-
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
-         sh->wish_block = FALSE;
-#endif
-
-         /* Store info in HA structure */
-         ha->irq = irq;
-         ha->io_addr = io_addr;
-         ha->io_len = io_len;
-         ha->mem_addr = mem_addr;
-         ha->mem_len = mem_len;
-         ha->mem_ptr = mem_ptr;
-         ha->ioremap_ptr = ioremap_ptr;
-         ha->host_num = ips_next_controller;
-         ha->revision_id = revision_id;
-         ha->slot_num = PCI_SLOT(dev[i]->devfn);
-         ha->device_id = deviceID[i];
-         ha->subdevice_id = subdevice_id;
-         ha->pcidev = dev[i];
-
-         /*
-          * Setup Functions
-          */
-         if (IPS_IS_MORPHEUS(ha)) {
-            /* morpheus */
-            ha->func.isintr = ips_isintr_morpheus;
-            ha->func.isinit = ips_isinit_morpheus;
-            ha->func.issue = ips_issue_i2o_memio;
-            ha->func.init = ips_init_morpheus;
-            ha->func.statupd = ips_statupd_morpheus;
-            ha->func.reset = ips_reset_morpheus;
-            ha->func.intr = ips_intr_morpheus;
-            ha->func.enableint = ips_enable_int_morpheus;
-         } else if (IPS_USE_MEMIO(ha)) {
-            /* copperhead w/MEMIO */
-            ha->func.isintr = ips_isintr_copperhead_memio;
-            ha->func.isinit = ips_isinit_copperhead_memio;
-            ha->func.init = ips_init_copperhead_memio;
-            ha->func.statupd = ips_statupd_copperhead_memio;
-            ha->func.statinit = ips_statinit_memio;
-            ha->func.reset = ips_reset_copperhead_memio;
-            ha->func.intr = ips_intr_copperhead;
-            ha->func.erasebios = ips_erase_bios_memio;
-            ha->func.programbios = ips_program_bios_memio;
-            ha->func.verifybios = ips_verify_bios_memio;
-            ha->func.enableint = ips_enable_int_copperhead_memio;
-
-            if (IPS_USE_I2O_DELIVER(ha))
-               ha->func.issue = ips_issue_i2o_memio;
-            else
-               ha->func.issue = ips_issue_copperhead_memio;
-         } else {
-            /* copperhead */
-            ha->func.isintr = ips_isintr_copperhead;
-            ha->func.isinit = ips_isinit_copperhead;
-            ha->func.init = ips_init_copperhead;
-            ha->func.statupd = ips_statupd_copperhead;
-            ha->func.statinit = ips_statinit;
-            ha->func.reset = ips_reset_copperhead;
-            ha->func.intr = ips_intr_copperhead;
-            ha->func.erasebios = ips_erase_bios;
-            ha->func.programbios = ips_program_bios;
-            ha->func.verifybios = ips_verify_bios;
-            ha->func.enableint = ips_enable_int_copperhead;
-
-            if (IPS_USE_I2O_DELIVER(ha))
-               ha->func.issue = ips_issue_i2o;
-            else
-               ha->func.issue = ips_issue_copperhead;
-         }
-
-         /*
-          * Initialize the card if it isn't already
-          */
-
-         if (!(*ha->func.isinit)(ha)) {
-            if (!(*ha->func.init)(ha)) {
-               /*
-                * Initialization failed
-                */
-               printk(KERN_WARNING "(%s%d) unable to initialize controller - skipping controller\n",
-                      ips_name, ips_next_controller);
-
-               ha->active = 0;
-               ips_free(ha);
-               scsi_unregister(sh);
-               ips_ha[ips_next_controller] = 0;
-               ips_sh[ips_next_controller] = 0;
-               ips_next_controller++;
-               ips_num_controllers--;
-
-               continue;
-            }
-         }
-
-         /* install the interrupt handler */
-         if (request_irq(irq, do_ipsintr, SA_SHIRQ, ips_name, ha)) {
-            printk(KERN_WARNING "(%s%d) unable to install interrupt handler - skipping controller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            ips_next_controller++;
-            ips_num_controllers--;
-
-            continue;
-         }
-
-         /*
-          * Allocate a temporary SCB for initialization
-          */
-         ha->max_cmds = 1;
-         if (!ips_allocatescbs(ha)) {
-            /* couldn't allocate a temp SCB */
-            printk(KERN_WARNING "(%s%d) unable to allocate CCBs - skipping contoller\n",
-                   ips_name, ips_next_controller);
-
-            ha->active = 0;
-            ips_free(ha);
-            scsi_unregister(sh);
-            ips_ha[ips_next_controller] = 0;
-            ips_sh[ips_next_controller] = 0;
-            free_irq(ha->irq, ha);
-            ips_next_controller++;
-            ips_num_controllers--;
+}
 
-            continue;
-         }
 
-         ips_next_controller++;
-      } while ((dev[i] = pci_find_device(IPS_VENDORID, deviceID[i], dev[i])));
-   }
+/****************************************************************************/
+/*   configure the function pointers to use the functions that will work    */
+/*   with the found version of the adapter                                  */
+/****************************************************************************/
+static void ips_setup_funclist(ips_ha_t *ha){
 
-   /*
-    * Do Phase 2 Initialization
-    * Controller init
+   /*                                
+    * Setup Functions
     */
-   for (i = 0; i < ips_next_controller; i++) {
-
-      if (ips_ha[i] == 0) {
-         printk(KERN_WARNING "(%s%d) ignoring bad controller\n", ips_name, i);
-         continue;
-      }
-
-      if (ips_init_phase2(i) != SUCCESS)
-         ips_num_controllers--;
+   if (IPS_IS_MORPHEUS(ha)) {
+      /* morpheus / marco / sebring */
+      ha->func.isintr = ips_isintr_morpheus;
+      ha->func.isinit = ips_isinit_morpheus;
+      ha->func.issue = ips_issue_i2o_memio;
+      ha->func.init = ips_init_morpheus;
+      ha->func.statupd = ips_statupd_morpheus;
+      ha->func.reset = ips_reset_morpheus;
+      ha->func.intr = ips_intr_morpheus;
+      ha->func.enableint = ips_enable_int_morpheus;
+   } else if (IPS_USE_MEMIO(ha)) {
+      /* copperhead w/MEMIO */
+      ha->func.isintr = ips_isintr_copperhead_memio;
+      ha->func.isinit = ips_isinit_copperhead_memio;
+      ha->func.init = ips_init_copperhead_memio;
+      ha->func.statupd = ips_statupd_copperhead_memio;
+      ha->func.statinit = ips_statinit_memio;
+      ha->func.reset = ips_reset_copperhead_memio;
+      ha->func.intr = ips_intr_copperhead;
+      ha->func.erasebios = ips_erase_bios_memio;
+      ha->func.programbios = ips_program_bios_memio;
+      ha->func.verifybios = ips_verify_bios_memio;
+      ha->func.enableint = ips_enable_int_copperhead_memio;
+      if (IPS_USE_I2O_DELIVER(ha))
+         ha->func.issue = ips_issue_i2o_memio;
+      else
+         ha->func.issue = ips_issue_copperhead_memio;
+   } else {
+      /* copperhead */
+      ha->func.isintr = ips_isintr_copperhead;
+      ha->func.isinit = ips_isinit_copperhead;
+      ha->func.init = ips_init_copperhead;
+      ha->func.statupd = ips_statupd_copperhead;
+      ha->func.statinit = ips_statinit;
+      ha->func.reset = ips_reset_copperhead;
+      ha->func.intr = ips_intr_copperhead;
+      ha->func.erasebios = ips_erase_bios;
+      ha->func.programbios = ips_program_bios;
+      ha->func.verifybios = ips_verify_bios;
+      ha->func.enableint = ips_enable_int_copperhead;
 
+      if (IPS_USE_I2O_DELIVER(ha))
+         ha->func.issue = ips_issue_i2o;
+      else
+         ha->func.issue = ips_issue_copperhead;
    }
-
-   if (ips_num_controllers > 0)
-      register_reboot_notifier(&ips_notifier);
-
-   return (ips_num_controllers);
-
-#else
-
-   /* No PCI -- No ServeRAID */
-   return (0);
-#endif /* CONFIG_PCI */
 }
 
 /****************************************************************************/
@@ -1282,9 +685,7 @@
    if (i == IPS_MAX_ADAPTERS) {
       printk(KERN_WARNING "(%s) release, invalid Scsi_Host pointer.\n",
             ips_name);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
       BUG();
-#endif
       return (FALSE);
    }
 
@@ -3303,7 +2704,7 @@
 
          sg = SC->request_buffer;
          scb->sg_count = pci_map_sg(ha->pcidev, sg, SC->use_sg,
-                                    IPS_DMA_DIR(scb));
+                                    scsi_to_pci_dma_dir(SC->sc_data_direction));
          scb->flags |= IPS_SCB_MAP_SG;
          if (scb->sg_count == 1) {
             if (sg_dma_len(sg) > ha->max_xfer) {
@@ -3363,7 +2764,8 @@
 
             scb->dcdb.transfer_length = scb->data_len;
             scb->data_busaddr = pci_map_single(ha->pcidev, SC->request_buffer,
-                                               scb->data_len, IPS_DMA_DIR(scb));
+                                               scb->data_len,
+                                               scsi_to_pci_dma_dir(SC->sc_data_direction));
             scb->flags |= IPS_SCB_MAP_SINGLE;
             scb->sg_len = 0;
          } else {
@@ -4957,10 +4359,8 @@
          ha->mem_ptr = NULL;
       }
 
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
       if (ha->mem_addr) 
           release_mem_region(ha->mem_addr, ha->mem_len);
-#endif
       ha->mem_addr = 0;
 
    }
@@ -5489,6 +4889,29 @@
 
    Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0);
 
+   if (Post == 0x4F00) {                          /* If Flashing the Battery PIC         */
+       printk(KERN_WARNING "Flashing Battery PIC, Please wait ...\n" );
+
+       /* Clear the interrupt bit */
+       Isr = (uint32_t) IPS_BIT_I960_MSG0I;
+       writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR);
+
+       for (i = 0; i < 120; i++) {                /*    Wait Up to 2 Min. for Completion */
+          Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0);
+          if (Post != 0x4F00)
+              break;
+          /* Delay for 1 Second */
+          MDELAY(IPS_ONE_SEC);
+       }
+
+       if (i >= 120) {
+          printk(KERN_WARNING "(%s%d) timeout waiting for Battery PIC Flash\n",
+                 ips_name, ha->host_num);
+          return (0);
+       }
+
+   }
+
    /* Clear the interrupt bit */
    Isr = (uint32_t) IPS_BIT_I960_MSG0I;
    writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR);
@@ -6144,8 +5567,7 @@
    if (le32_to_cpu(ha->nvram->signature) != IPS_NVRAM_P5_SIG) {
       DEBUG_VAR(1, "(%s%d) NVRAM page 5 has an invalid signature: %X.",
                 ips_name, ha->host_num, ha->nvram->signature);
-
-      return (1);
+      ha->nvram->signature = IPS_NVRAM_P5_SIG;
    }
 
    DEBUG_VAR(2, "(%s%d) Ad Type: %d, Ad Slot: %d, BIOS: %c%c%c%c %c%c%c%c.",
@@ -7186,10 +6608,8 @@
 
   
 
-#if defined (MODULE) || (LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0))
 static Scsi_Host_Template driver_template = IPS;
 #include "scsi_module.c"
-#endif
 
 static int ips_abort_init(ips_ha_t *ha, struct Scsi_Host *sh, int index){
    ha->active = 0;
@@ -7200,7 +6620,6 @@
    return -1;
 }
 
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0)
 
 /*---------------------------------------------------------------------------*/
 /*   Routine Name: ips_remove_device                                         */
@@ -7285,6 +6704,7 @@
    dma_addr_t        dma_address;
    char             *ioremap_ptr;
    char             *mem_ptr;             
+   uint32_t          IsDead;
 
    METHOD_TRACE("ips_init_phase1", 1);
    index = IPS_MAX_ADAPTERS;
@@ -7382,7 +6802,7 @@
        return ips_abort_init(ha, sh, index);
     }
 
-    ha->adapt = pci_alloc_consistent(ha->pcidev, sizeof(IPS_ADAPTER) +
+    ha->adapt = pci_alloc_consistent(pci_dev, sizeof(IPS_ADAPTER) +
                                      sizeof(IPS_IO_CMD), &dma_address);
     if (!ha->adapt) {
        printk(KERN_WARNING "Unable to allocate host adapt & dummy structures\n");
@@ -7460,54 +6880,15 @@
     /*
      * Setup Functions
      */
-    if (IPS_IS_MORPHEUS(ha)) {
-       /* morpheus */
-       ha->func.isintr = ips_isintr_morpheus;
-       ha->func.isinit = ips_isinit_morpheus;
-       ha->func.issue = ips_issue_i2o_memio;
-       ha->func.init = ips_init_morpheus;
-       ha->func.statupd = ips_statupd_morpheus;
-       ha->func.reset = ips_reset_morpheus;
-       ha->func.intr = ips_intr_morpheus;
-       ha->func.enableint = ips_enable_int_morpheus;
-    } else if (IPS_USE_MEMIO(ha)) {
-       /* copperhead w/MEMIO */
-       ha->func.isintr = ips_isintr_copperhead_memio;
-       ha->func.isinit = ips_isinit_copperhead_memio;
-       ha->func.init = ips_init_copperhead_memio;
-       ha->func.statupd = ips_statupd_copperhead_memio;
-       ha->func.statinit = ips_statinit_memio;
-       ha->func.reset = ips_reset_copperhead_memio;
-       ha->func.intr = ips_intr_copperhead;
-       ha->func.erasebios = ips_erase_bios_memio;
-       ha->func.programbios = ips_program_bios_memio;
-       ha->func.verifybios = ips_verify_bios_memio;
-       ha->func.enableint = ips_enable_int_copperhead_memio;
-
-       if (IPS_USE_I2O_DELIVER(ha))
-          ha->func.issue = ips_issue_i2o_memio;
-       else
-          ha->func.issue = ips_issue_copperhead_memio;
-    } else {
-       /* copperhead */
-       ha->func.isintr = ips_isintr_copperhead;
-       ha->func.isinit = ips_isinit_copperhead;
-       ha->func.init = ips_init_copperhead;
-       ha->func.statupd = ips_statupd_copperhead;
-       ha->func.statinit = ips_statinit;
-       ha->func.reset = ips_reset_copperhead;
-       ha->func.intr = ips_intr_copperhead;
-       ha->func.erasebios = ips_erase_bios;
-       ha->func.programbios = ips_program_bios;
-       ha->func.verifybios = ips_verify_bios;
-       ha->func.enableint = ips_enable_int_copperhead;
-
-       if (IPS_USE_I2O_DELIVER(ha))
-          ha->func.issue = ips_issue_i2o;
-       else
-          ha->func.issue = ips_issue_copperhead;
-    }
+    ips_setup_funclist(ha);
 
+    if ( IPS_IS_MORPHEUS( ha ) ) {
+        /* If Morpheus appears dead, reset it */
+        IsDead = readl( ha->mem_ptr + IPS_REG_I960_MSG1 );
+        if ( IsDead == 0xDEADBEEF ) {
+            ips_reset_morpheus( ha );
+        }
+    }
     /*
      * Initialize the card if it isn't already
      */
@@ -7542,7 +6923,6 @@
     return SUCCESS;
 }
 
-#endif
 
 /*---------------------------------------------------------------------------*/
 /*   Routine Name: ips_init_phase2                                           */
diff -Nru a/drivers/scsi/ips.h b/drivers/scsi/ips.h
--- a/drivers/scsi/ips.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/ips.h	Wed Jan  8 20:04:43 2003
@@ -350,27 +350,8 @@
    #define IPS_SCSI_MP3_AllocateSurface 0x08
 
    /*
-    * Configuration Structure Flags
-    */
-   #define IPS_CFG_USEROPT_UPDATECOUNT(cfg)   (((cfg)->UserOpt & 0xffff000) >> 16)
-   #define IPS_CFG_USEROPT_CONCURSTART(cfg)   (((cfg)->UserOpt & 0xf000) >> 12)
-   #define IPS_CFG_USEROPT_STARTUPDELAY(cfg)  (((cfg)->UserOpt & 0xf00) >> 8)
-   #define IPS_CFG_USEROPT_REARRANGE(cfg)     ((cfg)->UserOpt & 0x80)
-   #define IPS_CFG_USEROPT_CDBOOT(cfg)        ((cfg)->UserOpt & 0x40)
-   #define IPS_CFG_USEROPT_CLUSTER(cfg)       ((cfg)->UserOpt & 0x20)
-
-   /*
-    * Host adapter Flags (bit numbers)
-    */
-   #define IPS_IN_INTR                  0
-   #define IPS_IN_ABORT                 1
-   #define IPS_IN_RESET                 2
-
-   /*
     * SCB Flags
     */
-   #define IPS_SCB_ACTIVE               0x00001
-   #define IPS_SCB_WAITING              0x00002
    #define IPS_SCB_MAP_SG               0x00008
    #define IPS_SCB_MAP_SINGLE           0X00010
 
@@ -381,7 +362,6 @@
    #define IPS_COPPIOCCMD              (('C'<<8) | 66)
    #define IPS_NUMCTRLS                (('C'<<8) | 68)
    #define IPS_CTRLINFO                (('C'<<8) | 69)
-   #define IPS_FLASHBIOS               (('C'<<8) | 70)
 
    /* flashing defines */
    #define IPS_FW_IMAGE                0x00
@@ -406,36 +386,7 @@
    /*
     * Scsi_Host Template
     */
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
-#define IPS {	\
-	.module				= NULL,		\
-	.proc_info			= NULL,		\
-	.proc_dir			= NULL,		\
-	.name				= NULL,		\
-	.detect				= ips_detect,	\
-	.release			= ips_release,	\
-	.info				= ips_info,	\
-	.command			= NULL,		\
-	.queuecommand			= ips_queue,	\
-	.eh_strategy_handler		= NULL,		\
-	.eh_abort_handler		= ips_eh_abort,	\
-	.eh_device_reset_handler	= NULL,		\
-	.eh_bus_reset_handler		= NULL,		\
-	.eh_host_reset_handler		= ips_eh_reset,	\
-	.abort				= NULL,		\
-	.reset				= NULL,		\
-	.slave_attach			= NULL,		\
-	.bios_param			= ips_biosparam,\
-	.can_queue			= 0,		\
-	.this_id			= -1,		\
-	.sg_tablesize			= IPS_MAX_SG,	\
-	.cmd_per_lun			= 3,		\
-	.present			= 0,		\
-	.unchecked_isa_dma		= 0,		\
-	.use_clustering			= ENABLE_CLUSTERING,	\
-	.use_new_eh_code		= 1 \
-}
-#elif LINUX_VERSION_CODE < LinuxVersionCode(2,5,0)
+#if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0)
 #define IPS{	\
 	.module				= NULL,		\
 	.proc_info			= NULL,		\
@@ -1004,19 +955,6 @@
    int  *option_flag;
    int   option_value;
 } IPS_OPTION;
-
-typedef struct {
-   void             *userbuffer;
-   uint32_t          usersize;
-   void             *kernbuffer;
-   uint32_t          kernsize;
-   void             *ha;
-   void             *SC;
-   void             *pt;
-   struct semaphore *sem;
-   uint32_t          offset;
-   uint32_t          retcode;
-} IPS_FLASH_DATA;
 
 /*
  * Status Info
diff -Nru a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
--- a/drivers/scsi/lasi700.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/lasi700.c	Wed Jan  8 20:04:43 2003
@@ -50,8 +50,8 @@
 #include <asm/pgtable.h>
 #include <asm/irq.h>
 #include <asm/hardware.h>
+#include <asm/parisc-device.h>
 #include <asm/delay.h>
-#include <asm/gsc.h>
 
 #include <linux/module.h>
 
diff -Nru a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
--- a/drivers/scsi/ncr53c8xx.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/ncr53c8xx.c	Wed Jan  8 20:04:43 2003
@@ -82,6 +82,7 @@
 **	    Etc...
 **
 **	Supported NCR/SYMBIOS chips:
+**		53C720		(Wide,   Fast SCSI-2, HP Zalon)
 **		53C810		(8 bits, Fast SCSI-2, no rom BIOS) 
 **		53C815		(8 bits, Fast SCSI-2, on board rom BIOS)
 **		53C820		(Wide,   Fast SCSI-2, no rom BIOS)
@@ -130,6 +131,8 @@
 #include <linux/sched.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <linux/interrupt.h>
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/ioport.h>
@@ -178,6 +181,24 @@
 typedef u32 u_int32;
 typedef u64 u_int64;
 typedef	u_long		vm_offset_t;
+
+#ifdef __hppa__
+/*
+ * Yuck.  Current plan is to use ncr58c8xx.c for non-pci big endian
+ * chips, and sym53c8xx.c for pci little endian chips.  Define this
+ * here so it gets seen by sym53c8xx_defs.h, pulled in via ncr53c8xx.h.
+ */
+#define SCSI_NCR_BIG_ENDIAN
+/* INTFLY interrupts don't always seem to get serviced atm..... */
+#define SIMULATED_INTFLY
+#endif
+
+#if defined(CONFIG_SCSI_ZALON) || defined(CONFIG_SCSI_ZALON_MODULE)
+#define ENABLE_SCSI_ZALON
+#include <asm/parisc-device.h>
+#include "zalon.h"
+#endif
+
 #include "ncr53c8xx.h"
 
 /*
@@ -379,6 +400,8 @@
 
 static void ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs);
 static void ncr53c8xx_timeout(unsigned long np);
+static int ncr53c8xx_proc_info(char *buffer, char **start, off_t offset,
+			int length, int hostno, int func);
 
 #define initverbose (driver_setup.verbose)
 #define bootverbose (np->verbose)
@@ -450,7 +473,8 @@
 #define	SIR_RESEL_BAD_I_T_L	(15)
 #define	SIR_RESEL_BAD_I_T_L_Q	(16)
 #define	SIR_DONE_OVERFLOW	(17)
-#define	SIR_MAX			(17)
+#define	SIR_INTFLY		(18)
+#define	SIR_MAX			(18)
 
 /*==========================================================
 **
@@ -622,6 +646,15 @@
 	**	negotiation of wide and synch transfer and device quirks.
 	**----------------------------------------------------------------
 	*/
+#ifdef SCSI_NCR_BIG_ENDIAN
+/*0*/	u_short	period;
+/*2*/	u_char	sval;
+/*3*/	u_char	minsync;
+/*0*/	u_char	wval;
+/*1*/	u_char	widedone;
+/*2*/	u_char	quirks;
+/*3*/	u_char	maxoffs;
+#else
 /*0*/	u_char	minsync;
 /*1*/	u_char	sval;
 /*2*/	u_short	period;
@@ -629,6 +662,7 @@
 /*1*/	u_char	quirks;
 /*2*/	u_char	widedone;
 /*3*/	u_char	wval;
+#endif
 
 #ifdef SCSI_NCR_INTEGRITY_CHECKING
 	u_char 	ic_min_sync;
@@ -839,10 +873,17 @@
 /*
 **	Last four bytes (host)
 */
+#ifdef SCSI_NCR_BIG_ENDIAN
+#define  actualquirks  phys.header.status[3]
+#define  host_status   phys.header.status[2]
+#define  scsi_status   phys.header.status[1]
+#define  parity_status phys.header.status[0]
+#else
 #define  actualquirks  phys.header.status[0]
 #define  host_status   phys.header.status[1]
 #define  scsi_status   phys.header.status[2]
 #define  parity_status phys.header.status[3]
+#endif
 
 /*
 **	First four bytes (script)
@@ -1026,8 +1067,8 @@
 	**	be used for probing adapter implementation differences.
 	**----------------------------------------------------------------
 	*/
-	u_char	sv_scntl0, sv_scntl3, sv_dmode, sv_dcntl, sv_ctest3, sv_ctest4,
-		sv_ctest5, sv_gpcntl, sv_stest2, sv_stest4;
+	u_char	sv_scntl0, sv_scntl3, sv_dmode, sv_dcntl, sv_ctest0, sv_ctest3,
+		sv_ctest4, sv_ctest5, sv_gpcntl, sv_stest2, sv_stest4;
 
 	/*----------------------------------------------------------------
 	**	Actual initial value of IO register bits used by the 
@@ -1035,8 +1076,8 @@
 	**	features that are to be enabled.
 	**----------------------------------------------------------------
 	*/
-	u_char	rv_scntl0, rv_scntl3, rv_dmode, rv_dcntl, rv_ctest3, rv_ctest4, 
-		rv_ctest5, rv_stest2;
+	u_char	rv_scntl0, rv_scntl3, rv_dmode, rv_dcntl, rv_ctest0, rv_ctest3,
+		rv_ctest4, rv_ctest5, rv_stest2;
 
 	/*----------------------------------------------------------------
 	**	Targets management.
@@ -1078,7 +1119,7 @@
 	**	General controller parameters and configuration.
 	**----------------------------------------------------------------
 	*/
-	pcidev_t	pdev;
+	device_t	dev;
 	u_short		device_id;	/* PCI device id		*/
 	u_char		revision_id;	/* PCI device revision id	*/
 	u_char		bus;		/* PCI BUS number		*/
@@ -1158,7 +1199,7 @@
 	*/
 	struct ccb	*ccb;		/* Global CCB			*/
 	struct usrcmd	user;		/* Command from user		*/
-	u_char		release_stage;	/* Synchronisation stage on release  */
+	volatile u_char	release_stage;	/* Synchronisation stage on release  */
 
 #ifdef SCSI_NCR_INTEGRITY_CHECKING
 	/*----------------------------------------------------------------
@@ -1197,6 +1238,23 @@
 */
 
 /*
+**	For HP Zalon/53c720 systems, the Zalon interface
+**	between CPU and 53c720 does prefetches, which causes
+**	problems with self modifying scripts.  The problem
+**	is overcome by calling a dummy subroutine after each
+**	modification, to force a refetch of the script on
+**	return from the subroutine.
+*/
+
+#ifdef ENABLE_SCSI_ZALON
+#define PREFETCH_FLUSH_CNT	2
+#define PREFETCH_FLUSH		SCR_CALL, PADDRH (wait_dma),
+#else
+#define PREFETCH_FLUSH_CNT	0
+#define PREFETCH_FLUSH
+#endif
+
+/*
 **	Script fragments which are loaded into the on-chip RAM 
 **	of 825A, 875 and 895 chips.
 */
@@ -1204,7 +1262,7 @@
 	ncrcmd	start		[  5];
 	ncrcmd  startpos	[  1];
 	ncrcmd	select		[  6];
-	ncrcmd	select2		[  9];
+	ncrcmd	select2		[  9 + PREFETCH_FLUSH_CNT];
 	ncrcmd	loadpos		[  4];
 	ncrcmd	send_ident	[  9];
 	ncrcmd	prepare		[  6];
@@ -1220,7 +1278,7 @@
 	ncrcmd	setmsg		[  7];
 	ncrcmd	cleanup		[  6];
 	ncrcmd  complete	[  9];
-	ncrcmd	cleanup_ok	[  8];
+	ncrcmd	cleanup_ok	[  8 + PREFETCH_FLUSH_CNT];
 	ncrcmd	cleanup0	[  1];
 #ifndef SCSI_NCR_CCB_DONE_SUPPORT
 	ncrcmd	signal		[ 12];
@@ -1238,11 +1296,11 @@
 	ncrcmd  idle		[  2];
 	ncrcmd	reselect	[  8];
 	ncrcmd	reselected	[  8];
-	ncrcmd	resel_dsa	[  6];
+	ncrcmd	resel_dsa	[  6 + PREFETCH_FLUSH_CNT];
 	ncrcmd	loadpos1	[  4];
 	ncrcmd  resel_lun	[  6];
 	ncrcmd	resel_tag	[  6];
-	ncrcmd	jump_to_nexus	[  4];
+	ncrcmd	jump_to_nexus	[  4 + PREFETCH_FLUSH_CNT];
 	ncrcmd	nexus_indirect	[  4];
 	ncrcmd	resel_notag	[  4];
 	ncrcmd  data_in		[MAX_SCATTERL * 4];
@@ -1263,7 +1321,7 @@
 #endif
 	ncrcmd	select_no_atn	[  8];
 	ncrcmd	cancel		[  4];
-	ncrcmd	skip		[  9];
+	ncrcmd	skip		[  9 + PREFETCH_FLUSH_CNT];
 	ncrcmd	skip2		[ 19];
 	ncrcmd	par_err_data_in	[  6];
 	ncrcmd	par_err_other	[  4];
@@ -1296,9 +1354,10 @@
 	ncrcmd	bad_i_t_l_q	[  4];
 	ncrcmd	bad_target	[  8];
 	ncrcmd	bad_status	[  8];
-	ncrcmd	start_ram	[  4];
+	ncrcmd	start_ram	[  4 + PREFETCH_FLUSH_CNT];
 	ncrcmd	start_ram0	[  4];
 	ncrcmd	sto_restart	[  5];
+	ncrcmd	wait_dma	[  2];
 	ncrcmd	snooptest	[  9];
 	ncrcmd	snoopend	[  2];
 };
@@ -1324,6 +1383,7 @@
 static	void	ncr_getclock	(ncb_p np, int mult);
 static	void	ncr_selectclock	(ncb_p np, u_char scntl3);
 static	ccb_p	ncr_get_ccb	(ncb_p np, u_char tn, u_char ln);
+static	void	ncr_chip_reset	(ncb_p np, int delay);
 static	void	ncr_init	(ncb_p np, int reset, char * msg, u_long code);
 static	int	ncr_int_sbmc	(ncb_p np);
 static	int	ncr_int_par	(ncb_p np);
@@ -1523,6 +1583,10 @@
 		RADDR (dsa),
 		PADDR (loadpos),
 	/*
+	**	Flush script prefetch if required
+	*/
+	PREFETCH_FLUSH
+	/*
 	**	then we do the actual copy.
 	*/
 	SCR_COPY (sizeof (struct head)),
@@ -1823,6 +1887,10 @@
 	SCR_COPY_F (4),
 		RADDR (dsa),
 		PADDR (cleanup0),
+	/*
+	**	Flush script prefetch if required
+	*/
+	PREFETCH_FLUSH
 	SCR_COPY (sizeof (struct head)),
 		NADDR (header),
 }/*-------------------------< CLEANUP0 >--------------------*/,{
@@ -1852,8 +1920,13 @@
 	/*
 	**	... signal completion to the host
 	*/
+#ifdef SIMULATED_INTFLY
+	SCR_INT,
+		SIR_INTFLY,
+#else
 	SCR_INT_FLY,
 		0,
+#endif
 	/*
 	**	Auf zu neuen Schandtaten!
 	*/
@@ -1872,8 +1945,13 @@
 	SCR_INT,
 		SIR_DONE_OVERFLOW,
 }/*------------------------< DONE_END >---------------------*/,{
+#ifdef SIMULATED_INTFLY
+	SCR_INT,
+		SIR_INTFLY,
+#else
 	SCR_INT_FLY,
 		0,
+#endif
 	SCR_COPY (4),
 		RADDR (temp),
 		PADDR (done_pos),
@@ -2051,6 +2129,10 @@
 		RADDR (dsa),
 		PADDR (loadpos1),
 	/*
+	**	Flush script prefetch if required
+	*/
+	PREFETCH_FLUSH
+	/*
 	**	then we do the actual copy.
 	*/
 	SCR_COPY (sizeof (struct head)),
@@ -2112,6 +2194,10 @@
 	SCR_COPY_F (4),
 		RADDR (temp),
 		PADDR (nexus_indirect),
+	/*
+	**	Flush script prefetch if required
+	*/
+	PREFETCH_FLUSH
 	SCR_COPY (4),
 }/*-------------------------< NEXUS_INDIRECT >-------------------*/,{
 		0,
@@ -2268,6 +2354,10 @@
 		RADDR (dsa),
 		PADDRH (skip2),
 	/*
+	**	Flush script prefetch if required
+	*/
+	PREFETCH_FLUSH
+	/*
 	**	then we do the actual copy.
 	*/
 	SCR_COPY (sizeof (struct head)),
@@ -2778,6 +2868,10 @@
 	SCR_COPY_F (4),
 		RADDR (scratcha),
 		PADDRH (start_ram0),
+	/*
+	**	Flush script prefetch if required
+	*/
+	PREFETCH_FLUSH
 	SCR_COPY (sizeof (struct script)),
 }/*-------------------------< START_RAM0 >--------------------*/,{
 		0,
@@ -2795,6 +2889,17 @@
 		PADDR (startpos),
 	SCR_JUMP,
 		PADDR (start),
+}/*-------------------------< WAIT_DMA >-------------------*/,{
+	/*
+	**	For HP Zalon/53c720 systems, the Zalon interface
+	**	between CPU and 53c720 does prefetches, which causes
+	**	problems with self modifying scripts.  The problem
+	**	is overcome by calling a dummy subroutine after each
+	**	modification, to force a refetch of the script on
+	**	return from the subroutine.
+	*/
+	SCR_RETURN,
+		0,
 }/*-------------------------< SNOOPTEST >-------------------*/,{
 	/*
 	**	Read the variable.
@@ -3128,9 +3233,12 @@
 #define burst_length(bc) (!(bc))? 0 : 1 << (bc)
 
 /*
- *	Burst code from io register bits.
+ *	Burst code from io register bits.  Burst enable is ctest0 for c720,
+ *	ctest4 for others.
  */
-#define burst_code(dmode, ctest4, ctest5) \
+#define burst_code(dmode, ctest0, ctest4, ctest5) \
+	(np->device_id == PSEUDO_ZALON_720_ID) ? \
+	(ctest0) & 0x80? 0 : (((dmode) & 0xc0) >> 6) + 1 : \
 	(ctest4) & 0x80? 0 : (((dmode) & 0xc0) >> 6) + ((ctest5) & 0x04) + 1
 
 /*
@@ -3138,12 +3246,14 @@
  */
 static inline void ncr_init_burst(ncb_p np, u_char bc)
 {
-	np->rv_ctest4	&= ~0x80;
+	u_char *be = (np->device_id == PSEUDO_ZALON_720_ID) ?
+		&np->rv_ctest0 : &np->rv_ctest4;
+	*be		&= ~0x80;
 	np->rv_dmode	&= ~(0x3 << 6);
 	np->rv_ctest5	&= ~0x4;
 
 	if (!bc) {
-		np->rv_ctest4	|= 0x80;
+		*be		|= 0x80;
 	}
 	else {
 		--bc;
@@ -3220,6 +3330,7 @@
 	np->sv_scntl3	= INB(nc_scntl3) & 0x07;
 	np->sv_dmode	= INB(nc_dmode)  & 0xce;
 	np->sv_dcntl	= INB(nc_dcntl)  & 0xa8;
+	np->sv_ctest0	= INB(nc_ctest0) & 0x84;
 	np->sv_ctest3	= INB(nc_ctest3) & 0x01;
 	np->sv_ctest4	= INB(nc_ctest4) & 0x80;
 	np->sv_ctest5	= INB(nc_ctest5) & 0x24;
@@ -3306,10 +3417,11 @@
 	np->rv_scntl0	= np->sv_scntl0;
 	np->rv_dmode	= np->sv_dmode;
 	np->rv_dcntl	= np->sv_dcntl;
+	np->rv_ctest0	= np->sv_ctest0;
 	np->rv_ctest3	= np->sv_ctest3;
 	np->rv_ctest4	= np->sv_ctest4;
 	np->rv_ctest5	= np->sv_ctest5;
-	burst_max	= burst_code(np->sv_dmode, np->sv_ctest4, np->sv_ctest5);
+	burst_max	= burst_code(np->sv_dmode, np->sv_ctest0, np->sv_ctest4, np->sv_ctest5);
 #else
 
 	/*
@@ -3317,7 +3429,7 @@
 	*/
 	burst_max	= driver_setup.burst_max;
 	if (burst_max == 255)
-		burst_max = burst_code(np->sv_dmode, np->sv_ctest4, np->sv_ctest5);
+		burst_max = burst_code(np->sv_dmode, np->sv_ctest0, np->sv_ctest4, np->sv_ctest5);
 	if (burst_max > 7)
 		burst_max = 7;
 	if (burst_max > np->maxburst)
@@ -3340,6 +3452,12 @@
 		np->rv_ctest3	|= WRIE;	/* Write and Invalidate */
 	if (np->features & FE_DFS)
 		np->rv_ctest5	|= DFS;		/* Dma Fifo Size */
+	if (np->features & FE_MUX)
+		np->rv_ctest4	|= MUX;		/* Host bus multiplex mode */
+	if (np->features & FE_EA)
+		np->rv_dcntl	|= EA;		/* Enable ACK */
+	if (np->features & FE_EHP)
+		np->rv_ctest0	|= EHP;		/* Even host parity */
 
 	/*
 	**	Select some other
@@ -3539,6 +3657,7 @@
 	ncr_nvram *nvram = device->nvram;
 	int i;
 
+#ifndef ENABLE_SCSI_ZALON
 	printk(KERN_INFO "ncr53c%s-%d: rev 0x%x on pci bus %d device %d function %d "
 #ifdef __sparc__
 		"irq %s\n",
@@ -3553,6 +3672,7 @@
 #else
 		device->slot.irq);
 #endif
+#endif
 
 	/*
 	**	Allocate host_data structure
@@ -3564,11 +3684,11 @@
 	/*
 	**	Allocate the host control block.
 	*/
-	np = __m_calloc_dma(device->pdev, sizeof(struct ncb), "NCB");
+	np = __m_calloc_dma(device->dev, sizeof(struct ncb), "NCB");
 	if (!np)
 		goto attach_error;
 	NCR_INIT_LOCK_NCB(np);
-	np->pdev  = device->pdev;
+	np->dev  = device->dev;
 	np->p_ncb = vtobus(np);
 	host_data->ncb = np;
 
@@ -3650,7 +3770,9 @@
 	**	Try to map the controller chip into iospace.
 	*/
 
+#ifndef ENABLE_SCSI_ZALON
 	request_region(device->slot.io_port, 128, "ncr53c8xx");
+#endif
 	np->base_io = device->slot.io_port;
 
 #ifdef SCSI_NCR_NVRAM_SUPPORT
@@ -3707,7 +3829,7 @@
 	instance->dma_channel	= 0;
 	instance->cmd_per_lun	= MAX_TAGS;
 	instance->can_queue	= (MAX_START-4);
-	scsi_set_pci_device(instance, device->pdev);
+	scsi_set_device(instance, device->dev);
 
 #ifdef SCSI_NCR_INTEGRITY_CHECKING
 	np->check_integrity	  = 0;
@@ -3762,10 +3884,7 @@
 	/*
 	**	Reset chip.
 	*/
-
-	OUTB (nc_istat,  SRST);
-	UDELAY (100);
-	OUTB (nc_istat,  0   );
+	ncr_chip_reset(np, 100);
 
 	/*
 	**	Now check the cache handling of the pci chipset.
@@ -3882,7 +4001,9 @@
 #ifdef DEBUG_NCR53C8XX
 		printk(KERN_DEBUG "%s: releasing IO region %x[%d]\n", ncr_name(np), np->base_io, 128);
 #endif
+#ifndef ENABLE_SCSI_ZALON
 		release_region(np->base_io, 128);
+#endif
 	}
 	if (np->irq) {
 #ifdef DEBUG_NCR53C8XX
@@ -3907,7 +4028,7 @@
 	scsi_unregister(instance);
 
         return -1;
- }
+}
 
 
 /*==========================================================
@@ -4694,9 +4815,7 @@
 			"command processing suspended for %d seconds\n",
 			ncr_name(np), settle_delay);
 
-	OUTB (nc_istat, SRST);
-	UDELAY (100);
-	OUTB (nc_istat, 0);
+	ncr_chip_reset(np, 100);
 	UDELAY (2000);	/* The 895 needs time for the bus mode to settle */
 	if (enab_int)
 		OUTW (nc_sien, RST);
@@ -4705,7 +4824,8 @@
 	**	properly set IRQ mode, prior to resetting the bus.
 	*/
 	OUTB (nc_stest3, TE);
-	OUTB (nc_dcntl, (np->rv_dcntl & IRQM));
+	if (np->device_id != PSEUDO_ZALON_720_ID)
+		OUTB (nc_dcntl, (np->rv_dcntl & IRQM));
 	OUTB (nc_scntl1, CRST);
 	UDELAY (200);
 
@@ -4912,6 +5032,10 @@
 	lcb_p lp;
 	int target, lun;
 	int i;
+	char inst_name[16];
+
+	/* Local copy so we don't access np after freeing it! */
+	strncpy(inst_name, ncr_name(np), 16);
 
 	printk("%s: releasing host resources\n", ncr_name(np));
 
@@ -4958,12 +5082,11 @@
 	*/
 
 	printk("%s: resetting chip\n", ncr_name(np));
-	OUTB (nc_istat,  SRST);
-	UDELAY (100);
-	OUTB (nc_istat,  0   );
+	ncr_chip_reset(np, 100);
 
 	OUTB(nc_dmode,	np->sv_dmode);
 	OUTB(nc_dcntl,	np->sv_dcntl);
+	OUTB(nc_ctest0,	np->sv_ctest0);
 	OUTB(nc_ctest3,	np->sv_ctest3);
 	OUTB(nc_ctest4,	np->sv_ctest4);
 	OUTB(nc_ctest5,	np->sv_ctest5);
@@ -4986,7 +5109,9 @@
 #ifdef DEBUG_NCR53C8XX
 	printk("%s: releasing IO region %x[%d]\n", ncr_name(np), np->base_io, 128);
 #endif
+#ifndef ENABLE_SCSI_ZALON
 	release_region(np->base_io, 128);
+#endif
 
 	/*
 	**	Free allocated ccb(s)
@@ -5031,7 +5156,7 @@
 		m_free_dma(np->ccb, sizeof(struct ccb), "CCB");
 	m_free_dma(np, sizeof(struct ncb), "NCB");
 
-	printk("%s: host resources successfully released\n", ncr_name(np));
+	printk("%s: host resources successfully released\n", inst_name);
 
 	return 1;
 }
@@ -5423,6 +5548,27 @@
 	}
 }
 
+/*
+** Reset ncr chip.
+*/
+
+/* Some initialisation must be done immediately following reset, for 53c720,
+ * at least.  EA (dcntl bit 5) isn't set here as it is set once only in
+ * the _detect function.
+ */
+static void ncr_chip_reset(ncb_p np, int delay)
+{
+	OUTB (nc_istat,  SRST);
+	UDELAY (delay);
+	OUTB (nc_istat,  0   );
+
+	if (np->features & FE_EHP)
+		OUTB (nc_ctest0, EHP);
+	if (np->features & FE_MUX)
+		OUTB (nc_ctest4, MUX);
+}
+
+
 /*==========================================================
 **
 **
@@ -5469,6 +5615,7 @@
 	np->squeueput = 0;
 	np->script0->startpos[0] = cpu_to_scr(NCB_SCRIPTH_PHYS (np, tryloop));
 
+#ifdef SCSI_NCR_CCB_DONE_SUPPORT
 	/*
 	**	Clear Done Queue
 	*/
@@ -5477,6 +5624,7 @@
 		np->scripth0->done_queue[5*i + 4] =
 			cpu_to_scr(NCB_SCRIPT_PHYS (np, done_end));
 	}
+#endif
 
 	/*
 	**	Start at first entry.
@@ -5495,8 +5643,11 @@
 	**	Init chip.
 	*/
 
-	OUTB (nc_istat,  0x00   );	/*  Remove Reset, abort */
-	UDELAY (2000);	/* The 895 needs time for the bus mode to settle */
+	/*
+	** Remove reset; big delay because the 895 needs time for the
+	** bus mode to settle
+	*/
+	ncr_chip_reset(np, 2000);
 
 	OUTB (nc_scntl0, np->rv_scntl0 | 0xc0);
 					/*  full arb., ena parity, par->ATN  */
@@ -5511,6 +5662,7 @@
 	OUTB (nc_ctest5, np->rv_ctest5);	/* Large fifo + large burst */
 
 	OUTB (nc_dcntl , NOCOM|np->rv_dcntl);	/* Protect SFBR */
+	OUTB (nc_ctest0, np->rv_ctest0);	/* 720: CDIS and EHP */
 	OUTB (nc_ctest3, np->rv_ctest3);	/* Write and invalidate */
 	OUTB (nc_ctest4, np->rv_ctest4);	/* Master parity checking */
 
@@ -7095,6 +7247,18 @@
 	if (DEBUG_FLAGS & DEBUG_TINY) printk ("I#%d", num);
 
 	switch (num) {
+	case SIR_INTFLY:
+		/*
+		**	This is used for HP Zalon/53c720 where INTFLY
+		**	operation is currently broken.
+		*/
+		ncr_wakeup_done(np);
+#ifdef SCSI_NCR_CCB_DONE_SUPPORT
+		OUTL(nc_dsp, NCB_SCRIPT_PHYS (np, done_end) + 8);
+#else
+		OUTL(nc_dsp, NCB_SCRIPT_PHYS (np, start));
+#endif
+		return;
 	case SIR_RESEL_NO_MSG_IN:
 	case SIR_RESEL_NO_IDENTIFY:
 		/*
@@ -7841,15 +8005,23 @@
 	*/
 	tp->getscr[0] =	cpu_to_scr(copy_1);
 	tp->getscr[1] = cpu_to_scr(vtobus (&tp->sval));
+#ifdef SCSI_NCR_BIG_ENDIAN
+	tp->getscr[2] = cpu_to_scr(ncr_reg_bus_addr(nc_sxfer) ^ 3);
+#else
 	tp->getscr[2] = cpu_to_scr(ncr_reg_bus_addr(nc_sxfer));
-  
+#endif
+
 	/*
 	**	Load the timing register.
 	**	COPY @(tp->wval), @(scntl3)
 	*/
 	tp->getscr[3] =	cpu_to_scr(copy_1);
 	tp->getscr[4] = cpu_to_scr(vtobus (&tp->wval));
+#ifdef SCSI_NCR_BIG_ENDIAN
+	tp->getscr[5] = cpu_to_scr(ncr_reg_bus_addr(nc_scntl3) ^ 3);
+#else
 	tp->getscr[5] = cpu_to_scr(ncr_reg_bus_addr(nc_scntl3));
+#endif
 
 	/*
 	**	Get the IDENTIFY message and the lun.
@@ -7878,10 +8050,17 @@
 	/*
 	**	These assert's should be moved at driver initialisations.
 	*/
+#ifdef SCSI_NCR_BIG_ENDIAN
+	assert (( (offsetof(struct ncr_reg, nc_sxfer) ^
+		offsetof(struct tcb    , sval    )) &3) == 3);
+	assert (( (offsetof(struct ncr_reg, nc_scntl3) ^
+		offsetof(struct tcb    , wval    )) &3) == 3);
+#else
 	assert (( (offsetof(struct ncr_reg, nc_sxfer) ^
 		offsetof(struct tcb    , sval    )) &3) == 0);
 	assert (( (offsetof(struct ncr_reg, nc_scntl3) ^
 		offsetof(struct tcb    , wval    )) &3) == 0);
+#endif
 }
 
 
@@ -8122,14 +8301,10 @@
 			segment = 1;
 		}
 	}
-	else {
+	else if (use_sg <= MAX_SCATTER) {
 		struct scatterlist *scatter = (struct scatterlist *)cmd->buffer;
 
 		use_sg = map_scsi_sg_data(np, cmd);
-		if (use_sg > MAX_SCATTER) {
-			unmap_scsi_data(np, cmd);
-			return -1;
-		}
 		data = &data[MAX_SCATTER - use_sg];
 
 		while (segment < use_sg) {
@@ -8142,6 +8317,9 @@
 			++segment;
 		}
 	}
+	else {
+		return -1;
+	}
 
 	return segment;
 }
@@ -8226,9 +8404,7 @@
 	/*
 	**	Reset ncr chip
 	*/
-	OUTB (nc_istat,  SRST);
-	UDELAY (100);
-	OUTB (nc_istat,  0   );
+	ncr_chip_reset(np, 100);
 	/*
 	**	check for timeout
 	*/
@@ -8455,7 +8631,7 @@
 	if (np->multiplier != mult || (scntl3 & 7) < 3 || !(scntl3 & 1)) {
 		unsigned f2;
 
-		OUTB(nc_istat, SRST); UDELAY (5); OUTB(nc_istat, 0);
+		ncr_chip_reset(np, 5);
 
 		(void) ncrgetfreq (np, 11);	/* throw away first result */
 		f1 = ncrgetfreq (np, 11);
@@ -9202,6 +9378,7 @@
 */
 
 static u_short	ncr_chip_ids[]   __initdata = {
+	PSEUDO_ZALON_720_ID,
 	PCI_DEVICE_ID_NCR_53C810,
 	PCI_DEVICE_ID_NCR_53C815,
 	PCI_DEVICE_ID_NCR_53C820,
@@ -9216,6 +9393,74 @@
 	PCI_DEVICE_ID_NCR_53C1510D
 };
 
+#ifdef ENABLE_SCSI_ZALON
+/* Attach a 53c720 interfaced via Zalon chip on HP boxes.  */
+int zalon_attach(Scsi_Host_Template *tpnt, unsigned long io_port,
+		struct parisc_device *dev, int irq, int unit)
+{
+	u_short device_id;
+	u_char revision;
+	int i;
+	ncr_chip *chip;
+	ncr_device device;
+
+	tpnt->proc_name = NAME53C8XX;
+	tpnt->proc_info = ncr53c8xx_proc_info;
+
+#if	defined(SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT) && defined(MODULE)
+	if (ncr53c8xx)
+		ncr53c8xx_setup(ncr53c8xx);
+#endif
+
+#ifdef SCSI_NCR_DEBUG_INFO_SUPPORT
+	ncr_debug = driver_setup.debug;
+#endif
+	if (initverbose >= 2)
+		ncr_print_driver_setup();
+
+	memset(&device, 0, sizeof(ncr_device));
+	chip = 0;
+	device_id = PSEUDO_ZALON_720_ID;
+	revision = 0;
+	for (i = 0; i < sizeof(ncr_chip_table)/sizeof(ncr_chip_table[0]); i++) {		if (device_id != ncr_chip_table[i].device_id)
+			continue;
+		chip = &device.chip;
+		memcpy(chip, &ncr_chip_table[i], sizeof(*chip));
+		chip->revision_id = revision;
+		break;
+	}
+
+	if (!chip) {
+		printk(NAME53C8XX ": not initializing, device not supported\n");		return -1;
+	}
+
+	/* Fix some features according to driver setup. */
+	driver_setup.diff_support = 2;
+
+	/* The following three are needed before any other access. */
+	writeb(0x20, io_port + 0x38); /* DCNTL_REG,  EA  */
+	writeb(0x04, io_port + 0x1b); /* CTEST0_REG, EHP */
+	writeb(0x80, io_port + 0x22); /* CTEST4_REG, MUX */
+
+	/* Initialise ncr_device structure with items required by ncr_attach. */
+	device.host_id		= driver_setup.host_id;
+	device.dev		= &dev->dev;
+	device.slot.bus		= 0;
+	device.slot.device_fn	= 0;
+	device.slot.base	= (u_long)io_port;
+	device.slot.base_c	= (u_long)io_port;
+	device.slot.base_2	= 0;
+	device.slot.base_2_c	= 0;
+	device.slot.io_port	= io_port;
+	device.slot.irq		= irq;
+	device.attach_done	= 0;
+
+	printk(KERN_INFO NAME53C8XX ": 53c%s detected\n", device.chip.name);
+
+	return ncr_attach(tpnt, unit, &device);
+}
+#endif
+
 /*==========================================================
 **
 **	Chip detection entry point.
@@ -9265,6 +9510,23 @@
 static
 #endif
 #if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) || defined(MODULE)
+#ifdef ENABLE_SCSI_ZALON
+Scsi_Host_Template driver_template =  {
+	.proc_name =		"zalon720",
+	.detect =		zalon7xx_detect,
+	.release =		zalon7xx_release,
+	.info =			ncr53c8xx_info,
+	.queuecommand =		ncr53c8xx_queue_command,
+	.can_queue =		SCSI_NCR_CAN_QUEUE,
+	.this_id =		7,
+	.sg_tablesize =		SCSI_NCR_SG_TABLESIZE,
+	.cmd_per_lun =		SCSI_NCR_CMD_PER_LUN,
+	.use_clustering =	DISABLE_CLUSTERING,
+};
+
+
+#else
 Scsi_Host_Template driver_template = NCR53C8XX;
+#endif
 #include "scsi_module.c"
 #endif
diff -Nru a/drivers/scsi/pcmcia/Makefile b/drivers/scsi/pcmcia/Makefile
--- a/drivers/scsi/pcmcia/Makefile	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/pcmcia/Makefile	Wed Jan  8 20:04:43 2003
@@ -1,17 +1,5 @@
-#
-# Makefile for the Linux PCMCIA SCSI drivers.
-#
 
-obj-y		:=
-obj-m		:=
-obj-n		:=
-obj-		:=
-
-vpath %c ..
-
-CFLAGS_aha152x.o = -DPCMCIA -D__NO_VERSION__ -DAHA152X_STAT
-CFLAGS_fdomain.o = -DPCMCIA -D__NO_VERSION__
-CFLAGS_qlogicfas.o = -DPCMCIA -D__NO_VERSION__
+EXTRA_CFLAGS		+= -Idrivers/scsi
 
 # 16-bit client drivers
 obj-$(CONFIG_PCMCIA_QLOGIC)	+= qlogic_cs.o
@@ -19,6 +7,6 @@
 obj-$(CONFIG_PCMCIA_AHA152X)	+= aha152x_cs.o
 obj-$(CONFIG_PCMCIA_NINJA_SCSI)	+= nsp_cs.o
 
-aha152x_cs-objs	:= aha152x_stub.o aha152x.o
-fdomain_cs-objs	:= fdomain_stub.o fdomain.o
-qlogic_cs-objs	:= qlogic_stub.o qlogicfas.o
+aha152x_cs-objs	:= aha152x_stub.o aha152x_core.o
+fdomain_cs-objs	:= fdomain_stub.o fdomain_core.o
+qlogic_cs-objs	:= qlogic_stub.o qlogic_core.o
diff -Nru a/drivers/scsi/pcmcia/aha152x_core.c b/drivers/scsi/pcmcia/aha152x_core.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/pcmcia/aha152x_core.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,3 @@
+#define PCMCIA	1
+#define AHA152X_STAT 1
+#include "aha152x.c"
diff -Nru a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
--- a/drivers/scsi/pcmcia/aha152x_stub.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/pcmcia/aha152x_stub.c	Wed Jan  8 20:04:45 2003
@@ -45,11 +45,10 @@
 #include <scsi/scsi.h>
 #include <linux/major.h>
 #include <linux/blk.h>
-
-#include <../drivers/scsi/scsi.h>
-#include <../drivers/scsi/hosts.h>
 #include <scsi/scsi_ioctl.h>
-#include <../drivers/scsi/aha152x.h>
+
+#include "scsi.h"
+#include "hosts.h"
 
 #include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
@@ -112,7 +111,8 @@
 static dev_link_t *aha152x_attach(void);
 static void aha152x_detach(dev_link_t *);
 
-static Scsi_Host_Template driver_template = AHA152X;
+#define driver_template aha152x_driver_template
+extern Scsi_Host_Template aha152x_driver_template;
 
 static dev_link_t *dev_list = NULL;
 
diff -Nru a/drivers/scsi/pcmcia/fdomain_core.c b/drivers/scsi/pcmcia/fdomain_core.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/pcmcia/fdomain_core.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,2 @@
+#define PCMCIA 1
+#include "fdomain.c"
diff -Nru a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
--- a/drivers/scsi/pcmcia/fdomain_stub.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/pcmcia/fdomain_stub.c	Wed Jan  8 20:04:44 2003
@@ -42,11 +42,10 @@
 #include <scsi/scsi.h>
 #include <linux/major.h>
 #include <linux/blk.h>
-
-#include <../drivers/scsi/scsi.h>
-#include <../drivers/scsi/hosts.h>
 #include <scsi/scsi_ioctl.h>
-#include <../drivers/scsi/fdomain.h>
+
+#include "scsi.h"
+#include "hosts.h"
 
 #include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
diff -Nru a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
--- a/drivers/scsi/pcmcia/nsp_cs.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/pcmcia/nsp_cs.c	Wed Jan  8 20:04:45 2003
@@ -50,8 +50,8 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include <../drivers/scsi/scsi.h>
-#include <../drivers/scsi/hosts.h>
+#include "scsi.h"
+#include "hosts.h"
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_ioctl.h>
diff -Nru a/drivers/scsi/pcmcia/nsp_cs.h b/drivers/scsi/pcmcia/nsp_cs.h
--- a/drivers/scsi/pcmcia/nsp_cs.h	Wed Jan  8 20:04:43 2003
+++ b/drivers/scsi/pcmcia/nsp_cs.h	Wed Jan  8 20:04:43 2003
@@ -15,6 +15,8 @@
 #ifndef  __nsp_cs__
 #define  __nsp_cs__
 
+#include <linux/version.h>
+
 /* for debugging */
 //#define PCMCIA_DEBUG 9
 
diff -Nru a/drivers/scsi/pcmcia/qlogic_core.c b/drivers/scsi/pcmcia/qlogic_core.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/pcmcia/qlogic_core.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,2 @@
+#define PCMCIA 1
+#include "qlogicfas.c"
diff -Nru a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
--- a/drivers/scsi/pcmcia/qlogic_stub.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/pcmcia/qlogic_stub.c	Wed Jan  8 20:04:44 2003
@@ -43,12 +43,10 @@
 #include <scsi/scsi.h>
 #include <linux/major.h>
 #include <linux/blk.h>
-
-#include <../drivers/scsi/scsi.h>
-#include <../drivers/scsi/hosts.h>
 #include <scsi/scsi_ioctl.h>
 
-#include <../drivers/scsi/qlogicfas.h>
+#include "scsi.h"
+#include "hosts.h"
 
 #include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
--- a/drivers/scsi/scsi_scan.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/scsi/scsi_scan.c	Wed Jan  8 20:04:45 2003
@@ -544,32 +544,6 @@
 }
 
 /**
- * scsi_check_id_size - check if size fits in the driverfs name
- * @sdev:	Scsi_Device to use for error message
- * @size:	the length of the id we want to store
- *
- * Description:
- *     Use a function for this since the same code is used in various
- *     places, and we only create one string and call to printk.
- *
- * Return:
- *     0 - fits
- *     1 - size too large
- **/
-static int scsi_check_id_size(Scsi_Device *sdev, int size)
-{
-	if (size > DEVICE_NAME_SIZE) {
-		printk(KERN_WARNING "scsi scan: host %d channel %d id %d lun %d"
-		       " identifier too long, length %d, max %d. Device might"
-		       " be improperly identified.\n", sdev->host->host_no,
-		       sdev->channel, sdev->id, sdev->lun, size,
-		       DEVICE_NAME_SIZE);
-		return 1;
-	} else
-		return 0;
-}
-
-/**
  * scsi_get_evpd_page - get a list of supported vpd pages
  * @sdev:	Scsi_Device to send an INQUIRY VPD
  * @sreq:	Scsi_Request associated with @sdev
@@ -715,17 +689,16 @@
  * scsi_check_fill_deviceid - check the id and if OK fill it
  * @sdev:	device to use for error messages
  * @id_page:	id descriptor for INQUIRY VPD DEVICE ID, page 0x83
- * @name:	store the id in name
+ * @name:	store the id in name (of size DEVICE_NAME_SIZE > 26)
  * @id_search:	store if the id_page matches these values
  *
  * Description:
  *     Check if @id_page matches the @id_search, if so store an id (uid)
- *     into name.
+ *     into name, that is all zero on entrance.
  *
  * Return:
  *     0: Success
  *     1: No match
- *     2: Failure due to size constraints
  **/
 static int scsi_check_fill_deviceid(Scsi_Device *sdev, char *id_page,
 	char *name, const struct scsi_id_search_values *id_search)
@@ -755,70 +728,41 @@
 	if ((id_page[0] & 0x0f) != id_search->code_set)
 		return 1;
 
-	name[0]  = hex_str[id_search->id_type];
+	/*
+	 * All OK - store ID
+	 */
+	name[0] = hex_str[id_search->id_type];
+
+	/*
+	 * Prepend the vendor and model before the id, since the id
+	 * might not be unique across all vendors and models.
+	 * The same code is used below, with a different size.
+	 */
+	if (id_search->id_type == SCSI_ID_VENDOR_SPECIFIC) {
+		strncat(name, sdev->vendor, 8);
+		strncat(name, sdev->model, 16);
+	}
+
+	i = 4;
+	j = strlen(name);
 	if ((id_page[0] & 0x0f) == SCSI_ID_ASCII) {
 		/*
 		 * ASCII descriptor.
 		 */
-		if (id_search->id_type == SCSI_ID_VENDOR_SPECIFIC) {
-			/*
-			 * Prepend the vendor and model before the id,
-			 * since the id might not be unique across all
-			 * vendors and models. The same code is used
-			 * below, with a differnt size.
-			 *
-			 * Need 1 byte for the idtype, 1 for trailing
-			 * '\0', 8 for vendor, 16 for model total 26, plus
-			 * the name descriptor length.
-			 */
-			if (scsi_check_id_size(sdev, 26 + id_page[3]))
-				return 2;
-			else {
-				strncat(name, sdev->vendor, 8);
-				strncat(name, sdev->model, 16);
-			}
-		} else if (scsi_check_id_size (sdev, (2 + id_page[3])))
-			/*
-			 * Need 1 byte for the idtype, 1 byte for
-			 * the trailing '\0', plus the descriptor length.
-			 */
-			return 2;
-		memcpy(&name[strlen(name)], &id_page[4], id_page[3]);
-		return 0;
-	} else if ((id_page[0] & 0x0f) == SCSI_ID_BINARY) {
-		if (id_search->id_type == SCSI_ID_VENDOR_SPECIFIC) {
-			/*
-			 * Prepend the vendor and model before the id.
-			 */
-			if (scsi_check_id_size(sdev, 26 + (id_page[3] * 2)))
-				return 2;
-			else {
-				strncat(name, sdev->vendor, 8);
-				strncat(name, sdev->model, 16);
-			}
-		} else if (scsi_check_id_size(sdev, 2 + (id_page[3] * 2)))
-			/*
-			 * Need 1 byte for the idtype, 1 for trailing
-			 * '\0', 8 for vendor, 16 for model total 26, plus
-			 * the name descriptor length.
-			 */
-			return 2;
+		while (i < 4 + id_page[3] && j < DEVICE_NAME_SIZE-1)
+			name[j++] = id_page[i++];
+	} else {
 		/*
 		 * Binary descriptor, convert to ASCII, using two bytes of
-		 * ASCII for each byte in the id_page. Store starting at
-		 * the end of name.
+		 * ASCII for each byte in the id_page.
 		 */
-		for(i = 4, j = strlen(name); i < 4 + id_page[3]; i++) {
+		while (i < 4 + id_page[3] && j < DEVICE_NAME_SIZE-2) {
 			name[j++] = hex_str[(id_page[i] & 0xf0) >> 4];
 			name[j++] = hex_str[id_page[i] & 0x0f];
+			i++;
 		}
-		return 0;
 	}
-	/*
-	 * Code set must have already matched.
-	 */
-	printk(KERN_ERR "scsi scan: scsi_check_fill_deviceid unexpected state.\n");
-	return 1;
+	return 0;
 }
 
 /**
@@ -834,7 +778,7 @@
  *     0: Failure
  *     1: Success
  **/
-int scsi_get_deviceid(Scsi_Device *sdev, Scsi_Request *sreq)
+static int scsi_get_deviceid(Scsi_Device *sdev, Scsi_Request *sreq)
 {
 	unsigned char *id_page;
 	unsigned char scsi_cmd[MAX_COMMAND_SIZE];
@@ -879,14 +823,14 @@
 	}
 
 	/*
-	 * Search for a match in the proiritized id_search_list.
+	 * Search for a match in the prioritized id_search_list.
 	 */
 	for (id_idx = 0; id_idx < ARRAY_SIZE(id_search_list); id_idx++) {
 		/*
 		 * Examine each descriptor returned. There is normally only
 		 * one or a small number of descriptors.
 		 */
-		for(scnt = 4; scnt <= id_page[3] + 3;
+		for (scnt = 4; scnt <= id_page[3] + 3;
 			scnt += id_page[scnt + 3] + 4) {
 			if ((scsi_check_fill_deviceid(sdev, &id_page[scnt],
 			     sdev->sdev_driverfs_dev.name,
@@ -941,12 +885,11 @@
 {
 	unsigned char *serialnumber_page;
 	unsigned char scsi_cmd[MAX_COMMAND_SIZE];
-	int max_lgth = 255;
+	const int max_lgth = 255;
+	int len;
 
- retry:
 	serialnumber_page = kmalloc(max_lgth, GFP_ATOMIC |
-			      (sdev->host->unchecked_isa_dma) ?
-			      GFP_DMA : 0);
+			      (sdev->host->unchecked_isa_dma) ? GFP_DMA : 0);
 	if (!serialnumber_page) {
 		printk(KERN_WARNING "scsi scan: Allocation failure identifying"
 		       " host %d channel %d id %d lun %d, device might be"
@@ -969,26 +912,19 @@
 
 	if (sreq->sr_result)
 		goto leave;
-	/*
-	 * check to see if response was truncated
-	 */
-	if (serialnumber_page[3] > max_lgth) {
-		max_lgth = serialnumber_page[3] + 4;
-		kfree(serialnumber_page);
-		goto retry;
-	}
 
 	/*
-	 * Need 1 byte for SCSI_UID_SER_NUM, 1 for trailing '\0', 8 for
-	 * vendor, 16 for model = 26, plus serial number size.
+	 * a check to see if response was truncated is superfluous,
+	 * since serialnumber_page[3] cannot be larger than 255
 	 */
-	if (scsi_check_id_size (sdev, (26 + serialnumber_page[3])))
-		goto leave;
+
 	sdev->sdev_driverfs_dev.name[0] = SCSI_UID_SER_NUM;
 	strncat(sdev->sdev_driverfs_dev.name, sdev->vendor, 8);
 	strncat(sdev->sdev_driverfs_dev.name, sdev->model, 16);
-	strncat(sdev->sdev_driverfs_dev.name, &serialnumber_page[4],
-		serialnumber_page[3]);
+	len = serialnumber_page[3];
+	if (len > DEVICE_NAME_SIZE-26)
+		len = DEVICE_NAME_SIZE-26;
+	strncat(sdev->sdev_driverfs_dev.name, &serialnumber_page[4], len);
 	kfree(serialnumber_page);
 	return 1;
  leave:
@@ -1002,23 +938,19 @@
  * @sdev:	get a default name for this device
  *
  * Description:
- *     Set the name of @sdev to the concatenation of the vendor, model,
- *     and revision found in @sdev.
+ *     Set the name of @sdev (of size DEVICE_NAME_SIZE > 29) to the
+ *     concatenation of the vendor, model, and revision found in @sdev.
  *
  * Return:
  *     1: Success
  **/
 int scsi_get_default_name(Scsi_Device *sdev)
 {
-	if (scsi_check_id_size(sdev, 29))
-		return 0;
-	else {
-		sdev->sdev_driverfs_dev.name[0] = SCSI_UID_UNKNOWN;
-		strncpy(&sdev->sdev_driverfs_dev.name[1], sdev->vendor, 8);
-		strncat(sdev->sdev_driverfs_dev.name, sdev->model, 16);
-		strncat(sdev->sdev_driverfs_dev.name, sdev->rev, 4);
-		return 1;
-	}
+	sdev->sdev_driverfs_dev.name[0] = SCSI_UID_UNKNOWN;
+	strncpy(&sdev->sdev_driverfs_dev.name[1], sdev->vendor, 8);
+	strncat(sdev->sdev_driverfs_dev.name, sdev->model, 16);
+	strncat(sdev->sdev_driverfs_dev.name, sdev->rev, 4);
+	return 1;
 }
 
 /**
@@ -1065,12 +997,12 @@
 		 * XXX search high to low, since the pages are lowest to
 		 * highest - page 0x83 will be after page 0x80.
 		 */
-		for(cnt = 4; cnt <= evpd_page[3] + 3; cnt++)
+		for (cnt = 4; cnt <= evpd_page[3] + 3; cnt++)
 			if (evpd_page[cnt] == 0x83)
 				if (scsi_get_deviceid(sdev, sreq))
 					goto leave;
 
-		for(cnt = 4; cnt <= evpd_page[3] + 3; cnt++)
+		for (cnt = 4; cnt <= evpd_page[3] + 3; cnt++)
 			if (evpd_page[cnt] == 0x80)
 				if (scsi_get_serialnumber(sdev, sreq))
 					goto leave;
diff -Nru a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
--- a/drivers/scsi/sr_ioctl.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/sr_ioctl.c	Wed Jan  8 20:04:44 2003
@@ -2,13 +2,13 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/fs.h>
-#include <asm/uaccess.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/blk.h>
 #include <linux/blkpg.h>
 #include <linux/cdrom.h>
 #include <asm/io.h>
+#include <asm/uaccess.h>
 
 #include "scsi.h"
 #include "hosts.h"
diff -Nru a/drivers/scsi/sym53c8xx_comm.h b/drivers/scsi/sym53c8xx_comm.h
--- a/drivers/scsi/sym53c8xx_comm.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/sym53c8xx_comm.h	Wed Jan  8 20:04:44 2003
@@ -265,6 +265,7 @@
 #if LINUX_VERSION_CODE >= LinuxVersionCode(2,2,0)
 
 typedef struct pci_dev *pcidev_t;
+typedef struct device *device_t;
 #define PCIDEV_NULL		(0)
 #define PciBusNumber(d)		(d)->bus->number
 #define PciDeviceFn(d)		(d)->devfn
@@ -312,6 +313,7 @@
 #else	/* Incomplete emulation of current PCI code for pre-2.2 kernels */
 
 typedef unsigned int pcidev_t;
+typedef unsinged int device_t;
 #define PCIDEV_NULL		(~0u)
 #define PciBusNumber(d)		((d)>>8)
 #define PciDeviceFn(d)		((d)&0xff)
@@ -564,7 +566,7 @@
 #define MEMO_CLUSTER_MASK	(MEMO_CLUSTER_SIZE-1)
 
 typedef u_long m_addr_t;	/* Enough bits to bit-hack addresses */
-typedef pcidev_t m_bush_t;	/* Something that addresses DMAable */
+typedef struct device *m_bush_t;	/* Something that addresses DMAable */
 
 typedef struct m_link {		/* Link between free memory chunks */
 	struct m_link *next;
@@ -793,7 +795,7 @@
 	vbp = __m_calloc(&mp0, sizeof(*vbp), "VTOB");
 	if (vbp) {
 		dma_addr_t daddr;
-		vp = (m_addr_t) pci_alloc_consistent(mp->bush,
+		vp = (m_addr_t) dma_alloc_coherent(mp->bush,
 						PAGE_SIZE<<MEMO_PAGE_ORDER,
 						&daddr);
 		if (vp) {
@@ -822,8 +824,8 @@
 	if (*vbpp) {
 		vbp = *vbpp;
 		*vbpp = (*vbpp)->next;
-		pci_free_consistent(mp->bush, PAGE_SIZE<<MEMO_PAGE_ORDER,
-				    (void *)vbp->vaddr, (dma_addr_t)vbp->baddr);
+		dma_free_coherent(mp->bush, PAGE_SIZE<<MEMO_PAGE_ORDER,
+				  (void *)vbp->vaddr, (dma_addr_t)vbp->baddr);
 		__m_free(&mp0, vbp, sizeof(*vbp), "VTOB");
 		--mp->nump;
 	}
@@ -917,11 +919,11 @@
 
 #endif	/* SCSI_NCR_DYNAMIC_DMA_MAPPING */
 
-#define _m_calloc_dma(np, s, n)		__m_calloc_dma(np->pdev, s, n)
-#define _m_free_dma(np, p, s, n)	__m_free_dma(np->pdev, p, s, n)
+#define _m_calloc_dma(np, s, n)		__m_calloc_dma(np->dev, s, n)
+#define _m_free_dma(np, p, s, n)	__m_free_dma(np->dev, p, s, n)
 #define m_calloc_dma(s, n)		_m_calloc_dma(np, s, n)
 #define m_free_dma(p, s, n)		_m_free_dma(np, p, s, n)
-#define _vtobus(np, p)			__vtobus(np->pdev, p)
+#define _vtobus(np, p)			__vtobus(np->dev, p)
 #define vtobus(p)			_vtobus(np, p)
 
 /*
@@ -932,10 +934,10 @@
 
 /* Linux versions prior to pci bus iommu kernel interface */
 
-#define __unmap_scsi_data(pdev, cmd)	do {; } while (0)
-#define __map_scsi_single_data(pdev, cmd) (__vtobus(pdev,(cmd)->request_buffer))
-#define __map_scsi_sg_data(pdev, cmd)	((cmd)->use_sg)
-#define __sync_scsi_data(pdev, cmd)	do {; } while (0)
+#define __unmap_scsi_data(dev, cmd)	do {; } while (0)
+#define __map_scsi_single_data(dev, cmd) (__vtobus(dev,(cmd)->request_buffer))
+#define __map_scsi_sg_data(dev, cmd)	((cmd)->use_sg)
+#define __sync_scsi_data(dev, cmd)	do {; } while (0)
 
 #define scsi_sg_dma_address(sc)		vtobus((sc)->address)
 #define scsi_sg_dma_len(sc)		((sc)->length)
@@ -948,31 +950,34 @@
 #define __data_mapped	SCp.phase
 #define __data_mapping	SCp.have_data_in
 
-static void __unmap_scsi_data(pcidev_t pdev, Scsi_Cmnd *cmd)
+static void __unmap_scsi_data(device_t dev, Scsi_Cmnd *cmd)
 {
-	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+	enum dma_data_direction dma_dir = 
+		(enum dma_data_direction)scsi_to_pci_dma_dir(cmd->sc_data_direction);
 
 	switch(cmd->__data_mapped) {
 	case 2:
-		pci_unmap_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+		dma_unmap_sg(dev, cmd->buffer, cmd->use_sg, dma_dir);
 		break;
 	case 1:
-		pci_unmap_single(pdev, cmd->__data_mapping,
+		dma_unmap_single(dev, cmd->__data_mapping,
 				 cmd->request_bufflen, dma_dir);
 		break;
 	}
 	cmd->__data_mapped = 0;
 }
 
-static u_long __map_scsi_single_data(pcidev_t pdev, Scsi_Cmnd *cmd)
+static u_long __map_scsi_single_data(device_t dev, Scsi_Cmnd *cmd)
 {
 	dma_addr_t mapping;
-	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+	enum dma_data_direction dma_dir = 
+		(enum dma_data_direction)scsi_to_pci_dma_dir(cmd->sc_data_direction);
+
 
 	if (cmd->request_bufflen == 0)
 		return 0;
 
-	mapping = pci_map_single(pdev, cmd->request_buffer,
+	mapping = dma_map_single(dev, cmd->request_buffer,
 				 cmd->request_bufflen, dma_dir);
 	cmd->__data_mapped = 1;
 	cmd->__data_mapping = mapping;
@@ -980,32 +985,34 @@
 	return mapping;
 }
 
-static int __map_scsi_sg_data(pcidev_t pdev, Scsi_Cmnd *cmd)
+static int __map_scsi_sg_data(device_t dev, Scsi_Cmnd *cmd)
 {
 	int use_sg;
-	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+	enum dma_data_direction dma_dir = 
+		(enum dma_data_direction)scsi_to_pci_dma_dir(cmd->sc_data_direction);
 
 	if (cmd->use_sg == 0)
 		return 0;
 
-	use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+	use_sg = dma_map_sg(dev, cmd->buffer, cmd->use_sg, dma_dir);
 	cmd->__data_mapped = 2;
 	cmd->__data_mapping = use_sg;
 
 	return use_sg;
 }
 
-static void __sync_scsi_data(pcidev_t pdev, Scsi_Cmnd *cmd)
+static void __sync_scsi_data(device_t dev, Scsi_Cmnd *cmd)
 {
-	int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
+	enum dma_data_direction dma_dir = 
+		(enum dma_data_direction)scsi_to_pci_dma_dir(cmd->sc_data_direction);
 
 	switch(cmd->__data_mapped) {
 	case 2:
-		pci_dma_sync_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+		dma_sync_sg(dev, cmd->buffer, cmd->use_sg, dma_dir);
 		break;
 	case 1:
-		pci_dma_sync_single(pdev, cmd->__data_mapping,
-				    cmd->request_bufflen, dma_dir);
+		dma_sync_single(dev, cmd->__data_mapping,
+				cmd->request_bufflen, dma_dir);
 		break;
 	}
 }
@@ -1015,10 +1022,10 @@
 
 #endif	/* SCSI_NCR_DYNAMIC_DMA_MAPPING */
 
-#define unmap_scsi_data(np, cmd)	__unmap_scsi_data(np->pdev, cmd)
-#define map_scsi_single_data(np, cmd)	__map_scsi_single_data(np->pdev, cmd)
-#define map_scsi_sg_data(np, cmd)	__map_scsi_sg_data(np->pdev, cmd)
-#define sync_scsi_data(np, cmd)		__sync_scsi_data(np->pdev, cmd)
+#define unmap_scsi_data(np, cmd)	__unmap_scsi_data(np->dev, cmd)
+#define map_scsi_single_data(np, cmd)	__map_scsi_single_data(np->dev, cmd)
+#define map_scsi_sg_data(np, cmd)	__map_scsi_sg_data(np->dev, cmd)
+#define sync_scsi_data(np, cmd)		__sync_scsi_data(np->dev, cmd)
 
 /*==========================================================
 **
@@ -1140,7 +1147,7 @@
 **==========================================================
 */
 typedef struct {
-	pcidev_t  pdev;
+	device_t  dev;
 	ncr_slot  slot;
 	ncr_chip  chip;
 	ncr_nvram *nvram;
@@ -2486,7 +2493,7 @@
  	/*
 	**    Initialise ncr_device structure with items required by ncr_attach.
 	*/
-	device->pdev		= pdev;
+	device->dev		= &pdev->dev;
 	device->slot.bus	= PciBusNumber(pdev);
 	device->slot.device_fn	= PciDeviceFn(pdev);
 	device->slot.base	= base;
diff -Nru a/drivers/scsi/sym53c8xx_defs.h b/drivers/scsi/sym53c8xx_defs.h
--- a/drivers/scsi/sym53c8xx_defs.h	Wed Jan  8 20:04:44 2003
+++ b/drivers/scsi/sym53c8xx_defs.h	Wed Jan  8 20:04:44 2003
@@ -51,6 +51,13 @@
 **  NVRAM detection and reading.
 **    Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
 **
+**  Added support for MIPS big endian systems.
+**    Carsten Langgaard, carstenl@mips.com
+**    Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
+**
+**  Added support for HP PARISC big endian systems.
+**    Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
+**
 *******************************************************************************
 */
 
@@ -78,8 +85,10 @@
 /*
  *	No more an option, enabled by default.
  */
-#ifndef CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
-#define CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
+#ifndef ENABLE_SCSI_ZALON
+# ifndef CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
+#  define CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
+# endif
 #endif
 
 /*
@@ -181,6 +190,8 @@
 #endif
 #elif defined(__sparc__)
 #undef SCSI_NCR_IOMAPPED
+#elif defined(__hppa__) && defined(ENABLE_SCSI_ZALON)
+#undef SCSI_NCR_IOMAPPED
 #endif
 
 /*
@@ -379,16 +390,24 @@
 #define	readb_raw	readb
 #define	writeb_raw	writeb
 
-#if defined(__hppa__)
-#define	readw_l2b(a)	le16_to_cpu(readw(a))
-#define	readl_l2b(a)	le32_to_cpu(readl(a))
-#define	writew_b2l(v,a)	writew(cpu_to_le16(v),a)
-#define	writel_b2l(v,a)	writel(cpu_to_le32(v),a)
-#else	/* Other bid-endian */
+#if defined(SCSI_NCR_BIG_ENDIAN)
+#define	readw_l2b	__raw_readw
+#define	readl_l2b	__raw_readl
+#define	writew_b2l	__raw_writew
+#define	writel_b2l	__raw_writel
+#define	readw_raw	__raw_readw
+#define	readl_raw(a)	__raw_readl((unsigned long)(a))
+#define	writew_raw	__raw_writew
+#define	writel_raw(v,a)	__raw_writel(v,(unsigned long)(a))
+#else	/* Other big-endian */
 #define	readw_l2b	readw
 #define	readl_l2b	readl
 #define	writew_b2l	writew
 #define	writel_b2l	writel
+#define	readw_raw	readw
+#define	readl_raw	readl
+#define	writew_raw	writew
+#define	writel_raw	writel
 #endif
 
 #else	/* little endian */
@@ -417,9 +436,11 @@
 #endif
 #endif
 
+#if !defined(__hppa__) && !defined(__mips__)
 #ifdef	SCSI_NCR_BIG_ENDIAN
 #error	"The NCR in BIG ENDIAN addressing mode is not (yet) supported"
 #endif
+#endif
 
 
 /*
@@ -572,10 +593,20 @@
 
 #else
 
+#ifdef ENABLE_SCSI_ZALON
+/* Only 8 or 32 bit transfers allowed */
+#define INW_OFF(o)		(readb((char *)np->reg + ncr_offw(o)) << 8 | readb((char *)np->reg + ncr_offw(o) + 1))
+#else
 #define INW_OFF(o)		readw_raw((char *)np->reg + ncr_offw(o))
+#endif
 #define INL_OFF(o)		readl_raw((char *)np->reg + (o))
 
+#ifdef ENABLE_SCSI_ZALON
+/* Only 8 or 32 bit transfers allowed */
+#define OUTW_OFF(o, val)	do { writeb((char)((val) >> 8), (char *)np->reg + ncr_offw(o)); writeb((char)(val), (char *)np->reg + ncr_offw(o) + 1); } while (0)
+#else
 #define OUTW_OFF(o, val)	writew_raw((val), (char *)np->reg + ncr_offw(o))
+#endif
 #define OUTL_OFF(o, val)	writel_raw((val), (char *)np->reg + (o))
 
 #endif
@@ -623,6 +654,10 @@
 **	NCR53C8XX Device Ids
 */
 
+#ifndef PSEUDO_ZALON_720_ID
+#define PSEUDO_ZALON_720_ID 0x5a00
+#endif
+
 #ifndef PCI_DEVICE_ID_NCR_53C810
 #define PCI_DEVICE_ID_NCR_53C810 1
 #endif
@@ -726,6 +761,9 @@
 #define FE_DAC	 	(1<<24)   /* Support DAC cycles (64 bit addressing) */
 #define FE_ISTAT1 	(1<<25)   /* Have ISTAT1, MBOX0, MBOX1 registers */
 #define FE_DAC_IN_USE	(1<<26)	  /* Platform does DAC cycles */
+#define FE_EHP		(1<<27)   /* 720: Even host parity */
+#define FE_MUX		(1<<28)   /* 720: Multiplexed bus */
+#define FE_EA		(1<<29)   /* 720: Enable Ack */
 
 #define FE_CACHE_SET	(FE_ERL|FE_CLSE|FE_WRIE|FE_ERMP)
 #define FE_SCSI_SET	(FE_WIDE|FE_ULTRA|FE_ULTRA2|FE_DBLR|FE_QUAD|F_CLK80)
@@ -747,6 +785,9 @@
 
 #define SCSI_NCR_CHIP_TABLE						\
 {									\
+ {PSEUDO_ZALON_720_ID, 0x0f, "720",  3,  8, 4,				\
+ FE_WIDE|FE_DIFF|FE_EHP|FE_MUX|FE_EA}					\
+ ,									\
  {PCI_DEVICE_ID_NCR_53C810, 0x0f, "810",  4,  8, 4,			\
  FE_ERL}								\
  ,									\
@@ -819,6 +860,7 @@
  */
 #define SCSI_NCR_CHIP_IDS		\
 {					\
+	PSEUDO_ZALON_720_ID,		\
 	PCI_DEVICE_ID_NCR_53C810,	\
 	PCI_DEVICE_ID_NCR_53C815,	\
 	PCI_DEVICE_ID_NCR_53C820,	\
@@ -1170,6 +1212,7 @@
 /*17*/  u_char    nc_mbox1;	/* 896 and later cores only */
 
 /*18*/	u_char	  nc_ctest0;
+	#define   EHP     0x04	/* 720 even host parity             */
 /*19*/  u_char    nc_ctest1;
 
 /*1a*/  u_char    nc_ctest2;
@@ -1187,6 +1230,7 @@
 
 /*20*/	u_char	  nc_dfifo;
 /*21*/  u_char    nc_ctest4;
+	#define   MUX     0x80  /* 720 host bus multiplex mode      */
 	#define   BDIS    0x80  /* mod: burst disable               */
 	#define   MPEE    0x08  /* mod: master parity error enable  */
 
@@ -1219,6 +1263,7 @@
 	#define   CLSE    0x80  /* mod: cache line size enable      */
 	#define   PFF     0x40  /* cmd: pre-fetch flush             */
 	#define   PFEN    0x20  /* mod: pre-fetch enable            */
+	#define   EA      0x20  /* mod: 720 enable-ack              */
 	#define   SSM     0x10  /* mod: single step mode            */
 	#define   IRQM    0x08  /* mod: irq mode (1 = totem pole !) */
 	#define   STD     0x04  /* cmd: start dma mode              */
@@ -1261,6 +1306,7 @@
 
 /*4e*/  u_char    nc_stest2;
 	#define   ROF     0x40	/* reset scsi offset (after gross error!) */
+	#define   DIF     0x20  /* 720 SCSI differential mode             */
 	#define   EXT     0x02  /* extended filtering                     */
 
 /*4f*/  u_char    nc_stest3;
@@ -1439,12 +1485,22 @@
 #define	SCR_SEL_TBL	0x42000000
 #define	SCR_SEL_TBL_ATN	0x43000000
 
+
+#ifdef SCSI_NCR_BIG_ENDIAN
+struct scr_tblsel {
+        u_char  sel_scntl3;
+        u_char  sel_id;
+        u_char  sel_sxfer;
+        u_char  sel_scntl4;	
+};
+#else
 struct scr_tblsel {
         u_char  sel_scntl4;	
         u_char  sel_sxfer;
         u_char  sel_id;
         u_char  sel_scntl3;
 };
+#endif
 
 #define SCR_JMP_REL     0x04000000
 #define SCR_ID(id)	(((u_int32)(id)) << 16)
diff -Nru a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/zalon.c	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,163 @@
+/*
+ * Zalon 53c7xx device driver.
+ * By Richard Hirst (rhirst@linuxcare.com)
+ */
+
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/stat.h>
+#include <linux/mm.h>
+#include <linux/blk.h>
+#include <linux/sched.h>
+#include <linux/version.h>
+#include <linux/config.h>
+#include <linux/module.h>
+
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/irq.h>
+#include <asm/hardware.h>
+#include <asm/delay.h>
+#include <asm/io.h>
+
+#include "../parisc/gsc.h"
+#include "scsi.h"
+#include "hosts.h"
+
+/*
+ * **      Define the BSD style u_int32 and u_int64 type.
+ * **      Are in fact u_int32_t and u_int64_t :-)
+ * */
+typedef u32 u_int32;
+typedef u64 u_int64;
+typedef u_long          vm_offset_t;
+
+#include "zalon.h"
+
+
+/* hosts_* are kluges to pass info between the zalon7xx_detected()
+** and the register_parisc_driver() callbacks.
+*/
+static Scsi_Host_Template *hosts_tptr;
+static int hosts_used=0;
+static int zalon_id = 0;
+
+extern int zalon_attach(Scsi_Host_Template *tpnt,
+			unsigned long base_addr,
+			struct parisc_device *dev,
+			int irq_vector,
+			int unit
+			);
+
+
+#if 0
+/* FIXME:
+ * Is this function dead code? or is someone planning on using it in the
+ * future.  The clock = (int) pdc_result[16] does not look correct to
+ * me ... I think it should be iodc_data[16].  Since this cause a compile
+ * error with the new encapsulated PDC, I'm not compiling in this function.
+ * - RB
+ */
+/* poke SCSI clock out of iodc data */
+
+static u8 iodc_data[32] __attribute__ ((aligned (64)));
+static unsigned long pdc_result[32] __attribute__ ((aligned (16))) ={0,0,0,0};
+
+static int 
+lasi_scsi_clock(void * hpa, int defaultclock)
+{
+	int clock, status;
+
+	status = pdc_iodc_read(&pdc_result, hpa, 0, &iodc_data, 32 );
+	if (status == PDC_RET_OK) {
+		clock = (int) pdc_result[16];
+	} else {
+		printk(KERN_WARNING "%s: pdc_iodc_read returned %d\n", __FUNCTION__, status);
+		clock = defaultclock; 
+	}
+
+	printk(KERN_DEBUG "%s: SCSI clock %d\n", __FUNCTION__, clock);
+ 	return clock;
+}
+#endif
+
+static int __init
+zalon_scsi_callback(struct parisc_device *dev)
+{
+	struct gsc_irq gsc_irq;
+	u32 zalon_vers;
+	int irq;
+	unsigned long zalon = dev->hpa;
+
+	__raw_writel(CMD_RESET, zalon + IO_MODULE_IO_COMMAND);
+	while (!(__raw_readl(zalon + IO_MODULE_IO_STATUS) & IOSTATUS_RY))
+		;
+	__raw_writel(IOIIDATA_MINT5EN | IOIIDATA_PACKEN | IOIIDATA_PREFETCHEN,
+		zalon + IO_MODULE_II_CDATA);
+
+	/* XXX: Save the Zalon version for bug workarounds? */
+	zalon_vers = __raw_readl(dev->hpa + IO_MODULE_II_CDATA) & 0x07000000;
+	zalon_vers >>= 24;
+
+	/* Setup the interrupts first.
+	** Later on request_irq() will register the handler.
+	*/
+        irq = gsc_alloc_irq(&gsc_irq);
+
+	printk("%s: Zalon vers field is 0x%x, IRQ %d\n", __FUNCTION__,
+		zalon_vers, irq);
+
+	__raw_writel(gsc_irq.txn_addr | gsc_irq.txn_data, dev->hpa + IO_MODULE_EIM);
+
+	if ( zalon_vers == 0)
+		printk(KERN_WARNING "%s: Zalon 1.1 or earlier\n", __FUNCTION__);
+
+	/*
+	**  zalon_attach: returns -1 on failure, 0 on success
+	*/
+	hosts_used = zalon_attach(hosts_tptr, dev->hpa + GSC_SCSI_ZALON_OFFSET,
+			dev, irq, zalon_id);
+
+	if (hosts_used == 0)
+		zalon_id++;
+
+	hosts_used = (hosts_used == 0);
+	return (hosts_used == 0);
+}
+
+static struct parisc_device_id zalon_tbl[] = {
+	{ HPHW_A_DMA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00089 }, 
+	{ 0, }
+};
+
+MODULE_DEVICE_TABLE(parisc, zalon_tbl);
+
+static struct parisc_driver zalon_driver = {
+	.name =		"GSC SCSI (Zalon)",
+	.id_table =	zalon_tbl,
+	.probe =	zalon_scsi_callback,
+};
+
+int zalon7xx_detect(Scsi_Host_Template *tpnt)
+{
+	/* "pass" the parameter to the callback functions */
+	hosts_tptr = tpnt;
+	hosts_used = 0;
+
+	/* claim all zalon cards. */
+	register_parisc_driver(&zalon_driver);
+
+	/* Check if any callbacks actually found/claimed anything. */
+	return (hosts_used != 0);
+}
+
+#ifdef MODULE
+extern int ncr53c8xx_release(struct Scsi_Host *host);
+
+int zalon7xx_release(struct Scsi_Host *host)
+{
+	ncr53c8xx_release(host);
+	unregister_parisc_driver(&zalon_driver);
+	return 1;
+}
+#endif
diff -Nru a/drivers/scsi/zalon.h b/drivers/scsi/zalon.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/zalon.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,43 @@
+#ifndef ZALON7XX_H
+#define ZALON7XX_H
+
+#include <linux/types.h>
+
+#include "sym53c8xx_defs.h"
+
+extern int zalon7xx_detect(Scsi_Host_Template *);
+
+#include <scsi/scsicam.h>
+
+extern struct proc_dir_entry proc_scsi_zalon7xx;
+
+/* borrowed from drivers/scsi/ncr53c8xx.h */
+int zalon7xx_detect(Scsi_Host_Template *tpnt);
+const char *ncr53c8xx_info(struct Scsi_Host *host);
+int ncr53c8xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+
+#ifdef MODULE
+int zalon7xx_release(struct Scsi_Host *);
+#else
+#define zalon7xx_release NULL
+#endif
+
+#define GSC_SCSI_ZALON_OFFSET 0x800
+
+#define IO_MODULE_EIM		(1*4)
+#define IO_MODULE_DC_ADATA	(2*4)
+#define IO_MODULE_II_CDATA	(3*4)
+#define IO_MODULE_IO_COMMAND	(12*4)
+#define IO_MODULE_IO_STATUS	(13*4)
+
+#define IOSTATUS_RY             0x40
+#define IOSTATUS_FE             0x80
+#define IOIIDATA_SMINT5L        0x40000000
+#define IOIIDATA_MINT5EN        0x20000000
+#define IOIIDATA_PACKEN         0x10000000
+#define IOIIDATA_PREFETCHEN     0x08000000
+#define IOIIDATA_IOII           0x00000020
+
+#define CMD_RESET		5
+
+#endif /* ZALON7XX_H */
diff -Nru a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c
--- a/drivers/serial/68360serial.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/serial/68360serial.c	Wed Jan  8 20:04:45 2003
@@ -36,7 +36,6 @@
 #include <linux/fcntl.h>
 #include <linux/ptrace.h>
 #include <linux/mm.h>
-#include <linux/malloc.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <asm/irq.h>
diff -Nru a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
--- a/drivers/serial/sunsab.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/serial/sunsab.c	Wed Jan  8 20:04:43 2003
@@ -47,8 +47,6 @@
 	struct uart_port		port;		/* Generic UART port	*/
 	union sab82532_async_regs	*regs;		/* Chip registers	*/
 	unsigned long			irqflags;	/* IRQ state flags	*/
-	int				xmit_fifo_size; /* TX fifo size		*/
-	int				recv_fifo_size; /* RX fifo size		*/
 	int				dsr;		/* Current DSR state	*/
 	unsigned int			cec_timeout;	/* Chip poll timeout... */
 	unsigned int			tec_timeout;	/* likewise		*/
@@ -57,8 +55,6 @@
 	unsigned char			pvr_dtr_bit;	/* Which PVR bit is DTR */
 	unsigned char			pvr_dsr_bit;	/* Which PVR bit is DSR */
 	int				type;		/* SAB82532 version	*/
-	int				sab_line;	/* Internal numbering	*/
-	unsigned int irq;				/* Device interrupt	*/
 };
 
 /*
@@ -76,6 +72,9 @@
 #define SAB82532_MAX_TEC_TIMEOUT 200000	/* 1 character time (at 50 baud) */
 #define SAB82532_MAX_CEC_TIMEOUT  50000	/* 2.5 TX CLKs (at 50 baud) */
 
+#define SAB82532_RECV_FIFO_SIZE	32      /* Standard async fifo sizes */
+#define SAB82532_XMIT_FIFO_SIZE	32
+
 static __inline__ void sunsab_tec_wait(struct uart_sunsab_port *up)
 {
 	int timeout = up->tec_timeout;
@@ -105,12 +104,12 @@
 
 	/* Read number of BYTES (Character + Status) available. */
 	if (stat->sreg.isr0 & SAB82532_ISR0_RPF) {
-		count = up->recv_fifo_size;
+		count = SAB82532_RECV_FIFO_SIZE;
 		free_fifo++;
 	}
 
 	if (stat->sreg.isr0 & SAB82532_ISR0_TCD) {
-		count = readb(&up->regs->r.rbcl) & (up->recv_fifo_size - 1);
+		count = readb(&up->regs->r.rbcl) & (SAB82532_RECV_FIFO_SIZE - 1);
 		free_fifo++;
 	}
 
@@ -246,13 +245,13 @@
 		return;
 	}
 
-	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS);
+	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
 	writeb(up->interrupt_mask1, &up->regs->w.imr1);
 	clear_bit(SAB82532_ALLS, &up->irqflags);
 
 	/* Stuff 32 bytes into Transmit FIFO. */
 	clear_bit(SAB82532_XPR, &up->irqflags);
-	for (i = 0; i < up->xmit_fifo_size; i++) {
+	for (i = 0; i < up->port.fifosize; i++) {
 		writeb(xmit->buf[xmit->tail],
 		       &up->regs->w.xfifo[i]);
 		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
@@ -422,15 +421,16 @@
 	struct circ_buf *xmit = &up->port.info->xmit;
 	int i;
 
+	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
+	writeb(up->interrupt_mask1, &up->regs->w.imr1);
+	
 	if (!test_bit(SAB82532_XPR, &up->irqflags))
 		return;
 
-	up->interrupt_mask1 &= ~SAB82532_IMR1_XPR;
-	writeb(up->interrupt_mask1, &up->regs->w.imr1);
 	clear_bit(SAB82532_ALLS, &up->irqflags);
 	clear_bit(SAB82532_XPR, &up->irqflags);
 
-	for (i = 0; i < up->xmit_fifo_size; i++) {
+	for (i = 0; i < up->port.fifosize; i++) {
 		writeb(xmit->buf[xmit->tail],
 		       &up->regs->w.xfifo[i]);
 		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
@@ -533,34 +533,8 @@
 	writeb(SAB82532_CCR4_MCK4 | SAB82532_CCR4_EBRG, &up->regs->w.ccr4);
 	writeb(SAB82532_MODE_RTS | SAB82532_MODE_FCTS |
 	       SAB82532_MODE_RAC, &up->regs->w.mode);
-	writeb(SAB82532_RFC_DPS | SAB82532_RFC_RFDF, &up->regs->w.rfc);
-
-	switch (up->recv_fifo_size) {
-		case 1:
-			tmp = readb(&up->regs->w.rfc);
-			tmp |= SAB82532_RFC_RFTH_1;
-			writeb(tmp, &up->regs->w.rfc);
-			break;
-		case 4:
-			tmp = readb(&up->regs->w.rfc);
-			tmp |= SAB82532_RFC_RFTH_4;
-			writeb(tmp, &up->regs->w.rfc);
-			break;
-		case 16:
-			tmp = readb(&up->regs->w.rfc);
-			tmp |= SAB82532_RFC_RFTH_16;
-			writeb(tmp, &up->regs->w.rfc);
-			break;
-		default:
-			up->recv_fifo_size = 32;
-			/* fall through */
-		case 32:
-			tmp = readb(&up->regs->w.rfc);
-			tmp |= SAB82532_RFC_RFTH_32;
-			writeb(tmp, &up->regs->w.rfc);
-			break;
-	};
-
+	writeb(SAB82532_RFC_DPS|SAB82532_RFC_RFTH_32, &up->regs->w.rfc);
+	
 	tmp = readb(&up->regs->rw.ccr0);
 	tmp |= SAB82532_CCR0_PU;	/* power-up */
 	writeb(tmp, &up->regs->rw.ccr0);
@@ -796,7 +770,11 @@
 
 static const char *sunsab_type(struct uart_port *port)
 {
-	return "SunSAB";
+	struct uart_sunsab_port *up = (void *)port;
+	static char buf[36];
+	
+	sprintf(buf, "SAB82532 %s", sab82532_version[up->type]);
+	return buf;
 }
 
 static void sunsab_release_port(struct uart_port *port)
@@ -1011,22 +989,25 @@
 	unsigned long regs, offset;
 	int i;
 
+	/* Note: ports are located in reverse order */
 	regs = edev->resource[0].start;
 	offset = sizeof(union sab82532_async_regs);
 	for (i = 0; i < 2; i++) {
-		up = &sunsab_ports[(*instance_p * 2) + i];
+		up = &sunsab_ports[(*instance_p * 2) + 1 - i];
 
 		memset(up, 0, sizeof(*up));
 		up->regs = ioremap(regs + offset, sizeof(union sab82532_async_regs));
-		up->irq = edev->irqs[0];
-		up->sab_line = 1 - i;
-		up->xmit_fifo_size = 32;
-		up->recv_fifo_size = 32;
+		up->port.irq = edev->irqs[0];
+		up->port.fifosize = SAB82532_XMIT_FIFO_SIZE;
+		up->port.mapbase = (unsigned long)up->regs;
+		up->port.iotype = SERIAL_IO_MEM;
 
 		writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc);
 
 		offset -= sizeof(union sab82532_async_regs);
 	}
+	
+	(*instance_p)++;
 }
 
 static int __init probe_for_sabs(void)
@@ -1066,7 +1047,7 @@
 		up->type = readb(&up->regs->r.vstr) & 0x0f;
 		writeb(~((1 << 1) | (1 << 2) | (1 << 4)), &up->regs->w.pcr);
 		writeb(0xff, &up->regs->w.pim);
-		if (up->sab_line == 0) {
+		if (up->port.line == 0) {
 			up->pvr_dsr_bit = (1 << 0);
 			up->pvr_dtr_bit = (1 << 1);
 		} else {
@@ -1082,19 +1063,14 @@
 		up->tec_timeout = SAB82532_MAX_TEC_TIMEOUT;
 		up->cec_timeout = SAB82532_MAX_CEC_TIMEOUT;
 
-		if (!(up->sab_line & 0x01)) {
-			if (request_irq(up->irq, sunsab_interrupt, SA_SHIRQ,
-					"serial(sab82532)", up)) {
+		if (!(up->port.line & 0x01)) {
+			if (request_irq(up->port.irq, sunsab_interrupt,
+			                SA_SHIRQ, "serial(sab82532)", up)) {
 				printk("sunsab%d: can't get IRQ %x\n",
-				       i, up->irq);
+				       i, up->port.irq);
 				continue;
 			}
 		}
-	
-		printk(KERN_INFO
-		       "sunsab%d at 0x%lx (irq = %s) is a SAB82532 %s\n",
-		       i, (unsigned long)up->regs,
-		       __irq_itoa(up->irq), sab82532_version[up->type]);
 	}
 }
 
@@ -1109,8 +1085,6 @@
 	sunsab_init_hw();
 
 	sunsab_reg.minor = sunserial_current_minor;
-	sunserial_current_minor += num_channels;
-
 	sunsab_reg.nr = num_channels;
 	sunsab_reg.cons = &sunsab_console;
 
@@ -1121,8 +1095,8 @@
 		for (i = 0; i < num_channels; i++) {
 			struct uart_sunsab_port *up = &sunsab_ports[i];
 
-			if (!(up->sab_line & 0x01))
-				free_irq(up->irq, up);
+			if (!(up->port.line & 0x01))
+				free_irq(up->port.irq, up);
 			iounmap(up->regs);
 		}
 		kfree(sunsab_ports);
@@ -1131,6 +1105,8 @@
 		return ret;
 	}
 
+	sunserial_current_minor += num_channels;
+	
 	for (i = 0; i < num_channels; i++) {
 		struct uart_sunsab_port *up = &sunsab_ports[i];
 
@@ -1151,11 +1127,12 @@
 
 		uart_remove_one_port(&sunsab_reg, &up->port);
 
-		if (!(up->sab_line & 0x01))
-			free_irq(up->irq, up);
+		if (!(up->port.line & 0x01))
+			free_irq(up->port.irq, up);
 		iounmap(up->regs);
 	}
 
+	sunserial_current_minor -= num_channels;
 	uart_unregister_driver(&sunsab_reg);
 
 	kfree(sunsab_ports);
diff -Nru a/drivers/sgi/char/streamable.c b/drivers/sgi/char/streamable.c
--- a/drivers/sgi/char/streamable.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/sgi/char/streamable.c	Wed Jan  8 20:04:43 2003
@@ -309,10 +309,27 @@
 void
 streamable_init (void)
 {
-	printk ("streamable misc devices registered (keyb:%d, gfx:%d)\n",
+	if (misc_register (&dev_gfx) < 0) {
+		printk(KERN_ERR
+			"streamable: cannot register gfx misc device.\n");
+		return;
+	}
+
+	if (misc_register (&dev_input_keyboard) < 0) {
+		printk(KERN_ERR
+			"streamable: cannot register keyboard misc device.\n");
+		misc_deregister(&dev_gfx);
+		return;
+	}
+
+	if (misc_register (&dev_input_mouse) < 0) {
+		printk(KERN_ERR
+			"streamable: cannot register mouse misc device.\n");
+		misc_deregister(&dev_input_keyboard);
+		misc_deregister(&dev_gfx);
+		return;
+	}
+
+	printk ("streamable: misc devices registered (keyb:%d, gfx:%d)\n",
 		SGI_STREAMS_KEYBOARD, SGI_GFX_MINOR);
-	
-	misc_register (&dev_gfx);
-	misc_register (&dev_input_keyboard);
-	misc_register (&dev_input_mouse);
 }
diff -Nru a/drivers/sgi/char/usema.c b/drivers/sgi/char/usema.c
--- a/drivers/sgi/char/usema.c	Wed Jan  8 20:04:43 2003
+++ b/drivers/sgi/char/usema.c	Wed Jan  8 20:04:43 2003
@@ -176,9 +176,12 @@
 void
 usema_init(void)
 {
+	if (misc_register(&dev_usemaclone) < 0) {
+		printk(KERN_ERR "usemaclone: cannot register misc device.\n");
+		return;
+	}
 	printk("usemaclone misc device registered (minor: %d)\n",
-	       SGI_USEMACLONE);
-	misc_register(&dev_usemaclone);
+		SGI_USEMACLONE);
 }
 
 EXPORT_SYMBOL(usema_init);
diff -Nru a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
--- a/drivers/telephony/ixj.c	Wed Jan  8 20:04:32 2003
+++ b/drivers/telephony/ixj.c	Wed Jan  8 20:04:32 2003
@@ -6906,21 +6906,19 @@
 				/*  Internet PhoneJack Lite */
 			 {
 				j->cardtype = QTI_PHONEJACK_LITE;
-				if (check_region(j->XILINXbase, 4)) {
+				if (!request_region(j->XILINXbase, 4, "ixj control")) {
 					printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
 					return -1;
 				}
-				request_region(j->XILINXbase, 4, "ixj control");
 				j->pld_slicw.pcib.e1 = 1;
 				outb_p(j->pld_slicw.byte, j->XILINXbase);
 			} else {
 				j->cardtype = QTI_LINEJACK;
 
-				if (check_region(j->XILINXbase, 8)) {
+				if (!request_region(j->XILINXbase, 8, "ixj control")) {
 					printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
 					return -1;
 				}
-				request_region(j->XILINXbase, 8, "ixj control");
 			}
 		} else if (j->dsp.low == 0x22) {
 			j->cardtype = QTI_PHONEJACK_PCI;
@@ -6941,19 +6939,17 @@
 			}
 			break;
 		case QTI_LINEJACK:
-			if (check_region(j->XILINXbase, 8)) {
+			if (!request_region(j->XILINXbase, 8, "ixj control")) {
 				printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
 				return -1;
 			}
-			request_region(j->XILINXbase, 8, "ixj control");
 			break;
 		case QTI_PHONEJACK_LITE:
 		case QTI_PHONEJACK_PCI:
-			if (check_region(j->XILINXbase, 4)) {
+			if (!request_region(j->XILINXbase, 4, "ixj control")) {
 				printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
 				return -1;
 			}
-			request_region(j->XILINXbase, 4, "ixj control");
 			j->pld_slicw.pcib.e1 = 1;
 			outb_p(j->pld_slicw.byte, j->XILINXbase);
 			break;
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/usb/core/hcd.c	Wed Jan  8 20:04:44 2003
@@ -35,6 +35,7 @@
 #include <linux/completion.h>
 #include <linux/uts.h>			/* for UTS_SYSNAME */
 #include <linux/pci.h>			/* for hcd->pdev and dma addressing */
+#include <linux/dma-mapping.h>
 #include <asm/byteorder.h>
 
 #include <linux/usb.h>
diff -Nru a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
--- a/drivers/usb/host/ohci-dbg.c	Wed Jan  8 20:04:45 2003
+++ b/drivers/usb/host/ohci-dbg.c	Wed Jan  8 20:04:45 2003
@@ -355,7 +355,7 @@
 			scratch,
 			(info & ED_SKIP) ? " s" : "",
 			(ed->hwHeadP & ED_H) ? " H" : "",
-			(ed->hwHeadP & ED_C) ? data1 : data0);
+			(ed->hwHeadP & ED_C) ? "data1" : "data0");
 		size -= temp;
 		buf += temp;
 
diff -Nru a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
--- a/drivers/usb/input/Kconfig	Wed Jan  8 20:04:44 2003
+++ b/drivers/usb/input/Kconfig	Wed Jan  8 20:04:44 2003
@@ -181,6 +181,6 @@
 
 	  This driver is also available as a module ( = code which can be
 	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called wacom.o.  If you want to compile it as a
+	  The module will be called xpad.o.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c
--- a/drivers/video/fbmem.c	Wed Jan  8 20:04:31 2003
+++ b/drivers/video/fbmem.c	Wed Jan  8 20:04:31 2003
@@ -386,6 +386,7 @@
 	palette_cmap.red = palette_red;
 	palette_cmap.green = palette_green;
 	palette_cmap.blue = palette_blue;
+	palette_cmap.transp = NULL;
 
 	for (i = 0; i < LINUX_LOGO_COLORS; i += n) {
 		n = LINUX_LOGO_COLORS - i;
@@ -767,6 +768,7 @@
 int
 fb_blank(int blank, struct fb_info *info)
 {	
+	/* ??? Varible sized stack allocation.  */
 	u16 black[info->cmap.len];
 	struct fb_cmap cmap;
 	
@@ -775,8 +777,7 @@
 	if (blank) { 
 		memset(black, 0, info->cmap.len * sizeof(u16));
 		cmap.red = cmap.green = cmap.blue = black;
-		if (info->cmap.transp)
-			cmap.transp = black;
+		cmap.transp = info->cmap.transp ? black : NULL;
 		cmap.start = info->cmap.start;
 		cmap.len = info->cmap.len;
 	} else
diff -Nru a/drivers/video/tgafb.c b/drivers/video/tgafb.c
--- a/drivers/video/tgafb.c	Wed Jan  8 20:04:44 2003
+++ b/drivers/video/tgafb.c	Wed Jan  8 20:04:44 2003
@@ -41,6 +41,8 @@
 static void tgafb_init_fix(struct fb_info *);
 
 static void tgafb_imageblit(struct fb_info *, struct fb_image *);
+static void tgafb_fillrect(struct fb_info *, struct fb_fillrect *);
+static void tgafb_copyarea(struct fb_info *, struct fb_copyarea *);
 
 static int tgafb_pci_register(struct pci_dev *, const struct pci_device_id *);
 #ifdef MODULE
@@ -60,8 +62,8 @@
 	.fb_set_par		= tgafb_set_par,
 	.fb_setcolreg		= tgafb_setcolreg,
 	.fb_blank		= tgafb_blank,
-	.fb_fillrect		= cfb_fillrect,
-	.fb_copyarea		= cfb_copyarea,
+	.fb_fillrect		= tgafb_fillrect,
+	.fb_copyarea		= tgafb_copyarea,
 	.fb_imageblit		= tgafb_imageblit,
 	.fb_cursor		= soft_cursor,
 };
@@ -95,10 +97,10 @@
 	struct tga_par *par = (struct tga_par *)info->par;
 
 	if (par->tga_type == TGA_TYPE_8PLANE) {
-		if (var->bits_per_pixel > 8)
+		if (var->bits_per_pixel != 8)
 			return -EINVAL;
 	} else {
-		if (var->bits_per_pixel > 32)
+		if (var->bits_per_pixel != 32)
 			return -EINVAL;
 	}
 
@@ -111,6 +113,11 @@
 	if ((var->vmode & FB_VMODE_MASK) != FB_VMODE_NONINTERLACED)
 		return -EINVAL;
 
+	/* Some of the acceleration routines assume the line width is
+	   a multiple of 64 bytes.  */
+	if (var->xres * (par->tga_type == TGA_TYPE_8PLANE ? 1 : 4) % 64)
+		return -EINVAL;
+
 	return 0;
 }
 
@@ -203,8 +210,6 @@
 	/* Write some more registers.  */
 	TGA_WRITE_REG(par, 0xffffffff, TGA_PLANEMASK_REG);
 	TGA_WRITE_REG(par, 0xffffffff, TGA_PIXELMASK_REG);
-	TGA_WRITE_REG(par, 0x12345678, TGA_BLOCK_COLOR0_REG);
-	TGA_WRITE_REG(par, 0x12345678, TGA_BLOCK_COLOR1_REG);
 
 	/* Init video timing regs.  */
 	TGA_WRITE_REG(par, htimings, TGA_HORIZ_REG);
@@ -506,6 +511,14 @@
  *  Acceleration.
  */
 
+/**
+ *      tgafb_imageblit - REQUIRED function. Can use generic routines if
+ *                        non acclerated hardware and packed pixel based.
+ *                        Copies a image from system memory to the screen. 
+ *
+ *      @info: frame buffer structure that represents a single frame buffer
+ *      @image: structure defining the image.
+ */
 static void
 tgafb_imageblit(struct fb_info *info, struct fb_image *image)
 {
@@ -547,7 +560,7 @@
 	struct tga_par *par = (struct tga_par *) info->par;
 	u32 fgcolor, bgcolor, dx, dy, width, height, vxres, vyres, pixelmask;
 	unsigned long rincr, line_length, shift, pos, is8bpp;
-	unsigned long i, j, k;
+	unsigned long i, j;
 	const unsigned char *data;
 	void *regs_base, *fb_base;
 
@@ -579,7 +592,7 @@
 
 	regs_base = par->tga_regs_base;
 	fb_base = par->tga_fb_base;
-	is8bpp = par->tga_type == TGA_TYPE_8PLANE;
+	is8bpp = info->var.bits_per_pixel == 8;
 
 	/* Expand the color values to fill 32-bits.  */
 	/* ??? Would be nice to notice colour changes elsewhere, so
@@ -592,19 +605,23 @@
 		bgcolor |= bgcolor << 8;
 		bgcolor |= bgcolor << 16;
 	} else {
-		fgcolor = ((u32 *)info->pseudo_palette)[fgcolor];
-		bgcolor = ((u32 *)info->pseudo_palette)[bgcolor];
+		if (fgcolor < 16)
+			fgcolor = ((u32 *)info->pseudo_palette)[fgcolor];
+		if (bgcolor < 16)
+			bgcolor = ((u32 *)info->pseudo_palette)[bgcolor];
 	}
 	__raw_writel(fgcolor, regs_base + TGA_FOREGROUND_REG);
 	__raw_writel(bgcolor, regs_base + TGA_BACKGROUND_REG);
 
 	/* Acquire proper alignment; set up the PIXELMASK register
 	   so that we only write the proper character cell.  */
-	pos = dy * line_length + dx;
+	pos = dy * line_length;
 	if (is8bpp) {
+		pos += dx;
 		shift = pos & 3;
 		pos &= -4;
 	} else {
+		pos += dx * 4;
 		shift = (pos & 7) >> 2;
 		pos &= -8;
 	}
@@ -663,8 +680,10 @@
 		for (i = 0; i < height; ++i) {
 			for (j = 0; j < bwidth; j += 4) {
 				u32 mask = 0;
-				for (k = 0; k < 4; ++k)
-					mask |= bitrev[data[j+k]] << (k * 8);
+				mask |= bitrev[data[j+0]] << (0 * 8);
+				mask |= bitrev[data[j+1]] << (1 * 8);
+				mask |= bitrev[data[j+2]] << (2 * 8);
+				mask |= bitrev[data[j+3]] << (3 * 8);
 				__raw_writel(mask, fb_base + pos + j*bincr);
 			}
 			pos += line_length;
@@ -683,8 +702,8 @@
 
 			for (i = 0; i < height; ++i) {
 				u32 mask = 0;
-				for (k = 0; k < bwidth; ++k)
-					mask |= bitrev[data[k]] << (k * 8);
+				for (j = 0; j < bwidth; ++j)
+					mask |= bitrev[data[j]] << (j * 8);
 				__raw_writel(mask, fb_base + pos);
 				pos += line_length;
 				data += rincr;
@@ -710,9 +729,9 @@
 		bwidth = (width / 8) & -2;
 		for (i = 0; i < height; ++i) {
 			for (j = 0; j < bwidth; j += 2) {
-				u32 mask;
-				mask = bitrev[data[j]];
-				mask |= bitrev[data[j+1]] << 8;
+				u32 mask = 0;
+				mask |= bitrev[data[j+0]] << (0 * 8);
+				mask |= bitrev[data[j+1]] << (1 * 8);
 				mask <<= shift;
 				__raw_writel(mask, fb_base + pos + j*bincr);
 			}
@@ -751,6 +770,552 @@
 		     regs_base + TGA_MODE_REG);
 }
 
+/**
+ *      tgafb_fillrect - REQUIRED function. Can use generic routines if 
+ *                       non acclerated hardware and packed pixel based.
+ *                       Draws a rectangle on the screen.               
+ *
+ *      @info: frame buffer structure that represents a single frame buffer
+ *      @rect: structure defining the rectagle and operation.
+ */
+static void
+tgafb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
+{
+	struct tga_par *par = (struct tga_par *) info->par;
+	int is8bpp = info->var.bits_per_pixel == 8;
+	u32 dx, dy, width, height, vxres, vyres, color;
+	unsigned long pos, align, line_length, i, j;
+	void *regs_base, *fb_base;
+
+	dx = rect->dx;
+	dy = rect->dy;
+	width = rect->width;
+	height = rect->height;
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
+	line_length = info->fix.line_length;
+	regs_base = par->tga_regs_base;
+	fb_base = par->tga_fb_base;
+
+	/* Crop the rectangle to the screen.  */
+	if (dx > vxres || dy > vyres || !width || !height)
+		return;
+	if (dx + width > vxres)
+		width = vxres - dx;
+	if (dy + height > vyres)
+		height = vyres - dy;
+
+	pos = dy * line_length + dx * (is8bpp ? 1 : 4);
+
+	/* ??? We could implement ROP_XOR with opaque fill mode
+	   and a RasterOp setting of GXxor, but as far as I can
+	   tell, this mode is not actually used in the kernel.
+	   Thus I am ignoring it for now.  */
+	if (rect->rop != ROP_COPY) {
+		cfb_fillrect(info, rect);
+		return;
+	}
+
+	/* Expand the color value to fill 8 pixels.  */
+	color = rect->color;
+	if (is8bpp) {
+		color |= color << 8;
+		color |= color << 16;
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR0_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR1_REG);
+	} else {
+		if (color < 16)
+			color = ((u32 *)info->pseudo_palette)[color];
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR0_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR1_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR2_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR3_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR4_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR5_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR6_REG);
+		__raw_writel(color, regs_base + TGA_BLOCK_COLOR7_REG);
+	}
+
+	/* The DATA register holds the fill mask for block fill mode.
+	   Since we're not stippling, this is all ones.  */
+	__raw_writel(0xffffffff, regs_base + TGA_DATA_REG);
+
+	/* Enable block fill mode.  */
+	__raw_writel((is8bpp
+		      ? TGA_MODE_SBM_8BPP | TGA_MODE_BLOCK_FILL
+		      : TGA_MODE_SBM_24BPP | TGA_MODE_BLOCK_FILL),
+		     regs_base + TGA_MODE_REG);
+	wmb();
+
+	/* We can fill 2k pixels per operation.  Notice blocks that fit
+	   the width of the screen so that we can take advantage of this
+	   and fill more than one line per write.  */
+	if (width == line_length)
+		width *= height, height = 1;
+
+	/* The write into the frame buffer must be aligned to 4 bytes,
+	   but we are allowed to encode the offset within the word in
+	   the data word written.  */
+	align = (pos & 3) << 16;
+	pos &= -4;
+
+	if (width <= 2048) {
+		u32 data;
+
+		data = (width - 1) | align;
+
+		for (i = 0; i < height; ++i) {
+			__raw_writel(data, fb_base + pos);
+			pos += line_length;
+		}
+	} else {
+		unsigned long Bpp = (is8bpp ? 1 : 4);
+		unsigned long nwidth = width & -2048;
+		u32 fdata, ldata;
+
+		fdata = (2048 - 1) | align;
+		ldata = ((width & 2047) - 1) | align;
+
+		for (i = 0; i < height; ++i) {
+			for (j = 0; j < nwidth; j += 2048)
+				__raw_writel(fdata, fb_base + pos + j*Bpp);
+			if (j < width)
+				__raw_writel(ldata, fb_base + pos + j*Bpp);
+			pos += line_length;
+		}
+	}
+	wmb();
+
+	/* Disable block fill mode.  */
+	__raw_writel((is8bpp
+		      ? TGA_MODE_SBM_8BPP | TGA_MODE_SIMPLE
+		      : TGA_MODE_SBM_24BPP | TGA_MODE_SIMPLE),
+		     regs_base + TGA_MODE_REG);
+}
+
+/**
+ *      tgafb_copyarea - REQUIRED function. Can use generic routines if
+ *                       non acclerated hardware and packed pixel based.
+ *                       Copies on area of the screen to another area.
+ *
+ *      @info: frame buffer structure that represents a single frame buffer
+ *      @area: structure defining the source and destination.
+ */
+
+/* Handle the special case of copying entire lines, e.g. during scrolling.
+   We can avoid a lot of needless computation in this case.  In the 8bpp
+   case we need to use the COPY64 registers instead of mask writes into 
+   the frame buffer to achieve maximum performance.  */
+
+static inline void
+copyarea_line_8bpp(struct fb_info *info, u32 dy, u32 sy,
+		   u32 height, u32 width)
+{
+	struct tga_par *par = (struct tga_par *) info->par;
+	void *tga_regs = par->tga_regs_base;
+	unsigned long dpos, spos, i, n64;
+
+	/* Set up the MODE and PIXELSHIFT registers.  */
+	__raw_writel(TGA_MODE_SBM_8BPP | TGA_MODE_COPY, tga_regs+TGA_MODE_REG);
+	__raw_writel(0, tga_regs+TGA_PIXELSHIFT_REG);
+	wmb();
+
+	n64 = (height * width) / 64;
+
+	if (dy < sy) {
+		spos = (sy + height) * width;
+		dpos = (dy + height) * width;
+
+		for (i = 0; i < n64; ++i) {
+			spos -= 64;
+			dpos -= 64;
+			__raw_writel(spos, tga_regs+TGA_COPY64_SRC);
+			wmb();
+			__raw_writel(dpos, tga_regs+TGA_COPY64_DST);
+			wmb();
+		}
+	} else {
+		spos = sy * width;
+		dpos = dy * width;
+
+		for (i = 0; i < n64; ++i) {
+			__raw_writel(spos, tga_regs+TGA_COPY64_SRC);
+			wmb();
+			__raw_writel(dpos, tga_regs+TGA_COPY64_DST);
+			wmb();
+			spos += 64;
+			dpos += 64;
+		}
+	}
+
+	/* Reset the MODE register to normal.  */
+	__raw_writel(TGA_MODE_SBM_8BPP|TGA_MODE_SIMPLE, tga_regs+TGA_MODE_REG);
+}
+
+static inline void
+copyarea_line_32bpp(struct fb_info *info, u32 dy, u32 sy,
+		    u32 height, u32 width)
+{
+	struct tga_par *par = (struct tga_par *) info->par;
+	void *tga_regs = par->tga_regs_base;
+	void *tga_fb = par->tga_fb_base;
+	void *src, *dst;
+	unsigned long i, n16;
+
+	/* Set up the MODE and PIXELSHIFT registers.  */
+	__raw_writel(TGA_MODE_SBM_24BPP | TGA_MODE_COPY, tga_regs+TGA_MODE_REG);
+	__raw_writel(0, tga_regs+TGA_PIXELSHIFT_REG);
+	wmb();
+
+	n16 = (height * width) / 16;
+
+	if (dy < sy) {
+		src = tga_fb + (sy + height) * width * 4;
+		dst = tga_fb + (dy + height) * width * 4;
+
+		for (i = 0; i < n16; ++i) {
+			src -= 64;
+			dst -= 64;
+			__raw_writel(0xffff, src);
+			wmb();
+			__raw_writel(0xffff, dst);
+			wmb();
+		}
+	} else {
+		src = tga_fb + sy * width * 4;
+		dst = tga_fb + dy * width * 4;
+
+		for (i = 0; i < n16; ++i) {
+			__raw_writel(0xffff, src);
+			wmb();
+			__raw_writel(0xffff, dst);
+			wmb();
+			src += 64;
+			dst += 64;
+		}
+	}
+
+	/* Reset the MODE register to normal.  */
+	__raw_writel(TGA_MODE_SBM_24BPP|TGA_MODE_SIMPLE, tga_regs+TGA_MODE_REG);
+}
+
+/* The general case of forward copy in 8bpp mode.  */
+static inline void
+copyarea_foreward_8bpp(struct fb_info *info, u32 dx, u32 dy, u32 sx, u32 sy,
+		       u32 height, u32 width, u32 line_length)
+{
+	struct tga_par *par = (struct tga_par *) info->par;
+	unsigned long i, copied, left;
+	unsigned long dpos, spos, dalign, salign, yincr;
+	u32 smask_first, dmask_first, dmask_last;
+	int pixel_shift, need_prime, need_second;
+	unsigned long n64, n32, xincr_first;
+	void *tga_regs, *tga_fb;
+
+	yincr = line_length;
+	if (dy > sy) {
+		dy += height - 1;
+		sy += height - 1;
+		yincr = -yincr;
+	}
+
+	/* Compute the offsets and alignments in the frame buffer.
+	   More than anything else, these control how we do copies.  */
+	dpos = dy * line_length + dx;
+	spos = sy * line_length + sx;
+	dalign = dpos & 7;
+	salign = spos & 7;
+	dpos &= -8;
+	spos &= -8;
+
+	/* Compute the value for the PIXELSHIFT register.  This controls
+	   both non-co-aligned source and destination and copy direction.  */
+	if (dalign >= salign)
+		pixel_shift = dalign - salign;
+	else
+		pixel_shift = 8 - (salign - dalign);
+
+	/* Figure out if we need an additional priming step for the
+	   residue register.  */
+	need_prime = (salign > dalign);
+	if (need_prime)
+		dpos -= 8;
+
+	/* Begin by copying the leading unaligned destination.  Copy enough
+	   to make the next destination address 32-byte aligned.  */
+	copied = 32 - (dalign + (dpos & 31));
+	if (copied == 32)
+		copied = 0;
+	xincr_first = (copied + 7) & -8;
+	smask_first = dmask_first = (1ul << copied) - 1;
+	smask_first <<= salign;
+	dmask_first <<= dalign + need_prime*8;
+	if (need_prime && copied > 24)
+		copied -= 8;
+	left = width - copied;
+
+	/* Care for small copies.  */
+	if (copied > width) {
+		u32 t;
+		t = (1ul << width) - 1;
+		t <<= dalign + need_prime*8;
+		dmask_first &= t;
+		left = 0;
+	}
+
+	/* Attempt to use 64-byte copies.  This is only possible if the
+	   source and destination are co-aligned at 64 bytes.  */
+	n64 = need_second = 0;
+	if ((dpos & 63) == (spos & 63)
+	    && (height == 1 || line_length % 64 == 0)) {
+		/* We may need a 32-byte copy to ensure 64 byte alignment.  */
+		need_second = (dpos + xincr_first) & 63;
+		if ((need_second & 32) != need_second)
+			printk(KERN_ERR "tgafb: need_second wrong\n");
+		if (left >= need_second + 64) {
+			left -= need_second;
+			n64 = left / 64;
+			left %= 64;
+		} else
+			need_second = 0;
+	}
+
+	/* Copy trailing full 32-byte sections.  This will be the main
+	   loop if the 64 byte loop can't be used.  */
+	n32 = left / 32;
+	left %= 32;
+
+	/* Copy the trailing unaligned destination.  */
+	dmask_last = (1ul << left) - 1;
+
+	tga_regs = par->tga_regs_base;
+	tga_fb = par->tga_fb_base;
+
+	/* Set up the MODE and PIXELSHIFT registers.  */
+	__raw_writel(TGA_MODE_SBM_8BPP|TGA_MODE_COPY, tga_regs+TGA_MODE_REG);
+	__raw_writel(pixel_shift, tga_regs+TGA_PIXELSHIFT_REG);
+	wmb();
+
+	for (i = 0; i < height; ++i) {
+		unsigned long j;
+		void *sfb, *dfb;
+
+		sfb = tga_fb + spos;
+		dfb = tga_fb + dpos;
+		if (dmask_first) {
+			__raw_writel(smask_first, sfb);
+			wmb();
+			__raw_writel(dmask_first, dfb);
+			wmb();
+			sfb += xincr_first;
+			dfb += xincr_first;
+		}
+
+		if (need_second) {
+			__raw_writel(0xffffffff, sfb);
+			wmb();
+			__raw_writel(0xffffffff, dfb);
+			wmb();
+			sfb += 32;
+			dfb += 32;
+		}
+
+		if (n64 && (((long)sfb | (long)dfb) & 63))
+			printk(KERN_ERR
+			       "tgafb: misaligned copy64 (s:%p, d:%p)\n",
+			       sfb, dfb);
+
+		for (j = 0; j < n64; ++j) {
+			__raw_writel(sfb - tga_fb, tga_regs+TGA_COPY64_SRC);
+			wmb();
+			__raw_writel(dfb - tga_fb, tga_regs+TGA_COPY64_DST);
+			wmb();
+			sfb += 64;
+			dfb += 64;
+		}
+
+		for (j = 0; j < n32; ++j) {
+			__raw_writel(0xffffffff, sfb);
+			wmb();
+			__raw_writel(0xffffffff, dfb);
+			wmb();
+			sfb += 32;
+			dfb += 32;
+		}
+
+		if (dmask_last) {
+			__raw_writel(0xffffffff, sfb);
+			wmb();
+			__raw_writel(dmask_last, dfb);
+			wmb();
+		}
+
+		spos += yincr;
+		dpos += yincr;
+	}
+
+	/* Reset the MODE register to normal.  */
+	__raw_writel(TGA_MODE_SBM_8BPP|TGA_MODE_SIMPLE, tga_regs+TGA_MODE_REG);
+}
+
+/* The (almost) general case of backward copy in 8bpp mode.  */
+static inline void
+copyarea_backward_8bpp(struct fb_info *info, u32 dx, u32 dy, u32 sx, u32 sy,
+		       u32 height, u32 width, u32 line_length,
+		       struct fb_copyarea *area)
+{
+	struct tga_par *par = (struct tga_par *) info->par;
+	unsigned long i, left, yincr;
+	unsigned long depos, sepos, dealign, sealign;
+	u32 mask_first, mask_last;
+	unsigned long n32;
+	void *tga_regs, *tga_fb;
+
+	yincr = line_length;
+	if (dy > sy) {
+		dy += height - 1;
+		sy += height - 1;
+		yincr = -yincr;
+	}
+
+	/* Compute the offsets and alignments in the frame buffer.
+	   More than anything else, these control how we do copies.  */
+	depos = dy * line_length + dx + width;
+	sepos = sy * line_length + sx + width;
+	dealign = depos & 7;
+	sealign = sepos & 7;
+
+	/* ??? The documentation appears to be incorrect (or very
+	   misleading) wrt how pixel shifting works in backward copy
+	   mode, i.e. when PIXELSHIFT is negative.  I give up for now.
+	   Do handle the common case of co-aligned backward copies,
+	   but frob everything else back on generic code.  */
+	if (dealign != sealign) {
+		cfb_copyarea(info, area);
+		return;
+	}
+
+	/* We begin the copy with the trailing pixels of the
+	   unaligned destination.  */
+	mask_first = (1ul << dealign) - 1;
+	left = width - dealign;
+
+	/* Care for small copies.  */
+	if (dealign > width) {
+		mask_first ^= (1ul << (dealign - width)) - 1;
+		left = 0;
+	}
+
+	/* Next copy full words at a time.  */
+	n32 = left / 32;
+	left %= 32;
+
+	/* Finally copy the unaligned head of the span.  */
+	mask_last = -1 << (32 - left);
+
+	tga_regs = par->tga_regs_base;
+	tga_fb = par->tga_fb_base;
+
+	/* Set up the MODE and PIXELSHIFT registers.  */
+	__raw_writel(TGA_MODE_SBM_8BPP|TGA_MODE_COPY, tga_regs+TGA_MODE_REG);
+	__raw_writel(0, tga_regs+TGA_PIXELSHIFT_REG);
+	wmb();
+
+	for (i = 0; i < height; ++i) {
+		unsigned long j;
+		void *sfb, *dfb;
+
+		sfb = tga_fb + sepos;
+		dfb = tga_fb + depos;
+		if (mask_first) {
+			__raw_writel(mask_first, sfb);
+			wmb();
+			__raw_writel(mask_first, dfb);
+			wmb();
+		}
+
+		for (j = 0; j < n32; ++j) {
+			sfb -= 32;
+			dfb -= 32;
+			__raw_writel(0xffffffff, sfb);
+			wmb();
+			__raw_writel(0xffffffff, dfb);
+			wmb();
+		}
+
+		if (mask_last) {
+			sfb -= 32;
+			dfb -= 32;
+			__raw_writel(mask_last, sfb);
+			wmb();
+			__raw_writel(mask_last, dfb);
+			wmb();
+		}
+
+		sepos += yincr;
+		depos += yincr;
+	}
+
+	/* Reset the MODE register to normal.  */
+	__raw_writel(TGA_MODE_SBM_8BPP|TGA_MODE_SIMPLE, tga_regs+TGA_MODE_REG);
+}
+
+static void
+tgafb_copyarea(struct fb_info *info, struct fb_copyarea *area) 
+{
+	unsigned long dx, dy, width, height, sx, sy, vxres, vyres;
+	unsigned long line_length, bpp;
+
+	dx = area->dx;
+	dy = area->dy;
+	width = area->width;
+	height = area->height;
+	sx = area->sx;
+	sy = area->sy;
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
+	line_length = info->fix.line_length;
+
+	/* The top left corners must be in the virtual screen.  */
+	if (dx > vxres || sx > vxres || dy > vyres || sy > vyres)
+		return;
+
+	/* Clip the destination.  */
+	if (dx + width > vxres)
+		width = vxres - dx;
+	if (dy + height > vyres)
+		height = vyres - dy;
+
+	/* The source must be completely inside the virtual screen.  */
+	if (sx + width > vxres || sy + height > vyres)
+		return;
+
+	bpp = info->var.bits_per_pixel;
+
+	/* Detect copies of the entire line.  */
+	if (width * (bpp >> 3) == line_length) {
+		if (bpp == 8)
+			copyarea_line_8bpp(info, dy, sy, height, width);
+		else
+			copyarea_line_32bpp(info, dy, sy, height, width);
+	}
+
+	/* ??? The documentation is unclear to me exactly how the pixelshift
+	   register works in 32bpp mode.  Since I don't have hardware to test,
+	   give up for now and fall back on the generic routines.  */
+	else if (bpp == 32)
+		cfb_copyarea(info, area);
+
+	/* Detect overlapping source and destination that requires
+	   a backward copy.  */
+	else if (dy == sy && dx > sx && dx < sx + width)
+		copyarea_backward_8bpp(info, dx, dy, sx, sy, height,
+				       width, line_length, area);
+	else
+		copyarea_foreward_8bpp(info, dx, dy, sx, sy, height,
+				       width, line_length);
+}
+
 
 /*
  *  Initialisation
@@ -791,7 +1356,7 @@
 	info->fix.smem_start = (size_t) par->tga_fb_base;
 	info->fix.smem_len = info->fix.line_length * par->yres;
 	info->fix.mmio_start = (size_t) par->tga_regs_base;
-	info->fix.mmio_len = 0x1000;		/* Is this sufficient? */
+	info->fix.mmio_len = 512;
 
 	info->fix.xpanstep = 0;
 	info->fix.ypanstep = 0;
diff -Nru a/fs/aio.c b/fs/aio.c
--- a/fs/aio.c	Wed Jan  8 20:04:44 2003
+++ b/fs/aio.c	Wed Jan  8 20:04:44 2003
@@ -302,7 +302,6 @@
 	add_wait_queue(&ctx->wait, &wait);
 	set_task_state(tsk, TASK_UNINTERRUPTIBLE);
 	while (ctx->reqs_active) {
-		printk("ctx->reqs_active = %d\n", ctx->reqs_active);
 		schedule();
 		set_task_state(tsk, TASK_UNINTERRUPTIBLE);
 	}
diff -Nru a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
--- a/fs/befs/linuxvfs.c	Wed Jan  8 20:04:43 2003
+++ b/fs/befs/linuxvfs.c	Wed Jan  8 20:04:43 2003
@@ -12,7 +12,7 @@
 #include <linux/stat.h>
 #include <linux/nls.h>
 #include <linux/buffer_head.h>
-#include <linux/statfs.h>
+#include <linux/vfs.h>
 
 #include "befs.h"
 #include "btree.h"
diff -Nru a/fs/bio.c b/fs/bio.c
--- a/fs/bio.c	Wed Jan  8 20:04:44 2003
+++ b/fs/bio.c	Wed Jan  8 20:04:44 2003
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mempool.h>
+#include <linux/workqueue.h>
 
 #define BIO_POOL_SIZE 256
 
@@ -566,7 +567,112 @@
 	}
 
 	bio_put(bio);
- }
+}
+
+/*
+ * bio_set_pages_dirty() and bio_check_pages_dirty() are support functions
+ * for performing direct-IO in BIOs.
+ *
+ * The problem is that we cannot run set_page_dirty() from interrupt context
+ * because the required locks are not interrupt-safe.  So what we can do is to
+ * mark the pages dirty _before_ performing IO.  And in interrupt context,
+ * check that the pages are still dirty.   If so, fine.  If not, redirty them
+ * in process context.
+ *
+ * Note that this code is very hard to test under normal circumstances because
+ * direct-io pins the pages with get_user_pages().  This makes
+ * is_page_cache_freeable return false, and the VM will not clean the pages.
+ * But other code (eg, pdflush) could clean the pages if they are mapped
+ * pagecache.
+ *
+ * Simply disabling the call to bio_set_pages_dirty() is a good way to test the
+ * deferred bio dirtying paths.
+ */
+
+/*
+ * bio_set_pages_dirty() will mark all the bio's pages as dirty.
+ */
+void bio_set_pages_dirty(struct bio *bio)
+{
+	struct bio_vec *bvec = bio->bi_io_vec;
+	int i;
+
+	for (i = 0; i < bio->bi_vcnt; i++) {
+		struct page *page = bvec[i].bv_page;
+
+		if (page)
+			set_page_dirty(bvec[i].bv_page);
+	}
+}
+
+/*
+ * bio_check_pages_dirty() will check that all the BIO's pages are still dirty.
+ * If they are, then fine.  If, however, some pages are clean then they must
+ * have been written out during the direct-IO read.  So we take another ref on
+ * the BIO and the offending pages and re-dirty the pages in process context.
+ *
+ * It is expected that bio_check_pages_dirty() will wholly own the BIO from
+ * here on.  It will run one page_cache_release() against each page and will
+ * run one bio_put() against the BIO.
+ */
+
+static void bio_dirty_fn(void *data);
+
+static DECLARE_WORK(bio_dirty_work, bio_dirty_fn, NULL);
+static spinlock_t bio_dirty_lock = SPIN_LOCK_UNLOCKED;
+static struct bio *bio_dirty_list = NULL;
+
+/*
+ * This runs in process context
+ */
+static void bio_dirty_fn(void *data)
+{
+	unsigned long flags;
+	struct bio *bio;
+
+	spin_lock_irqsave(&bio_dirty_lock, flags);
+	bio = bio_dirty_list;
+	bio_dirty_list = NULL;
+	spin_unlock_irqrestore(&bio_dirty_lock, flags);
+
+	while (bio) {
+		struct bio *next = bio->bi_private;
+
+		bio_set_pages_dirty(bio);
+		bio_put(bio);
+		bio = next;
+	}
+}
+
+void bio_check_pages_dirty(struct bio *bio)
+{
+	struct bio_vec *bvec = bio->bi_io_vec;
+	int nr_clean_pages = 0;
+	int i;
+
+	for (i = 0; i < bio->bi_vcnt; i++) {
+		struct page *page = bvec[i].bv_page;
+
+		if (PageDirty(page)) {
+			page_cache_release(page);
+			bvec[i].bv_page = NULL;
+		} else {
+			nr_clean_pages++;
+		}
+	}
+
+	if (nr_clean_pages) {
+		unsigned long flags;
+
+		spin_lock_irqsave(&bio_dirty_lock, flags);
+		bio->bi_private = bio_dirty_list;
+		bio_dirty_list = bio;
+		spin_unlock_irqrestore(&bio_dirty_lock, flags);
+		schedule_work(&bio_dirty_work);
+	} else {
+		bio_put(bio);
+	}
+}
 
 /**
  * bio_endio - end I/O on a bio
diff -Nru a/fs/block_dev.c b/fs/block_dev.c
--- a/fs/block_dev.c	Wed Jan  8 20:04:45 2003
+++ b/fs/block_dev.c	Wed Jan  8 20:04:45 2003
@@ -118,12 +118,13 @@
 }
 
 static int
-blkdev_direct_IO(int rw, struct file *file, const struct iovec *iov,
+blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 			loff_t offset, unsigned long nr_segs)
 {
+	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-	return generic_direct_IO(rw, inode, inode->i_bdev, iov, offset,
+	return blockdev_direct_IO(rw, iocb, inode, inode->i_bdev, iov, offset,
 				nr_segs, blkdev_get_blocks);
 }
 
diff -Nru a/fs/compat.c b/fs/compat.c
--- a/fs/compat.c	Wed Jan  8 20:04:44 2003
+++ b/fs/compat.c	Wed Jan  8 20:04:44 2003
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/time.h>
 #include <linux/fs.h>
+#include <linux/fcntl.h>
 
 #include <asm/uaccess.h>
 
@@ -69,4 +70,34 @@
 	if (!error)
 		error = cp_compat_stat(&stat, statbuf);
 	return error;
+}
+
+int get_compat_flock(struct flock *kfl, struct compat_flock *ufl)
+{
+	int err;
+
+	if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)))
+		return -EFAULT;
+
+	err = __get_user(kfl->l_type, &ufl->l_type);
+	err |= __get_user(kfl->l_whence, &ufl->l_whence);
+	err |= __get_user(kfl->l_start, &ufl->l_start);
+	err |= __get_user(kfl->l_len, &ufl->l_len);
+	err |= __get_user(kfl->l_pid, &ufl->l_pid);
+	return err;
+}
+
+int put_compat_flock(struct flock *kfl, struct compat_flock *ufl)
+{
+	int err;
+
+	if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)))
+		return -EFAULT;
+
+	err = __put_user(kfl->l_type, &ufl->l_type);
+	err |= __put_user(kfl->l_whence, &ufl->l_whence);
+	err |= __put_user(kfl->l_start, &ufl->l_start);
+	err |= __put_user(kfl->l_len, &ufl->l_len);
+	err |= __put_user(kfl->l_pid, &ufl->l_pid);
+	return err;
 }
diff -Nru a/fs/direct-io.c b/fs/direct-io.c
--- a/fs/direct-io.c	Wed Jan  8 20:04:44 2003
+++ b/fs/direct-io.c	Wed Jan  8 20:04:44 2003
@@ -7,12 +7,21 @@
  *
  * 04Jul2002	akpm@zip.com.au
  *		Initial version
+ * 11Sep2002	janetinc@us.ibm.com
+ * 		added readv/writev support.
+ * 29Oct2002	akpm@zip.com.au
+ *		rewrote bio_add_page() support.
+ * 30Oct2002	pbadari@us.ibm.com
+ *		added support for non-aligned IO.
+ * 06Nov2002	pbadari@us.ibm.com
+ *		added asynchronous IO support.
  */
 
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/fs.h>
 #include <linux/mm.h>
+#include <linux/slab.h>
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 #include <linux/bio.h>
@@ -97,10 +106,16 @@
 	int page_errors;		/* errno from get_user_pages() */
 
 	/* BIO completion state */
-	atomic_t bio_count;		/* nr bios in flight */
+	atomic_t bio_count;		/* nr bios to be completed */
+	atomic_t bios_in_flight;	/* nr bios in flight */
 	spinlock_t bio_list_lock;	/* protects bio_list */
 	struct bio *bio_list;		/* singly linked via bi_private */
 	struct task_struct *waiter;	/* waiting task (NULL if none) */
+
+	/* AIO related stuff */
+	struct kiocb *iocb;		/* kiocb */
+	int is_async;			/* is IO async ? */
+	int result;			/* IO result */
 };
 
 /*
@@ -178,6 +193,36 @@
 }
 
 /*
+ * Called when a BIO has been processed.  If the count goes to zero then IO is
+ * complete and we can signal this to the AIO layer.
+ */
+static void finished_one_bio(struct dio *dio)
+{
+	if (atomic_dec_and_test(&dio->bio_count)) {
+		if(dio->is_async) {
+			aio_complete(dio->iocb, dio->result, 0);
+			kfree(dio);
+		}
+	}
+}
+
+static int dio_bio_complete(struct dio *dio, struct bio *bio);
+/*
+ * Asynchronous IO callback. 
+ */
+static int dio_bio_end_aio(struct bio *bio, unsigned int bytes_done, int error)
+{
+	struct dio *dio = bio->bi_private;
+
+	if (bio->bi_size)
+		return 1;
+
+	/* cleanup the bio */
+	dio_bio_complete(dio, bio);
+	return 0;
+}
+
+/*
  * The BIO completion handler simply queues the BIO up for the process-context
  * handler.
  *
@@ -195,7 +240,8 @@
 	spin_lock_irqsave(&dio->bio_list_lock, flags);
 	bio->bi_private = dio->bio_list;
 	dio->bio_list = bio;
-	if (dio->waiter)
+	atomic_dec(&dio->bios_in_flight);
+	if (dio->waiter && atomic_read(&dio->bios_in_flight) == 0)
 		wake_up_process(dio->waiter);
 	spin_unlock_irqrestore(&dio->bio_list_lock, flags);
 	return 0;
@@ -213,18 +259,29 @@
 
 	bio->bi_bdev = bdev;
 	bio->bi_sector = first_sector;
-	bio->bi_end_io = dio_bio_end_io;
+	if (dio->is_async)
+		bio->bi_end_io = dio_bio_end_aio;
+	else
+		bio->bi_end_io = dio_bio_end_io;
 
 	dio->bio = bio;
 	return 0;
 }
 
+/*
+ * In the AIO read case we speculatively dirty the pages before starting IO.
+ * During IO completion, any of these pages which happen to have been written
+ * back will be redirtied by bio_check_pages_dirty().
+ */
 static void dio_bio_submit(struct dio *dio)
 {
 	struct bio *bio = dio->bio;
 
 	bio->bi_private = dio;
 	atomic_inc(&dio->bio_count);
+	atomic_inc(&dio->bios_in_flight);
+	if (dio->is_async && dio->rw == READ)
+		bio_set_pages_dirty(bio);
 	submit_bio(dio->rw, bio);
 
 	dio->bio = NULL;
@@ -276,15 +333,22 @@
 	struct bio_vec *bvec = bio->bi_io_vec;
 	int page_no;
 
-	for (page_no = 0; page_no < bio->bi_vcnt; page_no++) {
-		struct page *page = bvec[page_no].bv_page;
+	if (!uptodate)
+		dio->result = -EIO;
 
-		if (dio->rw == READ)
-			set_page_dirty(page);
-		page_cache_release(page);
+	if (dio->is_async && dio->rw == READ) {
+		bio_check_pages_dirty(bio);	/* transfers ownership */
+	} else {
+		for (page_no = 0; page_no < bio->bi_vcnt; page_no++) {
+			struct page *page = bvec[page_no].bv_page;
+
+			if (dio->rw == READ)
+				set_page_dirty(page);
+			page_cache_release(page);
+		}
+		bio_put(bio);
 	}
-	atomic_dec(&dio->bio_count);
-	bio_put(bio);
+	finished_one_bio(dio);
 	return uptodate ? 0 : -EIO;
 }
 
@@ -393,7 +457,7 @@
 /*
  * There is no bio.  Make one now.
  */
-static int dio_new_bio(struct dio *dio, sector_t blkno)
+static int dio_new_bio(struct dio *dio, sector_t start_sector)
 {
 	sector_t sector;
 	int ret, nr_pages;
@@ -401,7 +465,7 @@
 	ret = dio_bio_reap(dio);
 	if (ret)
 		goto out;
-	sector = blkno << (dio->blkbits - 9);
+	sector = start_sector << (dio->blkbits - 9);
 	nr_pages = min(dio->pages_in_io, bio_get_nr_vecs(dio->map_bh.b_bdev));
 	BUG_ON(nr_pages <= 0);
 	ret = dio_bio_alloc(dio, dio->map_bh.b_bdev, sector, nr_pages);
@@ -750,73 +814,92 @@
 }
 
 static int
-direct_io_worker(int rw, struct inode *inode, const struct iovec *iov, 
-	loff_t offset, unsigned long nr_segs, unsigned blkbits,
-	get_blocks_t get_blocks)
+direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode, 
+	const struct iovec *iov, loff_t offset, unsigned long nr_segs, 
+	unsigned blkbits, get_blocks_t get_blocks)
 {
 	unsigned long user_addr; 
-	int seg, ret2, ret = 0;
-	struct dio dio;
-	size_t bytes, tot_bytes = 0;
-
-	dio.bio = NULL;
-	dio.inode = inode;
-	dio.rw = rw;
-	dio.blkbits = blkbits;
-	dio.blkfactor = inode->i_blkbits - blkbits;
-	dio.start_zero_done = 0;
-	dio.block_in_file = offset >> blkbits;
-	dio.blocks_available = 0;
-
-	dio.cur_page = NULL;
-
-	dio.boundary = 0;
-	dio.reap_counter = 0;
-	dio.get_blocks = get_blocks;
-	dio.final_block_in_bio = -1;
-	dio.next_block_for_io = -1;
+	int seg;
+	int ret = 0;
+	int ret2;
+	struct dio *dio;
+	size_t bytes;
 
-	dio.page_errors = 0;
+	dio = kmalloc(sizeof(*dio), GFP_KERNEL);
+	if (!dio)
+		return -ENOMEM;
+	dio->is_async = !is_sync_kiocb(iocb);
 
-	/* BIO completion state */
-	atomic_set(&dio.bio_count, 0);
-	spin_lock_init(&dio.bio_list_lock);
-	dio.bio_list = NULL;
-	dio.waiter = NULL;
-	dio.pages_in_io = 0;
+	dio->bio = NULL;
+	dio->inode = inode;
+	dio->rw = rw;
+	dio->blkbits = blkbits;
+	dio->blkfactor = inode->i_blkbits - blkbits;
+	dio->start_zero_done = 0;
+	dio->block_in_file = offset >> blkbits;
+	dio->blocks_available = 0;
 
+	dio->cur_page = NULL;
+
+	dio->boundary = 0;
+	dio->reap_counter = 0;
+	dio->get_blocks = get_blocks;
+	dio->final_block_in_bio = -1;
+	dio->next_block_for_io = -1;
+
+	dio->page_errors = 0;
+	dio->result = 0;
+	dio->iocb = iocb;
+
+	/*
+	 * BIO completion state.
+	 *
+	 * ->bio_count starts out at one, and we decrement it to zero after all
+	 * BIOs are submitted.  This to avoid the situation where a really fast
+	 * (or synchronous) device could take the count to zero while we're
+	 * still submitting BIOs.
+	 */
+	atomic_set(&dio->bio_count, 1);
+	atomic_set(&dio->bios_in_flight, 0);
+	spin_lock_init(&dio->bio_list_lock);
+	dio->bio_list = NULL;
+	dio->waiter = NULL;
+
+	dio->pages_in_io = 0;
 	for (seg = 0; seg < nr_segs; seg++) 
-		dio.pages_in_io += (iov[seg].iov_len >> blkbits) + 2; 
+		dio->pages_in_io += (iov[seg].iov_len >> blkbits) + 2; 
 
 	for (seg = 0; seg < nr_segs; seg++) {
 		user_addr = (unsigned long)iov[seg].iov_base;
 		bytes = iov[seg].iov_len;
 
 		/* Index into the first page of the first block */
-		dio.first_block_in_page = (user_addr & (PAGE_SIZE - 1)) >> blkbits;
-		dio.final_block_in_request = dio.block_in_file + (bytes >> blkbits);
+		dio->first_block_in_page = (user_addr & ~PAGE_MASK) >> blkbits;
+		dio->final_block_in_request = dio->block_in_file +
+						(bytes >> blkbits);
 		/* Page fetching state */
-		dio.head = 0;
-		dio.tail = 0;
-		dio.curr_page = 0;
+		dio->head = 0;
+		dio->tail = 0;
+		dio->curr_page = 0;
 
-		dio.total_pages = 0;
+		dio->total_pages = 0;
 		if (user_addr & (PAGE_SIZE-1)) {
-			dio.total_pages++;
+			dio->total_pages++;
 			bytes -= PAGE_SIZE - (user_addr & (PAGE_SIZE - 1));
 		}
-		dio.total_pages += (bytes + PAGE_SIZE - 1) / PAGE_SIZE;
-		dio.curr_user_address = user_addr;
+		dio->total_pages += (bytes + PAGE_SIZE - 1) / PAGE_SIZE;
+		dio->curr_user_address = user_addr;
 	
-		ret = do_direct_IO(&dio);
+		ret = do_direct_IO(dio);
 
 		if (ret) {
-			dio_cleanup(&dio);
+			dio_cleanup(dio);
 			break;
 		}
 
-		tot_bytes += iov[seg].iov_len - ((dio.final_block_in_request -
-					dio.block_in_file) << blkbits);
+		dio->result += iov[seg].iov_len -
+			((dio->final_block_in_request - dio->block_in_file) <<
+					blkbits);
 
 	} /* end iovec loop */
 
@@ -824,22 +907,41 @@
 	 * There may be some unwritten disk at the end of a part-written
 	 * fs-block-sized block.  Go zero that now.
 	 */
-	dio_zero_block(&dio, 1);
+	dio_zero_block(dio, 1);
 
-	if (dio.cur_page) {
-		ret2 = dio_send_cur_page(&dio);
-		page_cache_release(dio.cur_page);
+	if (dio->cur_page) {
+		ret2 = dio_send_cur_page(dio);
 		if (ret == 0)
 			ret = ret2;
+		page_cache_release(dio->cur_page);
+		dio->cur_page = NULL;
+	}
+	if (dio->bio)
+		dio_bio_submit(dio);
+
+	/*
+	 * OK, all BIOs are submitted, so we can decrement bio_count to truly
+	 * reflect the number of to-be-processed BIOs.
+	 */
+	if (dio->is_async) {
+		if (ret == 0)
+			ret = dio->result;	/* Bytes written */
+		finished_one_bio(dio);		/* This can free the dio */
+		blk_run_queues();
+		goto out;
 	}
-	ret2 = dio_await_completion(&dio);
+
+	finished_one_bio(dio);
+	ret2 = dio_await_completion(dio);
 	if (ret == 0)
 		ret = ret2;
 	if (ret == 0)
-		ret = dio.page_errors;
-	if (ret == 0)
-		ret = tot_bytes; 
+		ret = dio->page_errors;
 
+	if (dio->result)
+		ret = dio->result;
+	kfree(dio);
+out:
 	return ret;
 }
 
@@ -847,9 +949,9 @@
  * This is a library function for use by filesystem drivers.
  */
 int
-generic_direct_IO(int rw, struct inode *inode, struct block_device *bdev, 
-	const struct iovec *iov, loff_t offset, unsigned long nr_segs, 
-	get_blocks_t get_blocks)
+blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, 
+	struct block_device *bdev, const struct iovec *iov, loff_t offset, 
+	unsigned long nr_segs, get_blocks_t get_blocks)
 {
 	int seg;
 	size_t size;
@@ -883,30 +985,8 @@
 		}
 	}
 
-	retval = direct_io_worker(rw, inode, iov, offset, 
+	retval = direct_io_worker(rw, iocb, inode, iov, offset, 
 				nr_segs, blkbits, get_blocks);
-out:
-	return retval;
-}
-
-ssize_t
-generic_file_direct_IO(int rw, struct file *file, const struct iovec *iov,
-	loff_t offset, unsigned long nr_segs)
-{
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
-	ssize_t retval;
-
-	if (mapping->nrpages) {
-		retval = filemap_fdatawrite(mapping);
-		if (retval == 0)
-			retval = filemap_fdatawait(mapping);
-		if (retval)
-			goto out;
-	}
-
-	retval = mapping->a_ops->direct_IO(rw, file, iov, offset, nr_segs);
-	if (rw == WRITE && mapping->nrpages)
-		invalidate_inode_pages2(mapping);
 out:
 	return retval;
 }
diff -Nru a/fs/exec.c b/fs/exec.c
--- a/fs/exec.c	Wed Jan  8 20:04:43 2003
+++ b/fs/exec.c	Wed Jan  8 20:04:43 2003
@@ -45,6 +45,7 @@
 #include <linux/ptrace.h>
 #include <linux/mount.h>
 #include <linux/security.h>
+#include <linux/rmap-locking.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
@@ -292,12 +293,13 @@
 	pgd_t * pgd;
 	pmd_t * pmd;
 	pte_t * pte;
+	struct pte_chain *pte_chain;
 
 	if (page_count(page) != 1)
 		printk(KERN_ERR "mem_map disagrees with %p at %08lx\n", page, address);
 
 	pgd = pgd_offset(tsk->mm, address);
-
+	pte_chain = pte_chain_alloc(GFP_KERNEL);
 	spin_lock(&tsk->mm->page_table_lock);
 	pmd = pmd_alloc(tsk->mm, pgd, address);
 	if (!pmd)
@@ -313,17 +315,19 @@
 	flush_dcache_page(page);
 	flush_page_to_ram(page);
 	set_pte(pte, pte_mkdirty(pte_mkwrite(mk_pte(page, PAGE_COPY))));
-	page_add_rmap(page, pte);
+	pte_chain = page_add_rmap(page, pte, pte_chain);
 	pte_unmap(pte);
 	tsk->mm->rss++;
 	spin_unlock(&tsk->mm->page_table_lock);
 
 	/* no need for flush_tlb */
+	pte_chain_free(pte_chain);
 	return;
 out:
 	spin_unlock(&tsk->mm->page_table_lock);
 	__free_page(page);
 	force_sig(SIGKILL, tsk);
+	pte_chain_free(pte_chain);
 	return;
 }
 
diff -Nru a/fs/ext2/inode.c b/fs/ext2/inode.c
--- a/fs/ext2/inode.c	Wed Jan  8 20:04:43 2003
+++ b/fs/ext2/inode.c	Wed Jan  8 20:04:43 2003
@@ -652,12 +652,13 @@
 }
 
 static int
-ext2_direct_IO(int rw, struct file *file, const struct iovec *iov,
+ext2_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 			loff_t offset, unsigned long nr_segs)
 {
+	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-	return generic_direct_IO(rw, inode, inode->i_sb->s_bdev, iov,
+	return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
 				offset, nr_segs, ext2_get_blocks);
 }
 
diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c
--- a/fs/ext3/inode.c	Wed Jan  8 20:04:44 2003
+++ b/fs/ext3/inode.c	Wed Jan  8 20:04:44 2003
@@ -1405,10 +1405,11 @@
  * If the O_DIRECT write is intantiating holes inside i_size and the machine
  * crashes then stale disk data _may_ be exposed inside the file.
  */
-static int ext3_direct_IO(int rw, struct file *file,
+static int ext3_direct_IO(int rw, struct kiocb *iocb,
 			const struct iovec *iov, loff_t offset,
 			unsigned long nr_segs)
 {
+	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 	struct ext3_inode_info *ei = EXT3_I(inode);
 	handle_t *handle = NULL;
@@ -1437,8 +1438,8 @@
 		}
 	}
 
-	ret = generic_direct_IO(rw, inode, inode->i_sb->s_bdev, iov, offset,
-				nr_segs, ext3_direct_io_get_blocks);
+	ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, 
+				offset, nr_segs, ext3_direct_io_get_blocks);
 
 out_stop:
 	if (handle) {
diff -Nru a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
--- a/fs/hugetlbfs/inode.c	Wed Jan  8 20:04:45 2003
+++ b/fs/hugetlbfs/inode.c	Wed Jan  8 20:04:45 2003
@@ -79,6 +79,7 @@
  */
 static int hugetlbfs_readpage(struct file *file, struct page * page)
 {
+	unlock_page(page);
 	return -EINVAL;
 }
 
diff -Nru a/fs/jfs/file.c b/fs/jfs/file.c
--- a/fs/jfs/file.c	Wed Jan  8 20:04:43 2003
+++ b/fs/jfs/file.c	Wed Jan  8 20:04:43 2003
@@ -102,6 +102,8 @@
 	.llseek		= generic_file_llseek,
 	.write		= generic_file_write,
 	.read		= generic_file_read,
+	.aio_read	= generic_file_aio_read,
+	.aio_write	= generic_file_aio_write,
 	.mmap		= generic_file_mmap,
 	.readv		= generic_file_readv,
 	.writev		= generic_file_writev,
diff -Nru a/fs/jfs/inode.c b/fs/jfs/inode.c
--- a/fs/jfs/inode.c	Wed Jan  8 20:04:31 2003
+++ b/fs/jfs/inode.c	Wed Jan  8 20:04:31 2003
@@ -310,12 +310,13 @@
 	return generic_block_bmap(mapping, block, jfs_get_block);
 }
 
-static int jfs_direct_IO(int rw, struct file *file, const struct iovec *iov,
+static int jfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 			loff_t offset, unsigned long nr_segs)
 {
+	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-	return generic_direct_IO(rw, inode, inode->i_sb->s_bdev, iov,
+	return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
 				offset, nr_segs, jfs_get_blocks);
 }
 
diff -Nru a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
--- a/fs/jfs/jfs_logmgr.c	Wed Jan  8 20:04:44 2003
+++ b/fs/jfs/jfs_logmgr.c	Wed Jan  8 20:04:44 2003
@@ -184,9 +184,9 @@
 static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag);
 static int lbmIOWait(struct lbuf * bp, int flag);
 static bio_end_io_t lbmIODone;
+static void lbmStartIO(struct lbuf * bp);
+static void lmGCwrite(struct jfs_log * log, int cant_block);
 
-void lbmStartIO(struct lbuf * bp);
-void lmGCwrite(struct jfs_log * log, int cant_block);
 
 
 /*
@@ -744,7 +744,7 @@
  *	LOGGC_LOCK must be held by caller.
  *	N.B. LOG_LOCK is NOT held during lmGroupCommit().
  */
-void lmGCwrite(struct jfs_log * log, int cant_write)
+static void lmGCwrite(struct jfs_log * log, int cant_write)
 {
 	struct lbuf *bp;
 	struct logpage *lp;
@@ -893,8 +893,7 @@
 	 */
 	if ((tblk = log->cqueue.head) &&
 	    ((log->gcrtc > 0) || (tblk->bp->l_wqnext != NULL) ||
-	     test_bit(log_SYNCBARRIER, &log->flag) ||
-	     test_bit(log_QUIESCE, &log->flag)))
+	     test_bit(log_FLUSH, &log->flag)))
 		/*
 		 * Call lmGCwrite with new group leader
 		 */
@@ -902,11 +901,13 @@
 
 	/* no transaction are ready yet (transactions are only just
 	 * queued (GC_QUEUE) and not entered for group commit yet).
-	 * let the first transaction entering group commit
-	 * will elect hetself as new group leader.
+	 * the first transaction entering group commit
+	 * will elect herself as new group leader.
 	 */
-	else
+	else {
 		log->cflag &= ~logGC_PAGEOUT;
+		clear_bit(log_FLUSH, &log->flag);
+	}
 
 	//LOGGC_UNLOCK(log);
 	spin_unlock_irqrestore(&log->gclock, flags);
@@ -1049,18 +1050,12 @@
 		set_bit(log_SYNCBARRIER, &log->flag);
 		jFYI(1, ("log barrier on: lsn=0x%x syncpt=0x%x\n", lsn,
 			 log->syncpt));
+		/*
+		 * We may have to initiate group commit
+		 */
+		jfs_flush_journal(log, 0);
 	}
 
-	/*
-	 * We may have to initiate group commit
-	 */
-	LOGGC_LOCK(log);
-	if (log->cqueue.head && !(log->cflag & logGC_PAGEOUT)) {
-		log->cflag |= logGC_PAGEOUT;
-		lmGCwrite(log, 0);
-	}
-	LOGGC_UNLOCK(log);
-
 	return lsn;
 }
 
@@ -1416,21 +1411,22 @@
 
 
 /*
- * NAME:	lmLogWait()
+ * NAME:	jfs_flush_journal()
  *
- * FUNCTION:	wait for all outstanding log records to be written to disk
+ * FUNCTION:	initiate write of any outstanding transactions to the journal
+ *		and optionally wait until they are all written to disk
  */
-void lmLogWait(struct jfs_log *log)
+void jfs_flush_journal(struct jfs_log *log, int wait)
 {
 	int i;
 
-	jFYI(1, ("lmLogWait: log:0x%p\n", log));
+	jFYI(1, ("jfs_flush_journal: log:0x%p wait=%d\n", log, wait));
 
 	/*
 	 * This ensures that we will keep writing to the journal as long
 	 * as there are unwritten commit records
 	 */
-	set_bit(log_QUIESCE, &log->flag);
+	set_bit(log_FLUSH, &log->flag);
 
 	/*
 	 * Initiate I/O on outstanding transactions
@@ -1442,6 +1438,9 @@
 	}
 	LOGGC_UNLOCK(log);
 
+	if (!wait)
+		return;
+
 	if (log->cqueue.head || !list_empty(&log->synclist)) {
 		/*
 		 * If there was very recent activity, we may need to wait
@@ -1459,7 +1458,7 @@
 	assert(log->cqueue.head == NULL);
 	assert(list_empty(&log->synclist));
 
-	clear_bit(log_QUIESCE, &log->flag);	/* Probably not needed */
+	clear_bit(log_FLUSH, &log->flag);
 }
 
 /*
@@ -1488,7 +1487,7 @@
 
 	jFYI(1, ("lmLogShutdown: log:0x%p\n", log));
 
-	lmLogWait(log);
+	jfs_flush_journal(log, 1);
 
 	/*
 	 * We need to make sure all of the "written" metapages
@@ -1946,7 +1945,7 @@
  *
  * serialization: LCACHE_LOCK() is NOT held during log i/o;
  */
-void lbmStartIO(struct lbuf * bp)
+static void lbmStartIO(struct lbuf * bp)
 {
 	struct bio *bio;
 	struct jfs_log *log = bp->l_log;
diff -Nru a/fs/jfs/jfs_logmgr.h b/fs/jfs/jfs_logmgr.h
--- a/fs/jfs/jfs_logmgr.h	Wed Jan  8 20:04:43 2003
+++ b/fs/jfs/jfs_logmgr.h	Wed Jan  8 20:04:43 2003
@@ -424,6 +424,7 @@
 #define log_INLINELOG	1
 #define log_SYNCBARRIER	2
 #define log_QUIESCE	3
+#define log_FLUSH	4
 
 /*
  * group commit flag
@@ -501,11 +502,11 @@
 }
 
 extern int lmLogOpen(struct super_block *sb, struct jfs_log ** log);
-extern void lmLogWait(struct jfs_log * log);
 extern int lmLogClose(struct super_block *sb, struct jfs_log * log);
 extern int lmLogSync(struct jfs_log * log, int nosyncwait);
 extern int lmLogShutdown(struct jfs_log * log);
 extern int lmLogInit(struct jfs_log * log);
 extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize);
+extern void jfs_flush_journal(struct jfs_log * log, int wait);
 
 #endif				/* _H_JFS_LOGMGR */
diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
--- a/fs/jfs/jfs_txnmgr.c	Wed Jan  8 20:04:44 2003
+++ b/fs/jfs/jfs_txnmgr.c	Wed Jan  8 20:04:44 2003
@@ -158,7 +158,6 @@
  * external references
  */
 extern int lmGroupCommit(struct jfs_log *, struct tblock *);
-extern int lmGCwrite(struct jfs_log *, int);
 extern void lmSync(struct jfs_log *);
 extern int jfs_commit_inode(struct inode *, int);
 extern int jfs_stop_threads;
@@ -2969,12 +2968,7 @@
 	/*
 	 * We may need to kick off the group commit
 	 */
-	spin_lock_irq(&log->gclock);	// LOGGC_LOCK
-	if (log->cqueue.head && !(log->cflag & logGC_PAGEOUT)) {
-		log->cflag |= logGC_PAGEOUT;
-		lmGCwrite(log, 0);
-	}
-	spin_unlock_irq(&log->gclock);	// LOGGC_UNLOCK
+	jfs_flush_journal(log, 0);
 }
 
 /*
diff -Nru a/fs/jfs/jfs_umount.c b/fs/jfs/jfs_umount.c
--- a/fs/jfs/jfs_umount.c	Wed Jan  8 20:04:44 2003
+++ b/fs/jfs/jfs_umount.c	Wed Jan  8 20:04:44 2003
@@ -69,7 +69,7 @@
 		/*
 		 * Wait for outstanding transactions to be written to log: 
 		 */
-		lmLogWait(log);
+		jfs_flush_journal(log, 1);
 
 	/*
 	 * close fileset inode allocation map (aka fileset inode)
@@ -153,7 +153,7 @@
 	 *
 	 * remove file system from log active file system list.
 	 */
-	lmLogWait(log);
+	jfs_flush_journal(log, 1);
 
 	/*
 	 * Make sure all metadata makes it to disk
diff -Nru a/fs/jfs/resize.c b/fs/jfs/resize.c
--- a/fs/jfs/resize.c	Wed Jan  8 20:04:44 2003
+++ b/fs/jfs/resize.c	Wed Jan  8 20:04:44 2003
@@ -514,7 +514,7 @@
 		mark_buffer_dirty(bh);
 		ll_rw_block(WRITE, 1, &bh2);
 		wait_on_buffer(bh2);
-		brelse(bh);
+		brelse(bh2);
 	}
 
 	/* write primary superblock */
diff -Nru a/fs/jfs/super.c b/fs/jfs/super.c
--- a/fs/jfs/super.c	Wed Jan  8 20:04:43 2003
+++ b/fs/jfs/super.c	Wed Jan  8 20:04:43 2003
@@ -382,6 +382,17 @@
 	return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super);
 }
 
+static int jfs_sync_fs(struct super_block *sb, int wait)
+{
+	struct jfs_log *log = JFS_SBI(sb)->log;
+
+	/* log == NULL indicates read-only mount */
+	if (log)
+		jfs_flush_journal(log, wait);
+
+	return 0;
+}
+
 static struct super_operations jfs_super_operations = {
 	.alloc_inode	= jfs_alloc_inode,
 	.destroy_inode	= jfs_destroy_inode,
@@ -389,6 +400,7 @@
 	.write_inode	= jfs_write_inode,
 	.delete_inode	= jfs_delete_inode,
 	.put_super	= jfs_put_super,
+	.sync_fs	= jfs_sync_fs,
 	.write_super_lockfs = jfs_write_super_lockfs,
 	.unlockfs       = jfs_unlockfs,
 	.statfs		= jfs_statfs,
diff -Nru a/fs/mpage.c b/fs/mpage.c
--- a/fs/mpage.c	Wed Jan  8 20:04:43 2003
+++ b/fs/mpage.c	Wed Jan  8 20:04:43 2003
@@ -275,7 +275,8 @@
 
 		prefetchw(&page->flags);
 		list_del(&page->list);
-		if (!add_to_page_cache(page, mapping, page->index)) {
+		if (!add_to_page_cache(page, mapping,
+					page->index, GFP_KERNEL)) {
 			bio = do_mpage_readpage(bio, page,
 					nr_pages - page_idx,
 					&last_block_in_bio, get_block);
diff -Nru a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c
--- a/fs/ncpfs/sock.c	Wed Jan  8 20:04:43 2003
+++ b/fs/ncpfs/sock.c	Wed Jan  8 20:04:43 2003
@@ -587,7 +587,9 @@
 				}
 #endif				
 				type = ntohs(server->rcv.buf.type);
+#ifdef CONFIG_NCPFS_PACKET_SIGNING				
 cont:;				
+#endif
 				if (type != NCP_REPLY) {
 					if (datalen - 8 <= sizeof(server->unexpected_packet.data)) {
 						*(__u16*)(server->unexpected_packet.data) = htons(type);
diff -Nru a/fs/nfs/direct.c b/fs/nfs/direct.c
--- a/fs/nfs/direct.c	Wed Jan  8 20:04:45 2003
+++ b/fs/nfs/direct.c	Wed Jan  8 20:04:45 2003
@@ -235,7 +235,7 @@
  * this function to do a write.
  */
 int
-nfs_direct_IO(int rw, struct file *file, const struct iovec *iov,
+nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
 		loff_t offset, unsigned long nr_segs)
 {
 	/* None of this works yet, so prevent it from compiling. */
diff -Nru a/fs/nfs/inode.c b/fs/nfs/inode.c
--- a/fs/nfs/inode.c	Wed Jan  8 20:04:44 2003
+++ b/fs/nfs/inode.c	Wed Jan  8 20:04:44 2003
@@ -1440,7 +1440,7 @@
 	server->mnt_path = p;
 
 	p = nfs_copy_user_string(server->ip_addr, &data->client_addr,
-			sizeof(server->ip_addr));
+			sizeof(server->ip_addr) - 1);
 	if (IS_ERR(p))
 		goto out_err;
 
diff -Nru a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
--- a/fs/nfs/nfs3proc.c	Wed Jan  8 20:04:44 2003
+++ b/fs/nfs/nfs3proc.c	Wed Jan  8 20:04:44 2003
@@ -731,7 +731,7 @@
 	req = nfs_list_entry(data->pages.next);
 	data->args.fh     = NFS_FH(inode);
 	data->args.offset = req_offset(req);
-	data->args.pgbase = req->wb_offset;
+	data->args.pgbase = req->wb_pgbase;
 	data->args.pages  = data->pagevec;
 	data->args.count  = count;
 	data->res.fattr   = &data->fattr;
@@ -788,7 +788,7 @@
 	req = nfs_list_entry(data->pages.next);
 	data->args.fh     = NFS_FH(inode);
 	data->args.offset = req_offset(req);
-	data->args.pgbase = req->wb_offset;
+	data->args.pgbase = req->wb_pgbase;
 	data->args.count  = count;
 	data->args.stable = stable;
 	data->args.pages  = data->pagevec;
diff -Nru a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
--- a/fs/nfs/nfs4proc.c	Wed Jan  8 20:04:44 2003
+++ b/fs/nfs/nfs4proc.c	Wed Jan  8 20:04:44 2003
@@ -1372,7 +1372,7 @@
 
 	data->args.fh     = NFS_FH(inode);
 	data->args.offset = req_offset(req);
-	data->args.pgbase = req->wb_offset;
+	data->args.pgbase = req->wb_pgbase;
 	data->args.pages  = data->pagevec;
 	data->args.count  = count;
 	data->res.fattr   = &data->fattr;
@@ -1445,7 +1445,7 @@
 
 	data->args.fh     = NFS_FH(inode);
 	data->args.offset = req_offset(req);
-	data->args.pgbase = req->wb_offset;
+	data->args.pgbase = req->wb_pgbase;
 	data->args.count  = count;
 	data->args.stable = stable;
 	data->args.pages  = data->pagevec;
diff -Nru a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
--- a/fs/nfs/nfs4xdr.c	Wed Jan  8 20:04:45 2003
+++ b/fs/nfs/nfs4xdr.c	Wed Jan  8 20:04:45 2003
@@ -321,7 +321,7 @@
 	 * Now we backfill the bitmap and the attribute buffer length.
 	 */
 	if (len != ((char *)p - (char *)q) + 4) {
-		printk ("encode_attr: Attr length calculation error! %u != %u\n",
+		printk ("encode_attr: Attr length calculation error! %u != %Zu\n",
 				len, ((char *)p - (char *)q) + 4);
 		BUG();
 	}
diff -Nru a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
--- a/fs/nfs/pagelist.c	Wed Jan  8 20:04:45 2003
+++ b/fs/nfs/pagelist.c	Wed Jan  8 20:04:45 2003
@@ -91,6 +91,7 @@
 	req->wb_index	= page->index;
 	page_cache_get(page);
 	req->wb_offset  = offset;
+	req->wb_pgbase	= offset;
 	req->wb_bytes   = count;
 
 	if (cred)
@@ -278,13 +279,13 @@
 			if (req->wb_index != (prev->wb_index + 1))
 				break;
 
-			if (req->wb_offset != 0)
+			if (req->wb_pgbase != 0)
 				break;
 		}
 		nfs_list_remove_request(req);
 		nfs_list_add_request(req, dst);
 		npages++;
-		if (req->wb_offset + req->wb_bytes != PAGE_CACHE_SIZE)
+		if (req->wb_pgbase + req->wb_bytes != PAGE_CACHE_SIZE)
 			break;
 		if (npages >= nmax)
 			break;
diff -Nru a/fs/nfs/proc.c b/fs/nfs/proc.c
--- a/fs/nfs/proc.c	Wed Jan  8 20:04:45 2003
+++ b/fs/nfs/proc.c	Wed Jan  8 20:04:45 2003
@@ -564,7 +564,7 @@
 	req = nfs_list_entry(data->pages.next);
 	data->args.fh     = NFS_FH(inode);
 	data->args.offset = req_offset(req);
-	data->args.pgbase = req->wb_offset;
+	data->args.pgbase = req->wb_pgbase;
 	data->args.pages  = data->pagevec;
 	data->args.count  = count;
 	data->res.fattr   = &data->fattr;
@@ -612,7 +612,7 @@
 	req = nfs_list_entry(data->pages.next);
 	data->args.fh     = NFS_FH(inode);
 	data->args.offset = req_offset(req);
-	data->args.pgbase = req->wb_offset;
+	data->args.pgbase = req->wb_pgbase;
 	data->args.count  = count;
 	data->args.stable = NFS_FILE_SYNC;
 	data->args.pages  = data->pagevec;
diff -Nru a/fs/nfs/read.c b/fs/nfs/read.c
--- a/fs/nfs/read.c	Wed Jan  8 20:04:31 2003
+++ b/fs/nfs/read.c	Wed Jan  8 20:04:31 2003
@@ -267,7 +267,7 @@
 		if (task->tk_status >= 0) {
 			if (count < PAGE_CACHE_SIZE) {
 				memclear_highpage_flush(page,
-							req->wb_offset + count,
+							req->wb_pgbase + count,
 							req->wb_bytes - count);
 
 				if (data->res.eof ||
diff -Nru a/fs/nfs/write.c b/fs/nfs/write.c
--- a/fs/nfs/write.c	Wed Jan  8 20:04:44 2003
+++ b/fs/nfs/write.c	Wed Jan  8 20:04:44 2003
@@ -568,6 +568,7 @@
 	/* Okay, the request matches. Update the region */
 	if (offset < req->wb_offset) {
 		req->wb_offset = offset;
+		req->wb_pgbase = offset;
 		req->wb_bytes = rqend - req->wb_offset;
 	}
 
@@ -700,7 +701,7 @@
 	 * Call the strategy routine so it can send out a bunch
 	 * of requests.
 	 */
-	if (req->wb_offset == 0 && req->wb_bytes == PAGE_CACHE_SIZE) {
+	if (req->wb_pgbase == 0 && req->wb_bytes == PAGE_CACHE_SIZE) {
 		SetPageUptodate(page);
 		nfs_unlock_request(req);
 		nfs_strategy(inode);
diff -Nru a/fs/nfsctl.c b/fs/nfsctl.c
--- a/fs/nfsctl.c	Wed Jan  8 20:04:45 2003
+++ b/fs/nfsctl.c	Wed Jan  8 20:04:45 2003
@@ -54,16 +54,13 @@
 static struct {
 	char *name; int wsize; int rsize;
 } map[] = {
-	[NFSCTL_SVC]={"svc", sizeof(struct nfsctl_svc)},
-	[NFSCTL_ADDCLIENT]={"add", sizeof(struct nfsctl_client)},
-	[NFSCTL_DELCLIENT]={"del", sizeof(struct nfsctl_client)},
-	[NFSCTL_EXPORT]={"export", sizeof(struct nfsctl_export)},
-	[NFSCTL_UNEXPORT]={"unexport", sizeof(struct nfsctl_export)},
-#ifdef notyet
-	[NFSCTL_UGIDUPDATE]={"ugid", sizeof(struct nfsctl_uidmap)},
-#endif
-	[NFSCTL_GETFD]={"getfd", sizeof(struct nfsctl_fdparm), NFS_FHSIZE},
-	[NFSCTL_GETFS]={"getfs", sizeof(struct nfsctl_fsparm), sizeof(struct knfsd_fh)},
+	[NFSCTL_SVC]={".svc", sizeof(struct nfsctl_svc)},
+	[NFSCTL_ADDCLIENT]={".add", sizeof(struct nfsctl_client)},
+	[NFSCTL_DELCLIENT]={".del", sizeof(struct nfsctl_client)},
+	[NFSCTL_EXPORT]={".export", sizeof(struct nfsctl_export)},
+	[NFSCTL_UNEXPORT]={".unexport", sizeof(struct nfsctl_export)},
+	[NFSCTL_GETFD]={".getfd", sizeof(struct nfsctl_fdparm), NFS_FHSIZE},
+	[NFSCTL_GETFS]={".getfs", sizeof(struct nfsctl_fsparm), sizeof(struct knfsd_fh)},
 };
 
 long
diff -Nru a/fs/nfsd/export.c b/fs/nfsd/export.c
--- a/fs/nfsd/export.c	Wed Jan  8 20:04:44 2003
+++ b/fs/nfsd/export.c	Wed Jan  8 20:04:44 2003
@@ -24,6 +24,7 @@
 #include <linux/dcache.h>
 #include <linux/namei.h>
 #include <linux/mount.h>
+#include <linux/hash.h>
 
 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>
@@ -59,12 +60,9 @@
 	int hash = item->ek_fsidtype;
 	char * cp = (char*)item->ek_fsid;
 	int len = (item->ek_fsidtype==0)?8:4;
-	while (len--)
-		hash += *cp++;
-	cp = (char*)&item->ek_client;
-	len = sizeof(item->ek_client);
-	while (len--)
-		hash += *cp++;
+
+	hash ^= hash_mem(cp, len, EXPKEY_HASHBITS);
+	hash ^= hash_ptr(item->ek_client, EXPKEY_HASHBITS);
 	return hash & EXPKEY_HASHMASK;
 }
 
@@ -239,17 +237,12 @@
 
 static inline int svc_export_hash(struct svc_export *item)
 {
-	void *k[2];
-	unsigned char *cp;
-	int rv, i;
-	k[0] = item->ex_client;
-	k[1] = item->ex_dentry;
-
-	cp = (char*)k;
-	rv = 0;
-	for (i=0; i<sizeof(k); i++)
-		rv ^= cp[i];
-	return rv & EXPORT_HASHMASK;
+	int rv;
+
+	rv = hash_ptr(item->ex_client, EXPORT_HASHBITS);
+	rv ^= hash_ptr(item->ex_dentry, EXPORT_HASHBITS);
+	rv ^= hash_ptr(item->ex_mnt, EXPORT_HASHBITS);
+	return rv;
 }
 
 void svc_export_put(struct cache_head *item, struct cache_detail *cd)
diff -Nru a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
--- a/fs/nfsd/nfs3xdr.c	Wed Jan  8 20:04:31 2003
+++ b/fs/nfsd/nfs3xdr.c	Wed Jan  8 20:04:31 2003
@@ -58,7 +58,7 @@
 static inline u32 *
 decode_fh(u32 *p, struct svc_fh *fhp)
 {
-	int size;
+	unsigned int size;
 	fh_init(fhp, NFS3_FHSIZE);
 	size = ntohl(*p++);
 	if (size > NFS3_FHSIZE)
diff -Nru a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
--- a/fs/nfsd/nfs4proc.c	Wed Jan  8 20:04:45 2003
+++ b/fs/nfsd/nfs4proc.c	Wed Jan  8 20:04:45 2003
@@ -568,6 +568,8 @@
 
 	resp->xbuf = &rqstp->rq_res;
 	resp->p = rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len;
+	resp->tagp = resp->p + 1; /* skip over status */
+	/* reserve space for: status, taglen, tag, and opcnt */
 	resp->p += 3 + XDR_QUADLEN(args->taglen);
 	resp->end = rqstp->rq_res.head[0].iov_base + PAGE_SIZE;
 	resp->taglen = args->taglen;
diff -Nru a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
--- a/fs/nfsd/nfs4xdr.c	Wed Jan  8 20:04:43 2003
+++ b/fs/nfsd/nfs4xdr.c	Wed Jan  8 20:04:43 2003
@@ -1728,8 +1728,17 @@
 	WRITE32(maxcount);
 	ADJUST_ARGS();
 	resp->xbuf->head[0].iov_len = ((char*)resp->p) - (char*)resp->xbuf->head[0].iov_base;
-	resp->p = resp->xbuf->tail[0].iov_base;
+
 	resp->xbuf->page_len = maxcount;
+
+	/* set up page for remaining responses */
+	svc_take_page(resp->rqstp);
+	resp->xbuf->tail[0].iov_base = 
+		page_address(resp->rqstp->rq_respages[resp->rqstp->rq_resused-1]);
+	resp->xbuf->tail[0].iov_len = 0;
+	resp->p = resp->xbuf->tail[0].iov_base;
+	resp->end = resp->p + PAGE_SIZE/4;
+
 	if (maxcount&3) {
 		*(resp->p)++ = 0;
 		resp->xbuf->tail[0].iov_base += maxcount&3;
@@ -1753,11 +1762,6 @@
 	svc_take_page(resp->rqstp);
 	page = page_address(resp->rqstp->rq_respages[resp->rqstp->rq_resused-1]);
 
-	svc_take_page(resp->rqstp);
-	resp->xbuf->tail[0].iov_base = 
-		page_address(resp->rqstp->rq_respages[resp->rqstp->rq_resused-1]);
-	resp->xbuf->tail[0].iov_len = 0;
-
 	maxcount = PAGE_SIZE;
 	RESERVE_SPACE(4);
 
@@ -1774,7 +1778,14 @@
 	WRITE32(maxcount);
 	ADJUST_ARGS();
 	resp->xbuf->head[0].iov_len = ((char*)resp->p) - (char*)resp->xbuf->head[0].iov_base;
+
+	svc_take_page(resp->rqstp);
+	resp->xbuf->tail[0].iov_base = 
+		page_address(resp->rqstp->rq_respages[resp->rqstp->rq_resused-1]);
+	resp->xbuf->tail[0].iov_len = 0;
 	resp->p = resp->xbuf->tail[0].iov_base;
+	resp->end = resp->p + PAGE_SIZE/4;
+
 	resp->xbuf->page_len = maxcount;
 	if (maxcount&3) {
 		*(resp->p)++ = 0;
@@ -1803,6 +1814,7 @@
 	WRITE32(0);
 	WRITE32(0);
 	ADJUST_ARGS();
+	resp->xbuf->head[0].iov_len = ((char*)resp->p) - (char*)resp->xbuf->head[0].iov_base;
 
 	maxcount = PAGE_SIZE;
 	if (maxcount > readdir->rd_maxcount)
@@ -1832,16 +1844,26 @@
 	    readdir->common.err == nfserr_readdir_nospc &&
 	    readdir->buffer == page) 
 		nfserr = nfserr_readdir_nospc;
-	if (!nfserr) {
-		if (readdir->offset)
-			xdr_encode_hyper(readdir->offset, offset);
+	if (nfserr)
+		return nfserr;
 
-		p = readdir->buffer;
-		*p++ = 0;	/* no more entries */
-		*p++ = htonl(readdir->common.err == nfserr_eof);
-		resp->xbuf->page_len = ((char*)p) - (char*)page_address(resp->rqstp->rq_respages[resp->rqstp->rq_resused-1]);
-	}
-	return nfserr;
+	if (readdir->offset)
+		xdr_encode_hyper(readdir->offset, offset);
+
+	p = readdir->buffer;
+	*p++ = 0;	/* no more entries */
+	*p++ = htonl(readdir->common.err == nfserr_eof);
+	resp->xbuf->page_len = ((char*)p) - (char*)page_address(resp->rqstp->rq_respages[resp->rqstp->rq_resused-1]);
+
+	/* allocate a page for the tail */
+	svc_take_page(resp->rqstp);
+	resp->xbuf->tail[0].iov_base = 
+		page_address(resp->rqstp->rq_respages[resp->rqstp->rq_resused-1]);
+	resp->xbuf->tail[0].iov_len = 0;
+	resp->p = resp->xbuf->tail[0].iov_base;
+	resp->end = resp->p + PAGE_SIZE/4;
+
+	return 0;
 }
 
 static void
@@ -2066,6 +2088,7 @@
 	 * All that remains is to write the tag and operation count...
 	 */
 	struct iovec *iov;
+	p = resp->tagp;
 	*p++ = htonl(resp->taglen);
 	memcpy(p, resp->tag, resp->taglen);
 	p += XDR_QUADLEN(resp->taglen);
diff -Nru a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
--- a/fs/nfsd/nfsctl.c	Wed Jan  8 20:04:43 2003
+++ b/fs/nfsd/nfsctl.c	Wed Jan  8 20:04:43 2003
@@ -46,20 +46,25 @@
 	NFSD_Getfd,
 	NFSD_Getfs,
 	NFSD_List,
+	NFSD_Fh,
+	NFSD_Threads,
+	NFSD_END
 };
 
 /*
  * write() for these nodes.
  */
-static ssize_t write_svc(struct file *file, const char *buf, size_t size);
-static ssize_t write_add(struct file *file, const char *buf, size_t size);
-static ssize_t write_del(struct file *file, const char *buf, size_t size);
-static ssize_t write_export(struct file *file, const char *buf, size_t size);
-static ssize_t write_unexport(struct file *file, const char *buf, size_t size);
-static ssize_t write_getfd(struct file *file, const char *buf, size_t size);
-static ssize_t write_getfs(struct file *file, const char *buf, size_t size);
+static ssize_t write_svc(struct file *file, char *buf, size_t size);
+static ssize_t write_add(struct file *file, char *buf, size_t size);
+static ssize_t write_del(struct file *file, char *buf, size_t size);
+static ssize_t write_export(struct file *file, char *buf, size_t size);
+static ssize_t write_unexport(struct file *file, char *buf, size_t size);
+static ssize_t write_getfd(struct file *file, char *buf, size_t size);
+static ssize_t write_getfs(struct file *file, char *buf, size_t size);
+static ssize_t write_filehandle(struct file *file, char *buf, size_t size);
+static ssize_t write_threads(struct file *file, char *buf, size_t size);
 
-static ssize_t (*write_op[])(struct file *, const char *, size_t) = {
+static ssize_t (*write_op[])(struct file *, char *, size_t) = {
 	[NFSD_Svc] = write_svc,
 	[NFSD_Add] = write_add,
 	[NFSD_Del] = write_del,
@@ -67,32 +72,81 @@
 	[NFSD_Unexport] = write_unexport,
 	[NFSD_Getfd] = write_getfd,
 	[NFSD_Getfs] = write_getfs,
+	[NFSD_Fh] = write_filehandle,
+	[NFSD_Threads] = write_threads,
 };
 
-static ssize_t fs_write(struct file *file, const char *buf, size_t size, loff_t *pos)
+/* an argresp is stored in an allocated page and holds the 
+ * size of the argument or response, along with it's content
+ */
+struct argresp {
+	ssize_t size;
+	char data[0];
+};
+
+/*
+ * transaction based IO methods.
+ * The file expects a single write which triggers the transaction, and then
+ * possibly a read which collects the result - which is stored in a 
+ * file-local buffer.
+ */
+static ssize_t TA_write(struct file *file, const char *buf, size_t size, loff_t *pos)
 {
 	ino_t ino =  file->f_dentry->d_inode->i_ino;
+	struct argresp *ar;
+	ssize_t rv = 0;
+
 	if (ino >= sizeof(write_op)/sizeof(write_op[0]) || !write_op[ino])
 		return -EINVAL;
-	return write_op[ino](file, buf, size);
+	if (file->private_data) 
+		return -EINVAL; /* only one write allowed per open */
+	if (size > PAGE_SIZE - sizeof(struct argresp))
+		return -EFBIG;
+
+	ar = kmalloc(PAGE_SIZE, GFP_KERNEL);
+	if (!ar)
+		return -ENOMEM;
+	ar->size = 0;
+	down(&file->f_dentry->d_inode->i_sem);
+	if (file->private_data)
+		rv = -EINVAL;
+	else
+		file->private_data = ar;
+	up(&file->f_dentry->d_inode->i_sem);
+	if (rv) {
+		kfree(ar);
+		return rv;
+	}
+	if (copy_from_user(ar->data, buf, size))
+		return -EFAULT;
+	
+	rv =  write_op[ino](file, ar->data, size);
+	if (rv>0) {
+		ar->size = rv;
+		rv = size;
+	}
+	return rv;
 }
 
-/*
- * read(), open() and release() for getfs and getfd (read/write ones).
- * IO on these is a simple transaction - you open() the file, write() to it
- * and that generates a (stored) response.  After that read() will simply
- * access that response.
- */
 
 static ssize_t TA_read(struct file *file, char *buf, size_t size, loff_t *pos)
 {
-	if (!file->private_data)
+	struct argresp *ar;
+	ssize_t rv = 0;
+	
+	if (file->private_data == NULL)
+		rv = TA_write(file, buf, 0, pos);
+	if (rv < 0)
+		return rv;
+
+	ar = file->private_data;
+	if (!ar)
 		return 0;
-	if (*pos >= file->f_dentry->d_inode->i_size)
+	if (*pos >= ar->size)
 		return 0;
-	if (*pos + size > file->f_dentry->d_inode->i_size)
-		size = file->f_dentry->d_inode->i_size - *pos;
-	if (copy_to_user(buf, file->private_data + *pos, size))
+	if (*pos + size > ar->size)
+		size = ar->size - *pos;
+	if (copy_to_user(buf, ar->data + *pos, size))
 		return -EFAULT;
 	*pos += size;
 	return size;
@@ -112,12 +166,8 @@
 	return 0;
 }
 
-static struct file_operations writer_ops = {
-	.write	= fs_write,
-};
-
-static struct file_operations reader_ops = {
-	.write		= fs_write,
+static struct file_operations transaction_ops = {
+	.write		= TA_write,
 	.read		= TA_read,
 	.open		= TA_open,
 	.release	= TA_release,
@@ -158,169 +208,224 @@
  *	Description of fs contents.
  */
 static struct { char *name; struct file_operations *ops; int mode; } files[] = {
-	[NFSD_Svc] = {"svc", &writer_ops, S_IWUSR},
-	[NFSD_Add] = {"add", &writer_ops, S_IWUSR},
-	[NFSD_Del] = {"del", &writer_ops, S_IWUSR},
-	[NFSD_Export] = {"export", &writer_ops, S_IWUSR},
-	[NFSD_Unexport] = {"unexport", &writer_ops, S_IWUSR},
-	[NFSD_Getfd] = {"getfd", &reader_ops, S_IWUSR|S_IRUSR},
-	[NFSD_Getfs] = {"getfs", &reader_ops, S_IWUSR|S_IRUSR},
+	[NFSD_Svc] = {".svc", &transaction_ops, S_IWUSR},
+	[NFSD_Add] = {".add", &transaction_ops, S_IWUSR},
+	[NFSD_Del] = {".del", &transaction_ops, S_IWUSR},
+	[NFSD_Export] = {".export", &transaction_ops, S_IWUSR},
+	[NFSD_Unexport] = {".unexport", &transaction_ops, S_IWUSR},
+	[NFSD_Getfd] = {".getfd", &transaction_ops, S_IWUSR|S_IRUSR},
+	[NFSD_Getfs] = {".getfs", &transaction_ops, S_IWUSR|S_IRUSR},
 	[NFSD_List] = {"exports", &exports_operations, S_IRUGO},
+	[NFSD_Fh] = {"filehandle", &transaction_ops, S_IWUSR|S_IRUSR},
+	[NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR},
 };
 
 /*----------------------------------------------------------------------------*/
 /*
  * payload - write methods
+ * If the method has a response, the response should be put in buf,
+ * and the length returned.  Otherwise return 0 or and -error.
  */
 
-static ssize_t write_svc(struct file *file, const char *buf, size_t size)
+static ssize_t write_svc(struct file *file, char *buf, size_t size)
 {
-	struct nfsctl_svc data;
-	if (size < sizeof(data))
+	struct nfsctl_svc *data;
+	if (size < sizeof(*data))
 		return -EINVAL;
-	if (copy_from_user(&data, buf, size))
-		return -EFAULT;
-	return nfsd_svc(data.svc_port, data.svc_nthreads);
+	data = (struct nfsctl_svc*) buf;
+	return nfsd_svc(data->svc_port, data->svc_nthreads);
 }
 
-static ssize_t write_add(struct file *file, const char *buf, size_t size)
+static ssize_t write_add(struct file *file, char *buf, size_t size)
 {
-	struct nfsctl_client data;
-	if (size < sizeof(data))
+	struct nfsctl_client *data;
+	if (size < sizeof(*data))
 		return -EINVAL;
-	if (copy_from_user(&data, buf, size))
-		return -EFAULT;
-	return exp_addclient(&data);
+	data = (struct nfsctl_client *)buf;
+	return exp_addclient(data);
 }
 
-static ssize_t write_del(struct file *file, const char *buf, size_t size)
+static ssize_t write_del(struct file *file, char *buf, size_t size)
 {
-	struct nfsctl_client data;
-	if (size < sizeof(data))
+	struct nfsctl_client *data;
+	if (size < sizeof(*data))
 		return -EINVAL;
-	if (copy_from_user(&data, buf, size))
-		return -EFAULT;
-	return exp_delclient(&data);
+	data = (struct nfsctl_client *)buf;
+	return exp_delclient(data);
 }
 
-static ssize_t write_export(struct file *file, const char *buf, size_t size)
+static ssize_t write_export(struct file *file, char *buf, size_t size)
 {
-	struct nfsctl_export data;
-	if (size < sizeof(data))
+	struct nfsctl_export *data;
+	if (size < sizeof(*data))
 		return -EINVAL;
-	if (copy_from_user(&data, buf, size))
-		return -EFAULT;
-	return exp_export(&data);
+	data = (struct nfsctl_export*)buf;
+	return exp_export(data);
 }
 
-static ssize_t write_unexport(struct file *file, const char *buf, size_t size)
+static ssize_t write_unexport(struct file *file, char *buf, size_t size)
 {
-	struct nfsctl_export data;
-	if (size < sizeof(data))
+	struct nfsctl_export *data;
+
+	if (size < sizeof(*data))
 		return -EINVAL;
-	if (copy_from_user(&data, buf, size))
-		return -EFAULT;
-	return exp_unexport(&data);
+	data = (struct nfsctl_export*)buf;
+	return exp_unexport(data);
 }
 
-static ssize_t write_getfs(struct file *file, const char *buf, size_t size)
+static ssize_t write_getfs(struct file *file, char *buf, size_t size)
 {
-	struct nfsctl_fsparm data;
+	struct nfsctl_fsparm *data;
 	struct sockaddr_in *sin;
 	struct auth_domain *clp;
 	int err = 0;
 	struct knfsd_fh *res;
 
-	if (file->private_data)
+	if (size < sizeof(*data))
 		return -EINVAL;
-	if (size < sizeof(data))
-		return -EINVAL;
-	if (copy_from_user(&data, buf, size))
-		return -EFAULT;
-	if (data.gd_addr.sa_family != AF_INET)
-		return -EPROTONOSUPPORT;
-	sin = (struct sockaddr_in *)&data.gd_addr;
-	if (data.gd_maxlen > NFS3_FHSIZE)
-		data.gd_maxlen = NFS3_FHSIZE;
-	res = kmalloc(sizeof(struct knfsd_fh), GFP_KERNEL);
-	if (!res)
-		return -ENOMEM;
-	memset(res, 0, sizeof(struct knfsd_fh));
+	data = (struct nfsctl_fsparm*)buf;
+	err = -EPROTONOSUPPORT;
+	if (data->gd_addr.sa_family != AF_INET)
+		goto out;
+	sin = (struct sockaddr_in *)&data->gd_addr;
+	if (data->gd_maxlen > NFS3_FHSIZE)
+		data->gd_maxlen = NFS3_FHSIZE;
+
+	res = (struct knfsd_fh*)buf;
+
 	exp_readlock();
 	if (!(clp = auth_unix_lookup(sin->sin_addr)))
 		err = -EPERM;
 	else {
-		err = exp_rootfh(clp, data.gd_path, res, data.gd_maxlen);
+		err = exp_rootfh(clp, data->gd_path, res, data->gd_maxlen);
 		auth_domain_put(clp);
 	}
 	exp_readunlock();
-
-	down(&file->f_dentry->d_inode->i_sem);
-	if (file->private_data)
-		err = -EINVAL;
-	if (err)
-		kfree(res);
-	else {
-		file->f_dentry->d_inode->i_size = res->fh_size + (int)&((struct knfsd_fh*)0)->fh_base;
-		file->private_data = res;
-		err = sizeof(data);
-	}
-	up(&file->f_dentry->d_inode->i_sem);
-
+	if (err == 0)
+		err = res->fh_size + (int)&((struct knfsd_fh*)0)->fh_base;
+ out:
 	return err;
 }
 
-static ssize_t write_getfd(struct file *file, const char *buf, size_t size)
+static ssize_t write_getfd(struct file *file, char *buf, size_t size)
 {
-	struct nfsctl_fdparm data;
+	struct nfsctl_fdparm *data;
 	struct sockaddr_in *sin;
 	struct auth_domain *clp;
 	int err = 0;
 	struct knfsd_fh fh;
 	char *res;
 
-	if (file->private_data)
+	if (size < sizeof(*data))
 		return -EINVAL;
-	if (size < sizeof(data))
-		return -EINVAL;
-	if (copy_from_user(&data, buf, size))
-		return -EFAULT;
-	if (data.gd_addr.sa_family != AF_INET)
-		return -EPROTONOSUPPORT;
-	if (data.gd_version < 2 || data.gd_version > NFSSVC_MAXVERS)
-		return -EINVAL;
-	res = kmalloc(NFS_FHSIZE, GFP_KERNEL);
-	if (!res)
-		return -ENOMEM;
-	sin = (struct sockaddr_in *)&data.gd_addr;
+	data = (struct nfsctl_fdparm*)buf;
+	err = -EPROTONOSUPPORT;
+	if (data->gd_addr.sa_family != AF_INET)
+		goto out;
+	err = -EINVAL;
+	if (data->gd_version < 2 || data->gd_version > NFSSVC_MAXVERS)
+		goto out;
+
+	res = buf;
+	sin = (struct sockaddr_in *)&data->gd_addr;
 	exp_readlock();
 	if (!(clp = auth_unix_lookup(sin->sin_addr)))
 		err = -EPERM;
 	else {
-		err = exp_rootfh(clp, data.gd_path, &fh, NFS_FHSIZE);
+		err = exp_rootfh(clp, data->gd_path, &fh, NFS_FHSIZE);
 		auth_domain_put(clp);
 	}
 	exp_readunlock();
 
-	down(&file->f_dentry->d_inode->i_sem);
-	if (file->private_data)
-		err = -EINVAL;
-	if (!err && fh.fh_size > NFS_FHSIZE)
-		err = -EINVAL;
-	if (err)
-		kfree(res);
-	else {
+	if (err == 0) {
 		memset(res,0, NFS_FHSIZE);
 		memcpy(res, &fh.fh_base, fh.fh_size);
-		file->f_dentry->d_inode->i_size = NFS_FHSIZE;
-		file->private_data = res;
-		err = sizeof(data);
+		err = NFS_FHSIZE;
 	}
-	up(&file->f_dentry->d_inode->i_sem);
-
+ out:
 	return err;
 }
 
+static ssize_t write_filehandle(struct file *file, char *buf, size_t size)
+{
+	/* request is:
+	 *   domain path maxsize
+	 * response is
+	 *   filehandle
+	 *
+	 * qword quoting is used, so filehandle will be \x....
+	 */
+	char *dname, *path;
+	int maxsize;
+	char *mesg = buf;
+	int len;
+	struct auth_domain *dom;
+	struct knfsd_fh fh;
+
+	if (buf[size-1] != '\n')
+		return -EINVAL;
+	buf[size-1] = 0;
+
+	dname = mesg;
+	len = qword_get(&mesg, dname, size);
+	if (len <= 0) return -EINVAL;
+	
+	path = dname+len+1;
+	len = qword_get(&mesg, path, size);
+	if (len <= 0) return -EINVAL;
+
+	len = get_int(&mesg, &maxsize);
+	if (len)
+		return len;
+
+	if (maxsize < NFS_FHSIZE)
+		return -EINVAL;
+	if (maxsize > NFS3_FHSIZE)
+		maxsize = NFS3_FHSIZE;
+
+	if (qword_get(&mesg, mesg, size)>0)
+		return -EINVAL;
+
+	/* we have all the words, they are in buf.. */
+	dom = unix_domain_find(dname);
+	if (!dom)
+		return -ENOMEM;
+
+	len = exp_rootfh(dom, path, &fh,  maxsize);
+	auth_domain_put(dom);
+	if (len)
+		return len;
+	
+	mesg = buf; len = PAGE_SIZE-sizeof(struct argresp);
+	qword_addhex(&mesg, &len, (char*)&fh.fh_base, fh.fh_size);
+	mesg[-1] = '\n';
+	return mesg - buf;	
+}
+
+extern int nfsd_nrthreads(void);
+
+static ssize_t write_threads(struct file *file, char *buf, size_t size)
+{
+	/* if size > 0, look for a number of threads and call nfsd_svc
+	 * then write out number of threads as reply
+	 */
+	char *mesg = buf;
+	int rv;
+	if (size > 0) {
+		int newthreads;
+		rv = get_int(&mesg, &newthreads);
+		if (rv)
+			return rv;
+		if (newthreads <0)
+			return -EINVAL;
+		rv = nfsd_svc(2049, newthreads);
+		if (rv)
+			return rv;
+	}
+	sprintf(buf, "%d\n", nfsd_nrthreads());
+	return strlen(buf);
+}
+
 /*----------------------------------------------------------------------------*/
 /*
  *	populating the filesystem.
@@ -357,7 +462,7 @@
 		iput(inode);
 		return -ENOMEM;
 	}
-	for (i = NFSD_Svc; i <= NFSD_List; i++) {
+	for (i = NFSD_Svc; i < NFSD_END; i++) {
 		struct qstr name;
 		name.name = files[i].name;
 		name.len = strlen(name.name);
diff -Nru a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
--- a/fs/nfsd/nfsfh.c	Wed Jan  8 20:04:43 2003
+++ b/fs/nfsd/nfsfh.c	Wed Jan  8 20:04:43 2003
@@ -146,11 +146,11 @@
 		}
 
 		error = nfserr_dropit;
-		if (IS_ERR(exp))
+		if (IS_ERR(exp) && PTR_ERR(exp) == -EAGAIN)
 			goto out;
 
 		error = nfserr_stale; 
-		if (!exp)
+		if (!exp || IS_ERR(exp))
 			goto out;
 
 		/* Check if the request originated from a secure port. */
diff -Nru a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
--- a/fs/nfsd/nfssvc.c	Wed Jan  8 20:04:32 2003
+++ b/fs/nfsd/nfssvc.c	Wed Jan  8 20:04:32 2003
@@ -66,6 +66,14 @@
  */
 #define	NFSD_MAXSERVS		8192
 
+int nfsd_nrthreads(void)
+{
+	if (nfsd_serv == NULL)
+		return 0;
+	else
+		return nfsd_serv->sv_nrthreads;
+}
+
 int
 nfsd_svc(unsigned short port, int nrservs)
 {
diff -Nru a/fs/partitions/check.c b/fs/partitions/check.c
--- a/fs/partitions/check.c	Wed Jan  8 20:04:45 2003
+++ b/fs/partitions/check.c	Wed Jan  8 20:04:45 2003
@@ -19,7 +19,6 @@
 #include <linux/blk.h>
 #include <linux/kmod.h>
 #include <linux/ctype.h>
-#include <../drivers/base/fs/fs.h>	/* Eeeeewwwww */
 
 #include "check.h"
 
@@ -345,19 +344,11 @@
 
 extern struct subsystem block_subsys;
 
-static struct subsystem part_subsys = {
-	.parent		= &block_subsys,
+static struct kobj_type ktype_part = {
 	.default_attrs	= default_attrs,
 	.sysfs_ops	= &part_sysfs_ops,
 };
 
-static int __init part_subsys_init(void)
-{
-	return subsystem_register(&part_subsys);
-}
-
-__initcall(part_subsys_init);
-
 void delete_partition(struct gendisk *disk, int part)
 {
 	struct hd_struct *p = disk->part + part - 1;
@@ -379,7 +370,7 @@
 	devfs_register_partition(disk, part);
 	snprintf(p->kobj.name,KOBJ_NAME_LEN,"%s%d",disk->kobj.name,part);
 	p->kobj.parent = &disk->kobj;
-	p->kobj.subsys = &part_subsys;
+	p->kobj.ktype = &ktype_part;
 	kobject_register(&p->kobj);
 }
 
@@ -399,13 +390,15 @@
 	struct block_device *bdev;
 	char *s;
 	int j;
+	int err;
 
 	strncpy(disk->kobj.name,disk->disk_name,KOBJ_NAME_LEN);
 	/* ewww... some of these buggers have / in name... */
 	s = strchr(disk->kobj.name, '/');
 	if (s)
 		*s = '!';
-	kobject_add(&disk->kobj);
+	if ((err = kobject_add(&disk->kobj)))
+		return;
 	disk_sysfs_symlinks(disk);
 
 	if (disk->flags & GENHD_FL_CD)
diff -Nru a/fs/proc/array.c b/fs/proc/array.c
--- a/fs/proc/array.c	Wed Jan  8 20:04:44 2003
+++ b/fs/proc/array.c	Wed Jan  8 20:04:44 2003
@@ -161,7 +161,8 @@
 		"Uid:\t%d\t%d\t%d\t%d\n"
 		"Gid:\t%d\t%d\t%d\t%d\n",
 		get_task_state(p), p->tgid,
-		p->pid, p->pid ? p->real_parent->pid : 0, 0,
+		p->pid, p->pid ? p->real_parent->pid : 0,
+		p->pid && p->ptrace ? p->parent->pid : 0,
 		p->uid, p->euid, p->suid, p->fsuid,
 		p->gid, p->egid, p->sgid, p->fsgid);
 	read_unlock(&tasklist_lock);	
diff -Nru a/fs/readdir.c b/fs/readdir.c
--- a/fs/readdir.c	Wed Jan  8 20:04:44 2003
+++ b/fs/readdir.c	Wed Jan  8 20:04:44 2003
@@ -11,6 +11,7 @@
 #include <linux/file.h>
 #include <linux/smp_lock.h>
 #include <linux/fs.h>
+#include <linux/dirent.h>
 #include <linux/security.h>
 
 #include <asm/uaccess.h>
@@ -193,17 +194,6 @@
 out:
 	return error;
 }
-
-/*
- * And even better one including d_type field and 64bit d_ino and d_off.
- */
-struct linux_dirent64 {
-	u64		d_ino;
-	s64		d_off;
-	unsigned short	d_reclen;
-	unsigned char	d_type;
-	char		d_name[0];
-};
 
 #define ROUND_UP64(x) (((x)+sizeof(u64)-1) & ~(sizeof(u64)-1))
 
diff -Nru a/fs/romfs/inode.c b/fs/romfs/inode.c
--- a/fs/romfs/inode.c	Wed Jan  8 20:04:44 2003
+++ b/fs/romfs/inode.c	Wed Jan  8 20:04:44 2003
@@ -74,6 +74,7 @@
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
+#include <linux/vfs.h>
 
 #include <asm/uaccess.h>
 
diff -Nru a/fs/sysfs/inode.c b/fs/sysfs/inode.c
--- a/fs/sysfs/inode.c	Wed Jan  8 20:04:45 2003
+++ b/fs/sysfs/inode.c	Wed Jan  8 20:04:45 2003
@@ -145,7 +145,7 @@
 	return error;
 }
 
-#define to_subsys(k) container_of(k,struct subsystem,kobj)
+#define to_subsys(k) container_of(k,struct subsystem,kset.kobj)
 #define to_sattr(a) container_of(a,struct subsys_attribute,attr)
 
 /**
@@ -303,11 +303,13 @@
 	if (!kobj || !attr)
 		goto Einval;
 
-	/* if the kobject has no subsystem, then it is a subsystem itself,
-	 * so give it the subsys_sysfs_ops.
+	/* if the kobject has no ktype, then we assume that it is a subsystem
+	 * itself, and use ops for it.
 	 */
-	if (kobj->subsys)
-		ops = kobj->subsys->sysfs_ops;
+	if (kobj->kset && kobj->kset->ktype)
+		ops = kobj->kset->ktype->sysfs_ops;
+	else if (kobj->ktype)
+		ops = kobj->ktype->sysfs_ops;
 	else
 		ops = &subsys_sysfs_ops;
 
diff -Nru a/fs/xfs/linux/xfs_aops.c b/fs/xfs/linux/xfs_aops.c
--- a/fs/xfs/linux/xfs_aops.c	Wed Jan  8 20:04:45 2003
+++ b/fs/xfs/linux/xfs_aops.c	Wed Jan  8 20:04:45 2003
@@ -625,14 +625,15 @@
 STATIC int
 linvfs_direct_IO(
 	int			rw,
-	struct file		*file,
+	struct kiocb		*iocb,
 	const struct iovec	*iov,
 	loff_t			offset,
 	unsigned long		nr_segs)
 {
+	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-        return generic_direct_IO(rw, inode, NULL,
+        return blockdev_direct_IO(rw, iocb, inode, NULL,
 			iov, offset, nr_segs, linvfs_get_blocks_direct);
 }
 
diff -Nru a/include/asm-alpha/irq.h b/include/asm-alpha/irq.h
--- a/include/asm-alpha/irq.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-alpha/irq.h	Wed Jan  8 20:04:45 2003
@@ -31,7 +31,6 @@
 # define NR_IRQS	32
 
 #elif defined(CONFIG_ALPHA_ALCOR)     || \
-      defined(CONFIG_ALPHA_XLT)       || \
       defined(CONFIG_ALPHA_MIATA)     || \
       defined(CONFIG_ALPHA_RUFFIAN)   || \
       defined(CONFIG_ALPHA_RX164)     || \
diff -Nru a/include/asm-alpha/module.h b/include/asm-alpha/module.h
--- a/include/asm-alpha/module.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-alpha/module.h	Wed Jan  8 20:04:43 2003
@@ -1,6 +1,23 @@
-#ifndef _ASM_ALPHA_MODULE_H
-#define _ASM_ALPHA_MODULE_H
+#ifndef _ALPHA_MODULE_H
+#define _ALPHA_MODULE_H
 
-/* Module rewrite still in progress.  */
+struct mod_arch_specific
+{
+	unsigned int gotsecindex;
+};
 
-#endif /* _ASM_ALPHA_MODULE_H */
+#define Elf_Sym Elf64_Sym
+#define Elf_Shdr Elf64_Shdr
+#define Elf_Ehdr Elf64_Ehdr
+#define Elf_Phdr Elf64_Phdr
+#define Elf_Dyn Elf64_Dyn
+#define Elf_Rel Elf64_Rel
+#define Elf_Rela Elf64_Rela
+
+#define ARCH_SHF_SMALL SHF_ALPHA_GPREL
+
+#ifdef MODULE
+asm(".section .got,\"aws\",@nobits; .align 3; .previous");
+#endif
+
+#endif /*_ALPHA_MODULE_H*/
diff -Nru a/include/asm-alpha/uaccess.h b/include/asm-alpha/uaccess.h
--- a/include/asm-alpha/uaccess.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-alpha/uaccess.h	Wed Jan  8 20:04:44 2003
@@ -501,19 +501,14 @@
 	} fixup;
 };
 
-/* Returns 0 if exception not found and fixup.unit otherwise.  */
-extern unsigned search_exception_table(unsigned long);
-
 /* Returns the new pc */
-#define fixup_exception(map_reg, fixup_unit, pc)		\
+#define fixup_exception(map_reg, fixup, pc)			\
 ({								\
-	union exception_fixup __fie_fixup;			\
-	__fie_fixup.unit = fixup_unit;				\
-	if (__fie_fixup.bits.valreg != 31)			\
-		map_reg(__fie_fixup.bits.valreg) = 0;		\
-	if (__fie_fixup.bits.errreg != 31)			\
-		map_reg(__fie_fixup.bits.errreg) = -EFAULT;	\
-	(pc) + __fie_fixup.bits.nextinsn;			\
+	if ((fixup)->fixup.bits.valreg != 31)			\
+		map_reg((fixup)->fixup.bits.valreg) = 0;	\
+	if ((fixup)->fixup.bits.errreg != 31)			\
+		map_reg((fixup)->fixup.bits.errreg) = -EFAULT;	\
+	(pc) + (fixup)->fixup.bits.nextinsn;			\
 })
 
 
diff -Nru a/include/asm-arm/arch-iop310/memory.h b/include/asm-arm/arch-iop310/memory.h
--- a/include/asm-arm/arch-iop310/memory.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-arm/arch-iop310/memory.h	Wed Jan  8 20:04:45 2003
@@ -6,6 +6,7 @@
 #define __ASM_ARCH_MEMORY_H
 
 #include <linux/config.h>
+#include <asm/arch/iop310.h>
 
 /*
  * Task size: 3GB
diff -Nru a/include/asm-arm/current.h b/include/asm-arm/current.h
--- a/include/asm-arm/current.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-arm/current.h	Wed Jan  8 20:04:44 2003
@@ -1,7 +1,7 @@
 #ifndef _ASMARM_CURRENT_H
 #define _ASMARM_CURRENT_H
 
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
 
 static inline struct task_struct *get_current(void) __attribute__ (( __const__ ));
 
diff -Nru a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
--- a/include/asm-arm/dma-mapping.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-arm/dma-mapping.h	Wed Jan  8 20:04:32 2003
@@ -1 +1,303 @@
-#include <asm-generic/dma-mapping.h>
+#ifndef ASMARM_DMA_MAPPING_H
+#define ASMARM_DMA_MAPPING_H
+
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+#include <linux/mm.h> /* need struct page */
+
+#include <asm/scatterlist.h>
+
+/*
+ * DMA-consistent mapping functions.  These allocate/free a region of
+ * uncached, unwrite-buffered mapped memory space for use with DMA
+ * devices.  This is the "generic" version.  The PCI specific version
+ * is in pci.h
+ */
+extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle);
+extern void consistent_free(void *vaddr, size_t size, dma_addr_t handle);
+extern void consistent_sync(void *kaddr, size_t size, int rw);
+
+/*
+ * For SA-1111 these functions are "magic" and utilize bounce
+ * bufferes as needed to work around SA-1111 DMA bugs.
+ */
+dma_addr_t sa1111_map_single(void *, size_t, int);
+void sa1111_unmap_single(dma_addr_t, size_t, int);
+int sa1111_map_sg(struct scatterlist *, int, int);
+void sa1111_unmap_sg(struct scatterlist *, int, int);
+void sa1111_dma_sync_single(dma_addr_t, size_t, int);
+void sa1111_dma_sync_sg(struct scatterlist *, int, int);
+
+#ifdef CONFIG_SA1111
+
+extern struct bus_type sa1111_bus_type;
+
+#define dmadev_is_sa1111(dev)	((dev)->bus == &sa1111_bus_type)
+
+#else
+#define dmadev_is_sa1111(dev)	(0)
+#endif
+
+/*
+ * Return whether the given device DMA address mask can be supported
+ * properly.  For example, if your device can only drive the low 24-bits
+ * during PCI bus mastering, then you would pass 0x00ffffff as the mask
+ * to this function.
+ */
+static inline int dma_supported(struct device *dev, u64 mask)
+{
+	return 1;
+}
+
+static inline int dma_set_mask(struct device *dev, u64 dma_mask)
+{
+	if (!dev->dma_mask || !dma_supported(dev, dma_mask))
+		return -EIO;
+
+	*dev->dma_mask = dma_mask;
+
+	return 0;
+}
+
+static inline int dma_get_cache_alignment(void)
+{
+	return 32;
+}
+
+static inline int dma_is_consistent(dma_addr_t handle)
+{
+	return 0;
+}
+
+/**
+ * dma_alloc_coherent - allocate consistent memory for DMA
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @size: required memory size
+ * @handle: bus-specific DMA address
+ *
+ * Allocate some uncached, unbuffered memory for a device for
+ * performing DMA.  This function allocates pages, and will
+ * return the CPU-viewed address, and sets @handle to be the
+ * device-viewed address.
+ */
+static inline void *
+dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle)
+{
+	int gfp = GFP_KERNEL;
+
+	if (dev == NULL || dmadev_is_sa1111(dev) || *dev->dma_mask != 0xffffffff)
+		gfp |= GFP_DMA;
+
+	return consistent_alloc(gfp, size, handle);
+}
+
+/**
+ * dma_free_coherent - free memory allocated by dma_alloc_coherent
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @size: size of memory originally requested in dma_alloc_coherent
+ * @cpu_addr: CPU-view address returned from dma_alloc_coherent
+ * @handle: device-view address returned from dma_alloc_coherent
+ *
+ * Free (and unmap) a DMA buffer previously allocated by
+ * dma_alloc_coherent().
+ *
+ * References to memory and mappings associated with cpu_addr/handle
+ * during and after this call executing are illegal.
+ */
+static inline void
+dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
+		  dma_addr_t handle)
+{
+	consistent_free(cpu_addr, size, handle);
+}
+
+/**
+ * dma_map_single - map a single buffer for streaming DMA
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @cpu_addr: CPU direct mapped address of buffer
+ * @size: size of buffer to map
+ * @dir: DMA transfer direction
+ *
+ * Ensure that any data held in the cache is appropriately discarded
+ * or written back.
+ *
+ * The device owns this memory once this call has completed.  The CPU
+ * can regain ownership by calling dma_unmap_single() or dma_sync_single().
+ */
+static inline dma_addr_t
+dma_map_single(struct device *dev, void *cpu_addr, size_t size,
+	       enum dma_data_direction dir)
+{
+	if (dmadev_is_sa1111(dev))
+		return sa1111_map_single(cpu_addr, size, dir);
+
+	consistent_sync(cpu_addr, size, dir);
+	return __virt_to_bus((unsigned long)cpu_addr);
+}
+
+/**
+ * dma_unmap_single - unmap a single buffer previously mapped
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @handle: DMA address of buffer
+ * @size: size of buffer to map
+ * @dir: DMA transfer direction
+ *
+ * Unmap a single streaming mode DMA translation.  The handle and size
+ * must match what was provided in the previous dma_map_single() call.
+ * All other usages are undefined.
+ *
+ * After this call, reads by the CPU to the buffer are guaranteed to see
+ * whatever the device wrote there.
+ */
+static inline void
+dma_unmap_single(struct device *dev, dma_addr_t handle, size_t size,
+		 enum dma_data_direction dir)
+{
+	if (dmadev_is_sa1111(dev))
+		sa1111_unmap_single(handle, size, dir);
+
+	/* nothing to do */
+}
+
+#if 0
+static inline dma_addr_t
+dma_map_page(struct device *dev, struct page *page, unsigned long off,
+	     size_t size, enum dma_data_direction dir)
+{
+	/* fixme */
+}
+
+static inline void
+dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size,
+	       enum dma_data_direction dir)
+{
+	/* fixme */
+}
+#endif
+
+/**
+ * dma_map_sg - map a set of SG buffers for streaming mode DMA
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map
+ * @dir: DMA transfer direction
+ *
+ * Map a set of buffers described by scatterlist in streaming
+ * mode for DMA.  This is the scather-gather version of the
+ * above pci_map_single interface.  Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ *       DMA address/length pairs than there are SG table elements.
+ *       (for example via virtual mapping capabilities)
+ *       The routine returns the number of addr/length pairs actually
+ *       used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+static inline int
+dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+	   enum dma_data_direction dir)
+{
+	int i;
+
+	if (dmadev_is_sa1111(dev))
+		return sa1111_map_sg(sg, nents, dir);
+
+	for (i = 0; i < nents; i++, sg++) {
+		char *virt;
+
+		sg->dma_address = page_to_bus(sg->page) + sg->offset;
+		virt = page_address(sg->page) + sg->offset;
+		consistent_sync(virt, sg->length, dir);
+	}
+
+	return nents;
+}
+
+/**
+ * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map
+ * @dir: DMA transfer direction
+ *
+ * Unmap a set of streaming mode DMA translations.
+ * Again, CPU read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
+ */
+static inline void
+dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
+	     enum dma_data_direction dir)
+{
+	if (dmadev_is_sa1111(dev)) {
+		sa1111_unmap_sg(sg, nents, dir);
+		return;
+	}
+
+	/* nothing to do */
+}
+
+/**
+ * dma_sync_single
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @handle: DMA address of buffer
+ * @size: size of buffer to map
+ * @dir: DMA transfer direction
+ *
+ * Make physical memory consistent for a single streaming mode DMA
+ * translation after a transfer.
+ *
+ * If you perform a pci_map_single() but wish to interrogate the
+ * buffer using the cpu, yet do not wish to teardown the PCI dma
+ * mapping, you must call this function before doing so.  At the
+ * next point you give the PCI dma address back to the card, the
+ * device again owns the buffer.
+ */
+static inline void
+dma_sync_single(struct device *dev, dma_addr_t handle, size_t size,
+		enum dma_data_direction dir)
+{
+	if (dmadev_is_sa1111(dev)) {
+		sa1111_dma_sync_single(handle, size, dir);
+		return;
+	}
+
+	consistent_sync((void *)__bus_to_virt(handle), size, dir);
+}
+
+/**
+ * dma_sync_sg
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map
+ * @dir: DMA transfer direction
+ *
+ * Make physical memory consistent for a set of streaming
+ * mode DMA translations after a transfer.
+ *
+ * The same as pci_dma_sync_single but for a scatter-gather list,
+ * same rules and usage.
+ */
+static inline void
+dma_sync_sg(struct device *dev, struct scatterlist *sg, int nents,
+	    enum dma_data_direction dir)
+{
+	int i;
+
+	if (dmadev_is_sa1111(dev)) {
+		sa1111_dma_sync_sg(sg, nents, dir);
+		return;
+	}
+
+	for (i = 0; i < nents; i++, sg++) {
+		char *virt = page_address(sg->page) + sg->offset;
+		consistent_sync(virt, sg->length, dir);
+	}
+}
+
+#endif /* __KERNEL__ */
+#endif
diff -Nru a/include/asm-arm/io.h b/include/asm-arm/io.h
--- a/include/asm-arm/io.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-arm/io.h	Wed Jan  8 20:04:43 2003
@@ -268,16 +268,6 @@
 #endif
 
 /*
- * DMA-consistent mapping functions.  These allocate/free a region of
- * uncached, unwrite-buffered mapped memory space for use with DMA
- * devices.  This is the "generic" version.  The PCI specific version
- * is in pci.h
- */
-extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle);
-extern void consistent_free(void *vaddr, size_t size, dma_addr_t handle);
-extern void consistent_sync(void *vaddr, size_t size, int rw);
-
-/*
  * can the hardware map this into one segment or not, given no other
  * constraints.
  */
diff -Nru a/include/asm-arm/irq.h b/include/asm-arm/irq.h
--- a/include/asm-arm/irq.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-arm/irq.h	Wed Jan  8 20:04:45 2003
@@ -40,7 +40,8 @@
 #define IRQT_PROBE	(1 << 4)
 
 int set_irq_type(unsigned int irq, unsigned int type);
-
+void disable_irq_wake(unsigned int irq);
+void enable_irq_wake(unsigned int irq);
 int setup_irq(unsigned int, struct irqaction *);
 
 #endif
diff -Nru a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h
--- a/include/asm-arm/mach/irq.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-arm/mach/irq.h	Wed Jan  8 20:04:43 2003
@@ -40,6 +40,10 @@
 	 * Set the type of the IRQ.
 	 */
 	int (*type)(unsigned int, unsigned int);
+	/*
+	 * Set wakeup-enable on the selected IRQ
+	 */
+	int (*wake)(unsigned int, unsigned int);
 };
 
 struct irqdesc {
diff -Nru a/include/asm-arm/pci.h b/include/asm-arm/pci.h
--- a/include/asm-arm/pci.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-arm/pci.h	Wed Jan  8 20:04:43 2003
@@ -3,36 +3,20 @@
 
 #ifdef __KERNEL__
 #include <linux/config.h>
-#include <linux/mm.h> /* bah! */
+#include <linux/dma-mapping.h>
 
-#include <asm/arch/hardware.h>
-#include <asm/scatterlist.h>
-#include <asm/page.h>
-#include <asm/io.h>
-
-struct pci_dev;
-
-/*
- * For SA-1111 these functions are "magic" and utilize bounce
- * buffers as need to workaround SA-1111 DMA bugs.  They are called in
- * place of their pci_* counterparts when dev_is_sa1111() returns true.
- */
-dma_addr_t sa1111_map_single(struct pci_dev *, void *, size_t, int);
-void sa1111_unmap_single(struct pci_dev *, dma_addr_t, size_t, int);
-int sa1111_map_sg(struct pci_dev *, struct scatterlist *, int, int);
-void sa1111_unmap_sg(struct pci_dev *, struct scatterlist *, int, int);
-void sa1111_dma_sync_single(struct pci_dev *, dma_addr_t, size_t, int);
-void sa1111_dma_sync_sg(struct pci_dev *, struct scatterlist *, int, int);
+#include <asm/hardware.h> /* for PCIBIOS_MIN_* */
 
 #ifdef CONFIG_SA1111
-
+/*
+ * Keep the SA1111 DMA-mapping tricks until the USB layer gets
+ * properly converted to the new DMA-mapping API, at which time
+ * most of this file can die.
+ */
 #define SA1111_FAKE_PCIDEV ((struct pci_dev *) 1111)
-#define dev_is_sa1111(dev) (dev == SA1111_FAKE_PCIDEV)
-
+#define pcidev_is_sa1111(dev) (dev == SA1111_FAKE_PCIDEV)
 #else
-
-#define dev_is_sa1111(dev) (0)
-
+#define pcidev_is_sa1111(dev) (0)
 #endif
 
 
@@ -46,206 +30,142 @@
 	/* We don't do dynamic PCI IRQ allocation */
 }
 
-/* The PCI address space does equal the physical memory
- * address space.  The networking and block device layers use
- * this boolean for bounce buffer decisions.
+/*
+ * The PCI address space does equal the physical memory address space.
+ * The networking and block device layers use this boolean for bounce
+ * buffer decisions.
  */
 #define PCI_DMA_BUS_IS_PHYS     (0)
 
-/* Allocate and map kernel buffer using consistent mode DMA for a device.
- * hwdev should be valid struct pci_dev pointer for PCI devices,
- * NULL for PCI-like buses (ISA, EISA).
- * Returns non-NULL cpu-view pointer to the buffer if successful and
- * sets *dma_addrp to the pci side dma address as well, else *dma_addrp
- * is undefined.
- */
-extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *handle);
-
-/* Free and unmap a consistent DMA buffer.
- * cpu_addr is what was returned from pci_alloc_consistent,
- * size must be the same as what as passed into pci_alloc_consistent,
- * and likewise dma_addr must be the same as what *dma_addrp was set to.
- *
- * References to the memory and mappings associated with cpu_addr/dma_addr
- * past this call are illegal.
- */
+static inline void *
+pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *handle)
+{
+	int gfp = GFP_KERNEL;
+
+	if (hwdev == NULL || pcidev_is_sa1111(hwdev) ||
+	    hwdev->dma_mask != 0xffffffff)
+		gfp |= GFP_DMA;
+
+	return consistent_alloc(gfp, size, handle);
+}
+
 static inline void
 pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr,
-		    dma_addr_t dma_handle)
+		    dma_addr_t handle)
 {
-	consistent_free(vaddr, size, dma_handle);
+	dma_free_coherent(hwdev ? &hwdev->dev : NULL, size, vaddr, handle);
 }
 
-/* Map a single buffer of the indicated size for DMA in streaming mode.
- * The 32-bit bus address to use is returned.
- *
- * Once the device is given the dma address, the device owns this memory
- * until either pci_unmap_single or pci_dma_sync_single is performed.
- */
 static inline dma_addr_t
-pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
+pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int dir)
 {
-	if (dev_is_sa1111(hwdev))
-		return sa1111_map_single(hwdev, ptr, size, direction);
+	if (pcidev_is_sa1111(hwdev))
+		return sa1111_map_single(ptr, size, dir);
 
-	consistent_sync(ptr, size, direction);
-	return virt_to_bus(ptr);
+	return dma_map_single(hwdev ? &hwdev->dev : NULL, ptr, size, dir);
 }
 
-/* Unmap a single streaming mode DMA translation.  The dma_addr and size
- * must match what was provided for in a previous pci_map_single call.  All
- * other usages are undefined.
- *
- * After this call, reads by the cpu to the buffer are guarenteed to see
- * whatever the device wrote there.
- */
 static inline void
-pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction)
+pci_unmap_single(struct pci_dev *hwdev, dma_addr_t handle, size_t size, int dir)
 {
-	if (dev_is_sa1111(hwdev))
-		sa1111_unmap_single(hwdev, dma_addr, size, direction);
+	if (pcidev_is_sa1111(hwdev)) {
+		sa1111_unmap_single(handle, size, dir);
+		return;
+	}
 
-	/* nothing to do */
+	return dma_unmap_single(hwdev ? &hwdev->dev : NULL, handle, size, dir);
 }
 
-/*
- * Whether pci_unmap_{single,page} is a nop depends upon the
- * configuration.
- */
-#if defined(CONFIG_PCI) || defined(CONFIG_SA1111)
-#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)	dma_addr_t ADDR_NAME;
-#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)		__u32 LEN_NAME;
-#define pci_unmap_addr(PTR, ADDR_NAME)		((PTR)->ADDR_NAME)
-#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)	(((PTR)->ADDR_NAME) = (VAL))
-#define pci_unmap_len(PTR, LEN_NAME)		((PTR)->LEN_NAME)
-#define pci_unmap_len_set(PTR, LEN_NAME, VAL)	(((PTR)->LEN_NAME) = (VAL))
-#else
-#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
-#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
-#define pci_unmap_addr(PTR, ADDR_NAME)		(0)
-#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)	do { } while (0)
-#define pci_unmap_len(PTR, LEN_NAME)		(0)
-#define pci_unmap_len_set(PTR, LEN_NAME, VAL)	do { } while (0)
-#endif /* CONFIG_PCI */
-
-/* Map a set of buffers described by scatterlist in streaming
- * mode for DMA.  This is the scather-gather version of the
- * above pci_map_single interface.  Here the scatter gather list
- * elements are each tagged with the appropriate dma address
- * and length.  They are obtained via sg_dma_{address,length}(SG).
- *
- * NOTE: An implementation may be able to use a smaller number of
- *       DMA address/length pairs than there are SG table elements.
- *       (for example via virtual mapping capabilities)
- *       The routine returns the number of addr/length pairs actually
- *       used, at most nents.
- *
- * Device ownership issues as mentioned above for pci_map_single are
- * the same here.
- */
 static inline int
-pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
+pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dir)
 {
-	int i;
-
-	if (dev_is_sa1111(hwdev))
-		return sa1111_map_sg(hwdev, sg, nents, direction);
-
-	for (i = 0; i < nents; i++, sg++) {
-		char *virt;
+	if (pcidev_is_sa1111(hwdev))
+		return sa1111_map_sg(sg, nents, dir);
 
-		sg->dma_address = page_to_bus(sg->page) + sg->offset;
-		virt = page_address(sg->page) + sg->offset;
-		consistent_sync(virt, sg->length, direction);
-	}
-
-	return nents;
+	return dma_map_sg(hwdev ? &hwdev->dev : NULL, sg, nents, dir);
 }
 
-/* Unmap a set of streaming mode DMA translations.
- * Again, cpu read rules concerning calls here are the same as for
- * pci_unmap_single() above.
- */
 static inline void
-pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
+pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dir)
 {
-	if (dev_is_sa1111(hwdev)) {
-		sa1111_unmap_sg(hwdev, sg, nents, direction);
+	if (pcidev_is_sa1111(hwdev)) {
+		sa1111_unmap_sg(sg, nents, dir);
 		return;
 	}
 
-	/* nothing to do */
+	return dma_unmap_sg(hwdev ? &hwdev->dev : NULL, sg, nents, dir);
 }
 
-/* Make physical memory consistent for a single
- * streaming mode DMA translation after a transfer.
- *
- * If you perform a pci_map_single() but wish to interrogate the
- * buffer using the cpu, yet do not wish to teardown the PCI dma
- * mapping, you must call this function before doing so.  At the
- * next point you give the PCI dma address back to the card, the
- * device again owns the buffer.
- */
 static inline void
-pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction)
+pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t handle, size_t size, int dir)
 {
-	if (dev_is_sa1111(hwdev)) {
-	  	sa1111_dma_sync_single(hwdev, dma_handle, size, direction);
+	if (pcidev_is_sa1111(hwdev)) {
+	  	sa1111_dma_sync_single(handle, size, dir);
 		return;
 	}
 
-	consistent_sync(bus_to_virt(dma_handle), size, direction);
+	return dma_sync_single(hwdev ? &hwdev->dev : NULL, handle, size, dir);
 }
 
-/* Make physical memory consistent for a set of streaming
- * mode DMA translations after a transfer.
- *
- * The same as pci_dma_sync_single but for a scatter-gather list,
- * same rules and usage.
- */
 static inline void
-pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction)
+pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int dir)
 {
-	int i;
-
-	if (dev_is_sa1111(hwdev)) {
-	  	sa1111_dma_sync_sg(hwdev, sg, nelems, direction);
+	if (pcidev_is_sa1111(hwdev)) {
+	  	sa1111_dma_sync_sg(sg, nelems, dir);
 		return;
 	}
 
-	for (i = 0; i < nelems; i++, sg++) {
-		char *virt = page_address(sg->page) + sg->offset;
-		consistent_sync(virt, sg->length, direction);
-	}
+	return dma_sync_sg(hwdev ? &hwdev->dev : NULL, sg, nelems, dir);
 }
 
-/* Return whether the given PCI device DMA address mask can
- * be supported properly.  For example, if your device can
- * only drive the low 24-bits during PCI bus mastering, then
- * you would pass 0x00ffffff as the mask to this function.
- */
 static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
 {
 	return 1;
 }
 
-/* This isn't fine. */
+/*
+ * We don't support DAC DMA cycles.
+ */
 #define pci_dac_dma_supported(pci_dev, mask)	(0)
 
-/* Return the index of the PCI controller for device PDEV. */
+/*
+ * Return the index of the PCI controller for device PDEV.
+ */
 #define pci_controller_num(PDEV)	(0)
 
 
 #if defined(CONFIG_SA1111) && !defined(CONFIG_PCI)
-/* SA-1111 needs these prototypes even when !defined(CONFIG_PCI) */
-
-/* kmem_cache style wrapper around pci_alloc_consistent() */
+/*
+ * SA-1111 needs these prototypes even when !defined(CONFIG_PCI)
+ *
+ * kmem_cache style wrapper around pci_alloc_consistent()
+ */
 struct pci_pool *pci_pool_create (const char *name, struct pci_dev *dev,
 		size_t size, size_t align, size_t allocation);
 void pci_pool_destroy (struct pci_pool *pool);
 
 void *pci_pool_alloc (struct pci_pool *pool, int flags, dma_addr_t *handle);
 void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr);
+#endif
+
+/*
+ * Whether pci_unmap_{single,page} is a nop depends upon the
+ * configuration.
+ */
+#if defined(CONFIG_PCI) || defined(CONFIG_SA1111)
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)	dma_addr_t ADDR_NAME;
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)		__u32 LEN_NAME;
+#define pci_unmap_addr(PTR, ADDR_NAME)		((PTR)->ADDR_NAME)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)	(((PTR)->ADDR_NAME) = (VAL))
+#define pci_unmap_len(PTR, LEN_NAME)		((PTR)->LEN_NAME)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)	(((PTR)->LEN_NAME) = (VAL))
+#else
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
+#define pci_unmap_addr(PTR, ADDR_NAME)		(0)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)	do { } while (0)
+#define pci_unmap_len(PTR, LEN_NAME)		(0)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)	do { } while (0)
 #endif
 
 #define HAVE_PCI_MMAP
diff -Nru a/include/asm-arm/proc-armv/locks.h b/include/asm-arm/proc-armv/locks.h
--- a/include/asm-arm/proc-armv/locks.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-arm/proc-armv/locks.h	Wed Jan  8 20:04:45 2003
@@ -27,7 +27,7 @@
 "	blmi	" #fail				\
 	:					\
 	: "r" (ptr), "I" (1)			\
-	: "ip", "lr", "cc");			\
+	: "ip", "lr", "cc", "memory");		\
 	})
 
 #define __down_op_ret(ptr,fail)			\
@@ -48,7 +48,7 @@
 "	mov	%0, ip"				\
 	: "=&r" (ret)				\
 	: "r" (ptr), "I" (1)			\
-	: "ip", "lr", "cc");			\
+	: "ip", "lr", "cc", "memory");		\
 	ret;					\
 	})
 
@@ -94,7 +94,7 @@
 "	blne	" #fail				\
 	:					\
 	: "r" (ptr), "I" (RW_LOCK_BIAS)		\
-	: "ip", "lr", "cc");			\
+	: "ip", "lr", "cc", "memory");		\
 	})
 
 #define __up_op_write(ptr,wake)			\
@@ -112,7 +112,7 @@
 "	blcs	" #wake				\
 	:					\
 	: "r" (ptr), "I" (RW_LOCK_BIAS)		\
-	: "ip", "lr", "cc");			\
+	: "ip", "lr", "cc", "memory");		\
 	})
 
 #define __down_op_read(ptr,fail)		\
diff -Nru a/include/asm-arm/proc-armv/uaccess.h b/include/asm-arm/proc-armv/uaccess.h
--- a/include/asm-arm/proc-armv/uaccess.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-arm/proc-armv/uaccess.h	Wed Jan  8 20:04:32 2003
@@ -37,7 +37,7 @@
 		: "cc"); \
 	(flag == 0); })
 
-#define __put_user_asm_byte(x,addr,err)				\
+#define __put_user_asm_byte(x,__pu_addr,err)			\
 	__asm__ __volatile__(					\
 	"1:	strbt	%1,[%2],#0\n"				\
 	"2:\n"							\
@@ -51,27 +51,26 @@
 	"	.long	1b, 3b\n"				\
 	"	.previous"					\
 	: "=r" (err)						\
-	: "r" (x), "r" (addr), "i" (-EFAULT), "0" (err))
+	: "r" (x), "r" (__pu_addr), "i" (-EFAULT), "0" (err)	\
+	: "cc")
 
 #ifndef __ARMEB__
-#define __put_user_asm_half(x,addr,err)				\
+#define __put_user_asm_half(x,__pu_addr,err)			\
 ({								\
 	unsigned long __temp = (unsigned long)(x);		\
-	unsigned long __ptr  = (unsigned long)(addr);		\
-	__put_user_asm_byte(__temp, __ptr, err);		\
-	__put_user_asm_byte(__temp >> 8, __ptr + 1, err);	\
+	__put_user_asm_byte(__temp, __pu_addr, err);		\
+	__put_user_asm_byte(__temp >> 8, __pu_addr + 1, err);	\
 })
 #else
-#define __put_user_asm_half(x,addr,err)				\
+#define __put_user_asm_half(x,__pu_addr,err)			\
 ({								\
 	unsigned long __temp = (unsigned long)(x);		\
-	unsigned long __ptr  = (unsigned long)(addr);		\
-	__put_user_asm_byte(__temp >> 8, __ptr, err);		\
-	__put_user_asm_byte(__temp, __ptr + 1, err);	\
+	__put_user_asm_byte(__temp >> 8, __pu_addr, err);	\
+	__put_user_asm_byte(__temp, __pu_addr + 1, err);	\
 })
 #endif
 
-#define __put_user_asm_word(x,addr,err)				\
+#define __put_user_asm_word(x,__pu_addr,err)			\
 	__asm__ __volatile__(					\
 	"1:	strt	%1,[%2],#0\n"				\
 	"2:\n"							\
@@ -85,7 +84,31 @@
 	"	.long	1b, 3b\n"				\
 	"	.previous"					\
 	: "=r" (err)						\
-	: "r" (x), "r" (addr), "i" (-EFAULT), "0" (err))
+	: "r" (x), "r" (__pu_addr), "i" (-EFAULT), "0" (err))
+
+#define __put_user_asm_dword(x,__pu_addr,err)			\
+({								\
+	unsigned long long __temp = (unsigned long long)x;	\
+	__asm__ __volatile__(					\
+	"1:	strt	%1, [%2], #0\n"				\
+	"2:	strt	%3, [%4], #0\n"				\
+	"3:\n"							\
+	"	.section .fixup,\"ax\"\n"			\
+	"	.align	2\n"					\
+	"4:	mov	%0, %5\n"				\
+	"	b	3b\n"					\
+	"	.previous\n"					\
+	"	.section __ex_table,\"a\"\n"			\
+	"	.align	3\n"					\
+	"	.long	1b, 4b\n"				\
+	"	.long	2b, 4b\n"				\
+	"	.previous"					\
+	: "=r" (err)						\
+	: "r" (__temp), "r" (__pu_addr),			\
+	  "r" (__temp >> 32), "r" (__pu_addr + 4),		\
+	  "i" (-EFAULT), "0" (err)				\
+	: "cc");						\
+})
 
 #define __get_user_asm_byte(x,addr,err)				\
 	__asm__ __volatile__(					\
diff -Nru a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h
--- a/include/asm-arm/semaphore.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-arm/semaphore.h	Wed Jan  8 20:04:44 2003
@@ -22,19 +22,18 @@
 };
 
 #if WAITQUEUE_DEBUG
-# define __SEM_DEBUG_INIT(name) \
-		, (long)&(name).__magic
+# define __SEM_DEBUG_INIT(name)	.__magic = (long)&(name).__magic
 #else
 # define __SEM_DEBUG_INIT(name)
 #endif
 
-#define __SEMAPHORE_INIT(name,count)			\
-	{ ATOMIC_INIT(count), 0,			\
-	  __WAIT_QUEUE_HEAD_INITIALIZER((name).wait)	\
-	  __SEM_DEBUG_INIT(name) }
+#define __SEMAPHORE_INIT(name,cnt) {				\
+	.count	= ATOMIC_INIT(cnt),				\
+	.wait	= __WAIT_QUEUE_HEAD_INITIALIZER((name).wait),	\
+	__SEM_DEBUG_INIT(name)					\
+}
 
-#define __MUTEX_INITIALIZER(name) \
-	__SEMAPHORE_INIT(name,1)
+#define __MUTEX_INITIALIZER(name) __SEMAPHORE_INIT(name,1)
 
 #define __DECLARE_SEMAPHORE_GENERIC(name,count)	\
 	struct semaphore name = __SEMAPHORE_INIT(name,count)
@@ -60,6 +59,11 @@
 static inline void init_MUTEX_LOCKED(struct semaphore *sem)
 {
 	sema_init(sem, 0);
+}
+
+static inline int sema_count(struct semaphore *sem)
+{
+	return atomic_read(&sem->count);
 }
 
 /*
diff -Nru a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h
--- a/include/asm-arm/thread_info.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-arm/thread_info.h	Wed Jan  8 20:04:44 2003
@@ -51,17 +51,21 @@
 	__u32			cpu;		/* cpu */
 	__u32			cpu_domain;	/* cpu domain */
 	struct cpu_context_save	cpu_context;	/* cpu context */
+	struct restart_block    restart_block;
 	union fp_state		fpstate;
 };
 
-#define INIT_THREAD_INFO(tsk)			\
-{						\
-	task:		&tsk,			\
-	exec_domain:	&default_exec_domain,	\
-	flags:		0,			\
-	preempt_count:	0,			\
-	addr_limit:	KERNEL_DS,		\
-	INIT_EXTRA_THREAD_INFO,			\
+#define INIT_THREAD_INFO(tsk)				\
+{							\
+	.task		= &tsk,				\
+	.exec_domain	= &default_exec_domain,		\
+	.flags		= 0,				\
+	.preempt_count	= 1,				\
+	.addr_limit	= KERNEL_DS,			\
+	.restart_block	= {				\
+		.fn	= do_no_restart_syscall,	\
+	},						\
+	INIT_EXTRA_THREAD_INFO,				\
 }
 
 #define init_thread_info	(init_thread_union.thread_info)
diff -Nru a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h
--- a/include/asm-arm/uaccess.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-arm/uaccess.h	Wed Jan  8 20:04:44 2003
@@ -81,7 +81,7 @@
 		const register typeof(*(p)) *__p asm("r0") = (p);	\
 		register typeof(*(p)) __r1 asm("r1");			\
 		register int __e asm("r0");				\
-		switch (sizeof(*(p))) {					\
+		switch (sizeof(*(__p))) {				\
 		case 1:							\
 			__get_user_x(__r1, __p, __e, 1, "lr");		\
 	       		break;						\
@@ -120,7 +120,7 @@
 		const register typeof(*(p)) __r1 asm("r1") = (x);	\
 		const register typeof(*(p)) *__p asm("r0") = (p);	\
 		register int __e asm("r0");				\
-		switch (sizeof(*(p))) {					\
+		switch (sizeof(*(__p))) {				\
 		case 1:							\
 			__put_user_x(__r1, __p, __e, 1, "r2", "lr");	\
 			break;						\
@@ -256,14 +256,15 @@
 #define __put_user_nocheck(x,ptr,size)					\
 ({									\
 	long __pu_err = 0;						\
-	__typeof__(*(ptr)) *__pu_addr = (ptr);				\
+	unsigned long __pu_addr = (unsigned long)(ptr);			\
 	__put_user_size((x),__pu_addr,(size),__pu_err);			\
 	__pu_err;							\
 })
 
 #define __put_user_nocheck_error(x,ptr,size,err)			\
 ({									\
-	__put_user_size((x),(ptr),(size),err);				\
+	unsigned long __pu_addr = (unsigned long)(ptr);			\
+	__put_user_size((x),__pu_addr,(size),err);			\
 	(void) 0;							\
 })
 
@@ -273,6 +274,7 @@
 	case 1:	__get_user_asm_byte(x,ptr,retval);	break;		\
 	case 2:	__get_user_asm_half(x,ptr,retval);	break;		\
 	case 4:	__get_user_asm_word(x,ptr,retval);	break;		\
+	case 8:	__get_user_asm_dword(x,ptr,retval);	break;		\
 	default: (x) = __get_user_bad();				\
 	}								\
 } while (0)
@@ -283,6 +285,7 @@
 	case 1: __put_user_asm_byte(x,ptr,retval);	break;		\
 	case 2: __put_user_asm_half(x,ptr,retval);	break;		\
 	case 4: __put_user_asm_word(x,ptr,retval);	break;		\
+	case 8:	__put_user_asm_dword(x,ptr,retval);	break;		\
 	default: __put_user_bad();					\
 	}								\
 } while (0)
diff -Nru a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
--- a/include/asm-arm/unistd.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-arm/unistd.h	Wed Jan  8 20:04:45 2003
@@ -25,6 +25,7 @@
  * This file contains the system call numbers.
  */
 
+#define __NR_restart_syscall		(__NR_SYSCALL_BASE+  0)
 #define __NR_exit			(__NR_SYSCALL_BASE+  1)
 #define __NR_fork			(__NR_SYSCALL_BASE+  2)
 #define __NR_read			(__NR_SYSCALL_BASE+  3)
diff -Nru a/include/asm-i386/edd.h b/include/asm-i386/edd.h
--- a/include/asm-i386/edd.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-i386/edd.h	Wed Jan  8 20:04:32 2003
@@ -48,7 +48,7 @@
 #define EDD_EXT_ENHANCED_DISK_DRIVE_SUPPORT (1 << 2)
 #define EDD_EXT_64BIT_EXTENSIONS            (1 << 3)
 
-#define EDD_INFO_DMA_BOUNDRY_ERROR_TRANSPARENT (1 << 0)
+#define EDD_INFO_DMA_BOUNDARY_ERROR_TRANSPARENT (1 << 0)
 #define EDD_INFO_GEOMETRY_VALID                (1 << 1)
 #define EDD_INFO_REMOVABLE                     (1 << 2)
 #define EDD_INFO_WRITE_VERIFY                  (1 << 3)
diff -Nru a/include/asm-i386/elf.h b/include/asm-i386/elf.h
--- a/include/asm-i386/elf.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-i386/elf.h	Wed Jan  8 20:04:44 2003
@@ -8,6 +8,7 @@
 #include <asm/ptrace.h>
 #include <asm/user.h>
 #include <asm/processor.h>
+#include <asm/system.h>		/* for savesegment */
 
 #include <linux/utsname.h>
 
@@ -57,11 +58,6 @@
    that it will "exec", and that there is sufficient room for the brk.  */
 
 #define ELF_ET_DYN_BASE         (TASK_SIZE / 3 * 2)
-
-/* Wow, the "main" arch needs arch dependent functions too.. :) */
-
-#define savesegment(seg,value) \
-	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
 
 /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
    now struct_user_regs, they are different) */
diff -Nru a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h
--- a/include/asm-i386/highmem.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-i386/highmem.h	Wed Jan  8 20:04:43 2003
@@ -39,7 +39,7 @@
  * easily, subsequent pte tables have to be allocated in one physical
  * chunk of RAM.
  */
-#define PKMAP_BASE (0xfe000000UL)
+#define PKMAP_BASE (0xff800000UL)
 #ifdef CONFIG_X86_PAE
 #define LAST_PKMAP 512
 #else
diff -Nru a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h
--- a/include/asm-i386/io_apic.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-i386/io_apic.h	Wed Jan  8 20:04:44 2003
@@ -16,7 +16,8 @@
 #define APIC_MISMATCH_DEBUG
 
 #define IO_APIC_BASE(idx) \
-		((volatile int *)__fix_to_virt(FIX_IO_APIC_BASE_0 + idx))
+		((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
+		+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
 
 /*
  * The structure of the IO-APIC:
diff -Nru a/include/asm-i386/mach-default/mach_apic.h b/include/asm-i386/mach-default/mach_apic.h
--- a/include/asm-i386/mach-default/mach_apic.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-i386/mach-default/mach_apic.h	Wed Jan  8 20:04:45 2003
@@ -10,6 +10,7 @@
 #endif
 
 #define no_balance_irq (0)
+#define esr_disable (0)
 
 #define APIC_BROADCAST_ID      0x0F
 #define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid))
@@ -53,6 +54,11 @@
 	return 0;
 }
 
+static inline int apicid_to_node(int logical_apicid)
+{
+	return 0;
+}
+
 static inline int cpu_present_to_apicid(int mps_cpu)
 {
 	return  mps_cpu;
@@ -73,10 +79,13 @@
 	return (m->mpc_apicid);
 }
 
-#define WAKE_SECONDARY_VIA_INIT
-
 static inline void setup_portio_remap(void)
 {
+}
+
+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+	return test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map);
 }
 
 #endif /* __ASM_MACH_APIC_H */
diff -Nru a/include/asm-i386/mach-default/mach_wakecpu.h b/include/asm-i386/mach-default/mach_wakecpu.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-i386/mach-default/mach_wakecpu.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,41 @@
+#ifndef __ASM_MACH_WAKECPU_H
+#define __ASM_MACH_WAKECPU_H
+
+/* 
+ * This file copes with machines that wakeup secondary CPUs by the
+ * INIT, INIT, STARTUP sequence.
+ */
+
+#define WAKE_SECONDARY_VIA_INIT
+
+#define TRAMPOLINE_LOW phys_to_virt(0x467)
+#define TRAMPOLINE_HIGH phys_to_virt(0x469)
+
+#define boot_cpu_apicid boot_cpu_physical_apicid
+
+static inline void wait_for_init_deassert(atomic_t *deassert)
+{
+	while (!atomic_read(deassert));
+	return;
+}
+
+/* Nothing to do for most platforms, since cleared by the INIT cycle */
+static inline void smp_callin_clear_local_apic(void)
+{
+}
+
+static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
+{
+}
+
+static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
+{
+}
+
+#if APIC_DEBUG
+ #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
+#else
+ #define inquire_remote_apic(apicid) {}
+#endif
+
+#endif /* __ASM_MACH_WAKECPU_H */
diff -Nru a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h
--- a/include/asm-i386/mach-numaq/mach_apic.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-i386/mach-numaq/mach_apic.h	Wed Jan  8 20:04:43 2003
@@ -1,14 +1,15 @@
 #ifndef __ASM_MACH_APIC_H
 #define __ASM_MACH_APIC_H
 
-#define APIC_DFR_VALUE	(APIC_DFR_FLAT)
+#define APIC_DFR_VALUE	(APIC_DFR_CLUSTER)
 
 #define TARGET_CPUS (0xf)
 
 #define no_balance_irq (1)
+#define esr_disable (1)
 
 #define APIC_BROADCAST_ID      0x0F
-#define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid))
+#define check_apicid_used(bitmap, apicid) ((bitmap) & (1 << (apicid)))
 
 static inline int apic_id_registered(void)
 {
@@ -26,6 +27,10 @@
 		"NUMA-Q", nr_ioapics);
 }
 
+/*
+ * Skip adding the timer int on secondary nodes, which causes
+ * a small but painful rift in the time-space continuum.
+ */
 static inline int multi_timer_check(int apic, int irq)
 {
 	return (apic != 0 && irq == 0);
@@ -47,14 +52,14 @@
 	return ( (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1) );
 }
 
-static inline int apicid_to_quad(int logical_apicid) 
+static inline int apicid_to_node(int logical_apicid) 
 {
 	return (logical_apicid >> 4);
 }
 
 static inline unsigned long apicid_to_cpu_present(int logical_apicid)
 {
-	return ( (logical_apicid&0xf) << (4*apicid_to_quad(logical_apicid)) );
+	return ( (logical_apicid&0xf) << (4*apicid_to_node(logical_apicid)) );
 }
 
 static inline int mpc_apic_id(struct mpc_config_processor *m, int quad)
@@ -69,8 +74,6 @@
 	return logical_apicid;
 }
 
-#define WAKE_SECONDARY_VIA_NMI
-
 static inline void setup_portio_remap(void)
 {
 	if (numnodes <= 1)
@@ -80,6 +83,11 @@
 	xquad_portio = ioremap (XQUAD_PORTIO_BASE, numnodes*XQUAD_PORTIO_QUAD);
 	printk("xquad_portio vaddr 0x%08lx, len %08lx\n",
 		(u_long) xquad_portio, (u_long) numnodes*XQUAD_PORTIO_QUAD);
+}
+
+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+	return (1);
 }
 
 #endif /* __ASM_MACH_APIC_H */
diff -Nru a/include/asm-i386/mach-numaq/mach_wakecpu.h b/include/asm-i386/mach-numaq/mach_wakecpu.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-i386/mach-numaq/mach_wakecpu.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,43 @@
+#ifndef __ASM_MACH_WAKECPU_H
+#define __ASM_MACH_WAKECPU_H
+
+/* This file copes with machines that wakeup secondary CPUs by NMIs */
+
+#define WAKE_SECONDARY_VIA_NMI
+
+#define TRAMPOLINE_LOW phys_to_virt(0x8)
+#define TRAMPOLINE_HIGH phys_to_virt(0xa)
+
+#define boot_cpu_apicid boot_cpu_logical_apicid
+
+/* We don't do anything here because we use NMI's to boot instead */
+static inline void wait_for_init_deassert(atomic_t *deassert)
+{
+}
+
+/*
+ * Because we use NMIs rather than the INIT-STARTUP sequence to
+ * bootstrap the CPUs, the APIC may be in a weird state. Kick it.
+ */
+static inline void smp_callin_clear_local_apic(void)
+{
+	clear_local_APIC();
+}
+
+static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
+{
+	printk("Storing NMI vector\n");
+	*high = *((volatile unsigned short *) TRAMPOLINE_HIGH);
+	*low = *((volatile unsigned short *) TRAMPOLINE_LOW);
+}
+
+static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
+{
+	printk("Restoring NMI vector\n");
+	*((volatile unsigned short *) TRAMPOLINE_HIGH) = *high;
+	*((volatile unsigned short *) TRAMPOLINE_LOW) = *low;
+}
+
+#define inquire_remote_apic(apicid) {}
+
+#endif /* __ASM_MACH_WAKECPU_H */
diff -Nru a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h
--- a/include/asm-i386/mach-summit/mach_apic.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-i386/mach-summit/mach_apic.h	Wed Jan  8 20:04:44 2003
@@ -3,6 +3,8 @@
 
 extern int x86_summit;
 
+#define esr_disable (1)
+
 #define XAPIC_DEST_CPUS_MASK    0x0Fu
 #define XAPIC_DEST_CLUSTER_MASK 0xF0u
 
@@ -32,6 +34,11 @@
 		(x86_summit ? "Summit" : "Flat"), nr_ioapics);
 }
 
+static inline int apicid_to_node(int logical_apicid)
+{
+	return (logical_apicid >> 5);          /* 2 clusterids per CEC */
+}
+
 static inline int cpu_present_to_apicid(int mps_cpu)
 {
 	if (x86_summit)
@@ -54,10 +61,13 @@
 		return (1ul << apicid);
 }
 
-#define WAKE_SECONDARY_VIA_INIT
-
 static inline void setup_portio_remap(void)
 {
+}
+
+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+	return (1);
 }
 
 #endif /* __ASM_MACH_APIC_H */
diff -Nru a/include/asm-i386/numaq.h b/include/asm-i386/numaq.h
--- a/include/asm-i386/numaq.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-i386/numaq.h	Wed Jan  8 20:04:44 2003
@@ -28,8 +28,6 @@
 
 #ifdef CONFIG_X86_NUMAQ
 
-#include <asm/smpboot.h>
-
 /*
  * for now assume that 64Gb is max amount of RAM for whole system
  *    64Gb / 4096bytes/page = 16777216 pages
diff -Nru a/include/asm-i386/smp.h b/include/asm-i386/smp.h
--- a/include/asm-i386/smp.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-i386/smp.h	Wed Jan  8 20:04:44 2003
@@ -22,22 +22,12 @@
 #endif
 #endif
 
-#ifdef CONFIG_CLUSTERED_APIC
+#ifdef CONFIG_X86_NUMAQ
  #define INT_DELIVERY_MODE 0     /* physical delivery on LOCAL quad */
 #else
  #define INT_DELIVERY_MODE 1     /* logical delivery broadcast to all procs */
 #endif
 
-#ifndef clustered_apic_mode
- #ifdef CONFIG_CLUSTERED_APIC
-  #define clustered_apic_mode (1)
-  #define esr_disable (1)
- #else /* !CONFIG_CLUSTERED_APIC */
-  #define clustered_apic_mode (0)
-  #define esr_disable (0)
- #endif /* CONFIG_CLUSTERED_APIC */
-#endif 
-
 #define BAD_APICID 0xFFu
 #ifdef CONFIG_SMP
 #ifndef __ASSEMBLY__
@@ -62,15 +52,7 @@
 extern void (*mtrr_hook) (void);
 extern void zap_low_mappings (void);
 
-/*
- * Some lowlevel functions might want to know about
- * the real APIC ID <-> CPU # mapping.
- */
 #define MAX_APICID 256
-extern volatile int cpu_to_physical_apicid[NR_CPUS];
-extern volatile int physical_apicid_to_cpu[MAX_APICID];
-extern volatile int cpu_to_logical_apicid[NR_CPUS];
-extern volatile int logical_apicid_to_cpu[MAX_APICID];
 
 /*
  * This function is needed by all SMP systems. It must _always_ be valid
@@ -99,6 +81,15 @@
 {
 	return hweight32(cpu_callout_map);
 }
+
+/* Mapping from cpu number to logical apicid */
+extern volatile u8 cpu_2_logical_apicid[];
+static inline int cpu_to_logical_apicid(int cpu)
+{
+	return (int)cpu_2_logical_apicid[cpu];
+}
+extern void map_cpu_to_logical_apicid(void);
+extern void unmap_cpu_to_logical_apicid(int cpu);
 
 extern inline int any_online_cpu(unsigned int mask)
 {
diff -Nru a/include/asm-i386/smpboot.h b/include/asm-i386/smpboot.h
--- a/include/asm-i386/smpboot.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,48 +0,0 @@
-#ifndef __ASM_SMPBOOT_H
-#define __ASM_SMPBOOT_H
-
-#ifndef clustered_apic_mode
- #ifdef CONFIG_CLUSTERED_APIC
-  #define clustered_apic_mode (1)
- #else /* !CONFIG_CLUSTERED_APIC */
-  #define clustered_apic_mode (0)
- #endif /* CONFIG_CLUSTERED_APIC */
-#endif 
- 
-#ifdef CONFIG_CLUSTERED_APIC
- #define TRAMPOLINE_LOW phys_to_virt(0x8)
- #define TRAMPOLINE_HIGH phys_to_virt(0xa)
-#else /* !CONFIG_CLUSTERED_APIC */
- #define TRAMPOLINE_LOW phys_to_virt(0x467)
- #define TRAMPOLINE_HIGH phys_to_virt(0x469)
-#endif /* CONFIG_CLUSTERED_APIC */
-
-#ifdef CONFIG_CLUSTERED_APIC
- #define boot_cpu_apicid boot_cpu_logical_apicid
-#else /* !CONFIG_CLUSTERED_APIC */
- #define boot_cpu_apicid boot_cpu_physical_apicid
-#endif /* CONFIG_CLUSTERED_APIC */
-
-/*
- * Mappings between logical cpu number and logical / physical apicid
- * The first four macros are trivial, but it keeps the abstraction consistent
- */
-extern volatile int logical_apicid_2_cpu[];
-extern volatile int cpu_2_logical_apicid[];
-extern volatile int physical_apicid_2_cpu[];
-extern volatile int cpu_2_physical_apicid[];
-
-#define logical_apicid_to_cpu(apicid) logical_apicid_2_cpu[apicid]
-#define cpu_to_logical_apicid(cpu) cpu_2_logical_apicid[cpu]
-#define physical_apicid_to_cpu(apicid) physical_apicid_2_cpu[apicid]
-#define cpu_to_physical_apicid(cpu) cpu_2_physical_apicid[cpu]
-#ifdef CONFIG_CLUSTERED_APIC			/* use logical IDs to bootstrap */
-#define boot_apicid_to_cpu(apicid) logical_apicid_2_cpu[apicid]
-#define cpu_to_boot_apicid(cpu) cpu_2_logical_apicid[cpu]
-#else /* !CONFIG_CLUSTERED_APIC */		/* use physical IDs to bootstrap */
-#define boot_apicid_to_cpu(apicid) physical_apicid_2_cpu[apicid]
-#define cpu_to_boot_apicid(cpu) cpu_2_physical_apicid[cpu]
-#endif /* CONFIG_CLUSTERED_APIC */
-
-
-#endif
diff -Nru a/include/asm-i386/system.h b/include/asm-i386/system.h
--- a/include/asm-i386/system.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-i386/system.h	Wed Jan  8 20:04:32 2003
@@ -12,7 +12,8 @@
 extern void FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next));
 
 #define switch_to(prev,next,last) do {					\
-	asm volatile("pushl %%esi\n\t"					\
+	asm volatile("pushfl\n\t"					\
+		     "pushl %%esi\n\t"					\
 		     "pushl %%edi\n\t"					\
 		     "pushl %%ebp\n\t"					\
 		     "movl %%esp,%0\n\t"	/* save ESP */		\
@@ -24,6 +25,7 @@
 		     "popl %%ebp\n\t"					\
 		     "popl %%edi\n\t"					\
 		     "popl %%esi\n\t"					\
+		     "popfl\n\t"					\
 		     :"=m" (prev->thread.esp),"=m" (prev->thread.eip)	\
 		     :"m" (next->thread.esp),"m" (next->thread.eip),	\
 		      "a" (prev), "d" (next));				\
@@ -93,6 +95,12 @@
 		".long 1b,3b\n"			\
 		".previous"			\
 		: :"m" (*(unsigned int *)&(value)))
+
+/*
+ * Save a segment register away
+ */
+#define savesegment(seg, value) \
+	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
 
 /*
  * Clear and set 'TS' bit respectively
diff -Nru a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h
--- a/include/asm-i386/thread_info.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-i386/thread_info.h	Wed Jan  8 20:04:43 2003
@@ -110,6 +110,7 @@
 #define TIF_SIGPENDING		2	/* signal pending */
 #define TIF_NEED_RESCHED	3	/* rescheduling necessary */
 #define TIF_SINGLESTEP		4	/* restore singlestep on return to user mode */
+#define TIF_IRET		5	/* return with iret */
 #define TIF_USEDFPU		16	/* FPU was used by this task this quantum (SMP) */
 #define TIF_POLLING_NRFLAG	17	/* true if poll_idle() is polling TIF_NEED_RESCHED */
 
@@ -118,6 +119,7 @@
 #define _TIF_SIGPENDING		(1<<TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED	(1<<TIF_NEED_RESCHED)
 #define _TIF_SINGLESTEP		(1<<TIF_SINGLESTEP)
+#define _TIF_IRET		(1<<TIF_IRET)
 #define _TIF_USEDFPU		(1<<TIF_USEDFPU)
 #define _TIF_POLLING_NRFLAG	(1<<TIF_POLLING_NRFLAG)
 
diff -Nru a/include/asm-i386/topology.h b/include/asm-i386/topology.h
--- a/include/asm-i386/topology.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-i386/topology.h	Wed Jan  8 20:04:43 2003
@@ -27,12 +27,17 @@
 #ifndef _ASM_I386_TOPOLOGY_H
 #define _ASM_I386_TOPOLOGY_H
 
-#ifdef CONFIG_X86_NUMAQ
+#ifdef CONFIG_NUMA
 
-#include <asm/smpboot.h>
+/* Mappings between logical cpu number and node number */
+extern volatile unsigned long node_2_cpu_mask[];
+extern volatile int cpu_2_node[];
 
 /* Returns the number of the node containing CPU 'cpu' */
-#define __cpu_to_node(cpu) (cpu_to_logical_apicid(cpu) >> 4)
+static inline int __cpu_to_node(int cpu)
+{ 
+	return cpu_2_node[cpu];
+}
 
 /* Returns the number of the node containing MemBlk 'memblk' */
 #define __memblk_to_node(memblk) (memblk)
@@ -41,49 +46,22 @@
    so it is a pretty simple function! */
 #define __parent_node(node) (node)
 
-/* Returns the number of the first CPU on Node 'node'.
- * This should be changed to a set of cached values
- * but this will do for now.
- */
-static inline int __node_to_first_cpu(int node)
-{
-	int i, cpu, logical_apicid = node << 4;
-
-	for(i = 1; i < 16; i <<= 1)
-		/* check to see if the cpu is in the system */
-		if ((cpu = logical_apicid_to_cpu(logical_apicid | i)) >= 0)
-			/* if yes, return it to caller */
-			return cpu;
-
-	BUG(); /* couldn't find a cpu on given node */
-	return -1;
-}
-
-/* Returns a bitmask of CPUs on Node 'node'.
- * This should be changed to a set of cached bitmasks
- * but this will do for now.
- */
+/* Returns a bitmask of CPUs on Node 'node'. */
 static inline unsigned long __node_to_cpu_mask(int node)
 {
-	int i, cpu, logical_apicid = node << 4;
-	unsigned long mask = 0UL;
-
-	if (sizeof(unsigned long) * 8 < NR_CPUS)
-		BUG();
-
-	for(i = 1; i < 16; i <<= 1)
-		/* check to see if the cpu is in the system */
-		if ((cpu = logical_apicid_to_cpu(logical_apicid | i)) >= 0)
-			/* if yes, add to bitmask */
-			mask |= 1 << cpu;
+	return node_2_cpu_mask[node];
+}
 
-	return mask;
+/* Returns the number of the first CPU on Node 'node'. */
+static inline int __node_to_first_cpu(int node)
+{ 
+	return __ffs(__node_to_cpu_mask(node));
 }
 
 /* Returns the number of the first MemBlk on Node 'node' */
 #define __node_to_memblk(node) (node)
 
-#else /* !CONFIG_X86_NUMAQ */
+#else /* !CONFIG_NUMA */
 /*
  * Other i386 platforms should define their own version of the 
  * above macros here.
@@ -91,6 +69,6 @@
 
 #include <asm-generic/topology.h>
 
-#endif /* CONFIG_X86_NUMAQ */
+#endif /* CONFIG_NUMA */
 
 #endif /* _ASM_I386_TOPOLOGY_H */
diff -Nru a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
--- a/include/asm-i386/uaccess.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-i386/uaccess.h	Wed Jan  8 20:04:43 2003
@@ -92,10 +92,6 @@
 	unsigned long insn, fixup;
 };
 
-/* Returns 0 if exception not found and fixup otherwise.  */
-extern unsigned long search_exception_table(unsigned long);
-
-
 /*
  * These are the main single-value transfer routines.  They automatically
  * use the right size if we just have the right pointer type.
diff -Nru a/include/asm-ia64/compat.h b/include/asm-ia64/compat.h
--- a/include/asm-ia64/compat.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ia64/compat.h	Wed Jan  8 20:04:45 2003
@@ -53,4 +53,12 @@
 	u32		__unused5;
 };
 
+struct compat_flock {
+       short		l_type;
+       short		l_whence;
+       compat_off_t	l_start;
+       compat_off_t	l_len;
+       compat_pid_t	l_pid;
+};
+
 #endif /* _ASM_IA64_COMPAT_H */
diff -Nru a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h
--- a/include/asm-ia64/ia32.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ia64/ia32.h	Wed Jan  8 20:04:45 2003
@@ -29,15 +29,6 @@
 #define IA32_PAGE_ALIGN(addr)	(((addr) + IA32_PAGE_SIZE - 1) & IA32_PAGE_MASK)
 #define IA32_CLOCKS_PER_SEC	100	/* Cast in stone for IA32 Linux */
 
-/* fcntl.h */
-struct flock32 {
-       short l_type;
-       short l_whence;
-       compat_off_t l_start;
-       compat_off_t l_len;
-       compat_pid_t l_pid;
-};
-
 #define F_GETLK64	12
 #define F_SETLK64	13
 #define F_SETLKW64	14
diff -Nru a/include/asm-ppc/bitops.h b/include/asm-ppc/bitops.h
--- a/include/asm-ppc/bitops.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-ppc/bitops.h	Wed Jan  8 20:04:44 2003
@@ -236,8 +236,6 @@
 	return __ilog2(x & -x);
 }
 
-#ifdef __KERNEL__
-
 static inline int __ffs(unsigned long x)
 {
 	return __ilog2(x & -x);
@@ -274,8 +272,6 @@
 #define hweight16(x) generic_hweight16(x)
 #define hweight8(x) generic_hweight8(x)
 
-#endif /* __KERNEL__ */
-
 /*
  * Find the first bit set in a 140-bit bitmap.
  * The first 100 bits are unlikely to be set.
@@ -395,8 +391,6 @@
 }
 
 
-#ifdef __KERNEL__
-
 #define ext2_set_bit(nr, addr)	__test_and_set_bit((nr) ^ 0x18, (unsigned long *)(addr))
 #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 0x18, (unsigned long *)(addr))
 
@@ -459,8 +453,6 @@
 #define minix_test_and_clear_bit(nr,addr) ext2_clear_bit(nr,addr)
 #define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
 #define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
-
-#endif	/* __KERNEL__ */
 
 #endif /* _PPC_BITOPS_H */
 #endif /* __KERNEL__ */
diff -Nru a/include/asm-ppc/cache.h b/include/asm-ppc/cache.h
--- a/include/asm-ppc/cache.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ppc/cache.h	Wed Jan  8 20:04:45 2003
@@ -39,12 +39,11 @@
 		 __section__(".data.cacheline_aligned")))
 #endif
 
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
+#ifndef __ASSEMBLY__
 extern void clean_dcache_range(unsigned long start, unsigned long stop);
 extern void flush_dcache_range(unsigned long start, unsigned long stop);
 extern void invalidate_dcache_range(unsigned long start, unsigned long stop);
 extern void flush_dcache_all(void);
-
 #endif /* __ASSEMBLY__ */
 
 /* prep registers for L2 */
diff -Nru a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h
--- a/include/asm-ppc/commproc.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-ppc/commproc.h	Wed Jan  8 20:04:44 2003
@@ -35,18 +35,21 @@
 #define CPM_CR_HUNT_MODE	((ushort)0x0003)
 #define CPM_CR_STOP_TX		((ushort)0x0004)
 #define CPM_CR_RESTART_TX	((ushort)0x0006)
+#define CPM_CR_CLOSE_RX_BD	((ushort)0x0007)
 #define CPM_CR_SET_GADDR	((ushort)0x0008)
+#define CPM_CR_SET_TIMER	CPM_CR_SET_GADDR
 
 /* Channel numbers.
 */
-#define CPM_CR_CH_SCC1	((ushort)0x0000)
-#define CPM_CR_CH_I2C	((ushort)0x0001)	/* I2C and IDMA1 */
-#define CPM_CR_CH_SCC2	((ushort)0x0004)
-#define CPM_CR_CH_SPI	((ushort)0x0005)	/* SPI / IDMA2 / Timers */
-#define CPM_CR_CH_SCC3	((ushort)0x0008)
-#define CPM_CR_CH_SMC1	((ushort)0x0009)	/* SMC1 / DSP1 */
-#define CPM_CR_CH_SCC4	((ushort)0x000c)
-#define CPM_CR_CH_SMC2	((ushort)0x000d)	/* SMC2 / DSP2 */
+#define CPM_CR_CH_SCC1		((ushort)0x0000)
+#define CPM_CR_CH_I2C		((ushort)0x0001)	/* I2C and IDMA1 */
+#define CPM_CR_CH_SCC2		((ushort)0x0004)
+#define CPM_CR_CH_SPI		((ushort)0x0005)	/* SPI / IDMA2 / Timers */
+#define CPM_CR_CH_TIMER		CPM_CR_CH_SPI
+#define CPM_CR_CH_SCC3		((ushort)0x0008)
+#define CPM_CR_CH_SMC1		((ushort)0x0009)	/* SMC1 / DSP1 */
+#define CPM_CR_CH_SCC4		((ushort)0x000c)
+#define CPM_CR_CH_SMC2		((ushort)0x000d)	/* SMC2 / DSP2 */
 
 #define mk_cr_cmd(CH, CMD)	((CMD << 8) | (CH << 4))
 
@@ -80,20 +83,25 @@
 #define BD_SC_WRAP	((ushort)0x2000)	/* Last buffer descriptor */
 #define BD_SC_INTRPT	((ushort)0x1000)	/* Interrupt on change */
 #define BD_SC_LAST	((ushort)0x0800)	/* Last buffer in frame */
+#define BD_SC_TC	((ushort)0x0400)	/* Transmit CRC */
 #define BD_SC_CM	((ushort)0x0200)	/* Continous mode */
 #define BD_SC_ID	((ushort)0x0100)	/* Rec'd too many idles */
 #define BD_SC_P		((ushort)0x0100)	/* xmt preamble */
 #define BD_SC_BR	((ushort)0x0020)	/* Break received */
 #define BD_SC_FR	((ushort)0x0010)	/* Framing error */
 #define BD_SC_PR	((ushort)0x0008)	/* Parity error */
+#define BD_SC_NAK	((ushort)0x0004)	/* NAK - did not respond */
 #define BD_SC_OV	((ushort)0x0002)	/* Overrun */
+#define BD_SC_UN	((ushort)0x0002)	/* Underrun */
 #define BD_SC_CD	((ushort)0x0001)	/* ?? */
+#define BD_SC_CL	((ushort)0x0001)	/* Collision */
 
 /* Parameter RAM offsets.
 */
 #define PROFF_SCC1	((uint)0x0000)
 #define PROFF_IIC	((uint)0x0080)
 #define PROFF_SCC2	((uint)0x0100)
+#define PROFF_SPI	((uint)0x0180)
 #define PROFF_SCC3	((uint)0x0200)
 #define PROFF_SMC1	((uint)0x0280)
 #define PROFF_SCC4	((uint)0x0300)
@@ -208,6 +216,17 @@
 #define CPM_BRG_CD_MASK		((uint)0x00001ffe)
 #define CPM_BRG_DIV16		((uint)0x00000001)
 
+/* SI Clock Route Register
+*/
+#define SICR_RCLK_SCC1_BRG1	((uint)0x00000000)
+#define SICR_TCLK_SCC1_BRG1	((uint)0x00000000)
+#define SICR_RCLK_SCC2_BRG2	((uint)0x00000800)
+#define SICR_TCLK_SCC2_BRG2	((uint)0x00000100)
+#define SICR_RCLK_SCC3_BRG3	((uint)0x00100000)
+#define SICR_TCLK_SCC3_BRG3	((uint)0x00020000)
+#define SICR_RCLK_SCC4_BRG4	((uint)0x18000000)
+#define SICR_TCLK_SCC4_BRG4	((uint)0x03000000)
+
 /* SCCs.
 */
 #define SCC_GSMRH_IRP		((uint)0x00040000)
@@ -417,6 +436,8 @@
 #define BD_ENET_RX_CR		((ushort)0x0004)
 #define BD_ENET_RX_OV		((ushort)0x0002)
 #define BD_ENET_RX_CL		((ushort)0x0001)
+#define BD_ENET_RX_BC		((ushort)0x0080)	/* DA is Broadcast */
+#define BD_ENET_RX_MC		((ushort)0x0040)	/* DA is Multicast */
 #define BD_ENET_RX_STATS	((ushort)0x013f)	/* All status bits */
 
 /* Buffer descriptor control/status used by Ethernet transmit.
@@ -525,9 +546,83 @@
 	ushort	iic_tbptr;	/* Internal */
 	ushort	iic_tbc;	/* Internal */
 	uint	iic_txtmp;	/* Internal */
+	uint	iic_res;	/* reserved */
+  	ushort	iic_rpbase;	/* Relocation pointer */
+	ushort	iic_res2;	/* reserved */
 } iic_t;
 
 #define BD_IIC_START		((ushort)0x0400)
+ 
+/* SPI parameter RAM.
+*/
+typedef struct spi {
+	ushort	spi_rbase;	/* Rx Buffer descriptor base address */
+	ushort	spi_tbase;	/* Tx Buffer descriptor base address */
+	u_char	spi_rfcr;	/* Rx function code */
+	u_char	spi_tfcr;	/* Tx function code */
+	ushort	spi_mrblr;	/* Max receive buffer length */
+	uint	spi_rstate;	/* Internal */
+	uint	spi_rdp;	/* Internal */
+	ushort	spi_rbptr;	/* Internal */
+	ushort	spi_rbc;	/* Internal */
+	uint	spi_rxtmp;	/* Internal */
+	uint	spi_tstate;	/* Internal */
+	uint	spi_tdp;	/* Internal */
+	ushort	spi_tbptr;	/* Internal */
+	ushort	spi_tbc;	/* Internal */
+	uint	spi_txtmp;	/* Internal */
+	uint	spi_res;
+	ushort	spi_rpbase;	/* Relocation pointer */
+	ushort	spi_res2;
+} spi_t;
+
+/* SPI Mode register.
+*/
+#define SPMODE_LOOP	((ushort)0x4000)	/* Loopback */
+#define SPMODE_CI	((ushort)0x2000)	/* Clock Invert */
+#define SPMODE_CP	((ushort)0x1000)	/* Clock Phase */
+#define SPMODE_DIV16	((ushort)0x0800)	/* BRG/16 mode */
+#define SPMODE_REV	((ushort)0x0400)	/* Reversed Data */
+#define SPMODE_MSTR	((ushort)0x0200)	/* SPI Master */
+#define SPMODE_EN	((ushort)0x0100)	/* Enable */
+#define SPMODE_LENMSK	((ushort)0x00f0)	/* character length */
+#define SPMODE_LEN4	((ushort)0x0030)	/*  4 bits per char */
+#define SPMODE_LEN8	((ushort)0x0070)	/*  8 bits per char */
+#define SPMODE_LEN16	((ushort)0x00f0)	/* 16 bits per char */
+#define SPMODE_PMMSK	((ushort)0x000f)	/* prescale modulus */
+
+/* SPIE fields */
+#define SPIE_MME	0x20
+#define SPIE_TXE	0x10
+#define SPIE_BSY	0x04
+#define SPIE_TXB	0x02
+#define SPIE_RXB	0x01
+
+/*
+ * RISC Controller Configuration Register definitons
+ */
+#define RCCR_TIME	0x8000			/* RISC Timer Enable */
+#define RCCR_TIMEP(t)	(((t) & 0x3F)<<8)	/* RISC Timer Period */
+#define RCCR_TIME_MASK	0x00FF			/* not RISC Timer related bits */
+
+/* RISC Timer Parameter RAM offset */
+#define PROFF_RTMR	((uint)0x01B0)
+
+typedef struct risc_timer_pram {
+	unsigned short	tm_base;	/* RISC Timer Table Base Address */
+	unsigned short	tm_ptr;		/* RISC Timer Table Pointer (internal) */
+	unsigned short	r_tmr;		/* RISC Timer Mode Register */
+	unsigned short	r_tmv;		/* RISC Timer Valid Register */
+	unsigned long	tm_cmd;		/* RISC Timer Command Register */
+	unsigned long	tm_cnt;		/* RISC Timer Internal Count */
+} rt_pram_t;
+
+/* Bits in RISC Timer Command Register */
+#define TM_CMD_VALID	0x80000000	/* Valid - Enables the timer */
+#define TM_CMD_RESTART	0x40000000	/* Restart - for automatic restart */
+#define TM_CMD_PWM	0x20000000	/* Run in Pulse Width Modulation Mode */
+#define TM_CMD_NUM(n)	(((n)&0xF)<<16)	/* Timer Number */
+#define TM_CMD_PERIOD(p) ((p)&0xFFFF)	/* Timer Period */
 
 /* CPM interrupts.  There are nearly 32 interrupts generated by CPM
  * channels or devices.  All of these are presented to the PPC core
diff -Nru a/include/asm-ppc/cputable.h b/include/asm-ppc/cputable.h
--- a/include/asm-ppc/cputable.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/cputable.h	Wed Jan  8 20:04:43 2003
@@ -29,6 +29,10 @@
 /* This structure can grow, it's real size is used by head.S code
  * via the mkdefs mecanism.
  */
+struct cpu_spec;
+
+typedef	void (*cpu_setup_t)(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+
 struct cpu_spec {
 	/* CPU is matched via (PVR & pvr_mask) == pvr_value */
 	unsigned int	pvr_mask;
@@ -45,7 +49,7 @@
 	/* this is called to initialize various CPU bits like L1 cache,
 	 * BHT, SPD, etc... from head.S before branching to identify_machine
 	 */
-	void		(*cpu_setup)(int cpu_nr);
+	cpu_setup_t	cpu_setup;
 };
 
 extern struct cpu_spec		cpu_specs[];
@@ -66,6 +70,9 @@
 #define CPU_FTR_HPTE_TABLE		0x00000200
 #define CPU_FTR_CAN_NAP			0x00000400
 #define CPU_FTR_L3CR			0x00000800
+#define CPU_FTR_L3_DISABLE_NAP		0x00001000
+#define CPU_FTR_NAP_DISABLE_L2_PR	0x00002000
+#define CPU_FTR_DUAL_PLL_750FX		0x00004000
 #define CPU_FTR_NO_DPM			0x00008000
 
 #ifdef __ASSEMBLY__
diff -Nru a/include/asm-ppc/iSeries/HvCall.h b/include/asm-ppc/iSeries/HvCall.h
--- a/include/asm-ppc/iSeries/HvCall.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,209 +0,0 @@
-/*
- * HvCall.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//===========================================================================
-//
-//	This file contains the "hypervisor call" interface which is used to
-//	drive the hypervisor from the OS.
-//
-//===========================================================================
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef  _HVCALLSC_H
-#include "HvCallSc.h"
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-#include <asm/iSeries/Paca.h>
-
-//-------------------------------------------------------------------
-// Constants
-//-------------------------------------------------------------------
-#ifndef _HVCALL_H
-#define _HVCALL_H
-/*
-enum HvCall_ReturnCode
-{
-    HvCall_Good			= 0,
-    HvCall_Partial		= 1,
-    HvCall_NotOwned		= 2,
-    HvCall_NotFreed		= 3,
-    HvCall_UnspecifiedError	= 4
-};
-
-enum HvCall_TypeOfSIT
-{
-    HvCall_ReduceOnly		= 0,
-    HvCall_Unconditional	= 1
-};
-
-enum HvCall_TypeOfYield
-{
-    HvCall_YieldTimed		= 0,	// Yield until specified time
-    HvCall_YieldToActive	= 1,	// Yield until all active procs have run
-    HvCall_YieldToProc		= 2	// Yield until the specified processor has run
-};
-
-enum HvCall_InterruptMasks
-{
-    HvCall_MaskIPI		= 0x00000001,
-    HvCall_MaskLpEvent		= 0x00000002,
-    HvCall_MaskLpProd		= 0x00000004,
-    HvCall_MaskTimeout		= 0x00000008
-};
-
-enum HvCall_VaryOffChunkRc
-{
-    HvCall_VaryOffSucceeded	= 0,
-    HvCall_VaryOffWithdrawn	= 1,
-    HvCall_ChunkInLoadArea	= 2,
-    HvCall_ChunkInHPT		= 3,
-    HvCall_ChunkNotAccessible	= 4,
-    HvCall_ChunkInUse		= 5
-};
-*/
-
-/* Type of yield for HvCallBaseYieldProcessor */
-#define HvCall_YieldTimed 	0	// Yield until specified time (tb)
-#define HvCall_YieldToActive	1	// Yield until all active procs have run
-#define HvCall_YieldToProc	2	// Yield until the specified processor has run
-
-/* interrupt masks for setEnabledInterrupts */
-#define HvCall_MaskIPI		0x00000001
-#define HvCall_MaskLpEvent	0x00000002
-#define HvCall_MaskLpProd	0x00000004
-#define HvCall_MaskTimeout	0x00000008
-
-/* Log buffer formats                       */
-#define HvCall_LogBuffer_ASCII          0
-#define HvCall_LogBuffer_EBCDIC         1
-
-#define HvCallBaseAckDeferredInts			HvCallBase +  0
-#define HvCallBaseCpmPowerOff				HvCallBase +  1
-#define HvCallBaseGetHwPatch				HvCallBase +  2
-#define HvCallBaseReIplSpAttn				HvCallBase +  3
-#define HvCallBaseSetASR				HvCallBase +  4
-#define HvCallBaseSetASRAndRfi				HvCallBase +  5 
-#define HvCallBaseSetIMR				HvCallBase +  6
-#define HvCallBaseSendIPI				HvCallBase +  7
-#define HvCallBaseTerminateMachine			HvCallBase +  8
-#define HvCallBaseTerminateMachineSrc			HvCallBase +  9
-#define HvCallBaseProcessPlicInterrupts			HvCallBase + 10
-#define HvCallBaseIsPrimaryCpmOrMsdIpl			HvCallBase + 11
-#define HvCallBaseSetVirtualSIT				HvCallBase + 12
-#define HvCallBaseVaryOffThisProcessor			HvCallBase + 13
-#define HvCallBaseVaryOffMemoryChunk			HvCallBase + 14
-#define HvCallBaseVaryOffInteractivePercentage		HvCallBase + 15
-#define HvCallBaseSendLpProd				HvCallBase + 16
-#define HvCallBaseSetEnabledInterrupts			HvCallBase + 17
-#define HvCallBaseYieldProcessor			HvCallBase + 18
-#define HvCallBaseVaryOffSharedProcUnits		HvCallBase + 19
-#define HvCallBaseSetVirtualDecr			HvCallBase + 20
-#define HvCallBaseClearLogBuffer			HvCallBase + 21
-#define HvCallBaseGetLogBufferCodePage			HvCallBase + 22
-#define HvCallBaseGetLogBufferFormat			HvCallBase + 23
-#define HvCallBaseGetLogBufferLength			HvCallBase + 24
-#define HvCallBaseReadLogBuffer 			HvCallBase + 25
-#define HvCallBaseSetLogBufferFormatAndCodePage		HvCallBase + 26
-#define HvCallBaseWriteLogBuffer               		HvCallBase + 27
-#define HvCallBaseRouter28				HvCallBase + 28
-#define HvCallBaseRouter29				HvCallBase + 29
-#define HvCallBaseRouter30				HvCallBase + 30
-//=====================================================================================
-static inline void		HvCall_setVirtualDecr(void)
-{
-    // Ignore any error return codes - most likely means that the target value for the
-    // LP has been increased and this vary off would bring us below the new target.
-    HvCall0(HvCallBaseSetVirtualDecr);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//=====================================================================
-static inline void		HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm)
-{
-    HvCall2( HvCallBaseYieldProcessor, typeOfYield, yieldParm );
-}
-//=====================================================================
-static inline void		HvCall_setEnabledInterrupts(u64 enabledInterrupts)
-{
-    HvCall1(HvCallBaseSetEnabledInterrupts,enabledInterrupts);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-
-//=====================================================================
-static inline void		HvCall_clearLogBuffer(HvLpIndex lpindex)
-{
-    HvCall1(HvCallBaseClearLogBuffer,lpindex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-
-//=====================================================================
-static inline u32  		HvCall_getLogBufferCodePage(HvLpIndex lpindex)
-{
-  u32 retVal = HvCall1(HvCallBaseGetLogBufferCodePage,lpindex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-  return retVal;
-}
-
-//=====================================================================
-static inline int  		HvCall_getLogBufferFormat(HvLpIndex lpindex)
-{
-  int retVal = HvCall1(HvCallBaseGetLogBufferFormat,lpindex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-  return retVal;
-}
-
-//=====================================================================
-static inline u32  		HvCall_getLogBufferLength(HvLpIndex lpindex)
-{
-  u32 retVal = HvCall1(HvCallBaseGetLogBufferLength,lpindex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-  return retVal;
-}
-
-//=====================================================================
-static inline void  		HvCall_setLogBufferFormatAndCodepage(int format, u32 codePage)
-{
-  HvCall2(HvCallBaseSetLogBufferFormatAndCodePage,format, codePage);
-  // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-
-//=====================================================================
-int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen);
-void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);
-
-//=====================================================================
-static inline void		HvCall_sendIPI(struct Paca * targetPaca)
-{
-	HvCall1( HvCallBaseSendIPI, targetPaca->xPacaIndex );
-}
-
-//=====================================================================
-static inline void		HvCall_terminateMachineSrc(void)
-{
-	HvCall0( HvCallBaseTerminateMachineSrc );
-}
-
-
-#endif // _HVCALL_H
-
diff -Nru a/include/asm-ppc/iSeries/HvCallCfg.h b/include/asm-ppc/iSeries/HvCallCfg.h
--- a/include/asm-ppc/iSeries/HvCallCfg.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,219 +0,0 @@
-/*
- * HvCallCfg.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//=====================================================================================
-//
-//	This file contains the "hypervisor call" interface which is used to
-//	drive the hypervisor from the OS.
-//
-//=====================================================================================
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef  _HVCALLSC_H
-#include "HvCallSc.h"
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-//-------------------------------------------------------------------------------------
-// Constants
-//-------------------------------------------------------------------------------------
-#ifndef _HVCALLCFG_H
-#define _HVCALLCFG_H
-
-enum HvCallCfg_ReqQual
-{
-    HvCallCfg_Cur	= 0,
-    HvCallCfg_Init	= 1,
-    HvCallCfg_Max	= 2,
-    HvCallCfg_Min	= 3
-};
-
-#define HvCallCfgGetLps					HvCallCfg +  0
-#define HvCallCfgGetActiveLpMap				HvCallCfg +  1
-#define HvCallCfgGetLpVrmIndex				HvCallCfg +  2
-#define HvCallCfgGetLpMinSupportedPlicVrmIndex		HvCallCfg +  3
-#define HvCallCfgGetLpMinCompatablePlicVrmIndex		HvCallCfg +  4
-#define HvCallCfgGetLpVrmName				HvCallCfg +  5 
-#define HvCallCfgGetSystemPhysicalProcessors		HvCallCfg +  6
-#define HvCallCfgGetPhysicalProcessors			HvCallCfg +  7
-#define HvCallCfgGetSystemMsChunks			HvCallCfg +  8
-#define HvCallCfgGetMsChunks				HvCallCfg +  9
-#define HvCallCfgGetInteractivePercentage		HvCallCfg + 10
-#define HvCallCfgIsBusDedicated				HvCallCfg + 11
-#define HvCallCfgGetBusOwner				HvCallCfg + 12
-#define HvCallCfgGetBusAllocation			HvCallCfg + 13
-#define HvCallCfgGetBusUnitOwner			HvCallCfg + 14
-#define HvCallCfgGetBusUnitAllocation			HvCallCfg + 15
-#define HvCallCfgGetVirtualBusPool			HvCallCfg + 16
-#define HvCallCfgGetBusUnitInterruptProc		HvCallCfg + 17
-#define HvCallCfgGetConfiguredBusUnitsForIntProc	HvCallCfg + 18
-#define HvCallCfgGetRioSanBusPool			HvCallCfg + 19
-#define HvCallCfgGetSharedPoolIndex			HvCallCfg + 20
-#define HvCallCfgGetSharedProcUnits			HvCallCfg + 21
-#define HvCallCfgGetNumProcsInSharedPool		HvCallCfg + 22
-#define HvCallCfgRouter23				HvCallCfg + 23
-#define HvCallCfgRouter24				HvCallCfg + 24
-#define HvCallCfgRouter25				HvCallCfg + 25
-#define HvCallCfgRouter26				HvCallCfg + 26
-#define HvCallCfgRouter27				HvCallCfg + 27
-#define HvCallCfgGetMinRuntimeMsChunks			HvCallCfg + 28
-#define HvCallCfgSetMinRuntimeMsChunks			HvCallCfg + 29
-#define HvCallCfgGetVirtualLanIndexMap			HvCallCfg + 30
-#define HvCallCfgGetLpExecutionMode			HvCallCfg + 31
-#define HvCallCfgGetHostingLpIndex 			HvCallCfg + 32
-
-//====================================================================
-static inline HvLpIndex	HvCallCfg_getLps(void)
-{
-    HvLpIndex retVal = HvCall0(HvCallCfgGetLps);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//====================================================================
-static inline int		HvCallCfg_isBusDedicated(u64 busIndex)
-{
-    int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//====================================================================
-static inline HvLpIndex	HvCallCfg_getBusOwner(u64 busIndex)
-{
-    HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//====================================================================
-static inline HvLpIndexMap	HvCallCfg_getBusAllocation(u64 busIndex)
-{
-    HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//====================================================================
-static inline HvLpIndexMap	HvCallCfg_getActiveLpMap(void)
-{
-    HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//====================================================================
-static inline HvLpVirtualLanIndexMap	HvCallCfg_getVirtualLanIndexMap(HvLpIndex lp)
-{
-    // This is a new function in V5R1 so calls to this on older 
-    // hypervisors will return -1
-    u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
-    if(retVal == -1)
-       retVal = 0;
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline u64		HvCallCfg_getSystemMsChunks(void)
-{
-    u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline u64		HvCallCfg_getMsChunks(HvLpIndex lp,enum HvCallCfg_ReqQual qual)
-{
-    u64 retVal = HvCall2(HvCallCfgGetMsChunks,lp,qual);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline u64		HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp)
-{
-    // NOTE: This function was added in v5r1 so older hypervisors will return a -1 value
-    u64 retVal = HvCall1(HvCallCfgGetMinRuntimeMsChunks,lp);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline u64		HvCallCfg_setMinRuntimeMsChunks(u64 chunks)
-{
-    u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline u64		HvCallCfg_getSystemPhysicalProcessors(void)
-{
-    u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline u64		HvCallCfg_getPhysicalProcessors(HvLpIndex lp,enum HvCallCfg_ReqQual qual)
-{
-    u64 retVal = HvCall2(HvCallCfgGetPhysicalProcessors,lp,qual);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline u64		HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
-								 u16 hvLogicalProcIndex)
-{
-    u64 retVal = HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc,lp,hvLogicalProcIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-
-}
-//==================================================================
-static inline HvLpSharedPoolIndex	HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
-{
-    HvLpSharedPoolIndex retVal =
-      HvCall1(HvCallCfgGetSharedPoolIndex,lp);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-
-}
-//==================================================================
-static inline u64	HvCallCfg_getSharedProcUnits(HvLpIndex lp,enum HvCallCfg_ReqQual qual)
-{
-    u64 retVal = HvCall2(HvCallCfgGetSharedProcUnits,lp,qual);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-
-}
-//==================================================================
-static inline u64	HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
-{
-    u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-
-}
-//==================================================================
-static inline HvLpIndex	HvCallCfg_getHostingLpIndex(HvLpIndex lp)
-{
-    u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-
-}
-
-#endif // _HVCALLCFG_H
-
diff -Nru a/include/asm-ppc/iSeries/HvCallEvent.h b/include/asm-ppc/iSeries/HvCallEvent.h
--- a/include/asm-ppc/iSeries/HvCallEvent.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,328 +0,0 @@
-/*
- * HvCallEvent.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//==================================================================
-//
-//	This file contains the "hypervisor call" interface which is used to
-//	drive the hypervisor from the OS.
-//
-//==================================================================
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef  _HVCALLSC_H
-#include <asm/iSeries/HvCallSc.h>
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-#include <asm/iSeries/LparData.h>
-
-//-------------------------------------------------------------------
-// Constants
-//-------------------------------------------------------------------
-#ifndef _HVCALLEVENT_H
-#define _HVCALLEVENT_H
-
-struct HvLpEvent;
-
-typedef u8 HvLpEvent_Type;
-typedef u8 HvLpEvent_AckInd;
-typedef u8 HvLpEvent_AckType;
-
-struct	HvCallEvent_PackedParms
-{
-    u8		xAckType:1;
-    u8		xAckInd:1;
-    u8		xRsvd:1;
-    u8		xTargetLp:5;
-    u8		xType;
-    u16		xSubtype;
-    HvLpInstanceId	xSourceInstId;
-    HvLpInstanceId	xTargetInstId;
-};
-
-typedef u8 HvLpDma_Direction;
-typedef u8 HvLpDma_AddressType;
-
-struct	HvCallEvent_PackedDmaParms
-{
-    u8		xDirection:1;
-    u8		xLocalAddrType:1;
-    u8		xRemoteAddrType:1;
-    u8		xRsvd1:5;
-    HvLpIndex	xRemoteLp;
-    u8		xType;
-    u8		xRsvd2;
-    HvLpInstanceId	xLocalInstId;
-    HvLpInstanceId	xRemoteInstId;
-};
-
-typedef u64 HvLpEvent_Rc;
-typedef u64 HvLpDma_Rc;
-
-#define HvCallEventAckLpEvent				HvCallEvent +  0
-#define HvCallEventCancelLpEvent			HvCallEvent +  1
-#define HvCallEventCloseLpEventPath			HvCallEvent +  2
-#define HvCallEventDmaBufList				HvCallEvent +  3
-#define HvCallEventDmaSingle				HvCallEvent +  4
-#define HvCallEventDmaToSp				HvCallEvent +  5 
-#define HvCallEventGetOverflowLpEvents			HvCallEvent +  6
-#define HvCallEventGetSourceLpInstanceId		HvCallEvent +  7
-#define HvCallEventGetTargetLpInstanceId		HvCallEvent +  8
-#define HvCallEventOpenLpEventPath			HvCallEvent +  9
-#define HvCallEventSetLpEventStack			HvCallEvent + 10
-#define HvCallEventSignalLpEvent			HvCallEvent + 11
-#define HvCallEventSignalLpEventParms			HvCallEvent + 12
-#define HvCallEventSetInterLpQueueIndex			HvCallEvent + 13
-#define HvCallEventSetLpEventQueueInterruptProc		HvCallEvent + 14
-#define HvCallEventRouter15				HvCallEvent + 15
-
-//======================================================================
-static inline void		HvCallEvent_getOverflowLpEvents(u8 queueIndex)
-{
-    HvCall1(HvCallEventGetOverflowLpEvents,queueIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//======================================================================
-static inline void		HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
-{
-    HvCall1(HvCallEventSetInterLpQueueIndex,queueIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//======================================================================
-static inline void		HvCallEvent_setLpEventStack(u8 queueIndex,
-					     char * eventStackAddr,
-					     u32 eventStackSize)
-{
-    u64 abs_addr;
-    abs_addr = virt_to_absolute_outline( (unsigned long) eventStackAddr );
-
-    HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr, eventStackSize);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//======================================================================
-static inline void		HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
-							  u16 lpLogicalProcIndex)
-{
-    HvCall2(HvCallEventSetLpEventQueueInterruptProc,queueIndex,lpLogicalProcIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//=====================================================================
-static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent* event)
-{
-    u64 abs_addr;
-    HvLpEvent_Rc retVal;
-    abs_addr = virt_to_absolute_outline( (unsigned long) event );
-    retVal = (HvLpEvent_Rc)HvCall1(HvCallEventSignalLpEvent, abs_addr);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//=====================================================================
-static inline HvLpEvent_Rc  HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
-					   HvLpEvent_Type type,
-					   u16 subtype,
-					   HvLpEvent_AckInd ackInd,
-					   HvLpEvent_AckType ackType,
-					   HvLpInstanceId sourceInstanceId,
-					   HvLpInstanceId targetInstanceId,
-					   u64 correlationToken,
-					   u64 eventData1,
-					   u64 eventData2,
-					   u64 eventData3,
-					   u64 eventData4,
-					   u64 eventData5)
-{
-    HvLpEvent_Rc retVal;
-    	
-    // Pack the misc bits into a single Dword to pass to PLIC
-    union
-    {
-	struct HvCallEvent_PackedParms	parms;
-	u64		dword;
-    } packed;
-    packed.parms.xAckType	= ackType;
-    packed.parms.xAckInd	= ackInd;
-    packed.parms.xRsvd		= 0;
-    packed.parms.xTargetLp	= targetLp;
-    packed.parms.xType		= type;
-    packed.parms.xSubtype	= subtype;
-    packed.parms.xSourceInstId	= sourceInstanceId;
-    packed.parms.xTargetInstId	= targetInstanceId;
-
-    retVal = (HvLpEvent_Rc)HvCall7(HvCallEventSignalLpEventParms,
-						      packed.dword,
-						      correlationToken,
-						      eventData1,eventData2,
-						      eventData3,eventData4,
-						      eventData5);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//====================================================================
-static inline HvLpEvent_Rc	HvCallEvent_ackLpEvent(struct HvLpEvent* event)
-{
-    u64 abs_addr;
-    HvLpEvent_Rc retVal;
-    abs_addr = virt_to_absolute_outline( (unsigned long) event );
-
-    retVal = (HvLpEvent_Rc)HvCall1(HvCallEventAckLpEvent, abs_addr);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//====================================================================
-static inline HvLpEvent_Rc   HvCallEvent_cancelLpEvent(struct HvLpEvent* event)
-{
-    u64 abs_addr;
-    HvLpEvent_Rc retVal;
-    abs_addr = virt_to_absolute_outline( (unsigned long) event );
-
-    retVal = (HvLpEvent_Rc)HvCall1(HvCallEventCancelLpEvent, abs_addr);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline HvLpInstanceId	HvCallEvent_getSourceLpInstanceId(HvLpIndex targetLp, HvLpEvent_Type type)
-{
-    HvLpInstanceId retVal;	
-    retVal = HvCall2(HvCallEventGetSourceLpInstanceId,targetLp,type);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline HvLpInstanceId	HvCallEvent_getTargetLpInstanceId(HvLpIndex targetLp, HvLpEvent_Type type)
-{
-    HvLpInstanceId retVal;	
-    retVal = HvCall2(HvCallEventGetTargetLpInstanceId,targetLp,type);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//===================================================================
-static inline void		HvCallEvent_openLpEventPath(HvLpIndex targetLp,
-					     HvLpEvent_Type type)
-{
-    HvCall2(HvCallEventOpenLpEventPath,targetLp,type);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//===================================================================
-static inline void		HvCallEvent_closeLpEventPath(HvLpIndex targetLp,
-					      HvLpEvent_Type type)
-{
-    HvCall2(HvCallEventCloseLpEventPath,targetLp,type);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//===================================================================
-static inline HvLpDma_Rc	HvCallEvent_dmaBufList(HvLpEvent_Type type,
-					HvLpIndex remoteLp,
-					HvLpDma_Direction direction,
-					HvLpInstanceId localInstanceId,
-					HvLpInstanceId remoteInstanceId,
-					HvLpDma_AddressType localAddressType,
-					HvLpDma_AddressType remoteAddressType,
-					// Do these need to be converted to
-					// absolute addresses?
-					u64 localBufList,
-					u64 remoteBufList,
-
-					u32 transferLength)
-{
-    HvLpDma_Rc retVal;	
-    // Pack the misc bits into a single Dword to pass to PLIC
-    union
-    {
-	struct HvCallEvent_PackedDmaParms	parms;
-	u64		dword;
-    } packed;
-    packed.parms.xDirection	= direction;
-    packed.parms.xLocalAddrType	= localAddressType;
-    packed.parms.xRemoteAddrType	= remoteAddressType;
-    packed.parms.xRsvd1		= 0;
-    packed.parms.xRemoteLp	= remoteLp;
-    packed.parms.xType		= type;
-    packed.parms.xRsvd2		= 0;
-    packed.parms.xLocalInstId	= localInstanceId;
-    packed.parms.xRemoteInstId	= remoteInstanceId;
-
-    retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaBufList,
-					  packed.dword,
-					  localBufList,
-					  remoteBufList,
-					  transferLength);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//=================================================================
-static inline HvLpDma_Rc	HvCallEvent_dmaSingle(HvLpEvent_Type type,
-				       HvLpIndex remoteLp,
-				       HvLpDma_Direction direction,
-				       HvLpInstanceId localInstanceId,
-				       HvLpInstanceId remoteInstanceId,
-				       HvLpDma_AddressType localAddressType,
-				       HvLpDma_AddressType remoteAddressType,
-				       u64 localAddrOrTce,
-				       u64 remoteAddrOrTce,
-				       u32 transferLength)
-{
-    HvLpDma_Rc retVal;	
-    // Pack the misc bits into a single Dword to pass to PLIC
-    union
-    {
-	struct HvCallEvent_PackedDmaParms	parms;
-	u64		dword;
-    } packed;
-    packed.parms.xDirection	= direction;
-    packed.parms.xLocalAddrType	= localAddressType;
-    packed.parms.xRemoteAddrType	= remoteAddressType;
-    packed.parms.xRsvd1		= 0;
-    packed.parms.xRemoteLp	= remoteLp;
-    packed.parms.xType		= type;
-    packed.parms.xRsvd2		= 0;
-    packed.parms.xLocalInstId	= localInstanceId;
-    packed.parms.xRemoteInstId	= remoteInstanceId;
-
-    retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle,
-					  packed.dword,
-					  localAddrOrTce,
-					  remoteAddrOrTce,
-					  transferLength);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//=================================================================
-static inline HvLpDma_Rc	HvCallEvent_dmaToSp(void* local, u32 remote, u32 length, HvLpDma_Direction dir)
-{
-    u64 abs_addr;
-    HvLpDma_Rc retVal;
-    abs_addr = virt_to_absolute_outline( (unsigned long) local );
-    
-    retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaToSp, 
-		    			abs_addr,
-					remote,
-					length,
-					dir);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//================================================================
-
-#endif // _HVCALLEVENT_H
-
diff -Nru a/include/asm-ppc/iSeries/HvCallHpt.h b/include/asm-ppc/iSeries/HvCallHpt.h
--- a/include/asm-ppc/iSeries/HvCallHpt.h	Wed Jan  8 20:04:31 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,137 +0,0 @@
-/*
- * HvCallHpt.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//============================================================================
-//
-//	This file contains the "hypervisor call" interface which is used to
-//	drive the hypervisor from the OS.
-//
-//============================================================================
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef  _HVCALLSC_H
-#include "HvCallSc.h"
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-//-------------------------------------------------------------------
-// Other Includes
-//-------------------------------------------------------------------
-
-#ifndef _PPC_MMU_H
-#include <asm/mmu.h>
-#endif
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-#ifndef _HVCALLHPT_H
-#define _HVCALLHPT_H
-
-#define HvCallHptGetHptAddress		HvCallHpt +  0
-#define HvCallHptGetHptPages		HvCallHpt +  1
-#define HvCallHptSetPp			HvCallHpt +  5
-#define HvCallHptUpdate			HvCallHpt +  7
-#define HvCallHptInvalidateNoSyncICache	HvCallHpt +  8
-#define HvCallHptGet			HvCallHpt + 11
-#define HvCallHptFindNextValid		HvCallHpt + 12
-#define HvCallHptFindValid		HvCallHpt + 13
-#define HvCallHptAddValidate		HvCallHpt + 16
-#define HvCallHptInvalidateSetSwBitsGet HvCallHpt + 18
-
-
-
-//============================================================================
-static inline u64		HvCallHpt_getHptAddress(void)
-{
-    u64 retval = HvCall0(HvCallHptGetHptAddress);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retval;
-}
-//============================================================================
-static inline u64		HvCallHpt_getHptPages(void)
-{	
-    u64 retval = HvCall0(HvCallHptGetHptPages);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retval;
-}
-//=============================================================================
-static inline void		HvCallHpt_setPp(u32 hpteIndex, u8 value)
-{
-    HvCall2( HvCallHptSetPp, hpteIndex, value );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//=============================================================================
-static inline void		HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)
-						
-{
-    HvCall1( HvCallHptInvalidateNoSyncICache, hpteIndex );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//=============================================================================
-static inline u64		HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, u8 bitsoff )
-						
-{
-    u64 compressedStatus;
-    compressedStatus = HvCall4( HvCallHptInvalidateSetSwBitsGet, hpteIndex, bitson, bitsoff, 1 );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return compressedStatus;
-}
-//=============================================================================
-static inline u64		HvCallHpt_findValid( PTE *hpte, u64 vpn )
-{
-    u64 retIndex = HvCall1Ret16( HvCallHptFindValid, hpte, vpn );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retIndex;
-}
-//=============================================================================
-static inline u64		HvCallHpt_findNextValid( PTE *hpte, u32 hpteIndex, u8 bitson, u8 bitsoff )
-{
-    u64 retIndex = HvCall3Ret16( HvCallHptFindNextValid, hpte, hpteIndex, bitson, bitsoff );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retIndex;
-}
-//=============================================================================
-static inline void		HvCallHpt_get( PTE *hpte, u32 hpteIndex )
-{
-    HvCall2Ret16( HvCallHptFindValid, hpte, hpteIndex, 0 );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-
-//============================================================================
-static inline void		HvCallHpt_addValidate( u32 hpteIndex,
-						       u32 hBit,
-						       PTE *hpte )
-						
-{
-    HvCall4( HvCallHptAddValidate, hpteIndex,
-		    hBit, (*((u64 *)hpte)), (*(((u64 *)hpte)+1)) );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-
-
-//=============================================================================
-
-#endif // _HVCALLHPT_H
-
diff -Nru a/include/asm-ppc/iSeries/HvCallPci.h b/include/asm-ppc/iSeries/HvCallPci.h
--- a/include/asm-ppc/iSeries/HvCallPci.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,689 +0,0 @@
-/************************************************************************/
-/* Provides the Hypervisor PCI calls for iSeries Linux Parition.        */
-/* Copyright (C) 20yy  <Wayne G Holm> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, Jan 9, 2001                                               */
-/************************************************************************/
-//============================================================================
-//							 Header File Id
-// Name______________:	HvCallPci.H
-//
-// Description_______:
-//
-//	This file contains the "hypervisor call" interface which is used to
-//	drive the hypervisor from SLIC.
-//
-//============================================================================
-
-//-------------------------------------------------------------------
-// Forward declarations 
-//-------------------------------------------------------------------
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef  _HVCALLSC_H
-#include "HvCallSc.h"
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/as400/HvTypes.h>
-#endif
-
-//-------------------------------------------------------------------
-// Other Includes
-//-------------------------------------------------------------------
-
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-#ifndef _HVCALLPCI_H
-#define _HVCALLPCI_H
-
-struct HvCallPci_DsaAddr { // make sure this struct size is 64-bits total
-    u16		busNumber;
-    u8		subBusNumber; 
-    u8		deviceId;     
-    u8		barNumber;
-    u8		reserved[3];
-};
-
-struct HvCallPci_LoadReturn {
-    u64		rc;
-    u64		value;
-};
-
-enum HvCallPci_DeviceType {HvCallPci_NodeDevice	= 1,
-                        HvCallPci_SpDevice	= 2,	
-                        HvCallPci_IopDevice     = 3,	
-                        HvCallPci_BridgeDevice	= 4,	
-                        HvCallPci_MultiFunctionDevice = 5,	
-                        HvCallPci_IoaDevice	= 6	
-};
-
-
-struct HvCallPci_DeviceInfo {
-	u32	deviceType;		// See DeviceType enum for values
-};
-    
-struct HvCallPci_BusUnitInfo {
-	u32	sizeReturned;		// length of data returned
-	u32	deviceType;		// see DeviceType enum for values
-};
-
-struct HvCallPci_BridgeInfo {
-    struct HvCallPci_BusUnitInfo busUnitInfo;  // Generic bus unit info
-    u8		subBusNumber;		// Bus number of secondary bus
-    u8		maxAgents;		// Max idsels on secondary bus
-};
-    
-
-//  Maximum BusUnitInfo buffer size.  Provided for clients so they can allocate
-//  a buffer big enough for any type of bus unit.  Increase as needed.
-enum {HvCallPci_MaxBusUnitInfoSize = 128};
-
-struct HvCallPci_BarParms {
-    u64		vaddr;
-    u64		raddr;
-    u64		size;
-    u64		protectStart;
-    u64		protectEnd;
-    u64		relocationOffset;
-    u64		pciAddress;		
-    u64		reserved[3];
-};					
-
-enum HvCallPci_VpdType {
-    HvCallPci_BusVpd		= 1,
-    HvCallPci_BusAdapterVpd	= 2
-};
-
-#define HvCallPciConfigLoad8		HvCallPci + 0
-#define HvCallPciConfigLoad16		HvCallPci + 1
-#define HvCallPciConfigLoad32		HvCallPci + 2
-#define HvCallPciConfigStore8		HvCallPci + 3
-#define HvCallPciConfigStore16		HvCallPci + 4
-#define HvCallPciConfigStore32		HvCallPci + 5
-#define HvCallPciEoi			HvCallPci + 16
-#define HvCallPciGetBarParms		HvCallPci + 18
-#define HvCallPciMaskFisr		HvCallPci + 20
-#define HvCallPciUnmaskFisr		HvCallPci + 21
-#define HvCallPciSetSlotReset		HvCallPci + 25
-#define HvCallPciGetDeviceInfo		HvCallPci + 27
-#define HvCallPciGetCardVpd		HvCallPci + 28
-#define HvCallPciBarLoad8		HvCallPci + 40
-#define HvCallPciBarLoad16		HvCallPci + 41
-#define HvCallPciBarLoad32		HvCallPci + 42
-#define HvCallPciBarLoad64		HvCallPci + 43
-#define HvCallPciBarStore8		HvCallPci + 44
-#define HvCallPciBarStore16		HvCallPci + 45
-#define HvCallPciBarStore32		HvCallPci + 46
-#define HvCallPciBarStore64		HvCallPci + 47
-#define HvCallPciMaskInterrupts		HvCallPci + 48
-#define HvCallPciUnmaskInterrupts	HvCallPci + 49
-#define HvCallPciGetBusUnitInfo		HvCallPci + 50
-
-//============================================================================
-static inline u64	HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber,
-					      u8 deviceId, u32 offset,
-					      u8 *value)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumber;
-    dsa.subBusNumber = subBusNumber;
-    dsa.deviceId = deviceId;
-
-    HvCall3Ret16(HvCallPciConfigLoad8, &retVal, *(u64 *)&dsa, offset, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    *value = retVal.value;
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber,
-					      u8 deviceId, u32 offset,
-					      u16 *value)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumber;
-    dsa.subBusNumber = subBusNumber;
-    dsa.deviceId = deviceId;
-
-    HvCall3Ret16(HvCallPciConfigLoad16, &retVal, *(u64 *)&dsa, offset, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    *value = retVal.value;
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber,
-					      u8 deviceId, u32 offset,
-					      u32 *value)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumber;
-    dsa.subBusNumber = subBusNumber;
-    dsa.deviceId = deviceId;
-
-    HvCall3Ret16(HvCallPciConfigLoad32, &retVal, *(u64 *)&dsa, offset, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    *value = retVal.value;
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_configStore8(u16 busNumber, u8 subBusNumber,
-					      u8 deviceId, u32 offset,
-					      u8  value)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumber;
-    dsa.subBusNumber = subBusNumber;
-    dsa.deviceId = deviceId;
-
-    retVal = HvCall4(HvCallPciConfigStore8, *(u64 *)&dsa, offset, value, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_configStore16(u16 busNumber, u8 subBusNumber,
-					      u8 deviceId, u32 offset,
-					      u16  value)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumber;
-    dsa.subBusNumber = subBusNumber;
-    dsa.deviceId = deviceId;
-
-    retVal = HvCall4(HvCallPciConfigStore16, *(u64 *)&dsa, offset, value, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_configStore32(u16 busNumber, u8 subBusNumber,
-					      u8 deviceId, u32 offset,
-					      u32  value)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumber;
-    dsa.subBusNumber = subBusNumber;
-    dsa.deviceId = deviceId;
-
-    retVal = HvCall4(HvCallPciConfigStore32, *(u64 *)&dsa, offset, value, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_barLoad8(u16	busNumberParm,
-					   u8		subBusParm,
-					   u8		deviceIdParm,
-					   u8		barNumberParm,
-					   u64		offsetParm,
-					   u8*		valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    HvCall3Ret16(HvCallPciBarLoad8, &retVal, *(u64 *)&dsa, offsetParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    *valueParm = retVal.value;
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_barLoad16(u16	busNumberParm,
-					   u8		subBusParm,
-					   u8		deviceIdParm,
-					   u8		barNumberParm,
-					   u64		offsetParm,
-					   u16*		valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    HvCall3Ret16(HvCallPciBarLoad16, &retVal, *(u64 *)&dsa, offsetParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    *valueParm = retVal.value;
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_barLoad32(u16	busNumberParm,
-					   u8		subBusParm,
-					   u8		deviceIdParm,
-					   u8		barNumberParm,
-					   u64		offsetParm,
-					   u32*		valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    HvCall3Ret16(HvCallPciBarLoad32, &retVal, *(u64 *)&dsa, offsetParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    *valueParm = retVal.value;
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_barLoad64(u16	busNumberParm,
-					   u8		subBusParm,
-					   u8		deviceIdParm,
-					   u8		barNumberParm,
-					   u64		offsetParm,
-					   u64*		valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;				
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    HvCall3Ret16(HvCallPciBarLoad64, &retVal, *(u64 *)&dsa, offsetParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    *valueParm = retVal.value;
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_barStore8(u16	busNumberParm,
-					    u8		subBusParm,
-					    u8		deviceIdParm,
-					    u8		barNumberParm,
-					    u64		offsetParm,
-					    u8		valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;
-				
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    retVal = HvCall4(HvCallPciBarStore8, *(u64 *)&dsa, offsetParm, valueParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_barStore16(u16	busNumberParm,
-					     u8		subBusParm,
-					     u8		deviceIdParm,
-					     u8		barNumberParm,
-					     u64	offsetParm,
-					     u16	valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;
-				
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    retVal = HvCall4(HvCallPciBarStore16, *(u64 *)&dsa, offsetParm, valueParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_barStore32(u16	busNumberParm,
-					     u8		subBusParm,
-					     u8		deviceIdParm,
-					     u8		barNumberParm,
-					     u64	offsetParm,
-					     u32	valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;
-				
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    retVal = HvCall4(HvCallPciBarStore32, *(u64 *)&dsa, offsetParm, valueParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_barStore64(u16	busNumberParm,
-					     u8		subBusParm,
-					     u8		deviceIdParm,
-					     u8		barNumberParm,
-					     u64	offsetParm,
-					     u64	valueParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;
-				
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    retVal = HvCall4(HvCallPciBarStore64, *(u64 *)&dsa, offsetParm, valueParm, 0);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_eoi(u16	busNumberParm,
-				      u8	subBusParm,  
-				      u8	deviceIdParm)
-{
-    struct HvCallPci_DsaAddr dsa;
-    struct HvCallPci_LoadReturn retVal;
-
-    *((u64*)&dsa) = 0;
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-
-    HvCall1Ret16(HvCallPciEoi, &retVal, *(u64*)&dsa);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal.rc;
-}
-//============================================================================
-static inline u64	HvCallPci_getBarParms(u16	busNumberParm,
-					      u8	subBusParm,  
-					      u8	deviceIdParm,
-					      u8	barNumberParm,
-					      u64	parms,
-					      u32	sizeofParms)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-    dsa.barNumber = barNumberParm;
-
-    retVal = HvCall3(HvCallPciGetBarParms, *(u64*)&dsa, parms, sizeofParms);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_maskFisr(u16	busNumberParm,
-					   u8	subBusParm,  
-					   u8	deviceIdParm,
-					   u64	fisrMask)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;		
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-
-    retVal = HvCall2(HvCallPciMaskFisr, *(u64*)&dsa, fisrMask);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_unmaskFisr(u16	busNumberParm,
-					     u8		subBusParm,  
-					     u8		deviceIdParm,
-					     u64	fisrMask)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;		
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-
-    retVal = HvCall2(HvCallPciUnmaskFisr, *(u64*)&dsa, fisrMask);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_setSlotReset(u16		busNumberParm,
-					       u8		subBusParm,
-					       u8		deviceIdParm,
-					       u64		onNotOff)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-
-    retVal = HvCall2(HvCallPciSetSlotReset, *(u64*)&dsa, onNotOff);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_getDeviceInfo(u16	busNumberParm,
-						u8	subBusParm,  
-						u8	deviceNumberParm,
-						u64     parms,
-						u32	sizeofParms)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceNumberParm << 4;
-
-    retVal = HvCall3(HvCallPciGetDeviceInfo, *(u64*)&dsa, parms, sizeofParms);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_maskInterrupts(u16	busNumberParm,
-						 u8	subBusParm,  
-						 u8	deviceIdParm,
-						 u64	interruptMask)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;		
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-
-    retVal = HvCall2(HvCallPciMaskInterrupts, *(u64*)&dsa, interruptMask);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-static inline u64	HvCallPci_unmaskInterrupts(u16	busNumberParm,
-						 u8		subBusParm,  
-						 u8		deviceIdParm,
-						 u64		interruptMask)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;		
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-
-    retVal = HvCall2(HvCallPciUnmaskInterrupts, *(u64*)&dsa, interruptMask);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-
-static inline u64	HvCallPci_getBusUnitInfo(u16		busNumberParm,
-						 u8		subBusParm,  
-						 u8		deviceIdParm,
-						 u64            parms,
-						 u32		sizeofParms)
-{
-    struct HvCallPci_DsaAddr dsa;
-    u64 retVal;
-
-    *((u64*)&dsa) = 0;		
-
-    dsa.busNumber = busNumberParm;
-    dsa.subBusNumber = subBusParm;
-    dsa.deviceId = deviceIdParm;
-
-    retVal = HvCall3(HvCallPciGetBusUnitInfo, *(u64*)&dsa, parms, sizeofParms);
-
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-
-    return retVal;
-}
-//============================================================================
-
-static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm, u16 sizeParm) {
-    int xRetSize;
-    u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusVpd);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    if (xRc == -1)
-	xRetSize = -1;
-    else
-	xRetSize = xRc & 0xFFFF;
-    return xRetSize;
-}
-//============================================================================
-
-static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, u16 sizeParm) {
-    int xRetSize;
-    u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusAdapterVpd);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    if (xRc == -1)
-	xRetSize = -1;
-    else
-	xRetSize = xRc & 0xFFFF;
-    return xRetSize;
-}
-//============================================================================
-#endif // _HVCALLPCI_H
diff -Nru a/include/asm-ppc/iSeries/HvCallSc.h b/include/asm-ppc/iSeries/HvCallSc.h
--- a/include/asm-ppc/iSeries/HvCallSc.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,53 +0,0 @@
-/*
- * HvCallSc.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-#ifndef _HVCALLSC_H
-#define _HVCALLSC_H
-
-#define HvCallBase		0x80000000
-#define HvCallCfg		0x80020000
-#define HvCallEvent		0x80030000
-#define HvCallHpt		0x80040000
-#define HvCallPci		0x80050000
-#define HvCallSm		0x80070000
-#define HvCallXm		0x80090000
-
-u64 HvCall0( u32 );
-u64 HvCall1( u32, u64 );
-u64 HvCall2( u32, u64, u64 );
-u64 HvCall3( u32, u64, u64, u64 );
-u64 HvCall4( u32, u64, u64, u64, u64 );
-u64 HvCall5( u32, u64, u64, u64, u64, u64 );
-u64 HvCall6( u32, u64, u64, u64, u64, u64, u64 );
-u64 HvCall7( u32, u64, u64, u64, u64, u64, u64, u64 );
-
-u64 HvCall0Ret16( u32, void * );
-u64 HvCall1Ret16( u32, void *, u64 );
-u64 HvCall2Ret16( u32, void *, u64, u64 );
-u64 HvCall3Ret16( u32, void *, u64, u64, u64 );
-u64 HvCall4Ret16( u32, void *, u64, u64, u64, u64 );
-u64 HvCall5Ret16( u32, void *, u64, u64, u64, u64, u64 );
-u64 HvCall6Ret16( u32, void *, u64, u64, u64, u64, u64, u64 );
-u64 HvCall7Ret16( u32, void *, u64, u64 ,u64 ,u64 ,u64 ,u64 ,u64 );
-
-#endif /* _HVCALLSC_H */
diff -Nru a/include/asm-ppc/iSeries/HvCallSm.h b/include/asm-ppc/iSeries/HvCallSm.h
--- a/include/asm-ppc/iSeries/HvCallSm.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,58 +0,0 @@
-/*
- * HvCallSm.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//============================================================================
-//
-//	This file contains the "hypervisor call" interface which is used to
-//	drive the hypervisor from the OS.
-//
-//============================================================================
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef  _HVCALLSC_H
-#include "HvCallSc.h"
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-#ifndef _HVCALLSM_H
-#define _HVCALLSM_H
-
-#define HvCallSmGet64BitsOfAccessMap	HvCallSm  + 11
-
-
-//============================================================================
-static inline u64		HvCallSm_get64BitsOfAccessMap(
-					HvLpIndex lpIndex, u64 indexIntoBitMap )
-{
-    u64 retval = HvCall2(HvCallSmGet64BitsOfAccessMap, lpIndex,
-		    				       indexIntoBitMap );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retval;
-}
-//============================================================================
-#endif // _HVCALLSM_H
-
diff -Nru a/include/asm-ppc/iSeries/HvCallXm.h b/include/asm-ppc/iSeries/HvCallXm.h
--- a/include/asm-ppc/iSeries/HvCallXm.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,105 +0,0 @@
-//============================================================================
-//							 Header File Id
-// Name______________:	HvCallXm.H
-//
-// Description_______:
-//
-//	This file contains the "hypervisor call" interface which is used to
-//	drive the hypervisor from SLIC.
-//
-//============================================================================
-
-//-------------------------------------------------------------------
-// Forward declarations 
-//-------------------------------------------------------------------
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef  _HVCALLSC_H
-#include "HvCallSc.h"
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-//-------------------------------------------------------------------
-// Other Includes
-//-------------------------------------------------------------------
-
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-#ifndef _HVCALLXM_H
-#define _HVCALLXM_H
-
-#define HvCallXmGetTceTableParms	HvCallXm +  0
-#define HvCallXmTestBus			HvCallXm +  1
-#define HvCallXmConnectBusUnit		HvCallXm +  2
-#define HvCallXmLoadTod			HvCallXm +  8
-#define HvCallXmTestBusUnit		HvCallXm +  9
-#define HvCallXmSetTce			HvCallXm + 11
-#define HvCallXmSetTces			HvCallXm + 13
-
-
-
-//============================================================================
-static inline void		HvCallXm_getTceTableParms(u64 cb)
-{
-    HvCall1(HvCallXmGetTceTableParms, cb);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-}
-//============================================================================
-static inline u64		HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
-{	
-    u64 retval = HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retval;
-}
-//============================================================================
-static inline u64		HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
-{	
-    u64 retval = HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
-		    tce1, tce2, tce3, tce4 );
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retval;
-}
-//=============================================================================
-static inline u64	HvCallXm_testBus(u16 busNumber)
-{
-    u64 retVal = HvCall1(HvCallXmTestBus, busNumber);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//=====================================================================================
-static inline u64	HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId) {
-    u64 busUnitNumber = (subBusNumber << 8) | deviceId;
-    u64 retVal = HvCall2(HvCallXmTestBusUnit, busNumber, busUnitNumber);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//=====================================================================================
-static inline u64	HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId,
-						u64 interruptToken)
-{
-    u64 busUnitNumber = (subBusNumber << 8) | deviceId;
-    u64 queueIndex = 0; // HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard));  
-
-    u64 retVal = HvCall5(HvCallXmConnectBusUnit, busNumber, busUnitNumber,
-			 interruptToken, 0, queueIndex);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//=====================================================================================
-static inline u64	HvCallXm_loadTod(void)
-{
-    u64 retVal = HvCall0(HvCallXmLoadTod);
-    // getPaca()->adjustHmtForNoOfSpinLocksHeld();
-    return retVal;
-}
-//=====================================================================================
-
-#endif // _HVCALLXM_H
-
diff -Nru a/include/asm-ppc/iSeries/HvLpConfig.h b/include/asm-ppc/iSeries/HvLpConfig.h
--- a/include/asm-ppc/iSeries/HvLpConfig.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,292 +0,0 @@
-/*
- * HvLpConfig.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//===========================================================================
-//
-//      This file contains the interface to the LPAR configuration data
-//  to determine which resources should be allocated to each partition.
-//
-//===========================================================================
-
-#ifndef  _HVCALLCFG_H
-#include "HvCallCfg.h"
-#endif
-
-#ifndef  _HVTYPES_H
-#include <asm/iSeries/HvTypes.h>
-#endif
-
-#ifndef  _ITLPNACA_H
-#include <asm/iSeries/ItLpNaca.h>
-#endif
-
-#ifndef  _LPARDATA_H
-#include <asm/iSeries/LparData.h>
-#endif
-
-#ifndef _HVLPCONFIG_H
-#define _HVLPCONFIG_H
-
-//-------------------------------------------------------------------
-// Constants
-//-------------------------------------------------------------------
-
-extern HvLpIndex HvLpConfig_getLpIndex_outline(void);
-
-//===================================================================
-static inline HvLpIndex	HvLpConfig_getLpIndex(void)
-{
-    return itLpNaca.xLpIndex;
-}
-//===================================================================
-static inline HvLpIndex	HvLpConfig_getPrimaryLpIndex(void)
-{
-    return itLpNaca.xPrimaryLpIndex;
-}
-//=================================================================
-static inline HvLpIndex	HvLpConfig_getLps(void)
-{
-    return HvCallCfg_getLps();
-}
-//=================================================================
-static inline HvLpIndexMap	HvLpConfig_getActiveLpMap(void)
-{
-    return HvCallCfg_getActiveLpMap();
-}
-//=================================================================
-static inline u64		HvLpConfig_getSystemMsMegs(void)
-{
-    return HvCallCfg_getSystemMsChunks() / HvChunksPerMeg;
-}
-//=================================================================
-static inline u64		HvLpConfig_getSystemMsChunks(void)
-{
-    return HvCallCfg_getSystemMsChunks();
-}
-//=================================================================
-static inline u64		HvLpConfig_getSystemMsPages(void)
-{
-    return HvCallCfg_getSystemMsChunks() * HvPagesPerChunk;
-}
-//================================================================
-static inline u64		HvLpConfig_getMsMegs(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur) / HvChunksPerMeg;
-}
-//================================================================
-static inline u64		HvLpConfig_getMsChunks(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur);
-}
-//================================================================
-static inline u64		HvLpConfig_getMsPages(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur) * HvPagesPerChunk;
-}
-//================================================================
-static inline u64		HvLpConfig_getMinMsMegs(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min) / HvChunksPerMeg;
-}
-//================================================================
-static inline u64		HvLpConfig_getMinMsChunks(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min);
-}
-//================================================================
-static inline u64		HvLpConfig_getMinMsPages(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min) * HvPagesPerChunk;
-}
-//================================================================
-static inline u64		HvLpConfig_getMinRuntimeMsMegs(void)
-{
-    return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) / HvChunksPerMeg;
-}
-//===============================================================
-static inline u64		HvLpConfig_getMinRuntimeMsChunks(void)
-{
-    return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex());
-}
-//===============================================================
-static inline u64		HvLpConfig_getMinRuntimeMsPages(void)
-{
-    return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) * HvPagesPerChunk;
-}
-//===============================================================
-static inline u64		HvLpConfig_getMaxMsMegs(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max) / HvChunksPerMeg;
-}
-//===============================================================
-static inline u64		HvLpConfig_getMaxMsChunks(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max);
-}
-//===============================================================
-static inline u64		HvLpConfig_getMaxMsPages(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max) * HvPagesPerChunk;
-}
-//===============================================================
-static inline u64		HvLpConfig_getInitMsMegs(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init) / HvChunksPerMeg;
-}
-//===============================================================
-static inline u64		HvLpConfig_getInitMsChunks(void)
-{
-    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init);
-}
-//===============================================================
-static inline u64		HvLpConfig_getInitMsPages(void)
-{    return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init) * HvPagesPerChunk;
-}
-//===============================================================
-static inline u64		HvLpConfig_getSystemPhysicalProcessors(void)
-{
-    return HvCallCfg_getSystemPhysicalProcessors();
-}
-//===============================================================
-static inline u64		HvLpConfig_getSystemLogicalProcessors(void)
-{
-    return HvCallCfg_getSystemPhysicalProcessors() * (/*getPaca()->getSecondaryThreadCount() +*/ 1);
-}
-//===============================================================
-static inline u64		HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
-{
-    return HvCallCfg_getNumProcsInSharedPool(sPI);
-}
-//===============================================================
-static inline u64		HvLpConfig_getPhysicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Cur);
-}
-//===============================================================
-static inline u64		HvLpConfig_getLogicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Cur) * (/*getPaca()->getSecondaryThreadCount() +*/ 1);
-}
-//===============================================================
-static inline HvLpSharedPoolIndex	HvLpConfig_getSharedPoolIndex(void)
-{
-    return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex());
-}
-//===============================================================
-static inline u64		HvLpConfig_getSharedProcUnits(void)
-{
-    return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Cur);
-}
-//===============================================================
-static inline u64		HvLpConfig_getMinSharedProcUnits(void)
-{
-    return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Min);
-}
-//===============================================================
-static inline u64		HvLpConfig_getMaxSharedProcUnits(void)
-{
-    return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Max);
-}
-//===============================================================
-static inline u64		HvLpConfig_getMinPhysicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Min);
-}
-//===============================================================
-static inline u64		HvLpConfig_getMinLogicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Min) * (/*getPaca()->getSecondaryThreadCount() +*/ 1);
-}
-//===============================================================
-static inline u64		HvLpConfig_getMaxPhysicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Max);
-}
-//===============================================================
-static inline u64		HvLpConfig_getMaxLogicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Max) * (/*getPaca()->getSecondaryThreadCount() +*/ 1);
-}
-//===============================================================
-static inline u64		HvLpConfig_getInitPhysicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Init);
-}
-//===============================================================
-static inline u64		HvLpConfig_getInitLogicalProcessors(void)
-{
-    return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Init) * (/*getPaca()->getSecondaryThreadCount() +*/ 1);
-}
-//================================================================
-static inline HvLpVirtualLanIndexMap	HvLpConfig_getVirtualLanIndexMap(void)
-{
-    return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline());
-}
-//===============================================================
-static inline HvLpVirtualLanIndexMap	HvLpConfig_getVirtualLanIndexMapForLp(HvLpIndex lp)
-{
-    return HvCallCfg_getVirtualLanIndexMap(lp);
-}
-//================================================================
-static inline HvLpIndex	HvLpConfig_getBusOwner(HvBusNumber busNumber)
-{
-    return HvCallCfg_getBusOwner(busNumber);
-}
-//===============================================================
-static inline int		HvLpConfig_isBusDedicated(HvBusNumber busNumber)
-{
-    return HvCallCfg_isBusDedicated(busNumber);
-}
-//================================================================
-static inline HvLpIndexMap	HvLpConfig_getBusAllocation(HvBusNumber busNumber)
-{
-    return HvCallCfg_getBusAllocation(busNumber);
-}
-//================================================================
-// returns the absolute real address of the load area
-static inline u64		HvLpConfig_getLoadAddress(void)
-{
-    return itLpNaca.xLoadAreaAddr & 0x7fffffffffffffff;
-}
-//================================================================
-static inline u64		HvLpConfig_getLoadPages(void)
-{
-    return itLpNaca.xLoadAreaChunks * HvPagesPerChunk;
-}
-//================================================================
-static inline int		HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber)
-{
-    HvLpIndex busOwner = HvLpConfig_getBusOwner(busNumber);
-    return (busOwner == HvLpConfig_getLpIndex());
-}
-//================================================================
-static inline int         HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, HvLpIndex lp2)
-{
-    HvLpVirtualLanIndexMap virtualLanIndexMap1 = HvCallCfg_getVirtualLanIndexMap( lp1 );
-    HvLpVirtualLanIndexMap virtualLanIndexMap2 = HvCallCfg_getVirtualLanIndexMap( lp2 );
-    return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0);
-}
-//================================================================
-static inline HvLpIndex		HvLpConfig_getHostingLpIndex(HvLpIndex lp)
-{
-    return HvCallCfg_getHostingLpIndex(lp);
-}
-//================================================================
-
-#endif // _HVLPCONFIG_H
diff -Nru a/include/asm-ppc/iSeries/HvLpEvent.h b/include/asm-ppc/iSeries/HvLpEvent.h
--- a/include/asm-ppc/iSeries/HvLpEvent.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,144 +0,0 @@
-/*
- * HvLpEvent.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//======================================================================
-//
-//	This file contains the class for HV events in the system.
-//
-//=====================================================================
-#ifndef _HVLPEVENT_H
-#define _HVLPEVENT_H
-
-#include <asm/types.h>
-#include <asm/ptrace.h>
-#include <asm/iSeries/HvTypes.h>
-#ifndef _HVCALLEVENT_H
-#include <asm/iSeries/HvCallEvent.h>
-#endif
-
-
-//=====================================================================
-//
-// HvLpEvent is the structure for Lp Event messages passed between
-// partitions through PLIC. 
-//
-//=====================================================================
-
-struct HvEventFlags
-{
-  u8	xValid:1;		// Indicates a valid request	x00-x00
-  u8	xRsvd1:4;		// Reserved			...
-  u8	xAckType:1;		// Immediate or deferred	...
-  u8	xAckInd:1;		// Indicates if ACK required	...
-  u8	xFunction:1;		// Interrupt or Acknowledge	...
-};
-
-
-struct HvLpEvent
-{
-  struct HvEventFlags xFlags;	// Event flags			x00-x00
-  u8	xType;			// Type of message		x01-x01
-  u16	xSubtype;		// Subtype for event		x02-x03
-  u8	xSourceLp;		// Source LP			x04-x04
-  u8	xTargetLp;		// Target LP			x05-x05
-  u8	xSizeMinus1;		// Size of Derived class - 1	x06-x06
-  u8	xRc;			// RC for Ack flows		x07-x07
-  u16	xSourceInstanceId;	// Source sides instance id	x08-x09
-  u16	xTargetInstanceId;	// Target sides instance id	x0A-x0B
-  union {
-	u32	xSubtypeData;	// Data usable by the subtype	x0C-x0F
-	u16	xSubtypeDataShort[2];	// Data as 2 shorts
-	u8	xSubtypeDataChar[4];	// Data as 4 chars
-  } x;
-
-  u64	xCorrelationToken;	// Unique value for source/type x10-x17
-};
-
-// Lp Event handler function
-typedef void (*LpEventHandler)(struct HvLpEvent *, struct pt_regs *);
-
-// Register a handler for an event type
-//  returns 0 on success
-extern int HvLpEvent_registerHandler( HvLpEvent_Type eventType, LpEventHandler hdlr);
-
-// Unregister a handler for an event type
-//  returns 0 on success
-//  Unregister will fail if there are any paths open for the type
-extern int HvLpEvent_unregisterHandler( HvLpEvent_Type eventType );
-
-// Open an Lp Event Path for an event type
-//  returns 0 on success
-//  openPath will fail if there is no handler registered for the event type.
-//  The lpIndex specified is the partition index for the target partition
-//  (for VirtualIo, VirtualLan and SessionMgr) other types specify zero) 
-extern int HvLpEvent_openPath( HvLpEvent_Type eventType, HvLpIndex lpIndex );
-
-
-// Close an Lp Event Path for a type and partition
-//  returns 0 on sucess
-extern int HvLpEvent_closePath( HvLpEvent_Type eventType, HvLpIndex lpIndex );
-
-#define HvLpEvent_Type_Hypervisor 0
-#define HvLpEvent_Type_MachineFac 1
-#define HvLpEvent_Type_SessionMgr 2
-#define HvLpEvent_Type_SpdIo      3
-#define HvLpEvent_Type_VirtualBus 4
-#define HvLpEvent_Type_PciIo      5
-#define HvLpEvent_Type_RioIo      6
-#define HvLpEvent_Type_VirtualLan 7
-#define HvLpEvent_Type_VirtualIo  8
-#define HvLpEvent_Type_NumTypes   9
-
-#define HvLpEvent_Rc_Good 0
-#define HvLpEvent_Rc_BufferNotAvailable 1
-#define HvLpEvent_Rc_Cancelled 2
-#define HvLpEvent_Rc_GenericError 3
-#define HvLpEvent_Rc_InvalidAddress 4
-#define HvLpEvent_Rc_InvalidPartition 5
-#define HvLpEvent_Rc_InvalidSize 6
-#define HvLpEvent_Rc_InvalidSubtype 7
-#define HvLpEvent_Rc_InvalidSubtypeData 8
-#define HvLpEvent_Rc_InvalidType 9
-#define HvLpEvent_Rc_PartitionDead 10
-#define HvLpEvent_Rc_PathClosed 11
-#define HvLpEvent_Rc_SubtypeError 12
-
-#define HvLpEvent_Function_Ack 0
-#define HvLpEvent_Function_Int 1
-
-#define HvLpEvent_AckInd_NoAck 0
-#define HvLpEvent_AckInd_DoAck 1
-
-#define HvLpEvent_AckType_ImmediateAck 0
-#define HvLpEvent_AckType_DeferredAck 1
-
-#define HvLpDma_Direction_LocalToRemote 0
-#define HvLpDma_Direction_RemoteToLocal 1
-
-#define HvLpDma_AddressType_TceIndex 0
-#define HvLpDma_AddressType_RealAddress 1
-
-#define HvLpDma_Rc_Good 0
-#define HvLpDma_Rc_Error 1
-#define HvLpDma_Rc_PartitionDead 2
-#define HvLpDma_Rc_PathClosed 3
-#define HvLpDma_Rc_InvalidAddress 4
-#define HvLpDma_Rc_InvalidLength 5
-
-#endif // _HVLPEVENT_H
diff -Nru a/include/asm-ppc/iSeries/HvReleaseData.h b/include/asm-ppc/iSeries/HvReleaseData.h
--- a/include/asm-ppc/iSeries/HvReleaseData.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,71 +0,0 @@
-/*
- * HvReleaseData.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//=============================================================================
-//
-//   This control block contains the critical information about the 
-//   release so that it can be changed in the future (ie, the virtual 
-//   address of the OS's NACA).
-//
-//-----------------------------------------------------------------------------
-// Standard Includes
-//-----------------------------------------------------------------------------
-#ifndef	_PPC_TYPES_H
-#include	<asm/types.h>
-#endif
-
-#ifndef _HVRELEASEDATA_H
-#define _HVRELEASEDATA_H
-
-//=============================================================================
-//
-//	When we IPL a secondary partition, we will check if if the 
-//	secondary xMinPlicVrmIndex > the primary xVrmIndex.  
-//	If it is then this tells PLIC that this secondary is not 
-//	supported running on this "old" of a level of PLIC.
-//
-//	Likewise, we will compare the primary xMinSlicVrmIndex to 
-//	the secondary xVrmIndex. 
-//	If the primary xMinSlicVrmDelta > secondary xVrmDelta then we 
-//	know that this PLIC does not support running an OS "that old".
-//
-//=============================================================================
-
-struct	HvReleaseData
-{
-    u32		xDesc;			// Descriptor	"HvRD" ebcdic	x00-x03
-    u16		xSize;			// Size of this control block	x04-x05
-    u16		xVpdAreasPtrOffset;	// Offset in NACA of ItVpdAreas	x06-x07
-    u32		xSlicNacaAddr64;	// Virtual address of OS's NACA x08-x0F
-    struct Naca * xSlicNacaAddr;	// Virtual address of OS's NACA x08-x0F
-    u32		xMsNucDataOffset;	// Offset of Linux Mapping Data x10-x13
-    u32		xRsvd1;			// Reserved			x14-x17
-    u16		xTagsMode:1;		// 0 == tags active, 1 == tags inactive
-    u16		xAddressSize:1;		// 0 == 64-bit, 1 == 32-bit
-    u16		xNoSharedProcs:1;	// 0 == shared procs, 1 == no shared
-    u16		xNoHMT:1;		// 0 == allow HMT, 1 == no HMT
-    u16		xRsvd2:12;		// Reserved			x18-x19
-    u16		xVrmIndex;		// VRM Index of OS image	x1A-x1B
-    u16		xMinSupportedPlicVrmIndex;// Min PLIC level  (soft)	x1C-x1D
-    u16		xMinCompatablePlicVrmIndex;// Min PLIC levelP (hard)	x1E-x1F
-    char	xVrmName[12];		// Displayable name  		x20-x2B
-    char	xRsvd3[20];		// Reserved			x2C-x3F
-};
-
-#endif // _HVRELEASEDATA_H
diff -Nru a/include/asm-ppc/iSeries/HvTypes.h b/include/asm-ppc/iSeries/HvTypes.h
--- a/include/asm-ppc/iSeries/HvTypes.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,161 +0,0 @@
-/*
- * HvTypes.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//===========================================================================
-//                                                             Header File Id
-// Name______________:  HvTypes.H
-//
-// Description_______:
-//
-//	General typedefs for the hypervisor.
-//
-// Declared Class(es):
-//
-//===========================================================================
-
-#ifndef _PPC_TYPES_H
-#include        <asm/types.h>
-#endif
-
-
-#ifndef _HVTYPES_H
-#define _HVTYPES_H
-
-//-------------------------------------------------------------------
-// Typedefs
-//-------------------------------------------------------------------
-typedef u8	HvLpIndex;
-typedef u16	HvLpInstanceId;
-typedef u64     HvLpTOD;
-typedef u64     HvLpSystemSerialNum;
-typedef u8      HvLpDeviceSerialNum[12];
-typedef u16     HvLpSanHwSet;
-typedef u16     HvLpBus;
-typedef u16     HvLpBoard;
-typedef u16     HvLpCard;
-typedef u8      HvLpDeviceType[4];
-typedef u8      HvLpDeviceModel[3];
-typedef u64     HvIoToken;
-typedef u8      HvLpName[8];
-typedef u32	HvIoId;
-typedef u64	HvRealMemoryIndex;
-typedef u32     HvLpIndexMap;		// Must hold HvMaxArchitectedLps bits!!!
-typedef u16	HvLpVrmIndex;
-typedef u32	HvXmGenerationId;
-typedef u8	HvLpBusPool;			
-typedef u8	HvLpSharedPoolIndex;		
-typedef u16	HvLpSharedProcUnitsX100;
-typedef u8	HvLpVirtualLanIndex;
-typedef u16	HvLpVirtualLanIndexMap;	// Must hold HvMaxArchitectedVirtualLans bits!!!
-typedef u16	HvBusNumber;		// Hypervisor Bus Number
-typedef u8	HvSubBusNumber;		// Hypervisor SubBus Number
-typedef u8	HvAgentId;		// Hypervisor DevFn
-
-
-#define HVMAXARCHITECTEDLPS 32
-#define HVCHUNKSIZE 256 * 1024
-#define HVPAGESIZE 4 * 1024
-#define HVLPMINMEGSPRIMARY 256
-#define HVLPMINMEGSSECONDARY 64
-#define HVCHUNKSPERMEG 4
-#define HVPAGESPERMEG 256
-#define HVPAGESPERCHUNK 64
- 
-
-static const HvLpIndexMap HvLpIndexMapDefault = (1 << (sizeof(HvLpIndexMap) * 8 - 1));
-static const HvLpIndex	HvHardcodedPrimaryLpIndex = 0;
-static const HvLpIndex HvMaxArchitectedLps = HVMAXARCHITECTEDLPS;
-static const HvLpVirtualLanIndex HvMaxArchitectedVirtualLans = 16;
-static const HvLpSharedPoolIndex HvMaxArchitectedSharedPools = 16;
-static const HvLpSharedPoolIndex HvMaxSupportedSharedPools = 1;
-static const HvLpIndex HvMaxRuntimeLpsPreCondor = 12;
-static const HvLpIndex HvMaxRuntimeLps = HVMAXARCHITECTEDLPS;
-static const HvLpIndex HvLpIndexInvalid = 0xff;
-static const u16	HvInvalidProcIndex = 0xffff;
-static const u32       HvVirtualFlashSize = 0x200;
-static const u32	HvMaxBusesPreCondor = 32; 
-static const u32	HvMaxBusesCondor = 256;	 
-static const u32	HvMaxArchitectedBuses = 512;
-static const HvLpBus	HvCspBusNumber = 1;
-static const u32	HvMaxSanHwSets = 16;
-static const HvLpCard	HvMaxSystemIops = 200;
-static const HvLpCard	HvMaxBusIops = 20;
-static const u16	HvMaxUnitsPerIop = 100;
-static const u64	HvPageSize = 4 * 1024;
-static const u64	HvChunkSize = HVCHUNKSIZE;
-static const u64	HvChunksPerMeg = HVCHUNKSPERMEG;
-static const u64	HvPagesPerChunk = HVPAGESPERCHUNK;
-static const u64	HvPagesPerMeg = HVPAGESPERMEG;
-static const u64       HvLpMinMegsPrimary = HVLPMINMEGSPRIMARY;
-static const u64       HvLpMinMegsSecondary = HVLPMINMEGSSECONDARY;
-static const u64       HvLpMinChunksPrimary = HVLPMINMEGSPRIMARY * HVCHUNKSPERMEG;
-static const u64       HvLpMinChunksSecondary = HVLPMINMEGSSECONDARY * HVCHUNKSPERMEG;
-static const u64       HvLpMinPagesPrimary = HVLPMINMEGSPRIMARY * HVPAGESPERMEG;
-static const u64       HvLpMinPagesSecondary = HVLPMINMEGSSECONDARY * HVPAGESPERMEG;
-static const u8        HvLpMinProcs = 1;
-static const u8	HvLpConfigMinInteract = 1;
-static const u16	HvLpMinSharedProcUnitsX100 = 10;
-static const u16	HvLpMaxSharedProcUnitsX100 = 100;
-static const HvLpSharedPoolIndex HvLpSharedPoolIndexInvalid = 0xff;
-
-
-//--------------------------------------------------------------------
-// Enums for the sub-components under PLIC
-// Used in HvCall  and HvPrimaryCall
-//--------------------------------------------------------------------
-enum   HvCallCompIds
-{
-    HvCallCompId = 0,
-    HvCallCpuCtlsCompId = 1,
-    HvCallCfgCompId = 2,
-    HvCallEventCompId = 3,
-    HvCallHptCompId = 4,
-    HvCallPciCompId = 5,
-    HvCallSlmCompId = 6,
-    HvCallSmCompId = 7,
-    HvCallSpdCompId = 8,
-    HvCallXmCompId = 9,
-    HvCallRioCompId = 10, 
-    HvCallRsvd3CompId = 11,
-    HvCallRsvd2CompId = 12,
-    HvCallRsvd1CompId = 13,
-    HvCallMaxCompId = 14,
-    HvPrimaryCallCompId = 0,    
-    HvPrimaryCallCfgCompId = 1,
-    HvPrimaryCallPciCompId = 2,    
-    HvPrimaryCallSmCompId = 3,
-    HvPrimaryCallSpdCompId = 4,
-    HvPrimaryCallXmCompId = 5,
-    HvPrimaryCallRioCompId = 6, 
-    HvPrimaryCallRsvd7CompId = 7,
-    HvPrimaryCallRsvd6CompId = 8,
-    HvPrimaryCallRsvd5CompId = 9,
-    HvPrimaryCallRsvd4CompId = 10,
-    HvPrimaryCallRsvd3CompId = 11,
-    HvPrimaryCallRsvd2CompId = 12,
-    HvPrimaryCallRsvd1CompId = 13,
-    HvPrimaryCallMaxCompId = HvCallMaxCompId     
-};
-
-struct HvLpBufferList {
-  u64 addr;
-  u64 len;
-};
-
-#endif // _HVTYPES_H
diff -Nru a/include/asm-ppc/iSeries/IoHriMainStore.h b/include/asm-ppc/iSeries/IoHriMainStore.h
--- a/include/asm-ppc/iSeries/IoHriMainStore.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,65 +0,0 @@
-/*
- * IoHriMainStore.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-#ifndef _IOHRIMAINSTORE_H
-#define _IOHRIMAINSTORE_H
-
-struct IoHriMainStoreSegment4 {    
-  u8	msArea0Exists:1;
-  u8	msArea1Exists:1;
-  u8	msArea2Exists:1;
-  u8	msArea3Exists:1;
-  u8	reserved1:4;
-  u8	reserved2;
-
-  u8	msArea0Functional:1;
-  u8	msArea1Functional:1;
-  u8	msArea2Functional:1;
-  u8	msArea3Functional:1;
-  u8	reserved3:4;
-  u8	reserved4;
-
-  u32	totalMainStore;
-
-  u64	msArea0Ptr;
-  u64	msArea1Ptr;
-  u64	msArea2Ptr;
-  u64	msArea3Ptr;
-
-  u32	cardProductionLevel;
-
-  u32	msAdrHole;
-
-  u8	msArea0HasRiserVpd:1;
-  u8	msArea1HasRiserVpd:1;
-  u8	msArea2HasRiserVpd:1;
-  u8	msArea3HasRiserVpd:1;
-  u8	reserved5:4;	
-  u8	reserved6;
-  u16	reserved7;
-
-  u8	reserved8[28];
-
-  u64	nonInterleavedBlocksStartAdr;
-  u64	nonInterleavedBlocksEndAdr;
-};
-
-
-#endif // _IOHRIMAINSTORE_H
-
diff -Nru a/include/asm-ppc/iSeries/IoHriProcessorVpd.h b/include/asm-ppc/iSeries/IoHriProcessorVpd.h
--- a/include/asm-ppc/iSeries/IoHriProcessorVpd.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,90 +0,0 @@
-/*
- * IoHriProcessorVpd.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//===================================================================
-//
-//	This struct maps Processor Vpd that is DMAd to SLIC by CSP 
-//
-
-#ifndef	_TYPES_H
-#include <asm/types.h>
-#endif
-
-#ifndef _IOHRIPROCESSORVPD_H
-#define _IOHRIPROCESSORVPD_H
-
-struct IoHriProcessorVpd
-{
-
-    u8	xFormat;		// VPD format indicator		x00-x00
-    u8	xProcStatus:8;		// Processor State		x01-x01
-    u8	xSecondaryThreadCount;	// Secondary thread cnt		x02-x02
-    u8	xSrcType:1;		// Src Type			x03-x03
-    u8	xSrcSoft:1;		// Src stay soft		...
-    u8	xSrcParable:1;		// Src parable			...
-    u8	xRsvd1:5;		// Reserved			...
-    u16	xHvPhysicalProcIndex;	// Hypervisor physical proc index04-x05
-    u16	xRsvd2;			// Reserved			x06-x07
-    u32	xHwNodeId;		// Hardware node id		x08-x0B
-    u32	xHwProcId;		// Hardware processor id	x0C-x0F
-	
-    u32	xTypeNum;		// Card Type/CCIN number	x10-x13
-    u32	xModelNum;		// Model/Feature number		x14-x17
-    u64	xSerialNum;		// Serial number		x18-x1F
-    char xPartNum[12];		// Book Part or FPU number	x20-x2B
-    char xMfgID[4];		// Manufacturing ID		x2C-x2F
-
-    u32	xProcFreq;		// Processor Frequency		x30-x33
-    u32	xTimeBaseFreq;		// Time Base Frequency		x34-x37
-
-    u32	xChipEcLevel;		// Chip EC Levels		x38-x3B
-    u32	xProcIdReg;		// PIR SPR value		x3C-x3F
-    u32	xPVR;			// PVR value			x40-x43
-    u8	xRsvd3[12];		// Reserved			x44-x4F
-
-    u32	xInstCacheSize;		// Instruction cache size in KB	x50-x53
-    u32	xInstBlockSize;		// Instruction cache block size	x54-x57
-    u32	xDataCacheOperandSize;	// Data cache operand size	x58-x5B
-    u32	xInstCacheOperandSize;	// Inst cache operand size	x5C-x5F
-
-    u32	xDataL1CacheSizeKB;	// L1 data cache size in KB	x60-x63
-    u32	xDataL1CacheLineSize;	// L1 data cache block size	x64-x67
-    u64	xRsvd4;			// Reserved			x68-x6F
-
-    u32	xDataL2CacheSizeKB;	// L2 data cache size in KB	x70-x73
-    u32	xDataL2CacheLineSize;	// L2 data cache block size	x74-x77
-    u64	xRsvd5;			// Reserved			x78-x7F
-
-    u32	xDataL3CacheSizeKB;	// L3 data cache size in KB	x80-x83
-    u32	xDataL3CacheLineSize;	// L3 data cache block size	x84-x87
-    u64	xRsvd6;			// Reserved			x88-x8F
-   
-    u64	xFruLabel;		// Card Location Label		x90-x97
-    u8	xSlotsOnCard;		// Slots on card (0=no slots)	x98-x98
-    u8	xPartLocFlag;		// Location flag (0-pluggable 1-imbedded) x99-x99
-    u16	xSlotMapIndex;		// Index in slot map table	x9A-x9B
-    u8	xSmartCardPortNo;	// Smart card port number	x9C-x9C
-    u8	xRsvd7;			// Reserved			x9D-x9D
-    u16	xFrameIdAndRackUnit;	// Frame ID and rack unit adr	x9E-x9F
-    
-    u8	xRsvd8[24];		// Reserved			xA0-xB7
-
-    char xProcSrc[72];		// CSP format SRC		xB8-xFF
-};
-#endif // _IOHRIPROCESSORVPD_H
diff -Nru a/include/asm-ppc/iSeries/ItIplParmsReal.h b/include/asm-ppc/iSeries/ItIplParmsReal.h
--- a/include/asm-ppc/iSeries/ItIplParmsReal.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,78 +0,0 @@
-/*
- * ItIplParmsReal.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//==============================================================================
-//
-//	This struct maps the IPL Parameters DMA'd from the SP.                  
-//
-// Warning:
-//	This data must map in exactly 64 bytes and match the architecture for
-//	the IPL parms
-//
-//=============================================================================
-
-
-//-------------------------------------------------------------------
-// Standard Includes
-//-------------------------------------------------------------------
-#ifndef	_PPC_TYPES_H
-#include	<asm/types.h>
-#endif
-
-#ifndef _ITIPLPARMSREAL_H
-#define _ITIPLPARMSREAL_H
-
-struct ItIplParmsReal
-{
-    u8	xFormat;		// Defines format of IplParms		x00-x00
-    u8	xRsvd01:6;		// Reserved				x01-x01
-    u8	xAlternateSearch:1;	// Alternate search indicator		...
-    u8	xUaSupplied:1;		// UA Supplied on programmed IPL	...
-    u8	xLsUaFormat;		// Format byte for UA			x02-x02
-    u8	xRsvd02;		// Reserved				x03-x03
-    u32	xLsUa;			// LS UA				x04-x07
-    u32	xUnusedLsLid;		// First OS LID to load			x08-x0B
-    u16	xLsBusNumber;		// LS Bus Number			x0C-x0D
-    u8	xLsCardAdr;		// LS Card Address			x0E-x0E
-    u8	xLsBoardAdr;		// LS Board Address			x0F-x0F
-    u32	xRsvd03;		// Reserved				x10-x13
-    u8	xSpcnPresent:1;		// SPCN present				x14-x14
-    u8	xCpmPresent:1;		// CPM present				...
-    u8	xRsvd04:6;		// Reserved				...
-    u8	xRsvd05:4;		// Reserved				x15-x15
-    u8	xKeyLock:4;		// Keylock setting			...
-    u8	xRsvd06:6;		// Reserved				x16-x16
-    u8	xIplMode:2;		// Ipl mode (A|B|C|D)			...
-    u8	xHwIplType;		// Fast v slow v slow EC HW IPL		x17-x17
-    u16	xCpmEnabledIpl:1;	// CPM in effect when IPL initiated	x18-x19
-    u16	xPowerOnResetIpl:1;	// Indicate POR condition		...
-    u16	xMainStorePreserved:1;	// Main Storage is preserved		...
-    u16	xRsvd07:13;		// Reserved				...
-    u16	xIplSource:16;		// Ipl source				x1A-x1B
-    u8	xIplReason:8;		// Reason for this IPL			x1C-x1C
-    u8	xRsvd08;		// Reserved				x1D-x1D
-    u16	xRsvd09;		// Reserved				x1E-x1F
-    u16	xSysBoxType;		// System Box Type			x20-x21
-    u16	xSysProcType;		// System Processor Type		x22-x23
-    u32	xRsvd10;		// Reserved				x24-x27
-    u64	xRsvd11;		// Reserved				x28-x2F
-    u64	xRsvd12;		// Reserved				x30-x37
-    u64	xRsvd13;		// Reserved				x38-x3F
-};
-#endif // _ITIPLPARMSREAL_H
diff -Nru a/include/asm-ppc/iSeries/ItLpNaca.h b/include/asm-ppc/iSeries/ItLpNaca.h
--- a/include/asm-ppc/iSeries/ItLpNaca.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,87 +0,0 @@
-/*
- * ItLpNaca.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//=============================================================================
-//
-//	This control block contains the data that is shared between the
-//	hypervisor (PLIC) and the OS.
-//
-//=============================================================================
-
-
-#ifndef _ITLPNACA_H
-#define _ITLPNACA_H
-
-struct ItLpNaca
-{
-//=============================================================================
-// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
-//=============================================================================
-    u32		xDesc;			// Eye catcher			x00-x03
-    u16		xSize;			// Size of this class		x04-x05
-    u16		xIntHdlrOffset;		// Offset to IntHdlr array	x06-x07
-    u8		xMaxIntHdlrEntries;	// Number of entries in array	x08-x08
-    u8		xPrimaryLpIndex;	// LP Index of Primary		x09-x09
-    u8		xServiceLpIndex;	// LP Ind of Service Focal Pointx0A-x0A
-    u8		xLpIndex;		// LP Index			x0B-x0B
-    u16		xMaxLpQueues;		// Number of allocated queues	x0C-x0D
-    u16		xLpQueueOffset;		// Offset to start of LP queues	x0E-x0F
-    u8		xPirEnvironMode:8;	// Piranha or hardware		x10-x10
-    u8		xPirConsoleMode:8;	// Piranha console indicator	x11-x11
-    u8		xPirDasdMode:8;		// Piranha dasd indicator	x12-x12
-    u8		xRsvd1_0[5];		// Reserved for Piranha related	x13-x17
-    u8		xLparInstalled:1;	// Is LPAR installed on system	x18-x1F
-    u8		xSysPartitioned:1;	// Is the system partitioned	...
-    u8		xHwSyncedTBs:1;		// Hardware synced TBs		...
-    u8		xIntProcUtilHmt:1;	// Utilize HMT for interrupts	...
-    u8		xRsvd1_1:4;		// Reserved			...
-    u8		xSpVpdFormat:8;		// VPD areas are in CSP format	...
-    u8		xIntProcRatio:8;	// Ratio of int procs to procs	...
-    u8		xRsvd1_2[5];		// Reserved			...
-    u16		xRsvd1_3;		// Reserved			x20-x21
-    u16		xPlicVrmIndex;		// VRM index of PLIC		x22-x23
-    u16		xMinSupportedSlicVrmInd;// Min supported OS VRM index	x24-x25
-    u16		xMinCompatableSlicVrmInd;// Min compatable OS VRM index x26-x27
-    u64		xLoadAreaAddr;		// ER address of load area	x28-x2F
-    u32		xLoadAreaChunks;	// Chunks for the load area	x30-x33
-    u32         xRsvd1_4;     		//                              x34-x37
-    u8		xRsvd1_5[72];		//         			x38-x7F 
-   
-//=============================================================================
-// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
-//=============================================================================
-    u8		xRsvd2_0[128];		// Reserved			x00-x7F
-
-//=============================================================================
-// CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators
-// NB: Padding required to keep xInterrruptHdlr at x300 which is required 
-// for v4r4 PLIC.
-//=============================================================================
-    u8		xOldLpQueue[128];	// LP Queue needed for v4r4	100-17F
-    u8		xRsvd3_0[384];		// Reserved			180-2FF
-//=============================================================================
-// CACHE_LINE_7-8 0x0300 - 0x03FF Contains the address of the OS interrupt
-//  handlers
-//=============================================================================
-    u64         xInterruptHdlr[32];     // Interrupt handlers		300-x3FF
-};
-
-//=============================================================================
-
-#endif // _ITLPNACA_H
diff -Nru a/include/asm-ppc/iSeries/ItLpPaca.h b/include/asm-ppc/iSeries/ItLpPaca.h
--- a/include/asm-ppc/iSeries/ItLpPaca.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,122 +0,0 @@
-/*
- * ItLpPaca.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//=============================================================================
-//                                   
-//	This control block contains the data that is shared between the 
-//	hypervisor (PLIC) and the OS.
-//    
-//
-//----------------------------------------------------------------------------
-#ifndef  _PPC_TYPES_H
-#include <asm/types.h>
-#endif
-
-#ifndef _ITLPPACA_H
-#define _ITLPPACA_H
-
-
-struct ItLpPaca
-{
-//=============================================================================
-// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
-// NOTE: The xDynXyz fields are fields that will be dynamically changed by 
-// PLIC when preparing to bring a processor online or when dispatching a 
-// virtual processor!
-//=============================================================================
-    u32		xDesc;			// Eye catcher 0xD397D781	x00-x03
-    u16		xSize;			// Size of this struct		x04-x05
-    u16		xRsvd1_0;		// Reserved			x06-x07
-    u16		xRsvd1_1:14;		// Reserved			x08-x09
-    u8		xSharedProc:1;		// Shared processor indicator	...
-    u8		xSecondaryThread:1;	// Secondary thread indicator	...
-    volatile u8 xDynProcStatus:8;	// Dynamic Status of this proc	x0A-x0A
-    u8		xSecondaryThreadCnt;	// Secondary thread count	x0B-x0B
-    volatile u16 xDynHvPhysicalProcIndex;// Dynamic HV Physical Proc Index0C-x0D
-    volatile u16 xDynHvLogicalProcIndex;// Dynamic HV Logical Proc Indexx0E-x0F
-    u32         xDecrVal;   		// Value for Decr programming 	x10-x13
-    u32         xPMCVal;       		// Value for PMC regs         	x14-x17
-    volatile u32 xDynHwNodeId;		// Dynamic Hardware Node id	x18-x1B
-    volatile u32 xDynHwProcId;		// Dynamic Hardware Proc Id	x1C-x1F
-    volatile u32 xDynPIR;		// Dynamic ProcIdReg value	x20-x23
-    u32         xDseiData;           	// DSEI data                  	x24-x27
-    u64         xSPRG3;               	// SPRG3 value                	x28-x2F
-    u8		xRsvd1_3[80];		// Reserved			x30-x7F
-   
-//=============================================================================
-// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
-//=============================================================================
-    // This Dword contains a byte for each type of interrupt that can occur.  
-    // The IPI is a count while the others are just a binary 1 or 0.
-
-    u16 xRsvd;				// Reserved - cleared by #mpasmbl
-    u8	xXirrInt;			// Indicates xXirrValue is valid or Immed IO
-    u8  xIpiCnt;			// IPI Count
-    u8  xDecrInt;			// DECR interrupt occurred
-    u8  xPdcInt;			// PDC interrupt occurred
-    u8  xQuantumInt;			// Interrupt quantum reached
-    u8  xOldPlicDeferredExtInt;		// Old PLIC has deferred XIRR pending
-
-    u64	xPlicDeferIntsArea;
-
-    // Used to pass the real SRR0/1 from PLIC to the OS as well as to 
-    // pass the target SRR0/1 from the OS to PLIC on a SetAsrAndRfid.
-    u64     xSavedSrr0;             	// Saved SRR0                   x10-x17
-    u64     xSavedSrr1;             	// Saved SRR1                   x18-x1F
-
-    // Used to pass parms from the OS to PLIC for SetAsrAndRfid
-    u64     xSavedGpr3;             	// Saved GPR3                   x20-x27
-    u64     xSavedGpr4;             	// Saved GPR4                   x28-x2F
-    u64     xSavedGpr5;             	// Saved GPR5                   x30-x37
-
-    u8	    xRsvd2_1;			// Reserved			x38-x38
-    u8      xCpuCtlsTaskAttributes; 	// Task attributes for cpuctls  x39-x39
-    u8      xFPRegsInUse;           	// FP regs in use               x3A-x3A
-    u8      xPMCRegsInUse;          	// PMC regs in use              x3B-x3B
-    volatile u32  xSavedDecr;           // Saved Decr Value             x3C-x3F
-    volatile u64  xEmulatedTimeBase;    // Emulated TB for this thread  x40-x47
-    volatile u64  xCurPLICLatency;      // Unaccounted PLIC latency     x48-x4F
-    u64     xTotPLICLatency;        	// Accumulated PLIC latency     x50-x57   
-    u64     xWaitStateCycles;       	// Wait cycles for this proc    x58-x5F
-    u64     xEndOfQuantum;          	// TB at end of quantum         x60-x67
-    u64     xPDCSavedSPRG1;         	// Saved SPRG1 for PMC int      x68-x6F
-    u64     xPDCSavedSRR0;          	// Saved SRR0 for PMC int       x70-x77
-    volatile u32 xVirtualDecr;		// Virtual DECR for shared procsx78-x7B
-    u32	    xRsvd2_2;			// Reserved			x7C-x7F
-
-//=============================================================================
-// CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors
-//=============================================================================
-    // This is the xYieldCount.  An "odd" value (low bit on) means that 
-    // the processor is yielded (either because of an OS yield or a PLIC 
-    // preempt).  An even value implies that the processor is currently 
-    // executing.
-    // NOTE: This value will ALWAYS be zero for dedicated processors and 
-    // will NEVER be zero for shared processors (ie, initialized to a 1).
-    volatile u32 xYieldCount;		// PLIC increments each dispatchx00-x03
-    u8	    xRsvd3_0[124];          	// Reserved                     x04-x7F         
-
-//=============================================================================
-// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data
-//=============================================================================
-    u8      xPmcSaveArea[256];      	// PMC interrupt Area           x00-xFF
-
-
-};
-#endif // _ITLPPACA_H
diff -Nru a/include/asm-ppc/iSeries/ItLpQueue.h b/include/asm-ppc/iSeries/ItLpQueue.h
--- a/include/asm-ppc/iSeries/ItLpQueue.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,94 +0,0 @@
-/*
- * ItLpQueue.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//=============================================================================
-//
-//	This control block defines the simple LP queue structure that is 
-//	shared between the hypervisor (PLIC) and the OS in order to send 
-//	events to an LP.  
-//    
-
-#ifndef _PPC_TYPES_H
-#include <asm/types.h>
-#endif
-#include <asm/ptrace.h>
-
-
-struct HvLpEvent;
-
-
-#ifndef _ITLPQUEUE_H
-#define _ITLPQUEUE_H
-
-#define ITMaxLpQueues 8
-
-#define NotUsed		0	// Queue will not be used by PLIC
-#define DedicatedIo	1	// Queue dedicated to IO processor specified
-#define DedicatedLp	2	// Queue dedicated to LP specified
-#define Shared		3	// Queue shared for both IO and LP
-
-#define LpEventStackSize 4096
-#define LpEventMaxSize   256
-#define LpEventAlign	 64
-
-struct ItLpQueue
-{
-//
-//  The xSlicCurEventPtr is the pointer to the next event stack entry that will
-//  become valid.  The OS must peek at this entry to determine if it is valid.
-//  PLIC will set the valid indicator as the very last store into that entry.
-//
-//  When the OS has completed processing of the event then it will mark the event
-//  as invalid so that PLIC knows it can store into that event location again.
-//
-// If the event stack fills and there are overflow events, then PLIC will set 
-// the xPlicOverflowIntPending flag in which case the OS will have to fetch the 
-// additional LP events once they have drained the event stack.
-//
-// The first 16-bytes are known by both the OS and PLIC.  The remainder of the
-// cache line is for use by the OS.
-//
-//=============================================================================
-  u8	xPlicOverflowIntPending;	// 0x00 Overflow events are pending
-  u8    xPlicStatus;                    // 0x01 DedicatedIo or DedicatedLp or NotUsed
-  u16   xSlicLogicalProcIndex;          // 0x02 Logical Proc Index for correlation
-  u8    xPlicRsvd[12];                  // 0x04
-  u32	xHSlicCurEventPtr;              // 0x10 High 32 bits of ptr
-  char* xSlicCurEventPtr;               // 0x14 Low  32 bits of ptr
-  u32   xHSlicLastValidEventPtr;	// 0x18 High 32 bits of ptr
-  char* xSlicLastValidEventPtr;         // 0x1C Low  32 bits of ptr
-  u32   xHSlicEventStackPtr;            // 0x20 High 32 bits of ptr
-  char* xSlicEventStackPtr;             // 0x24 Low  32 bits of ptr
-  u8	xIndex;				// 0x28 unique sequential index.
-  u8	xSlicRsvd[3];			// 0x29-2B 
-  u32	xInUseWord;			// 0x2C
-  u64   xLpIntCount;                    // 0x30 Total Lp Int msgs processed
-  u64	xLpIntCountByType[9];		// 0x38-0x7F Event counts by type
-};
-
-extern struct ItLpQueue xItLpQueue;
-
-extern struct HvLpEvent * ItLpQueue_getNextLpEvent( struct ItLpQueue * );
-extern int ItLpQueue_isLpIntPending( struct ItLpQueue * ); 
-extern unsigned ItLpQueue_process( struct ItLpQueue *, struct pt_regs * );
-extern void ItLpQueue_clearValid( struct HvLpEvent * );
-
-
-//=============================================================================
-#endif // _ITLPQUEUE_H
diff -Nru a/include/asm-ppc/iSeries/ItLpRegSave.h b/include/asm-ppc/iSeries/ItLpRegSave.h
--- a/include/asm-ppc/iSeries/ItLpRegSave.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,87 +0,0 @@
-/*
- * ItLpRegSave.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//=====================================================================================
-//
-//	This control block contains the data that is shared between PLIC
-//	and the OS
-//    
-//
-
-#ifndef _ITLPREGSAVE_H
-#define _ITLPREGSAVE_H
-
-struct ItLpRegSave
-{
-    u32		xDesc;		// Eye catcher  "LpRS" ebcdic	000-003
-    u16		xSize;		// Size of this class		004-005
-    u8          xInUse;         // Area is live                 006-007
-    u8		xRsvd1[9]; 	// Reserved			007-00F
-
-    u8      	xFixedRegSave[352]; // Fixed Register Save Area 010-16F 
-    u32		xCTRL;		// Control Register		170-173
-    u32		xDEC;		// Decrementer			174-177    
-    u32		xFPSCR;		// FP Status and Control Reg	178-17B
-    u32		xPVR;		// Processor Version Number	17C-17F
-    
-    u64		xMMCR0;		// Monitor Mode Control Reg 0	180-187
-    u32		xPMC1;		// Perf Monitor Counter 1	188-18B
-    u32		xPMC2;		// Perf Monitor Counter 2	18C-18F
-    u32		xPMC3;		// Perf Monitor Counter 3	190-193
-    u32		xPMC4;		// Perf Monitor Counter 4	194-197
-    u32		xPIR;		// Processor ID Reg		198-19B
-    
-    u32		xMMCR1;		// Monitor Mode Control Reg 1	19C-19F
-    u32		xMMCRA;		// Monitor Mode Control Reg A	1A0-1A3
-    u32		xPMC5;		// Perf Monitor Counter 5	1A4-1A7
-    u32		xPMC6;		// Perf Monitor Counter 6	1A8-1AB
-    u32		xPMC7;		// Perf Monitor Counter 7	1AC-1AF
-    u32		xPMC8;		// Perf Monitor Counter 8	1B0-1B3
-    u32		xTSC;		// Thread Switch Control	1B4-1B7
-    u32		xTST;		// Thread Switch Timeout	1B8-1BB
-    u32         xRsvd;          // Reserved                     1BC-1BF
-
-    u64		xACCR;		// Address Compare Control Reg	1C0-1C7
-    u64		xIMR;		// Instruction Match Register	1C8-1CF    
-    u64		xSDR1;		// Storage Description Reg 1	1D0-1D7    
-    u64		xSPRG0;		// Special Purpose Reg General0	1D8-1DF
-    u64		xSPRG1;		// Special Purpose Reg General1	1E0-1E7
-    u64		xSPRG2;		// Special Purpose Reg General2	1E8-1EF
-    u64		xSPRG3;		// Special Purpose Reg General3	1F0-1F7
-    u64		xTB;		// Time Base Register		1F8-1FF
-   
-    u64		xFPR[32];	// Floating Point Registers	200-2FF
-
-    u64		xMSR;		// Machine State Register  	300-307
-    u64		xNIA;		// Next Instruction Address	308-30F
-
-    u64		xDABR;		// Data Address Breakpoint Reg	310-317
-    u64		xIABR;		// Inst Address Breakpoint Reg	318-31F
-
-    u64		xHID0;		// HW Implementation Dependent0	320-327
-
-    u64		xHID4;		// HW Implementation Dependent4	328-32F
-    u64		xSCOMd;		// SCON Data Reg (SPRG4)       	330-337
-    u64		xSCOMc;		// SCON Command Reg (SPRG5)    	338-33F
-    u64		xSDAR;		// Sample Data Address Register	340-347
-    u64		xSIAR;		// Sample Inst Address Register	348-34F
-
-    u8		xRsvd3[176];	// Reserved			350-3FF
-};
-#endif // _ITLPREGSAVE_H
diff -Nru a/include/asm-ppc/iSeries/ItSpCommArea.h b/include/asm-ppc/iSeries/ItSpCommArea.h
--- a/include/asm-ppc/iSeries/ItSpCommArea.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,39 +0,0 @@
-/*
- * ItSpCommArea.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-
-#ifndef _ITSPCOMMAREA_H
-#define _ITSPCOMMAREA_H
-
-
-struct SpCommArea
-{
-    u32	xDesc;			// Descriptor (only in new formats)	000-003
-    u8	xFormat;		// Format (only in new formats)		004-004
-    u8	xRsvd1[11];		// Reserved				005-00F
-    u64	xRawTbAtIplStart;	// Raw HW TB value when IPL is started	010-017
-    u64	xRawTodAtIplStart;	// Raw HW TOD value when IPL is started	018-01F
-    u64	xBcdTimeAtIplStart;	// BCD time when IPL is started		020-027
-    u64	xBcdTimeAtOsStart;	// BCD time when OS passed control	028-02F
-    u8	xRsvd2[80];		// Reserved				030-07F
-};
-
-extern struct SpCommArea xSpCommArea;
-
-#endif /* _ITSPCOMMAREA_H */
diff -Nru a/include/asm-ppc/iSeries/ItVpdAreas.h b/include/asm-ppc/iSeries/ItVpdAreas.h
--- a/include/asm-ppc/iSeries/ItVpdAreas.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,100 +0,0 @@
-/*
- * ItVpdAreas.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-//=====================================================================================
-//
-//      This file defines the address and length of all of the VPD area passed to
-//	the OS from PLIC (most of which start from the SP).
-//
-
-#ifndef _PPC_TYPES_H
-#include        <asm/types.h>
-#endif
-
-
-#ifndef _ITVPDAREAS_H
-#define _ITVPDAREAS_H
-
-// VPD Entry index is carved in stone - cannot be changed (easily).
-#define ItVpdCecVpd				   0
-#define ItVpdDynamicSpace			   1
-#define ItVpdExtVpd				   2
-#define ItVpdExtVpdOnPanel			   3
-#define ItVpdFirstPaca				   4
-#define ItVpdIoVpd				   5
-#define ItVpdIplParms				   6
-#define ItVpdMsVpd				   7
-#define ItVpdPanelVpd				   8
-#define ItVpdLpNaca				   9
-#define ItVpdBackplaneAndMaybeClockCardVpd        10 
-#define ItVpdRecoveryLogBuffer		          11
-#define ItVpdSpCommArea				  12
-#define ItVpdSpLogBuffer			  13
-#define ItVpdSpLogBufferSave			  14
-#define ItVpdSpCardVpd				  15
-#define ItVpdFirstProcVpd			  16	
-#define ItVpdApModelVpd				  17
-#define ItVpdClockCardVpd			  18
-#define ItVpdBusExtCardVpd			  19
-#define ItVpdProcCapacityVpd			  20
-#define ItVpdInteractiveCapacityVpd		  21
-#define ItVpdFirstSlotLabel			  22
-#define ItVpdFirstLpQueue			  23
-#define ItVpdFirstL3CacheVpd			  24	
-#define ItVpdFirstProcFruVpd			  25
-
-#define ItVpdMaxEntries				  26
-
-
-#define ItDmaMaxEntries				  10
-
-#define ItVpdAreasMaxSlotLabels		 192 
-
-
-struct SlicVpdAdrs {
-	u32	pad1;
-	void *  vpdAddr;
-};
-
-
-struct	ItVpdAreas
-{
-    u32	xSlicDesc;		// Descriptor				000-003
-    u16	xSlicSize;		// Size of this control block		004-005
-    u16	xPlicAdjustVpdLens:1; // Flag to indicate new interface 	006-007
-    u16	xRsvd1:15;		// Reserved bits			...
-    u16	xSlicVpdEntries;	// Number of VPD entries		008-009
-    u16	xSlicDmaEntries;	// Number of DMA entries		00A-00B
-    u16	xSlicMaxLogicalProcs;	// Maximum logical processors		00C-00D
-    u16	xSlicMaxPhysicalProcs;	// Maximum physical processors		00E-00F
-    u16	xSlicDmaToksOffset;	// Offset into this of array		010-011
-    u16	xSlicVpdAdrsOffset;	// Offset into this of array		012-013
-    u16	xSlicDmaLensOffset;	// Offset into this of array		014-015
-    u16	xSlicVpdLensOffset;	// Offset into this of array		016-017
-    u16	xSlicMaxSlotLabels;	// Maximum number of slot labels	018-019
-    u16	xSlicMaxLpQueues;	// Maximum number of LP Queues		01A-01B
-    u8	xRsvd2[4];		// Reserved				01C-01F
-    u64	xRsvd3[12];		// Reserved				020-07F
-    u32	xPlicDmaLens[ItDmaMaxEntries];// Array of DMA lengths		080-0A7
-    u32	xPlicDmaToks[ItDmaMaxEntries];// Array of DMA tokens		0A8-0CF
-    u32	xSlicVpdLens[ItVpdMaxEntries];// Array of VPD lengths		0D0-12F
-    struct SlicVpdAdrs xSlicVpdAdrs[ItVpdMaxEntries];// Array of VPD buffers 130-1EF
-};
-
-#endif // _ITVPDAREAS_H
diff -Nru a/include/asm-ppc/iSeries/LparData.h b/include/asm-ppc/iSeries/LparData.h
--- a/include/asm-ppc/iSeries/LparData.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,75 +0,0 @@
-/*
- * LparData.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-#ifndef	_PPC_TYPES_H
-#include	<asm/types.h>
-#endif
-
-#ifndef _LPARDATA_H
-#define _LPARDATA_H
-
-#include <asm/page.h>
-
-extern u32    msChunks[];
-
-#define phys_to_absolute( x ) (((u64)msChunks[((x)>>18)])<<18)+((u64)((x)&0x3ffff))
-
-#define physRpn_to_absRpn( x ) (((u64)msChunks[((x)>>6)])<<6)+((u64)((x)&0x3f))
-
-#define virt_to_absolute( x ) (((u64)msChunks[(((x)-KERNELBASE)>>18)])<<18)+((u64)((x)&0x3ffff))
-
-extern u64 virt_to_absolute_outline(u32 address);
-
-
-#include <asm/iSeries/Naca.h>
-#include <asm/iSeries/ItLpNaca.h>
-#include <asm/iSeries/ItLpPaca.h>
-#include <asm/iSeries/ItLpRegSave.h>
-#include <asm/iSeries/Paca.h>
-#include <asm/iSeries/HvReleaseData.h>
-#include <asm/iSeries/LparMap.h>
-#include <asm/iSeries/ItVpdAreas.h>
-#include <asm/iSeries/ItIplParmsReal.h>
-#include <asm/iSeries/ItLpQueue.h>
-#include <asm/iSeries/IoHriProcessorVpd.h>
-#include <asm/page.h>
-
-extern struct LparMap	xLparMap;
-extern struct Naca	xNaca;
-extern struct Paca	xPaca[];
-extern struct HvReleaseData hvReleaseData;
-extern struct ItLpNaca	itLpNaca;
-extern struct ItIplParmsReal xItIplParmsReal;
-extern struct IoHriProcessorVpd xIoHriProcessorVpd[];
-extern struct ItLpQueue xItLpQueue;
-extern struct ItVpdAreas itVpdAreas;
-extern u64    xMsVpd[];
-extern u32    msChunks[];
-extern u32    totalLpChunks;
-extern unsigned maxPacas;
-
-/*
-#define phys_to_absolute( x ) (((u64)msChunks[((x)>>18)])<<18)+((u64)((x)&0x3ffff))
-
-#define physRpn_to_absRpn( x ) (((u64)msChunks[((x)>>6)])<<6)+((u64)((x)&0x3f))
-
-#define virt_to_absolute( x ) (((u64)msChunks[(((x)-KERNELBASE)>>18)])<<18)+((u64)((x)&0x3ffff))
-*/
-
-#endif /* _LPAR_DATA_H */
diff -Nru a/include/asm-ppc/iSeries/LparMap.h b/include/asm-ppc/iSeries/LparMap.h
--- a/include/asm-ppc/iSeries/LparMap.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,76 +0,0 @@
-/*
- * LparMap.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-#ifndef	_PPC_TYPES_H
-#include	<asm/types.h>
-#endif
-
-#ifndef _LPARMAP_H
-#define _LPARMAP_H
-
-/* The iSeries hypervisor will set up mapping for one or more 
- * ESID/VSID pairs (in SLB/segment registers) and will set up
- * mappings of one or more ranges of pages to VAs.
- * We will have the hypervisor set up the ESID->VSID mapping
- * for the four kernel segments (C-F).  With shared processors,
- * the hypervisor will clear all segment registers and reload
- * these four whenever the processor is switched from one 
- * partition to another.
- */
-
-/* The Vsid and Esid identified below will be used by the hypervisor
- * to set up a memory mapping for part of the load area before giving
- * control to the Linux kernel.  The load area is 64 MB, but this must
- * not attempt to map the whole load area.  The Hashed Page Table may
- * need to be located within the load area (if the total partition size
- * is 64 MB), but cannot be mapped.  Typically, this should specify
- * to map half (32 MB) of the load area.
- * 
- * The hypervisor will set up page table entries for the number of 
- * pages specified.
- *
- * In 32-bit mode, the hypervisor will load all four of the
- * segment registers (identified by the low-order four bits of the 
- * Esid field.  In 64-bit mode, the hypervisor will load one SLB
- * entry to map the Esid to the Vsid.
-*/
-
-// Hypervisor initially maps 32MB of the load area 
-#define HvPagesToMap 8192
-
-struct LparMap
-{
-   u64	  xNumberEsids;		// Number of ESID/VSID pairs (4)
-   u64	  xNumberRanges;	// Number of VA ranges to map (1)
-   u64	  xSegmentTableOffs;	// Page number within load area of seg table (0)
-   u64	  xRsvd[5];		// Reserved (0)
-   u64	  xKernelEsidC;  	// Esid used to map kernel load (0x0C)	
-   u64	  xKernelVsidC;		// Vsid used to map kernel load (0x0C)
-   u64	  xKernelEsidD;  	// Esid used to map kernel load (0x0D)	
-   u64	  xKernelVsidD;		// Vsid used to map kernel load (0x0D)
-   u64	  xKernelEsidE;  	// Esid used to map kernel load (0x0E)	
-   u64	  xKernelVsidE;		// Vsid used to map kernel load (0x0E)
-   u64	  xKernelEsidF;  	// Esid used to map kernel load (0x0F)	
-   u64	  xKernelVsidF;		// Vsid used to map kernel load (0x0F)
-   u64	  xPages;		// Number of pages to be mapped	(8192)
-   u64	  xOffset;		// Offset from start of load area (0)
-   u64	  xVPN;			// Virtual Page Number (0x00000000000C0000)
-};
-
-#endif /* _LPARMAP_H */
diff -Nru a/include/asm-ppc/iSeries/Naca.h b/include/asm-ppc/iSeries/Naca.h
--- a/include/asm-ppc/iSeries/Naca.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,38 +0,0 @@
-/*
- * Naca.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-#ifndef	_PPC_TYPES_H
-#include	<asm/types.h>
-#endif
-
-#ifndef _NACA_H
-#define _NACA_H
-
-
-struct Naca
-{
-   u32	  xItVpdAreas64;		// Address of ItVpdAreas	
-   void * xItVpdAreas;
-   u32	  xRamDisk64;			// Address of initial Ramdisk
-   u32    xRamDisk;	
-   u32	  xRamDiskSize64;		// Size of initial Ramdisk
-   u32	  xRamDiskSize;			// in pages
-};
-
-#endif /* _NACA_H */
diff -Nru a/include/asm-ppc/iSeries/Paca.h b/include/asm-ppc/iSeries/Paca.h
--- a/include/asm-ppc/iSeries/Paca.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,137 +0,0 @@
-/*
- * Paca.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-
-//============================================================================
-//
-// This control block defines the OS's PACA which defines the processor 
-// specific data for each logical processor on the system.  
-// There are some pointers defined that are utilized by PLIC.
-//   
-
-#ifndef	_PPC_TYPES_H
-#include	<asm/types.h>
-#endif
-
-//-----------------------------------------------------------------------------
-// Other Includes
-//-----------------------------------------------------------------------------
-#ifndef	_ITLPPACA_H
-#include	<asm/iSeries/ItLpPaca.h>
-#endif
-
-#ifndef	_ITLPREGSAVE_H
-#include	<asm/iSeries/ItLpRegSave.h>
-#endif
-
-#ifndef _ITLPQUEUE_H
-#include	<asm/iSeries/ItLpQueue.h>
-#endif
-
-
-#ifndef _PACA_H
-#define _PACA_H
-
-/* 
- * The bolted stack structure is at the head of each bolted stack
- * and is simply a singly linked list
- */
-
-//============================================================================
-//
-//	Defines the layout of the Paca.  
-//
-//	This structure is not directly accessed by PLIC or the SP except
-//	for the first two pointers that point to the ItLpPaca area and the
-//	ItLpRegSave area for this processor.
-//
-//============================================================================
-struct Paca
-{
-//===========================================================================
-// Following two fields are read by PLIC to find the LpPaca and LpRegSave area
-//===========================================================================
-
-  u32		pad1;			// Pointer to LpPaca for proc		
-  struct ItLpPaca * xLpPacaPtr;		// Pointer to LpPaca for proc
-  u32		pad2;			// Pointer to LpRegSave for proc
-  struct ItLpRegSave * xLpRegSavePtr;	// Pointer to LpRegSave for proc	
-
-  u64		xR21;			// Savearea for GPR21
-  u64		xR22;			// Savearea for GPR22
-  u64		xKsave;			// Saved Kernel stack addr or zero
-  
-  u16		xPacaIndex;		// Index into Paca array of this
-  					// Paca.  This is processor number
-  u8		xProcStart;		// At startup, processor spins until
-  					// xProcStart becomes non-zero.
-  u8		xProcEnabled;		// 1 - soft enabled, 0 - soft disabled
-  u32           xrsvd2;             	// was bolted stacks   
-  u32		xSavedMsr;		// old msr saved here by HvCall
-  					// and flush_hash_page.
-  					// HvCall uses 64-bit registers
-					// so it must disable external
-					// interrupts to avoid the high
-					// half of the regs getting lost
-					// It can't stack a frame because
-					// some of the callers can't 
-					// tolerate hpt faults (which might
-					// occur on the stack)
-  u32		xSavedLr;		// link register saved here by
-  					// flush_hash_page
-  u8		xContextOverflow;	// 1 - context overflow - use temporary
-  					// context = processor# + 1
-  u8		rsvd4;
-  u16		rsvd5;
-  u32		xSRR0;			// Used as bolted copies of stack fields
-  u32		xSRR1;
-  u32		xGPR0;
-  u32		xGPR2;
-  u32		default_decr;		// Default decrementer value
-  u32		ext_ints;		// ext ints processed 
-  u32		rsvd6;
-  u64		rsvd1[5];		// Rest of cache line reserved
-
-//===========================================================================
-// CACHE_LINE_2-3 0x0080 - 0x0180
-//===========================================================================
-
-  struct ItLpQueue * lpQueuePtr;	// LpQueue handled by this processor
-  u32		breakpoint_loop;	// Loop until this field is set
-  					// non-zero by user.  Then set it
-					// back to zero before continuing
-
-  u64		debug_regs;		// Pointer to pt_regs at breakpoint
-  u64		rsvd3[30];		// To be used by Linux
-
-//===========================================================================
-// CACHE_LINE_4-8  0x0180 - 0x03FF Contains ItLpPaca
-//===========================================================================
-
-  struct ItLpPaca xLpPaca;	// Space for ItLpPaca		
-
-//===========================================================================
-// CACHE_LINE_9-16 0x0400 - 0x07FF Contains ItLpRegSave
-//===========================================================================
-
-  struct ItLpRegSave xRegSav;	// Register save for proc	
-
-};
-
-#endif /* _PACA_H */
diff -Nru a/include/asm-ppc/iSeries/XmPciLpEvent.h b/include/asm-ppc/iSeries/XmPciLpEvent.h
--- a/include/asm-ppc/iSeries/XmPciLpEvent.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-
-#ifndef	__XMPCILPEVENT_H__
-#define	__XMPCILPEVENT_H__
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int XmPciLpEvent_init(void);
-void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XMPCILPEVENT_H__ */
diff -Nru a/include/asm-ppc/iSeries/iSeries_FlightRecorder.h b/include/asm-ppc/iSeries/iSeries_FlightRecorder.h
--- a/include/asm-ppc/iSeries/iSeries_FlightRecorder.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,85 +0,0 @@
-#ifndef _ISERIES_FLIGHTRECORDER_H
-#define _ISERIES_FLIGHTRECORDER_H
-/************************************************************************/
-/* File iSeries_FlightRecorder.h created by Allan Trautman Jan 22 2001. */
-/************************************************************************/
-/* This code supports the pci interface on the IBM iSeries systems.     */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, Jan 22, 2001                                              */
-/*   Added Time stamp methods. Apr 12, 2001                             */
-/* End Change Activity                                                  */
-/************************************************************************/
-/* This is a generic Flight Recorder, simply stuffs line entries into a */
-/* buffer for debug purposes.                                           */
-/*                                                                      */
-/* To use,                                                              */ 
-/* 1. Create one, make it global so it isn't on the stack.              */
-/*     FlightRecorder  PciFlightRecorder;                               */
-/*                                                                      */
-/* 2. Optionally create a pointer to it, just makes it easier to use.   */
-/*     FlightRecorder* PciFr = &PciFlightRecorder;                      */
-/*                                                                      */
-/* 3. Initialize with you signature.                                    */
-/*          iSeries_Fr_Initialize(PciFr, "Pci Flight Recorder");        */
-/*                                                                      */
-/* 4. Log entries.                                                      */ 
-/*          PciFr->logEntry(PciFr,"In Main");                           */
-/*                                                                      */
-/* 5. Later, you can find the Flight Recorder by looking in the         */
-/*    System.map                                                        */
-/************************************************************************/
-struct iSeries_FlightRecorder;          /* Forward declares             */
-struct rtc_time;
-void   logEntry(struct iSeries_FlightRecorder*, char* Text);
-void   logTime( struct iSeries_FlightRecorder*, char* Text);
-void   logDate( struct iSeries_FlightRecorder*, char* Text);
-#define FlightRecorderSize 4096 
-
-/************************************************************************/
-/* Generic Flight Recorder Structure                                    */
-/************************************************************************/
-struct iSeries_FlightRecorder {         /* Structure Defination         */
-    char  Signature[16];                /* Eye Catcher                  */
-    char* StartingPointer;              /* Buffer Starting Address      */
-    char* CurrentPointer;               /* Next Entry Address           */
-    int   WrapCount;                    /* Number of Buffer Wraps       */
-    void  (*logEntry)(struct iSeries_FlightRecorder*,char*);
-    void  (*logTime) (struct iSeries_FlightRecorder*,char*);
-    void  (*logDate) (struct iSeries_FlightRecorder*,char*);
-    char  Buffer[FlightRecorderSize];
-};
-
-typedef struct iSeries_FlightRecorder FlightRecorder;	/* Short Name   */
-extern void iSeries_Fr_Initialize(FlightRecorder*, char* Signature);
-/************************************************************************/
-/* extern void iSeries_LogFr_Entry(  FlightRecorder*, char* Text);      */
-/* extern void iSeries_LogFr_Date(   FlightRecorder*, char* Text);      */
-/* extern void iSeries_LogFr_Time(   FlightRecorder*, char* Text);      */
-/************************************************************************/
-/* PCI Flight Recorder Helpers                                          */
-/************************************************************************/
-extern FlightRecorder* PciFr;            /* Ptr to Pci Fr               */
-extern char*           PciFrBuffer;      /* Ptr to Fr Work Buffer       */
-#define ISERIES_PCI_FR(buffer)      PciFr->logEntry(PciFr,buffer);
-#define ISERIES_PCI_FR_TIME(buffer) PciFr->logTime(PciFr,buffer);
-#define ISERIES_PCI_FR_DATE(buffer) PciFr->logDate(PciFr,buffer);
-
-#endif /* _ISERIES_FLIGHTRECORDER_H */
diff -Nru a/include/asm-ppc/iSeries/iSeries_VpdInfo.h b/include/asm-ppc/iSeries/iSeries_VpdInfo.h
--- a/include/asm-ppc/iSeries/iSeries_VpdInfo.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,56 +0,0 @@
-#ifndef _ISERIES_VPDINFO_H
-#define _ISERIES_VPDINFO_H
-/************************************************************************/
-/* File iSeries_VpdInfo.h created by Allan Trautman Feb 08 2001.        */
-/************************************************************************/
-/* This code supports the location data fon on the IBM iSeries systems. */
-/* Copyright (C) 20yy  <Allan H Trautman> <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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created, Feg  8, 2001                                              */
-/*   Reformated for Card, March 8, 2001                                 */
-/* End Change Activity                                                  */
-/************************************************************************/
-
-struct pci_dev; 		/* Forward Declare                      */
-/************************************************************************/
-/* Location Data extracted from the VPD list and device info.           */
-/************************************************************************/
-struct LocationDataStruct {	/* Location data structure for device   */
-    u16  Bus;			/* iSeries Bus Number		    0x00*/
-    u16  Board;                 /* iSeries Board                    0x02*/
-    u8   FrameId;		/* iSeries spcn Frame Id            0x04*/
-    u8   PhbId;                 /* iSeries Phb Location             0x05*/
-    u16  Card;                  /* iSeries Card Slot                0x06*/
-    char CardLocation[4];	/* Char format of planar vpd        0x08*/
-    u8   AgentId;		/* iSeries AgentId                  0x0C*/
-    u8   SecondaryAgentId;      /* iSeries Secondary Agent Id       0x0D*/
-    u8   LinuxBus;              /* Linux Bus Number                 0x0E*/
-    u8   LinuxDevFn;            /* Linux Device Function            0x0F*/
-};
-typedef struct LocationDataStruct  LocationData;
-#define LOCATION_DATA_SIZE      16
-
-/************************************************************************/
-/* Protypes                                                             */
-/************************************************************************/
-extern LocationData* iSeries_GetLocationData(struct pci_dev* PciDev);
-extern int           iSeries_Device_Information(struct pci_dev*,char*, int);
-
-#endif /* _ISERIES_VPDINFO_H */
diff -Nru a/include/asm-ppc/iSeries/iSeries_dma.h b/include/asm-ppc/iSeries/iSeries_dma.h
--- a/include/asm-ppc/iSeries/iSeries_dma.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,97 +0,0 @@
-/*
- * iSeries_dma.h
- * Copyright (C) 2001  Mike Corrigan 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.
- * 
- * 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
- */
-
-#ifndef _ISERIES_DMA_H
-#define _ISERIES_DMA_H
-
-#include <asm/types.h>
-#ifndef __LINUX_SPINLOCK_H
-#include <linux/spinlock.h>
-#endif
-
-// NUM_TCE_LEVELS defines the largest contiguous block
-// of dma (tce) space we can get.  NUM_TCE_LEVELS = 10 
-// allows up to 2**9 pages (512 * 4096) = 2 MB
-#define NUM_TCE_LEVELS 10
-
-#define NO_TCE ((dma_addr_t)-1)
-
-// Tces come in two formats, one for the virtual bus and a different
-// format for PCI
-#define TCE_VB  0
-#define TCE_PCI 1
-
-
-union Tce {
-   	u64	wholeTce;
-   struct {
-	u64	cacheBits	:6;	/* Cache hash bits - not used */
-	u64	rsvd		:6;	
-	u64	rpn		:40;	/* Absolute page number */
-	u64	valid		:1;	/* Tce is valid (vb only) */
-	u64	allIo		:1;	/* Tce is valid for all lps (vb only) */
-	u64	lpIndex		:8;	/* LpIndex for user of TCE (vb only) */
-	u64	pciWrite	:1;	/* Write allowed (pci only) */
-	u64	readWrite	:1;	/* Read allowed (pci), Write allowed
-					   (vb) */
-   } tceBits;
-};
-
-struct Bitmap {
-	unsigned long	numBits;
-	unsigned long	numBytes;
-	unsigned char * map;
-};
-
-struct MultiLevelBitmap {
-	unsigned long 	maxLevel;
-	struct Bitmap 	level[NUM_TCE_LEVELS];
-};
-
-struct TceTable {
-	u64	busNumber;
-	u64	size;
-	u64	startOffset;
-	u64	index;
-	spinlock_t	lock;
-	struct MultiLevelBitmap mlbm;
-};
-
-struct HvTceTableManagerCB {
-	u64	busNumber;		/* Bus number for this tce table */
-	u64	start;			/* Will be NULL for secondary */
-	u64	totalSize;		/* Size (in pages) of whole table */
-	u64	startOffset;		/* Index into real tce table of the
-					   start of our section */
-	u64	size;			/* Size (in pages) of our section */
-	u64	index;			/* Index of this tce table (token?) */
-	u16	maxTceTableIndex;	/* Max number of tables for partition */
-	u8	virtualBusFlag;		/* Flag to indicate virtual bus */
-	u8	rsvd[5];
-};
-
-extern struct TceTable virtBusTceTable;	/* Tce table for virtual bus */
-
-extern struct TceTable * build_tce_table( struct HvTceTableManagerCB *,
-					  struct TceTable *);
-extern void              create_virtual_bus_tce_table( void );
-
-extern void		 create_pci_bus_tce_table( unsigned busNumber );
-
-#endif // _ISERIES_DMA_H
diff -Nru a/include/asm-ppc/iSeries/iSeries_fixup.h b/include/asm-ppc/iSeries/iSeries_fixup.h
--- a/include/asm-ppc/iSeries/iSeries_fixup.h	Wed Jan  8 20:04:45 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,25 +0,0 @@
-
-#ifndef	__ISERIES_FIXUP_H__
-#define	__ISERIES_FIXUP_H__
-#include <linux/pci.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void iSeries_fixup (void);
-void iSeries_fixup_bus (struct pci_bus*);
-unsigned int iSeries_scan_slot (struct pci_dev*, u16, u8, u8);
-
-
-/* Need to store information related to the PHB bucc and make it accessible to the hose */
-struct iSeries_hose_arch_data {
-    u32 hvBusNumber;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ISERIES_FIXUP_H__ */
diff -Nru a/include/asm-ppc/iSeries/iSeries_io.h b/include/asm-ppc/iSeries/iSeries_io.h
--- a/include/asm-ppc/iSeries/iSeries_io.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,42 +0,0 @@
-#ifdef CONFIG_PPC_ISERIES
-#ifndef _ISERIES_IO_H
-#define _ISERIES_IO_H
-/************************************************************************/
-/* File iSeries_io.h created by Allan Trautman on Thu Dec 28 2000.      */
-/************************************************************************/
-/* Remaps the io.h for the iSeries Io                                   */
-/* Copyright (C) 20yy  Allan H Trautman, 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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created December 28, 2000                                          */
-/* End Change Activity                                                  */
-/************************************************************************/
-extern u8   iSeries_Readb(u32* IoAddress);
-extern u16  iSeries_Readw(u32* IoAddress);
-extern u32  iSeries_Readl(u32* IoAddress);
-extern void iSeries_Writeb(u8  IoData,u32* IoAddress);
-extern void iSeries_Writew(u16 IoData,u32* IoAddress);
-extern void iSeries_Writel(u32 IoData,u32* IoAddress);
-
-extern void* iSeries_memcpy_toio(void *dest, void *source, int n);
-extern void* iSeries_memcpy_fromio(void *dest, void *source, int n);
-
-#endif /*  _ISERIES_IO_H         */
-#endif /*  CONFIG_PPC_ISERIES  */
-
diff -Nru a/include/asm-ppc/iSeries/iSeries_irq.h b/include/asm-ppc/iSeries/iSeries_irq.h
--- a/include/asm-ppc/iSeries/iSeries_irq.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,26 +0,0 @@
-
-#ifndef	__ISERIES_IRQ_H__
-#define	__ISERIES_IRQ_H__
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-unsigned int iSeries_startup_IRQ(unsigned int);
-void iSeries_shutdown_IRQ(unsigned int);
-void iSeries_enable_IRQ(unsigned int);
-void iSeries_disable_IRQ(unsigned int);
-void iSeries_end_IRQ(unsigned int);
-void iSeries_init_IRQ(void);
-void iSeries_init_irqMap(int);
-int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId);
-int iSeries_assign_IRQ(int, HvBusNumber, HvSubBusNumber, HvAgentId);
-void iSeries_activate_IRQs(void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ISERIES_IRQ_H__ */
diff -Nru a/include/asm-ppc/iSeries/iSeries_pci.h b/include/asm-ppc/iSeries/iSeries_pci.h
--- a/include/asm-ppc/iSeries/iSeries_pci.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,123 +0,0 @@
-#ifndef _ISERIES_32_PCI_H
-#define _ISERIES_32_PCI_H
-/************************************************************************/
-/* File iSeries_pci.h created by Allan Trautman on Tue Feb 20, 2001.    */
-/************************************************************************/
-/* Define some useful macros for the iSeries pci routines.              */
-/* Copyright (C) 20yy  Allan H Trautman, 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.                                  */
-/*                                                                      */
-/* 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                                          */
-/************************************************************************/
-/* Change Activity:                                                     */
-/*   Created Feb 20, 2001                                               */
-/*   Added device reset, March 22, 2001                                 */
-/* End Change Activity                                                  */
-/************************************************************************/
-#include <linux/config.h>
-#include <asm/iSeries/HvCallPci.h>
-
-struct pci_dev;				/* For Reference                */
-/************************************************************************/
-/* Gets iSeries Bus, SubBus, of DevFn using pci_dev* structure          */
-/************************************************************************/
-#define ISERIES_GET_BUS(DevPtr)    iSeries_Get_Bus(DevPtr)
-#define ISERIES_GET_SUBBUS(DevPtr) iSeries_Get_SubBus(DevPtr)
-#define ISERIES_GET_DEVFUN(DevPtr) iSeries_Get_DevFn(DevPtr)
-/************************************************************************/
-/* Functions                                                            */
-/************************************************************************/
-extern u8 iSeries_Get_Bus(struct pci_dev*);
-extern u8 iSeries_Get_SubBus(struct pci_dev*);
-extern u8 iSeries_Get_DevFn(struct pci_dev*);
-/************************************************************************/
-/* Global Bus map                                                       */
-/************************************************************************/
-extern u8 iSeries_GlobalBusMap[256][2];	      /* Global iSeries Bus Map */
-
-/************************************************************************/
-/* iSeries Device Information                                           */
-/************************************************************************/
-struct iSeries_Device_Struct {
-    struct pci_dev* PciDevPtr;		/* Pointer to pci_dev structure */
-    HvBusNumber     BusNumber;		/* Hypervisor Bus Number        */
-    HvSubBusNumber  SubBus;		/* Hypervisor SubBus Number     */
-    HvAgentId       DevFn;		/* Hypervisor DevFn             */
-    u8              BarNumber;		/* Bar number on Xlates         */
-    u32             BarOffset;		/* Offset within Bar on Xlates  */
-    int             RCode;		/* Return Code Holder           */
-};
-typedef struct iSeries_Device_Struct iSeries_Device;
-extern void build_iSeries_Device(iSeries_Device* Device, struct pci_dev* DevPtr);
-
-/************************************************************************/
-/* Formatting device information.                                       */
-/************************************************************************/
-extern int  iSeries_Device_Information(struct pci_dev*,char*,int );
-
-/************************************************************************/
-/* Flight Recorder tracing                                              */
-/************************************************************************/
-extern void iSeries_Set_PciFilter(struct pci_dev*);
-extern int  iSeries_Set_PciTraceFlag(int TraceFlag);
-extern int  iSeries_Get_PciTraceFlag(void);
-extern int  iSeries_Set_PciErpFlag(int ErpFlag);
-
-/************************************************************************/
-/* Structure to hold the data for PCI Register Save/Restore functions.  */
-/************************************************************************/
-struct pci_config_reg_save_area {       /*                              */
-    u16    Flags;			/* Control & Info Flags         */
-    u16    ByteCount;			/* Number of Register Bytes to S*/
-    struct pci_dev* PciDev;		/* Pointer to device            */ 
-    u32    RCode;			/* Holder for possible errors   */
-    u32    FailReg;                     /* Failing Register on error    */
-    u8     Regs[64];			/* Save Area                    */ 
-};
-typedef struct pci_config_reg_save_area PciReqsSaveArea;
-/************************************************************************/
-/* Various flavors of reset device functions.                           */
-/************************************************************************/
-/*                                                                      */
-/* iSeries_Device_Reset_NoIrq                                           */
-/*	IRQ is not disabled and default timings are used.               */
-/* iSeries_Device_Reset_Generic                                         */
-/*	A generic reset, IRQ is disable and re-enabled.  The assert and */
-/*	wait timings will be the pci defaults.                          */
-/* iSeries_Device_Reset                                                 */
-/*	A device Reset interface that client can control the timing of  */
-/*	the reset and wait delays.                                      */
-/*                                                                      */
-/* Parameters:                                                          */
-/*    pci_dev    = Device to reset.                                     */
-/*    AssertTime = Time in .1 seconds to hold the reset down.  The      */
-/*                 default (and minimum) is .5 seconds.                 */
-/*    DelayTime = Time in .1 seconds to wait for device to come ready   */
-/*                after the reset.  The default is 3 seconds.           */
-/*    IrgDisable = A non-zero will skip irq disable & enable.           */
-/*                                                                      */
-/* Return:                                                              */
-/*    Zero return, reset is successful.                                 */
-/*    Non-zero return code indicates failure.                           */
-/************************************************************************/
-extern int  iSeries_Device_Reset_NoIrq(struct pci_dev* PciDev);
-extern int  iSeries_Device_Reset_Generic(struct pci_dev* PciDev);
-extern int  iSeries_Device_Reset(struct pci_dev* PciDev, int AssertTime, int DelayTime, int IrqDisable);
-extern int  iSeries_Device_ToggleReset(struct pci_dev* PciDev, int AssertTime, int DelayTime);
-extern int  iSeries_Device_RestoreConfigRegs(PciReqsSaveArea* SaveArea);
-extern PciReqsSaveArea* iSeries_Device_SaveConfigRegs(struct pci_dev* DevPtr);
-
-#endif /* _ISERIES_32_PCI_H */
diff -Nru a/include/asm-ppc/iSeries/iSeries_proc.h b/include/asm-ppc/iSeries/iSeries_proc.h
--- a/include/asm-ppc/iSeries/iSeries_proc.h	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,37 +0,0 @@
-/*
- * iSeries_proc.h
- * Copyright (C) 2001  Kyle A. Lucke 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.
- * 
- * 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
- */
-
-
-/* Change Activity: */
-/* End Change Activity */
-
-#ifndef _ISERIES_PROC_H
-#define _ISERIES_PROC_H
-
-#include <linux/proc_fs.h>
-
-extern void iSeries_proc_early_init(void);
-extern void iSeries_proc_create(void);
-
-typedef void (*iSeriesProcFunction)(struct proc_dir_entry *iSeries_proc);
-
-extern void iSeries_proc_callback(iSeriesProcFunction initFunction);
-
-#endif /* _iSeries_PROC_H */
-
diff -Nru a/include/asm-ppc/iSeries/mf.h b/include/asm-ppc/iSeries/mf.h
--- a/include/asm-ppc/iSeries/mf.h	Wed Jan  8 20:04:32 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,83 +0,0 @@
-/*
- * mf.h
- * Copyright (C) 2001  Troy D. Armstrong IBM Corporation
- *
- * This modules exists as an interface between a Linux secondary partition
- * running on an iSeries and the primary partition's Virtual Service
- * Processor (VSP) object.  The VSP has final authority over powering on/off
- * all partitions in the iSeries.  It also provides miscellaneous low-level
- * machine facility type operations.
- *
- * 
- * 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.
- * 
- * 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
- */
-
-#ifndef MF_H_INCLUDED
-#define MF_H_INCLUDED
-
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/HvLpEvent.h>
-
-struct rtc_time;
-
-typedef void (*MFCompleteHandler)( void * clientToken, int returnCode );
-
-extern void mf_allocateLpEvents( HvLpIndex targetLp,
-				 HvLpEvent_Type type,
-				 unsigned size,
-				 unsigned amount,
-				 MFCompleteHandler hdlr,
-				 void * userToken );
-
-extern void mf_deallocateLpEvents( HvLpIndex targetLp,
-				   HvLpEvent_Type type,
-				   unsigned count,
-				   MFCompleteHandler hdlr,
-				   void * userToken );
-
-extern void mf_powerOff( void );
-
-extern void mf_reboot( void );
-
-extern void mf_displaySrc( u32 word );
-extern void mf_displayProgress( u16 value );
-
-extern void mf_clearSrc( void );
-
-extern void mf_init( void );
-
-extern void mf_setSide(char side);
-
-extern char mf_getSide(void);
-
-extern void mf_setCmdLine(const char *cmdline, int size, u64 side);
-
-extern int mf_getCmdLine(char *cmdline, int *size, u64 side);
-
-extern void mf_getSrcHistory(char *buffer, int size);
-
-extern int mf_setVmlinuxChunk(const char *buffer, int size, int offset, u64 side);
-
-extern int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side);
-
-extern int mf_setRtcTime(unsigned long time);
-
-extern int mf_getRtcTime(unsigned long *time);
-
-extern int mf_getRtc( struct rtc_time * tm );
-
-extern int mf_setRtc( struct rtc_time * tm );
-
-#endif /* MF_H_INCLUDED */
diff -Nru a/include/asm-ppc/iSeries/mf_proc.h b/include/asm-ppc/iSeries/mf_proc.h
--- a/include/asm-ppc/iSeries/mf_proc.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,33 +0,0 @@
-/*
- * mf_proc.h
- * Copyright (C) 2001  Kyle A. Lucke 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.
- * 
- * 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
- */
-
-
-/* Change Activity: */
-/* End Change Activity */
-
-#ifndef _MF_PROC_H
-#define _MF_PROC_H
-
-#include <linux/proc_fs.h>
-
-void mf_proc_init(struct proc_dir_entry *iSeries_proc);
-
-
-#endif /* _MF_PROC_H */
-
diff -Nru a/include/asm-ppc/iSeries/pmc_proc.h b/include/asm-ppc/iSeries/pmc_proc.h
--- a/include/asm-ppc/iSeries/pmc_proc.h	Wed Jan  8 20:04:32 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,33 +0,0 @@
-/*
- * pmc_proc.h
- * Copyright (C) 2001  Mike Corrigan  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.
- * 
- * 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
- */
-
-
-/* Change Activity: */
-/* End Change Activity */
-
-#ifndef _PMC_PROC_H
-#define _PMC_PROC_H
-
-#include <linux/proc_fs.h>
-
-void pmc_proc_init(struct proc_dir_entry *iSeries_proc);
-
-
-#endif /* _PMC_PROC_H */
-
diff -Nru a/include/asm-ppc/iSeries/veth-proc.h b/include/asm-ppc/iSeries/veth-proc.h
--- a/include/asm-ppc/iSeries/veth-proc.h	Wed Jan  8 20:04:43 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,32 +0,0 @@
-/*
- * veth-proc.h
- * Copyright (C) 2001  Kyle A. Lucke 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.
- * 
- * 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
- */
-
-
-/* Change Activity: */
-/* End Change Activity */
-
-#ifndef _VETH_PROC_H
-#define _VETH_PROC_H
-
-#include <linux/proc_fs.h>
-
-void veth_proc_init(struct proc_dir_entry *iSeries_proc);
-
-#endif /* _VETH-PROC_H */
-
diff -Nru a/include/asm-ppc/ibm403.h b/include/asm-ppc/ibm403.h
--- a/include/asm-ppc/ibm403.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-ppc/ibm403.h	Wed Jan  8 20:04:32 2003
@@ -1,8 +1,8 @@
 /*
  * ibm403.h
  *
- *	This was dirived from the ibm4xx.h and all 403 specific definitions
- *	where moved here.
+ *	This was derived from the ibm4xx.h and all 403 specific definitions
+ *	were moved here.
  *	
  *      Armin Kuster <akuster@mvista.com>
  *      Tom Rini <trini@mvista.com>
@@ -30,11 +30,6 @@
  *  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.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *	Version 1.0 Oct 10, 2001 - A. Kuster
- *	Initial version	 - moved 403  specific out of ibm4xx.h 
- *	Version 1.1 Oct 25, 2001 - T. Rini
- *	Lots of cleanups.
  */
 
 
diff -Nru a/include/asm-ppc/ibm405.h b/include/asm-ppc/ibm405.h
--- a/include/asm-ppc/ibm405.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-ppc/ibm405.h	Wed Jan  8 20:04:32 2003
@@ -29,12 +29,6 @@
  *  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.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *	Version 1.0 (02/01/17) - A. Kuster
- *	Initial version	 - moved 405  specific out of the other core.h's
- *
- *	Version 1.0 (02/08/02) - A. Kuster
- *	removed DCRN_UIC1_BASE to NP405L & H
  */
 
 #ifdef __KERNEL__
@@ -56,6 +50,11 @@
 #define ET_BUSERR	4
 #define ET_BUSTO	6
 
+/* Clock and power management shifts for emacs */
+#define IBM_CPM_EMMII	0	/* Shift value for MII */
+#define IBM_CPM_EMRX	1	/* Shift value for recv */
+#define IBM_CPM_EMTX	2	/* Shift value for MAC */
+
 #ifdef DCRN_CHCR_BASE
 #define DCRN_CHCR0	(DCRN_CHCR_BASE + 0x0)	/* Chip Control Register 1 */
 #define DCRN_CHCR1	(DCRN_CHCR_BASE + 0x1)	/* Chip Control Register 2 */
@@ -233,16 +232,6 @@
 #define DCRN_MALTXCTP3R(base)	((base) + 0x23)	/* Channel Tx 3 Channel Table Pointer */
 #define DCRN_MALRCBS0(base)	((base) + 0x60)	/* Channel Rx 0 Channel Buffer Size */
 #define DCRN_MALRCBS1(base)	((base) + 0x61)	/* Channel Rx 1 Channel Buffer Size */
-
-/* EMAC DCRN's */
-#define DCRN_MALRXCTP2R(base)	((base) + 0x42)	/* Channel Rx 2 Channel Table Pointer */
-#define DCRN_MALRXCTP3R(base)	((base) + 0x43)	/* Channel Rx 3 Channel Table Pointer */
-#define DCRN_MALTXCTP4R(base)	((base) + 0x24)	/* Channel Tx 4 Channel Table Pointer */
-#define DCRN_MALTXCTP5R(base)	((base) + 0x25)	/* Channel Tx 5 Channel Table Pointer */
-#define DCRN_MALTXCTP6R(base)	((base) + 0x26)	/* Channel Tx 6 Channel Table Pointer */
-#define DCRN_MALTXCTP7R(base)	((base) + 0x27)	/* Channel Tx 7 Channel Table Pointer */
-#define DCRN_MALRCBS2(base)	((base) + 0x62)	/* Channel Rx 2 Channel Buffer Size */
-#define DCRN_MALRCBS3(base)	((base) + 0x63)	/* Channel Rx 3 Channel Buffer Size */
 
  /* DCRN_MALCR */
 #define MALCR_MMSR		0x80000000	/* MAL Software reset */
diff -Nru a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h
--- a/include/asm-ppc/ibm4xx.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-ppc/ibm4xx.h	Wed Jan  8 20:04:44 2003
@@ -16,14 +16,56 @@
 
 #include <linux/config.h>
 
+#ifdef CONFIG_4xx
+
+#ifndef __ASSEMBLY__
+
+/* Device Control Registers */
+
+#define stringify(s)	tostring(s)
+#define tostring(s)	#s
+
+#define mfdcr(rn) mfdcr_or_dflt(rn, 0)
+
+#define mfdcr_or_dflt(rn,default_rval) \
+	({unsigned int rval;						\
+	if (rn == 0)							\
+		rval = default_rval;					\
+	else								\
+		asm volatile("mfdcr %0," stringify(rn) : "=r" (rval));	\
+	rval;})
+
+#define mtdcr(rn, v)  \
+do {                  \
+	if (rn != 0) \
+		asm volatile("mtdcr " stringify(rn) ",%0" : : "r" (v));	\
+} while (0)
+
+/* R/W of indirect DCRs make use of standard naming conventions for DCRs */
+
+#define mfdcri(base, reg)			\
+({						\
+     mtdcr(base##_CFGADDR, base##_##reg);	\
+     mfdcr(base##_CFGDATA);			\
+})
+
+#define mtdcri(base, reg, data)			\
+do {						\
+     mtdcr(base##_CFGADDR, base##_##reg);	\
+     mtdcr(base##_CFGDATA, data);		\
+} while (0)
+#endif /* __ASSEMBLY__ */
+
+#endif /* CONFIG_4xx */
+
 #ifdef CONFIG_40x
 
 #if defined(CONFIG_ASH)
 #include <platforms/4xx/ash.h>
 #endif
 
-#if defined (CONFIG_CEDER)
-#include <platforms/4xx/ceder.h>
+#if defined (CONFIG_CEDAR)
+#include <platforms/4xx/cedar.h>
 #endif
 
 #if defined(CONFIG_CPCI405)
@@ -50,12 +92,26 @@
 #include <platforms/4xx/walnut.h>
 #endif
 
+#ifndef __ASSEMBLY__
+
+/*
+ * The "residual" board information structure the boot loader passes
+ * into the kernel.
+ */
+extern bd_t __res;
+
+void ppc4xx_setup_arch(void);
+void ppc4xx_map_io(void);
+void ppc4xx_init_IRQ(void);
+void ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
+		 unsigned long r6, unsigned long r7);
+#endif
+
 #ifndef PPC4xx_MACHINE_NAME
 #define PPC4xx_MACHINE_NAME	"Unidentified 4xx class"
 #endif
 
 
-
 /* IO_BASE is for PCI I/O.
  * ISA not supported, just here to resolve copilation.
  */
@@ -66,33 +122,7 @@
 #define PCI_DRAM_OFFSET	0
 #endif
 
-/*
- * The "residual" board information structure the boot loader passes
- * into the kernel.
- */
-#ifndef __ASSEMBLY__
-extern unsigned char __res[];
-
-/* Device Control Registers */
-
-#define stringify(s)	tostring(s)
-#define tostring(s)	#s
 
-#define mfdcr(rn) mfdcr_or_dflt(rn, 0)
-
-#define mfdcr_or_dflt(rn,default_rval) \
-	({unsigned int rval;						\
-	if (rn == 0)							\
-		rval = default_rval;					\
-	else								\
-		asm volatile("mfdcr %0," stringify(rn) : "=r" (rval));	\
-	rval;})
-
-#define mtdcr(rn, v)  \
-	{if (rn != 0) \
-		asm volatile("mtdcr " stringify(rn) ",%0" : : "r" (v));}
-
-#endif /* __ASSEMBLY__ */
 #endif /* CONFIG_40x */
 #endif /* __ASM_IBM4XX_H__ */
 #endif /* __KERNEL__ */
diff -Nru a/include/asm-ppc/ibm_ocp_pci.h b/include/asm-ppc/ibm_ocp_pci.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ppc/ibm_ocp_pci.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,56 @@
+/*
+ * ibm_ocp_pci.h
+ *
+ *	This was derived from the ibm_ocp.h 
+ *
+ * 	Current Maintainer
+ *      Armin Kuster akuster@mvista.com
+ *      AUg, 2002 
+ *
+ *
+ * Copyright 2001-2002 MontaVista Softare 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.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASM_IBM_OCP_PCI_H__
+#define __ASM_IBM_OCP_PCI_H__
+
+/* PCI 32 */
+
+struct pmm_regs {
+	u32 la;
+	u32 ma;
+	u32 pcila;
+	u32 pciha;
+};
+
+typedef struct pcil0_regs {
+	struct pmm_regs pmm[3];
+	u32 ptm1ms;
+	u32 ptm1la;
+	u32 ptm2ms;
+	u32 ptm2la;
+} pci0_t;
+
+#endif				/* __ASM_IBM_OCP_PCI_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/include/asm-ppc/io.h b/include/asm-ppc/io.h
--- a/include/asm-ppc/io.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ppc/io.h	Wed Jan  8 20:04:45 2003
@@ -42,21 +42,6 @@
 extern unsigned long isa_mem_base;
 extern unsigned long pci_dram_offset;
 
-#if defined(CONFIG_PPC_ISERIES)
-#include <asm/iSeries.h>
-#if defined(CONFIG_PCI)
-  #include <asm/iSeries/iSeries_io.h>
-  #endif  /* defined(CONFIG_PCI) */
-#endif /* CONFIG_PPC_ISERIES */
-
-#if defined(CONFIG_PPC_ISERIES) && defined(CONFIG_PCI)
-#define readb(addr)	     iSeries_Readb((u32*)(addr))
-#define readw(addr)	     iSeries_Readw((u32*)(addr))
-#define readl(addr)	     iSeries_Readl((u32*)(addr))
-#define writeb(data, addr)   iSeries_Writeb(data,(u32*)(addr))
-#define writew(data, addr)   iSeries_Writew(data,(u32*)(addr))
-#define writel(data, addr)   iSeries_Writel(data,(u32*)(addr))
-#else
 #define readb(addr) in_8((volatile u8 *)(addr))
 #define writeb(b,addr) out_8((volatile u8 *)(addr), (b))
 #if defined(CONFIG_APUS)
@@ -69,8 +54,7 @@
 #define readl(addr) in_le32((volatile u32 *)(addr))
 #define writew(b,addr) out_le16((volatile u16 *)(addr),(b))
 #define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
-#endif
-#endif  /* CONFIG_PPC_ISERIES && defined(CONFIG_PCI) */
+#endif /* CONFIG_APUS */
 
 
 #define __raw_readb(addr)	(*(volatile unsigned char *)(addr))
@@ -165,14 +149,6 @@
 #define inl(port)		in_be32((u32 *)((port)+_IO_BASE))
 #define outl(val, port)		out_be32((u32 *)((port)+_IO_BASE), (val))
 
-#elif defined(CONFIG_PPC_ISERIES) && defined(CONFIG_PCI)
-#define inb(addr)	     iSeries_Readb((u32*)(addr))
-#define inw(addr)	     iSeries_Readw((u32*)(addr))
-#define inl(addr)	     iSeries_Readl((u32*)(addr))
-#define outb(data,addr)	     iSeries_Writeb(data,(u32*)(addr))
-#define outw(data,addr)	     iSeries_Writew(data,(u32*)(addr))
-#define outl(data,addr)	     iSeries_Writel(data,(u32*)(addr))
-
 #else /* not APUS or ALL_PPC */
 #define inb(port)		in_8((u8 *)((port)+_IO_BASE))
 #define outb(val, port)		out_8((u8 *)((port)+_IO_BASE), (val))
@@ -214,15 +190,9 @@
 #define IO_SPACE_LIMIT ~0
 
 #define memset_io(a,b,c)       memset((void *)(a),(b),(c))
-#ifdef CONFIG_PPC_ISERIES
-#define memcpy_fromio(a,b,c) iSeries_memcpy_fromio((void *)(a), (void *)(b), (c))
-#define memcpy_toio(a,b,c) iSeries_memcpy_toio((void *)(a), (void *)(b), (c))
-#else
 #define memcpy_fromio(a,b,c)   memcpy((a),(void *)(b),(c))
 #define memcpy_toio(a,b,c)	memcpy((void *)(a),(b),(c))
-#endif
 
-#ifdef __KERNEL__
 /*
  * Map in an area of physical address space, for accessing
  * I/O devices etc.
@@ -293,8 +263,6 @@
  */
 #define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
 #define page_to_bus(page)	(page_to_phys(page) + PCI_DRAM_OFFSET)
-
-#endif /* __KERNEL__ */
 
 /*
  * Enforce In-order Execution of I/O:
diff -Nru a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
--- a/include/asm-ppc/irq.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/irq.h	Wed Jan  8 20:04:43 2003
@@ -10,6 +10,19 @@
 extern void disable_irq_nosync(unsigned int);
 extern void enable_irq(unsigned int);
 
+/*
+ * These constants are used for passing information about interrupt
+ * signal polarity and level/edge sensing to the low-level PIC chip
+ * drivers.
+ */
+#define IRQ_SENSE_MASK		0x1
+#define IRQ_SENSE_LEVEL		0x1	/* interrupt on active level */
+#define IRQ_SENSE_EDGE		0x0	/* interrupt triggered by edge */
+
+#define IRQ_POLARITY_MASK	0x2
+#define IRQ_POLARITY_POSITIVE	0x2	/* high level or low->high edge */
+#define IRQ_POLARITY_NEGATIVE	0x0	/* low level or high->low edge */
+
 #if defined(CONFIG_40x)
 #include <asm/ibm4xx.h>
 
diff -Nru a/include/asm-ppc/module.h b/include/asm-ppc/module.h
--- a/include/asm-ppc/module.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/module.h	Wed Jan  8 20:04:43 2003
@@ -28,7 +28,7 @@
 
 /* Make empty sections for module_frob_arch_sections to expand. */
 #ifdef MODULE
-asm(".section .plt,\"aws\",@nobits; .align 3; .previous");
-asm(".section .plt.init,\"aws\",@nobits; .align 3; .previous");
+asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
+asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
 #endif
 #endif /* _ASM_PPC_MODULE_H */
diff -Nru a/include/asm-ppc/nvram.h b/include/asm-ppc/nvram.h
--- a/include/asm-ppc/nvram.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ppc/nvram.h	Wed Jan  8 20:04:45 2003
@@ -31,16 +31,12 @@
 	pmac_nvram_NR		/* MacOS Name Registry partition */
 };
 
-#ifdef __KERNEL__
-
 /* Return partition offset in nvram */
 extern int	pmac_get_partition(int partition);
 
 /* Direct access to XPRAM */
 extern u8	pmac_xpram_read(int xpaddr);
 extern void	pmac_xpram_write(int xpaddr, u8 data);
-
-#endif /* __KERNEL__ */
 
 /* Some offsets in XPRAM */
 #define PMAC_XPRAM_MACHINE_LOC	0xe4
diff -Nru a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ppc/ocp.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,205 @@
+/*
+ * ocp.h
+ *
+ *
+ * 	Current Maintainer
+ *      Armin Kuster akuster@pacbell.net
+ *      Jan, 2002
+ *
+ *
+ *
+ * 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.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR   IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT,  INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifdef __KERNEL__
+#ifndef __OCP_H__
+#define __OCP_H__
+
+#include <linux/list.h>
+#include <linux/config.h>
+#include <linux/device.h>
+#include <linux/devfs_fs_kernel.h>
+
+#include <asm/ocp_ids.h>
+#include <asm/mmu.h>		/* For phys_addr_t */
+#undef DEBUG
+/* #define DEBUG*/
+
+#ifdef DEBUG
+#define DBG(x...) printk(x)
+#else
+#define DBG(x...)
+#endif
+
+#define OCP_IRQ_NA	-1	/* used when ocp device does not have an irq */
+#define OCP_IRQ_MUL	-2	/* used for ocp devices with multiple irqs */
+#define OCP_NULL_TYPE	0	/* used to mark end of list */
+#define OCP_DEV_NA	-1
+#define OCP_CPM_NA	0	/* No Clock or Power Management avaliable */
+
+#define OCP_ANY_ID	(~0)
+
+
+extern struct list_head ocp_root_buses;
+extern struct list_head ocp_devices;
+
+struct ocp_device_id {
+	unsigned int vendor, device;		/* Vendor and device ID or PCI_ANY_ID */
+	char name[16];
+	char desc[50];
+	unsigned long driver_data;		/* Data private to the driver */
+};
+
+struct func_info {
+	char name[16];
+	char desc[50];
+};
+
+struct ocp_def {
+	unsigned int vendor;
+	unsigned int device;
+	phys_addr_t paddr;
+	int irq;
+	unsigned long pm;
+};
+
+
+/* Struct for single ocp device managment */
+struct ocp_device {
+	struct list_head global_list;
+	unsigned int	num;		/* instance of device */
+	char		name[80];	/* device name */
+	unsigned int vendor;
+	unsigned int device;
+	phys_addr_t paddr;
+	int irq;
+	unsigned long pm;
+	void *ocpdev;		/* driver data for this device */
+	struct ocp_driver *driver;
+	u32 current_state;	/* Current operating state. In ACPI-speak,
+				   this is D0-D3, D0 being fully functional,
+				   and D3 being off. */
+	struct device dev;
+};
+
+struct ocp_driver {
+	struct list_head node;
+	char *name;
+	const struct ocp_device_id *id_table;	/* NULL if wants all devices */
+	int  (*probe)  (struct ocp_device *dev);	/* New device inserted */
+	void (*remove) (struct ocp_device *dev);	/* Device removed (NULL if not a hot-plug capable driver) */
+	int  (*save_state) (struct ocp_device *dev, u32 state);    /* Save Device Context */
+	int  (*suspend) (struct ocp_device *dev, u32 state);	/* Device suspended */
+	int  (*resume) (struct ocp_device *dev);	                /* Device woken up */
+	int  (*enable_wake) (struct ocp_device *dev, u32 state, int enable);   /* Enable wake event */
+	struct device_driver driver;
+};
+
+#define	to_ocp_dev(n) container_of(n, struct ocp_device, dev)
+#define	to_ocp_driver(n) container_of(n, struct ocp_driver, driver)
+
+extern int ocp_register_driver(struct ocp_driver *drv);
+extern void ocp_unregister_driver(struct ocp_driver *drv);
+
+#define ocp_dev_g(n) list_entry(n, struct ocp_device, global_list)
+
+#define ocp_for_each_dev(dev) \
+	for(dev = ocp_dev_g(ocp_devices.next); dev != ocp_dev_g(&ocp_devices); dev = ocp_dev_g(dev->global_list.next))
+
+/* Similar to the helpers above, these manipulate per-ocp_dev
+ * driver-specific data.  Currently stored as ocp_dev::ocpdev,
+ * a void pointer, but it is not present on older kernels.
+ */
+static inline void *
+ocp_get_drvdata(struct ocp_device *pdev)
+{
+	return pdev->ocpdev;
+}
+
+static inline void
+ocp_set_drvdata(struct ocp_device *pdev, void *data)
+{
+	pdev->ocpdev = data;
+}
+
+/*
+ * a helper function which helps ensure correct pci_driver
+ * setup and cleanup for commonly-encountered hotplug/modular cases
+ *
+ * This MUST stay in a header, as it checks for -DMODULE
+ */
+static inline int ocp_module_init(struct ocp_driver *drv)
+{
+	int rc = ocp_register_driver(drv);
+
+	if (rc > 0)
+		return 0;
+
+	/* iff CONFIG_HOTPLUG and built into kernel, we should
+	 * leave the driver around for future hotplug events.
+	 * For the module case, a hotplug daemon of some sort
+	 * should load a module in response to an insert event. */
+#if defined(CONFIG_HOTPLUG) && !defined(MODULE)
+	if (rc == 0)
+		return 0;
+#else
+	if (rc == 0)
+		rc = -ENODEV;		
+#endif
+
+	/* if we get here, we need to clean up pci driver instance
+	 * and return some sort of error */
+	ocp_unregister_driver (drv);
+	
+	return rc;
+}
+
+#if defined (CONFIG_PM)
+/*
+ * This is right for the IBM 405 and 440 but will need to be
+ * generalized if the OCP stuff gets used on other processors.
+ */
+static inline void
+ocp_force_power_off(struct ocp_device *odev)
+{
+	mtdcr(DCRN_CPMFR, mfdcr(DCRN_CPMFR) | odev->pm);
+}
+
+static inline void
+ocp_force_power_on(struct ocp_device *odev)
+{
+	mtdcr(DCRN_CPMFR, mfdcr(DCRN_CPMFR) & ~odev->pm);
+}
+#else
+#define ocp_force_power_off(x)	(void)(x)
+#define ocp_force_power_on(x)	(void)(x)
+#endif
+
+extern void ocp_init(void);
+extern struct bus_type ocp_bus_type;
+extern struct ocp_device *ocp_get_dev(unsigned int device, int index);
+extern unsigned int ocp_get_num(unsigned int device);
+
+extern int ocp_generic_suspend(struct ocp_device *pdev, u32 state);
+extern int ocp_generic_resume(struct ocp_device *pdev);
+
+#endif				/* __OCP_H__ */
+#endif				/* __KERNEL__ */
diff -Nru a/include/asm-ppc/ocp_ids.h b/include/asm-ppc/ocp_ids.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ppc/ocp_ids.h	Wed Jan  8 20:04:45 2003
@@ -0,0 +1,103 @@
+/*
+ * FILE NAME: ocp_ids.h
+ *
+ * BRIEF MODULE DESCRIPTION: 
+ * OCP device ids based on the ideas from PCI
+ *
+ * Maintained by: Armin <akuster@mvista.com>
+ *
+ *
+ *  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.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  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.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Version 1.0 08/22/02 -Armin
+ *  	initial release
+ */
+
+/*
+ * Vender  device
+ * [xxxx]  [xxxx]
+ *
+ *  Keep in order, please
+ */
+
+/* Vendor IDs 0x0001 - 0xFFFF copied from pci_ids.h */
+
+#define	OCP_VENDOR_INVALID	0x0000
+#define	OCP_VENDOR_ARM		0x0004
+#define OCP_VENDOR_IBM		0x1014
+#define OCP_VENDOR_MOTOROLA	0x1057
+#define	OCP_VENDOR_XILINX	0x10ee
+#define	OCP_VENDOR_UNKNOWN	0xFFFF
+
+/* device identification */
+
+/* define type */
+#define OCP_FUNC_INVALID	0x0000
+
+/* system 0x0001 - 0x001F */
+#define	OCP_FUNC_UIC		0x0001
+
+/* Timers 0x0020 - 0x002F */
+#define OCP_FUNC_GPT		0x0020 	/* General purpose timers */
+#define OCP_FUNC_RTC		0x0021
+
+/* Serial 0x0030 - 0x006F*/
+#define OCP_FUNC_16550		0x0031 
+#define OCP_FUNC_SSP		0x0032 /* sync serial port */
+#define OCP_FUNC_SCP		0x0033 	/* serial controller port */
+#define OCP_FUNC_SCC		0x0034 	/* serial contoller */
+#define OCP_FUNC_SCI		0x0035 	/* Smart card */
+#define OCP_FUNC_IIC		0x0040 
+#define OCP_FUNC_USB		0x0050 
+#define OCP_FUNC_IR		0x0060		
+
+/* Memory devices 0x0090 - 0x009F */
+#define	OCP_FUNC_SDRAM		0x0091
+#define OCP_FUNC_DMA		0x0092
+
+/* Display 0x00A0 - 0x00AF */
+#define OCP_FUNC_VIDEO		0x00A0 
+#define OCP_FUNC_LED		0x00A1
+#define	OCP_FUNC_LCD		0x00A2
+
+/* Sound 0x00B0 - 0x00BF */
+#define OCP_FUNC_AUDIO		0x00B0 
+
+/* Mass Storage 0x00C0 - 0xxCF */
+#define OCP_FUNC_IDE		0x00C0 
+
+/* Misc 0x00D0 - 0x00DF*/
+#define OCP_FUNC_GPIO		0x00D0 
+#define OCP_FUNC_ZMII		0x00D1
+
+/* Network 0x0200 - 0x02FF */
+#define OCP_FUNC_EMAC		0x0200 
+
+/* Bridge devices 0xE00 - 0xEFF */
+#define OCP_FUNC_HOST		0x0E00 
+#define OCP_FUNC_DCR		0x0E01 
+#define OCP_FUNC_OPB		0x0E02
+#define OCP_FUNC_PHY		0x0E03
+#define OCP_FUNC_EXT		0x0E04
+#define	OCP_FUNC_PCI		0x0E05
+#define	OCP_FUNC_PLB		0x0E06
+
+#define OCP_FUNC_UNKNOWN	0xFFFF
diff -Nru a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h
--- a/include/asm-ppc/open_pic.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/open_pic.h	Wed Jan  8 20:04:43 2003
@@ -25,19 +25,6 @@
 #define OPENPIC_VEC_IPI		72	/* and up */
 #define OPENPIC_VEC_SPURIOUS	127
 
-/*
- * For the OpenPIC_InitSenses table, we include both the sense
- * and polarity in one number and mask out the value we want
- * later on. -- Tom
- */
-#define IRQ_SENSE_MASK		0x1
-#define IRQ_SENSE_LEVEL		0x1
-#define IRQ_SENSE_EDGE		0x0
-
-#define IRQ_POLARITY_MASK	0x2
-#define IRQ_POLARITY_POSITIVE	0x2
-#define IRQ_POLARITY_NEGATIVE	0x0
-
 /* OpenPIC IRQ controller structure */
 extern struct hw_interrupt_type open_pic;
 
diff -Nru a/include/asm-ppc/page.h b/include/asm-ppc/page.h
--- a/include/asm-ppc/page.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/page.h	Wed Jan  8 20:04:43 2003
@@ -62,7 +62,7 @@
 
 
 /* align addr on a size boundry - adjust address up if needed -- Cort */
-#define _ALIGN(addr,size)	(((addr)+size-1)&(~(size-1)))
+#define _ALIGN(addr,size)	(((addr)+(size)-1)&(~((size)-1)))
 
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr)	(((addr)+PAGE_SIZE-1)&PAGE_MASK)
diff -Nru a/include/asm-ppc/param.h b/include/asm-ppc/param.h
--- a/include/asm-ppc/param.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/param.h	Wed Jan  8 20:04:43 2003
@@ -9,7 +9,7 @@
 #define HZ		100		/* internal timer frequency */
 #define USER_HZ		100		/* for user interfaces in "ticks" */
 #define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
-#endif
+#endif /* __KERNEL__ */
 
 #define EXEC_PAGESIZE	4096
 
diff -Nru a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h
--- a/include/asm-ppc/pci-bridge.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/pci-bridge.h	Wed Jan  8 20:04:43 2003
@@ -23,15 +23,6 @@
 extern void pci_init_resource(struct resource *res, unsigned long start,
 			      unsigned long end, int flags, char *name);
 
-/*
- * PCI <-> OF matching functions 
- */
-extern int pci_device_from_OF_node(struct device_node *node,
-				   u8* bus, u8* devfn);
-extern struct device_node* pci_busdev_to_OF_node(struct pci_bus *, int);
-extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
-extern void pci_create_OF_bus_map(void);
-
 /* Get the PCI host controller for a bus */
 extern struct pci_controller* pci_bus_to_hose(int bus);
 
diff -Nru a/include/asm-ppc/ppc4xx_pic.h b/include/asm-ppc/ppc4xx_pic.h
--- a/include/asm-ppc/ppc4xx_pic.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/ppc4xx_pic.h	Wed Jan  8 20:04:43 2003
@@ -17,11 +17,12 @@
 /* External Global Variables */
 
 extern struct hw_interrupt_type *ppc4xx_pic;
-
+extern unsigned int ibm4xxPIC_NumInitSenses;
+extern unsigned char *ibm4xxPIC_InitSenses;
 
 /* Function Prototypes */
 
-extern void	 ppc4xx_pic_init(void);
-extern int	 ppc4xx_pic_get_irq(struct pt_regs *regs);
+extern void ppc4xx_pic_init(void);
+extern int ppc4xx_pic_get_irq(struct pt_regs *regs);
 
-#endif /* __PPC4XX_PIC_H__ */
+#endif				/* __PPC4XX_PIC_H__ */
diff -Nru a/include/asm-ppc/ppc_asm.h b/include/asm-ppc/ppc_asm.h
--- a/include/asm-ppc/ppc_asm.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/ppc_asm.h	Wed Jan  8 20:04:43 2003
@@ -107,7 +107,7 @@
 	bdnz	0b
 #endif
 
-#ifndef CONFIG_PPC_ISERIES
+#if !defined(CONFIG_440)
 /*
  * On APUS (Amiga PowerPC cpu upgrade board), we don't know the
  * physical base address of RAM at compile time.
@@ -125,7 +125,7 @@
 	.align  1;				\
 	.long   0b;				\
 	.previous
-#else  /* CONFIG_PPC_ISERIES */
+#else  /* CONFIG_440 */
 
 #define tophys(rd,rs)				\
 	mr	rd,rs
@@ -133,12 +133,7 @@
 #define tovirt(rd,rs)				\
 	mr	rd,rs
 
-/* Macros to adjust thread priority for iSeries hardware multi-threading */
-#define HMT_LOW		or 1,1,1
-#define HMT_MEDIUM	or 2,2,2
-#define HMT_HIGH	or 3,3,3
-
-#endif /* CONFIG_PPC_ISERIES */
+#endif /* CONFIG_440 */
 
 /*
  * On 64-bit cpus, we use the rfid instruction instead of rfi, but
@@ -165,17 +160,6 @@
 #define MTMSRD(r)	mtmsr	r
 #define CLR_TOP32(r)
 #endif /* CONFIG_PPC64BRIDGE */
-
-#ifdef CONFIG_PPC_ISERIES
-#define HMT_LOW		or	1,1,1
-#define HMT_MEDIUM	or	2,2,2
-#define HMT_HIGH  	or	3,3,3
-#else /* CONFIG_PPC_ISERIES */
-#define HMT_LOW		/* nothing */
-#define HMT_MEDIUM	/* nothing */
-#define HMT_HIGH	/* nothing */
-
-#endif /* CONFIG_PPC_ISERIES */
 
 #ifdef CONFIG_IBM405_ERR77
 #define PPC405_ERR77(ra,rb)	dcbt	ra, rb;
diff -Nru a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
--- a/include/asm-ppc/processor.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-ppc/processor.h	Wed Jan  8 20:04:32 2003
@@ -562,29 +562,6 @@
 
 #define proc_trap()  	asm volatile("trap")
 
-#ifdef CONFIG_PPC_ISERIES
-/* Macros for adjusting thread priority (hardware multi-threading) */
-#define	HMT_PRIO_LOW	"or 1,1,1\n"	/* low prio, used for spin loops */
-#define HMT_PRIO_MED	"or 2,2,2\n"	/* medium prio, for normal code */
-#define HMT_PRIO_HIGH	"or 3,3,3\n"	/* high priority */
-
-#define HMT_low()	asm volatile("or 1,1,1")
-#define HMT_medium()	asm volatile("or 2,2,2")
-#define HMT_high()	asm volatile("or 3,3,3")
-
-/* iSeries CTRL register (for runlatch) */
-
-#define CTRLT		0x098
-#define CTRLF		0x088
-#define RUNLATCH	0x0001
-
-#else /* !CONFIG_PPC_ISERIES */
-#define	HMT_PRIO_LOW
-#define HMT_PRIO_MED
-#define HMT_PRIO_HIGH
-
-#endif /* CONFIG_PPC_ISERIES */
-
 /* Segment Registers */
 
 #define SR0	0
@@ -678,9 +655,9 @@
 #define INIT_SP		(sizeof(init_stack) + (unsigned long) &init_stack)
 
 #define INIT_THREAD  { \
-	ksp: INIT_SP, \
-	fs: KERNEL_DS, \
-	pgdir: swapper_pg_dir, \
+	.ksp = INIT_SP, \
+	.fs = KERNEL_DS, \
+	.pgdir = swapper_pg_dir, \
 }
 
 /*
diff -Nru a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h
--- a/include/asm-ppc/prom.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-ppc/prom.h	Wed Jan  8 20:04:44 2003
@@ -92,6 +92,17 @@
 		     unsigned long *outputs, ...);
 
 /*
+ * PCI <-> OF matching functions 
+ */
+struct pci_bus;
+struct pci_dev;
+extern int pci_device_from_OF_node(struct device_node *node,
+				   u8* bus, u8* devfn);
+extern struct device_node* pci_busdev_to_OF_node(struct pci_bus *, int);
+extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
+extern void pci_create_OF_bus_map(void);
+
+/*
  * When we call back to the Open Firmware client interface, we usually
  * have to do that before the kernel is relocated to its final location
  * (this is because we can't use OF after we have overwritten the
diff -Nru a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h
--- a/include/asm-ppc/ptrace.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-ppc/ptrace.h	Wed Jan  8 20:04:44 2003
@@ -37,8 +37,6 @@
 	unsigned long result; 		/* Result of a system call */
 };
 
-/* iSeries uses mq field for soft enable flag */
-#define softEnable mq
 #endif /* __ASSEMBLY__ */
 
 #ifdef __KERNEL__
diff -Nru a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h
--- a/include/asm-ppc/signal.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/signal.h	Wed Jan  8 20:04:43 2003
@@ -111,7 +111,7 @@
 #define SA_PROBE		SA_ONESHOT
 #define SA_SAMPLE_RANDOM	SA_RESTART
 #define SA_SHIRQ		0x04000000
-#endif
+#endif /* __KERNEL__ */
 
 #define SIG_BLOCK          0	/* for blocking signals */
 #define SIG_UNBLOCK        1	/* for unblocking signals */
@@ -150,7 +150,6 @@
 
 #ifdef __KERNEL__
 #include <asm/sigcontext.h>
-
-#endif
+#endif /* __KERNEL__ */
 
 #endif
diff -Nru a/include/asm-ppc/socket.h b/include/asm-ppc/socket.h
--- a/include/asm-ppc/socket.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/socket.h	Wed Jan  8 20:04:43 2003
@@ -65,6 +65,6 @@
 					/* other similar things on the	*/
 					/* user level.			*/
 #define	SOCK_MAX	(SOCK_PACKET+1)
-#endif
+#endif /* __KERNEL__ */
 
 #endif /* _ASM_SOCKET_H */
diff -Nru a/include/asm-ppc/spinlock.h b/include/asm-ppc/spinlock.h
--- a/include/asm-ppc/spinlock.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc/spinlock.h	Wed Jan  8 20:04:43 2003
@@ -37,12 +37,10 @@
 
 	__asm__ __volatile__(
 	"b	1f		# spin_lock\n\
-2:"	HMT_PRIO_LOW
-"	lwzx	%0,0,%1\n\
+2:	lwzx	%0,0,%1\n\
 	cmpwi	0,%0,0\n\
-	bne+	2b\n"
-	HMT_PRIO_MED
-"1:	lwarx	%0,0,%1\n\
+	bne+	2b\n\
+1:	lwarx	%0,0,%1\n\
 	cmpwi	0,%0,0\n\
 	bne-	2b\n"
 	PPC405_ERR77(0,%1)
@@ -107,12 +105,10 @@
 
 	__asm__ __volatile__(
 	"b	2f		# read_lock\n\
-1:"	HMT_PRIO_LOW
-"	lwzx	%0,0,%1\n\
+1:	lwzx	%0,0,%1\n\
 	cmpwi	0,%0,0\n\
-	blt+	1b\n"
-	HMT_PRIO_MED
-"2:	lwarx	%0,0,%1\n\
+	blt+	1b\n\
+2:	lwarx	%0,0,%1\n\
 	addic.	%0,%0,1\n\
 	ble-	1b\n"
 	PPC405_ERR77(0,%1)
@@ -146,12 +142,10 @@
 
 	__asm__ __volatile__(
 	"b	2f		# write_lock\n\
-1:"	HMT_PRIO_LOW
-"  	lwzx	%0,0,%1\n\
+1:  	lwzx	%0,0,%1\n\
 	cmpwi	0,%0,0\n\
-	bne+	1b\n"
-	HMT_PRIO_MED
-"2:	lwarx	%0,0,%1\n\
+	bne+	1b\n\
+2:	lwarx	%0,0,%1\n\
 	cmpwi	0,%0,0\n\
 	bne-	1b\n"
 	PPC405_ERR77(0,%1)
diff -Nru a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h
--- a/include/asm-ppc/termios.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ppc/termios.h	Wed Jan  8 20:04:45 2003
@@ -153,7 +153,7 @@
 #ifdef __KERNEL__
 /*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^U  */
 #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 
-#endif
+#endif	/* __KERNEL__ */
 
 /* modem lines */
 #define TIOCM_LE	0x001
diff -Nru a/include/asm-ppc/time.h b/include/asm-ppc/time.h
--- a/include/asm-ppc/time.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-ppc/time.h	Wed Jan  8 20:04:32 2003
@@ -13,10 +13,6 @@
 #include <linux/mc146818rtc.h>
 #include <linux/threads.h>
 
-#ifdef CONFIG_PPC_ISERIES
-#include <asm/iSeries/Paca.h>
-#include <asm/iSeries/HvCall.h>
-#endif
 #include <asm/processor.h>
 
 /* time.c */
@@ -53,24 +49,6 @@
 	return;		/* Have to let it auto-reload */
 #elif defined(CONFIG_8xx_CPU6)
 	set_dec_cpu6(val);
-#elif defined(CONFIG_PPC_ISERIES)
-/*
- * Add code here to set the virtual decrementer in 
- * ItLpPaca if we have shared processors and to
- * invoke the hypervisor as needed.
- */
-	struct Paca * paca;
-	int cur_dec;
-	
-	paca = (struct Paca *)mfspr(SPRG1);
-	if ( paca->xLpPaca.xSharedProc ) {
-		paca->xLpPaca.xVirtualDecr = val;
-		cur_dec = get_dec();
-		if ( cur_dec > val )
-			HvCall_setVirtualDecr();
-	}
-	else
-		mtspr(SPRN_DEC, val);
 #else
 	mtspr(SPRN_DEC, val);
 #endif
diff -Nru a/include/asm-ppc/uaccess.h b/include/asm-ppc/uaccess.h
--- a/include/asm-ppc/uaccess.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-ppc/uaccess.h	Wed Jan  8 20:04:32 2003
@@ -56,8 +56,6 @@
 	unsigned long insn, fixup;
 };
 
-/* Returns 0 if exception not found and fixup otherwise.  */
-extern unsigned long search_exception_table(unsigned long);
 extern void sort_exception_table(void);
 
 /*
diff -Nru a/include/asm-ppc64/compat.h b/include/asm-ppc64/compat.h
--- a/include/asm-ppc64/compat.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc64/compat.h	Wed Jan  8 20:04:43 2003
@@ -5,9 +5,25 @@
  */
 #include <linux/types.h>
 
+#define COMPAT_USER_HZ	100
+
 typedef u32		compat_size_t;
 typedef s32		compat_ssize_t;
 typedef s32		compat_time_t;
+typedef s32		compat_clock_t;
+typedef s32		compat_pid_t;
+typedef u32		compat_uid_t;
+typedef u32		compat_gid_t;
+typedef u32		compat_mode_t;
+typedef u32		compat_ino_t;
+typedef u32		compat_dev_t;
+typedef s32		compat_off_t;
+typedef s64		compat_loff_t;
+typedef s16		compat_nlink_t;
+typedef u16		compat_ipc_pid_t;
+typedef s32		compat_daddr_t;
+typedef u32		compat_caddr_t;
+typedef __kernel_fsid_t	compat_fsid_t;
 
 struct compat_timespec {
 	compat_time_t	tv_sec;
@@ -17,6 +33,35 @@
 struct compat_timeval {
 	compat_time_t	tv_sec;
 	s32		tv_usec;
+};
+
+struct compat_stat {
+	compat_dev_t	st_dev;
+	compat_ino_t	st_ino;
+	compat_mode_t	st_mode;
+	compat_nlink_t	st_nlink;	
+	compat_uid_t	st_uid;
+	compat_gid_t	st_gid;
+	compat_dev_t	st_rdev;
+	compat_off_t	st_size;
+	compat_off_t	st_blksize;
+	compat_off_t	st_blocks;
+	compat_time_t	st_atime;
+	u32		__unused1;
+	compat_time_t	st_mtime;
+	u32		__unused2;
+	compat_time_t	st_ctime;
+	u32		__unused3;
+	u32		__unused4[2];
+};
+
+struct compat_flock {
+	short		l_type;
+	short		l_whence;
+	compat_off_t	l_start;
+	compat_off_t	l_len;
+	compat_pid_t	l_pid;
+	short		__unused;
 };
 
 #endif /* _ASM_PPC64_COMPAT_H */
diff -Nru a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
--- a/include/asm-ppc64/page.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-ppc64/page.h	Wed Jan  8 20:04:32 2003
@@ -48,7 +48,7 @@
 	lines = naca->dCacheL1LinesPerPage;
 
 	__asm__ __volatile__(
-"  	mtctr  	%1\n\
+	"mtctr  	%1	# clear_page\n\
 1:      dcbz  	0,%0\n\
 	add	%0,%0,%3\n\
 	bdnz+	1b"
diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h
--- a/include/asm-ppc64/pgtable.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ppc64/pgtable.h	Wed Jan  8 20:04:45 2003
@@ -267,8 +267,8 @@
 {
 	unsigned long old, tmp;
 
-	__asm__ __volatile__("\n\
-1:	ldarx	%0,0,%3	\n\
+	__asm__ __volatile__(
+	"1:	ldarx	%0,0,%3		# pte_update\n\
 	andc	%1,%0,%4 \n\
 	or	%1,%1,%5 \n\
 	stdcx.	%1,0,%3 \n\
diff -Nru a/include/asm-ppc64/ppc32.h b/include/asm-ppc64/ppc32.h
--- a/include/asm-ppc64/ppc32.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc64/ppc32.h	Wed Jan  8 20:04:43 2003
@@ -14,11 +14,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#ifndef __KERNEL_STRICT_NAMES
-#include <linux/types.h>
-typedef __kernel_fsid_t __kernel_fsid_t32;
-#endif
-
 /* Use this to get at 32-bit user passed pointers. */
 /* Things to consider: the low-level assembly stub does
    srl x, 0, x for first four arguments, so if you have
@@ -44,21 +39,6 @@
 })
 
 /* These are here to support 32-bit syscalls on a 64-bit kernel. */
-typedef int		__kernel_ptrdiff_t32;
-typedef int		__kernel_clock_t32;
-typedef int		__kernel_pid_t32;
-typedef unsigned short	__kernel_ipc_pid_t32;
-typedef unsigned int	__kernel_uid_t32;
-typedef unsigned int	__kernel_gid_t32;
-typedef unsigned int	__kernel_dev_t32;
-typedef unsigned int	__kernel_ino_t32;
-typedef unsigned int	__kernel_mode_t32;
-typedef unsigned int	__kernel_umode_t32;
-typedef short		__kernel_nlink_t32;
-typedef int		__kernel_daddr_t32;
-typedef int		__kernel_off_t32;
-typedef unsigned int	__kernel_caddr_t32;
-typedef int		__kernel_loff_t32;
 
 struct statfs32 {
 	int f_type;
@@ -68,7 +48,7 @@
 	int f_bavail;
 	int f_files;
 	int f_ffree;
-	__kernel_fsid_t32 f_fsid;
+	compat_fsid_t f_fsid;
 	int f_namelen;  /* SunOS ignores this field. */
 	int f_spare[6];
 };
@@ -88,8 +68,8 @@
 
 		/* kill() */
 		struct {
-			__kernel_pid_t32 _pid;		/* sender's pid */
-			__kernel_uid_t32 _uid;		/* sender's uid */
+			compat_pid_t _pid;		/* sender's pid */
+			compat_uid_t _uid;		/* sender's uid */
 		} _kill;
 
 		/* POSIX.1b timers */
@@ -100,18 +80,18 @@
 
 		/* POSIX.1b signals */
 		struct {
-			__kernel_pid_t32 _pid;		/* sender's pid */
-			__kernel_uid_t32 _uid;		/* sender's uid */
+			compat_pid_t _pid;		/* sender's pid */
+			compat_uid_t _uid;		/* sender's uid */
 			sigval_t32 _sigval;
 		} _rt;
 
 		/* SIGCHLD */
 		struct {
-			__kernel_pid_t32 _pid;		/* which child */
-			__kernel_uid_t32 _uid;		/* sender's uid */
+			compat_pid_t _pid;		/* which child */
+			compat_uid_t _uid;		/* sender's uid */
 			int _status;			/* exit code */
-			__kernel_clock_t32 _utime;
-			__kernel_clock_t32 _stime;
+			compat_clock_t _utime;
+			compat_clock_t _stime;
 		} _sigchld;
 
 		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
@@ -160,35 +140,6 @@
 	int ss_flags;
 	compat_size_t ss_size;
 } stack_32_t;
-
-struct flock32 {
-	short l_type;
-	short l_whence;
-	__kernel_off_t32 l_start;
-	__kernel_off_t32 l_len;
-	__kernel_pid_t32 l_pid;
-	short __unused;
-};
-
-struct stat32 {
-	__kernel_dev_t32   st_dev; /* 2 */
-	__kernel_ino_t32   st_ino; /* 4  */
-	__kernel_mode_t32  st_mode; /* 2  */
-	short   	   st_nlink; /* 2 */
-	__kernel_uid_t32   st_uid; /* 2 */
-	__kernel_gid_t32   st_gid; /* 2 */
-	__kernel_dev_t32   st_rdev; /* 2 */
-	__kernel_off_t32   st_size; /* 4 */
-	__kernel_off_t32   st_blksize; /* 4 */
-	__kernel_off_t32   st_blocks; /* 4 */
-	compat_time_t    st_atime; /* 4 */
-	unsigned int       __unused1; /* 4 */
-	compat_time_t    st_mtime; /* 4 */
-	unsigned int       __unused2; /* 4 */
-	compat_time_t    st_ctime; /* 4 */
-	unsigned int       __unused3; /* 4 */
-	unsigned int  __unused4[2]; /* 2*4 */
-};
 
 struct sigcontext32 {
 	unsigned int	_unused[4];
diff -Nru a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h
--- a/include/asm-ppc64/prom.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ppc64/prom.h	Wed Jan  8 20:04:45 2003
@@ -155,12 +155,6 @@
         prom_arg_t *rets;     /* Pointer to return values in args[16]. */
 };
 
-typedef struct {
-	u32  printf;	/* void (*printf)(char *, ...); */
-	u32  memdump;	/* void (*memdump)(unsigned char *, unsigned long); */
-	u32  dummy;		/* void (*dummy)(void); */
-} yaboot_debug_t;
-
 struct prom_t {
 	unsigned long entry;
 	ihandle chosen;
@@ -171,9 +165,6 @@
 	unsigned long version;
 	unsigned long encode_phys_size;
 	struct bi_record *bi_recs;
-#ifdef DEBUG_YABOOT
-	yaboot_debug_t *yaboot;
-#endif
 };
 
 extern struct prom_t prom;
@@ -183,7 +174,7 @@
 /* Prototypes */
 extern void abort(void);
 extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
-    unsigned long, unsigned long, yaboot_debug_t *);
+    unsigned long, unsigned long);
 extern void prom_print(const char *msg);
 extern void relocate_nodes(void);
 extern void finish_device_tree(void);
diff -Nru a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h
--- a/include/asm-ppc64/smp.h	Wed Jan  8 20:04:31 2003
+++ b/include/asm-ppc64/smp.h	Wed Jan  8 20:04:31 2003
@@ -52,7 +52,7 @@
 	return nr;
 }
 
-extern volatile unsigned long cpu_callin_map[NR_CPUS];
+extern volatile unsigned int cpu_callin_map[NR_CPUS];
 
 #define smp_processor_id() (get_paca()->xPacaIndex)
 
diff -Nru a/include/asm-ppc64/tlb.h b/include/asm-ppc64/tlb.h
--- a/include/asm-ppc64/tlb.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-ppc64/tlb.h	Wed Jan  8 20:04:43 2003
@@ -62,7 +62,7 @@
 			if (i == PPC64_TLB_BATCH_NR) {
 				int local = 0;
 
-				if (tlb->mm->cpu_vm_mask == (1 << cpu))
+				if (tlb->mm->cpu_vm_mask == (1UL << cpu))
 					local = 1;
 
 				flush_hash_range(tlb->mm->context, i, local);
@@ -80,7 +80,7 @@
 	struct ppc64_tlb_batch *batch = &ppc64_tlb_batch[cpu];
 	int local = 0;
 
-	if (tlb->mm->cpu_vm_mask == (1 << smp_processor_id()))
+	if (tlb->mm->cpu_vm_mask == (1UL << smp_processor_id()))
 		local = 1;
 
 	flush_hash_range(tlb->mm->context, batch->index, local);
diff -Nru a/include/asm-ppc64/topology.h b/include/asm-ppc64/topology.h
--- a/include/asm-ppc64/topology.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-ppc64/topology.h	Wed Jan  8 20:04:45 2003
@@ -41,7 +41,7 @@
 
 	for(cpu = 0; cpu < NR_CPUS; cpu++)
 		if (numa_cpu_lookup_table[cpu] == node)
-			mask |= 1 << cpu;
+			mask |= 1UL << cpu;
 
 	return mask;
 }
diff -Nru a/include/asm-ppc64/xics.h b/include/asm-ppc64/xics.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ppc64/xics.h	Wed Jan  8 20:04:44 2003
@@ -0,0 +1,18 @@
+/* 
+ * arch/ppc64/kernel/xics.h
+ *
+ * Copyright 2000 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 _PPC64_KERNEL_XICS_H
+#define _PPC64_KERNEL_XICS_H
+
+void xics_init_IRQ(void);
+int xics_get_irq(struct pt_regs *);
+
+#endif /* _PPC64_KERNEL_XICS_H */
diff -Nru a/include/asm-s390x/compat.h b/include/asm-s390x/compat.h
--- a/include/asm-s390x/compat.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-s390x/compat.h	Wed Jan  8 20:04:44 2003
@@ -58,4 +58,13 @@
 	u32		__unused5;
 };
 
+struct compat_flock {
+	short		l_type;
+	short		l_whence;
+	compat_off_t	l_start;
+	compat_off_t	l_len;
+	compat_pid_t	l_pid;
+	short		__unused;
+};
+
 #endif /* _ASM_S390X_COMPAT_H */
diff -Nru a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h
--- a/include/asm-sparc/bitops.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-sparc/bitops.h	Wed Jan  8 20:04:45 2003
@@ -9,9 +9,8 @@
 #ifndef _SPARC_BITOPS_H
 #define _SPARC_BITOPS_H
 
-#include <linux/kernel.h>
+#include <linux/compiler.h>
 #include <asm/byteorder.h>
-#include <asm/system.h>
 
 #ifdef __KERNEL__
 
diff -Nru a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h
--- a/include/asm-sparc/ide.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-sparc/ide.h	Wed Jan  8 20:04:44 2003
@@ -78,11 +78,9 @@
 #define ide_release_region(from,extent)		release_region((from), (extent))
 
 /*
- * The following are not needed for the non-m68k ports
+ * The following is not needed for the non-m68k ports
  */
 #define ide_ack_intr(hwif)		(1)
-#define ide_release_lock(lock)		do {} while (0)
-#define ide_get_lock(lock, hdlr, data)	do {} while (0)
 
 /* XXX Known to be broken.  Axboe will fix the problems this
  * XXX has by making seperate IN/OUT macros for IDE_DATA
diff -Nru a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h
--- a/include/asm-sparc/sbus.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-sparc/sbus.h	Wed Jan  8 20:04:43 2003
@@ -121,4 +121,15 @@
 extern void sbus_dma_sync_single(struct sbus_dev *, dma_addr_t, size_t, int);
 extern void sbus_dma_sync_sg(struct sbus_dev *, struct scatterlist *, int, int);
 
+/* Eric Brower (ebrower@usa.net)
+ * Translate SBus interrupt levels to ino values--
+ * this is used when converting sbus "interrupts" OBP 
+ * node values to "intr" node values, and is platform 
+ * dependent.  If only we could call OBP with 
+ * "sbus-intr>cpu (sbint -- ino)" from kernel...
+ * See .../drivers/sbus/sbus.c for details.
+ */
+BTFIXUPDEF_CALL(unsigned int, sbint_to_irq, struct sbus_dev *sdev, unsigned int)
+#define sbint_to_irq(sdev, sbint) BTFIXUP_CALL(sbint_to_irq)(sdev, sbint)
+
 #endif /* !(_SPARC_SBUS_H) */
diff -Nru a/include/asm-sparc/system.h b/include/asm-sparc/system.h
--- a/include/asm-sparc/system.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-sparc/system.h	Wed Jan  8 20:04:44 2003
@@ -7,6 +7,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/threads.h>	/* NR_CPUS */
+#include <linux/thread_info.h>
 
 #include <asm/segment.h>
 #include <asm/page.h>
diff -Nru a/include/asm-sparc/thread_info.h b/include/asm-sparc/thread_info.h
--- a/include/asm-sparc/thread_info.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-sparc/thread_info.h	Wed Jan  8 20:04:45 2003
@@ -11,8 +11,6 @@
 #ifndef _ASM_THREAD_INFO_H
 #define _ASM_THREAD_INFO_H
 
-// XXX todo: comment thread_info components and see what breaks.
-
 #ifdef __KERNEL__
 
 #ifndef __ASSEMBLY__
diff -Nru a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h
--- a/include/asm-sparc64/compat.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-sparc64/compat.h	Wed Jan  8 20:04:44 2003
@@ -5,32 +5,25 @@
  */
 #include <linux/types.h>
 
-#define COMPAT_USER_HZ 100
+#define COMPAT_USER_HZ	100
 
 typedef u32		compat_size_t;
 typedef s32		compat_ssize_t;
 typedef s32		compat_time_t;
 typedef s32		compat_clock_t;
-
-struct compat_stat {
-	__kernel_dev_t32	st_dev;
-	__kernel_ino_t32	st_ino;
-	__kernel_mode_t32	st_mode;
-	s16			st_nlink;
-	__kernel_uid_t32	st_uid;
-	__kernel_gid_t32	st_gid;
-	__kernel_dev_t32	st_rdev;
-	__kernel_off_t32	st_size;
-	compat_time_t		st_atime;
-	u32			__unused1;
-	compat_time_t		st_mtime;
-	u32			__unused2;
-	compat_time_t		st_ctime;
-	u32			__unused3;
-	__kernel_off_t32	st_blksize;
-	__kernel_off_t32	st_blocks;
-	u32			__unused4[2];
-};
+typedef s32		compat_pid_t;
+typedef u16		compat_uid_t;
+typedef u16		compat_gid_t;
+typedef u16		compat_mode_t;
+typedef u32		compat_ino_t;
+typedef u16		compat_dev_t;
+typedef s32		compat_off_t;
+typedef s64		compat_loff_t;
+typedef s16		compat_nlink_t;
+typedef u16		compat_ipc_pid_t;
+typedef s32		compat_daddr_t;
+typedef u32		compat_caddr_t;
+typedef __kernel_fsid_t	compat_fsid_t;
 
 struct compat_timespec {
 	compat_time_t	tv_sec;
@@ -40,6 +33,35 @@
 struct compat_timeval {
 	compat_time_t	tv_sec;
 	s32		tv_usec;
+};
+
+struct compat_stat {
+	compat_dev_t	st_dev;
+	compat_ino_t	st_ino;
+	compat_mode_t	st_mode;
+	compat_nlink_t	st_nlink;
+	compat_uid_t	st_uid;
+	compat_gid_t	st_gid;
+	compat_dev_t	st_rdev;
+	compat_off_t	st_size;
+	compat_time_t	st_atime;
+	u32		__unused1;
+	compat_time_t	st_mtime;
+	u32		__unused2;
+	compat_time_t	st_ctime;
+	u32		__unused3;
+	compat_off_t	st_blksize;
+	compat_off_t	st_blocks;
+	u32		__unused4[2];
+};
+
+struct compat_flock {
+	short		l_type;
+	short		l_whence;
+	compat_off_t	l_start;
+	compat_off_t	l_len;
+	compat_pid_t	l_pid;
+	short		__unused;
 };
 
 #endif /* _ASM_SPARC64_COMPAT_H */
diff -Nru a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h
--- a/include/asm-sparc64/fcntl.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-sparc64/fcntl.h	Wed Jan  8 20:04:45 2003
@@ -79,17 +79,6 @@
 };
 
 #ifdef __KERNEL__
-struct flock32 {
-	short l_type;
-	short l_whence;
-	__kernel_off_t32 l_start;
-	__kernel_off_t32 l_len;
-	__kernel_pid_t32 l_pid;
-	short __unused;
-};
-#endif
-
-#ifdef __KERNEL__
 #define flock64	flock
 #endif
 
diff -Nru a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
--- a/include/asm-sparc64/ide.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-sparc64/ide.h	Wed Jan  8 20:04:43 2003
@@ -75,11 +75,9 @@
 #define ide_release_region(from,extent)		release_region((from), (extent))
 
 /*
- * The following are not needed for the non-m68k ports
+ * The following is not needed for the non-m68k ports
  */
 #define ide_ack_intr(hwif)		(1)
-#define ide_release_lock(lock)		do {} while (0)
-#define ide_get_lock(lock, hdlr, data)	do {} while (0)
 
 /* XXX Known to be broken.  Axboe will fix the problems this
  * XXX has by making seperate IN/OUT macros for IDE_DATA
diff -Nru a/include/asm-sparc64/posix_types.h b/include/asm-sparc64/posix_types.h
--- a/include/asm-sparc64/posix_types.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-sparc64/posix_types.h	Wed Jan  8 20:04:45 2003
@@ -47,23 +47,6 @@
 #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
 } __kernel_fsid_t;
 
-/* Now 32bit compatibility types */
-typedef int                    __kernel_ptrdiff_t32;
-typedef int                    __kernel_pid_t32;
-typedef unsigned short         __kernel_ipc_pid_t32;
-typedef unsigned short         __kernel_uid_t32;
-typedef unsigned short         __kernel_gid_t32;
-typedef unsigned short         __kernel_dev_t32;
-typedef unsigned int           __kernel_ino_t32;
-typedef unsigned short         __kernel_mode_t32;
-typedef unsigned short         __kernel_umode_t32;
-typedef short                  __kernel_nlink_t32;
-typedef int                    __kernel_daddr_t32;
-typedef int                    __kernel_off_t32;
-typedef unsigned int           __kernel_caddr_t32;
-typedef long		       __kernel_loff_t32;
-typedef __kernel_fsid_t        __kernel_fsid_t32;
-
 #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
 
 #undef __FD_SET
diff -Nru a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
--- a/include/asm-sparc64/siginfo.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-sparc64/siginfo.h	Wed Jan  8 20:04:44 2003
@@ -13,7 +13,7 @@
 
 #ifdef __KERNEL__
 
-#include <asm/compat.h>
+#include <linux/compat.h>
 
 typedef union sigval32 {
 	int sival_int;
@@ -30,7 +30,7 @@
 
 		/* kill() */
 		struct {
-			__kernel_pid_t32 _pid;		/* sender's pid */
+			compat_pid_t _pid;		/* sender's pid */
 			unsigned int _uid;		/* sender's uid */
 		} _kill;
 
@@ -42,14 +42,14 @@
 
 		/* POSIX.1b signals */
 		struct {
-			__kernel_pid_t32 _pid;		/* sender's pid */
+			compat_pid_t _pid;		/* sender's pid */
 			unsigned int _uid;		/* sender's uid */
 			sigval_t32 _sigval;
 		} _rt;
 
 		/* SIGCHLD */
 		struct {
-			__kernel_pid_t32 _pid;		/* which child */
+			compat_pid_t _pid;		/* which child */
 			unsigned int _uid;		/* sender's uid */
 			int _status;			/* exit code */
 			compat_clock_t _utime;
diff -Nru a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
--- a/include/asm-sparc64/smp.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-sparc64/smp.h	Wed Jan  8 20:04:43 2003
@@ -8,12 +8,14 @@
 
 #include <linux/config.h>
 #include <linux/threads.h>
-#include <linux/cache.h>
 #include <asm/asi.h>
 #include <asm/starfire.h>
 #include <asm/spitfire.h>
 
 #ifndef __ASSEMBLY__
+
+#include <linux/cache.h>
+
 /* PROM provided per-processor information we need
  * to start them all up.
  */
diff -Nru a/include/asm-sparc64/statfs.h b/include/asm-sparc64/statfs.h
--- a/include/asm-sparc64/statfs.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-sparc64/statfs.h	Wed Jan  8 20:04:44 2003
@@ -5,6 +5,7 @@
 #ifndef __KERNEL_STRICT_NAMES
 
 #include <linux/types.h>
+#include <linux/compat.h>	/* for compat_fsid_t */
 
 typedef __kernel_fsid_t	fsid_t;
 
@@ -18,7 +19,7 @@
 	int f_bavail;
 	int f_files;
 	int f_ffree;
-	__kernel_fsid_t32 f_fsid;
+	compat_fsid_t f_fsid;
 	int f_namelen;  /* SunOS ignores this field. */
 	int f_spare[6];
 };
diff -Nru a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h
--- a/include/asm-sparc64/uaccess.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-sparc64/uaccess.h	Wed Jan  8 20:04:43 2003
@@ -84,8 +84,8 @@
         unsigned insn, fixup;
 };
 
-/* Returns 0 if exception not found and fixup otherwise.  */
-extern unsigned long search_exception_table(unsigned long, unsigned long *);
+/* Special exable search, which handles ranges.  Returns fixup */
+unsigned long search_extables_range(unsigned long addr, unsigned long *g2);
 
 extern void __ret_efault(void);
 
diff -Nru a/include/asm-x86_64/compat.h b/include/asm-x86_64/compat.h
--- a/include/asm-x86_64/compat.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-x86_64/compat.h	Wed Jan  8 20:04:44 2003
@@ -10,16 +10,22 @@
 typedef u32		compat_size_t;
 typedef s32		compat_ssize_t;
 typedef s32		compat_time_t;
-typedef s32		compat_suseconds_t;
 typedef s32		compat_clock_t;
 typedef s32		compat_pid_t;
 typedef u16		compat_uid_t;
 typedef u16		compat_gid_t;
+typedef u32		compat_uid32_t;
+typedef u32		compat_gid32_t;
 typedef u16		compat_mode_t;
 typedef u32		compat_ino_t;
 typedef u16		compat_dev_t;
 typedef s32		compat_off_t;
+typedef s64		compat_loff_t;
 typedef u16		compat_nlink_t;
+typedef u16		compat_ipc_pid_t;
+typedef s32		compat_daddr_t;
+typedef u32		compat_caddr_t;
+typedef __kernel_fsid_t	compat_fsid_t;
 
 struct compat_timespec {
 	compat_time_t	tv_sec;
@@ -52,6 +58,14 @@
 	u32		st_ctime_nsec;
 	u32		__unused4;
 	u32		__unused5;
+};
+
+struct compat_flock {
+	short		l_type;
+	short		l_whence;
+	compat_off_t	l_start;
+	compat_off_t	l_len;
+	compat_pid_t	l_pid;
 };
 
 #endif /* _ASM_X86_64_COMPAT_H */
diff -Nru a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h
--- a/include/asm-x86_64/ia32.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-x86_64/ia32.h	Wed Jan  8 20:04:45 2003
@@ -11,27 +11,6 @@
  * 32 bit structures for IA32 support.
  */
 
-/* 32bit compatibility types */
-typedef unsigned short	       __kernel_ipc_pid_t32;
-typedef unsigned 				__kernel_uid32_t32;
-typedef unsigned 				__kernel_gid32_t32;
-typedef unsigned short	       __kernel_umode_t32;
-typedef int		       __kernel_daddr_t32;
-typedef unsigned int	       __kernel_caddr_t32;
-typedef long		       __kernel_loff_t32;
-typedef __kernel_fsid_t	       __kernel_fsid_t32;
-
-
-/* fcntl.h */
-struct flock32 {
-       short l_type;
-       short l_whence;
-       compat_off_t l_start;
-       compat_off_t l_len;
-       compat_pid_t l_pid;
-};
-
-
 struct ia32_flock64 {
 	short  l_type;
 	short  l_whence;
@@ -130,7 +109,7 @@
        int f_bavail;
        int f_files;
        int f_ffree;
-       __kernel_fsid_t32 f_fsid;
+       compat_fsid_t f_fsid;
        int f_namelen;  /* SunOS ignores this field. */
        int f_spare[6];
 };
diff -Nru a/include/asm-x86_64/segment.h b/include/asm-x86_64/segment.h
--- a/include/asm-x86_64/segment.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-x86_64/segment.h	Wed Jan  8 20:04:45 2003
@@ -6,6 +6,8 @@
 
 #define __KERNEL32_CS   0x38
 
+#define __USER_LONGBASE	((GDT_ENTRY_LONGBASE * 8)  | 3)
+
 /* 
  * we cannot use the same code segment descriptor for user and kernel
  * even not in the long flat model, because of different DPL /kkeil 
@@ -23,6 +25,7 @@
 #define GDT_ENTRY_LDT 10
 #define GDT_ENTRY_TLS_MIN 11
 #define GDT_ENTRY_TLS_MAX 13
+#define GDT_ENTRY_LONGBASE 14
 
 #define GDT_ENTRY_TLS_ENTRIES 3
 
diff -Nru a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
--- a/include/asm-x86_64/smp.h	Wed Jan  8 20:04:32 2003
+++ b/include/asm-x86_64/smp.h	Wed Jan  8 20:04:32 2003
@@ -83,15 +83,16 @@
 	return ffz(~cpu_online_map); 	
 } 
 
+/* RED-PEN different from i386 */
 #define for_each_cpu(i) \
 	for((i) = find_first_cpu(); (i)>=0; (i)=find_next_cpu(i))
 
-extern volatile unsigned long cpu_callout_map;
-/* We don't mark CPUs online until __cpu_up(), so we need another measure */
 static inline int num_booting_cpus(void)
 {
 	return hweight32(cpu_callout_map);
 }
+
+extern volatile unsigned long cpu_callout_map;
 
 /*
  * Some lowlevel functions might want to know about
diff -Nru a/include/asm-x86_64/spinlock.h b/include/asm-x86_64/spinlock.h
--- a/include/asm-x86_64/spinlock.h	Wed Jan  8 20:04:45 2003
+++ b/include/asm-x86_64/spinlock.h	Wed Jan  8 20:04:45 2003
@@ -15,7 +15,7 @@
 
 typedef struct {
 	volatile unsigned int lock;
-#if SPINLOCK_DEBUG
+#if CONFIG_DEBUG_SPINLOCK
 	unsigned magic;
 #endif
 } spinlock_t;
diff -Nru a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
--- a/include/asm-x86_64/uaccess.h	Wed Jan  8 20:04:43 2003
+++ b/include/asm-x86_64/uaccess.h	Wed Jan  8 20:04:43 2003
@@ -71,9 +71,6 @@
 	unsigned long insn, fixup;
 };
 
-/* Returns 0 if exception not found and fixup otherwise.  */
-extern unsigned long search_exception_table(unsigned long);
-
 
 /*
  * These are the main single-value transfer routines.  They automatically
@@ -240,7 +237,7 @@
 extern unsigned long copy_to_user(void *to, const void *from, unsigned len); 
 extern unsigned long copy_from_user(void *to, const void *from, unsigned len); 
 
-static inline int __copy_from_user(void *dst, void *src, unsigned size) 
+static inline int __copy_from_user(void *dst, const void *src, unsigned size) 
 { 
 	if (!__builtin_constant_p(size))
 		return copy_user_generic(dst,src,size);
@@ -269,7 +266,7 @@
 	}
 }	
 
-static inline int __copy_to_user(void *dst, void *src, unsigned size) 
+static inline int __copy_to_user(void *dst, const void *src, unsigned size) 
 { 
 	if (!__builtin_constant_p(size))
 		return copy_user_generic(dst,src,size);
diff -Nru a/include/asm-x86_64/xor.h b/include/asm-x86_64/xor.h
--- a/include/asm-x86_64/xor.h	Wed Jan  8 20:04:44 2003
+++ b/include/asm-x86_64/xor.h	Wed Jan  8 20:04:44 2003
@@ -51,7 +51,7 @@
 		: "memory");			\
 } while(0)
 
-#define XMMS_RESTORE				\
+#define XMMS_RESTORE do {			\
 	asm volatile (				\
 		"sfence			;\n\t"	\
 		"movups (%1),%%xmm0	;\n\t"	\
diff -Nru a/include/linux/agp_backend.h b/include/linux/agp_backend.h
--- a/include/linux/agp_backend.h	Wed Jan  8 20:04:45 2003
+++ b/include/linux/agp_backend.h	Wed Jan  8 20:04:45 2003
@@ -60,8 +60,10 @@
 	VIA_APOLLO_KX133,
 	VIA_APOLLO_KT133,
 	VIA_APOLLO_KT400,
+	VIA_APOLLO_KT400_3,
 	VIA_APOLLO_PRO_266,
 	VIA_VT8605,
+	VIA_P4X,
 	SIS_GENERIC,
 	AMD_GENERIC,
 	AMD_IRONGATE,
diff -Nru a/include/linux/bio.h b/include/linux/bio.h
--- a/include/linux/bio.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/bio.h	Wed Jan  8 20:04:44 2003
@@ -219,6 +219,8 @@
 extern struct bio *bio_map_user(struct block_device *, unsigned long,
 				unsigned int, int);
 extern void bio_unmap_user(struct bio *, int);
+extern void bio_set_pages_dirty(struct bio *bio);
+extern void bio_check_pages_dirty(struct bio *bio);
 
 #ifdef CONFIG_HIGHMEM
 /*
diff -Nru a/include/linux/compat.h b/include/linux/compat.h
--- a/include/linux/compat.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/compat.h	Wed Jan  8 20:04:44 2003
@@ -9,9 +9,12 @@
 #ifdef CONFIG_COMPAT
 
 #include <linux/stat.h>
+#include <linux/param.h>	/* for HZ */
+#include <linux/fcntl.h>	/* for struct flock */
 #include <asm/compat.h>
 
-#define compat_jiffies_to_clock_t(x)	((x) / (HZ / COMPAT_USER_HZ))
+#define compat_jiffies_to_clock_t(x)	\
+		(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
 
 struct compat_utimbuf {
 	compat_time_t		actime;
@@ -31,6 +34,10 @@
 };
 
 extern int cp_compat_stat(struct kstat *, struct compat_stat *);
+extern int get_compat_flock(struct flock *, struct compat_flock *);
+extern int put_compat_flock(struct flock *, struct compat_flock *);
+extern int get_compat_timespec(struct timespec *, struct compat_timespec *);
+extern int put_compat_timespec(struct timespec *, struct compat_timespec *);
 
 #endif /* CONFIG_COMPAT */
 #endif /* _LINUX_COMPAT_H */
diff -Nru a/include/linux/crc32.h b/include/linux/crc32.h
--- a/include/linux/crc32.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/crc32.h	Wed Jan  8 20:04:43 2003
@@ -9,9 +9,19 @@
 
 extern u32  crc32_le(u32 crc, unsigned char const *p, size_t len);
 extern u32  crc32_be(u32 crc, unsigned char const *p, size_t len);
+extern u32  bitreverse(u32 in);
 
 #define crc32(seed, data, length)  crc32_le(seed, (unsigned char const *)data, length)
+
+/*
+ * Helpers for hash table generation of ethernet nics:
+ *
+ * Ethernet sends the least significant bit of a byte first, thus crc32_le
+ * is used. The output of crc32_le is bit reversed [most significant bit
+ * is in bit nr 0], thus it must be reversed before use. Except for
+ * nics that bit swap the result internally...
+ */
+#define ether_crc(length, data)    bitreverse(crc32_le(~0, data, length))
 #define ether_crc_le(length, data) crc32_le(~0, data, length)
-#define ether_crc(length, data)    crc32_be(~0, data, length)
 
 #endif /* _LINUX_CRC32_H */
diff -Nru a/include/linux/device.h b/include/linux/device.h
--- a/include/linux/device.h	Wed Jan  8 20:04:45 2003
+++ b/include/linux/device.h	Wed Jan  8 20:04:45 2003
@@ -66,10 +66,8 @@
 	char			* name;
 
 	struct subsystem	subsys;
-	struct subsystem	drvsubsys;
-	struct subsystem	devsubsys;
-	struct list_head	devices;
-	struct list_head	drivers;
+	struct kset		drivers;
+	struct kset		devices;
 
 	int		(*match)(struct device * dev, struct device_driver * drv);
 	struct device * (*add)	(struct device * parent, char * bus_id);
@@ -84,6 +82,7 @@
 extern struct bus_type * get_bus(struct bus_type * bus);
 extern void put_bus(struct bus_type * bus);
 
+extern struct bus_type * find_bus(char * name);
 
 /* iterator helpers for buses */
 
@@ -119,7 +118,6 @@
 
 	struct semaphore	unload_sem;
 	struct kobject		kobj;
-	struct list_head	bus_list;
 	struct list_head	class_list;
 	struct list_head	devices;
 
@@ -165,10 +163,8 @@
 	u32			devnum;
 
 	struct subsystem	subsys;
-	struct subsystem	devsubsys;
-	struct subsystem	drvsubsys;
-	struct list_head	drivers;
-	struct list_head	devices;
+	struct kset		devices;
+	struct kset		drivers;
 
 	int	(*add_device)(struct device *);
 	void	(*remove_device)(struct device *);
@@ -217,7 +213,7 @@
 	char			* name;
 	struct device_class	* devclass;
 
-	struct subsystem	subsys;
+	struct kset		kset;
 	u32			devnum;
 
 	int (*add_device)	(struct device *);
@@ -310,6 +306,14 @@
 extern void device_initialize(struct device * dev);
 extern int device_add(struct device * dev);
 extern void device_del(struct device * dev);
+
+/*
+ * Manual binding of a device to driver. See drivers/base/bus.c 
+ * for information on use.
+ */
+extern void device_bind_driver(struct device * dev);
+extern void device_release_driver(struct device * dev);
+
 
 /* driverfs interface for exporting device attributes */
 
diff -Nru a/include/linux/dirent.h b/include/linux/dirent.h
--- a/include/linux/dirent.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/dirent.h	Wed Jan  8 20:04:44 2003
@@ -16,4 +16,17 @@
 	char		d_name[256];
 };
 
+#ifdef __KERNEL__
+
+struct linux_dirent64 {
+	u64		d_ino;
+	s64		d_off;
+	unsigned short	d_reclen;
+	unsigned char	d_type;
+	char		d_name[0];
+};
+
+#endif	/* __KERNEL__ */
+
+
 #endif
diff -Nru a/include/linux/elf.h b/include/linux/elf.h
--- a/include/linux/elf.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/elf.h	Wed Jan  8 20:04:43 2003
@@ -159,6 +159,9 @@
 #define ELF32_ST_BIND(x) ((x) >> 4)
 #define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf)
 
+#define ELF64_ST_BIND(x) ((x) >> 4)
+#define ELF64_ST_TYPE(x) (((unsigned int) x) & 0xf)
+
 /* Symbolic values for the entries in the auxiliary table
    put on the initial stack */
 #define AT_NULL   0	/* end of vector */
@@ -362,22 +365,30 @@
 #define R_ALPHA_SREL16          9       /* PC relative 16 bit */
 #define R_ALPHA_SREL32          10      /* PC relative 32 bit */
 #define R_ALPHA_SREL64          11      /* PC relative 64 bit */
-#define R_ALPHA_OP_PUSH         12      /* OP stack push */
-#define R_ALPHA_OP_STORE        13      /* OP stack pop and store */
-#define R_ALPHA_OP_PSUB         14      /* OP stack subtract */
-#define R_ALPHA_OP_PRSHIFT      15      /* OP stack right shift */
-#define R_ALPHA_GPVALUE         16
-#define R_ALPHA_GPRELHIGH       17
-#define R_ALPHA_GPRELLOW        18
-#define R_ALPHA_IMMED_GP_16     19
-#define R_ALPHA_IMMED_GP_HI32   20
-#define R_ALPHA_IMMED_SCN_HI32  21
-#define R_ALPHA_IMMED_BR_HI32   22
-#define R_ALPHA_IMMED_LO32      23
+#define R_ALPHA_GPRELHIGH       17      /* GP relative 32 bit, high 16 bits */
+#define R_ALPHA_GPRELLOW        18      /* GP relative 32 bit, low 16 bits */
+#define R_ALPHA_GPREL16         19      /* GP relative 16 bit */
 #define R_ALPHA_COPY            24      /* Copy symbol at runtime */
 #define R_ALPHA_GLOB_DAT        25      /* Create GOT entry */
 #define R_ALPHA_JMP_SLOT        26      /* Create PLT entry */
 #define R_ALPHA_RELATIVE        27      /* Adjust by program base */
+#define R_ALPHA_BRSGP		28
+#define R_ALPHA_TLSGD           29
+#define R_ALPHA_TLS_LDM         30
+#define R_ALPHA_DTPMOD64        31
+#define R_ALPHA_GOTDTPREL       32
+#define R_ALPHA_DTPREL64        33
+#define R_ALPHA_DTPRELHI        34
+#define R_ALPHA_DTPRELLO        35
+#define R_ALPHA_DTPREL16        36
+#define R_ALPHA_GOTTPREL        37
+#define R_ALPHA_TPREL64         38
+#define R_ALPHA_TPRELHI         39
+#define R_ALPHA_TPRELLO         40
+#define R_ALPHA_TPREL16         41
+
+#define SHF_ALPHA_GPREL		0x10000000
+
 
 /* PowerPC relocations defined by the ABIs */
 #define R_PPC_NONE		0
diff -Nru a/include/linux/fb.h b/include/linux/fb.h
--- a/include/linux/fb.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/fb.h	Wed Jan  8 20:04:43 2003
@@ -425,6 +425,7 @@
 #define fb_readb __raw_readb
 #define fb_readw __raw_readw
 #define fb_readl __raw_readl
+#define fb_readq __raw_readq
 #define fb_writeb __raw_writeb
 #define fb_writew __raw_writew
 #define fb_writel __raw_writel
diff -Nru a/include/linux/fs.h b/include/linux/fs.h
--- a/include/linux/fs.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/fs.h	Wed Jan  8 20:04:43 2003
@@ -276,6 +276,7 @@
 struct page;
 struct address_space;
 struct writeback_control;
+struct kiocb;
 
 struct address_space_operations {
 	int (*writepage)(struct page *page, struct writeback_control *wbc);
@@ -301,7 +302,7 @@
 	sector_t (*bmap)(struct address_space *, sector_t);
 	int (*invalidatepage) (struct page *, unsigned long);
 	int (*releasepage) (struct page *, int);
-	int (*direct_IO)(int, struct file *, const struct iovec *iov,
+	int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
 			loff_t offset, unsigned long nr_segs);
 };
 
@@ -736,7 +737,6 @@
  * read, write, poll, fsync, readv, writev can be called
  *   without the big kernel lock held in all filesystems.
  */
-struct kiocb;
 struct file_operations {
 	struct module *owner;
 	loff_t (*llseek) (struct file *, loff_t, int);
@@ -1234,6 +1234,8 @@
 extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
 extern ssize_t generic_file_aio_read(struct kiocb *, char *, size_t, loff_t);
 extern ssize_t generic_file_aio_write(struct kiocb *, const char *, size_t, loff_t);
+extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *,
+				unsigned long, loff_t *);
 extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos);
 extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos);
 ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov,
@@ -1243,10 +1245,11 @@
 				    loff_t *, read_descriptor_t *, read_actor_t);
 extern void
 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
-extern ssize_t generic_file_direct_IO(int rw, struct file *file,
+extern ssize_t generic_file_direct_IO(int rw, struct kiocb *iocb,
 	const struct iovec *iov, loff_t offset, unsigned long nr_segs);
-extern int generic_direct_IO(int rw, struct inode *inode, struct block_device *bdev,
-	const struct iovec *iov, loff_t offset, unsigned long nr_segs, get_blocks_t *get_blocks);
+extern int blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, 
+	struct block_device *bdev, const struct iovec *iov, loff_t offset, 
+	unsigned long nr_segs, get_blocks_t *get_blocks);
 extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, 
 	unsigned long nr_segs, loff_t *ppos);
 ssize_t generic_file_writev(struct file *filp, const struct iovec *iov, 
diff -Nru a/include/linux/genhd.h b/include/linux/genhd.h
--- a/include/linux/genhd.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/genhd.h	Wed Jan  8 20:04:43 2003
@@ -85,8 +85,6 @@
 	struct request_queue *queue;
 	void *private_data;
 	sector_t capacity;
-	struct list_head list;
-	struct list_head full_list;
 
 	int flags;
 	int number;			/* devfs crap */
diff -Nru a/include/linux/highmem.h b/include/linux/highmem.h
--- a/include/linux/highmem.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/highmem.h	Wed Jan  8 20:04:44 2003
@@ -14,8 +14,6 @@
 /* declarations for linux/mm/highmem.c */
 unsigned int nr_free_highpages(void);
 
-extern void check_highmem_ptes(void);
-
 #else /* CONFIG_HIGHMEM */
 
 static inline unsigned int nr_free_highpages(void) { return 0; }
@@ -29,6 +27,13 @@
 #define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
 
 #endif /* CONFIG_HIGHMEM */
+
+#if defined(CONFIG_DEBUG_HIGHMEM) && defined(CONFIG_HIGHMEM)
+extern void check_highmem_ptes(void);
+#else
+static inline void check_highmem_ptes(void)
+{}
+#endif
 
 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
 static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
diff -Nru a/include/linux/if_arp.h b/include/linux/if_arp.h
--- a/include/linux/if_arp.h	Wed Jan  8 20:04:45 2003
+++ b/include/linux/if_arp.h	Wed Jan  8 20:04:45 2003
@@ -40,6 +40,7 @@
 #define ARPHRD_METRICOM	23		/* Metricom STRIP (new IANA id)	*/
 #define	ARPHRD_IEEE1394	24		/* IEEE 1394 IPv4 - RFC 2734	*/
 #define ARPHRD_EUI64	27		/* EUI-64                       */
+#define ARPHRD_INFINIBAND 32		/* InfiniBand			*/
 
 /* Dummy types for non ARP hardware */
 #define ARPHRD_SLIP	256
diff -Nru a/include/linux/init.h b/include/linux/init.h
--- a/include/linux/init.h	Wed Jan  8 20:04:32 2003
+++ b/include/linux/init.h	Wed Jan  8 20:04:32 2003
@@ -111,7 +111,8 @@
  * 
  * module_init() will either be called during do_initcalls (if
  * builtin) or at module insertion time (if a module).  There can only
- * be one per module. */
+ * be one per module.
+ */
 #define module_init(x)	__initcall(x);
 
 /**
diff -Nru a/include/linux/kernel.h b/include/linux/kernel.h
--- a/include/linux/kernel.h	Wed Jan  8 20:04:32 2003
+++ b/include/linux/kernel.h	Wed Jan  8 20:04:32 2003
@@ -84,6 +84,7 @@
 extern void dev_probe_lock(void);
 extern void dev_probe_unlock(void);
 
+extern int kernel_text_address(unsigned long addr);
 extern int session_of_pgrp(int pgrp);
 
 asmlinkage int printk(const char * fmt, ...)
@@ -105,7 +106,7 @@
 
 extern int tainted;
 extern const char *print_tainted(void);
-#define TAINT_PROPRIETORY_MODULE	(1<<0)
+#define TAINT_PROPRIETARY_MODULE	(1<<0)
 #define TAINT_FORCED_MODULE		(1<<1)
 #define TAINT_UNSAFE_SMP		(1<<2)
 #define TAINT_FORCED_RMMOD		(1<<3)
diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h
--- a/include/linux/kobject.h	Wed Jan  8 20:04:32 2003
+++ b/include/linux/kobject.h	Wed Jan  8 20:04:32 2003
@@ -3,7 +3,7 @@
  *
  */
 
-#ifndef _KOBJECT_H_
+#if defined(__KERNEL__) && !defined(_KOBJECT_H_)
 #define _KOBJECT_H_
 
 #include <linux/types.h>
@@ -19,7 +19,8 @@
 	atomic_t		refcount;
 	struct list_head	entry;
 	struct kobject		* parent;
-	struct subsystem	* subsys;
+	struct kset		* kset;
+	struct kobj_type	* ktype;
 	struct dentry		* dentry;
 };
 
@@ -36,28 +37,130 @@
 extern void kobject_put(struct kobject *);
 
 
-struct subsystem {
-	struct kobject		kobj;
-	struct list_head	list;
-	struct rw_semaphore	rwsem;
-	struct subsystem	* parent;
+struct kobj_type {
 	void (*release)(struct kobject *);
 	struct sysfs_ops	* sysfs_ops;
 	struct attribute	** default_attrs;
 };
 
+
+/**
+ *	kset - a set of kobjects of a specific type, belonging
+ *	to a specific subsystem.
+ *
+ *	All kobjects of a kset should be embedded in an identical 
+ *	type. This type may have a descriptor, which the kset points
+ *	to. This allows there to exist sets of objects of the same
+ *	type in different subsystems.
+ *
+ *	A subsystem does not have to be a list of only one type 
+ *	of object; multiple ksets can belong to one subsystem. All 
+ *	ksets of a subsystem share the subsystem's lock.
+ *
+ */
+struct kset {
+	struct subsystem	* subsys;
+	struct kobj_type	* ktype;
+	struct list_head	list;
+	struct kobject		kobj;
+};
+
+
+extern void kset_init(struct kset * k);
+extern int kset_add(struct kset * k);
+extern int kset_register(struct kset * k);
+extern void kset_unregister(struct kset * k);
+
+static inline struct kset * to_kset(struct kobject * kobj)
+{
+	return container_of(kobj,struct kset,kobj);
+}
+
+static inline struct kset * kset_get(struct kset * k)
+{
+	return k ? to_kset(kobject_get(&k->kobj)) : NULL;
+}
+
+static inline void kset_put(struct kset * k)
+{
+	kobject_put(&k->kobj);
+}
+
+
+extern struct kobject * kset_find_obj(struct kset *, char *);
+
+
+struct subsystem {
+	struct kset		kset;
+	struct rw_semaphore	rwsem;
+};
+
+#define decl_subsys(_name,_type) \
+struct subsystem _name##_subsys = { \
+	.kset = { \
+		.kobj = { .name = __stringify(_name) }, \
+		.ktype = _type, \
+	} \
+}
+
+
+/**
+ * Helpers for setting the kset of registered objects.
+ * Often, a registered object belongs to a kset embedded in a 
+ * subsystem. These do no magic, just make the resulting code
+ * easier to follow. 
+ */
+
+/**
+ *	kobj_set_kset_s(obj,subsys) - set kset for embedded kobject.
+ *	@obj:		ptr to some object type.
+ *	@subsys:	a subsystem object (not a ptr).
+ *
+ *	Can be used for any object type with an embedded ->kobj.
+ */
+
+#define kobj_set_kset_s(obj,subsys) \
+	(obj)->kobj.kset = &(subsys).kset
+
+/**
+ *	kset_set_kset_s(obj,subsys) - set kset for embedded kset.
+ *	@obj:		ptr to some object type.
+ *	@subsys:	a subsystem object (not a ptr).
+ *
+ *	Can be used for any object type with an embedded ->kset.
+ *	Sets the kset of @obj's  embedded kobject (via its embedded
+ *	kset) to @subsys.kset. This makes @obj a member of that 
+ *	kset.
+ */
+
+#define kset_set_kset_s(obj,subsys) \
+	(obj)->kset.kobj.kset = &(subsys).kset
+
+/**
+ *	subsys_set_kset(obj,subsys) - set kset for subsystem
+ *	@obj:		ptr to some object type.
+ *	@subsys:	a subsystem object (not a ptr).
+ *
+ *	Can be used for any object type with an embedded ->subsys.
+ *	Sets the kset of @obj's kobject to @subsys.kset. This makes
+ *	the object a member of that kset.
+ */
+
+#define subsys_set_kset(obj,_subsys) \
+	(obj)->subsys.kset.kobj.kset = &(_subsys).kset
+
 extern void subsystem_init(struct subsystem *);
 extern int subsystem_register(struct subsystem *);
 extern void subsystem_unregister(struct subsystem *);
 
 static inline struct subsystem * subsys_get(struct subsystem * s)
 {
-	return container_of(kobject_get(&s->kobj),struct subsystem,kobj);
+	return s ? container_of(kset_get(&s->kset),struct subsystem,kset) : NULL;
 }
 
 static inline void subsys_put(struct subsystem * s)
 {
-	kobject_put(&s->kobj);
+	kset_put(&s->kset);
 }
 
 struct subsys_attribute {
@@ -68,5 +171,6 @@
 
 extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
 extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *);
+
 
 #endif /* _KOBJECT_H_ */
diff -Nru a/include/linux/module.h b/include/linux/module.h
--- a/include/linux/module.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/module.h	Wed Jan  8 20:04:44 2003
@@ -21,7 +21,6 @@
 #include <asm/uaccess.h> /* For struct exception_table_entry */
 
 /* Not Yet Implemented */
-#define MODULE_LICENSE(name)
 #define MODULE_AUTHOR(name)
 #define MODULE_DESCRIPTION(desc)
 #define MODULE_SUPPORTED_DEVICE(name)
@@ -44,6 +43,12 @@
 extern int init_module(void);
 extern void cleanup_module(void);
 
+/* Archs provide a method of finding the correct exception table. */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+	       const struct exception_table_entry *last,
+	       unsigned long value);
+
 #ifdef MODULE
 
 /* For replacement modutils, use an alias not a pointer. */
@@ -57,11 +62,41 @@
 
 #define THIS_MODULE (&__this_module)
 
+/*
+ * The following license idents are currently accepted as indicating free
+ * software modules
+ *
+ *	"GPL"				[GNU Public License v2 or later]
+ *	"GPL v2"			[GNU Public License v2]
+ *	"GPL and additional rights"	[GNU Public License v2 rights and more]
+ *	"Dual BSD/GPL"			[GNU Public License v2
+ *					 or BSD license choice]
+ *	"Dual MPL/GPL"			[GNU Public License v2
+ *					 or Mozilla license choice]
+ *
+ * The following other idents are available
+ *
+ *	"Proprietary"			[Non free products]
+ *
+ * There are dual licensed components, but when running with Linux it is the
+ * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
+ * is a GPL combined work.
+ *
+ * This exists for several reasons
+ * 1.	So modinfo can show license info for users wanting to vet their setup 
+ *	is free
+ * 2.	So the community can ignore bug reports including proprietary modules
+ * 3.	So vendors can do likewise based on their own policies
+ */
+#define MODULE_LICENSE(license)					\
+	static const char __module_license[]			\
+		__attribute__((section(".init.license"))) = license
+
 #else  /* !MODULE */
 
 #define MODULE_GENERIC_TABLE(gtype,name)
 #define THIS_MODULE ((struct module *)0)
-
+#define MODULE_LICENSE(license)
 #endif
 
 #define MODULE_DEVICE_TABLE(type,name)		\
@@ -75,10 +110,16 @@
 	/* Module which owns it (if any) */
 	struct module *owner;
 
+	/* Are we internal use only? */
+	int gplonly;
+
 	unsigned int num_syms;
 	const struct kernel_symbol *syms;
 };
 
+/* Given an address, look for it in the exception tables */
+const struct exception_table_entry *search_exception_tables(unsigned long add);
+
 struct exception_table
 {
 	struct list_head list;
@@ -101,7 +142,11 @@
 	= { (unsigned long)&sym, MODULE_SYMBOL_PREFIX #sym }
 
 #define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym)
-#define EXPORT_SYMBOL_GPL(sym) EXPORT_SYMBOL(sym)
+
+#define EXPORT_SYMBOL_GPL(sym)				\
+	const struct kernel_symbol __ksymtab_##sym	\
+	__attribute__((section("__gpl_ksymtab")))	\
+	= { (unsigned long)&sym, #sym }
 
 struct module_ref
 {
@@ -128,6 +173,9 @@
 	/* Exported symbols */
 	struct kernel_symbol_group symbols;
 
+	/* GPL-only exported symbols. */
+	struct kernel_symbol_group gpl_symbols;
+
 	/* Exception tables */
 	struct exception_table extable;
 
@@ -149,6 +197,9 @@
 	/* Am I unsafe to unload? */
 	int unsafe;
 
+	/* Am I GPL-compatible */
+	int license_gplok;
+
 #ifdef CONFIG_MODULE_UNLOAD
 	/* Reference counts */
 	struct module_ref ref[NR_CPUS];
@@ -183,6 +234,9 @@
 	return mod->state != MODULE_STATE_GOING;
 }
 
+/* Is this address in a module? */
+int module_text_address(unsigned long addr);
+
 #ifdef CONFIG_MODULE_UNLOAD
 
 void __symbol_put(const char *symbol);
@@ -258,18 +312,40 @@
 				  unsigned long *offset,
 				  char **modname);
 
+/* For extable.c to search modules' exception tables. */
+const struct exception_table_entry *search_module_extables(unsigned long addr);
+
 #else /* !CONFIG_MODULES... */
 #define EXPORT_SYMBOL(sym)
 #define EXPORT_SYMBOL_GPL(sym)
 #define EXPORT_SYMBOL_NOVERS(sym)
 
+/* Given an address, look for it in the exception tables. */
+static inline const struct exception_table_entry *
+search_module_extables(unsigned long addr)
+{
+	return NULL;
+}
+
+/* Is this address in a module? */
+static inline int module_text_address(unsigned long addr)
+{
+	return 0;
+}
+
 /* Get/put a kernel symbol (calls should be symmetric) */
 #define symbol_get(x) (&(x))
 #define symbol_put(x) do { } while(0)
 #define symbol_put_addr(x) do { } while(0)
 
-#define try_module_get(module) 1
-#define module_put(module) do { } while(0)
+static inline int try_module_get(struct module *module)
+{
+	return 1;
+}
+
+static inline void module_put(struct module *module)
+{
+}
 
 #define module_name(mod) "kernel"
 
@@ -293,6 +369,7 @@
 __attribute__((section(".gnu.linkonce.this_module"))) = {
 	.name = __stringify(KBUILD_MODNAME),
 	.symbols = { .owner = &__this_module },
+	.gpl_symbols = { .owner = &__this_module, .gplonly = 1 },
 	.init = init_module,
 #ifdef CONFIG_MODULE_UNLOAD
 	.exit = cleanup_module,
@@ -301,10 +378,6 @@
 #endif /* KBUILD_MODNAME */
 #endif /* MODULE */
 
-/* For archs to search exception tables */
-extern struct list_head extables;
-extern spinlock_t modlist_lock;
-
 #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
 
 /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
@@ -362,14 +435,6 @@
 #define GET_USE_COUNT(module) (module_dummy_usage)
 #define MOD_IN_USE 0
 #define __MODULE_STRING(x) __stringify(x)
-#define __mod_between(a_start, a_len, b_start, b_len)		\
-(((a_start) >= (b_start) && (a_start) <= (b_start)+(b_len))	\
- || ((a_start)+(a_len) >= (b_start)				\
-     && (a_start)+(a_len) <= (b_start)+(b_len)))
-#define mod_bound(p, n, m)					\
-(((m)->module_init						\
-  && __mod_between((p),(n),(m)->module_init,(m)->init_size))	\
- || __mod_between((p),(n),(m)->module_core,(m)->core_size))
 
 /*
  * The exception and symbol tables, and the lock
diff -Nru a/include/linux/moduleloader.h b/include/linux/moduleloader.h
--- a/include/linux/moduleloader.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/moduleloader.h	Wed Jan  8 20:04:43 2003
@@ -16,9 +16,9 @@
 /* These must be implemented by the specific architecture */
 
 /* Adjust arch-specific sections.  Return 0 on success.  */
-int module_frob_arch_sections(const Elf_Ehdr *hdr,
-			      const Elf_Shdr *sechdrs,
-			      const char *secstrings,
+int module_frob_arch_sections(Elf_Ehdr *hdr,
+			      Elf_Shdr *sechdrs,
+			      char *secstrings,
 			      struct module *mod);
 
 /* Allocator used for allocating struct module, core sections and init
diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h
--- a/include/linux/netdevice.h	Wed Jan  8 20:04:45 2003
+++ b/include/linux/netdevice.h	Wed Jan  8 20:04:45 2003
@@ -28,6 +28,7 @@
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
+#include <linux/kobject.h>
 
 #include <asm/atomic.h>
 #include <asm/cache.h>
@@ -65,7 +66,7 @@
 
 #endif
 
-#define MAX_ADDR_LEN	8		/* Largest hardware address length */
+#define MAX_ADDR_LEN	32		/* Largest hardware address length */
 
 /*
  *	Compute the worst case header length according to the protocols
@@ -438,6 +439,9 @@
 	/* this will get initialized at each interface type init routine */
 	struct divert_blk	*divert;
 #endif /* CONFIG_NET_DIVERT */
+
+	/* generic object representation */
+	struct kobject kobj;
 };
 
 
diff -Nru a/include/linux/nfs_page.h b/include/linux/nfs_page.h
--- a/include/linux/nfs_page.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/nfs_page.h	Wed Jan  8 20:04:43 2003
@@ -30,8 +30,9 @@
 	struct rpc_cred		*wb_cred;
 	struct page		*wb_page;	/* page to read in/write out */
 	wait_queue_head_t	wb_wait;	/* wait queue */
-	unsigned long		wb_index;	/* Offset within mapping */
-	unsigned int		wb_offset,	/* Offset within page */
+	unsigned long		wb_index;	/* Offset >> PAGE_CACHE_SHIFT */
+	unsigned int		wb_offset,	/* Offset & ~PAGE_CACHE_MASK */
+				wb_pgbase,	/* Start of page data */
 				wb_bytes,	/* Length of request */
 				wb_count;	/* reference count */
 	unsigned long		wb_flags;
diff -Nru a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
--- a/include/linux/nfsd/xdr4.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/nfsd/xdr4.h	Wed Jan  8 20:04:43 2003
@@ -320,6 +320,7 @@
 	u32				taglen;
 	char *				tag;
 	u32				opcnt;
+	u32 *				tagp; /* where to encode tag and  opcount */
 };
 
 #define NFS4_SVC_XDRSIZE		sizeof(struct nfsd4_compoundargs)
diff -Nru a/include/linux/pagemap.h b/include/linux/pagemap.h
--- a/include/linux/pagemap.h	Wed Jan  8 20:04:32 2003
+++ b/include/linux/pagemap.h	Wed Jan  8 20:04:32 2003
@@ -66,10 +66,10 @@
 extern int read_cache_pages(struct address_space *mapping,
 		struct list_head *pages, filler_t *filler, void *data);
 
-extern int add_to_page_cache(struct page *page,
-		struct address_space *mapping, unsigned long index);
-extern int add_to_page_cache_lru(struct page *page,
-		struct address_space *mapping, unsigned long index);
+int add_to_page_cache(struct page *page, struct address_space *mapping,
+				unsigned long index, int gfp_mask);
+int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
+				unsigned long index, int gfp_mask);
 extern void remove_from_page_cache(struct page *page);
 extern void __remove_from_page_cache(struct page *page);
 
diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h
--- a/include/linux/pci_ids.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/pci_ids.h	Wed Jan  8 20:04:43 2003
@@ -1092,6 +1092,7 @@
 #define PCI_DEVICE_ID_VIA_8233C_0	0x3109
 #define PCI_DEVICE_ID_VIA_8361		0x3112 
 #define PCI_DEVICE_ID_VIA_8233A		0x3147
+#define PCI_DEVICE_ID_VIA_8754		0x3168
 #define PCI_DEVICE_ID_VIA_8235		0x3177
 #define PCI_DEVICE_ID_VIA_8377_0	0x3189
 #define PCI_DEVICE_ID_VIA_86C100A	0x6100
diff -Nru a/include/linux/radix-tree.h b/include/linux/radix-tree.h
--- a/include/linux/radix-tree.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/radix-tree.h	Wed Jan  8 20:04:43 2003
@@ -19,6 +19,8 @@
 #ifndef _LINUX_RADIX_TREE_H
 #define _LINUX_RADIX_TREE_H
 
+#include <linux/preempt.h>
+
 struct radix_tree_node;
 
 struct radix_tree_root {
@@ -45,5 +47,11 @@
 extern unsigned int
 radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
 			unsigned long first_index, unsigned int max_items);
+int radix_tree_preload(int gfp_mask);
+
+static inline void radix_tree_preload_end(void)
+{
+	preempt_enable();
+}
 
 #endif /* _LINUX_RADIX_TREE_H */
diff -Nru a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
--- a/include/linux/raid/md_k.h	Wed Jan  8 20:04:32 2003
+++ b/include/linux/raid/md_k.h	Wed Jan  8 20:04:32 2003
@@ -28,6 +28,8 @@
 #define	LEVEL_MULTIPATH		(-4)
 #define	LEVEL_LINEAR		(-1)
 
+#define MaxSector (~(sector_t)0)
+
 static inline int pers_to_level (int pers)
 {
 	switch (pers) {
@@ -198,7 +200,6 @@
 	int				level, layout;
 	int				raid_disks;
 	int				max_disks;
-	unsigned long			state;
 	sector_t			size; /* used size of component devices */
 	__u64				events;
 
@@ -215,6 +216,7 @@
 	 * it can only be set > 0 under reconfig_sem
 	 */
 	int				recovery_running;
+	int				recovery_error;	/* error from recovery write */
 	int				in_sync;	/* know to not need resync */
 	struct semaphore		reconfig_sem;
 	atomic_t			active;
@@ -226,6 +228,7 @@
 
 	atomic_t			recovery_active; /* blocks scheduled, but not written */
 	wait_queue_head_t		recovery_wait;
+	sector_t			recovery_cp;
 
 	request_queue_t			queue;	/* for plugging ... */
 
diff -Nru a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
--- a/include/linux/raid/md_p.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/raid/md_p.h	Wed Jan  8 20:04:43 2003
@@ -131,11 +131,16 @@
 #ifdef __BIG_ENDIAN
 	__u32 events_hi;	/*  7 high-order of superblock update count   */
 	__u32 events_lo;	/*  8 low-order of superblock update count    */
+	__u32 cp_events_hi;	/*  9 high-order of checkpoint update count   */
+	__u32 cp_events_lo;	/* 10 low-order of checkpoint update count    */
 #else
 	__u32 events_lo;	/*  7 low-order of superblock update count    */
 	__u32 events_hi;	/*  8 high-order of superblock update count   */
+	__u32 cp_events_lo;	/*  9 low-order of checkpoint update count    */
+	__u32 cp_events_hi;	/* 10 high-order of checkpoint update count   */
 #endif
-	__u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 9];
+	__u32 recovery_cp;	/* 11 recovery checkpoint sector count	      */
+	__u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 12];
 
 	/*
 	 * Personality information
diff -Nru a/include/linux/rmap-locking.h b/include/linux/rmap-locking.h
--- a/include/linux/rmap-locking.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/rmap-locking.h	Wed Jan  8 20:04:43 2003
@@ -5,6 +5,11 @@
  * pte chain.
  */
 
+#include <linux/slab.h>
+
+struct pte_chain;
+extern kmem_cache_t *pte_chain_cache;
+
 static inline void pte_chain_lock(struct page *page)
 {
 	/*
@@ -30,4 +35,13 @@
 	clear_bit(PG_chainlock, &page->flags);
 #endif
 	preempt_enable();
+}
+
+struct pte_chain *pte_chain_alloc(int gfp_flags);
+void __pte_chain_free(struct pte_chain *pte_chain);
+
+static inline void pte_chain_free(struct pte_chain *pte_chain)
+{
+	if (pte_chain)
+		__pte_chain_free(pte_chain);
 }
diff -Nru a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
--- a/include/linux/rtnetlink.h	Wed Jan  8 20:04:45 2003
+++ b/include/linux/rtnetlink.h	Wed Jan  8 20:04:45 2003
@@ -17,6 +17,7 @@
 #define	RTM_NEWLINK	(RTM_BASE+0)
 #define	RTM_DELLINK	(RTM_BASE+1)
 #define	RTM_GETLINK	(RTM_BASE+2)
+#define	RTM_SETLINK	(RTM_BASE+3)
 
 #define	RTM_NEWADDR	(RTM_BASE+4)
 #define	RTM_DELADDR	(RTM_BASE+5)
diff -Nru a/include/linux/signal.h b/include/linux/signal.h
--- a/include/linux/signal.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/signal.h	Wed Jan  8 20:04:43 2003
@@ -70,37 +70,24 @@
 #define _SIG_SET_BINOP(name, op)					\
 static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \
 {									\
+	extern void _NSIG_WORDS_is_unsupported_size(void);		\
 	unsigned long a0, a1, a2, a3, b0, b1, b2, b3;			\
-	unsigned long i;						\
 									\
-	for (i = 0; i < _NSIG_WORDS/4; ++i) {				\
-		a0 = a->sig[4*i+0]; a1 = a->sig[4*i+1];			\
-		a2 = a->sig[4*i+2]; a3 = a->sig[4*i+3];			\
-		b0 = b->sig[4*i+0]; b1 = b->sig[4*i+1];			\
-		b2 = b->sig[4*i+2]; b3 = b->sig[4*i+3];			\
-		r->sig[4*i+0] = op(a0, b0);				\
-		r->sig[4*i+1] = op(a1, b1);				\
-		r->sig[4*i+2] = op(a2, b2);				\
-		r->sig[4*i+3] = op(a3, b3);				\
-	}								\
-	switch (_NSIG_WORDS % 4) {					\
-	    case 3:							\
-		a0 = a->sig[4*i+0]; a1 = a->sig[4*i+1]; a2 = a->sig[4*i+2]; \
-		b0 = b->sig[4*i+0]; b1 = b->sig[4*i+1]; b2 = b->sig[4*i+2]; \
-		r->sig[4*i+0] = op(a0, b0);				\
-		r->sig[4*i+1] = op(a1, b1);				\
-		r->sig[4*i+2] = op(a2, b2);				\
-		break;							\
+	switch (_NSIG_WORDS) {						\
+	    case 4:							\
+		a3 = a->sig[3]; a2 = a->sig[2];				\
+		b3 = b->sig[3]; b2 = b->sig[2];				\
+		r->sig[3] = op(a3, b3);					\
+		r->sig[2] = op(a2, b2);					\
 	    case 2:							\
-		a0 = a->sig[4*i+0]; a1 = a->sig[4*i+1];			\
-		b0 = b->sig[4*i+0]; b1 = b->sig[4*i+1];			\
-		r->sig[4*i+0] = op(a0, b0);				\
-		r->sig[4*i+1] = op(a1, b1);				\
-		break;							\
+		a1 = a->sig[1]; b1 = b->sig[1];				\
+		r->sig[1] = op(a1, b1);					\
 	    case 1:							\
-		a0 = a->sig[4*i+0]; b0 = b->sig[4*i+0];			\
-		r->sig[4*i+0] = op(a0, b0);				\
+		a0 = a->sig[0]; b0 = b->sig[0];				\
+		r->sig[0] = op(a0, b0);					\
 		break;							\
+	    default:							\
+		_NSIG_WORDS_is_unsupported_size();			\
 	}								\
 }
 
@@ -121,18 +108,16 @@
 #define _SIG_SET_OP(name, op)						\
 static inline void name(sigset_t *set)					\
 {									\
-	unsigned long i;						\
+	extern void _NSIG_WORDS_is_unsupported_size(void);		\
 									\
-	for (i = 0; i < _NSIG_WORDS/4; ++i) {				\
-		set->sig[4*i+0] = op(set->sig[4*i+0]);			\
-		set->sig[4*i+1] = op(set->sig[4*i+1]);			\
-		set->sig[4*i+2] = op(set->sig[4*i+2]);			\
-		set->sig[4*i+3] = op(set->sig[4*i+3]);			\
-	}								\
-	switch (_NSIG_WORDS % 4) {					\
-	    case 3: set->sig[4*i+2] = op(set->sig[4*i+2]);		\
-	    case 2: set->sig[4*i+1] = op(set->sig[4*i+1]);		\
-	    case 1: set->sig[4*i+0] = op(set->sig[4*i+0]);		\
+	switch (_NSIG_WORDS) {						\
+	    case 4: set->sig[3] = op(set->sig[3]);			\
+		    set->sig[2] = op(set->sig[2]);			\
+	    case 2: set->sig[1] = op(set->sig[1]);			\
+	    case 1: set->sig[0] = op(set->sig[0]);			\
+		    break;						\
+	    default:							\
+		_NSIG_WORDS_is_unsupported_size();			\
 	}								\
 }
 
diff -Nru a/include/linux/smp.h b/include/linux/smp.h
--- a/include/linux/smp.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/smp.h	Wed Jan  8 20:04:44 2003
@@ -86,6 +86,7 @@
 void smp_prepare_boot_cpu(void);
 
 #else /* !SMP */
+#include <asm/page.h> /* For BUG() */
 
 /*
  *	These macros fold the SMP functionality into a single CPU system
diff -Nru a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
--- a/include/linux/sunrpc/auth.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/sunrpc/auth.h	Wed Jan  8 20:04:44 2003
@@ -23,7 +23,7 @@
  * Client user credentials
  */
 struct rpc_cred {
-	struct rpc_cred *	cr_next;	/* linked list */
+	struct list_head	cr_hash;	/* hash chain */
 	struct rpc_auth *	cr_auth;
 	struct rpc_credops *	cr_ops;
 	unsigned long		cr_expire;	/* when to gc */
@@ -49,7 +49,7 @@
 #define RPC_CREDCACHE_NR	8
 #define RPC_CREDCACHE_MASK	(RPC_CREDCACHE_NR - 1)
 struct rpc_auth {
-	struct rpc_cred *	au_credcache[RPC_CREDCACHE_NR];
+	struct list_head	au_credcache[RPC_CREDCACHE_NR];
 	unsigned long		au_expire;	/* cache expiry interval */
 	unsigned long		au_nextgc;	/* next garbage collection */
 	unsigned int		au_cslack;	/* call cred size estimate */
@@ -101,8 +101,6 @@
 void			rpcauth_holdcred(struct rpc_task *);
 void			put_rpccred(struct rpc_cred *);
 void			rpcauth_unbindcred(struct rpc_task *);
-int			rpcauth_matchcred(struct rpc_auth *,
-					  struct rpc_cred *, int);
 u32 *			rpcauth_marshcred(struct rpc_task *, u32 *);
 u32 *			rpcauth_checkverf(struct rpc_task *, u32 *);
 int			rpcauth_refreshcred(struct rpc_task *);
@@ -110,8 +108,6 @@
 int			rpcauth_uptodatecred(struct rpc_task *);
 void			rpcauth_init_credcache(struct rpc_auth *);
 void			rpcauth_free_credcache(struct rpc_auth *);
-void			rpcauth_insert_credcache(struct rpc_auth *,
-						struct rpc_cred *);
 
 static inline
 struct rpc_cred *	get_rpccred(struct rpc_cred *cred)
diff -Nru a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
--- a/include/linux/sunrpc/cache.h	Wed Jan  8 20:04:44 2003
+++ b/include/linux/sunrpc/cache.h	Wed Jan  8 20:04:44 2003
@@ -78,6 +78,11 @@
 	int			(*cache_parse)(struct cache_detail *,
 					       char *buf, int len);
 
+	int			(*cache_show)(struct seq_file *m,
+					      struct cache_detail *cd,
+					      struct cache_head *h,
+					      char *pbuf);
+
 	/* fields below this comment are for internal use
 	 * and should not be touched by cache owners
 	 */
@@ -171,7 +176,7 @@
 					if (!new) break;				\
 											\
 					new->MEMBER.next = tmp->MEMBER.next;		\
-					*head = &new->MEMBER;				\
+					*hp = &new->MEMBER;				\
 					tmp->MEMBER.next = NULL;			\
 					set_bit(CACHE_HASHED, &new->MEMBER.flags);	\
 					clear_bit(CACHE_HASHED, &tmp->MEMBER.flags);	\
diff -Nru a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h
--- a/include/linux/sunrpc/svcauth.h	Wed Jan  8 20:04:43 2003
+++ b/include/linux/sunrpc/svcauth.h	Wed Jan  8 20:04:43 2003
@@ -11,8 +11,10 @@
 
 #ifdef __KERNEL__
 
+#include <linux/string.h>
 #include <linux/sunrpc/msg_prot.h>
 #include <linux/sunrpc/cache.h>
+#include <linux/string.h>
 
 struct svc_cred {
 	uid_t			cr_uid;
@@ -111,7 +113,11 @@
 extern int auth_unix_forget_old(struct auth_domain *dom);
 extern void svcauth_unix_purge(void);
 
-extern int name_hash(char *name, int size);
+extern int hash_mem(char *buf, int len, int bits);
+static inline int hash_str(char *name, int bits)
+{
+	return hash_mem(name, strlen(name), bits);
+}
 
 extern struct cache_detail auth_domain_cache, ip_map_cache;
 
diff -Nru a/include/linux/swap.h b/include/linux/swap.h
--- a/include/linux/swap.h	Wed Jan  8 20:04:32 2003
+++ b/include/linux/swap.h	Wed Jan  8 20:04:32 2003
@@ -169,11 +169,13 @@
 extern void out_of_memory(void);
 
 /* linux/mm/rmap.c */
-extern int FASTCALL(page_referenced(struct page *));
-extern void FASTCALL(page_add_rmap(struct page *, pte_t *));
-extern void FASTCALL(page_remove_rmap(struct page *, pte_t *));
-extern int FASTCALL(try_to_unmap(struct page *));
-extern int FASTCALL(page_over_rsslimit(struct page *));
+struct pte_chain;
+int FASTCALL(page_referenced(struct page *));
+struct pte_chain *FASTCALL(page_add_rmap(struct page *, pte_t *,
+					struct pte_chain *));
+void FASTCALL(page_remove_rmap(struct page *, pte_t *));
+int FASTCALL(try_to_unmap(struct page *));
+int FASTCALL(page_over_rsslimit(struct page *));
 
 /* return values of try_to_unmap */
 #define	SWAP_SUCCESS	0
diff -Nru a/include/net/icmp.h b/include/net/icmp.h
--- a/include/net/icmp.h	Wed Jan  8 20:04:45 2003
+++ b/include/net/icmp.h	Wed Jan  8 20:04:45 2003
@@ -23,6 +23,7 @@
 
 #include <net/sock.h>
 #include <net/protocol.h>
+#include <net/snmp.h>
 #include <linux/ip.h>
 
 struct icmp_err {
@@ -31,10 +32,22 @@
 };
 
 extern struct icmp_err icmp_err_convert[];
-extern struct icmp_mib icmp_statistics[NR_CPUS*2];
+DECLARE_SNMP_STAT(struct icmp_mib, icmp_statistics);
 #define ICMP_INC_STATS(field)		SNMP_INC_STATS(icmp_statistics, field)
 #define ICMP_INC_STATS_BH(field)	SNMP_INC_STATS_BH(icmp_statistics, field)
 #define ICMP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(icmp_statistics, field)
+#define ICMP_INC_STATS_FIELD(offt)					\
+	(*((unsigned long *) ((void *)					\
+			     per_cpu_ptr(icmp_statistics[!in_softirq()],\
+					 smp_processor_id())) + offt))++;
+#define ICMP_INC_STATS_BH_FIELD(offt)					\
+	(*((unsigned long *) ((void *)					\
+			     per_cpu_ptr(icmp_statistics[0],		\
+					 smp_processor_id())) + offt))++;
+#define ICMP_INC_STATS_USER_FIELD(offt)					\
+	(*((unsigned long *) ((void *)					\
+			     per_cpu_ptr(icmp_statistics[1],		\
+					 smp_processor_id())) + offt))++;
 
 extern void	icmp_send(struct sk_buff *skb_in,  int type, int code, u32 info);
 extern int	icmp_rcv(struct sk_buff *skb);
diff -Nru a/include/net/ip.h b/include/net/ip.h
--- a/include/net/ip.h	Wed Jan  8 20:04:44 2003
+++ b/include/net/ip.h	Wed Jan  8 20:04:44 2003
@@ -149,14 +149,16 @@
 };
 
 extern struct ipv4_config ipv4_config;
-extern struct ip_mib	ip_statistics[NR_CPUS*2];
+DECLARE_SNMP_STAT(struct ip_mib, ip_statistics);
 #define IP_INC_STATS(field)		SNMP_INC_STATS(ip_statistics, field)
 #define IP_INC_STATS_BH(field)		SNMP_INC_STATS_BH(ip_statistics, field)
 #define IP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(ip_statistics, field)
-extern struct linux_mib	net_statistics[NR_CPUS*2];
+DECLARE_SNMP_STAT(struct linux_mib, net_statistics);
 #define NET_INC_STATS(field)		SNMP_INC_STATS(net_statistics, field)
 #define NET_INC_STATS_BH(field)		SNMP_INC_STATS_BH(net_statistics, field)
 #define NET_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(net_statistics, field)
+#define NET_ADD_STATS_BH(field, adnd)	SNMP_ADD_STATS_BH(net_statistics, field, adnd)
+#define NET_ADD_STATS_USER(field, adnd)	SNMP_ADD_STATS_USER(net_statistics, field, adnd)
 
 extern int sysctl_local_port_range[2];
 extern int sysctl_ip_default_ttl;
diff -Nru a/include/net/ipv6.h b/include/net/ipv6.h
--- a/include/net/ipv6.h	Wed Jan  8 20:04:45 2003
+++ b/include/net/ipv6.h	Wed Jan  8 20:04:45 2003
@@ -19,6 +19,7 @@
 #include <asm/hardirq.h>
 #include <net/ndisc.h>
 #include <net/flow.h>
+#include <net/snmp.h>
 
 #define SIN6_LEN_RFC2133	24
 
@@ -105,15 +106,19 @@
 /* sysctls */
 extern int sysctl_ipv6_bindv6only;
 
-extern struct ipv6_mib		ipv6_statistics[NR_CPUS*2];
+DECLARE_SNMP_STAT(struct ipv6_mib, ipv6_statistics);
 #define IP6_INC_STATS(field)		SNMP_INC_STATS(ipv6_statistics, field)
 #define IP6_INC_STATS_BH(field)		SNMP_INC_STATS_BH(ipv6_statistics, field)
 #define IP6_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(ipv6_statistics, field)
-extern struct icmpv6_mib	icmpv6_statistics[NR_CPUS*2];
+DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics);
 #define ICMP6_INC_STATS(field)		SNMP_INC_STATS(icmpv6_statistics, field)
 #define ICMP6_INC_STATS_BH(field)	SNMP_INC_STATS_BH(icmpv6_statistics, field)
 #define ICMP6_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(icmpv6_statistics, field)
-extern struct udp_mib		udp_stats_in6[NR_CPUS*2];
+#define ICMP6_STATS_PTR_BH(field) 					\
+	(&								\
+	 ((per_cpu_ptr(icmpv6_statistics[0], smp_processor_id()))->	\
+	  field))
+DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6);
 #define UDP6_INC_STATS(field)		SNMP_INC_STATS(udp_stats_in6, field)
 #define UDP6_INC_STATS_BH(field)	SNMP_INC_STATS_BH(udp_stats_in6, field)
 #define UDP6_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(udp_stats_in6, field)
diff -Nru a/include/net/route.h b/include/net/route.h
--- a/include/net/route.h	Wed Jan  8 20:04:32 2003
+++ b/include/net/route.h	Wed Jan  8 20:04:32 2003
@@ -102,7 +102,11 @@
         unsigned int gc_ignored;
         unsigned int gc_goal_miss;
         unsigned int gc_dst_overflow;
-} ____cacheline_aligned_in_smp;
+};
+
+extern struct rt_cache_stat *rt_cache_stat;
+#define RT_CACHE_STAT_INC(field)					  \
+		(per_cpu_ptr(rt_cache_stat, smp_processor_id())->field++)
 
 extern struct ip_rt_acct *ip_rt_acct;
 
diff -Nru a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
--- a/include/net/sctp/sctp.h	Wed Jan  8 20:04:43 2003
+++ b/include/net/sctp/sctp.h	Wed Jan  8 20:04:43 2003
@@ -203,7 +203,7 @@
 #define SCTP_SOCK_SLEEP_POST(sk) SOCK_SLEEP_POST(sk)
 
 /* SCTP SNMP MIB stats handlers */
-extern struct sctp_mib sctp_statistics[NR_CPUS * 2];
+DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics);
 #define SCTP_INC_STATS(field)		SNMP_INC_STATS(sctp_statistics, field)
 #define SCTP_INC_STATS_BH(field)	SNMP_INC_STATS_BH(sctp_statistics, field)
 #define SCTP_INC_STATS_USER(field)	SNMP_INC_STATS_USER(sctp_statistics, field)
diff -Nru a/include/net/snmp.h b/include/net/snmp.h
--- a/include/net/snmp.h	Wed Jan  8 20:04:43 2003
+++ b/include/net/snmp.h	Wed Jan  8 20:04:43 2003
@@ -62,7 +62,7 @@
  	unsigned long	IpFragFails;
  	unsigned long	IpFragCreates;
 	unsigned long   __pad[0]; 
-} ____cacheline_aligned;
+};
  
 struct ipv6_mib
 {
@@ -89,7 +89,7 @@
  	unsigned long	Ip6InMcastPkts;
  	unsigned long	Ip6OutMcastPkts;
 	unsigned long   __pad[0]; 
-} ____cacheline_aligned;
+};
  
 struct icmp_mib
 {
@@ -121,7 +121,7 @@
  	unsigned long	IcmpOutAddrMaskReps;
 	unsigned long	dummy;
 	unsigned long   __pad[0]; 
-} ____cacheline_aligned;
+};
 
 struct icmpv6_mib
 {
@@ -159,7 +159,7 @@
 	unsigned long	Icmp6OutGroupMembResponses;
 	unsigned long	Icmp6OutGroupMembReductions;
 	unsigned long   __pad[0]; 
-} ____cacheline_aligned;
+};
  
 struct tcp_mib
 {
@@ -178,7 +178,7 @@
  	unsigned long	TcpInErrs;
  	unsigned long	TcpOutRsts;
 	unsigned long   __pad[0]; 
-} ____cacheline_aligned;
+};
  
 struct udp_mib
 {
@@ -187,7 +187,7 @@
  	unsigned long	UdpInErrors;
  	unsigned long	UdpOutDatagrams;
 	unsigned long   __pad[0];
-} ____cacheline_aligned; 
+}; 
 
 /* draft-ietf-sigtran-sctp-mib-07.txt */
 struct sctp_mib
@@ -216,7 +216,7 @@
 	unsigned long   SctpValCookieLife;
 	unsigned long   SctpMaxInitRetr;
 	unsigned long   __pad[0];
-} ____cacheline_aligned;
+};
 
 struct linux_mib 
 {
@@ -286,7 +286,7 @@
 	unsigned long	TCPAbortFailed;
 	unsigned long	TCPMemoryPressures;
 	unsigned long   __pad[0];
-} ____cacheline_aligned;
+};
 
 
 /* 
@@ -294,8 +294,25 @@
  * addl $1,memory is atomic against interrupts (but atomic_inc would be overkill because of the lock 
  * cycles). Wants new nonlocked_atomic_inc() primitives -AK
  */ 
-#define SNMP_INC_STATS(mib, field) ((mib)[2*smp_processor_id()+!in_softirq()].field++)
-#define SNMP_INC_STATS_BH(mib, field) ((mib)[2*smp_processor_id()].field++)
-#define SNMP_INC_STATS_USER(mib, field) ((mib)[2*smp_processor_id()+1].field++)
+#define DEFINE_SNMP_STAT(type, name)	\
+	__typeof__(type) *name[2]
+#define DECLARE_SNMP_STAT(type, name)	\
+	extern __typeof__(type) *name[2]
+
+#define SNMP_STAT_USRPTR(name)	(name[0])
+#define SNMP_STAT_BHPTR(name)	(name[1])
+
+#define SNMP_INC_STATS_BH(mib, field) 	\
+	(per_cpu_ptr(mib[0], smp_processor_id())->field++)
+#define SNMP_INC_STATS_USER(mib, field) \
+	(per_cpu_ptr(mib[1], smp_processor_id())->field++)
+#define SNMP_INC_STATS(mib, field) 	\
+	(per_cpu_ptr(mib[!in_softirq()], smp_processor_id())->field++)
+#define SNMP_DEC_STATS(mib, field) 	\
+	(per_cpu_ptr(mib[!in_softirq()], smp_processor_id())->field--)
+#define SNMP_ADD_STATS_BH(mib, field, addend) 	\
+	(per_cpu_ptr(mib[0], smp_processor_id())->field += addend)
+#define SNMP_ADD_STATS_USER(mib, field, addend) 	\
+	(per_cpu_ptr(mib[1], smp_processor_id())->field += addend)
  	
 #endif
diff -Nru a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h	Wed Jan  8 20:04:43 2003
+++ b/include/net/tcp.h	Wed Jan  8 20:04:43 2003
@@ -28,6 +28,7 @@
 #include <linux/tcp.h>
 #include <linux/slab.h>
 #include <linux/cache.h>
+#include <linux/percpu.h>
 #include <net/checksum.h>
 #include <net/sock.h>
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
@@ -630,10 +631,11 @@
 
 extern struct proto tcp_prot;
 
-extern struct tcp_mib tcp_statistics[NR_CPUS*2];
+DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics);
 #define TCP_INC_STATS(field)		SNMP_INC_STATS(tcp_statistics, field)
 #define TCP_INC_STATS_BH(field)		SNMP_INC_STATS_BH(tcp_statistics, field)
 #define TCP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(tcp_statistics, field)
+#define TCP_DEC_STATS(field)		SNMP_DEC_STATS(tcp_statistics, field)
 
 extern void			tcp_put_port(struct sock *sk);
 extern void			__tcp_put_port(struct sock *sk);
@@ -1399,7 +1401,7 @@
 		/* fall through */
 	default:
 		if (oldstate==TCP_ESTABLISHED)
-			tcp_statistics[smp_processor_id()*2+!in_softirq()].TcpCurrEstab--;
+			TCP_DEC_STATS(TcpCurrEstab);
 	}
 
 	/* Change state AFTER socket is unhashed to avoid closed
diff -Nru a/include/net/udp.h b/include/net/udp.h
--- a/include/net/udp.h	Wed Jan  8 20:04:45 2003
+++ b/include/net/udp.h	Wed Jan  8 20:04:45 2003
@@ -25,6 +25,7 @@
 #include <linux/udp.h>
 #include <linux/ip.h>
 #include <net/sock.h>
+#include <net/snmp.h>
 
 #define UDP_HTABLE_SIZE		128
 
@@ -71,7 +72,7 @@
 extern int	udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
 extern int	udp_disconnect(struct sock *sk, int flags);
 
-extern struct udp_mib udp_statistics[NR_CPUS*2];
+DECLARE_SNMP_STAT(struct udp_mib, udp_statistics);
 #define UDP_INC_STATS(field)		SNMP_INC_STATS(udp_statistics, field)
 #define UDP_INC_STATS_BH(field)		SNMP_INC_STATS_BH(udp_statistics, field)
 #define UDP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(udp_statistics, field)
diff -Nru a/include/video/tgafb.h b/include/video/tgafb.h
--- a/include/video/tgafb.h	Wed Jan  8 20:04:45 2003
+++ b/include/video/tgafb.h	Wed Jan  8 20:04:45 2003
@@ -47,6 +47,7 @@
 #define	TGA_VALID_REG			0x0070
 #define	TGA_CURSOR_XY_REG		0x0074
 #define	TGA_INTR_STAT_REG		0x007c
+#define TGA_DATA_REG			0x0080
 #define	TGA_RAMDAC_SETUP_REG		0x00c0
 #define	TGA_BLOCK_COLOR0_REG		0x0140
 #define	TGA_BLOCK_COLOR1_REG		0x0144
diff -Nru a/init/Kconfig b/init/Kconfig
--- a/init/Kconfig	Wed Jan  8 20:04:45 2003
+++ b/init/Kconfig	Wed Jan  8 20:04:45 2003
@@ -37,22 +37,6 @@
 
 menu "General setup"
 
-config NET
-	bool "Networking support"
-	---help---
-	  Unless you really know what you are doing, you should say Y here.
-	  The reason is that some programs need kernel networking support even
-	  when running on a stand-alone machine that isn't connected to any
-	  other computer. If you are upgrading from an older kernel, you
-	  should consider updating your networking tools too because changes
-	  in the kernel and the tools often go hand in hand. The tools are
-	  contained in the package net-tools, the location and version number
-	  of which are given in <file:Documentation/Changes>.
-
-	  For a general introduction to Linux networking, it is highly
-	  recommended to read the NET-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
 config SYSVIPC
 	bool "System V IPC"
 	---help---
@@ -97,6 +81,51 @@
 	  As it is generally a good thing, you should say Y here unless
 	  building a kernel for install/rescue disks or your system is very
 	  limited in memory.
+
+choice
+	prompt "Kernel log buffer size"
+	default LOG_BUF_SHIFT_17 if ARCH_S390
+	default LOG_BUF_SHIFT_16 if X86_NUMAQ || IA64
+	default LOG_BUF_SHIFT_15 if SMP
+	default LOG_BUF_SHIFT_14
+	help
+	  Select kernel log buffer size from this list (power of 2).
+	  Defaults:  17 (=> 128 KB for S/390)
+		     16 (=> 64 KB for x86 NUMAQ or IA-64)
+	             15 (=> 32 KB for SMP)
+	             14 (=> 16 KB for uniprocessor)
+
+config LOG_BUF_SHIFT_17
+	bool "128 KB"
+	default y if ARCH_S390
+
+config LOG_BUF_SHIFT_16
+	bool "64 KB"
+	default y if X86_NUMAQ || IA64
+
+config LOG_BUF_SHIFT_15
+	bool "32 KB"
+	default y if SMP
+
+config LOG_BUF_SHIFT_14
+	bool "16 KB"
+
+config LOG_BUF_SHIFT_13
+	bool "8 KB"
+
+config LOG_BUF_SHIFT_12
+	bool "4 KB"
+
+endchoice
+
+config LOG_BUF_SHIFT
+	int
+	default 17 if LOG_BUF_SHIFT_17=y
+	default 16 if LOG_BUF_SHIFT_16=y
+	default 15 if LOG_BUF_SHIFT_15=y
+	default 14 if LOG_BUF_SHIFT_14=y
+	default 13 if LOG_BUF_SHIFT_13=y
+	default 12 if LOG_BUF_SHIFT_12=y
 
 endmenu
 
diff -Nru a/init/do_mounts.c b/init/do_mounts.c
--- a/init/do_mounts.c	Wed Jan  8 20:04:43 2003
+++ b/init/do_mounts.c	Wed Jan  8 20:04:43 2003
@@ -13,6 +13,7 @@
 #include <linux/suspend.h>
 #include <linux/root_dev.h>
 #include <linux/mount.h>
+#include <linux/dirent.h>
 #include <linux/security.h>
 
 #include <linux/nfs_fs.h>
@@ -324,22 +325,32 @@
 #endif
 
 #ifdef CONFIG_DEVFS_FS
+
+/*
+ * If the dir will fit in *buf, return its length.  If it won't fit, return
+ * zero.  Return -ve on error.
+ */
 static int __init do_read_dir(int fd, void *buf, int len)
 {
 	long bytes, n;
 	char *p = buf;
 	lseek(fd, 0, 0);
 
-	for (bytes = 0, p = buf; bytes < len; bytes += n, p+=n) {
-		n = sys_getdents64(fd, p, len - bytes);
+	for (bytes = 0; bytes < len; bytes += n) {
+		n = sys_getdents64(fd, p + bytes, len - bytes);
 		if (n < 0)
-			return -1;
+			return n;
 		if (n == 0)
 			return bytes;
 	}
 	return 0;
 }
 
+/*
+ * Try to read all of a directory.  Returns the contents at *p, which
+ * is kmalloced memory.  Returns the number of bytes read at *len.  Returns
+ * NULL on error.
+ */
 static void * __init read_dir(char *path, int *len)
 {
 	int size;
@@ -349,7 +360,7 @@
 	if (fd < 0)
 		return NULL;
 
-	for (size = 1<<9; size < (1<<18); size <<= 1) {
+	for (size = 1 << 9; size <= (1 << MAX_ORDER); size <<= 1) {
 		void *p = kmalloc(size, GFP_KERNEL);
 		int n;
 		if (!p)
@@ -361,6 +372,8 @@
 			return p;
 		}
 		kfree(p);
+		if (n == -EINVAL)
+			continue;	/* Try a larger buffer */
 		if (n < 0)
 			break;
 	}
@@ -368,14 +381,6 @@
 	return NULL;
 }
 #endif
-
-struct linux_dirent64 {
-	u64		d_ino;
-	s64		d_off;
-	unsigned short	d_reclen;
-	unsigned char	d_type;
-	char		d_name[0];
-};
 
 static int __init find_in_devfs(char *path, dev_t dev)
 {
diff -Nru a/init/main.c b/init/main.c
--- a/init/main.c	Wed Jan  8 20:04:43 2003
+++ b/init/main.c	Wed Jan  8 20:04:43 2003
@@ -58,16 +58,15 @@
 static int init(void *);
 
 extern void init_IRQ(void);
-extern void init_modules(void);
 extern void sock_init(void);
 extern void fork_init(unsigned long);
-extern void extable_init(void);
 extern void mca_init(void);
 extern void sbus_init(void);
 extern void sysctl_init(void);
 extern void signals_init(void);
 extern void buffer_init(void);
 extern void pidhash_init(void);
+extern void pidmap_init(void);
 extern void pte_chain_init(void);
 extern void radix_tree_init(void);
 extern void free_initmem(void);
@@ -391,9 +390,9 @@
 		   &__stop___param - &__start___param,
 		   &unknown_bootoption);
 	trap_init();
-	extable_init();
 	rcu_init();
 	init_IRQ();
+	pidhash_init();
 	sched_init();
 	softirq_init();
 	time_init();
@@ -419,7 +418,7 @@
 	page_address_init();
 	mem_init();
 	kmem_cache_sizes_init();
-	pidhash_init();
+	pidmap_init();
 	pgtable_cache_init();
 	pte_chain_init();
 	fork_init(num_physpages);
diff -Nru a/kernel/Makefile b/kernel/Makefile
--- a/kernel/Makefile	Wed Jan  8 20:04:43 2003
+++ b/kernel/Makefile	Wed Jan  8 20:04:43 2003
@@ -3,13 +3,13 @@
 #
 
 export-objs = signal.o sys.o kmod.o workqueue.o ksyms.o pm.o exec_domain.o \
-		printk.o platform.o suspend.o dma.o module.o cpufreq.o \
+		printk.o suspend.o dma.o module.o cpufreq.o \
 		profile.o rcupdate.o intermodule.o params.o
 
 obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
 	    exit.o itimer.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
-	    signal.o sys.o kmod.o workqueue.o futex.o platform.o pid.o \
+	    signal.o sys.o kmod.o workqueue.o futex.o pid.o \
 	    rcupdate.o intermodule.o extable.o params.o
 
 obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
diff -Nru a/kernel/compat.c b/kernel/compat.c
--- a/kernel/compat.c	Wed Jan  8 20:04:44 2003
+++ b/kernel/compat.c	Wed Jan  8 20:04:44 2003
@@ -18,6 +18,20 @@
 
 #include <asm/uaccess.h>
 
+int get_compat_timespec(struct timespec *ts, struct compat_timespec *cts)
+{
+	return (verify_area(VERIFY_READ, cts, sizeof(*cts)) ||
+			__get_user(ts->tv_sec, &cts->tv_sec) ||
+			__get_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0;
+}
+
+int put_compat_timespec(struct timespec *ts, struct compat_timespec *cts)
+{
+	return (verify_area(VERIFY_WRITE, cts, sizeof(*cts)) ||
+			__put_user(ts->tv_sec, &cts->tv_sec) ||
+			__put_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0;
+}
+
 static long compat_nanosleep_restart(struct restart_block *restart)
 {
 	unsigned long expire = restart->arg0, now = jiffies;
@@ -50,15 +64,12 @@
 asmlinkage long compat_sys_nanosleep(struct compat_timespec *rqtp,
 		struct compat_timespec *rmtp)
 {
-	struct compat_timespec ct;
 	struct timespec t;
 	struct restart_block *restart;
 	unsigned long expire;
 
-	if (copy_from_user(&ct, rqtp, sizeof(ct)))
+	if (get_compat_timespec(&t, rqtp))
 		return -EFAULT;
-	t.tv_sec = ct.tv_sec;
-	t.tv_nsec = ct.tv_nsec;
 
 	if ((t.tv_nsec >= 1000000000L) || (t.tv_nsec < 0) || (t.tv_sec < 0))
 		return -EINVAL;
@@ -71,9 +82,7 @@
 
 	if (rmtp) {
 		jiffies_to_timespec(expire, &t);
-		ct.tv_sec = t.tv_sec;
-		ct.tv_nsec = t.tv_nsec;
-		if (copy_to_user(rmtp, &ct, sizeof(ct)))
+		if (put_compat_timespec(&t, rmtp))
 			return -EFAULT;
 	}
 	restart = &current_thread_info()->restart_block;
diff -Nru a/kernel/cpufreq.c b/kernel/cpufreq.c
--- a/kernel/cpufreq.c	Wed Jan  8 20:04:43 2003
+++ b/kernel/cpufreq.c	Wed Jan  8 20:04:43 2003
@@ -927,17 +927,27 @@
  * adjust_jiffies - adjust the system "loops_per_jiffy"
  *
  * This function alters the system "loops_per_jiffy" for the clock
- * speed change. Note that loops_per_jiffy is only updated if all
- * CPUs are affected - else there is a need for per-CPU loops_per_jiffy
- * values which are provided by various architectures. 
+ * speed change. Note that loops_per_jiffy cannot be updated on SMP
+ * systems as each CPU might be scaled differently. So, use the arch 
+ * per-CPU loops_per_jiffy value wherever possible.
  */
+#ifndef CONFIG_SMP
+static unsigned long l_p_j_ref = 0;
+static unsigned int  l_p_j_ref_freq = 0;
+
 static inline void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci)
 {
+	if (!l_p_j_ref_freq) {
+		l_p_j_ref = loops_per_jiffy;
+		l_p_j_ref_freq = ci->old;
+	}
 	if ((val == CPUFREQ_PRECHANGE  && ci->old < ci->new) ||
 	    (val == CPUFREQ_POSTCHANGE && ci->old > ci->new))
-		if (ci->cpu == CPUFREQ_ALL_CPUS)
-			loops_per_jiffy = cpufreq_scale(loops_per_jiffy, ci->old, ci->new);
+		loops_per_jiffy = cpufreq_scale(l_p_j_ref, l_p_j_ref_freq, ci->new);
 }
+#else
+#define adjust_jiffies(...)
+#endif
 
 
 /**
diff -Nru a/kernel/extable.c b/kernel/extable.c
--- a/kernel/extable.c	Wed Jan  8 20:04:43 2003
+++ b/kernel/extable.c	Wed Jan  8 20:04:43 2003
@@ -16,36 +16,27 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <linux/module.h>
-#include <linux/init.h>
-
-#include <asm/semaphore.h>
 
 extern const struct exception_table_entry __start___ex_table[];
 extern const struct exception_table_entry __stop___ex_table[];
-extern const struct kernel_symbol __start___ksymtab[];
-extern const struct kernel_symbol __stop___ksymtab[];
-
-/* Protects extables and symbol tables */
-spinlock_t modlist_lock = SPIN_LOCK_UNLOCKED;
-
-/* The exception and symbol tables: start with kernel only. */
-LIST_HEAD(extables);
-LIST_HEAD(symbols);
+extern char _stext[], _etext[];
 
-static struct exception_table kernel_extable;
-static struct kernel_symbol_group kernel_symbols;
-
-void __init extable_init(void)
+/* Given an address, look for it in the exception tables. */
+const struct exception_table_entry *search_exception_tables(unsigned long addr)
 {
-	/* Add kernel symbols to symbol table */
-	kernel_symbols.num_syms = (__stop___ksymtab - __start___ksymtab);
-	kernel_symbols.syms = __start___ksymtab;
-	list_add(&kernel_symbols.list, &symbols);
+	const struct exception_table_entry *e;
 
-	/* Add kernel exception table to exception tables */
-	kernel_extable.num_entries = (__stop___ex_table -__start___ex_table);
-	kernel_extable.entry = __start___ex_table;
-	list_add(&kernel_extable.list, &extables);
+	e = search_extable(__start___ex_table, __stop___ex_table-1, addr);
+	if (!e)
+		e = search_module_extables(addr);
+	return e;
 }
 
+int kernel_text_address(unsigned long addr)
+{
+	if (addr >= (unsigned long)_stext &&
+	    addr <= (unsigned long)_etext)
+		return 1;
 
+	return module_text_address(addr);
+}
diff -Nru a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c	Wed Jan  8 20:04:43 2003
+++ b/kernel/fork.c	Wed Jan  8 20:04:43 2003
@@ -380,6 +380,7 @@
 		list_del(&mm->mmlist);
 		mmlist_nr--;
 		spin_unlock(&mmlist_lock);
+		exit_aio(mm);
 		exit_mmap(mm);
 		mmdrop(mm);
 	}
diff -Nru a/kernel/kallsyms.c b/kernel/kallsyms.c
--- a/kernel/kallsyms.c	Wed Jan  8 20:04:45 2003
+++ b/kernel/kallsyms.c	Wed Jan  8 20:04:45 2003
@@ -32,6 +32,7 @@
 		BUG();
 
 	namebuf[127] = 0;
+	namebuf[0] = 0;
 
 	if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) {
 		unsigned long symbol_end;
@@ -46,10 +47,10 @@
 
 		/* Grab name */
 		for (i = 0; i < best; i++) { 
-			++name;
-			strncpy(namebuf + name[-1], name, 127); 
-			name += strlen(name)+1;
-		} 
+			unsigned prefix = *name++;
+			strncpy(namebuf + prefix, name, 127 - prefix);
+			name += strlen(name) + 1;
+		}
 
 		/* Base symbol size on next symbol. */
 		if (best + 1 < kallsyms_num_syms)
diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
--- a/kernel/ksyms.c	Wed Jan  8 20:04:32 2003
+++ b/kernel/ksyms.c	Wed Jan  8 20:04:32 2003
@@ -215,7 +215,7 @@
 EXPORT_SYMBOL(submit_bh);
 EXPORT_SYMBOL(unlock_buffer);
 EXPORT_SYMBOL(__wait_on_buffer);
-EXPORT_SYMBOL(generic_direct_IO);
+EXPORT_SYMBOL(blockdev_direct_IO);
 EXPORT_SYMBOL(block_write_full_page);
 EXPORT_SYMBOL(block_read_full_page);
 EXPORT_SYMBOL(block_prepare_write);
@@ -329,6 +329,7 @@
 EXPORT_SYMBOL(deactivate_super);
 EXPORT_SYMBOL(sget);
 EXPORT_SYMBOL(set_anon_super);
+EXPORT_SYMBOL(do_select);
 
 /* for stackable file systems (lofs, wrapfs, cryptfs, etc.) */
 EXPORT_SYMBOL(default_llseek);
diff -Nru a/kernel/module.c b/kernel/module.c
--- a/kernel/module.c	Wed Jan  8 20:04:44 2003
+++ b/kernel/module.c	Wed Jan  8 20:04:44 2003
@@ -51,9 +51,14 @@
 #define symbol_is(literal, string)				\
 	(strcmp(MODULE_SYMBOL_PREFIX literal, (string)) == 0)
 
-/* List of modules, protected by module_mutex */
+/* Protects extables and symbols lists */
+static spinlock_t modlist_lock = SPIN_LOCK_UNLOCKED;
+
+/* List of modules, protected by module_mutex AND modlist_lock */
 static DECLARE_MUTEX(module_mutex);
-LIST_HEAD(modules); /* FIXME: Accessed w/o lock on oops by some archs */
+static LIST_HEAD(modules);
+static LIST_HEAD(symbols);
+static LIST_HEAD(extables);
 
 /* We require a truly strong try_module_get() */
 static inline int strong_try_module_get(struct module *mod)
@@ -72,13 +77,16 @@
 
 /* Find a symbol, return value and the symbol group */
 static unsigned long __find_symbol(const char *name,
-				   struct kernel_symbol_group **group)
+				   struct kernel_symbol_group **group,
+				   int gplok)
 {
 	struct kernel_symbol_group *ks;
  
 	list_for_each_entry(ks, &symbols, list) {
  		unsigned int i;
 
+		if (ks->gplonly && !gplok)
+			continue;
 		for (i = 0; i < ks->num_syms; i++) {
 			if (strcmp(ks->syms[i].name, name) == 0) {
 				*group = ks;
@@ -481,19 +489,29 @@
 static void print_unload_info(struct seq_file *m, struct module *mod)
 {
 	struct module_use *use;
+	int printed_something = 0;
 
-	seq_printf(m, " %u", module_refcount(mod));
+	seq_printf(m, " %u ", module_refcount(mod));
 
-	list_for_each_entry(use, &mod->modules_which_use_me, list)
-		seq_printf(m, " %s", use->module_which_uses->name);
+	/* Always include a trailing , so userspace can differentiate
+           between this and the old multi-field proc format. */
+	list_for_each_entry(use, &mod->modules_which_use_me, list) {
+		printed_something = 1;
+		seq_printf(m, "%s,", use->module_which_uses->name);
+	}
 
-	if (mod->unsafe)
-		seq_printf(m, " [unsafe]");
+	if (mod->unsafe) {
+		printed_something = 1;
+		seq_printf(m, "[unsafe],");
+	}
 
-	if (mod->init != init_module && mod->exit == cleanup_module)
-		seq_printf(m, " [permanent]");
+	if (mod->init != init_module && mod->exit == cleanup_module) {
+		printed_something = 1;
+		seq_printf(m, "[permanent],");
+	}
 
-	seq_printf(m, "\n");
+	if (!printed_something)
+		seq_printf(m, "-");
 }
 
 void __symbol_put(const char *symbol)
@@ -502,7 +520,7 @@
 	unsigned long flags;
 
 	spin_lock_irqsave(&modlist_lock, flags);
-	if (!__find_symbol(symbol, &ksg))
+	if (!__find_symbol(symbol, &ksg, 1))
 		BUG();
 	module_put(ksg->owner);
 	spin_unlock_irqrestore(&modlist_lock, flags);
@@ -534,7 +552,8 @@
 #else /* !CONFIG_MODULE_UNLOAD */
 static void print_unload_info(struct seq_file *m, struct module *mod)
 {
-	seq_printf(m, "\n");
+	/* We don't know the usage count, or what modules are using. */
+	seq_printf(m, " - -");
 }
 
 static inline void module_unload_free(struct module *mod)
@@ -721,7 +740,7 @@
 	}
 	/* Look in other modules... */
 	spin_lock_irq(&modlist_lock);
-	ret = __find_symbol(name, ksg);
+	ret = __find_symbol(name, ksg, mod->license_gplok);
 	if (ret) {
 		/* This can fail due to OOM, or module unloading */
 		if (!use_module(mod, (*ksg)->owner))
@@ -735,9 +754,10 @@
 static void free_module(struct module *mod)
 {
 	/* Delete from various lists */
-	list_del(&mod->list);
 	spin_lock_irq(&modlist_lock);
+	list_del(&mod->list);
 	list_del(&mod->symbols.list);
+	list_del(&mod->gpl_symbols.list);
 	list_del(&mod->extable.list);
 	spin_unlock_irq(&modlist_lock);
 
@@ -758,7 +778,7 @@
 	unsigned long value, flags;
 
 	spin_lock_irqsave(&modlist_lock, flags);
-	value = __find_symbol(symbol, &ksg);
+	value = __find_symbol(symbol, &ksg, 1);
 	if (value && !strong_try_module_get(ksg->owner))
 		value = 0;
 	spin_unlock_irqrestore(&modlist_lock, flags);
@@ -880,7 +900,7 @@
 
 /* Lay out the SHF_ALLOC sections in a way not dissimilar to how ld
    might -- code, read-only data, read-write data, small data.  Tally
-   sizes, and place the offsets into sh_link fields: high bit means it
+   sizes, and place the offsets into sh_entsize fields: high bit means it
    belongs in init. */
 static void layout_sections(struct module *mod,
 			    const Elf_Ehdr *hdr,
@@ -896,7 +916,7 @@
 	unsigned int m, i;
 
 	for (i = 0; i < hdr->e_shnum; i++)
-		sechdrs[i].sh_link = ~0UL;
+		sechdrs[i].sh_entsize = ~0UL;
 
 	DEBUGP("Core section allocation order:\n");
 	for (m = 0; m < ARRAY_SIZE(masks); ++m) {
@@ -905,10 +925,10 @@
 
 			if ((s->sh_flags & masks[m][0]) != masks[m][0]
 			    || (s->sh_flags & masks[m][1])
-			    || s->sh_link != ~0UL
+			    || s->sh_entsize != ~0UL
 			    || strstr(secstrings + s->sh_name, ".init"))
 				continue;
-			s->sh_link = get_offset(&mod->core_size, s);
+			s->sh_entsize = get_offset(&mod->core_size, s);
 			DEBUGP("\t%s\n", name);
 		}
 	}
@@ -920,17 +940,44 @@
 
 			if ((s->sh_flags & masks[m][0]) != masks[m][0]
 			    || (s->sh_flags & masks[m][1])
-			    || s->sh_link != ~0UL
+			    || s->sh_entsize != ~0UL
 			    || !strstr(secstrings + s->sh_name, ".init"))
 				continue;
-			s->sh_link = (get_offset(&mod->init_size, s)
-				      | INIT_OFFSET_MASK);
+			s->sh_entsize = (get_offset(&mod->init_size, s)
+					 | INIT_OFFSET_MASK);
 			DEBUGP("\t%s\n", name);
 		}
 	}
 }
 
-/* Allocate and load the module */
+static inline int license_is_gpl_compatible(const char *license)
+{
+	return (strcmp(license, "GPL") == 0
+		|| strcmp(license, "GPL v2") == 0
+		|| strcmp(license, "GPL and additional rights") == 0
+		|| strcmp(license, "Dual BSD/GPL") == 0
+		|| strcmp(license, "Dual MPL/GPL") == 0);
+}
+
+static void set_license(struct module *mod, Elf_Shdr *sechdrs, int licenseidx)
+{
+	char *license;
+
+	if (licenseidx) 
+		license = (char *)sechdrs[licenseidx].sh_addr;
+	else
+		license = "unspecified";
+
+	mod->license_gplok = license_is_gpl_compatible(license);
+	if (!mod->license_gplok) {
+		printk(KERN_WARNING "%s: module license '%s' taints kernel.\n",
+		       mod->name, license);
+		tainted |= TAINT_PROPRIETARY_MODULE;
+	}
+}
+
+/* Allocate and load the module: note that size of section 0 is always
+   zero, and we rely on this for optional sections. */
 static struct module *load_module(void *umod,
 				  unsigned long len,
 				  const char *uargs)
@@ -939,7 +986,7 @@
 	Elf_Shdr *sechdrs;
 	char *secstrings, *args;
 	unsigned int i, symindex, exportindex, strindex, setupindex, exindex,
-		modindex, obsparmindex;
+		modindex, obsparmindex, licenseindex, gplindex;
 	long arglen;
 	struct module *mod;
 	long err = 0;
@@ -975,7 +1022,7 @@
 
 	/* May not export symbols, or have setup params, so these may
            not exist */
-	exportindex = setupindex = obsparmindex = 0;
+	exportindex = setupindex = obsparmindex = gplindex = licenseindex = 0;
 
 	/* And these should exist, but gcc whinges if we don't init them */
 	symindex = strindex = exindex = modindex = 0;
@@ -1018,6 +1065,16 @@
 			/* Obsolete MODULE_PARM() table */
 			DEBUGP("Obsolete param found in section %u\n", i);
 			obsparmindex = i;
+		} else if (strcmp(secstrings+sechdrs[i].sh_name,".init.license")
+			   == 0) {
+			/* MODULE_LICENSE() */
+			DEBUGP("Licence found in section %u\n", i);
+			licenseindex = i;
+		} else if (strcmp(secstrings+sechdrs[i].sh_name,
+				  "__gpl_ksymtab") == 0) {
+			/* EXPORT_SYMBOL_GPL() */
+			DEBUGP("GPL symbols found in section %u\n", i);
+			gplindex = i;
 		}
 #ifdef CONFIG_KALLSYMS
 		/* symbol and string tables for decoding later. */
@@ -1066,7 +1123,7 @@
 	if (err < 0)
 		goto free_mod;
 
-	/* Determine total sizes, and put offsets in sh_link.  For now
+	/* Determine total sizes, and put offsets in sh_entsize.  For now
 	   this is done generically; there doesn't appear to be any
 	   special cases for the architectures. */
 	layout_sections(mod, hdr, sechdrs, secstrings);
@@ -1095,11 +1152,11 @@
 		if (!(sechdrs[i].sh_flags & SHF_ALLOC))
 			continue;
 
-		if (sechdrs[i].sh_link & INIT_OFFSET_MASK)
+		if (sechdrs[i].sh_entsize & INIT_OFFSET_MASK)
 			dest = mod->module_init
-				+ (sechdrs[i].sh_link & ~INIT_OFFSET_MASK);
+				+ (sechdrs[i].sh_entsize & ~INIT_OFFSET_MASK);
 		else
-			dest = mod->module_core + sechdrs[i].sh_link;
+			dest = mod->module_core + sechdrs[i].sh_entsize;
 
 		if (sechdrs[i].sh_type != SHT_NOBITS)
 			memcpy(dest, (void *)sechdrs[i].sh_addr,
@@ -1113,17 +1170,21 @@
 	/* Now we've moved module, initialize linked lists, etc. */
 	module_unload_init(mod);
 
+	/* Set up license info based on contents of section */
+	set_license(mod, sechdrs, licenseindex);
+
 	/* Fix up syms, so that st_value is a pointer to location. */
 	err = simplify_symbols(sechdrs, symindex, strindex, mod);
 	if (err < 0)
 		goto cleanup;
 
-	/* Set up EXPORTed symbols */
-	if (exportindex) {
-		mod->symbols.num_syms = (sechdrs[exportindex].sh_size
-					/ sizeof(*mod->symbols.syms));
-		mod->symbols.syms = (void *)sechdrs[exportindex].sh_addr;
-	}
+	/* Set up EXPORTed & EXPORT_GPLed symbols (section 0 is 0 length) */
+	mod->symbols.num_syms = (sechdrs[exportindex].sh_size
+				 / sizeof(*mod->symbols.syms));
+	mod->symbols.syms = (void *)sechdrs[exportindex].sh_addr;
+	mod->gpl_symbols.num_syms = (sechdrs[gplindex].sh_size
+				 / sizeof(*mod->symbols.syms));
+	mod->gpl_symbols.syms = (void *)sechdrs[gplindex].sh_addr;
 
 	/* Set up exception table */
 	if (exindex) {
@@ -1228,8 +1289,9 @@
 	spin_lock_irq(&modlist_lock);
 	list_add(&mod->extable.list, &extables);
 	list_add_tail(&mod->symbols.list, &symbols);
-	spin_unlock_irq(&modlist_lock);
+	list_add_tail(&mod->gpl_symbols.list, &symbols);
 	list_add(&mod->list, &modules);
+	spin_unlock_irq(&modlist_lock);
 
 	/* Drop lock so they can recurse */
 	up(&module_mutex);
@@ -1256,28 +1318,17 @@
 	mod->state = MODULE_STATE_LIVE;
 	module_free(mod, mod->module_init);
 	mod->module_init = NULL;
+	mod->init_size = 0;
 
 	return 0;
 }
 
-#ifdef CONFIG_KALLSYMS
-static inline int inside_init(struct module *mod, unsigned long addr)
+static inline int within(unsigned long addr, void *start, unsigned long size)
 {
-	if (mod->module_init
-	    && (unsigned long)mod->module_init <= addr
-	    && (unsigned long)mod->module_init + mod->init_size > addr)
-		return 1;
-	return 0;
-}
-
-static inline int inside_core(struct module *mod, unsigned long addr)
-{
-	if ((unsigned long)mod->module_core <= addr
-	    && (unsigned long)mod->module_core + mod->core_size > addr)
-		return 1;
-	return 0;
+	return ((void *)addr >= start && (void *)addr < start + size);
 }
 
+#ifdef CONFIG_KALLSYMS
 static const char *get_ksymbol(struct module *mod,
 			       unsigned long addr,
 			       unsigned long *size,
@@ -1287,7 +1338,7 @@
 	unsigned long nextval;
 
 	/* At worse, next value is at end of module */
-	if (inside_core(mod, addr))
+	if (within(addr, mod->module_init, mod->init_size))
 		nextval = (unsigned long)mod->module_core+mod->core_size;
 	else 
 		nextval = (unsigned long)mod->module_init+mod->init_size;
@@ -1325,7 +1376,8 @@
 	struct module *mod;
 
 	list_for_each_entry(mod, &modules, list) {
-		if (inside_core(mod, addr) || inside_init(mod, addr)) {
+		if (within(addr, mod->module_init, mod->init_size)
+		    || within(addr, mod->module_core, mod->core_size)) {
 			*modname = mod->name;
 			return get_ksymbol(mod, addr, size, offset);
 		}
@@ -1370,14 +1422,82 @@
 	seq_printf(m, "%s %lu",
 		   mod->name, mod->init_size + mod->core_size);
 	print_unload_info(m, mod);
+	seq_printf(m, "\n");
 	return 0;
 }
+
+/* Format: modulename size refcount deps
+
+   Where refcount is a number or -, and deps is a comma-separated list
+   of depends or -.
+*/
 struct seq_operations modules_op = {
 	.start	= m_start,
 	.next	= m_next,
 	.stop	= m_stop,
 	.show	= m_show
 };
+
+/* Given an address, look for it in the module exception tables. */
+const struct exception_table_entry *search_module_extables(unsigned long addr)
+{
+	unsigned long flags;
+	const struct exception_table_entry *e = NULL;
+	struct exception_table *i;
+
+	spin_lock_irqsave(&modlist_lock, flags);
+	list_for_each_entry(i, &extables, list) {
+		if (i->num_entries == 0)
+			continue;
+				
+		e = search_extable(i->entry, i->entry+i->num_entries-1, addr);
+		if (e)
+			break;
+	}
+	spin_unlock_irqrestore(&modlist_lock, flags);
+
+	/* Now, if we found one, we are running inside it now, hence
+           we cannot unload the module, hence no refcnt needed. */
+	return e;
+}
+
+/* Is this a valid kernel address?  We don't grab the lock: we are oopsing. */
+int module_text_address(unsigned long addr)
+{
+	struct module *mod;
+
+	list_for_each_entry(mod, &modules, list)
+		if (within(addr, mod->module_init, mod->init_size)
+		    || within(addr, mod->module_core, mod->core_size))
+			return 1;
+	return 0;
+}
+
+/* Provided by the linker */
+extern const struct kernel_symbol __start___ksymtab[];
+extern const struct kernel_symbol __stop___ksymtab[];
+extern const struct kernel_symbol __start___gpl_ksymtab[];
+extern const struct kernel_symbol __stop___gpl_ksymtab[];
+
+static struct kernel_symbol_group kernel_symbols, kernel_gpl_symbols;
+
+static int __init symbols_init(void)
+{
+	/* Add kernel symbols to symbol table */
+	kernel_symbols.num_syms = (__stop___ksymtab - __start___ksymtab);
+	kernel_symbols.syms = __start___ksymtab;
+	kernel_symbols.gplonly = 0;
+	list_add(&kernel_symbols.list, &symbols);
+	kernel_gpl_symbols.num_syms = (__stop___gpl_ksymtab
+				       - __start___gpl_ksymtab);
+	kernel_gpl_symbols.syms = __start___gpl_ksymtab;
+	kernel_gpl_symbols.gplonly = 1;
+	list_add(&kernel_gpl_symbols.list, &symbols);
+
+	return 0;
+}
+
+__initcall(symbols_init);
 
 /* Obsolete lvalue for broken code which asks about usage */
 int module_dummy_usage = 1;
diff -Nru a/kernel/panic.c b/kernel/panic.c
--- a/kernel/panic.c	Wed Jan  8 20:04:45 2003
+++ b/kernel/panic.c	Wed Jan  8 20:04:45 2003
@@ -103,7 +103,7 @@
 /**
  *	print_tainted - return a string to represent the kernel taint state.
  *
- *  'P' - Proprietory module has been loaded.
+ *  'P' - Proprietary module has been loaded.
  *  'F' - Module has been forcibly loaded.
  *  'S' - SMP with CPUs not designed for SMP.
  *
@@ -115,7 +115,7 @@
 	static char buf[20];
 	if (tainted) {
 		snprintf(buf, sizeof(buf), "Tainted: %c%c%c",
-			tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
+			tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
 			tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
 			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
 	}
diff -Nru a/kernel/pid.c b/kernel/pid.c
--- a/kernel/pid.c	Wed Jan  8 20:04:44 2003
+++ b/kernel/pid.c	Wed Jan  8 20:04:44 2003
@@ -23,10 +23,11 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
+#include <linux/hash.h>
 
-#define PIDHASH_SIZE 4096
-#define pid_hashfn(nr) ((nr >> 8) ^ nr) & (PIDHASH_SIZE - 1)
-static struct list_head pid_hash[PIDTYPE_MAX][PIDHASH_SIZE];
+#define pid_hashfn(nr) hash_long((unsigned long)nr, pidhash_shift)
+static struct list_head *pid_hash[PIDTYPE_MAX];
+static int pidhash_shift;
 
 int pid_max = PID_MAX_DEFAULT;
 int last_pid;
@@ -258,20 +259,46 @@
 	attach_pid(leader, PIDTYPE_SID, leader->session);
 }
 
+/*
+ * The pid hash table is scaled according to the amount of memory in the
+ * machine.  From a minimum of 16 slots up to 4096 slots at one gigabyte or
+ * more.
+ */
 void __init pidhash_init(void)
 {
-	int i, j;
+	int i, j, pidhash_size;
+	unsigned long megabytes = max_pfn >> (20 - PAGE_SHIFT);
+
+	pidhash_shift = max(4, fls(megabytes * 4));
+	pidhash_shift = min(12, pidhash_shift);
+	pidhash_size = 1 << pidhash_shift;
+
+	printk("PID hash table entries: %d (order %d: %Zd bytes)\n",
+		pidhash_size, pidhash_shift,
+		pidhash_size * sizeof(struct list_head));
+
+	for (i = 0; i < PIDTYPE_MAX; i++) {
+		pid_hash[i] = alloc_bootmem(pidhash_size *
+					sizeof(struct list_head));
+		if (!pid_hash[i])
+			panic("Could not alloc pidhash!\n");
+		for (j = 0; j < pidhash_size; j++)
+			INIT_LIST_HEAD(&pid_hash[i][j]);
+	}
+}
+
+void __init pidmap_init(void)
+{
+	int i;
 
-	/*
-	 * Allocate PID 0, and hash it via all PID types:
-	 */
 	pidmap_array->page = (void *)get_zeroed_page(GFP_KERNEL);
 	set_bit(0, pidmap_array->page);
 	atomic_dec(&pidmap_array->nr_free);
 
-	for (i = 0; i < PIDTYPE_MAX; i++) {
-		for (j = 0; j < PIDHASH_SIZE; j++)
-			INIT_LIST_HEAD(&pid_hash[i][j]);
+	/*
+	 * Allocate PID 0, and hash it via all PID types:
+	 */
+
+	for (i = 0; i < PIDTYPE_MAX; i++)
 		attach_pid(current, i, 0);
-	}
 }
diff -Nru a/kernel/platform.c b/kernel/platform.c
--- a/kernel/platform.c	Wed Jan  8 20:04:44 2003
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,72 +0,0 @@
-/*
- * platform driver support 
- */
-
-#include <linux/platform.h>
-#include <linux/module.h>
-#include <linux/errno.h>
-
-
-void default_reboot(char * cmd)
-{
-	/* nothing */
-}
-
-void default_halt(void)
-{
-	/* nothing */
-}
-
-int default_suspend(int state, int flags)
-{
-	return -ENOSYS;
-}
-
-static struct platform_t default_platform = {
-	.name		= "Default Platform",
-	.suspend_states	= 0,
-	.reboot		= default_reboot,
-	.halt		= default_halt,
-	.power_off	= default_halt,
-	.suspend	= default_suspend,
-	.idle		= default_idle,
-};
-
-struct platform_t * platform = &default_platform;
-static spinlock_t platform_lock = SPIN_LOCK_UNLOCKED;
-
-/**
- * set_platform_driver - set the platform driver.
- * @pf:	driver to set it to
- *
- * Return -EEXIST if someone else already owns it.
- */
-int set_platform_driver(struct platform_t * pf)
-{
-	if (!pf)
-		return -EINVAL;
-	spin_lock(&platform_lock);
-	if (platform != &default_platform) {
-		spin_unlock(&platform_lock);
-		return -EEXIST;
-	}
-	platform = pf;
-	spin_unlock(&platform_lock);
-	return 0;
-}
-
-void remove_platform_driver(struct platform_t * pf)
-{
-	spin_lock(&platform_lock);
-	if (platform == pf)
-		platform = &default_platform;
-	spin_unlock(&platform_lock);
-}
-
-EXPORT_SYMBOL(default_reboot);
-EXPORT_SYMBOL(default_halt);
-EXPORT_SYMBOL(default_suspend);
-
-EXPORT_SYMBOL(platform);
-EXPORT_SYMBOL(set_platform_driver);
-EXPORT_SYMBOL(remove_platform_driver);
diff -Nru a/kernel/printk.c b/kernel/printk.c
--- a/kernel/printk.c	Wed Jan  8 20:04:45 2003
+++ b/kernel/printk.c	Wed Jan  8 20:04:45 2003
@@ -31,16 +31,7 @@
 
 #include <asm/uaccess.h>
 
-#if defined(CONFIG_X86_NUMAQ) || defined(CONFIG_IA64)
-#define LOG_BUF_LEN	(65536)
-#elif defined(CONFIG_ARCH_S390)
-#define LOG_BUF_LEN	(131072)
-#elif defined(CONFIG_SMP)
-#define LOG_BUF_LEN	(32768)
-#else	
-#define LOG_BUF_LEN	(16384)			/* This must be a power of two */
-#endif
-
+#define LOG_BUF_LEN	(1 << CONFIG_LOG_BUF_SHIFT)
 #define LOG_BUF_MASK	(LOG_BUF_LEN-1)
 
 /* printk's without a loglevel use this.. */
diff -Nru a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c	Wed Jan  8 20:04:45 2003
+++ b/kernel/sched.c	Wed Jan  8 20:04:45 2003
@@ -986,9 +986,7 @@
 		}
 	}
 
-#if CONFIG_DEBUG_HIGHMEM
 	check_highmem_ptes();
-#endif
 need_resched:
 	preempt_disable();
 	prev = current;
diff -Nru a/lib/crc32.c b/lib/crc32.c
--- a/lib/crc32.c	Wed Jan  8 20:04:32 2003
+++ b/lib/crc32.c	Wed Jan  8 20:04:32 2003
@@ -92,7 +92,7 @@
 
 	crc = __cpu_to_le32(crc);
 	/* Align it */
-	for ( ; ((u32)b)&3 && len ; len--){
+	for ( ; ((long)b)&3 && len ; len--){
 # ifdef __LITTLE_ENDIAN
 		crc = (crc>>8) ^ crc32table_le[ (crc ^ *((u8 *)b)++) & 0xff ];
 # else
@@ -201,7 +201,7 @@
 
 	crc = __cpu_to_be32(crc);
 	/* Align it */
-	for ( ; ((u32)b)&3 && len ; len--){
+	for ( ; ((long)b)&3 && len ; len--){
 # ifdef __LITTLE_ENDIAN
 		crc = (crc>>8) ^ crc32table_be[ (crc ^ *((u8 *)b)++) & 0xff ];
 # else
@@ -265,8 +265,19 @@
 }
 #endif
 
+u32 bitreverse(u32 x)
+{
+	x = (x >> 16) | (x << 16);
+	x = (x >> 8 & 0x00ff00ff) | (x << 8 & 0xff00ff00);
+	x = (x >> 4 & 0x0f0f0f0f) | (x << 4 & 0xf0f0f0f0);
+	x = (x >> 2 & 0x33333333) | (x << 2 & 0xcccccccc);
+	x = (x >> 1 & 0x55555555) | (x << 1 & 0xaaaaaaaa);
+	return x;
+}
+
 EXPORT_SYMBOL(crc32_le);
 EXPORT_SYMBOL(crc32_be);
+EXPORT_SYMBOL(bitreverse);
 
 /*
  * A brief CRC tutorial.
@@ -411,16 +422,6 @@
 
 }
 #endif
-
-static u32 attribute((const)) bitreverse(u32 x)
-{
-	x = (x >> 16) | (x << 16);
-	x = (x >> 8 & 0x00ff00ff) | (x << 8 & 0xff00ff00);
-	x = (x >> 4 & 0x0f0f0f0f) | (x << 4 & 0xf0f0f0f0);
-	x = (x >> 2 & 0x33333333) | (x << 2 & 0xcccccccc);
-	x = (x >> 1 & 0x55555555) | (x << 1 & 0xaaaaaaaa);
-	return x;
-}
 
 static void bytereverse(unsigned char *buf, size_t len)
 {
diff -Nru a/lib/kobject.c b/lib/kobject.c
--- a/lib/kobject.c	Wed Jan  8 20:04:45 2003
+++ b/lib/kobject.c	Wed Jan  8 20:04:45 2003
@@ -11,6 +11,14 @@
 
 static spinlock_t kobj_lock = SPIN_LOCK_UNLOCKED;
 
+static inline struct kobj_type * get_ktype(struct kobject * k)
+{
+	if (k->kset && k->kset->ktype)
+		return k->kset->ktype;
+	else 
+		return k->ktype;
+}
+
 /**
  *	populate_dir - populate directory with attributes.
  *	@kobj:	object we're working on.
@@ -25,13 +33,13 @@
 
 static int populate_dir(struct kobject * kobj)
 {
-	struct subsystem * s = kobj->subsys;
+	struct kobj_type * t = get_ktype(kobj);
 	struct attribute * attr;
 	int error = 0;
 	int i;
 	
-	if (s && s->default_attrs) {
-		for (i = 0; (attr = s->default_attrs[i]); i++) {
+	if (t && t->default_attrs) {
+		for (i = 0; (attr = t->default_attrs[i]); i++) {
 			if ((error = sysfs_create_file(kobj,attr)))
 				break;
 		}
@@ -53,6 +61,12 @@
 }
 
 
+static inline struct kobject * to_kobj(struct list_head * entry)
+{
+	return container_of(entry,struct kobject,entry);
+}
+
+
 /**
  *	kobject_init - initialize object.
  *	@kobj:	object in question.
@@ -62,7 +76,7 @@
 {
 	atomic_set(&kobj->refcount,1);
 	INIT_LIST_HEAD(&kobj->entry);
-	kobj->subsys = subsys_get(kobj->subsys);
+	kobj->kset = kset_get(kobj->kset);
 }
 
 /**
@@ -73,28 +87,30 @@
 int kobject_add(struct kobject * kobj)
 {
 	int error = 0;
-	struct subsystem * s = kobj->subsys;
-	struct kobject * parent = kobject_get(kobj->parent);
+	struct kobject * parent;
 
 	if (!(kobj = kobject_get(kobj)))
 		return -ENOENT;
-	pr_debug("kobject %s: registering. parent: %s, subsys: %s\n",
+
+	parent = kobject_get(kobj->parent);
+
+	pr_debug("kobject %s: registering. parent: %s, set: %s\n",
 		 kobj->name, parent ? parent->name : "<NULL>", 
-		 kobj->subsys ? kobj->subsys->kobj.name : "<NULL>" );
+		 kobj->kset ? kobj->kset->kobj.name : "<NULL>" );
 
-	if (s) {
-		down_write(&s->rwsem);
+	if (kobj->kset) {
+		down_write(&kobj->kset->subsys->rwsem);
 		if (parent) 
 			list_add_tail(&kobj->entry,&parent->entry);
 		else {
-			list_add_tail(&kobj->entry,&s->list);
-			kobj->parent = kobject_get(&s->kobj);
+			list_add_tail(&kobj->entry,&kobj->kset->list);
+			kobj->parent = kobject_get(&kobj->kset->kobj);
 		}
-		up_write(&s->rwsem);
+		up_write(&kobj->kset->subsys->rwsem);
 	}
 	error = create_dir(kobj);
-	if (error && kobj->parent)
-		kobject_put(kobj->parent);
+	if (error && parent)
+		kobject_put(parent);
 	return error;
 }
 
@@ -124,10 +140,10 @@
 void kobject_del(struct kobject * kobj)
 {
 	sysfs_remove_dir(kobj);
-	if (kobj->subsys) {
-		down_write(&kobj->subsys->rwsem);
+	if (kobj->kset) {
+		down_write(&kobj->kset->subsys->rwsem);
 		list_del_init(&kobj->entry);
-		up_write(&kobj->subsys->rwsem);
+		up_write(&kobj->kset->subsys->rwsem);
 	}
 	if (kobj->parent) 
 		kobject_put(kobj->parent);
@@ -170,17 +186,14 @@
 
 void kobject_cleanup(struct kobject * kobj)
 {
-	struct subsystem * s = kobj->subsys;
+	struct kobj_type * t = get_ktype(kobj);
+	struct kset * s = kobj->kset;
 
 	pr_debug("kobject %s: cleaning up\n",kobj->name);
-	if (s) {
-		down_write(&s->rwsem);
-		list_del_init(&kobj->entry);
-		if (s->release)
-			s->release(kobj);
-		up_write(&s->rwsem);
-		subsys_put(s);
-	}
+	if (t && t->release)
+		t->release(kobj);
+	if (s)
+		kset_put(s);
 }
 
 /**
@@ -199,32 +212,124 @@
 }
 
 
+/**
+ *	kset_init - initialize a kset for use
+ *	@k:	kset 
+ */
+
+void kset_init(struct kset * k)
+{
+	kobject_init(&k->kobj);
+	INIT_LIST_HEAD(&k->list);
+}
+
+
+/**
+ *	kset_add - add a kset object to the hierarchy.
+ *	@k:	kset.
+ *
+ *	Simply, this adds the kset's embedded kobject to the 
+ *	hierarchy. 
+ *	We also try to make sure that the kset's embedded kobject
+ *	has a parent before it is added. We only care if the embedded
+ *	kobject is not part of a kset itself, since kobject_add()
+ *	assigns a parent in that case. 
+ *	If that is the case, and the kset has a controlling subsystem,
+ *	then we set the kset's parent to be said subsystem. 
+ */
+
+int kset_add(struct kset * k)
+{
+	if (!k->kobj.parent && !k->kobj.kset && k->subsys)
+		k->kobj.parent = &k->subsys->kset.kobj;
+
+	return kobject_add(&k->kobj);
+}
+
+
+/**
+ *	kset_register - initialize and add a kset.
+ *	@k:	kset.
+ */
+
+int kset_register(struct kset * k)
+{
+	kset_init(k);
+	return kset_add(k);
+}
+
+
+/**
+ *	kset_unregister - remove a kset.
+ *	@k:	kset.
+ */
+
+void kset_unregister(struct kset * k)
+{
+	kobject_unregister(&k->kobj);
+}
+
+
+/**
+ *	kset_find_obj - search for object in kset.
+ *	@kset:	kset we're looking in.
+ *	@name:	object's name.
+ *
+ *	Lock kset via @kset->subsys, and iterate over @kset->list,
+ *	looking for a matching kobject. Return object if found.
+ */
+
+struct kobject * kset_find_obj(struct kset * kset, char * name)
+{
+	struct list_head * entry;
+	struct kobject * ret = NULL;
+
+	down_read(&kset->subsys->rwsem);
+	list_for_each(entry,&kset->list) {
+		struct kobject * k = to_kobj(entry);
+		if (!strcmp(k->name,name)) {
+			ret = k;
+			break;
+		}
+	}
+	up_read(&kset->subsys->rwsem);
+	return ret;
+}
+
+
 void subsystem_init(struct subsystem * s)
 {
-	kobject_init(&s->kobj);
 	init_rwsem(&s->rwsem);
-	INIT_LIST_HEAD(&s->list);
+	kset_init(&s->kset);
 }
 
 /**
  *	subsystem_register - register a subsystem.
  *	@s:	the subsystem we're registering.
+ *
+ *	Once we register the subsystem, we want to make sure that 
+ *	the kset points back to this subsystem for correct usage of 
+ *	the rwsem. 
  */
 
 int subsystem_register(struct subsystem * s)
 {
+	int error;
+
 	subsystem_init(s);
-	if (s->parent)
-		s->kobj.parent = &s->parent->kobj;
-	pr_debug("subsystem %s: registering, parent: %s\n",
-		 s->kobj.name,s->parent ? s->parent->kobj.name : "<none>");
-	return kobject_register(&s->kobj);
+	pr_debug("subsystem %s: registering\n",s->kobj.name);
+
+	if (!(error = kset_add(&s->kset))) {
+		if (!s->kset.subsys)
+			s->kset.subsys = s;
+	}
+	return error;
 }
 
 void subsystem_unregister(struct subsystem * s)
 {
 	pr_debug("subsystem %s: unregistering\n",s->kobj.name);
-	kobject_unregister(&s->kobj);
+	kset_unregister(&s->kset);
 }
 
 
@@ -238,7 +343,7 @@
 {
 	int error = 0;
 	if (subsys_get(s)) {
-		error = sysfs_create_file(&s->kobj,&a->attr);
+		error = sysfs_create_file(&s->kset.kobj,&a->attr);
 		subsys_put(s);
 	}
 	return error;
@@ -254,7 +359,7 @@
 void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a)
 {
 	if (subsys_get(s)) {
-		sysfs_remove_file(&s->kobj,&a->attr);
+		sysfs_remove_file(&s->kset.kobj,&a->attr);
 		subsys_put(s);
 	}
 }
diff -Nru a/lib/radix-tree.c b/lib/radix-tree.c
--- a/lib/radix-tree.c	Wed Jan  8 20:04:43 2003
+++ b/lib/radix-tree.c	Wed Jan  8 20:04:43 2003
@@ -20,10 +20,11 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/mempool.h>
 #include <linux/module.h>
 #include <linux/radix-tree.h>
+#include <linux/percpu.h>
 #include <linux/slab.h>
+#include <linux/gfp.h>
 #include <linux/string.h>
 
 /*
@@ -49,18 +50,74 @@
  * Radix tree node cache.
  */
 static kmem_cache_t *radix_tree_node_cachep;
-static mempool_t *radix_tree_node_pool;
 
-static inline struct radix_tree_node *
+/*
+ * Per-cpu pool of preloaded nodes
+ */
+struct radix_tree_preload {
+	int nr;
+	struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH];
+};
+DEFINE_PER_CPU(struct radix_tree_preload, radix_tree_preloads) = { 0, };
+
+/*
+ * This assumes that the caller has performed appropriate preallocation, and
+ * that the caller has pinned this thread of control to the current CPU.
+ */
+static struct radix_tree_node *
 radix_tree_node_alloc(struct radix_tree_root *root)
 {
-	return mempool_alloc(radix_tree_node_pool, root->gfp_mask);
+	struct radix_tree_node *ret;
+
+	ret = kmem_cache_alloc(radix_tree_node_cachep, root->gfp_mask);
+	if (ret == NULL && !(root->gfp_mask & __GFP_WAIT)) {
+		struct radix_tree_preload *rtp;
+
+		rtp = &__get_cpu_var(radix_tree_preloads);
+		if (rtp->nr) {
+			ret = rtp->nodes[rtp->nr - 1];
+			rtp->nodes[rtp->nr - 1] = NULL;
+			rtp->nr--;
+		}
+	}
+	return ret;
 }
 
 static inline void
 radix_tree_node_free(struct radix_tree_node *node)
 {
-	mempool_free(node, radix_tree_node_pool);
+	kmem_cache_free(radix_tree_node_cachep, node);
+}
+
+/*
+ * Load up this CPU's radix_tree_node buffer with sufficient objects to
+ * ensure that the addition of a single element in the tree cannot fail.  On
+ * success, return zero, with preemption disabled.  On error, return -ENOMEM
+ * with preemption not disabled.
+ */
+int radix_tree_preload(int gfp_mask)
+{
+	struct radix_tree_preload *rtp;
+	struct radix_tree_node *node;
+	int ret = -ENOMEM;
+
+	preempt_disable();
+	rtp = &__get_cpu_var(radix_tree_preloads);
+	while (rtp->nr < ARRAY_SIZE(rtp->nodes)) {
+		preempt_enable();
+		node = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask);
+		if (node == NULL)
+			goto out;
+		preempt_disable();
+		rtp = &__get_cpu_var(radix_tree_preloads);
+		if (rtp->nr < ARRAY_SIZE(rtp->nodes))
+			rtp->nodes[rtp->nr++] = node;
+		else
+			kmem_cache_free(radix_tree_node_cachep, node);
+	}
+	ret = 0;
+out:
+	return ret;
 }
 
 /*
@@ -339,26 +396,12 @@
 }
 EXPORT_SYMBOL(radix_tree_delete);
 
-static void radix_tree_node_ctor(void *node, kmem_cache_t *cachep, unsigned long flags)
+static void
+radix_tree_node_ctor(void *node, kmem_cache_t *cachep, unsigned long flags)
 {
 	memset(node, 0, sizeof(struct radix_tree_node));
 }
 
-static void *radix_tree_node_pool_alloc(int gfp_mask, void *data)
-{
-	return kmem_cache_alloc(radix_tree_node_cachep, gfp_mask);
-}
-
-static void radix_tree_node_pool_free(void *node, void *data)
-{
-	kmem_cache_free(radix_tree_node_cachep, node);
-}
-
-/*
- * FIXME!  512 nodes is 200-300k of memory.  This needs to be
- * scaled by the amount of available memory, and hopefully
- * reduced also.
- */
 void __init radix_tree_init(void)
 {
 	radix_tree_node_cachep = kmem_cache_create("radix_tree_node",
@@ -366,8 +409,4 @@
 			0, radix_tree_node_ctor, NULL);
 	if (!radix_tree_node_cachep)
 		panic ("Failed to create radix_tree_node cache\n");
-	radix_tree_node_pool = mempool_create(512, radix_tree_node_pool_alloc,
-			radix_tree_node_pool_free, NULL);
-	if (!radix_tree_node_pool)
-		panic ("Failed to create radix_tree_node pool\n");
 }
diff -Nru a/mm/filemap.c b/mm/filemap.c
--- a/mm/filemap.c	Wed Jan  8 20:04:43 2003
+++ b/mm/filemap.c	Wed Jan  8 20:04:43 2003
@@ -202,28 +202,31 @@
  *
  * This function does not add the page to the LRU.  The caller must do that.
  */
-int add_to_page_cache(struct page *page,
-		struct address_space *mapping, pgoff_t offset)
+int add_to_page_cache(struct page *page, struct address_space *mapping,
+		pgoff_t offset, int gfp_mask)
 {
-	int error;
+	int error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM);
 
-	page_cache_get(page);
-	write_lock(&mapping->page_lock);
-	error = radix_tree_insert(&mapping->page_tree, offset, page);
-	if (!error) {
-		SetPageLocked(page);
-		___add_to_page_cache(page, mapping, offset);
-	} else {
-		page_cache_release(page);
+	if (error == 0) {
+		page_cache_get(page);
+		write_lock(&mapping->page_lock);
+		error = radix_tree_insert(&mapping->page_tree, offset, page);
+		if (!error) {
+			SetPageLocked(page);
+			___add_to_page_cache(page, mapping, offset);
+		} else {
+			page_cache_release(page);
+		}
+		write_unlock(&mapping->page_lock);
+		radix_tree_preload_end();
 	}
-	write_unlock(&mapping->page_lock);
 	return error;
 }
 
-int add_to_page_cache_lru(struct page *page,
-		struct address_space *mapping, pgoff_t offset)
+int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
+				pgoff_t offset, int gfp_mask)
 {
-	int ret = add_to_page_cache(page, mapping, offset);
+	int ret = add_to_page_cache(page, mapping, offset, gfp_mask);
 	if (ret == 0)
 		lru_cache_add(page);
 	return ret;
@@ -432,7 +435,8 @@
 			if (!cached_page)
 				return NULL;
 		}
-		err = add_to_page_cache_lru(cached_page, mapping, index);
+		err = add_to_page_cache_lru(cached_page, mapping,
+					index, gfp_mask);
 		if (!err) {
 			page = cached_page;
 			cached_page = NULL;
@@ -488,6 +492,7 @@
 grab_cache_page_nowait(struct address_space *mapping, unsigned long index)
 {
 	struct page *page = find_get_page(mapping, index);
+	int gfp_mask;
 
 	if (page) {
 		if (!TestSetPageLocked(page))
@@ -495,8 +500,9 @@
 		page_cache_release(page);
 		return NULL;
 	}
-	page = alloc_pages(mapping->gfp_mask & ~__GFP_FS, 0);
-	if (page && add_to_page_cache_lru(page, mapping, index)) {
+	gfp_mask = mapping->gfp_mask & ~__GFP_FS;
+	page = alloc_pages(gfp_mask, 0);
+	if (page && add_to_page_cache_lru(page, mapping, index, gfp_mask)) {
 		page_cache_release(page);
 		page = NULL;
 	}
@@ -648,7 +654,8 @@
 				break;
 			}
 		}
-		error = add_to_page_cache_lru(cached_page, mapping, index);
+		error = add_to_page_cache_lru(cached_page, mapping,
+						index, GFP_KERNEL);
 		if (error) {
 			if (error == -EEXIST)
 				goto find_page;
@@ -798,8 +805,10 @@
 				nr_segs = iov_shorten((struct iovec *)iov,
 							nr_segs, count);
 			}
-			retval = generic_file_direct_IO(READ, filp,
+			retval = generic_file_direct_IO(READ, iocb,
 					iov, pos, nr_segs);
+			if (retval >= 0 && !is_sync_kiocb(iocb))
+				retval = -EIOCBQUEUED;
 			if (retval > 0)
 				*ppos = pos + retval;
 		}
@@ -940,7 +949,7 @@
 	if (!page)
 		return -ENOMEM;
 
-	error = add_to_page_cache_lru(page, mapping, offset);
+	error = add_to_page_cache_lru(page, mapping, offset, GFP_KERNEL);
 	if (!error) {
 		error = mapping->a_ops->readpage(file, page);
 		page_cache_release(page);
@@ -1327,7 +1336,8 @@
 			if (!cached_page)
 				return ERR_PTR(-ENOMEM);
 		}
-		err = add_to_page_cache_lru(cached_page, mapping, index);
+		err = add_to_page_cache_lru(cached_page, mapping,
+					index, GFP_KERNEL);
 		if (err == -EEXIST)
 			goto repeat;
 		if (err < 0) {
@@ -1406,7 +1416,8 @@
 			if (!*cached_page)
 				return NULL;
 		}
-		err = add_to_page_cache(*cached_page, mapping, index);
+		err = add_to_page_cache(*cached_page, mapping,
+					index, GFP_KERNEL);
 		if (err == -EEXIST)
 			goto repeat;
 		if (err == 0) {
@@ -1523,9 +1534,10 @@
  *							okir@monad.swb.de
  */
 ssize_t
-generic_file_write_nolock(struct file *file, const struct iovec *iov,
+generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
 				unsigned long nr_segs, loff_t *ppos)
 {
+	struct file *file = iocb->ki_filp;
 	struct address_space * mapping = file->f_dentry->d_inode->i_mapping;
 	struct address_space_operations *a_ops = mapping->a_ops;
 	size_t ocount;		/* original count */
@@ -1665,7 +1677,7 @@
 		if (count != ocount)
 			nr_segs = iov_shorten((struct iovec *)iov,
 						nr_segs, count);
-		written = generic_file_direct_IO(WRITE, file,
+		written = generic_file_direct_IO(WRITE, iocb,
 					iov, pos, nr_segs);
 		if (written > 0) {
 			loff_t end = pos + written;
@@ -1681,6 +1693,8 @@
 		 */
 		if (written >= 0 && file->f_flags & O_SYNC)
 			status = generic_osync_inode(inode, OSYNC_METADATA);
+		if (written >= 0 && !is_sync_kiocb(iocb))
+			written = -EIOCBQUEUED;
 		goto out_status;
 	}
 
@@ -1777,12 +1791,39 @@
 	return err;
 }
 
+ssize_t
+generic_file_write_nolock(struct file *file, const struct iovec *iov,
+				unsigned long nr_segs, loff_t *ppos)
+{
+	struct kiocb kiocb;
+	ssize_t ret;
+
+	init_sync_kiocb(&kiocb, file);
+	ret = generic_file_aio_write_nolock(&kiocb, iov, nr_segs, ppos);
+	if (-EIOCBQUEUED == ret)
+		ret = wait_on_sync_kiocb(&kiocb);
+	return ret;
+}
+
 ssize_t generic_file_aio_write(struct kiocb *iocb, const char *buf,
 			       size_t count, loff_t pos)
 {
-	return generic_file_write(iocb->ki_filp, buf, count, &iocb->ki_pos);
+	struct file *file = iocb->ki_filp;
+	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+	int err;
+	struct iovec local_iov = { .iov_base = (void *)buf, .iov_len = count };
+
+	BUG_ON(iocb->ki_pos != pos);
+
+	down(&inode->i_sem);
+	err = generic_file_aio_write_nolock(iocb, &local_iov, 1, 
+						&iocb->ki_pos);
+	up(&inode->i_sem);
+
+	return err;
 }
 EXPORT_SYMBOL(generic_file_aio_write);
+EXPORT_SYMBOL(generic_file_aio_write_nolock);
 
 ssize_t generic_file_write(struct file *file, const char *buf,
 			   size_t count, loff_t *ppos)
@@ -1821,4 +1862,27 @@
 	ret = generic_file_write_nolock(file, iov, nr_segs, ppos);
 	up(&inode->i_sem);
 	return ret;
+}
+
+ssize_t
+generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
+	loff_t offset, unsigned long nr_segs)
+{
+	struct file *file = iocb->ki_filp;
+	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	ssize_t retval;
+
+	if (mapping->nrpages) {
+		retval = filemap_fdatawrite(mapping);
+		if (retval == 0)
+			retval = filemap_fdatawait(mapping);
+		if (retval)
+			goto out;
+	}
+
+	retval = mapping->a_ops->direct_IO(rw, iocb, iov, offset, nr_segs);
+	if (rw == WRITE && mapping->nrpages)
+		invalidate_inode_pages2(mapping);
+out:
+	return retval;
 }
diff -Nru a/mm/fremap.c b/mm/fremap.c
--- a/mm/fremap.c	Wed Jan  8 20:04:32 2003
+++ b/mm/fremap.c	Wed Jan  8 20:04:32 2003
@@ -11,6 +11,7 @@
 #include <linux/mman.h>
 #include <linux/pagemap.h>
 #include <linux/swapops.h>
+#include <linux/rmap-locking.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
@@ -52,6 +53,7 @@
 	pte_t *pte, entry;
 	pgd_t *pgd;
 	pmd_t *pmd;
+	struct pte_chain *pte_chain = NULL;
 
 	pgd = pgd_offset(mm, addr);
 	spin_lock(&mm->page_table_lock);
@@ -60,6 +62,7 @@
 	if (!pmd)
 		goto err_unlock;
 
+	pte_chain = pte_chain_alloc(GFP_KERNEL);
 	pte = pte_alloc_map(mm, pmd, addr);
 	if (!pte)
 		goto err_unlock;
@@ -73,16 +76,17 @@
 	if (prot & PROT_WRITE)
 		entry = pte_mkwrite(pte_mkdirty(entry));
 	set_pte(pte, entry);
-	page_add_rmap(page, pte);
+	pte_chain = page_add_rmap(page, pte, pte_chain);
 	pte_unmap(pte);
 	flush_tlb_page(vma, addr);
 
 	spin_unlock(&mm->page_table_lock);
-
+	pte_chain_free(pte_chain);
 	return 0;
 
 err_unlock:
 	spin_unlock(&mm->page_table_lock);
+	pte_chain_free(pte_chain);
 	return err;
 }
 
diff -Nru a/mm/memory.c b/mm/memory.c
--- a/mm/memory.c	Wed Jan  8 20:04:43 2003
+++ b/mm/memory.c	Wed Jan  8 20:04:43 2003
@@ -44,6 +44,7 @@
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 #include <linux/vcache.h>
+#include <linux/rmap-locking.h>
 
 #include <asm/pgalloc.h>
 #include <asm/rmap.h>
@@ -112,10 +113,8 @@
 	}
 	pmd = pmd_offset(dir, 0);
 	pgd_clear(dir);
-	for (j = 0; j < PTRS_PER_PMD ; j++) {
-		prefetchw(pmd+j+(PREFETCH_STRIDE/16));
+	for (j = 0; j < PTRS_PER_PMD ; j++)
 		free_one_pmd(tlb, pmd+j);
-	}
 	pmd_free_tlb(tlb, pmd);
 }
 
@@ -209,11 +208,22 @@
 	pgd_t * src_pgd, * dst_pgd;
 	unsigned long address = vma->vm_start;
 	unsigned long end = vma->vm_end;
-	unsigned long cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
+	unsigned long cow;
+	struct pte_chain *pte_chain = NULL;
 
 	if (is_vm_hugetlb_page(vma))
 		return copy_hugetlb_page_range(dst, src, vma);
 
+	pte_chain = pte_chain_alloc(GFP_ATOMIC);
+	if (!pte_chain) {
+		spin_unlock(&dst->page_table_lock);
+		pte_chain = pte_chain_alloc(GFP_KERNEL);
+		spin_lock(&dst->page_table_lock);
+		if (!pte_chain)
+			goto nomem;
+	}
+	
+	cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
 	src_pgd = pgd_offset(src, address)-1;
 	dst_pgd = pgd_offset(dst, address)-1;
 
@@ -250,7 +260,8 @@
 			if (pmd_bad(*src_pmd)) {
 				pmd_ERROR(*src_pmd);
 				pmd_clear(src_pmd);
-skip_copy_pte_range:		address = (address + PMD_SIZE) & PMD_MASK;
+skip_copy_pte_range:
+				address = (address + PMD_SIZE) & PMD_MASK;
 				if (address >= end)
 					goto out;
 				goto cont_copy_pmd_range;
@@ -259,13 +270,13 @@
 			dst_pte = pte_alloc_map(dst, dst_pmd, address);
 			if (!dst_pte)
 				goto nomem;
-			spin_lock(&src->page_table_lock);			
+			spin_lock(&src->page_table_lock);	
 			src_pte = pte_offset_map_nested(src_pmd, address);
 			do {
 				pte_t pte = *src_pte;
-				struct page *ptepage;
+				struct page *page;
 				unsigned long pfn;
-				
+
 				/* copy_one_pte */
 
 				if (pte_none(pte))
@@ -276,30 +287,60 @@
 					set_pte(dst_pte, pte);
 					goto cont_copy_pte_range_noset;
 				}
-				ptepage = pte_page(pte);
 				pfn = pte_pfn(pte);
+				page = pfn_to_page(pfn);
 				if (!pfn_valid(pfn))
 					goto cont_copy_pte_range;
-				ptepage = pfn_to_page(pfn);
-				if (PageReserved(ptepage))
+				if (PageReserved(page))
 					goto cont_copy_pte_range;
 
-				/* If it's a COW mapping, write protect it both in the parent and the child */
+				/*
+				 * If it's a COW mapping, write protect it both
+				 * in the parent and the child
+				 */
 				if (cow) {
 					ptep_set_wrprotect(src_pte);
 					pte = *src_pte;
 				}
 
-				/* If it's a shared mapping, mark it clean in the child */
+				/*
+				 * If it's a shared mapping, mark it clean in
+				 * the child
+				 */
 				if (vma->vm_flags & VM_SHARED)
 					pte = pte_mkclean(pte);
 				pte = pte_mkold(pte);
-				get_page(ptepage);
+				get_page(page);
 				dst->rss++;
 
-cont_copy_pte_range:		set_pte(dst_pte, pte);
-				page_add_rmap(ptepage, dst_pte);
-cont_copy_pte_range_noset:	address += PAGE_SIZE;
+cont_copy_pte_range:
+				set_pte(dst_pte, pte);
+				pte_chain = page_add_rmap(page, dst_pte,
+							pte_chain);
+				if (pte_chain)
+					goto cont_copy_pte_range_noset;
+				pte_chain = pte_chain_alloc(GFP_ATOMIC);
+				if (pte_chain)
+					goto cont_copy_pte_range_noset;
+
+				/*
+				 * pte_chain allocation failed, and we need to
+				 * run page reclaim.
+				 */
+				pte_unmap_nested(src_pte);
+				pte_unmap(dst_pte);
+				spin_unlock(&src->page_table_lock);	
+				spin_unlock(&dst->page_table_lock);	
+				pte_chain = pte_chain_alloc(GFP_KERNEL);
+				spin_lock(&dst->page_table_lock);	
+				if (!pte_chain)
+					goto nomem;
+				spin_lock(&src->page_table_lock);
+				dst_pte = pte_offset_map(dst_pmd, address);
+				src_pte = pte_offset_map_nested(src_pmd,
+								address);
+cont_copy_pte_range_noset:
+				address += PAGE_SIZE;
 				if (address >= end) {
 					pte_unmap_nested(src_pte);
 					pte_unmap(dst_pte);
@@ -312,19 +353,23 @@
 			pte_unmap(dst_pte-1);
 			spin_unlock(&src->page_table_lock);
 		
-cont_copy_pmd_range:	src_pmd++;
+cont_copy_pmd_range:
+			src_pmd++;
 			dst_pmd++;
 		} while ((unsigned long)src_pmd & PMD_TABLE_MASK);
 	}
 out_unlock:
 	spin_unlock(&src->page_table_lock);
 out:
+	pte_chain_free(pte_chain);
 	return 0;
 nomem:
+	pte_chain_free(pte_chain);
 	return -ENOMEM;
 }
 
-static void zap_pte_range(mmu_gather_t *tlb, pmd_t * pmd, unsigned long address, unsigned long size)
+static void
+zap_pte_range(mmu_gather_t *tlb, pmd_t * pmd, unsigned long address, unsigned long size)
 {
 	unsigned long offset;
 	pte_t *ptep;
@@ -806,6 +851,7 @@
 {
 	struct page *old_page, *new_page;
 	unsigned long pfn = pte_pfn(pte);
+	struct pte_chain *pte_chain = NULL;
 
 	if (!pfn_valid(pfn))
 		goto bad_wp_page;
@@ -834,6 +880,7 @@
 	if (!new_page)
 		goto no_mem;
 	copy_cow_page(old_page,new_page,address);
+	pte_chain = pte_chain_alloc(GFP_KERNEL);
 
 	/*
 	 * Re-check the pte - we dropped the lock
@@ -845,7 +892,7 @@
 			++mm->rss;
 		page_remove_rmap(old_page, page_table);
 		break_cow(vma, new_page, address, page_table);
-		page_add_rmap(new_page, page_table);
+		pte_chain = page_add_rmap(new_page, page_table, pte_chain);
 		lru_cache_add_active(new_page);
 
 		/* Free the old page.. */
@@ -855,6 +902,7 @@
 	spin_unlock(&mm->page_table_lock);
 	page_cache_release(new_page);
 	page_cache_release(old_page);
+	pte_chain_free(pte_chain);
 	return VM_FAULT_MINOR;
 
 bad_wp_page:
@@ -992,6 +1040,7 @@
 	swp_entry_t entry = pte_to_swp_entry(orig_pte);
 	pte_t pte;
 	int ret = VM_FAULT_MINOR;
+	struct pte_chain *pte_chain = NULL;
 
 	pte_unmap(page_table);
 	spin_unlock(&mm->page_table_lock);
@@ -1021,6 +1070,11 @@
 	}
 
 	mark_page_accessed(page);
+	pte_chain = pte_chain_alloc(GFP_KERNEL);
+	if (!pte_chain) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	lock_page(page);
 
 	/*
@@ -1053,13 +1107,14 @@
 	flush_page_to_ram(page);
 	flush_icache_page(vma, page);
 	set_pte(page_table, pte);
-	page_add_rmap(page, page_table);
+	pte_chain = page_add_rmap(page, page_table, pte_chain);
 
 	/* No need to invalidate - it was non-present before */
 	update_mmu_cache(vma, address, pte);
 	pte_unmap(page_table);
 	spin_unlock(&mm->page_table_lock);
 out:
+	pte_chain_free(pte_chain);
 	return ret;
 }
 
@@ -1068,11 +1123,27 @@
  * spinlock held to protect against concurrent faults in
  * multithreaded programs. 
  */
-static int do_anonymous_page(struct mm_struct * mm, struct vm_area_struct * vma, pte_t *page_table, pmd_t *pmd, int write_access, unsigned long addr)
+static int
+do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+		pte_t *page_table, pmd_t *pmd, int write_access,
+		unsigned long addr)
 {
 	pte_t entry;
 	struct page * page = ZERO_PAGE(addr);
+	struct pte_chain *pte_chain;
+	int ret;
 
+	pte_chain = pte_chain_alloc(GFP_ATOMIC);
+	if (!pte_chain) {
+		pte_unmap(page_table);
+		spin_unlock(&mm->page_table_lock);
+		pte_chain = pte_chain_alloc(GFP_KERNEL);
+		if (!pte_chain)
+			goto no_mem;
+		spin_lock(&mm->page_table_lock);
+		page_table = pte_offset_map(pmd, addr);
+	}
+		
 	/* Read-only mapping of ZERO_PAGE. */
 	entry = pte_wrprotect(mk_pte(ZERO_PAGE(addr), vma->vm_page_prot));
 
@@ -1094,7 +1165,8 @@
 			pte_unmap(page_table);
 			page_cache_release(page);
 			spin_unlock(&mm->page_table_lock);
-			return VM_FAULT_MINOR;
+			ret = VM_FAULT_MINOR;
+			goto out;
 		}
 		mm->rss++;
 		flush_page_to_ram(page);
@@ -1104,16 +1176,21 @@
 	}
 
 	set_pte(page_table, entry);
-	page_add_rmap(page, page_table); /* ignores ZERO_PAGE */
+	/* ignores ZERO_PAGE */
+	pte_chain = page_add_rmap(page, page_table, pte_chain);
 	pte_unmap(page_table);
 
 	/* No need to invalidate - it was non-present before */
 	update_mmu_cache(vma, addr, entry);
 	spin_unlock(&mm->page_table_lock);
-	return VM_FAULT_MINOR;
+	ret = VM_FAULT_MINOR;
+	goto out;
 
 no_mem:
-	return VM_FAULT_OOM;
+	ret = VM_FAULT_OOM;
+out:
+	pte_chain_free(pte_chain);
+	return ret;
 }
 
 /*
@@ -1128,14 +1205,17 @@
  * This is called with the MM semaphore held and the page table
  * spinlock held. Exit with the spinlock released.
  */
-static int do_no_page(struct mm_struct * mm, struct vm_area_struct * vma,
+static int
+do_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
 	unsigned long address, int write_access, pte_t *page_table, pmd_t *pmd)
 {
 	struct page * new_page;
 	pte_t entry;
+	struct pte_chain *pte_chain;
 
 	if (!vma->vm_ops || !vma->vm_ops->nopage)
-		return do_anonymous_page(mm, vma, page_table, pmd, write_access, address);
+		return do_anonymous_page(mm, vma, page_table,
+					pmd, write_access, address);
 	pte_unmap(page_table);
 	spin_unlock(&mm->page_table_lock);
 
@@ -1162,6 +1242,7 @@
 		new_page = page;
 	}
 
+	pte_chain = pte_chain_alloc(GFP_KERNEL);
 	spin_lock(&mm->page_table_lock);
 	page_table = pte_offset_map(pmd, address);
 
@@ -1184,19 +1265,21 @@
 		if (write_access)
 			entry = pte_mkwrite(pte_mkdirty(entry));
 		set_pte(page_table, entry);
-		page_add_rmap(new_page, page_table);
+		pte_chain = page_add_rmap(new_page, page_table, pte_chain);
 		pte_unmap(page_table);
 	} else {
 		/* One of our sibling threads was faster, back out. */
 		pte_unmap(page_table);
 		page_cache_release(new_page);
 		spin_unlock(&mm->page_table_lock);
+		pte_chain_free(pte_chain);
 		return VM_FAULT_MINOR;
 	}
 
 	/* no need to invalidate: a not-present page shouldn't be cached */
 	update_mmu_cache(vma, address, entry);
 	spin_unlock(&mm->page_table_lock);
+	pte_chain_free(pte_chain);
 	return VM_FAULT_MAJOR;
 }
 
diff -Nru a/mm/mempool.c b/mm/mempool.c
--- a/mm/mempool.c	Wed Jan  8 20:04:44 2003
+++ b/mm/mempool.c	Wed Jan  8 20:04:44 2003
@@ -87,7 +87,13 @@
 	}
 	return pool;
 }
+EXPORT_SYMBOL(mempool_create);
 
+/*
+ * mempool_resize is disabled for now, because it has no callers.  Feel free
+ * to turn it back on if needed.
+ */
+#if 0
 /**
  * mempool_resize - resize an existing memory pool
  * @pool:       pointer to the memory pool which was allocated via
@@ -143,16 +149,21 @@
 		if (!element)
 			goto out;
 		spin_lock_irqsave(&pool->lock, flags);
-		if (pool->curr_nr < pool->min_nr)
+		if (pool->curr_nr < pool->min_nr) {
 			add_element(pool, element);
-		else
-			kfree(element);		/* Raced */
+		} else {
+			spin_unlock_irqrestore(&pool->lock, flags);
+			pool->free(element, pool->pool_data);	/* Raced */
+			spin_lock_irqsave(&pool->lock, flags);
+		}
 	}
 out_unlock:
 	spin_unlock_irqrestore(&pool->lock, flags);
 out:
 	return 0;
 }
+EXPORT_SYMBOL(mempool_resize);
+#endif
 
 /**
  * mempool_destroy - deallocate a memory pool
@@ -169,6 +180,7 @@
 		BUG();		/* There were outstanding elements */
 	free_pool(pool);
 }
+EXPORT_SYMBOL(mempool_destroy);
 
 /**
  * mempool_alloc - allocate an element from a specific memory pool
@@ -230,6 +242,7 @@
 
 	goto repeat_alloc;
 }
+EXPORT_SYMBOL(mempool_alloc);
 
 /**
  * mempool_free - return an element to the pool.
@@ -255,6 +268,7 @@
 	}
 	pool->free(element, pool->pool_data);
 }
+EXPORT_SYMBOL(mempool_free);
 
 /*
  * A commonly used alloc and free fn.
@@ -264,17 +278,11 @@
 	kmem_cache_t *mem = (kmem_cache_t *) pool_data;
 	return kmem_cache_alloc(mem, gfp_mask);
 }
+EXPORT_SYMBOL(mempool_alloc_slab);
 
 void mempool_free_slab(void *element, void *pool_data)
 {
 	kmem_cache_t *mem = (kmem_cache_t *) pool_data;
 	kmem_cache_free(mem, element);
 }
-
-EXPORT_SYMBOL(mempool_create);
-EXPORT_SYMBOL(mempool_resize);
-EXPORT_SYMBOL(mempool_destroy);
-EXPORT_SYMBOL(mempool_alloc);
-EXPORT_SYMBOL(mempool_free);
-EXPORT_SYMBOL(mempool_alloc_slab);
 EXPORT_SYMBOL(mempool_free_slab);
diff -Nru a/mm/mremap.c b/mm/mremap.c
--- a/mm/mremap.c	Wed Jan  8 20:04:44 2003
+++ b/mm/mremap.c	Wed Jan  8 20:04:44 2003
@@ -15,6 +15,7 @@
 #include <linux/swap.h>
 #include <linux/fs.h>
 #include <linux/highmem.h>
+#include <linux/rmap-locking.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
@@ -81,7 +82,9 @@
 	return pte;
 }
 
-static int copy_one_pte(struct mm_struct *mm, pte_t * src, pte_t * dst)
+static int
+copy_one_pte(struct mm_struct *mm, pte_t *src, pte_t *dst,
+		struct pte_chain **pte_chainp)
 {
 	int error = 0;
 	pte_t pte;
@@ -101,17 +104,25 @@
 		}
 		set_pte(dst, pte);
 		if (page)
-			page_add_rmap(page, dst);
+			*pte_chainp = page_add_rmap(page, dst, *pte_chainp);
 	}
 	return error;
 }
 
-static int move_one_page(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr)
+static int
+move_one_page(struct vm_area_struct *vma, unsigned long old_addr,
+		unsigned long new_addr)
 {
 	struct mm_struct *mm = vma->vm_mm;
 	int error = 0;
 	pte_t *src, *dst;
+	struct pte_chain *pte_chain;
 
+	pte_chain = pte_chain_alloc(GFP_KERNEL);
+	if (!pte_chain) {
+		error = -ENOMEM;
+		goto out;
+	}
 	spin_lock(&mm->page_table_lock);
 	src = get_one_pte_map_nested(mm, old_addr);
 	if (src) {
@@ -127,12 +138,14 @@
 		dst = alloc_one_pte_map(mm, new_addr);
 		if (src == NULL)
 			src = get_one_pte_map_nested(mm, old_addr);
-		error = copy_one_pte(mm, src, dst);
+		error = copy_one_pte(mm, src, dst, &pte_chain);
 		pte_unmap_nested(src);
 		pte_unmap(dst);
 	}
 	flush_tlb_page(vma, old_addr);
 	spin_unlock(&mm->page_table_lock);
+	pte_chain_free(pte_chain);
+out:
 	return error;
 }
 
diff -Nru a/mm/readahead.c b/mm/readahead.c
--- a/mm/readahead.c	Wed Jan  8 20:04:43 2003
+++ b/mm/readahead.c	Wed Jan  8 20:04:43 2003
@@ -65,7 +65,7 @@
 	while (!list_empty(pages)) {
 		page = list_entry(pages->prev, struct page, list);
 		list_del(&page->list);
-		if (add_to_page_cache(page, mapping, page->index)) {
+		if (add_to_page_cache(page, mapping, page->index, GFP_KERNEL)) {
 			page_cache_release(page);
 			continue;
 		}
@@ -93,7 +93,8 @@
 	for (page_idx = 0; page_idx < nr_pages; page_idx++) {
 		struct page *page = list_entry(pages->prev, struct page, list);
 		list_del(&page->list);
-		if (!add_to_page_cache(page, mapping, page->index)) {
+		if (!add_to_page_cache(page, mapping,
+					page->index, GFP_KERNEL)) {
 			mapping->a_ops->readpage(filp, page);
 			if (!pagevec_add(&lru_pvec, page))
 				__pagevec_lru_add(&lru_pvec);
diff -Nru a/mm/rmap.c b/mm/rmap.c
--- a/mm/rmap.c	Wed Jan  8 20:04:45 2003
+++ b/mm/rmap.c	Wed Jan  8 20:04:45 2003
@@ -27,6 +27,7 @@
 #include <linux/init.h>
 #include <linux/rmap-locking.h>
 #include <linux/cache.h>
+#include <linux/percpu.h>
 
 #include <asm/pgalloc.h>
 #include <asm/rmap.h>
@@ -51,7 +52,7 @@
 	pte_addr_t ptes[NRPTE];
 } ____cacheline_aligned;
 
-static kmem_cache_t	*pte_chain_cache;
+kmem_cache_t	*pte_chain_cache;
 
 /*
  * pte_chain list management policy:
@@ -71,39 +72,6 @@
  */
 
 /**
- * pte_chain_alloc - allocate a pte_chain struct
- *
- * Returns a pointer to a fresh pte_chain structure. Allocates new
- * pte_chain structures as required.
- * Caller needs to hold the page's pte_chain_lock.
- */
-static inline struct pte_chain *pte_chain_alloc(void)
-{
-	struct pte_chain *ret;
-
-	ret = kmem_cache_alloc(pte_chain_cache, GFP_ATOMIC);
-#ifdef DEBUG_RMAP
-	{
-		int i;
-		for (i = 0; i < NRPTE; i++)
-			BUG_ON(ret->ptes[i]);
-		BUG_ON(ret->next);
-	}
-#endif
-	return ret;
-}
-
-/**
- * pte_chain_free - free pte_chain structure
- * @pte_chain: pte_chain struct to free
- */
-static inline void pte_chain_free(struct pte_chain *pte_chain)
-{
-	pte_chain->next = NULL;
-	kmem_cache_free(pte_chain_cache, pte_chain);
-}
-
-/**
  ** VM stuff below this comment
  **/
 
@@ -156,7 +124,7 @@
 			page->pte.direct = pc->ptes[NRPTE-1];
 			SetPageDirect(page);
 			pc->ptes[NRPTE-1] = 0;
-			pte_chain_free(pc);
+			__pte_chain_free(pc);
 		}
 	}
 	return referenced;
@@ -170,10 +138,11 @@
  * Add a new pte reverse mapping to a page.
  * The caller needs to hold the mm->page_table_lock.
  */
-void page_add_rmap(struct page * page, pte_t * ptep)
+struct pte_chain *
+page_add_rmap(struct page *page, pte_t *ptep, struct pte_chain *pte_chain)
 {
 	pte_addr_t pte_paddr = ptep_to_paddr(ptep);
-	struct pte_chain *pte_chain;
+	struct pte_chain *cur_pte_chain;
 	int i;
 
 #ifdef DEBUG_RMAP
@@ -186,7 +155,7 @@
 #endif
 
 	if (!pfn_valid(page_to_pfn(page)) || PageReserved(page))
-		return;
+		return pte_chain;
 
 	pte_chain_lock(page);
 
@@ -222,30 +191,28 @@
 	if (PageDirect(page)) {
 		/* Convert a direct pointer into a pte_chain */
 		ClearPageDirect(page);
-		pte_chain = pte_chain_alloc();
 		pte_chain->ptes[NRPTE-1] = page->pte.direct;
 		pte_chain->ptes[NRPTE-2] = pte_paddr;
 		page->pte.direct = 0;
 		page->pte.chain = pte_chain;
+		pte_chain = NULL;	/* We consumed it */
 		goto out;
 	}
 
-	pte_chain = page->pte.chain;
-	if (pte_chain->ptes[0]) {	/* It's full */
-		struct pte_chain *new;
-
-		new = pte_chain_alloc();
-		new->next = pte_chain;
-		page->pte.chain = new;
-		new->ptes[NRPTE-1] = pte_paddr;
+	cur_pte_chain = page->pte.chain;
+	if (cur_pte_chain->ptes[0]) {	/* It's full */
+		pte_chain->next = cur_pte_chain;
+		page->pte.chain = pte_chain;
+		pte_chain->ptes[NRPTE-1] = pte_paddr;
+		pte_chain = NULL;	/* We consumed it */
 		goto out;
 	}
 
-	BUG_ON(!pte_chain->ptes[NRPTE-1]);
+	BUG_ON(!cur_pte_chain->ptes[NRPTE-1]);
 
 	for (i = NRPTE-2; i >= 0; i--) {
-		if (!pte_chain->ptes[i]) {
-			pte_chain->ptes[i] = pte_paddr;
+		if (!cur_pte_chain->ptes[i]) {
+			cur_pte_chain->ptes[i] = pte_paddr;
 			goto out;
 		}
 	}
@@ -253,7 +220,7 @@
 out:
 	pte_chain_unlock(page);
 	inc_page_state(nr_reverse_maps);
-	return;
+	return pte_chain;
 }
 
 /**
@@ -311,7 +278,7 @@
 				if (victim_i == NRPTE-1) {
 					/* Emptied a pte_chain */
 					page->pte.chain = start->next;
-					pte_chain_free(start);
+					__pte_chain_free(start);
 				} else {
 					/* Do singleton->PageDirect here */
 				}
@@ -486,7 +453,7 @@
 				victim_i++;
 				if (victim_i == NRPTE) {
 					page->pte.chain = start->next;
-					pte_chain_free(start);
+					__pte_chain_free(start);
 					start = page->pte.chain;
 					victim_i = 0;
 				}
@@ -520,6 +487,58 @@
 	struct pte_chain *pc = p;
 
 	memset(pc, 0, sizeof(*pc));
+}
+
+DEFINE_PER_CPU(struct pte_chain *, local_pte_chain) = 0;
+
+/**
+ * __pte_chain_free - free pte_chain structure
+ * @pte_chain: pte_chain struct to free
+ */
+void __pte_chain_free(struct pte_chain *pte_chain)
+{
+	int cpu = get_cpu();
+	struct pte_chain **pte_chainp;
+
+	if (pte_chain->next)
+		pte_chain->next = NULL;
+	pte_chainp = &per_cpu(local_pte_chain, cpu);
+	if (*pte_chainp)
+		kmem_cache_free(pte_chain_cache, *pte_chainp);
+	*pte_chainp = pte_chain;
+	put_cpu();
+}
+
+/*
+ * pte_chain_alloc(): allocate a pte_chain structure for use by page_add_rmap().
+ *
+ * The caller of page_add_rmap() must perform the allocation because
+ * page_add_rmap() is invariably called under spinlock.  Often, page_add_rmap()
+ * will not actually use the pte_chain, because there is space available in one
+ * of the existing pte_chains which are attached to the page.  So the case of
+ * allocating and then freeing a single pte_chain is specially optimised here,
+ * with a one-deep per-cpu cache.
+ */
+struct pte_chain *pte_chain_alloc(int gfp_flags)
+{
+	int cpu;
+	struct pte_chain *ret;
+	struct pte_chain **pte_chainp;
+
+	if (gfp_flags & __GFP_WAIT)
+		might_sleep();
+
+	cpu = get_cpu();
+	pte_chainp = &per_cpu(local_pte_chain, cpu);
+	if (*pte_chainp) {
+		ret = *pte_chainp;
+		*pte_chainp = NULL;
+		put_cpu();
+	} else {
+		put_cpu();
+		ret = kmem_cache_alloc(pte_chain_cache, gfp_flags);
+	}
+	return ret;
 }
 
 void __init pte_chain_init(void)
diff -Nru a/mm/shmem.c b/mm/shmem.c
--- a/mm/shmem.c	Wed Jan  8 20:04:43 2003
+++ b/mm/shmem.c	Wed Jan  8 20:04:43 2003
@@ -889,7 +889,7 @@
 			}
 			if (error || swap.val ||
 			    (error = add_to_page_cache_lru(
-					filepage, mapping, idx))) {
+					filepage, mapping, idx, GFP_ATOMIC))) {
 				spin_unlock(&info->lock);
 				page_cache_release(filepage);
 				shmem_free_block(inode);
diff -Nru a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c	Wed Jan  8 20:04:44 2003
+++ b/mm/slab.c	Wed Jan  8 20:04:44 2003
@@ -335,8 +335,8 @@
 /* Magic nums for obj red zoning.
  * Placed in the first word before and the first word after an obj.
  */
-#define	RED_MAGIC1	0x5A2CF071UL	/* when obj is active */
-#define	RED_MAGIC2	0x170FC2A5UL	/* when obj is inactive */
+#define	RED_INACTIVE	0x5A2CF071UL	/* when obj is inactive */
+#define	RED_ACTIVE	0x170FC2A5UL	/* when obj is active */
 
 /* ...and for poisoning */
 #define	POISON_BEFORE	0x5a	/* for use-uninitialised poisoning */
@@ -498,6 +498,19 @@
 	*left_over = wastage;
 }
 
+#if DEBUG
+
+#define slab_error(cachep, msg) __slab_error(__FUNCTION__, cachep, msg)
+
+static void __slab_error(char *function, kmem_cache_t *cachep, char *msg)
+{
+	printk(KERN_ERR "slab error in %s(): cache `%s': %s\n",
+		function, cachep->name, msg);
+	dump_stack();
+}
+
+#endif
+
 /*
  * Start the reap timer running on the target CPU.  We run at around 1 to 2Hz.
  * Add the CPU number into the expiry time to minimize the possibility of the
@@ -780,16 +793,19 @@
 #if DEBUG
 	int i;
 	for (i = 0; i < cachep->num; i++) {
-		void* objp = slabp->s_mem+cachep->objsize*i;
+		void *objp = slabp->s_mem + cachep->objsize * i;
+
 		if (cachep->flags & SLAB_POISON)
 			check_poison_obj(cachep, objp);
 
 		if (cachep->flags & SLAB_RED_ZONE) {
-			if (*((unsigned long*)(objp)) != RED_MAGIC1)
-				BUG();
+			if (*((unsigned long*)(objp)) != RED_INACTIVE)
+				slab_error(cachep, "start of a freed object "
+							"was overwritten");
 			if (*((unsigned long*)(objp + cachep->objsize -
-					BYTES_PER_WORD)) != RED_MAGIC1)
-				BUG();
+					BYTES_PER_WORD)) != RED_INACTIVE)
+				slab_error(cachep, "end of a freed object "
+							"was overwritten");
 			objp += BYTES_PER_WORD;
 		}
 		if (cachep->dtor && !(cachep->flags & SLAB_POISON))
@@ -1270,9 +1286,9 @@
 			poison_obj(cachep, objp, POISON_BEFORE);
 
 		if (cachep->flags & SLAB_RED_ZONE) {
-			*((unsigned long*)(objp)) = RED_MAGIC1;
+			*((unsigned long*)(objp)) = RED_INACTIVE;
 			*((unsigned long*)(objp + cachep->objsize -
-					BYTES_PER_WORD)) = RED_MAGIC1;
+					BYTES_PER_WORD)) = RED_INACTIVE;
 			objp += BYTES_PER_WORD;
 		}
 		/*
@@ -1285,11 +1301,13 @@
 
 		if (cachep->flags & SLAB_RED_ZONE) {
 			objp -= BYTES_PER_WORD;
-			if (*((unsigned long*)(objp)) != RED_MAGIC1)
-				BUG();
+			if (*((unsigned long*)(objp)) != RED_INACTIVE)
+				slab_error(cachep, "constructor overwrote the"
+							" start of an object");
 			if (*((unsigned long*)(objp + cachep->objsize -
-					BYTES_PER_WORD)) != RED_MAGIC1)
-				BUG();
+					BYTES_PER_WORD)) != RED_INACTIVE)
+				slab_error(cachep, "constructor overwrote the"
+							" end of an object");
 		}
 #else
 		if (cachep->ctor)
@@ -1444,13 +1462,13 @@
 
 	if (cachep->flags & SLAB_RED_ZONE) {
 		objp -= BYTES_PER_WORD;
-		if (xchg((unsigned long *)objp, RED_MAGIC1) != RED_MAGIC2)
-			/* Either write before start, or a double free. */
-			BUG();
+		if (xchg((unsigned long *)objp, RED_INACTIVE) != RED_ACTIVE)
+			slab_error(cachep, "double free, or memory before"
+						" object was overwritten");
 		if (xchg((unsigned long *)(objp+cachep->objsize -
-				BYTES_PER_WORD), RED_MAGIC1) != RED_MAGIC2)
-			/* Either write past end, or a double free. */
-			BUG();
+				BYTES_PER_WORD), RED_INACTIVE) != RED_ACTIVE)
+			slab_error(cachep, "double free, or memory after "
+						" object was overwritten");
 	}
 
 	objnr = (objp-slabp->s_mem)/cachep->objsize;
@@ -1614,12 +1632,13 @@
 			BUG();
 	if (cachep->flags & SLAB_RED_ZONE) {
 		/* Set alloc red-zone, and check old one. */
-		if (xchg((unsigned long *)objp, RED_MAGIC2) !=
-							 RED_MAGIC1)
-			BUG();
+		if (xchg((unsigned long *)objp, RED_ACTIVE) != RED_INACTIVE)
+			slab_error(cachep, "memory before object was "
+						"overwritten");
 		if (xchg((unsigned long *)(objp+cachep->objsize -
-			  BYTES_PER_WORD), RED_MAGIC2) != RED_MAGIC1)
-			BUG();
+			  BYTES_PER_WORD), RED_ACTIVE) != RED_INACTIVE)
+			slab_error(cachep, "memory after object was "
+						"overwritten");
 		objp += BYTES_PER_WORD;
 	}
 	if (cachep->ctor && cachep->flags & SLAB_POISON) {
diff -Nru a/mm/swap_state.c b/mm/swap_state.c
--- a/mm/swap_state.c	Wed Jan  8 20:04:43 2003
+++ b/mm/swap_state.c	Wed Jan  8 20:04:43 2003
@@ -78,7 +78,7 @@
 		INC_CACHE_INFO(noent_race);
 		return -ENOENT;
 	}
-	error = add_to_page_cache(page, &swapper_space, entry.val);
+	error = add_to_page_cache(page, &swapper_space, entry.val, GFP_ATOMIC);
 	/*
 	 * Anon pages are already on the LRU, we don't run lru_cache_add here.
 	 */
@@ -149,7 +149,8 @@
 		/*
 		 * Add it to the swap cache and mark it dirty
 		 */
-		err = add_to_page_cache(page, &swapper_space, entry.val);
+		err = add_to_page_cache(page, &swapper_space,
+					entry.val, GFP_ATOMIC);
 
 		if (pf_flags & PF_MEMALLOC)
 			current->flags |= PF_MEMALLOC;
diff -Nru a/mm/swapfile.c b/mm/swapfile.c
--- a/mm/swapfile.c	Wed Jan  8 20:04:43 2003
+++ b/mm/swapfile.c	Wed Jan  8 20:04:43 2003
@@ -20,6 +20,7 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
+#include <linux/rmap-locking.h>
 
 #include <asm/pgtable.h>
 #include <linux/swapops.h>
@@ -377,8 +378,9 @@
  * what to do if a write is requested later.
  */
 /* mmlist_lock and vma->vm_mm->page_table_lock are held */
-static inline void unuse_pte(struct vm_area_struct * vma, unsigned long address,
-	pte_t *dir, swp_entry_t entry, struct page* page)
+static void
+unuse_pte(struct vm_area_struct *vma, unsigned long address, pte_t *dir,
+	swp_entry_t entry, struct page *page, struct pte_chain **pte_chainp)
 {
 	pte_t pte = *dir;
 
@@ -388,7 +390,7 @@
 		return;
 	get_page(page);
 	set_pte(dir, pte_mkold(mk_pte(page, vma->vm_page_prot)));
-	page_add_rmap(page, dir);
+	*pte_chainp = page_add_rmap(page, dir, *pte_chainp);
 	swap_free(entry);
 	++vma->vm_mm->rss;
 }
@@ -400,6 +402,7 @@
 {
 	pte_t * pte;
 	unsigned long end;
+	struct pte_chain *pte_chain = NULL;
 
 	if (pmd_none(*dir))
 		return;
@@ -415,11 +418,18 @@
 	if (end > PMD_SIZE)
 		end = PMD_SIZE;
 	do {
-		unuse_pte(vma, offset+address-vma->vm_start, pte, entry, page);
+		/*
+		 * FIXME: handle pte_chain_alloc() failures
+		 */
+		if (pte_chain == NULL)
+			pte_chain = pte_chain_alloc(GFP_ATOMIC);
+		unuse_pte(vma, offset+address-vma->vm_start,
+				pte, entry, page, &pte_chain);
 		address += PAGE_SIZE;
 		pte++;
 	} while (address && (address < end));
 	pte_unmap(pte - 1);
+	pte_chain_free(pte_chain);
 }
 
 /* mmlist_lock and vma->vm_mm->page_table_lock are held */
diff -Nru a/net/Kconfig b/net/Kconfig
--- a/net/Kconfig	Wed Jan  8 20:04:32 2003
+++ b/net/Kconfig	Wed Jan  8 20:04:32 2003
@@ -2,6 +2,24 @@
 # Network configuration
 #
 
+menu "Networking support"
+
+config NET
+	bool "Networking support"
+	---help---
+	  Unless you really know what you are doing, you should say Y here.
+	  The reason is that some programs need kernel networking support even
+	  when running on a stand-alone machine that isn't connected to any
+	  other computer. If you are upgrading from an older kernel, you
+	  should consider updating your networking tools too because changes
+	  in the kernel and the tools often go hand in hand. The tools are
+	  contained in the package net-tools, the location and version number
+	  of which are given in <file:Documentation/Changes>.
+
+	  For a general introduction to Linux networking, it is highly
+	  recommended to read the NET-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
 menu "Networking options"
 	depends on NET
 
@@ -652,3 +670,6 @@
 
 endmenu
 
+source "drivers/net/Kconfig"
+
+endmenu
diff -Nru a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c	Wed Jan  8 20:04:44 2003
+++ b/net/core/dev.c	Wed Jan  8 20:04:44 2003
@@ -201,6 +201,8 @@
 int netdev_fastroute_obstacles;
 #endif
 
+static struct subsystem net_subsys;
+
 
 /*******************************************************************************
 
@@ -2131,7 +2133,7 @@
 
 		case SIOCGIFHWADDR:
 			memcpy(ifr->ifr_hwaddr.sa_data, dev->dev_addr,
-			       MAX_ADDR_LEN);
+			       min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len));
 			ifr->ifr_hwaddr.sa_family = dev->type;
 			return 0;
 
@@ -2152,7 +2154,7 @@
 			if (ifr->ifr_hwaddr.sa_family != dev->type)
 				return -EINVAL;
 			memcpy(dev->broadcast, ifr->ifr_hwaddr.sa_data,
-			       MAX_ADDR_LEN);
+			       min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len));
 			notifier_call_chain(&netdev_chain,
 					    NETDEV_CHANGEADDR, dev);
 			return 0;
@@ -2545,7 +2547,10 @@
 	notifier_call_chain(&netdev_chain, NETDEV_REGISTER, dev);
 
 	net_run_sbin_hotplug(dev, "register");
-	ret = 0;
+
+	snprintf(dev->kobj.name,KOBJ_NAME_LEN,dev->name);
+	kobj_set_kset_s(dev,net_subsys);
+	ret = kobject_register(&dev->kobj);
 
 out:
 	return ret;
@@ -2638,7 +2643,7 @@
 
 	/* Shutdown queueing discipline. */
 	dev_shutdown(dev);
-	
+
 	net_run_sbin_hotplug(dev, "unregister");
 	
 	/* Notify protocols, that we are about to destroy
@@ -2671,6 +2676,8 @@
 		goto out;
 	}
 
+	kobject_unregister(&dev->kobj);
+
 	/* Last reference is our one */
 	if (atomic_read(&dev->refcnt) == 1)
 		goto out;
@@ -2749,6 +2756,8 @@
 extern void dv_init(void);
 #endif /* CONFIG_NET_DIVERT */
 
+static decl_subsys(net,NULL);
+
 
 /*
  *       This is called single threaded during boot, so no need
@@ -2763,6 +2772,8 @@
 
 	if (dev_proc_init())
 		goto out;
+
+	subsystem_register(&net_subsys);
 
 #ifdef CONFIG_NET_DIVERT
 	dv_init();
diff -Nru a/net/core/dv.c b/net/core/dv.c
--- a/net/core/dv.c	Wed Jan  8 20:04:43 2003
+++ b/net/core/dv.c	Wed Jan  8 20:04:43 2003
@@ -97,7 +97,7 @@
 /*
  * Adds a tcp/udp (source or dest) port to an array
  */
-int add_port(u16 ports[], u16 port)
+static int add_port(u16 ports[], u16 port)
 {
 	int i;
 
@@ -127,7 +127,7 @@
 /*
  * Removes a port from an array tcp/udp (source or dest)
  */
-int remove_port(u16 ports[], u16 port)
+static int remove_port(u16 ports[], u16 port)
 {
 	int i;
 
@@ -150,7 +150,7 @@
 }
 
 /* Some basic sanity checks on the arguments passed to divert_ioctl() */
-int check_args(struct divert_cf *div_cf, struct net_device **dev)
+static int check_args(struct divert_cf *div_cf, struct net_device **dev)
 {
 	char devname[32];
 	int ret;
diff -Nru a/net/core/rtnetlink.c b/net/core/rtnetlink.c
--- a/net/core/rtnetlink.c	Wed Jan  8 20:04:45 2003
+++ b/net/core/rtnetlink.c	Wed Jan  8 20:04:45 2003
@@ -220,6 +220,40 @@
 	return skb->len;
 }
 
+static int do_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+{
+	struct ifinfomsg  *ifm = NLMSG_DATA(nlh);
+	struct rtattr    **ida = arg;
+	struct net_device *dev;
+	int err;
+
+	dev = dev_get_by_index(ifm->ifi_index);
+	if (!dev)
+		return -ENODEV;
+
+	err = -EINVAL;
+
+	if (ida[IFLA_ADDRESS - 1]) {
+		if (ida[IFLA_ADDRESS - 1]->rta_len != RTA_LENGTH(dev->addr_len))
+			goto out;
+		memcpy(dev->dev_addr, RTA_DATA(ida[IFLA_ADDRESS - 1]),
+		       dev->addr_len);
+	}
+
+	if (ida[IFLA_BROADCAST - 1]) {
+		if (ida[IFLA_BROADCAST - 1]->rta_len != RTA_LENGTH(dev->addr_len))
+			goto out;
+		memcpy(dev->broadcast, RTA_DATA(ida[IFLA_BROADCAST - 1]),
+		       dev->addr_len);
+	}
+
+	err = 0;
+
+out:
+	dev_put(dev);
+	return err;
+}
+
 int rtnetlink_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
 {
 	int idx;
@@ -457,32 +491,14 @@
 
 static struct rtnetlink_link link_rtnetlink_table[RTM_MAX-RTM_BASE+1] =
 {
-	{ NULL,			NULL,			},
-	{ NULL,			NULL,			},
-	{ NULL,			rtnetlink_dump_ifinfo,	},
-	{ NULL,			NULL,			},
-
-	{ NULL,			NULL,			},
-	{ NULL,			NULL,			},
-	{ NULL,			rtnetlink_dump_all,	},
-	{ NULL,			NULL,			},
-
-	{ NULL,			NULL,			},
-	{ NULL,			NULL,			},
-	{ NULL,			rtnetlink_dump_all,	},
-	{ NULL,			NULL,			},
-
-	{ neigh_add,		NULL,			},
-	{ neigh_delete,		NULL,			},
-	{ NULL,			neigh_dump_info,	},
-	{ NULL,			NULL,			},
-
-	{ NULL,			NULL,			},
-	{ NULL,			NULL,			},
-	{ NULL,			NULL,			},
-	{ NULL,			NULL,			},
+	[RTM_GETLINK  - RTM_BASE] = { .dumpit = rtnetlink_dump_ifinfo },
+	[RTM_SETLINK  - RTM_BASE] = { .doit   = do_setlink	      },
+	[RTM_GETADDR  - RTM_BASE] = { .dumpit = rtnetlink_dump_all    },
+	[RTM_GETROUTE - RTM_BASE] = { .dumpit = rtnetlink_dump_all    },
+	[RTM_NEWNEIGH - RTM_BASE] = { .doit   = neigh_add	      },
+	[RTM_DELNEIGH - RTM_BASE] = { .doit   = neigh_delete	      },
+	[RTM_GETNEIGH - RTM_BASE] = { .dumpit = neigh_dump_info	      }
 };
-
 
 static int rtnetlink_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c
--- a/net/core/skbuff.c	Wed Jan  8 20:04:44 2003
+++ b/net/core/skbuff.c	Wed Jan  8 20:04:44 2003
@@ -324,7 +324,9 @@
 	}
 
 	dst_release(skb->dst);
+#ifdef CONFIG_INET
 	secpath_put(skb->sp);
+#endif
 	if(skb->destructor) {
 		if (in_irq())
 			printk(KERN_WARNING "Warning: kfree_skb on "
@@ -378,7 +380,9 @@
 	C(dst);
 	dst_clone(n->dst);
 	C(sp);
+#ifdef CONFIG_INET
 	secpath_get(n->sp);
+#endif
 	memcpy(n->cb, skb->cb, sizeof(skb->cb));
 	C(len);
 	C(data_len);
@@ -438,7 +442,9 @@
 	new->priority	= old->priority;
 	new->protocol	= old->protocol;
 	new->dst	= dst_clone(old->dst);
+#ifdef CONFIG_INET
 	new->sp		= secpath_get(old->sp);
+#endif
 	new->h.raw	= old->h.raw + offset;
 	new->nh.raw	= old->nh.raw + offset;
 	new->mac.raw	= old->mac.raw + offset;
diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
--- a/net/ipv4/af_inet.c	Wed Jan  8 20:04:43 2003
+++ b/net/ipv4/af_inet.c	Wed Jan  8 20:04:43 2003
@@ -113,7 +113,7 @@
 #include <linux/mroute.h>
 #endif
 
-struct linux_mib net_statistics[NR_CPUS * 2];
+DEFINE_SNMP_STAT(struct linux_mib, net_statistics);
 
 #ifdef INET_REFCNT_DEBUG
 atomic_t inet_sock_nr;
@@ -1053,6 +1053,59 @@
 	.handler =	icmp_rcv,
 };
 
+static int __init init_ipv4_mibs(void)
+{
+	int i;
+
+	net_statistics[0] =
+	    kmalloc_percpu(sizeof (struct linux_mib), GFP_KERNEL);
+	net_statistics[1] =
+	    kmalloc_percpu(sizeof (struct linux_mib), GFP_KERNEL);
+	ip_statistics[0] = kmalloc_percpu(sizeof (struct ip_mib), GFP_KERNEL);
+	ip_statistics[1] = kmalloc_percpu(sizeof (struct ip_mib), GFP_KERNEL);
+	icmp_statistics[0] =
+	    kmalloc_percpu(sizeof (struct icmp_mib), GFP_KERNEL);
+	icmp_statistics[1] =
+	    kmalloc_percpu(sizeof (struct icmp_mib), GFP_KERNEL);
+	tcp_statistics[0] = kmalloc_percpu(sizeof (struct tcp_mib), GFP_KERNEL);
+	tcp_statistics[1] = kmalloc_percpu(sizeof (struct tcp_mib), GFP_KERNEL);
+	udp_statistics[0] = kmalloc_percpu(sizeof (struct udp_mib), GFP_KERNEL);
+	udp_statistics[1] = kmalloc_percpu(sizeof (struct udp_mib), GFP_KERNEL);
+	if (!
+	    (net_statistics[0] && net_statistics[1] && ip_statistics[0]
+	     && ip_statistics[1] && tcp_statistics[0] && tcp_statistics[1]
+	     && udp_statistics[0] && udp_statistics[1]))
+		return -ENOMEM;
+
+	/* Set all the per cpu copies of the mibs to zero */
+	for (i = 0; i < NR_CPUS; i++) {
+		if (cpu_possible(i)) {
+			memset(per_cpu_ptr(net_statistics[0], i), 0,
+			       sizeof (struct linux_mib));
+			memset(per_cpu_ptr(net_statistics[1], i), 0,
+			       sizeof (struct linux_mib));
+			memset(per_cpu_ptr(ip_statistics[0], i), 0,
+			       sizeof (struct ip_mib));
+			memset(per_cpu_ptr(ip_statistics[1], i), 0,
+			       sizeof (struct ip_mib));
+			memset(per_cpu_ptr(icmp_statistics[0], i), 0,
+			       sizeof (struct icmp_mib));
+			memset(per_cpu_ptr(icmp_statistics[1], i), 0,
+			       sizeof (struct icmp_mib));
+			memset(per_cpu_ptr(tcp_statistics[0], i), 0,
+			       sizeof (struct tcp_mib));
+			memset(per_cpu_ptr(tcp_statistics[1], i), 0,
+			       sizeof (struct tcp_mib));
+			memset(per_cpu_ptr(udp_statistics[0], i), 0,
+			       sizeof (struct udp_mib));
+			memset(per_cpu_ptr(udp_statistics[1], i), 0,
+			       sizeof (struct udp_mib));
+		}
+	}
+
+	return 0;
+}
+
 int ipv4_proc_init(void);
 
 static int __init inet_init(void)
@@ -1148,7 +1201,13 @@
 #if defined(CONFIG_IP_MROUTE)
 	ip_mr_init();
 #endif
+	/*
+	 *	Initialise per-cpu ipv4 mibs
+	 */ 
 
+	if(init_ipv4_mibs())
+		printk(KERN_CRIT "inet_init: Cannot init ipv4 mibs\n"); ;
+	
 	ipv4_proc_init();
 	return 0;
 }
diff -Nru a/net/ipv4/icmp.c b/net/ipv4/icmp.c
--- a/net/ipv4/icmp.c	Wed Jan  8 20:04:45 2003
+++ b/net/ipv4/icmp.c	Wed Jan  8 20:04:45 2003
@@ -113,7 +113,7 @@
 /*
  *	Statistics
  */
-struct icmp_mib icmp_statistics[NR_CPUS * 2];
+DEFINE_SNMP_STAT(struct icmp_mib, icmp_statistics);
 
 /* An array of errno for error messages from dest unreach. */
 /* RFC 1122: 3.2.2.1 States that NET_UNREACH, HOS_UNREACH and SR_FAIELD MUST be considered 'transient errs'. */
@@ -213,12 +213,11 @@
  *	ICMP control array. This specifies what to do with each ICMP.
  */
 
-struct icmp_control
-{
-	unsigned long *output;		/* Address to increment on output */
-	unsigned long *input;		/* Address to increment on input */
+struct icmp_control {
+	int output_off;		/* Field offset for increment on output */
+	int input_off;		/* Field offset for increment on input */
 	void (*handler)(struct sk_buff *skb);
-	short	error;		/* This ICMP is classed as an error message */
+	short   error;		/* This ICMP is classed as an error message */
 };
 
 static struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
@@ -343,10 +342,7 @@
 static void icmp_out_count(int type)
 {
 	if (type <= NR_ICMP_TYPES) {
-		(icmp_pointers[type].output)[(smp_processor_id() * 2 +
-					      !in_softirq()) *
-					     sizeof(struct icmp_mib) /
-					     sizeof(unsigned long)]++;
+		ICMP_INC_STATS_FIELD(icmp_pointers[type].output_off);
 		ICMP_INC_STATS(IcmpOutMsgs);
 	}
 }
@@ -1005,9 +1001,7 @@
   		}
 	}
 
-	icmp_pointers[icmph->type].input[smp_processor_id() * 2 *
-					 sizeof(struct icmp_mib) /
-					 sizeof(unsigned long)]++;
+	ICMP_INC_STATS_BH_FIELD(icmp_pointers[icmph->type].input_off);
 	(icmp_pointers[icmph->type].handler)(skb);
 
 drop:
@@ -1024,122 +1018,122 @@
 static struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
 	/* ECHO REPLY (0) */
 	[0] = {
-		.output =	 &icmp_statistics[0].IcmpOutEchoReps,
-		.input = &icmp_statistics[0].IcmpInEchoReps,
+		.output_off = offsetof(struct icmp_mib, IcmpOutEchoReps),
+		.input_off = offsetof(struct icmp_mib, IcmpInEchoReps),
 		.handler = icmp_discard,
 	},
 	[1] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].IcmpInErrors,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib,IcmpInErrors),
 		.handler = icmp_discard,
 		.error = 1,
 	},
 	[2] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].IcmpInErrors,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib,IcmpInErrors),
 		.handler = icmp_discard,
 		.error = 1,
 	},
 	/* DEST UNREACH (3) */
 	[3] = {
-		.output =	 &icmp_statistics[0].IcmpOutDestUnreachs,
-		.input = &icmp_statistics[0].IcmpInDestUnreachs,
+		.output_off = offsetof(struct icmp_mib, IcmpOutDestUnreachs),
+		.input_off = offsetof(struct icmp_mib, IcmpInDestUnreachs),
 		.handler = icmp_unreach,
 		.error = 1,
 	},
 	/* SOURCE QUENCH (4) */
 	[4] = {
-		.output =	 &icmp_statistics[0].IcmpOutSrcQuenchs,
-		.input = &icmp_statistics[0].IcmpInSrcQuenchs,
+		.output_off = offsetof(struct icmp_mib, IcmpOutSrcQuenchs),
+		.input_off = offsetof(struct icmp_mib, IcmpInSrcQuenchs),
 		icmp_unreach,
 		.error = 1,
 	},
 	/* REDIRECT (5) */
 	[5] = {
-		.output =	 &icmp_statistics[0].IcmpOutRedirects,
-		.input = &icmp_statistics[0].IcmpInRedirects,
+		.output_off = offsetof(struct icmp_mib, IcmpOutRedirects),
+		.input_off = offsetof(struct icmp_mib, IcmpInRedirects),
 		.handler = icmp_redirect,
 		.error = 1,
 	},
 	[6] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].IcmpInErrors,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib, IcmpInErrors),
 		.handler = icmp_discard,
 		.error = 1,
 	},
 	[7] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].IcmpInErrors,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib, IcmpInErrors),
 		.handler = icmp_discard,
 		.error = 1,
 	},
 	/* ECHO (8) */
 	[8] = {
-		.output =	 &icmp_statistics[0].IcmpOutEchos,
-		.input = &icmp_statistics[0].IcmpInEchos,
+		.output_off = offsetof(struct icmp_mib, IcmpOutEchos),
+		.input_off = offsetof(struct icmp_mib, IcmpInEchos),
 		.handler = icmp_echo,
 		.error = 0,
 	},
 	[9] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].IcmpInErrors,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib, IcmpInErrors),
 		.handler = icmp_discard,
 		.error = 1,
 	},
 	[10] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].IcmpInErrors,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib, IcmpInErrors),
 		.handler = icmp_discard,
 		.error = 1,
 	},
 	/* TIME EXCEEDED (11) */
 	[11] = {
-		.output =	 &icmp_statistics[0].IcmpOutTimeExcds,
-		.input = &icmp_statistics[0].IcmpInTimeExcds,
+		.output_off = offsetof(struct icmp_mib, IcmpOutTimeExcds),
+		.input_off = offsetof(struct icmp_mib,IcmpInTimeExcds),
 		.handler = icmp_unreach,
 		.error = 1,
 	},
 	/* PARAMETER PROBLEM (12) */
 	[12] = {
-		.output =	 &icmp_statistics[0].IcmpOutParmProbs,
-		.input = &icmp_statistics[0].IcmpInParmProbs,
+		.output_off = offsetof(struct icmp_mib, IcmpOutParmProbs),
+		.input_off = offsetof(struct icmp_mib, IcmpInParmProbs),
 		.handler = icmp_unreach,
 		.error = 1,
 	},
 	/* TIMESTAMP (13) */
 	[13] = {
-		.output =	 &icmp_statistics[0].IcmpOutTimestamps,
-		.input = &icmp_statistics[0].IcmpInTimestamps,
+		.output_off = offsetof(struct icmp_mib, IcmpOutTimestamps),
+		.input_off = offsetof(struct icmp_mib, IcmpInTimestamps),
 		.handler = icmp_timestamp,
 	},
 	/* TIMESTAMP REPLY (14) */
 	[14] = {
-		.output =	 &icmp_statistics[0].IcmpOutTimestampReps,
-		.input = &icmp_statistics[0].IcmpInTimestampReps,
+		.output_off = offsetof(struct icmp_mib, IcmpOutTimestampReps),
+		.input_off = offsetof(struct icmp_mib, IcmpInTimestampReps),
 		.handler = icmp_discard,
 	},
 	/* INFO (15) */
 	[15] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].dummy,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib, dummy),
 		.handler = icmp_discard,
 	},
 	/* INFO REPLY (16) */
  	[16] = {
-		.output =	 &icmp_statistics[0].dummy,
-		.input = &icmp_statistics[0].dummy,
+		.output_off = offsetof(struct icmp_mib, dummy),
+		.input_off = offsetof(struct icmp_mib, dummy),
 		.handler = icmp_discard,
 	},
 	/* ADDR MASK (17) */
 	[17] = {
-		.output =	 &icmp_statistics[0].IcmpOutAddrMasks,
-		.input = &icmp_statistics[0].IcmpInAddrMasks,
+		.output_off = offsetof(struct icmp_mib, IcmpOutAddrMasks),
+		.input_off = offsetof(struct icmp_mib, IcmpInAddrMasks),
 		.handler = icmp_address,
 	},
 	/* ADDR MASK REPLY (18) */
 	[18] = {
-		.output =	 &icmp_statistics[0].IcmpOutAddrMaskReps,
-		.input = &icmp_statistics[0].IcmpInAddrMaskReps,
+		.output_off = offsetof(struct icmp_mib, IcmpOutAddrMaskReps),
+		.input_off = offsetof(struct icmp_mib, IcmpInAddrMaskReps),
 		.handler = icmp_address_reply,
 	}
 };
diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
--- a/net/ipv4/ip_input.c	Wed Jan  8 20:04:32 2003
+++ b/net/ipv4/ip_input.c	Wed Jan  8 20:04:32 2003
@@ -149,7 +149,7 @@
  *	SNMP management statistics
  */
 
-struct ip_mib ip_statistics[NR_CPUS*2];
+DEFINE_SNMP_STAT(struct ip_mib, ip_statistics);
 
 /*
  *	Process Router Attention IP option
diff -Nru a/net/ipv4/proc.c b/net/ipv4/proc.c
--- a/net/ipv4/proc.c	Wed Jan  8 20:04:32 2003
+++ b/net/ipv4/proc.c	Wed Jan  8 20:04:32 2003
@@ -86,16 +86,21 @@
 	.release = single_release,
 };
 
-static unsigned long fold_field(unsigned long *begin, int sz, int nr)
+static unsigned long
+fold_field(void *mib[], int nr)
 {
 	unsigned long res = 0;
 	int i;
 
-	sz /= sizeof(unsigned long);
-
 	for (i = 0; i < NR_CPUS; i++) {
-		res += begin[2 * i * sz + nr];
-		res += begin[(2 * i + 1) * sz + nr];
+		if (!cpu_possible(i))
+			continue;
+		res +=
+		    *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) +
+					 sizeof (unsigned long) * nr));
+		res +=
+		    *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) +
+					 sizeof (unsigned long) * nr));
 	}
 	return res;
 }
@@ -118,8 +123,7 @@
 	for (i = 0;
 	     i < offsetof(struct ip_mib, __pad) / sizeof(unsigned long); i++)
 		seq_printf(seq, " %lu",
-			   fold_field((unsigned long *)ip_statistics,
-				      sizeof(struct ip_mib), i));
+			   fold_field((void **) ip_statistics, i));
 
 	seq_printf(seq, "\nIcmp: InMsgs InErrors InDestUnreachs InTimeExcds "
 			"InParmProbs InSrcQuenchs InRedirects InEchos "
@@ -132,8 +136,7 @@
 	for (i = 0;
 	     i < offsetof(struct icmp_mib, dummy) / sizeof(unsigned long); i++)
 		seq_printf(seq, " %lu",
-			   fold_field((unsigned long *)icmp_statistics,
-				      sizeof(struct icmp_mib), i));
+			   fold_field((void **) icmp_statistics, i)); 
 
 	seq_printf(seq, "\nTcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens "
 			"PassiveOpens AttemptFails EstabResets CurrEstab "
@@ -142,17 +145,15 @@
 	for (i = 0;
 	     i < offsetof(struct tcp_mib, __pad) / sizeof(unsigned long); i++)
 		seq_printf(seq, " %lu",
-			   fold_field((unsigned long *)tcp_statistics,
-				      sizeof(struct tcp_mib), i));
+			   fold_field((void **) tcp_statistics, i));
 
 	seq_printf(seq, "\nUdp: InDatagrams NoPorts InErrors OutDatagrams\n"
 			"Udp:");
 
 	for (i = 0;
 	     i < offsetof(struct udp_mib, __pad) / sizeof(unsigned long); i++)
-		seq_printf(seq, " %lu",
-			   fold_field((unsigned long *)udp_statistics,
-				      sizeof(struct udp_mib), i));
+		seq_printf(seq, " %lu", 
+				fold_field((void **) udp_statistics, i));
 
 	seq_putc(seq, '\n');
 	return 0;
@@ -206,10 +207,10 @@
 		      " TCPAbortFailed TCPMemoryPressures\n"
 		      "TcpExt:");
 	for (i = 0;
-	     i < offsetof(struct linux_mib, __pad) / sizeof(unsigned long); i++)
-		seq_printf(seq, " %lu",
-			   fold_field((unsigned long *)net_statistics,
-				      sizeof(struct linux_mib), i));
+	     i < offsetof(struct linux_mib, __pad) / sizeof(unsigned long); 
+	     i++)
+		seq_printf(seq, " %lu", 
+		 	   fold_field((void **) net_statistics, i)); 
 	seq_putc(seq, '\n');
 	return 0;
 }
diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c
--- a/net/ipv4/route.c	Wed Jan  8 20:04:45 2003
+++ b/net/ipv4/route.c	Wed Jan  8 20:04:45 2003
@@ -196,7 +196,7 @@
 static unsigned			rt_hash_mask;
 static int			rt_hash_log;
 
-struct rt_cache_stat rt_cache_stat[NR_CPUS];
+struct rt_cache_stat *rt_cache_stat;
 
 static int rt_intern_hash(unsigned hash, struct rtable *rth,
 				struct rtable **res);
@@ -234,7 +234,7 @@
 {
 	struct rt_cache_iter_state *st = seq->private;
 
-	read_barrier_depends();
+	smp_read_barrier_depends();
 	r = r->u.rt_next;
 	while (!r) {
 		rcu_read_unlock();
@@ -318,24 +318,26 @@
 	int len = 0;
 
 	for (i = 0; i < NR_CPUS; i++) {
+		if (!cpu_possible(i))
+			continue;
 		len += sprintf(buffer+len, "%08x  %08x %08x %08x %08x %08x %08x %08x  %08x %08x %08x %08x %08x %08x %08x \n",
 			       dst_entries,		       
-			       rt_cache_stat[i].in_hit,
-			       rt_cache_stat[i].in_slow_tot,
-			       rt_cache_stat[i].in_slow_mc,
-			       rt_cache_stat[i].in_no_route,
-			       rt_cache_stat[i].in_brd,
-			       rt_cache_stat[i].in_martian_dst,
-			       rt_cache_stat[i].in_martian_src,
-
-			       rt_cache_stat[i].out_hit,
-			       rt_cache_stat[i].out_slow_tot,
-			       rt_cache_stat[i].out_slow_mc, 
-
-			       rt_cache_stat[i].gc_total,
-			       rt_cache_stat[i].gc_ignored,
-			       rt_cache_stat[i].gc_goal_miss,
-			       rt_cache_stat[i].gc_dst_overflow
+			       per_cpu_ptr(rt_cache_stat, i)->in_hit,
+			       per_cpu_ptr(rt_cache_stat, i)->in_slow_tot,
+			       per_cpu_ptr(rt_cache_stat, i)->in_slow_mc,
+			       per_cpu_ptr(rt_cache_stat, i)->in_no_route,
+			       per_cpu_ptr(rt_cache_stat, i)->in_brd,
+			       per_cpu_ptr(rt_cache_stat, i)->in_martian_dst,
+			       per_cpu_ptr(rt_cache_stat, i)->in_martian_src,
+
+			       per_cpu_ptr(rt_cache_stat, i)->out_hit,
+			       per_cpu_ptr(rt_cache_stat, i)->out_slow_tot,
+			       per_cpu_ptr(rt_cache_stat, i)->out_slow_mc, 
+
+			       per_cpu_ptr(rt_cache_stat, i)->gc_total,
+			       per_cpu_ptr(rt_cache_stat, i)->gc_ignored,
+			       per_cpu_ptr(rt_cache_stat, i)->gc_goal_miss,
+			       per_cpu_ptr(rt_cache_stat, i)->gc_dst_overflow
 
 			);
 	}
@@ -591,11 +593,11 @@
 	 * do not make it too frequently.
 	 */
 
-	rt_cache_stat[smp_processor_id()].gc_total++;
+	RT_CACHE_STAT_INC(gc_total);
 
 	if (now - last_gc < ip_rt_gc_min_interval &&
 	    atomic_read(&ipv4_dst_ops.entries) < ip_rt_max_size) {
-		rt_cache_stat[smp_processor_id()].gc_ignored++;
+		RT_CACHE_STAT_INC(gc_ignored);
 		goto out;
 	}
 
@@ -663,7 +665,7 @@
 		     We will not spin here for long time in any case.
 		 */
 
-		rt_cache_stat[smp_processor_id()].gc_goal_miss++;
+		RT_CACHE_STAT_INC(gc_goal_miss);
 
 		if (expire == 0)
 			break;
@@ -682,7 +684,7 @@
 		goto out;
 	if (net_ratelimit())
 		printk(KERN_WARNING "dst cache overflow\n");
-	rt_cache_stat[smp_processor_id()].gc_dst_overflow++;
+	RT_CACHE_STAT_INC(gc_dst_overflow);
 	return 1;
 
 work_done:
@@ -718,7 +720,18 @@
 		if (compare_keys(&rth->fl, &rt->fl)) {
 			/* Put it first */
 			*rthp = rth->u.rt_next;
+			/*
+			 * Since lookup is lockfree, the deletion
+			 * must be visible to another weakly ordered CPU before
+			 * the insertion at the start of the hash chain.
+			 */
+			smp_wmb();
 			rth->u.rt_next = rt_hash_table[hash].chain;
+			/*
+			 * Since lookup is lockfree, the update writes
+			 * must be ordered for consistency on SMP.
+			 */
+			smp_wmb();
 			rt_hash_table[hash].chain = rth;
 
 			rth->u.dst.__use++;
@@ -900,7 +913,7 @@
 			while ((rth = *rthp) != NULL) {
 				struct rtable *rt;
 
-				read_barrier_depends();
+				smp_read_barrier_depends();
 				if (rth->fl.fl4_dst != daddr ||
 				    rth->fl.fl4_src != skeys[i] ||
 				    rth->fl.fl4_tos != tos ||
@@ -1148,7 +1161,7 @@
 		rcu_read_lock();
 		for (rth = rt_hash_table[hash].chain; rth;
 		     rth = rth->u.rt_next) {
-			read_barrier_depends();
+			smp_read_barrier_depends();
 			if (rth->fl.fl4_dst == daddr &&
 			    rth->fl.fl4_src == skeys[i] &&
 			    rth->rt_dst  == daddr &&
@@ -1389,7 +1402,7 @@
 	if (!LOCAL_MCAST(daddr) && IN_DEV_MFORWARD(in_dev))
 		rth->u.dst.input = ip_mr_input;
 #endif
-	rt_cache_stat[smp_processor_id()].in_slow_mc++;
+	RT_CACHE_STAT_INC(in_slow_mc);
 
 	in_dev_put(in_dev);
 	hash = rt_hash_code(daddr, saddr ^ (dev->ifindex << 5), tos);
@@ -1474,7 +1487,7 @@
 	}
 	free_res = 1;
 
-	rt_cache_stat[smp_processor_id()].in_slow_tot++;
+	RT_CACHE_STAT_INC(in_slow_tot);
 
 #ifdef CONFIG_IP_ROUTE_NAT
 	/* Policy is applied before mapping destination,
@@ -1631,7 +1644,7 @@
 	}
 	flags |= RTCF_BROADCAST;
 	res.type = RTN_BROADCAST;
-	rt_cache_stat[smp_processor_id()].in_brd++;
+	RT_CACHE_STAT_INC(in_brd);
 
 local_input:
 	rth = dst_alloc(&ipv4_dst_ops);
@@ -1676,7 +1689,7 @@
 	goto intern;
 
 no_route:
-	rt_cache_stat[smp_processor_id()].in_no_route++;
+	RT_CACHE_STAT_INC(in_no_route);
 	spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE);
 	res.type = RTN_UNREACHABLE;
 	goto local_input;
@@ -1685,7 +1698,7 @@
 	 *	Do not cache martian addresses: they should be logged (RFC1812)
 	 */
 martian_destination:
-	rt_cache_stat[smp_processor_id()].in_martian_dst++;
+	RT_CACHE_STAT_INC(in_martian_dst);
 #ifdef CONFIG_IP_ROUTE_VERBOSE
 	if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit())
 		printk(KERN_WARNING "martian destination %u.%u.%u.%u from "
@@ -1702,7 +1715,7 @@
 
 martian_source:
 
-	rt_cache_stat[smp_processor_id()].in_martian_src++;
+	RT_CACHE_STAT_INC(in_martian_src);
 #ifdef CONFIG_IP_ROUTE_VERBOSE
 	if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit()) {
 		/*
@@ -1740,7 +1753,7 @@
 
 	rcu_read_lock();
 	for (rth = rt_hash_table[hash].chain; rth; rth = rth->u.rt_next) {
-		read_barrier_depends();
+		smp_read_barrier_depends();
 		if (rth->fl.fl4_dst == daddr &&
 		    rth->fl.fl4_src == saddr &&
 		    rth->fl.iif == iif &&
@@ -1752,7 +1765,7 @@
 			rth->u.dst.lastuse = jiffies;
 			dst_hold(&rth->u.dst);
 			rth->u.dst.__use++;
-			rt_cache_stat[smp_processor_id()].in_hit++;
+			RT_CACHE_STAT_INC(in_hit);
 			rcu_read_unlock();
 			skb->dst = (struct dst_entry*)rth;
 			return 0;
@@ -2049,7 +2062,7 @@
 
 	rth->u.dst.output=ip_output;
 
-	rt_cache_stat[smp_processor_id()].out_slow_tot++;
+	RT_CACHE_STAT_INC(out_slow_tot);
 
 	if (flags & RTCF_LOCAL) {
 		rth->u.dst.input = ip_local_deliver;
@@ -2059,7 +2072,7 @@
 		rth->rt_spec_dst = fl.fl4_src;
 		if (flags & RTCF_LOCAL && !(dev_out->flags & IFF_LOOPBACK)) {
 			rth->u.dst.output = ip_mc_output;
-			rt_cache_stat[smp_processor_id()].out_slow_mc++;
+			RT_CACHE_STAT_INC(out_slow_mc);
 		}
 #ifdef CONFIG_IP_MROUTE
 		if (res.type == RTN_MULTICAST) {
@@ -2105,7 +2118,7 @@
 
 	rcu_read_lock();
 	for (rth = rt_hash_table[hash].chain; rth; rth = rth->u.rt_next) {
-		read_barrier_depends();
+		smp_read_barrier_depends();
 		if (rth->fl.fl4_dst == flp->fl4_dst &&
 		    rth->fl.fl4_src == flp->fl4_src &&
 		    rth->fl.iif == 0 &&
@@ -2118,7 +2131,7 @@
 			rth->u.dst.lastuse = jiffies;
 			dst_hold(&rth->u.dst);
 			rth->u.dst.__use++;
-			rt_cache_stat[smp_processor_id()].out_hit++;
+			RT_CACHE_STAT_INC(out_hit);
 			rcu_read_unlock();
 			*rp = rth;
 			return 0;
@@ -2335,7 +2348,7 @@
 		rcu_read_lock();
 		for (rt = rt_hash_table[h].chain, idx = 0; rt;
 		     rt = rt->u.rt_next, idx++) {
-			read_barrier_depends();
+			smp_read_barrier_depends();
 			if (idx < s_idx)
 				continue;
 			skb->dst = dst_clone(&rt->u.dst);
@@ -2639,6 +2652,11 @@
 	ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1);
 	ip_rt_max_size = (rt_hash_mask + 1) * 16;
 
+	rt_cache_stat = kmalloc_percpu(sizeof (struct rt_cache_stat),
+					GFP_KERNEL);
+	if (!rt_cache_stat) 
+		goto out_enomem1;
+
 	devinet_init();
 	ip_fib_init();
 
@@ -2664,6 +2682,8 @@
 out:
 	return rc;
 out_enomem:
+	kfree_percpu(rt_cache_stat);
+out_enomem1:
 	rc = -ENOMEM;
 	goto out;
 }
diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c
--- a/net/ipv4/tcp.c	Wed Jan  8 20:04:43 2003
+++ b/net/ipv4/tcp.c	Wed Jan  8 20:04:43 2003
@@ -258,13 +258,15 @@
 #include <net/icmp.h>
 #include <net/tcp.h>
 #include <net/xfrm.h>
+#include <net/ip.h>
+
 
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
 
 int sysctl_tcp_fin_timeout = TCP_FIN_TIMEOUT;
 
-struct tcp_mib	tcp_statistics[NR_CPUS * 2];
+DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics);
 
 kmem_cache_t *tcp_openreq_cachep;
 kmem_cache_t *tcp_bucket_cachep;
@@ -1395,8 +1397,7 @@
 	struct sk_buff *skb;
 	struct tcp_opt *tp = tcp_sk(sk);
 
-	net_statistics[smp_processor_id() * 2 + 1].TCPPrequeued +=
-					    skb_queue_len(&tp->ucopy.prequeue);
+	NET_ADD_STATS_USER(TCPPrequeued, skb_queue_len(&tp->ucopy.prequeue));
 
 	/* RX process wants to run with disabled BHs, though it is not
 	 * necessary */
@@ -1676,7 +1677,7 @@
 			/* __ Restore normal policy in scheduler __ */
 
 			if ((chunk = len - tp->ucopy.len) != 0) {
-				net_statistics[smp_processor_id() * 2 + 1].TCPDirectCopyFromBacklog += chunk;
+				NET_ADD_STATS_USER(TCPDirectCopyFromBacklog, chunk);
 				len -= chunk;
 				copied += chunk;
 			}
@@ -1687,7 +1688,7 @@
 				tcp_prequeue_process(sk);
 
 				if ((chunk = len - tp->ucopy.len) != 0) {
-					net_statistics[smp_processor_id() * 2 + 1].TCPDirectCopyFromPrequeue += chunk;
+					NET_ADD_STATS_USER(TCPDirectCopyFromPrequeue, chunk);
 					len -= chunk;
 					copied += chunk;
 				}
@@ -1770,7 +1771,7 @@
 			tcp_prequeue_process(sk);
 
 			if (copied > 0 && (chunk = len - tp->ucopy.len) != 0) {
-				net_statistics[smp_processor_id() * 2 + 1].TCPDirectCopyFromPrequeue += chunk;
+				NET_ADD_STATS_USER(TCPDirectCopyFromPrequeue, chunk);
 				len -= chunk;
 				copied += chunk;
 			}
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c	Wed Jan  8 20:04:44 2003
+++ b/net/ipv4/tcp_input.c	Wed Jan  8 20:04:44 2003
@@ -3043,8 +3043,8 @@
 
 	/* First, purge the out_of_order queue. */
 	if (skb_queue_len(&tp->out_of_order_queue)) {
-		net_statistics[smp_processor_id() * 2].OfoPruned +=
-					skb_queue_len(&tp->out_of_order_queue);
+		NET_ADD_STATS_BH(OfoPruned,
+				 skb_queue_len(&tp->out_of_order_queue));
 		__skb_queue_purge(&tp->out_of_order_queue);
 
 		/* Reset SACK state.  A conforming SACK implementation will
diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
--- a/net/ipv4/tcp_minisocks.c	Wed Jan  8 20:04:44 2003
+++ b/net/ipv4/tcp_minisocks.c	Wed Jan  8 20:04:44 2003
@@ -464,7 +464,7 @@
 
 	if ((tcp_tw_count -= killed) != 0)
 		mod_timer(&tcp_tw_timer, jiffies+TCP_TWKILL_PERIOD);
-	net_statistics[smp_processor_id()*2].TimeWaited += killed;
+	NET_ADD_STATS_BH(TimeWaited, killed);
 out:
 	spin_unlock(&tw_death_lock);
 }
@@ -628,7 +628,7 @@
 out:
 	if ((tcp_tw_count -= killed) == 0)
 		del_timer(&tcp_tw_timer);
-	net_statistics[smp_processor_id()*2].TimeWaitKilled += killed;
+	NET_ADD_STATS_BH(TimeWaitKilled, killed);
 	spin_unlock(&tw_death_lock);
 }
 
diff -Nru a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
--- a/net/ipv4/tcp_timer.c	Wed Jan  8 20:04:45 2003
+++ b/net/ipv4/tcp_timer.c	Wed Jan  8 20:04:45 2003
@@ -237,7 +237,8 @@
 	if (skb_queue_len(&tp->ucopy.prequeue)) {
 		struct sk_buff *skb;
 
-		net_statistics[smp_processor_id()*2].TCPSchedulerFailed += skb_queue_len(&tp->ucopy.prequeue);
+		NET_ADD_STATS_BH(TCPSchedulerFailed,
+				  skb_queue_len(&tp->ucopy.prequeue));
 
 		while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
 			sk->backlog_rcv(sk, skb);
diff -Nru a/net/ipv4/udp.c b/net/ipv4/udp.c
--- a/net/ipv4/udp.c	Wed Jan  8 20:04:43 2003
+++ b/net/ipv4/udp.c	Wed Jan  8 20:04:43 2003
@@ -110,7 +110,7 @@
  *	Snmp MIB for the UDP layer
  */
 
-struct udp_mib		udp_statistics[NR_CPUS*2];
+DEFINE_SNMP_STAT(struct udp_mib, udp_statistics);
 
 struct sock *udp_hash[UDP_HTABLE_SIZE];
 rwlock_t udp_hash_lock = RW_LOCK_UNLOCKED;
diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
--- a/net/ipv6/af_inet6.c	Wed Jan  8 20:04:44 2003
+++ b/net/ipv6/af_inet6.c	Wed Jan  8 20:04:44 2003
@@ -619,6 +619,81 @@
 	inet_unregister_protosw(p);
 }
 
+static int __init init_ipv6_mibs(void)
+{
+	int i;
+ 
+	ipv6_statistics[0] = kmalloc_percpu(sizeof (struct ipv6_mib),
+						GFP_KERNEL);
+	if (!ipv6_statistics[0])
+		goto err_ip_mib0;
+	ipv6_statistics[1] = kmalloc_percpu(sizeof (struct ipv6_mib),
+						GFP_KERNEL);
+	if (!ipv6_statistics[1])
+		goto err_ip_mib1;
+	
+	icmpv6_statistics[0] = kmalloc_percpu(sizeof (struct icmpv6_mib),
+						GFP_KERNEL);
+	if (!icmpv6_statistics[0])
+		goto err_icmp_mib0;
+	icmpv6_statistics[1] = kmalloc_percpu(sizeof (struct icmpv6_mib),
+						GFP_KERNEL);
+	if (!icmpv6_statistics[1])
+		goto err_icmp_mib1;
+	
+	udp_stats_in6[0] = kmalloc_percpu(sizeof (struct udp_mib),
+						GFP_KERNEL);
+	if (!udp_stats_in6[0])
+		goto err_udp_mib0;
+	udp_stats_in6[1] = kmalloc_percpu(sizeof (struct udp_mib),
+						GFP_KERNEL);
+	if (!udp_stats_in6[1])
+		goto err_udp_mib1;
+
+	/* Zero all percpu versions of the mibs */
+	for (i = 0; i < NR_CPUS; i++) {
+		if (cpu_possible(i)) {
+		memset(per_cpu_ptr(ipv6_statistics[0], i), 0,
+				sizeof (struct ipv6_mib));
+		memset(per_cpu_ptr(ipv6_statistics[1], i), 0,
+				sizeof (struct ipv6_mib));
+		memset(per_cpu_ptr(icmpv6_statistics[0], i), 0,
+				sizeof (struct icmpv6_mib));
+		memset(per_cpu_ptr(icmpv6_statistics[1], i), 0,
+				sizeof (struct icmpv6_mib));
+		memset(per_cpu_ptr(udp_stats_in6[0], i), 0,
+				sizeof (struct udp_mib));
+		memset(per_cpu_ptr(udp_stats_in6[1], i), 0,
+				sizeof (struct udp_mib));
+		}
+	}
+	return 0;
+
+err_udp_mib1:
+	kfree_percpu(udp_stats_in6[0]);
+err_udp_mib0:
+	kfree_percpu(icmpv6_statistics[1]);
+err_icmp_mib1:
+	kfree_percpu(icmpv6_statistics[0]);
+err_icmp_mib0:
+	kfree_percpu(ipv6_statistics[1]);
+err_ip_mib1:
+	kfree_percpu(ipv6_statistics[0]);
+err_ip_mib0:
+	return -ENOMEM;
+	
+}
+
+static void __exit cleanup_ipv6_mibs(void)
+{
+	kfree_percpu(ipv6_statistics[0]);
+	kfree_percpu(ipv6_statistics[1]);
+	kfree_percpu(icmpv6_statistics[0]);
+	kfree_percpu(icmpv6_statistics[1]);
+	kfree_percpu(udp_stats_in6[0]);
+	kfree_percpu(udp_stats_in6[1]);
+}
+	
 static int __init inet6_init(void)
 {
 	struct sk_buff *dummy_skb;
@@ -668,6 +743,11 @@
 	 * be able to create sockets. (?? is this dangerous ??)
 	 */
 	(void) sock_register(&inet6_family_ops);
+
+	/* Initialise ipv6 mibs */
+	err = init_ipv6_mibs();
+	if (err)
+		goto init_mib_fail;
 	
 	/*
 	 *	ipngwg API draft makes clear that the correct semantics
@@ -735,6 +815,8 @@
 #if defined(MODULE) && defined(CONFIG_SYSCTL)
 	ipv6_sysctl_unregister();
 #endif
+	cleanup_ipv6_mibs();
+init_mib_fail:
 	return err;
 }
 module_init(inet6_init);
@@ -765,6 +847,7 @@
 #ifdef CONFIG_SYSCTL
 	ipv6_sysctl_unregister();	
 #endif
+	cleanup_ipv6_mibs();
 }
 module_exit(inet6_exit);
 #endif /* MODULE */
diff -Nru a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
--- a/net/ipv6/exthdrs.c	Wed Jan  8 20:04:32 2003
+++ b/net/ipv6/exthdrs.c	Wed Jan  8 20:04:32 2003
@@ -402,7 +402,13 @@
 	if (!pskb_may_pull(skb, (skb->h.raw-skb->data)+8))
 		goto fail;
 
-	len = (skb->h.raw[1]+1)<<2;
+	/*
+	 * RFC2402 2.2 Payload Length
+	 * The 8-bit field specifies the length of AH in 32-bit words 
+	 * (4-byte units), minus "2".
+	 * -- Noriaki Takamiya @USAGI Project
+	 */
+	len = (skb->h.raw[1]+2)<<2;
 
 	if (len&7)
 		goto fail;
diff -Nru a/net/ipv6/icmp.c b/net/ipv6/icmp.c
--- a/net/ipv6/icmp.c	Wed Jan  8 20:04:43 2003
+++ b/net/ipv6/icmp.c	Wed Jan  8 20:04:43 2003
@@ -65,7 +65,7 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
-struct icmpv6_mib icmpv6_statistics[NR_CPUS*2];
+DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics);
 
 /*
  *	ICMP socket for flow control.
@@ -377,7 +377,7 @@
 	ip6_build_xmit(sk, icmpv6_getfrag, &msg, &fl, len, NULL, -1,
 		       MSG_DONTWAIT);
 	if (type >= ICMPV6_DEST_UNREACH && type <= ICMPV6_PARAMPROB)
-		(&(icmpv6_statistics[smp_processor_id()*2].Icmp6OutDestUnreachs))[type-1]++;
+		ICMP6_STATS_PTR_BH(Icmp6OutDestUnreachs) [type-1]++;
 	ICMP6_INC_STATS_BH(Icmp6OutMsgs);
 out:
 	icmpv6_xmit_unlock();
@@ -539,9 +539,9 @@
 	type = hdr->icmp6_type;
 
 	if (type >= ICMPV6_DEST_UNREACH && type <= ICMPV6_PARAMPROB)
-		(&icmpv6_statistics[smp_processor_id()*2].Icmp6InDestUnreachs)[type-ICMPV6_DEST_UNREACH]++;
+		ICMP6_STATS_PTR_BH(Icmp6InDestUnreachs)[type-ICMPV6_DEST_UNREACH]++;
 	else if (type >= ICMPV6_ECHO_REQUEST && type <= NDISC_REDIRECT)
-		(&icmpv6_statistics[smp_processor_id()*2].Icmp6InEchos)[type-ICMPV6_ECHO_REQUEST]++;
+		ICMP6_STATS_PTR_BH(Icmp6InEchos)[type-ICMPV6_ECHO_REQUEST]++;
 
 	switch (type) {
 	case ICMPV6_ECHO_REQUEST:
diff -Nru a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
--- a/net/ipv6/ipv6_sockglue.c	Wed Jan  8 20:04:43 2003
+++ b/net/ipv6/ipv6_sockglue.c	Wed Jan  8 20:04:43 2003
@@ -51,7 +51,7 @@
 
 #include <asm/uaccess.h>
 
-struct ipv6_mib ipv6_statistics[NR_CPUS*2];
+DEFINE_SNMP_STAT(struct ipv6_mib, ipv6_statistics);
 
 static struct packet_type ipv6_packet_type =
 {
diff -Nru a/net/ipv6/proc.c b/net/ipv6/proc.c
--- a/net/ipv6/proc.c	Wed Jan  8 20:04:43 2003
+++ b/net/ipv6/proc.c	Wed Jan  8 20:04:43 2003
@@ -59,11 +59,11 @@
 static struct snmp6_item
 {
 	char *name;
-	unsigned long *ptr;
-	int   mibsize;
+	void **mib;
+	int   offset;
 } snmp6_list[] = {
 /* ipv6 mib according to draft-ietf-ipngwg-ipv6-mib-04 */
-#define SNMP6_GEN(x) { #x , &ipv6_statistics[0].x, sizeof(struct ipv6_mib)/sizeof(unsigned long) }
+#define SNMP6_GEN(x) { #x , (void **)ipv6_statistics, offsetof(struct ipv6_mib, x) }
 	SNMP6_GEN(Ip6InReceives),
 	SNMP6_GEN(Ip6InHdrErrors),
 	SNMP6_GEN(Ip6InTooBigErrors),
@@ -97,7 +97,7 @@
 		OutRouterAdvertisements too.
 		OutGroupMembQueries too.
  */
-#define SNMP6_GEN(x) { #x , &icmpv6_statistics[0].x, sizeof(struct icmpv6_mib)/sizeof(unsigned long) }
+#define SNMP6_GEN(x) { #x , (void **)icmpv6_statistics, offsetof(struct icmpv6_mib, x) }
 	SNMP6_GEN(Icmp6InMsgs),
 	SNMP6_GEN(Icmp6InErrors),
 	SNMP6_GEN(Icmp6InDestUnreachs),
@@ -127,7 +127,7 @@
 	SNMP6_GEN(Icmp6OutGroupMembResponses),
 	SNMP6_GEN(Icmp6OutGroupMembReductions),
 #undef SNMP6_GEN
-#define SNMP6_GEN(x) { "Udp6" #x , &udp_stats_in6[0].Udp##x, sizeof(struct udp_mib)/sizeof(unsigned long) }
+#define SNMP6_GEN(x) { "Udp6" #x , (void **)udp_stats_in6, offsetof(struct udp_mib, Udp##x) }
 	SNMP6_GEN(InDatagrams),
 	SNMP6_GEN(NoPorts),
 	SNMP6_GEN(InErrors),
@@ -135,17 +135,23 @@
 #undef SNMP6_GEN
 };
 
-static unsigned long fold_field(unsigned long *ptr, int size)
+static unsigned long
+fold_field(void *mib[], int offt)
 {
-	unsigned long res = 0;
-	int i;
-
-	for (i=0; i<NR_CPUS; i++) {
-		res += ptr[2*i*size];
-		res += ptr[(2*i+1)*size];
-	}
-
-	return res;
+        unsigned long res = 0;
+        int i;
+ 
+        for (i = 0; i < NR_CPUS; i++) {
+                if (!cpu_possible(i))
+                        continue;
+                res +=
+                    *((unsigned long *) (((void *)per_cpu_ptr(mib[0], i)) +
+                                         offt));
+                res +=
+                    *((unsigned long *) (((void *)per_cpu_ptr(mib[1], i)) +
+                                         offt));
+        }
+        return res;
 }
 
 int afinet6_get_snmp(char *buffer, char **start, off_t offset, int length)
@@ -155,7 +161,7 @@
 
 	for (i=0; i<sizeof(snmp6_list)/sizeof(snmp6_list[0]); i++)
 		len += sprintf(buffer+len, "%-32s\t%ld\n", snmp6_list[i].name,
-			       fold_field(snmp6_list[i].ptr, snmp6_list[i].mibsize));
+			       fold_field(snmp6_list[i].mib, snmp6_list[i].offset));
 
 	len -= offset;
 
diff -Nru a/net/ipv6/udp.c b/net/ipv6/udp.c
--- a/net/ipv6/udp.c	Wed Jan  8 20:04:45 2003
+++ b/net/ipv6/udp.c	Wed Jan  8 20:04:45 2003
@@ -51,7 +51,7 @@
 
 #include <net/checksum.h>
 
-struct udp_mib udp_stats_in6[NR_CPUS*2];
+DEFINE_SNMP_STAT(struct udp_mib, udp_stats_in6);
 
 /* XXX This is identical to tcp_ipv6.c:ipv6_rcv_saddr_equal, put
  * XXX it somewhere common. -DaveM
diff -Nru a/net/sctp/protocol.c b/net/sctp/protocol.c
--- a/net/sctp/protocol.c	Wed Jan  8 20:04:44 2003
+++ b/net/sctp/protocol.c	Wed Jan  8 20:04:44 2003
@@ -60,7 +60,7 @@
 /* Global data structures. */
 sctp_protocol_t sctp_proto;
 struct proc_dir_entry	*proc_net_sctp;
-struct sctp_mib sctp_statistics[NR_CPUS * 2];
+DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics);
 
 /* This is the global socket data structure used for responding to
  * the Out-of-the-blue (OOTB) packets.  A control sock will be created
@@ -653,6 +653,40 @@
 	return 1;
 }
 
+static int __init init_sctp_mibs(void)
+{
+	int i;
+	
+	sctp_statistics[0] = kmalloc_percpu(sizeof (struct sctp_mib),
+					    GFP_KERNEL);
+	if (!sctp_statistics[0])
+		return -ENOMEM;
+	sctp_statistics[1] = kmalloc_percpu(sizeof (struct sctp_mib),
+					    GFP_KERNEL);
+	if (!sctp_statistics[1]) {
+		kfree_percpu(sctp_statistics[0]);
+		return -ENOMEM;
+	}
+
+	/* Zero all percpu versions of the mibs */
+	for (i = 0; i < NR_CPUS; i++) {
+		if (cpu_possible(i)) {
+			memset(per_cpu_ptr(sctp_statistics[0], i), 0,
+					sizeof (struct sctp_mib));
+			memset(per_cpu_ptr(sctp_statistics[1], i), 0,
+					sizeof (struct sctp_mib));
+		}
+	}
+	return 0;
+	
+}
+
+static void cleanup_sctp_mibs(void)
+{
+	kfree_percpu(sctp_statistics[0]);
+	kfree_percpu(sctp_statistics[1]);
+}
+
 /* Initialize the universe into something sensible.  */
 int sctp_init(void)
 {
@@ -666,6 +700,11 @@
 	/* Add SCTP to inetsw linked list.  */
 	inet_register_protosw(&sctp_protosw);
 
+	/* Allocate and initialise sctp mibs.  */
+	status = init_sctp_mibs();
+	if (status) 
+		goto err_init_mibs;
+		
 	/* Initialize proc fs directory.  */
 	sctp_proc_init();
 
@@ -805,6 +844,8 @@
 err_ahash_alloc:
 	sctp_dbg_objcnt_exit();
 	sctp_proc_exit();
+	cleanup_sctp_mibs();
+err_init_mibs:	
 	inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
 	inet_unregister_protosw(&sctp_protosw);
 	return status;
@@ -836,6 +877,7 @@
 
 	sctp_dbg_objcnt_exit();
 	sctp_proc_exit();
+	cleanup_sctp_mibs();
 
 	inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
 	inet_unregister_protosw(&sctp_protosw);
diff -Nru a/net/socket.c b/net/socket.c
--- a/net/socket.c	Wed Jan  8 20:04:43 2003
+++ b/net/socket.c	Wed Jan  8 20:04:43 2003
@@ -75,7 +75,6 @@
 #include <linux/cache.h>
 #include <linux/module.h>
 #include <linux/highmem.h>
-#include <linux/wireless.h>
 #include <linux/divert.h>
 #include <linux/mount.h>
 
@@ -189,10 +188,7 @@
  *	Statistics counters of the socket lists
  */
 
-static union {
-	int	counter;
-	char	__pad[SMP_CACHE_BYTES];
-} sockets_in_use[NR_CPUS] __cacheline_aligned = {{0}};
+static DEFINE_PER_CPU(int, sockets_in_use) = 0;
 
 /*
  *	Support routines. Move socket addresses back and forth across the kernel/user
@@ -475,7 +471,8 @@
 	inode->i_uid = current->fsuid;
 	inode->i_gid = current->fsgid;
 
-	sockets_in_use[smp_processor_id()].counter++;
+	get_cpu_var(sockets_in_use)++;
+	put_cpu_var(sockets_in_use);
 	return sock;
 }
 
@@ -511,7 +508,8 @@
 	if (sock->fasync_list)
 		printk(KERN_ERR "sock_release: fasync list not empty!\n");
 
-	sockets_in_use[smp_processor_id()].counter--;
+	get_cpu_var(sockets_in_use)--;
+	put_cpu_var(sockets_in_use);
 	if (!sock->file) {
 		iput(SOCK_INODE(sock));
 		return;
@@ -1851,7 +1849,7 @@
 	int counter = 0;
 
 	for (cpu = 0; cpu < NR_CPUS; cpu++)
-		counter += sockets_in_use[cpu].counter;
+		counter += per_cpu(sockets_in_use, cpu);
 
 	/* It can be negative, by the way. 8) */
 	if (counter < 0)
diff -Nru a/net/sunrpc/auth.c b/net/sunrpc/auth.c
--- a/net/sunrpc/auth.c	Wed Jan  8 20:04:44 2003
+++ b/net/sunrpc/auth.c	Wed Jan  8 20:04:44 2003
@@ -75,7 +75,9 @@
 void
 rpcauth_init_credcache(struct rpc_auth *auth)
 {
-	memset(auth->au_credcache, 0, sizeof(auth->au_credcache));
+	int i;
+	for (i = 0; i < RPC_CREDCACHE_NR; i++)
+		INIT_LIST_HEAD(&auth->au_credcache[i]);
 	auth->au_nextgc = jiffies + (auth->au_expire >> 1);
 }
 
@@ -86,11 +88,10 @@
 rpcauth_crdestroy(struct rpc_cred *cred)
 {
 #ifdef RPC_DEBUG
-	if (cred->cr_magic != RPCAUTH_CRED_MAGIC)
-		BUG();
+	BUG_ON(cred->cr_magic != RPCAUTH_CRED_MAGIC ||
+			atomic_read(&cred->cr_count) ||
+			!list_empty(&cred->cr_hash));
 	cred->cr_magic = 0;
-	if (atomic_read(&cred->cr_count) || cred->cr_auth)
-		BUG();
 #endif
 	cred->cr_ops->crdestroy(cred);
 }
@@ -99,12 +100,13 @@
  * Destroy a list of credentials
  */
 static inline
-void rpcauth_destroy_credlist(struct rpc_cred *head)
+void rpcauth_destroy_credlist(struct list_head *head)
 {
 	struct rpc_cred *cred;
 
-	while ((cred = head) != NULL) {
-		head = cred->cr_next;
+	while (!list_empty(head)) {
+		cred = list_entry(head->next, struct rpc_cred, cr_hash);
+		list_del_init(&cred->cr_hash);
 		rpcauth_crdestroy(cred);
 	}
 }
@@ -116,137 +118,117 @@
 void
 rpcauth_free_credcache(struct rpc_auth *auth)
 {
-	struct rpc_cred	**q, *cred, *free = NULL;
+	LIST_HEAD(free);
+	struct list_head *pos, *next;
+	struct rpc_cred	*cred;
 	int		i;
 
 	spin_lock(&rpc_credcache_lock);
 	for (i = 0; i < RPC_CREDCACHE_NR; i++) {
-		q = &auth->au_credcache[i];
-		while ((cred = *q) != NULL) {
-			*q = cred->cr_next;
+		list_for_each_safe(pos, next, &auth->au_credcache[i]) {
+			cred = list_entry(pos, struct rpc_cred, cr_hash);
 			cred->cr_auth = NULL;
-			if (atomic_read(&cred->cr_count) == 0) {
-				cred->cr_next = free;
-				free = cred;
-			} else
-				cred->cr_next = NULL;
+			list_del_init(&cred->cr_hash);
+			if (atomic_read(&cred->cr_count) == 0)
+				list_add(&cred->cr_hash, &free);
 		}
 	}
 	spin_unlock(&rpc_credcache_lock);
-	rpcauth_destroy_credlist(free);
+	rpcauth_destroy_credlist(&free);
+}
+
+static inline int
+rpcauth_prune_expired(struct rpc_cred *cred, struct list_head *free)
+{
+	if (atomic_read(&cred->cr_count) != 0)
+	       return 0;
+	if (time_before(jiffies, cred->cr_expire))
+		return 0;
+	cred->cr_auth = NULL;
+	list_del(&cred->cr_hash);
+	list_add(&cred->cr_hash, free);
+	return 1;
 }
 
 /*
  * Remove stale credentials. Avoid sleeping inside the loop.
  */
 static void
-rpcauth_gc_credcache(struct rpc_auth *auth)
+rpcauth_gc_credcache(struct rpc_auth *auth, struct list_head *free)
 {
-	struct rpc_cred	**q, *cred, *free = NULL;
+	struct list_head *pos, *next;
+	struct rpc_cred	*cred;
 	int		i;
 
 	dprintk("RPC: gc'ing RPC credentials for auth %p\n", auth);
-	spin_lock(&rpc_credcache_lock);
 	for (i = 0; i < RPC_CREDCACHE_NR; i++) {
-		q = &auth->au_credcache[i];
-		while ((cred = *q) != NULL) {
-			if (!atomic_read(&cred->cr_count) &&
-			    time_before(cred->cr_expire, jiffies)) {
-				*q = cred->cr_next;
-				cred->cr_auth = NULL;
-				cred->cr_next = free;
-				free = cred;
-				continue;
-			}
-			q = &cred->cr_next;
+		list_for_each_safe(pos, next, &auth->au_credcache[i]) {
+			cred = list_entry(pos, struct rpc_cred, cr_hash);
+			rpcauth_prune_expired(cred, free);
 		}
 	}
-	spin_unlock(&rpc_credcache_lock);
-	rpcauth_destroy_credlist(free);
 	auth->au_nextgc = jiffies + auth->au_expire;
 }
 
 /*
- * Insert credential into cache
- */
-void
-rpcauth_insert_credcache(struct rpc_auth *auth, struct rpc_cred *cred)
-{
-	int		nr;
-
-	nr = (cred->cr_uid & RPC_CREDCACHE_MASK);
-	spin_lock(&rpc_credcache_lock);
-	cred->cr_next = auth->au_credcache[nr];
-	auth->au_credcache[nr] = cred;
-	cred->cr_auth = auth;
-	get_rpccred(cred);
-	spin_unlock(&rpc_credcache_lock);
-}
-
-/*
  * Look up a process' credentials in the authentication cache
  */
 static struct rpc_cred *
 rpcauth_lookup_credcache(struct rpc_auth *auth, int taskflags)
 {
-	struct rpc_cred	**q, *cred = NULL;
+	LIST_HEAD(free);
+	struct list_head *pos, *next;
+	struct rpc_cred	*new = NULL,
+			*cred = NULL;
 	int		nr = 0;
 
 	if (!(taskflags & RPC_TASK_ROOTCREDS))
 		nr = current->uid & RPC_CREDCACHE_MASK;
-
-	if (time_before(auth->au_nextgc, jiffies))
-		rpcauth_gc_credcache(auth);
-
+retry:
 	spin_lock(&rpc_credcache_lock);
-	q = &auth->au_credcache[nr];
-	while ((cred = *q) != NULL) {
-		if (!(cred->cr_flags & RPCAUTH_CRED_DEAD) &&
-		    cred->cr_ops->crmatch(cred, taskflags)) {
-			*q = cred->cr_next;
+	if (time_before(auth->au_nextgc, jiffies))
+		rpcauth_gc_credcache(auth, &free);
+	list_for_each_safe(pos, next, &auth->au_credcache[nr]) {
+		struct rpc_cred *entry;
+	       	entry = list_entry(pos, struct rpc_cred, cr_hash);
+		if (entry->cr_flags & RPCAUTH_CRED_DEAD)
+			continue;
+		if (rpcauth_prune_expired(entry, &free))
+			continue;
+		if (entry->cr_ops->crmatch(entry, taskflags)) {
+			list_del(&entry->cr_hash);
+			cred = entry;
 			break;
 		}
-		q = &cred->cr_next;
+	}
+	if (new) {
+		if (cred)
+			list_add(&new->cr_hash, &free);
+		else
+			cred = new;
+	}
+	if (cred) {
+		list_add(&cred->cr_hash, &auth->au_credcache[nr]);
+		cred->cr_auth = auth;
+		get_rpccred(cred);
 	}
 	spin_unlock(&rpc_credcache_lock);
 
+	rpcauth_destroy_credlist(&free);
+
 	if (!cred) {
-		cred = auth->au_ops->crcreate(taskflags);
+		new = auth->au_ops->crcreate(taskflags);
+		if (new) {
 #ifdef RPC_DEBUG
-		if (cred)
-			cred->cr_magic = RPCAUTH_CRED_MAGIC;
+			new->cr_magic = RPCAUTH_CRED_MAGIC;
 #endif
+			goto retry;
+		}
 	}
 
-	if (cred)
-		rpcauth_insert_credcache(auth, cred);
-
 	return (struct rpc_cred *) cred;
 }
 
-/*
- * Remove cred handle from cache
- */
-static void
-rpcauth_remove_credcache(struct rpc_cred *cred)
-{
-	struct rpc_auth *auth = cred->cr_auth;
-	struct rpc_cred	**q, *cr;
-	int		nr;
-
-	nr = (cred->cr_uid & RPC_CREDCACHE_MASK);
-	q = &auth->au_credcache[nr];
-	while ((cr = *q) != NULL) {
-		if (cred == cr) {
-			*q = cred->cr_next;
-			cred->cr_next = NULL;
-			cred->cr_auth = NULL;
-			break;
-		}
-		q = &cred->cr_next;
-	}
-}
-
 struct rpc_cred *
 rpcauth_lookupcred(struct rpc_auth *auth, int taskflags)
 {
@@ -268,14 +250,6 @@
 	return task->tk_msg.rpc_cred;
 }
 
-int
-rpcauth_matchcred(struct rpc_auth *auth, struct rpc_cred *cred, int taskflags)
-{
-	dprintk("RPC:     matching %s cred %d\n",
-		auth->au_ops->au_name, taskflags);
-	return cred->cr_ops->crmatch(cred, taskflags);
-}
-
 void
 rpcauth_holdcred(struct rpc_task *task)
 {
@@ -291,10 +265,10 @@
 	if (!atomic_dec_and_lock(&cred->cr_count, &rpc_credcache_lock))
 		return;
 
-	if (cred->cr_auth && cred->cr_flags & RPCAUTH_CRED_DEAD)
-		rpcauth_remove_credcache(cred);
+	if ((cred->cr_flags & RPCAUTH_CRED_DEAD) && !list_empty(&cred->cr_hash))
+		list_del_init(&cred->cr_hash);
 
-	if (!cred->cr_auth) {
+	if (list_empty(&cred->cr_hash)) {
 		spin_unlock(&rpc_credcache_lock);
 		rpcauth_crdestroy(cred);
 		return;
diff -Nru a/net/sunrpc/cache.c b/net/sunrpc/cache.c
--- a/net/sunrpc/cache.c	Wed Jan  8 20:04:44 2003
+++ b/net/sunrpc/cache.c	Wed Jan  8 20:04:44 2003
@@ -22,6 +22,7 @@
 #include <linux/ctype.h>
 #include <asm/uaccess.h>
 #include <linux/poll.h>
+#include <linux/seq_file.h>
 #include <linux/proc_fs.h>
 #include <linux/net.h>
 #include <asm/ioctls.h>
@@ -160,7 +161,9 @@
 static struct cache_detail *current_detail;
 static int current_index;
 
-struct file_operations cache_file_operations;
+static struct file_operations cache_file_operations;
+static struct file_operations content_file_operations;
+static struct file_operations cache_flush_operations;
 
 void cache_register(struct cache_detail *cd)
 {
@@ -169,13 +172,32 @@
 		struct proc_dir_entry *p;
 		cd->proc_ent->owner = THIS_MODULE;
 		
-		p = create_proc_entry("channel", S_IFREG|S_IRUSR|S_IWUSR,
-				      cd->proc_ent);
-		if (p) {
-			p->proc_fops = &cache_file_operations;
-			p->owner = THIS_MODULE;
-			p->data = cd;
+ 		p = create_proc_entry("flush", S_IFREG|S_IRUSR|S_IWUSR,
+ 				      cd->proc_ent);
+ 		if (p) {
+ 			p->proc_fops = &cache_flush_operations;
+ 			p->owner = THIS_MODULE;
+ 			p->data = cd;
+ 		}
+ 
+		if (cd->cache_request || cd->cache_parse) {
+			p = create_proc_entry("channel", S_IFREG|S_IRUSR|S_IWUSR,
+					      cd->proc_ent);
+			if (p) {
+				p->proc_fops = &cache_file_operations;
+				p->owner = THIS_MODULE;
+				p->data = cd;
+			}
 		}
+ 		if (cd->cache_show) {
+ 			p = create_proc_entry("content", S_IFREG|S_IRUSR|S_IWUSR,
+ 					      cd->proc_ent);
+ 			if (p) {
+ 				p->proc_fops = &content_file_operations;
+ 				p->owner = THIS_MODULE;
+ 				p->data = cd;
+ 			}
+ 		}
 	}
 	rwlock_init(&cd->hash_lock);
 	INIT_LIST_HEAD(&cd->queue);
@@ -183,7 +205,7 @@
 	cd->nextcheck = 0;
 	cd->entries = 0;
 	atomic_set(&cd->readers, 0);
-	cd->last_close = get_seconds();
+	cd->last_close = 0;
 	list_add(&cd->others, &cache_list);
 	spin_unlock(&cache_list_lock);
 }
@@ -710,7 +732,7 @@
 
 
 
-struct file_operations cache_file_operations = {
+static struct file_operations cache_file_operations = {
 	.llseek		= no_llseek,
 	.read		= cache_read,
 	.write		= cache_write,
@@ -799,8 +821,8 @@
 		len -= 2;
 		while (blen && len >= 2) {
 			unsigned char c = *buf++;
-			*bp++ = '0' + ((c&0xf0)>>4) + (c>=0xa0)*('a'-'0');
-			*bp++ = '0' + (c&0x0f) + ((c&0x0f)>=0x0a)*('a'-'0');
+			*bp++ = '0' + ((c&0xf0)>>4) + (c>=0xa0)*('a'-'9'-1);
+			*bp++ = '0' + (c&0x0f) + ((c&0x0f)>=0x0a)*('a'-'9'-1);
 			len -= 2;
 			blen--;
 		}
@@ -902,7 +924,7 @@
 		}
 	} else {
 		/* text with \nnn octal quoting */
-		while (*bp != ' ' && *bp && len < bufsize-1) {
+		while (*bp != ' ' && *bp != '\n' && *bp && len < bufsize-1) {
 			if (*bp == '\\' &&
 			    isodigit(bp[1]) && (bp[1] <= '3') &&
 			    isodigit(bp[2]) &&
@@ -918,11 +940,205 @@
 				len++;
 			}
 		}
-		*dest = '\0';
 	}
 
+	if (*bp != ' ' && *bp != '\n' && *bp != '\0')
+		return -1;
+	while (*bp == ' ') bp++;
 	*bpp = bp;
-	if (*bp == ' ' || *bp == '\n' || *bp == '\0')
-		return len;
-	return -1;
+	*dest = '\0';
+	return len;
 }
+
+
+/*
+ * support /proc/sunrpc/cache/$CACHENAME/content
+ * as a seqfile.
+ * We call ->cache_show passing NULL for the item to
+ * get a header, then pass each real item in the cache
+ */
+
+struct handle {
+	struct cache_detail *cd;
+	char 		    *pbuf;
+};
+
+static void *c_start(struct seq_file *m, loff_t *pos)
+{
+	loff_t n = *pos;
+	unsigned hash, entry;
+	struct cache_head *ch;
+	struct cache_detail *cd = ((struct handle*)m->private)->cd;
+	
+
+	read_lock(&cd->hash_lock);
+	if (!n--)
+		return (void *)1;
+	hash = n >> 32;
+	entry = n & ((1LL<<32) - 1);
+
+	for (ch=cd->hash_table[hash]; ch; ch=ch->next)
+		if (!entry--)
+			return ch;
+	n &= ~((1LL<<32) - 1);
+	do {
+		hash++;
+		n += 1LL<<32;
+	} while(hash < cd->hash_size && 
+		cd->hash_table[hash]==NULL);
+	if (hash >= cd->hash_size)
+		return NULL;
+	*pos = n+1;
+	return cd->hash_table[hash];
+}
+
+static void *c_next(struct seq_file *m, void *p, loff_t *pos)
+{
+	struct cache_head *ch = p;
+	int hash = (*pos >> 32);
+	struct cache_detail *cd = ((struct handle*)m->private)->cd;
+
+	if (p == (void *)1)
+		hash = 0;
+	else if (ch->next == NULL) {
+		hash++;
+		*pos += 1LL<<32;
+	} else {
+		++*pos;
+		return ch->next;
+	}
+	*pos &= ~((1LL<<32) - 1);
+	while (hash < cd->hash_size &&
+	       cd->hash_table[hash] == NULL) {
+		hash++;
+		*pos += 1LL<<32;
+	}
+	if (hash >= cd->hash_size)
+		return NULL;
+	++*pos;
+	return cd->hash_table[hash];
+}
+
+static void c_stop(struct seq_file *m, void *p)
+{
+	struct cache_detail *cd = ((struct handle*)m->private)->cd;
+	read_unlock(&cd->hash_lock);
+}
+
+static int c_show(struct seq_file *m, void *p)
+{
+	struct cache_head *cp = p;
+	struct cache_detail *cd = ((struct handle*)m->private)->cd;
+	char *pbuf = ((struct handle*)m->private)->pbuf;
+
+	if (p == (void *)1)
+		return cd->cache_show(m, cd, NULL, pbuf);
+
+	cache_get(cp);
+	if (cache_check(cd, cp, NULL))
+		return 0;
+	cache_put(cp, cd);
+
+	return cd->cache_show(m, cd, cp, pbuf);
+}
+
+struct seq_operations cache_content_op = {
+	.start	= c_start,
+	.next	= c_next,
+	.stop	= c_stop,
+	.show	= c_show,
+};
+
+static int content_open(struct inode *inode, struct file *file)
+{
+	int res;
+	char *namebuf = kmalloc(PAGE_SIZE, GFP_KERNEL);
+	struct handle *han;
+	struct cache_detail *cd = PDE(inode)->data;
+
+	if (namebuf == NULL)
+		return -ENOMEM;
+
+	han = kmalloc(sizeof(*han), GFP_KERNEL);
+	if (han == NULL) {
+		kfree(namebuf);
+		return -ENOMEM;
+	}
+	han->pbuf = namebuf;
+	han->cd = cd;
+
+	res = seq_open(file, &cache_content_op);
+	if (res) {
+		kfree(namebuf);
+		kfree(han);
+	} else
+		((struct seq_file *)file->private_data)->private = han;
+
+	return res;
+}
+static int content_release(struct inode *inode, struct file *file)
+{
+	struct seq_file *m = (struct seq_file *)file->private_data;
+	struct handle *han = m->private;
+	kfree(han->pbuf);
+	kfree(han);
+	m->private = NULL;
+	return seq_release(inode, file);
+}
+
+static struct file_operations content_file_operations = {
+	.open		= content_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= content_release,
+};
+
+static ssize_t read_flush(struct file *file, char *buf,
+			    size_t count, loff_t *ppos)
+{
+	struct cache_detail *cd = PDE(file->f_dentry->d_inode)->data;
+	char tbuf[20];
+	unsigned long p = *ppos;
+	int len;
+
+	sprintf(tbuf, "%lu\n", cd->flush_time);
+	len = strlen(tbuf);
+	if (p >= len)
+		return 0;
+	len -= p;
+	if (len > count) len = count;
+	if (copy_to_user(buf, (void*)(tbuf+p), len))
+		len = -EFAULT;
+	else
+		*ppos += len;
+	return len;
+}
+
+static ssize_t write_flush(struct file * file, const char * buf,
+			     size_t count, loff_t *ppos)
+{
+	struct cache_detail *cd = PDE(file->f_dentry->d_inode)->data;
+	char tbuf[20];
+	char *ep;
+	long flushtime;
+	if (*ppos || count > sizeof(tbuf)-1)
+		return -EINVAL;
+	if (copy_from_user(tbuf, buf, count))
+		return -EFAULT;
+	tbuf[count] = 0;
+	flushtime = simple_strtoul(tbuf, &ep, 0);
+	if (*ep && *ep != '\n')
+		return -EINVAL;
+
+	cd->flush_time = flushtime;
+	cd->nextcheck = get_seconds();
+	cache_flush();
+
+	*ppos += count;
+	return count;
+}
+
+static struct file_operations cache_flush_operations = {
+	.read		= read_flush,
+	.write		= write_flush,
+};
diff -Nru a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
--- a/net/sunrpc/sunrpc_syms.c	Wed Jan  8 20:04:45 2003
+++ b/net/sunrpc/sunrpc_syms.c	Wed Jan  8 20:04:45 2003
@@ -60,12 +60,7 @@
 /* Client credential cache */
 EXPORT_SYMBOL(rpcauth_register);
 EXPORT_SYMBOL(rpcauth_unregister);
-EXPORT_SYMBOL(rpcauth_init_credcache);
-EXPORT_SYMBOL(rpcauth_free_credcache);
-EXPORT_SYMBOL(rpcauth_insert_credcache);
 EXPORT_SYMBOL(rpcauth_lookupcred);
-EXPORT_SYMBOL(rpcauth_bindcred);
-EXPORT_SYMBOL(rpcauth_matchcred);
 EXPORT_SYMBOL(put_rpccred);
 
 /* RPC server stuff */
diff -Nru a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c
--- a/net/sunrpc/svcauth.c	Wed Jan  8 20:04:44 2003
+++ b/net/sunrpc/svcauth.c	Wed Jan  8 20:04:44 2003
@@ -16,6 +16,7 @@
 #include <linux/sunrpc/svcsock.h>
 #include <linux/sunrpc/svcauth.h>
 #include <linux/err.h>
+#include <linux/hash.h>
 
 #define RPCDBG_FACILITY	RPCDBG_AUTH
 
@@ -111,14 +112,22 @@
  * it will complain.
  */
 
-int name_hash(char *name, int size)
+int hash_mem(char *buf, int len, int bits)
 {
 	int hash = 0;
-	while (*name) {
-		hash += *name;
-		name++;
+	unsigned long l;
+	while (len >= BITS_PER_LONG/8) {
+		l = *(unsigned long *)buf;
+		buf += BITS_PER_LONG/8;
+		len -= BITS_PER_LONG/8;
+		hash ^= hash_long(l, bits);
 	}
-	return hash % size;
+	if (len) {
+		l=0;
+		memcpy((char*)&l, buf, len);
+		hash ^= hash_long(l, bits);
+	}
+	return hash;
 }
 
 
@@ -161,7 +170,7 @@
 
 static inline int auth_domain_hash(struct auth_domain *item)
 {
-	return name_hash(item->name, DN_HASHMAX);
+	return hash_str(item->name, DN_HASHBITS);
 }
 static inline int auth_domain_match(struct auth_domain *tmp, struct auth_domain *item)
 {
diff -Nru a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
--- a/net/sunrpc/svcauth_unix.c	Wed Jan  8 20:04:44 2003
+++ b/net/sunrpc/svcauth_unix.c	Wed Jan  8 20:04:44 2003
@@ -5,6 +5,8 @@
 #include <linux/sunrpc/svcsock.h>
 #include <linux/sunrpc/svcauth.h>
 #include <linux/err.h>
+#include <linux/seq_file.h>
+#include <linux/hash.h>
 
 #define RPCDBG_FACILITY	RPCDBG_AUTH
 
@@ -107,7 +109,8 @@
 
 static inline int ip_map_hash(struct ip_map *item)
 {
-	return (name_hash(item->m_class, IP_HASHMAX) ^ item->m_addr.s_addr) & IP_HASHMASK;
+	return hash_str(item->m_class, IP_HASHBITS) ^ 
+		hash_long((unsigned long)item->m_addr.s_addr, IP_HASHBITS);
 }
 static inline int ip_map_match(struct ip_map *item, struct ip_map *tmp)
 {
@@ -210,6 +213,33 @@
 	return 0;
 }
 
+static int ip_map_show(struct seq_file *m,
+		       struct cache_detail *cd,
+		       struct cache_head *h,
+		       char *pbuf)
+{
+	struct ip_map *im;
+	struct in_addr addr;
+
+	if (h == NULL) {
+		seq_puts(m, "#class IP domain\n");
+		return 0;
+	}
+	im = container_of(h, struct ip_map, h);
+	/* class addr domain */
+	addr = im->m_addr;
+	seq_printf(m, "%s %d.%d.%d.%d %s\n",
+		   im->m_class,
+		   htonl(addr.s_addr) >> 24 & 0xff,
+		   htonl(addr.s_addr) >> 16 & 0xff,
+		   htonl(addr.s_addr) >>  8 & 0xff,
+		   htonl(addr.s_addr) >>  0 & 0xff,
+		   im->m_client->h.name
+		   );
+	return 0;
+}
+	
+
 struct cache_detail ip_map_cache = {
 	.hash_size	= IP_HASHMAX,
 	.hash_table	= ip_table,
@@ -217,6 +247,7 @@
 	.cache_put	= ip_map_put,
 	.cache_request	= ip_map_request,
 	.cache_parse	= ip_map_parse,
+	.cache_show	= ip_map_show,
 };
 
 static DefineSimpleCacheLookup(ip_map)
@@ -268,20 +299,17 @@
 
 	if (!ipm)
 		return NULL;
+	if (cache_check(&ip_map_cache, &ipm->h, NULL))
+		return NULL;
 
-	if (test_bit(CACHE_VALID, &ipm->h.flags) &&
-	    (ipm->m_client->addr_changes - ipm->m_add_change) >0)
+	if ((ipm->m_client->addr_changes - ipm->m_add_change) >0) {
 		set_bit(CACHE_NEGATIVE, &ipm->h.flags);
-
-	if (!test_bit(CACHE_VALID, &ipm->h.flags))
-		rv = NULL;
-	else if (test_bit(CACHE_NEGATIVE, &ipm->h.flags))
 		rv = NULL;
-	else {
+	} else {
 		rv = &ipm->m_client->h;
 		cache_get(&rv->h);
 	}
-	if (ipm) ip_map_put(&ipm->h, &ip_map_cache);
+	ip_map_put(&ipm->h, &ip_map_cache);
 	return rv;
 }
 
diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c
--- a/net/unix/af_unix.c	Wed Jan  8 20:04:44 2003
+++ b/net/unix/af_unix.c	Wed Jan  8 20:04:44 2003
@@ -1109,7 +1109,7 @@
 static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer)
 {
 	struct sock *sk = sock->sk;
-	struct unix_sock *u = unix_sk(sk);
+	struct unix_sock *u;
 	struct sockaddr_un *sunaddr=(struct sockaddr_un *)uaddr;
 	int err = 0;
 
@@ -1124,6 +1124,7 @@
 		sock_hold(sk);
 	}
 
+	u = unix_sk(sk);
 	unix_state_rlock(sk);
 	if (!u->addr) {
 		sunaddr->sun_family = AF_UNIX;
diff -Nru a/scripts/kallsyms.c b/scripts/kallsyms.c
--- a/scripts/kallsyms.c	Wed Jan  8 20:04:45 2003
+++ b/scripts/kallsyms.c	Wed Jan  8 20:04:45 2003
@@ -144,7 +144,7 @@
 		for (k = 0; table[i].sym[k] && table[i].sym[k] == prev[k]; ++k)
 			; 
 
-		printf("\t.asciz\t\"\\x%02x%s\"\n", k, table[i].sym + k);
+		printf("\t.byte 0x%02x ; .asciz\t\"%s\"\n", k, table[i].sym + k);
 		last_addr = table[i].addr;
 		prev = table[i].sym;
 	}
diff -Nru a/sound/oss/cmpci.c b/sound/oss/cmpci.c
--- a/sound/oss/cmpci.c	Wed Jan  8 20:04:44 2003
+++ b/sound/oss/cmpci.c	Wed Jan  8 20:04:44 2003
@@ -82,6 +82,7 @@
  *	- speaker mixer support 
  *	Mon Aug 13 2001
  *	- optimizations and cleanups
+ *    03/01/2003 - open_mode fixes from Georg Acher <acher@in.tum.de>
  *
  */
 /*****************************************************************************/
@@ -2272,7 +2273,7 @@
 		stop_adc(s);
 		dealloc_dmabuf(&s->dma_adc);
 	}
-	s->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE);
+	s->open_mode &= ~(file->f_mode & (FMODE_READ|FMODE_WRITE));
 	up(&s->open_sem);
 	wake_up(&s->open_wait);
 	unlock_kernel();
@@ -2540,7 +2541,7 @@
 		set_current_state(TASK_RUNNING);
 	}
 	down(&s->open_sem);
-	s->open_mode &= (~(file->f_mode << FMODE_MIDI_SHIFT)) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE);
+	s->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE));
 	spin_lock_irqsave(&s->lock, flags);
 	if (!(s->open_mode & (FMODE_MIDI_READ | FMODE_MIDI_WRITE))) {
 		del_timer(&s->midi.timer);		
diff -Nru a/sound/oss/es1370.c b/sound/oss/es1370.c
--- a/sound/oss/es1370.c	Wed Jan  8 20:04:45 2003
+++ b/sound/oss/es1370.c	Wed Jan  8 20:04:45 2003
@@ -3,7 +3,7 @@
 /*
  *      es1370.c  --  Ensoniq ES1370/Asahi Kasei AK4531 audio driver.
  *
- *      Copyright (C) 1998-2001  Thomas Sailer (t.sailer@alumni.ethz.ch)
+ *      Copyright (C) 1998-2001, 2003  Thomas Sailer (t.sailer@alumni.ethz.ch)
  *
  *      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
@@ -117,6 +117,7 @@
  *    07.01.2001   0.36  Timeout change in wrcodec as requested by Frank Klemm <pfk@fuchs.offl.uni-jena.de>
  *    31.01.2001   0.37  Register/Unregister gameport
  *                       Fix SETTRIGGER non OSS API conformity
+ *    03.01.2003   0.38  open_mode fixes from Georg Acher <acher@in.tum.de>
  *
  * some important things missing in Ensoniq documentation:
  *
@@ -1807,7 +1808,7 @@
 		stop_adc(s);
 		dealloc_dmabuf(s, &s->dma_adc);
 	}
-	s->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE);
+	s->open_mode &= ~(file->f_mode & (FMODE_READ|FMODE_WRITE));
 	wake_up(&s->open_wait);
 	up(&s->open_sem);
 	unlock_kernel();
@@ -2498,7 +2499,7 @@
 		set_current_state(TASK_RUNNING);
 	}
 	down(&s->open_sem);
-	s->open_mode &= (~(file->f_mode << FMODE_MIDI_SHIFT)) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE);
+	s->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE));
 	spin_lock_irqsave(&s->lock, flags);
 	if (!(s->open_mode & (FMODE_MIDI_READ | FMODE_MIDI_WRITE))) {
 		s->ctrl &= ~CTRL_UART_EN;
@@ -2740,7 +2741,7 @@
 {
 	if (!pci_present())   /* No PCI bus in this machine! */
 		return -ENODEV;
-	printk(KERN_INFO "es1370: version v0.37 time " __TIME__ " " __DATE__ "\n");
+	printk(KERN_INFO "es1370: version v0.38 time " __TIME__ " " __DATE__ "\n");
 	return pci_module_init(&es1370_driver);
 }
 
diff -Nru a/sound/oss/es1371.c b/sound/oss/es1371.c
--- a/sound/oss/es1371.c	Wed Jan  8 20:04:44 2003
+++ b/sound/oss/es1371.c	Wed Jan  8 20:04:44 2003
@@ -3,7 +3,7 @@
 /*
  *      es1371.c  --  Creative Ensoniq ES1371.
  *
- *      Copyright (C) 1998-2001  Thomas Sailer (t.sailer@alumni.ethz.ch)
+ *      Copyright (C) 1998-2001, 2003  Thomas Sailer (t.sailer@alumni.ethz.ch)
  *
  *      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
@@ -104,6 +104,7 @@
  *    31.01.2001   0.30  Register/Unregister gameport
  *                       Fix SETTRIGGER non OSS API conformity
  *    14.07.2001   0.31  Add list of laptops needing amplifier control
+ *    03.01.2003   0.32  open_mode fixes from Georg Acher <acher@in.tum.de>
  */
 
 /*****************************************************************************/
@@ -1995,7 +1996,7 @@
 		stop_adc(s);
 		dealloc_dmabuf(s, &s->dma_adc);
 	}
-	s->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE);
+	s->open_mode &= ~(file->f_mode & (FMODE_READ|FMODE_WRITE));
 	up(&s->open_sem);
 	wake_up(&s->open_wait);
 	unlock_kernel();
@@ -2675,7 +2676,7 @@
 		set_current_state(TASK_RUNNING);
 	}
 	down(&s->open_sem);
-	s->open_mode &= (~(file->f_mode << FMODE_MIDI_SHIFT)) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE);
+	s->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE));
 	spin_lock_irqsave(&s->lock, flags);
 	if (!(s->open_mode & (FMODE_MIDI_READ | FMODE_MIDI_WRITE))) {
 		s->ctrl &= ~CTRL_UART_EN;
@@ -3044,7 +3045,7 @@
 {
 	if (!pci_present())   /* No PCI bus in this machine! */
 		return -ENODEV;
-	printk(KERN_INFO PFX "version v0.30 time " __TIME__ " " __DATE__ "\n");
+	printk(KERN_INFO PFX "version v0.32 time " __TIME__ " " __DATE__ "\n");
 	return pci_module_init(&es1371_driver);
 }
 
diff -Nru a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c
--- a/sound/oss/esssolo1.c	Wed Jan  8 20:04:43 2003
+++ b/sound/oss/esssolo1.c	Wed Jan  8 20:04:43 2003
@@ -3,7 +3,7 @@
 /*
  *      esssolo1.c  --  ESS Technology Solo1 (ES1946) audio driver.
  *
- *      Copyright (C) 1998-2001  Thomas Sailer (t.sailer@alumni.ethz.ch)
+ *      Copyright (C) 1998-2001, 2003  Thomas Sailer (t.sailer@alumni.ethz.ch)
  *
  *      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
@@ -82,6 +82,7 @@
  *    22.05.2001   0.19  more cleanups, changed PM to PCI 2.4 style, got rid
  *                       of global list of devices, using pci device data.
  *                       Marcus Meissner <mm@caldera.de>
+ *    03.01.2003   0.20  open_mode fixes from Georg Acher <acher@in.tum.de>
  */
 
 /*****************************************************************************/
@@ -1986,7 +1987,7 @@
 		set_current_state(TASK_RUNNING);
 	}
 	down(&s->open_sem);
-	s->open_mode &= (~(file->f_mode << FMODE_MIDI_SHIFT)) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE);
+	s->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE));
 	spin_lock_irqsave(&s->lock, flags);
 	if (!(s->open_mode & (FMODE_MIDI_READ | FMODE_MIDI_WRITE))) {
 		outb(0x30, s->iobase + 7); /* enable A1, A2 irq's */
@@ -2461,7 +2462,7 @@
 {
 	if (!pci_present())   /* No PCI bus in this machine! */
 		return -ENODEV;
-	printk(KERN_INFO "solo1: version v0.19 time " __TIME__ " " __DATE__ "\n");
+	printk(KERN_INFO "solo1: version v0.20 time " __TIME__ " " __DATE__ "\n");
 	if (!pci_register_driver(&solo1_driver)) {
 		pci_unregister_driver(&solo1_driver);
                 return -ENODEV;
diff -Nru a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c
--- a/sound/oss/sonicvibes.c	Wed Jan  8 20:04:43 2003
+++ b/sound/oss/sonicvibes.c	Wed Jan  8 20:04:43 2003
@@ -3,7 +3,7 @@
 /*
  *      sonicvibes.c  --  S3 Sonic Vibes audio driver.
  *
- *      Copyright (C) 1998-2001  Thomas Sailer (t.sailer@alumni.ethz.ch)
+ *      Copyright (C) 1998-2001, 2003  Thomas Sailer (t.sailer@alumni.ethz.ch)
  *
  *      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
@@ -94,6 +94,7 @@
  *                       Fix SETTRIGGER non OSS API conformity
  *    18.05.2001   0.30  PCI probing and error values cleaned up by Marcus
  *                       Meissner <mm@caldera.de>
+ *    03.01.2003   0.31  open_mode fixes from Georg Acher <acher@in.tum.de>
  *
  */
 
@@ -1969,7 +1970,7 @@
 		stop_adc(s);
 		dealloc_dmabuf(s, &s->dma_adc);
 	}
-	s->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE);
+	s->open_mode &= ~(file->f_mode & (FMODE_READ|FMODE_WRITE));
 	wake_up(&s->open_wait);
 	up(&s->open_sem);
 	unlock_kernel();
@@ -2245,7 +2246,7 @@
 		set_current_state(TASK_RUNNING);
 	}
 	down(&s->open_sem);
-	s->open_mode &= (~(file->f_mode << FMODE_MIDI_SHIFT)) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE);
+	s->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ|FMODE_MIDI_WRITE));
 	spin_lock_irqsave(&s->lock, flags);
 	if (!(s->open_mode & (FMODE_MIDI_READ | FMODE_MIDI_WRITE))) {
 		outb(inb(s->ioenh + SV_CODEC_INTMASK) & ~SV_CINTMASK_MIDI, s->ioenh + SV_CODEC_INTMASK);
@@ -2725,7 +2726,7 @@
 {
 	if (!pci_present())   /* No PCI bus in this machine! */
 		return -ENODEV;
-	printk(KERN_INFO "sv: version v0.30 time " __TIME__ " " __DATE__ "\n");
+	printk(KERN_INFO "sv: version v0.31 time " __TIME__ " " __DATE__ "\n");
 #if 0
 	if (!(wavetable_mem = __get_free_pages(GFP_KERNEL, 20-PAGE_SHIFT)))
 		printk(KERN_INFO "sv: cannot allocate 1MB of contiguous nonpageable memory for wavetable data\n");
diff -Nru a/sound/sound_firmware.c b/sound/sound_firmware.c
--- a/sound/sound_firmware.c	Wed Jan  8 20:04:32 2003
+++ b/sound/sound_firmware.c	Wed Jan  8 20:04:32 2003
@@ -7,7 +7,6 @@
 #include <linux/unistd.h>
 #include <asm/uaccess.h>
 
-static int errno;
 static int do_mod_firmware_load(const char *fn, char **fp)
 {
 	int fd;
