diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 23:01:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 23:01:36 -0400 |
| commit | d10902812c9cd5583130a4ebb9ad19c60b68149d (patch) | |
| tree | b1b28587970e8cebf74ba4d61edf49537f619ab7 /include/linux | |
| parent | 181f977d134a9f8e3f8839f42af655b045fc059e (diff) | |
| parent | 25874a299ef8037df03ce4ada570bc4e42f9748f (diff) | |
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (27 commits)
x86: Clean up apic.c and apic.h
x86: Remove superflous goal definition of tsc_sync
x86: dt: Correct local apic documentation in device tree bindings
x86: dt: Cleanup local apic setup
x86: dt: Fix OLPC=y/INTEL_CE=n build
rtc: cmos: Add OF bindings
x86: ce4100: Use OF to setup devices
x86: ioapic: Add OF bindings for IO_APIC
x86: dtb: Add generic bus probe
x86: dtb: Add support for PCI devices backed by dtb nodes
x86: dtb: Add device tree support for HPET
x86: dtb: Add early parsing of IO_APIC
x86: dtb: Add irq domain abstraction
x86: dtb: Add a device tree for CE4100
x86: Add device tree support
x86: e820: Remove conditional early mapping in parse_e820_ext
x86: OLPC: Make OLPC=n build again
x86: OLPC: Remove extra OLPC_OPENFIRMWARE_DT indirection
x86: OLPC: Cleanup config maze completely
x86: OLPC: Hide OLPC_OPENFIRMWARE config switch
...
Fix up conflicts in arch/x86/platform/ce4100/ce4100.c
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 7 | ||||
| -rw-r--r-- | include/linux/i2c.h | 2 | ||||
| -rw-r--r-- | include/linux/of.h | 16 | ||||
| -rw-r--r-- | include/linux/of_pci.h | 9 |
4 files changed, 25 insertions, 9 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 1bf5cf0b4513..ca5d25225aab 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -128,9 +128,7 @@ struct device_driver { | |||
| 128 | 128 | ||
| 129 | bool suppress_bind_attrs; /* disables bind/unbind via sysfs */ | 129 | bool suppress_bind_attrs; /* disables bind/unbind via sysfs */ |
| 130 | 130 | ||
| 131 | #if defined(CONFIG_OF) | ||
| 132 | const struct of_device_id *of_match_table; | 131 | const struct of_device_id *of_match_table; |
| 133 | #endif | ||
| 134 | 132 | ||
| 135 | int (*probe) (struct device *dev); | 133 | int (*probe) (struct device *dev); |
| 136 | int (*remove) (struct device *dev); | 134 | int (*remove) (struct device *dev); |
| @@ -441,9 +439,8 @@ struct device { | |||
| 441 | override */ | 439 | override */ |
| 442 | /* arch specific additions */ | 440 | /* arch specific additions */ |
| 443 | struct dev_archdata archdata; | 441 | struct dev_archdata archdata; |
| 444 | #ifdef CONFIG_OF | 442 | |
| 445 | struct device_node *of_node; | 443 | struct device_node *of_node; /* associated device tree node */ |
| 446 | #endif | ||
| 447 | 444 | ||
| 448 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 445 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
| 449 | 446 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 903576df88dc..06a8d9c7de98 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -258,9 +258,7 @@ struct i2c_board_info { | |||
| 258 | unsigned short addr; | 258 | unsigned short addr; |
| 259 | void *platform_data; | 259 | void *platform_data; |
| 260 | struct dev_archdata *archdata; | 260 | struct dev_archdata *archdata; |
| 261 | #ifdef CONFIG_OF | ||
| 262 | struct device_node *of_node; | 261 | struct device_node *of_node; |
| 263 | #endif | ||
| 264 | int irq; | 262 | int irq; |
| 265 | }; | 263 | }; |
| 266 | 264 | ||
diff --git a/include/linux/of.h b/include/linux/of.h index cad7cf0ab278..266db1d0baa9 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | 23 | ||
| 24 | #include <asm/byteorder.h> | 24 | #include <asm/byteorder.h> |
| 25 | 25 | ||
| 26 | #ifdef CONFIG_OF | ||
| 27 | |||
| 28 | typedef u32 phandle; | 26 | typedef u32 phandle; |
| 29 | typedef u32 ihandle; | 27 | typedef u32 ihandle; |
| 30 | 28 | ||
| @@ -65,11 +63,18 @@ struct device_node { | |||
| 65 | #endif | 63 | #endif |
| 66 | }; | 64 | }; |
| 67 | 65 | ||
| 66 | #ifdef CONFIG_OF | ||
| 67 | |||
| 68 | /* Pointer for first entry in chain of all nodes. */ | 68 | /* Pointer for first entry in chain of all nodes. */ |
| 69 | extern struct device_node *allnodes; | 69 | extern struct device_node *allnodes; |
| 70 | extern struct device_node *of_chosen; | 70 | extern struct device_node *of_chosen; |
| 71 | extern rwlock_t devtree_lock; | 71 | extern rwlock_t devtree_lock; |
| 72 | 72 | ||
| 73 | static inline bool of_have_populated_dt(void) | ||
| 74 | { | ||
| 75 | return allnodes != NULL; | ||
| 76 | } | ||
| 77 | |||
| 73 | static inline bool of_node_is_root(const struct device_node *node) | 78 | static inline bool of_node_is_root(const struct device_node *node) |
| 74 | { | 79 | { |
| 75 | return node && (node->parent == NULL); | 80 | return node && (node->parent == NULL); |
| @@ -222,5 +227,12 @@ extern void of_attach_node(struct device_node *); | |||
| 222 | extern void of_detach_node(struct device_node *); | 227 | extern void of_detach_node(struct device_node *); |
| 223 | #endif | 228 | #endif |
| 224 | 229 | ||
| 230 | #else | ||
| 231 | |||
| 232 | static inline bool of_have_populated_dt(void) | ||
| 233 | { | ||
| 234 | return false; | ||
| 235 | } | ||
| 236 | |||
| 225 | #endif /* CONFIG_OF */ | 237 | #endif /* CONFIG_OF */ |
| 226 | #endif /* _LINUX_OF_H */ | 238 | #endif /* _LINUX_OF_H */ |
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h new file mode 100644 index 000000000000..85a27b650d76 --- /dev/null +++ b/include/linux/of_pci.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #ifndef __OF_PCI_H | ||
| 2 | #define __OF_PCI_H | ||
| 3 | |||
| 4 | #include <linux/pci.h> | ||
| 5 | |||
| 6 | struct pci_dev; | ||
| 7 | struct of_irq; | ||
| 8 | int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); | ||
| 9 | #endif | ||
