Skip to contentSkip to conversation

U-boot-V2:ID: Sync mod_devicetable

PATCH New Menon 4 participants 6 messages Jun 18, 2008 – Jun 19, 2008 Kbuild

lore
Share & tools
lore

Menon

#0 lore raw

PATCH 1/9 U-boot-V2:ID: Sync mod_devicetable

Syncing up mod_device_tables and filealias.c from 2.6.26 rc5 kernel. introduce the mod_devicetable and sync the filealias from linux kernel

---
 include/linux/mod_devicetable.h |  382 ++++++++++++++++++++++++++++++++++++++++
 scripts/mod/file2alias.c        |  231 ++++++++++++++++++++----
 2 files changed, 573 insertions(+), 40 deletions(-)
include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +382 -0
Index: u-boot-v2.git/include/linux/mod_devicetable.h
===================================================================
@@ -0,0 +1,382 @@
+/*
+ * Device tables which are exported to userspace via
+ * scripts/mod/file2alias.c.  You must keep that file in sync with this
+ * header.
+ */
+
+#ifndef LINUX_MOD_DEVICETABLE_H
+#define LINUX_MOD_DEVICETABLE_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define PCI_ANY_ID (~0)
+
+struct pci_device_id {
+       __u32 vendor, device;           /* Vendor and device ID or PCI_ANY_ID*/
+       __u32 subvendor, subdevice;     /* Subsystem ID's or PCI_ANY_ID */
+       __u32 class, class_mask;        /* (class,subclass,prog-if) triplet */
+       kernel_ulong_t driver_data;     /* Data private to the driver */
+};
+
+
+#define IEEE1394_MATCH_VENDOR_ID       0x0001
+#define IEEE1394_MATCH_MODEL_ID                0x0002
+#define IEEE1394_MATCH_SPECIFIER_ID    0x0004
+#define IEEE1394_MATCH_VERSION         0x0008
+
+struct ieee1394_device_id {
+       __u32 match_flags;
+       __u32 vendor_id;
+       __u32 model_id;
+       __u32 specifier_id;
+       __u32 version;
+       kernel_ulong_t driver_data
+               __attribute__((aligned(sizeof(kernel_ulong_t))));
+};
+
+
+/*
+ * Device table entry for "new style" table-driven USB drivers.
+ * User mode code can read these tables to choose which modules to load.
+ * Declare the table as a MODULE_DEVICE_TABLE.
+ *
+ * A probe() parameter will point to a matching entry from this table.
+ * Use the driver_info field for each match to hold information tied
+ * to that match:  device quirks, etc.
+ *
+ * Terminate the driver's table with an all-zeroes entry.
+ * Use the flag values to control which fields are compared.
+ */
+
+/**
+ * struct usb_device_id - identifies USB devices for probing and hotplugging
+ * @match_flags: Bit mask controlling of the other fields are used to match
+ *     against new devices.  Any field except for driver_info may be used,
+ *     although some only make sense in conjunction with other fields.
+ *     This is usually set by a USB_DEVICE_*() macro, which sets all
+ *     other fields in this structure except for driver_info.
+ * @idVendor: USB vendor ID for a device; numbers are assigned
+ *     by the USB forum to its members.
+ * @idProduct: Vendor-assigned product ID.
+ * @bcdDevice_lo: Low end of range of vendor-assigned product version numbers.
+ *     This is also used to identify individual product versions, for
+ *     a range consisting of a single device.
+ * @bcdDevice_hi: High end of version number range.  The range of product
+ *     versions is inclusive.
+ * @bDeviceClass: Class of device; numbers are assigned
+ *     by the USB forum.  Products may choose to implement classes,
+ *     or be vendor-specific.  Device classes specify behavior of all
+ *     the interfaces on a devices.
+ * @bDeviceSubClass: Subclass of device; associated with bDeviceClass.
+ * @bDeviceProtocol: Protocol of device; associated with bDeviceClass.
+ * @bInterfaceClass: Class of interface; numbers are assigned
+ *     by the USB forum.  Products may choose to implement classes,
+ *     or be vendor-specific.  Interface classes specify behavior only
+ *     of a given interface; other interfaces may support other classes.
+ * @bInterfaceSubClass: Subclass of interface; associated with bInterfaceClass.
+ * @bInterfaceProtocol: Protocol of interface; associated with bInterfaceClass.
+ * @driver_info: Holds information used by the driver.  Usually it holds
+ *     a pointer to a descriptor understood by the driver, or perhaps
+ *     device flags.
+ *
+ * In most cases, drivers will create a table of device IDs by using
+ * USB_DEVICE(), or similar macros designed for that purpose.
+ * They will then export it to userspace using MODULE_DEVICE_TABLE(),
+ * and provide it to the USB core through their usb_driver structure.
+ *
+ * See the usb_match_id() function for information about how matches are
+ * performed.  Briefly, you will normally use one of several macros to help
+ * construct these entries.  Each entry you provide will either identify
+ * one or more specific products, or will identify a class of products
+ * which have agreed to behave the same.  You should put the more specific
+ * matches towards the beginning of your table, so that driver_info can
+ * record quirks of specific products.
+ */
+struct usb_device_id {
+       /* which fields to match against? */
+       __u16           match_flags;
+
+       /* Used for product specific matches; range is inclusive */
+       __u16           idVendor;
+       __u16           idProduct;
+       __u16           bcdDevice_lo;
+       __u16           bcdDevice_hi;
+
+       /* Used for device class matches */
+       __u8            bDeviceClass;
+       __u8            bDeviceSubClass;
+       __u8            bDeviceProtocol;
+
+       /* Used for interface class matches */
+       __u8            bInterfaceClass;
+       __u8            bInterfaceSubClass;
+       __u8            bInterfaceProtocol;
+
+       /* not matched against */
+       kernel_ulong_t  driver_info;
+};
+
+/* Some useful macros to use to create struct usb_device_id */
+#define USB_DEVICE_ID_MATCH_VENDOR             0x0001
+#define USB_DEVICE_ID_MATCH_PRODUCT            0x0002
+#define USB_DEVICE_ID_MATCH_DEV_LO             0x0004
+#define USB_DEVICE_ID_MATCH_DEV_HI             0x0008
+#define USB_DEVICE_ID_MATCH_DEV_CLASS          0x0010
+#define USB_DEVICE_ID_MATCH_DEV_SUBCLASS       0x0020
+#define USB_DEVICE_ID_MATCH_DEV_PROTOCOL       0x0040
+#define USB_DEVICE_ID_MATCH_INT_CLASS          0x0080
+#define USB_DEVICE_ID_MATCH_INT_SUBCLASS       0x0100
+#define USB_DEVICE_ID_MATCH_INT_PROTOCOL       0x0200
+
+/* s390 CCW devices */
+struct ccw_device_id {
+       __u16   match_flags;    /* which fields to match against */
+
+       __u16   cu_type;        /* control unit type     */
+       __u16   dev_type;       /* device type           */
+       __u8    cu_model;       /* control unit model    */
+       __u8    dev_model;      /* device model          */
+
+       kernel_ulong_t driver_info;
+};
+
+#define CCW_DEVICE_ID_MATCH_CU_TYPE            0x01
+#define CCW_DEVICE_ID_MATCH_CU_MODEL           0x02
+#define CCW_DEVICE_ID_MATCH_DEVICE_TYPE                0x04
+#define CCW_DEVICE_ID_MATCH_DEVICE_MODEL       0x08
+
+/* s390 AP bus devices */
+struct ap_device_id {
+       __u16 match_flags;      /* which fields to match against */
+       __u8 dev_type;          /* device type */
+       __u8 pad1;
+       __u32 pad2;
+       kernel_ulong_t driver_info;
+};
+
+#define AP_DEVICE_ID_MATCH_DEVICE_TYPE         0x01
+
+#define ACPI_ID_LEN    16 /* only 9 bytes needed here, 16 bytes are used */
+                          /* to workaround crosscompile issues */
+
+struct acpi_device_id {
+       __u8 id[ACPI_ID_LEN];
+       kernel_ulong_t driver_data;
+};
+
+#define PNP_ID_LEN     8
+#define PNP_MAX_DEVICES        8
+
+struct pnp_device_id {
+       __u8 id[PNP_ID_LEN];
+       kernel_ulong_t driver_data;
+};
+
+struct pnp_card_device_id {
+       __u8 id[PNP_ID_LEN];
+       kernel_ulong_t driver_data;
+       struct {
+               __u8 id[PNP_ID_LEN];
+       } devs[PNP_MAX_DEVICES];
+};
+
+
+#define SERIO_ANY      0xff
+
+struct serio_device_id {
+       __u8 type;
+       __u8 extra;
+       __u8 id;
+       __u8 proto;
+};
+
+/*
+ * Struct used for matching a device
+ */
+struct of_device_id {
+       char    name[32];
+       char    type[32];
+       char    compatible[128];
+#ifdef __KERNEL__
+       void    *data;
+#else
+       kernel_ulong_t data;
+#endif
+};
+
+/* VIO */
+struct vio_device_id {
+       char type[32];
+       char compat[32];
+};
+
+/* PCMCIA */
+
+struct pcmcia_device_id {
+       __u16           match_flags;
+
+       __u16           manf_id;
+       __u16           card_id;
+
+       __u8            func_id;
+
+       /* for real multi-function devices */
+       __u8            function;
+
+       /* for pseudo multi-function devices */
+       __u8            device_no;
+
+       __u32           prod_id_hash[4]
+               __attribute__((aligned(sizeof(__u32))));
+
+       /* not matched against in kernelspace*/
+#ifdef __KERNEL__
+       const char      *prod_id[4];
+#else
+       kernel_ulong_t  prod_id[4]
+               __attribute__((aligned(sizeof(kernel_ulong_t))));
+#endif
+
+       /* not matched against */
+       kernel_ulong_t  driver_info;
+#ifdef __KERNEL__
+       char            *cisfile;
+#else
+       kernel_ulong_t  cisfile;
+#endif
+};
+
+#define PCMCIA_DEV_ID_MATCH_MANF_ID    0x0001
+#define PCMCIA_DEV_ID_MATCH_CARD_ID    0x0002
+#define PCMCIA_DEV_ID_MATCH_FUNC_ID    0x0004
+#define PCMCIA_DEV_ID_MATCH_FUNCTION   0x0008
+#define PCMCIA_DEV_ID_MATCH_PROD_ID1   0x0010
+#define PCMCIA_DEV_ID_MATCH_PROD_ID2   0x0020
+#define PCMCIA_DEV_ID_MATCH_PROD_ID3   0x0040
+#define PCMCIA_DEV_ID_MATCH_PROD_ID4   0x0080
+#define PCMCIA_DEV_ID_MATCH_DEVICE_NO  0x0100
+#define PCMCIA_DEV_ID_MATCH_FAKE_CIS   0x0200
+#define PCMCIA_DEV_ID_MATCH_ANONYMOUS  0x0400
+
+/* Input */
+#define INPUT_DEVICE_ID_EV_MAX         0x1f
+#define INPUT_DEVICE_ID_KEY_MIN_INTERESTING    0x71
+#define INPUT_DEVICE_ID_KEY_MAX                0x1ff
+#define INPUT_DEVICE_ID_REL_MAX                0x0f
+#define INPUT_DEVICE_ID_ABS_MAX                0x3f
+#define INPUT_DEVICE_ID_MSC_MAX                0x07
+#define INPUT_DEVICE_ID_LED_MAX                0x0f
+#define INPUT_DEVICE_ID_SND_MAX                0x07
+#define INPUT_DEVICE_ID_FF_MAX         0x7f
+#define INPUT_DEVICE_ID_SW_MAX         0x0f
+
+#define INPUT_DEVICE_ID_MATCH_BUS      1
+#define INPUT_DEVICE_ID_MATCH_VENDOR   2
+#define INPUT_DEVICE_ID_MATCH_PRODUCT  4
+#define INPUT_DEVICE_ID_MATCH_VERSION  8
+
+#define INPUT_DEVICE_ID_MATCH_EVBIT    0x0010
+#define INPUT_DEVICE_ID_MATCH_KEYBIT   0x0020
+#define INPUT_DEVICE_ID_MATCH_RELBIT   0x0040
+#define INPUT_DEVICE_ID_MATCH_ABSBIT   0x0080
+#define INPUT_DEVICE_ID_MATCH_MSCIT    0x0100
+#define INPUT_DEVICE_ID_MATCH_LEDBIT   0x0200
+#define INPUT_DEVICE_ID_MATCH_SNDBIT   0x0400
+#define INPUT_DEVICE_ID_MATCH_FFBIT    0x0800
+#define INPUT_DEVICE_ID_MATCH_SWBIT    0x1000
+
+struct input_device_id {
+
+       kernel_ulong_t flags;
+
+       __u16 bustype;
+       __u16 vendor;
+       __u16 product;
+       __u16 version;
+
+       kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
+
+       kernel_ulong_t driver_info;
+};
+
+/* EISA */
+
+#define EISA_SIG_LEN   8
+
+/* The EISA signature, in ASCII form, null terminated */
+struct eisa_device_id {
+       char          sig[EISA_SIG_LEN];
+       kernel_ulong_t driver_data;
+};
+
+#define EISA_DEVICE_MODALIAS_FMT "eisa:s%s"
+
+struct parisc_device_id {
+       __u8    hw_type;        /* 5 bits used */
+       __u8    hversion_rev;   /* 4 bits */
+       __u16   hversion;       /* 12 bits */
+       __u32   sversion;       /* 20 bits */
+};
+
+#define PA_HWTYPE_ANY_ID       0xff
+#define PA_HVERSION_REV_ANY_ID 0xff
+#define PA_HVERSION_ANY_ID     0xffff
+#define PA_SVERSION_ANY_ID     0xffffffff
+
+/* SDIO */
+
+#define SDIO_ANY_ID (~0)
+
+struct sdio_device_id {
+       __u8    class;                  /* Standard interface or SDIO_ANY_ID */
+       __u16   vendor;                 /* Vendor or SDIO_ANY_ID */
+       __u16   device;                 /* Device ID or SDIO_ANY_ID */
+       kernel_ulong_t driver_data      /* Data private to the driver */
+               __attribute__((aligned(sizeof(kernel_ulong_t))));
+};
+
+/* SSB core, see drivers/ssb/ */
+struct ssb_device_id {
+       __u16   vendor;
+       __u16   coreid;
+       __u8    revision;
+};
+#define SSB_DEVICE(_vendor, _coreid, _revision)  \
+       { .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
+#define SSB_DEVTABLE_END  \
+       { 0, },
+
+#define SSB_ANY_VENDOR         0xFFFF
+#define SSB_ANY_ID             0xFFFF
+#define SSB_ANY_REV            0xFF
+
+struct virtio_device_id {
+       __u32 device;
+       __u32 vendor;
+};
+#define VIRTIO_DEV_ANY_ID      0xffffffff
+
+/* i2c */
+
+#define I2C_NAME_SIZE  20
+#define I2C_MODULE_PREFIX "i2c:"
+
+struct i2c_device_id {
+       char name[I2C_NAME_SIZE];
+       kernel_ulong_t driver_data      /* Data private to the driver */
+                       __attribute__((aligned(sizeof(kernel_ulong_t))));
+};
+
+
+#endif /* LINUX_MOD_DEVICETABLE_H */
scripts/mod/file2alias.c 2008-06-17 17:01:06.000000000 -0500 renamed from scripts/mod/file2alias.c 2008-06-17 16:52:31.000000000 -0500 +191 -40

385 lines not on this page · raw message

#1 lore raw

PATCH 1/9 U-boot-V2:ID: Sync mod_devicetable

Quoted 1 line · Nishanth
 include/linux/mod_devicetable.h |  382 ++++++++++++++++++++++++++++++++++++++++

This is u-boot, not linux. Please let's not introduce more of the copy-and-paste things we have around from the past.

Quoted 5 lines

+/*
+ * Device tables which are exported to userspace via
+ * scripts/mod/file2alias.c. You must keep that file in sync with this
+ * header.
+ */

U-Boot doesn't have userspace.

include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 line 13

Quoted 8 lines
include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +8 -0
+
+#ifndef LINUX_MOD_DEVICETABLE_H
+#define LINUX_MOD_DEVICETABLE_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif

No Linux, no __KERNEL__.

Quoted 1 line

+#define PCI_ANY_ID (~0)

Until now, there is no PCI support in u-boot-v2. It would be great to have it, but please let's first add PCI support and then stuff that depends on it :-)

include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 line 22

Quoted 6 lines
include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +6 -0
+struct pci_device_id {
+       __u32 vendor, device;           /* Vendor and device ID or PCI_ANY_ID*/
+       __u32 subvendor, subdevice;     /* Subsystem ID's or PCI_ANY_ID */
+       __u32 class, class_mask;        /* (class,subclass,prog-if) triplet */
+       kernel_ulong_t driver_data;     /* Data private to the driver */
+};

I assume you don't have your controller attached via pci; so before we have proper PCI support, please don't do this. It might happen that it turns out that the data model above doesn't fit u-boot's needs in the end.

Pushing in stuff just because it was there let's people assume that someone has *thought* about PCI in u-boot-v2. The net one comes and tries to use it and *bang*. And even worse, if somebody tries to really add PCI support, he will probably collide with this.

include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 line 28

Quoted 4 lines
include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +4 -0
+#define IEEE1394_MATCH_VENDOR_ID       0x0001
+#define IEEE1394_MATCH_MODEL_ID                0x0002
+#define IEEE1394_MATCH_SPECIFIER_ID    0x0004
+#define IEEE1394_MATCH_VERSION         0x0008

We also don't have 1394.

Quoted 3 lines

+ * Device table entry for "new style" table-driven USB drivers.
+ * User mode code can read these tables to choose which modules to load.
+ * Declare the table as a MODULE_DEVICE_TABLE.

Nevertheless, this "new style" model is a good idea and is worth being considered for the concept of i2c in u-boot-v2.

Quoted 3 lines

+/**
+ * struct usb_device_id - identifies USB devices for probing and hotplugging
+ * @match_flags: Bit mask controlling of the other fields are used to match

If you add header documentation, please use Doygen-style comments. U-Boot-v2 has a Doygen-generated manual which was layed out carefully, so please

a) check what the real interfaces of a subsystem are
b) document them
c) integrate them into the main manual, in a way that it is readable and can be used as an introduction for somebody who wants to start learning about the concepts.

Quoted 1 line

+/* Some useful macros to use to create struct usb_device_id */

Argh, we don't have USB in u-boot-v2 yet. Same arguments as above with PCI.

Quoted 1 line

+/* s390 CCW devices */

Although u-boot-v2 on S390 would surely be a cool idea, I assume that doesn't fit here.

include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 line 168

Quoted 4 lines
include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +4 -0
+struct acpi_device_id {
+       __u8 id[ACPI_ID_LEN];
+       kernel_ulong_t driver_data;
+};

... and there is also no ACPI support available yet.

include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 line 176

Quoted 4 lines
include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +4 -0
+struct pnp_device_id {
+       __u8 id[PNP_ID_LEN];
+       kernel_ulong_t driver_data;
+};

... and no pnp.

include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 line 208

Quoted 10 lines
include/linux/mod_devicetable.h 2008-06-17 17:01:06.000000000 -0500 renamed from dev/null 1970-01-01 00:00:00.000000000 +0000 +10 -0
+struct of_device_id {
+       char    name[32];
+       char    type[32];
+       char    compatible[128];
+#ifdef __KERNEL__
+       void    *data;
+#else
+       kernel_ulong_t data;
+#endif
+};

No of-tree support here. U-Boot has to *provide* an oftree, not to consume one.

I leave the other subsystems out that are not available yet.

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9
#2 lore raw

PATCH 1/1 U-Boot-v2: general replace __KERNEL__ with __UBOOT__

Robert,

Quoted 8 lines

-----Original Message-----
From: Robert Schwebel [mailto:r.schwebel at pengutronix.de]
Sent: Wednesday, June 18, 2008 2:02 PM
To: Menon, Nishanth
Cc: Sascha Hauer; Laurent Desnogues; Kamat, Nishant; philip.balister at gmail.com; u-boot- users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] [Patch 1/9] U-boot-V2:ID: Sync mod_devicetable

Quoted 10 lines

Review

Quoted 8 lines
(quoted diff) +8 -0
+
+#ifndef LINUX_MOD_DEVICETABLE_H
+#define LINUX_MOD_DEVICETABLE_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif

No Linux, no __KERNEL__.

Here is a patch to cleanup all other occurrences currently in u-boot v2. This is a blind replacement throughout. Do we want to consider replacing include/linux with include/u-boot?

---
 Makefile                              |    2 +-
 include/asm-arm/byteorder.h           |    2 +-
 include/asm-arm/elf.h                 |    2 +-
 include/asm-arm/io.h                  |    4 ++--
 include/asm-arm/posix_types.h         |    8 ++++----
 include/asm-arm/proc-armv/ptrace.h    |    4 ++--
 include/asm-arm/processor.h           |    2 +-
 include/asm-arm/ptrace.h              |    2 +-
 include/asm-arm/types.h               |    4 ++--
 include/asm-blackfin/bitops.h         |    2 +-
 include/asm-blackfin/byteorder.h      |    2 +-
 include/asm-blackfin/elf.h            |    2 +-
 include/asm-blackfin/page.h           |    2 +-
 include/asm-blackfin/posix_types.h    |   10 +++++-----
 include/asm-blackfin/ptrace.h         |    2 +-
 include/asm-blackfin/setup.h          |    2 +-
 include/asm-blackfin/types.h          |    2 +-
 include/asm-m68k/byteorder.h          |    2 +-
 include/asm-m68k/elf.h                |    2 +-
 include/asm-m68k/io.h                 |    4 ++--
 include/asm-m68k/posix_types.h        |    8 ++++----
 include/asm-m68k/proc-mcfv4e/ptrace.h |    4 ++--
 include/asm-m68k/ptrace.h             |    2 +-
 include/asm-m68k/setup.h              |    8 ++++----
 include/asm-m68k/types.h              |    4 ++--
 include/asm-ppc/bitops.h              |    8 ++++----
 include/asm-ppc/cache.h               |    2 +-
 include/asm-ppc/elf.h                 |    8 ++++----
 include/asm-ppc/io.h                  |    3 ++-
 include/asm-ppc/posix_types.h         |    4 ++--
 include/asm-ppc/ptrace.h              |    2 +-
 include/asm-ppc/signal.h              |    4 ++--
 include/asm-ppc/types.h               |    4 ++--
 include/asm-sandbox/posix_types.h     |   10 +++++-----
 include/asm-sandbox/types.h           |    4 ++--
 include/cramfs/cramfs_fs.h            |    6 +++---
 include/envfs.h                       |    6 +++---
 include/linux/byteorder/generic.h     |    6 +++---
 include/linux/byteorder/swab.h        |    2 +-
 include/linux/types.h                 |    4 ++--
 40 files changed, 81 insertions(+), 80 deletions(-)
Makefile 2008-06-18 22:34:41.000000000 -0500 renamed from Makefile 2008-06-18 22:34:23.000000000 -0500 +1 -1
Index: u-boot-v2.git/Makefile
===================================================================
@@ -305,7 +305,7 @@
                    $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
                   -include include/linux/autoconf.h
 
-CPPFLAGS        := -D__KERNEL__ -D__U_BOOT__ $(LINUXINCLUDE) -fno-builtin -ffreestanding
+CPPFLAGS        := -D__U_BOOT__ $(LINUXINCLUDE) -fno-builtin -ffreestanding
 
 CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                    -fno-strict-aliasing -fno-common -Os -pipe
include/asm-arm/byteorder.h 2008-06-18 22:32:43.000000000 -0500 renamed from include/asm-arm/byteorder.h 2008-06-18 22:32:41.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-arm/byteorder.h
===================================================================
@@ -18,7 +18,7 @@
 
 #include <asm/types.h>
 
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#if !defined(__STRICT_ANSI__) || defined(__U_BOOT__)
 #  define __BYTEORDER_HAS_U64__
 #  define __SWAB_64_THRU_32__
 #endif
include/asm-arm/elf.h 2008-06-18 22:32:54.000000000 -0500 renamed from include/asm-arm/elf.h 2008-06-18 22:32:53.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-arm/elf.h
===================================================================
@@ -41,7 +41,7 @@
 #endif
 #define ELF_ARCH       EM_ARM
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 #ifndef __ASSEMBLY__
 /*
  * This yields a string that ld.so will use to load implementation
include/asm-arm/io.h 2008-06-18 22:32:48.000000000 -0500 renamed from include/asm-arm/io.h 2008-06-18 22:32:45.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-arm/io.h
===================================================================
@@ -20,7 +20,7 @@
 #ifndef __ASM_ARM_IO_H
 #define __ASM_ARM_IO_H
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #include <linux/types.h>
 #include <asm/byteorder.h>
@@ -297,5 +297,5 @@
 #define isa_check_signature(io,sig,len)        (0)
 
 #endif /* __mem_isa */
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 #endif /* __ASM_ARM_IO_H */
include/asm-arm/posix_types.h 2008-06-18 22:32:33.000000000 -0500 renamed from include/asm-arm/posix_types.h 2008-06-18 22:32:32.000000000 -0500 +4 -4
Index: u-boot-v2.git/include/asm-arm/posix_types.h
===================================================================
@@ -49,14 +49,14 @@
 #endif
 
 typedef struct {
-#if defined(__KERNEL__) || defined(__USE_ALL)
+#if defined(__U_BOOT__) || defined(__USE_ALL)
        int     val[2];
-#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#else /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
        int     __val[2];
-#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#endif /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
 } __kernel_fsid_t;
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
 
 #undef __FD_SET
 #define __FD_SET(fd, fdsetp) \
include/asm-arm/proc-armv/ptrace.h 2008-06-18 22:32:29.000000000 -0500 renamed from include/asm-arm/proc-armv/ptrace.h 2008-06-18 22:32:28.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-arm/proc-armv/ptrace.h
===================================================================
@@ -59,7 +59,7 @@
 #define ARM_r0         uregs[0]
 #define ARM_ORIG_r0    uregs[17]
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #define user_mode(regs)        \
        (((regs)->ARM_cpsr & 0xf) == 0)
@@ -100,7 +100,7 @@
        return 0;
 }
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 #endif /* __ASSEMBLY__ */
 
include/asm-arm/processor.h 2008-06-18 22:32:41.000000000 -0500 renamed from include/asm-arm/processor.h 2008-06-18 22:32:40.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-arm/processor.h
===================================================================
@@ -34,7 +34,7 @@
 
 typedef unsigned long mm_segment_t;            /* domain register      */
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #define EISA_bus 0
 #define MCA_bus 0
include/asm-arm/ptrace.h 2008-06-18 22:32:45.000000000 -0500 renamed from include/asm-arm/ptrace.h 2008-06-18 22:32:44.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-arm/ptrace.h
===================================================================
@@ -20,7 +20,7 @@
 #define instruction_pointer(regs) \
        (pc_pointer((regs)->ARM_pc))
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 extern void show_regs(struct pt_regs *);
 
 #define predicate(x)   (x & 0xf0000000)
include/asm-arm/types.h 2008-06-18 22:32:24.000000000 -0500 renamed from include/asm-arm/types.h 2008-06-18 22:32:21.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-arm/types.h
===================================================================
@@ -29,7 +29,7 @@
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #define BITS_PER_LONG 32
 
@@ -54,6 +54,6 @@
 
 #endif /* __ASSEMBLY__ */
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 #endif
include/asm-blackfin/bitops.h 2008-06-18 22:33:23.000000000 -0500 renamed from include/asm-blackfin/bitops.h 2008-06-18 22:33:22.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-blackfin/bitops.h
===================================================================
@@ -32,7 +32,7 @@
 #include <asm/byteorder.h>
 #include <asm/system.h>
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 /*
  * Function prototypes to keep gcc -Wall happy
  */
include/asm-blackfin/byteorder.h 2008-06-18 22:33:22.000000000 -0500 renamed from include/asm-blackfin/byteorder.h 2008-06-18 22:33:21.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-blackfin/byteorder.h
===================================================================
@@ -30,7 +30,7 @@
 
 #include <asm/types.h>
 
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__U_BOOT__)
 #  define __BYTEORDER_HAS_U64__
 #  define __SWAB_64_THRU_32__
 #endif
include/asm-blackfin/elf.h 2008-06-18 22:33:26.000000000 -0500 renamed from include/asm-blackfin/elf.h 2008-06-18 22:33:25.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-blackfin/elf.h
===================================================================
@@ -120,7 +120,7 @@
 
 #define ELF_PLATFORM  (NULL)
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
 #endif
 
include/asm-blackfin/page.h 2008-06-18 22:33:19.000000000 -0500 renamed from include/asm-blackfin/page.h 2008-06-18 22:33:18.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-blackfin/page.h
===================================================================
@@ -31,7 +31,7 @@
 #define PAGE_SIZE                      (4096)
 #define PAGE_MASK                      (~(PAGE_SIZE-1))
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #include <asm/setup.h>
 
include/asm-blackfin/posix_types.h 2008-06-18 22:49:15.000000000 -0500 renamed from include/asm-blackfin/posix_types.h 2008-06-18 22:33:03.000000000 -0500 +5 -5
Index: u-boot-v2.git/include/asm-blackfin/posix_types.h
===================================================================
@@ -64,14 +64,14 @@
 #endif
 
 typedef struct {
-#if defined(__KERNEL__) || defined(__USE_ALL)
+#if defined(__U_BOOT__) || defined(__USE_ALL)
        int val[2];
-#else                          /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#else                  /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
        int __val[2];
-#endif                         /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#endif                 /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
 } __kernel_fsid_t;
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
 
 #undef __FD_SET
 #define        __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
@@ -85,6 +85,6 @@
 #undef __FD_ZERO
 #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
 
-#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
+#endif /* defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
 
 #endif
include/asm-blackfin/ptrace.h 2008-06-18 22:33:24.000000000 -0500 renamed from include/asm-blackfin/ptrace.h 2008-06-18 22:33:24.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-blackfin/ptrace.h
===================================================================
@@ -246,7 +246,7 @@
 #define PTRACE_GETREGS         12
 #define PTRACE_SETREGS         13      /* ptrace signal */
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #ifndef PS_S
 #define PS_S                   (0x0c00)
include/asm-blackfin/setup.h 2008-06-18 22:33:20.000000000 -0500 renamed from include/asm-blackfin/setup.h 2008-06-18 22:33:19.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-blackfin/setup.h
===================================================================
@@ -35,7 +35,7 @@
 
 #define MACH_BFIN      1
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #ifndef __ASSEMBLY__
 extern unsigned long blackfin_machtype;
include/asm-blackfin/types.h 2008-06-18 22:33:03.000000000 -0500 renamed from include/asm-blackfin/types.h 2008-06-18 22:33:02.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-blackfin/types.h
===================================================================
@@ -59,7 +59,7 @@
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 typedef signed char s8;
 typedef unsigned char u8;
include/asm-m68k/byteorder.h 2008-06-18 22:34:16.000000000 -0500 renamed from include/asm-m68k/byteorder.h 2008-06-18 22:34:16.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-m68k/byteorder.h
===================================================================
@@ -34,7 +34,7 @@
 
 #include <asm/types.h>
 
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#if !defined(__STRICT_ANSI__) || defined(__U_BOOT__)
 #  define __BYTEORDER_HAS_U64__
 #  define __SWAB_64_THRU_32__
 #endif
include/asm-m68k/elf.h 2008-06-18 22:34:23.000000000 -0500 renamed from include/asm-m68k/elf.h 2008-06-18 22:34:22.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-m68k/elf.h
===================================================================
@@ -139,7 +139,7 @@
 
 #define ELF_PLATFORM  (NULL)
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
 #endif
 
include/asm-m68k/io.h 2008-06-18 22:34:20.000000000 -0500 renamed from include/asm-m68k/io.h 2008-06-18 22:34:19.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-m68k/io.h
===================================================================
@@ -26,7 +26,7 @@
 #ifndef __ASM_M68K_IO_H
 #define __ASM_M68K_IO_H
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #include <linux/types.h>
 #include <asm/byteorder.h>
@@ -300,5 +300,5 @@
 #define isa_check_signature(io,sig,len)        (0)
 
 #endif /* __mem_isa */
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 #endif /* __ASM_M68K_IO_H */
include/asm-m68k/posix_types.h 2008-06-18 22:33:55.000000000 -0500 renamed from include/asm-m68k/posix_types.h 2008-06-18 22:33:54.000000000 -0500 +4 -4
Index: u-boot-v2.git/include/asm-m68k/posix_types.h
===================================================================
@@ -57,14 +57,14 @@
 #endif
 
 typedef struct {
-#if defined(__KERNEL__) || defined(__USE_ALL)
+#if defined(__U_BOOT__) || defined(__USE_ALL)
        int     val[2];
-#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#else /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
        int     __val[2];
-#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#endif /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
 } __kernel_fsid_t;
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
 
 #undef __FD_SET
 #define __FD_SET(fd, fdsetp) \
include/asm-m68k/proc-mcfv4e/ptrace.h 2008-06-18 22:34:04.000000000 -0500 renamed from include/asm-m68k/proc-mcfv4e/ptrace.h 2008-06-18 22:34:03.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-m68k/proc-mcfv4e/ptrace.h
===================================================================
@@ -81,7 +81,7 @@
 #define M68K_d0    uregs[ 0]
 
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #define user_mode(regs)        \
        (((regs)->M68K_sr & SVR_MODE) == 0)
@@ -112,7 +112,7 @@
        return 0;
 }
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 #endif /* __ASSEMBLY__ */
 
include/asm-m68k/ptrace.h 2008-06-18 22:34:18.000000000 -0500 renamed from include/asm-m68k/ptrace.h 2008-06-18 22:34:17.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-m68k/ptrace.h
===================================================================
@@ -46,7 +46,7 @@
 #define instruction_pointer(regs) ((regs)->M68K_pc)
 #define profile_pc(regs)          instruction_pointer(regs)
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 extern void show_regs(struct pt_regs *);
 #endif
 
include/asm-m68k/setup.h 2008-06-18 22:34:08.000000000 -0500 renamed from include/asm-m68k/setup.h 2008-06-18 22:34:07.000000000 -0500 +4 -4
Index: u-boot-v2.git/include/asm-m68k/setup.h
===================================================================
@@ -45,7 +45,7 @@
     /* ColdFire boards */
 #define MACH_FIRE_ENGINE   12
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #ifndef __ASSEMBLY__
 extern unsigned long m68k_machtype;
@@ -205,7 +205,7 @@
 #  define MACH_TYPE (m68k_machtype)
 #endif
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 
     /*
@@ -261,7 +261,7 @@
 #define MMU_APOLLO     (1<<MMUB_APOLLO)
 #define MMU_CFV4E      (1<<MMUB_CFV4E)
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #ifndef __ASSEMBLY__
 extern unsigned long m68k_cputype;
@@ -407,6 +407,6 @@
 #define  CHIP_RESTORE_DIRECTIVE  .chip 68k
 #endif
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 #endif /* _M68K_SETUP_H */
include/asm-m68k/types.h 2008-06-18 22:33:51.000000000 -0500 renamed from include/asm-m68k/types.h 2008-06-18 22:33:50.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-m68k/types.h
===================================================================
@@ -52,7 +52,7 @@
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #define BITS_PER_LONG 32
 
@@ -77,6 +77,6 @@
 
 #endif /* __ASSEMBLY__ */
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 #endif
include/asm-ppc/bitops.h 2008-06-18 22:31:53.000000000 -0500 renamed from include/asm-ppc/bitops.h 2008-06-18 22:31:52.000000000 -0500 +4 -4
Index: u-boot-v2.git/include/asm-ppc/bitops.h
===================================================================
@@ -166,7 +166,7 @@
        return __ilog2(x & -x);
 }
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 /*
  * ffs: find first bit set. This is defined the same way as
@@ -187,7 +187,7 @@
 #define hweight16(x) generic_hweight16(x)
 #define hweight8(x) generic_hweight8(x)
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 /*
  * This implementation of find_{first,next}_zero_bit was stolen from
@@ -235,7 +235,7 @@
 
 #define _EXT2_HAVE_ASM_BITOPS_
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 /*
  * test_and_{set,clear}_bit guarantee atomicity without
  * disabling interrupts.
@@ -269,7 +269,7 @@
        *ADDR = *ADDR & ~mask;
        return oldbit;
 }
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 extern __inline__ int ext2_test_bit(int nr, __const__ void * addr)
 {
include/asm-ppc/cache.h 2008-06-18 22:32:04.000000000 -0500 renamed from include/asm-ppc/cache.h 2008-06-18 22:32:03.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-ppc/cache.h
===================================================================
@@ -30,7 +30,7 @@
                 __section__(".data.cacheline_aligned")))
 #endif
 
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
+#if defined(__U_BOOT__) && !defined(__ASSEMBLY__)
 extern void flush_dcache_range(unsigned long start, unsigned long stop);
 extern void clean_dcache_range(unsigned long start, unsigned long stop);
 extern void invalidate_dcache_range(unsigned long start, unsigned long stop);
include/asm-ppc/elf.h 2008-06-18 22:32:15.000000000 -0500 renamed from include/asm-ppc/elf.h 2008-06-18 22:32:14.000000000 -0500 +4 -4
Index: u-boot-v2.git/include/asm-ppc/elf.h
===================================================================
@@ -153,7 +153,7 @@
 #endif
 #endif
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 /*
  * This is used to ensure we don't load something for the wrong architecture.
  */
@@ -196,7 +196,7 @@
 
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 /* ELF_HWCAP yields a mask that user programs can use to figure out what
    instruction set this cpu supports.  This could be done in userspace,
@@ -215,7 +215,7 @@
 } while (0)
 #endif /* __powerpc64__ */
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 #ifdef __powerpc64__
 # define SET_PERSONALITY(ex, ibcs2)                            \
@@ -244,7 +244,7 @@
 # define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
 #endif /* __powerpc64__ */
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 extern int dcache_bsize;
 extern int icache_bsize;
include/asm-ppc/io.h 2008-06-18 22:49:46.000000000 -0500 renamed from include/asm-ppc/io.h 2008-06-18 22:32:12.000000000 -0500 +2 -1
Index: u-boot-v2.git/include/asm-ppc/io.h
===================================================================
@@ -1,6 +1,7 @@
 /* originally from linux source.
  * removed the dependencies on CONFIG_ values
- * removed virt_to_phys stuff (and in fact everything surrounded by #if __KERNEL__)
+ * removed virt_to_phys stuff (and in fact everything surrounded by
+ * #if __U_BOOT__)
  * Modified By Rob Taylor, Flying Pig Systems, 2000
  */
 
include/asm-ppc/posix_types.h 2008-06-18 22:31:50.000000000 -0500 renamed from include/asm-ppc/posix_types.h 2008-06-18 22:31:48.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-ppc/posix_types.h
===================================================================
@@ -50,7 +50,7 @@
 
 #else /* __GNUC__ */
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) \
+#if defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2) \
     || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
 /* With GNU C, use inline functions instead so args are evaluated only once: */
 
@@ -104,6 +104,6 @@
        }
 }
 
-#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
+#endif /* defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
 #endif /* __GNUC__ */
 #endif /* _PPC_POSIX_TYPES_H */
include/asm-ppc/ptrace.h 2008-06-18 22:32:07.000000000 -0500 renamed from include/asm-ppc/ptrace.h 2008-06-18 22:32:04.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/asm-ppc/ptrace.h
===================================================================
@@ -90,7 +90,7 @@
 
 #define PT_NIP 32
 #define PT_MSR 33
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 #define PT_ORIG_R3 34
 #endif
 #define PT_CTR 35
include/asm-ppc/signal.h 2008-06-18 22:32:09.000000000 -0500 renamed from include/asm-ppc/signal.h 2008-06-18 22:32:08.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-ppc/signal.h
===================================================================
@@ -97,7 +97,7 @@
 
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 /*
  * These values of sa_flags are used only by the kernel as part of the
@@ -146,7 +146,7 @@
        size_t ss_size;
 } stack_t;
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 #include <asm/sigcontext.h>
 
 #endif
include/asm-ppc/types.h 2008-06-18 22:31:47.000000000 -0500 renamed from include/asm-ppc/types.h 2008-06-18 22:31:46.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-ppc/types.h
===================================================================
@@ -23,7 +23,7 @@
        __u32 u[4];
 } __attribute((aligned(16))) vector128;
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
@@ -44,7 +44,7 @@
 /* DMA addresses are 32-bits wide */
 typedef u32 dma_addr_t;
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 #endif /* __ASSEMBLY__ */
 
 #endif
include/asm-sandbox/posix_types.h 2008-06-18 22:31:33.000000000 -0500 renamed from include/asm-sandbox/posix_types.h 2008-06-18 22:31:29.000000000 -0500 +5 -5
Index: u-boot-v2.git/include/asm-sandbox/posix_types.h
===================================================================
@@ -37,14 +37,14 @@
 #endif
 
 typedef struct {
-#if defined(__KERNEL__) || defined(__USE_ALL)
+#if defined(__U_BOOT__) || defined(__USE_ALL)
        int     val[2];
-#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#else /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
        int     __val[2];
-#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+#endif /* !defined(__U_BOOT__) && !defined(__USE_ALL) */
 } __kernel_fsid_t;
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
 
 #undef __FD_SET
 #define __FD_SET(fd,fdsetp) \
@@ -75,6 +75,6 @@
                        "2" ((__kernel_fd_set *) (fdsetp)) : "memory"); \
 } while (0)
 
-#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
+#endif /* defined(__U_BOOT__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
 
 #endif
include/asm-sandbox/types.h 2008-06-18 22:31:15.000000000 -0500 renamed from include/asm-sandbox/types.h 2008-06-18 22:30:03.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/asm-sandbox/types.h
===================================================================
@@ -33,7 +33,7 @@
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 
 typedef signed char s8;
 typedef unsigned char u8;
@@ -53,6 +53,6 @@
 
 typedef u32 dma_addr_t;
 
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 #endif
include/cramfs/cramfs_fs.h 2008-06-18 22:32:57.000000000 -0500 renamed from include/cramfs/cramfs_fs.h 2008-06-18 22:32:54.000000000 -0500 +3 -3
Index: u-boot-v2.git/include/cramfs/cramfs_fs.h
===================================================================
@@ -97,15 +97,15 @@
 #define CRAMFS_SET_OFFSET(x,y) ((x)->offset = (y))
 #define CRAMFS_SET_NAMELEN(x,y) ((x)->namelen = (y))
 #elif defined __BIG_ENDIAN
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 #define CRAMFS_16(x)   swab16(x)
 #define CRAMFS_24(x)   ((swab32(x)) >> 8)
 #define CRAMFS_32(x)   swab32(x)
-#else /* not __KERNEL__ */
+#else /* not __U_BOOT__ */
 #define CRAMFS_16(x)   bswap_16(x)
 #define CRAMFS_24(x)   ((bswap_32(x)) >> 8)
 #define CRAMFS_32(x)   bswap_32(x)
-#endif /* not __KERNEL__ */
+#endif /* not __U_BOOT__ */
 #define CRAMFS_GET_NAMELEN(x)  (((u8*)(x))[8] & 0x3f)
 #define CRAMFS_GET_OFFSET(x)   ((CRAMFS_24(((u32*)(x))[2] & 0xffffff) << 2) |\
                                 ((((u32*)(x))[2] & 0xc0000000) >> 30))
include/envfs.h 2008-06-18 22:33:27.000000000 -0500 renamed from include/envfs.h 2008-06-18 22:33:27.000000000 -0500 +3 -3
Index: u-boot-v2.git/include/envfs.h
===================================================================
@@ -47,15 +47,15 @@
 #define ENVFS_SET_NAMELEN(x,y) ((x)->namelen = (y))
 #elif __BYTE_ORDER == __BIG_ENDIAN
 #warning "envfs compiled on big endian host"
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 #define ENVFS_16(x)    swab16(x)
 #define ENVFS_24(x)    ((swab32(x)) >> 8)
 #define ENVFS_32(x)    swab32(x)
-#else /* not __KERNEL__ */
+#else /* not __U_BOOT__ */
 #define ENVFS_16(x)    bswap_16(x)
 #define ENVFS_24(x)    ((bswap_32(x)) >> 8)
 #define ENVFS_32(x)    bswap_32(x)
-#endif /* not __KERNEL__ */
+#endif /* not __U_BOOT__ */
 #define ENVFS_GET_NAMELEN(x) ENVFS_32(((x)->namelen))
 #define ENVFS_GET_OFFSET(x)    ENVFS_32(((x)->offset))
 #define ENVFS_SET_NAMELEN(x,y)((x)->offset = ENVFS_32((y)))
include/linux/byteorder/generic.h 2008-06-18 22:50:28.000000000 -0500 renamed from include/linux/byteorder/generic.h 2008-06-18 22:33:44.000000000 -0500 +3 -3
Index: u-boot-v2.git/include/linux/byteorder/generic.h
===================================================================
@@ -79,7 +79,7 @@
  */
 
 
-#if defined(__KERNEL__)
+#if defined(__U_BOOT__)
 /*
  * inside the kernel, we can use nicknames;
  * outside of it, we must avoid POSIX namespace pollution...
@@ -146,7 +146,7 @@
  * Do the prototypes. Somebody might want to take the
  * address or some such sick thing..
  */
-#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2)
+#if defined(__U_BOOT__) || (defined(__GLIBC__) && __GLIBC__ >= 2)
 extern __u32                   ntohl(__u32);
 extern __u32                   htonl(__u32);
 #else
@@ -164,7 +164,7 @@
 #define ___ntohl(x) __be32_to_cpu(x)
 #define ___ntohs(x) __be16_to_cpu(x)
 
-#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2)
+#if defined(__U_BOOT__) || (defined (__GLIBC__) && __GLIBC__ >= 2)
 #define htonl(x) ___htonl(x)
 #define ntohl(x) ___ntohl(x)
 #else
include/linux/byteorder/swab.h 2008-06-18 22:33:43.000000000 -0500 renamed from include/linux/byteorder/swab.h 2008-06-18 22:33:42.000000000 -0500 +1 -1
Index: u-boot-v2.git/include/linux/byteorder/swab.h
===================================================================
@@ -143,7 +143,7 @@
 }
 #endif /* __BYTEORDER_HAS_U64__ */
 
-#if defined(__KERNEL__)
+#if defined(__U_BOOT__)
 #define swab16 __swab16
 #define swab32 __swab32
 #define swab64 __swab64
include/linux/types.h 2008-06-18 22:33:35.000000000 -0500 renamed from include/linux/types.h 2008-06-18 22:33:32.000000000 -0500 +2 -2
Index: u-boot-v2.git/include/linux/types.h
===================================================================
@@ -17,7 +17,7 @@
 typedef __kernel_key_t         key_t;
 typedef __kernel_suseconds_t   suseconds_t;
 
-#ifdef __KERNEL__
+#ifdef __U_BOOT__
 typedef __kernel_uid32_t       uid_t;
 typedef __kernel_gid32_t       gid_t;
 typedef __kernel_uid16_t        uid16_t;
@@ -35,7 +35,7 @@
 #else
 typedef __kernel_uid_t         uid_t;
 typedef __kernel_gid_t         gid_t;
-#endif /* __KERNEL__ */
+#endif /* __U_BOOT__ */
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 typedef __kernel_loff_t                loff_t;
#3 lore raw

PATCH 1/1 U-Boot-v2: general replace __KERNEL__ with __UBOOT__

Quoted 18 lines · Nishanth

Robert,

Quoted 17 lines

-----Original Message-----
From: Robert Schwebel [mailto:r.schwebel at pengutronix.de]
Sent: Wednesday, June 18, 2008 2:02 PM
To: Menon, Nishanth
Cc: Sascha Hauer; Laurent Desnogues; Kamat, Nishant; philip.balister at gmail.com; u-boot- users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] [Patch 1/9] U-boot-V2:ID: Sync mod_devicetable

Review

Quoted 8 lines
(quoted diff) +8 -0
+
+#ifndef LINUX_MOD_DEVICETABLE_H
+#define LINUX_MOD_DEVICETABLE_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif

No Linux, no __KERNEL__.

All the above crap should appear below the following "---" line.

Quoted 1 line

Here is a patch to cleanup all other occurrences currently in u-boot v2. This is a blind replacement throughout. Do we want to consider replacing include/linux with include/u-boot?

That should be line-length-limited to about 70 characters. The question should appear below the "---" line too.

And I'd suggest that, if we go this route as a whole, then then the include directory should be renamed as well.

Quoted 3 lines

---

Here.

jdl

#4 lore raw

PATCH 1/1 U-Boot-v2: general replace __KERNEL__ with __UBOOT__

Jon,

Quoted 9 lines

-----Original Message-----
From: Jon Loeliger [mailto:jdl at freescale.com]
Sent: Thursday, June 19, 2008 7:54 AM
To: Menon, Nishanth
Cc: Robert Schwebel; Laurent Desnogues; Kamat, Nishant; philip.balister at gmail.com; u-boot- users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] [Patch] U-Boot-v2: general replace __KERNEL__ with __UBOOT__

All the above crap should appear below the following "---" line.

Message taken -> it I manage to get outlook to behave sane.
http://www.denx.de/wiki/UBoot/Patches
I get patches to not linewrap I loose out on mail contents being over 70! But yeah I will manually correct them (added to my checklist).

Quoted 2 lines

That should be line-length-limited to about 70 characters. The question should appear below the "---" line too.

Not a bad thing to add to the wiki. Newbies like me get guided. Thanks :)

Quoted 3 lines

And I'd suggest that, if we go this route as a whole, then then the include directory should be renamed as well.

That is just a start. I think we need to go all the way, replace occurances of kernel with u_boot and KERNEL usage.

Regards,
Nishanth Menon

#5 lore raw

PATCH 1/1 U-Boot-v2: general replace __KERNEL__ with __UBOOT__

Quoted 4 lines · In message <[email protected]> you…
Quoted 3 lines

That should be line-length-limited to about 70 characters. The question should appear below the "---" line too.

Not a bad thing to add to the wiki. Newbies like me get guided. Thanks :)

Good. Feel free to add it. It's a wiki.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every time history repeats itself the price goes up.