aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/cputable.h3
-rw-r--r--include/asm-powerpc/ibmebus.h38
-rw-r--r--include/asm-powerpc/of_device.h4
-rw-r--r--include/asm-ppc/mpc52xx_psc.h10
-rw-r--r--include/linux/of_device.h5
5 files changed, 26 insertions, 34 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index ae093ef68363..9d74338e3dec 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -165,6 +165,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start,
165#define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000) 165#define CPU_FTR_SPURR LONG_ASM_CONST(0x0001000000000000)
166#define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000) 166#define CPU_FTR_DSCR LONG_ASM_CONST(0x0002000000000000)
167#define CPU_FTR_1T_SEGMENT LONG_ASM_CONST(0x0004000000000000) 167#define CPU_FTR_1T_SEGMENT LONG_ASM_CONST(0x0004000000000000)
168#define CPU_FTR_NO_SLBIE_B LONG_ASM_CONST(0x0008000000000000)
168 169
169#ifndef __ASSEMBLY__ 170#ifndef __ASSEMBLY__
170 171
@@ -367,7 +368,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start,
367#define CPU_FTRS_PA6T (CPU_FTR_USE_TB | \ 368#define CPU_FTRS_PA6T (CPU_FTR_USE_TB | \
368 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ 369 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \
369 CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \ 370 CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \
370 CPU_FTR_PURR | CPU_FTR_REAL_LE) 371 CPU_FTR_PURR | CPU_FTR_REAL_LE | CPU_FTR_NO_SLBIE_B)
371#define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | \ 372#define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | \
372 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2) 373 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2)
373 374
diff --git a/include/asm-powerpc/ibmebus.h b/include/asm-powerpc/ibmebus.h
index 87d396e28db2..1a9d9aea21fa 100644
--- a/include/asm-powerpc/ibmebus.h
+++ b/include/asm-powerpc/ibmebus.h
@@ -43,42 +43,18 @@
43#include <linux/device.h> 43#include <linux/device.h>
44#include <linux/interrupt.h> 44#include <linux/interrupt.h>
45#include <linux/mod_devicetable.h> 45#include <linux/mod_devicetable.h>
46#include <asm/of_device.h> 46#include <linux/of_device.h>
47#include <linux/of_platform.h>
47 48
48extern struct bus_type ibmebus_bus_type; 49extern struct bus_type ibmebus_bus_type;
49 50
50struct ibmebus_dev { 51int ibmebus_register_driver(struct of_platform_driver *drv);
51 struct of_device ofdev; 52void ibmebus_unregister_driver(struct of_platform_driver *drv);
52};
53 53
54struct ibmebus_driver { 54int ibmebus_request_irq(u32 ist, irq_handler_t handler,
55 char *name; 55 unsigned long irq_flags, const char *devname,
56 struct of_device_id *id_table;
57 int (*probe) (struct ibmebus_dev *dev, const struct of_device_id *id);
58 int (*remove) (struct ibmebus_dev *dev);
59 struct device_driver driver;
60};
61
62int ibmebus_register_driver(struct ibmebus_driver *drv);
63void ibmebus_unregister_driver(struct ibmebus_driver *drv);
64
65int ibmebus_request_irq(struct ibmebus_dev *dev,
66 u32 ist,
67 irq_handler_t handler,
68 unsigned long irq_flags, const char * devname,
69 void *dev_id); 56 void *dev_id);
70void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id); 57void ibmebus_free_irq(u32 ist, void *dev_id);
71
72static inline struct ibmebus_driver *to_ibmebus_driver(struct device_driver *drv)
73{
74 return container_of(drv, struct ibmebus_driver, driver);
75}
76
77static inline struct ibmebus_dev *to_ibmebus_dev(struct device *dev)
78{
79 return container_of(dev, struct ibmebus_dev, ofdev.dev);
80}
81
82 58
83#endif /* __KERNEL__ */ 59#endif /* __KERNEL__ */
84#endif /* _ASM_IBMEBUS_H */ 60#endif /* _ASM_IBMEBUS_H */
diff --git a/include/asm-powerpc/of_device.h b/include/asm-powerpc/of_device.h
index 93262f2546ad..6526e139a463 100644
--- a/include/asm-powerpc/of_device.h
+++ b/include/asm-powerpc/of_device.h
@@ -17,6 +17,10 @@ struct of_device
17 struct device dev; /* Generic device interface */ 17 struct device dev; /* Generic device interface */
18}; 18};
19 19
20extern struct of_device *of_device_alloc(struct device_node *np,
21 const char *bus_id,
22 struct device *parent);
23
20extern ssize_t of_device_get_modalias(struct of_device *ofdev, 24extern ssize_t of_device_get_modalias(struct of_device *ofdev,
21 char *str, ssize_t len); 25 char *str, ssize_t len);
22extern int of_device_uevent(struct device *dev, 26extern int of_device_uevent(struct device *dev,
diff --git a/include/asm-ppc/mpc52xx_psc.h b/include/asm-ppc/mpc52xx_psc.h
index 9d850b2b20b8..c82b8d49a7da 100644
--- a/include/asm-ppc/mpc52xx_psc.h
+++ b/include/asm-ppc/mpc52xx_psc.h
@@ -28,6 +28,10 @@
28#define MPC52xx_PSC_MAXNUM 6 28#define MPC52xx_PSC_MAXNUM 6
29 29
30/* Programmable Serial Controller (PSC) status register bits */ 30/* Programmable Serial Controller (PSC) status register bits */
31#define MPC52xx_PSC_SR_UNEX_RX 0x0001
32#define MPC52xx_PSC_SR_DATA_VAL 0x0002
33#define MPC52xx_PSC_SR_DATA_OVR 0x0004
34#define MPC52xx_PSC_SR_CMDSEND 0x0008
31#define MPC52xx_PSC_SR_CDE 0x0080 35#define MPC52xx_PSC_SR_CDE 0x0080
32#define MPC52xx_PSC_SR_RXRDY 0x0100 36#define MPC52xx_PSC_SR_RXRDY 0x0100
33#define MPC52xx_PSC_SR_RXFULL 0x0200 37#define MPC52xx_PSC_SR_RXFULL 0x0200
@@ -132,8 +136,10 @@ struct mpc52xx_psc {
132 u8 reserved5[3]; 136 u8 reserved5[3];
133 u8 ctlr; /* PSC + 0x1c */ 137 u8 ctlr; /* PSC + 0x1c */
134 u8 reserved6[3]; 138 u8 reserved6[3];
135 u16 ccr; /* PSC + 0x20 */ 139 u32 ccr; /* PSC + 0x20 */
136 u8 reserved7[14]; 140 u32 ac97_slots; /* PSC + 0x24 */
141 u32 ac97_cmd; /* PSC + 0x28 */
142 u32 ac97_data; /* PSC + 0x2c */
137 u8 ivr; /* PSC + 0x30 */ 143 u8 ivr; /* PSC + 0x30 */
138 u8 reserved8[3]; 144 u8 reserved8[3];
139 u8 ip; /* PSC + 0x34 */ 145 u8 ip; /* PSC + 0x34 */
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 91bf84b9d144..212bffb2b174 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -22,5 +22,10 @@ extern int of_device_register(struct of_device *ofdev);
22extern void of_device_unregister(struct of_device *ofdev); 22extern void of_device_unregister(struct of_device *ofdev);
23extern void of_release_dev(struct device *dev); 23extern void of_release_dev(struct device *dev);
24 24
25static inline void of_device_free(struct of_device *dev)
26{
27 of_release_dev(&dev->dev);
28}
29
25#endif /* __KERNEL__ */ 30#endif /* __KERNEL__ */
26#endif /* _LINUX_OF_DEVICE_H */ 31#endif /* _LINUX_OF_DEVICE_H */