aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc')
-rw-r--r--include/asm-ppc/cputable.h1
-rw-r--r--include/asm-ppc/dma-mapping.h2
-rw-r--r--include/asm-ppc/futex.h2
-rw-r--r--include/asm-ppc/io.h20
-rw-r--r--include/asm-ppc/irq.h10
-rw-r--r--include/asm-ppc/macio.h1
-rw-r--r--include/asm-ppc/mpc8xx.h16
-rw-r--r--include/asm-ppc/mv64x60.h4
-rw-r--r--include/asm-ppc/of_device.h5
-rw-r--r--include/asm-ppc/ppc_sys.h2
10 files changed, 47 insertions, 16 deletions
diff --git a/include/asm-ppc/cputable.h b/include/asm-ppc/cputable.h
index 41d8f8425c0..e17c492c870 100644
--- a/include/asm-ppc/cputable.h
+++ b/include/asm-ppc/cputable.h
@@ -24,6 +24,7 @@
24#define PPC_FEATURE_HAS_SPE 0x00800000 24#define PPC_FEATURE_HAS_SPE 0x00800000
25#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 25#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000
26#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 26#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000
27#define PPC_FEATURE_NO_TB 0x00100000
27 28
28#ifdef __KERNEL__ 29#ifdef __KERNEL__
29 30
diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h
index 92b8ee78dcc..061bfcac1bf 100644
--- a/include/asm-ppc/dma-mapping.h
+++ b/include/asm-ppc/dma-mapping.h
@@ -61,7 +61,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask)
61 61
62static inline void *dma_alloc_coherent(struct device *dev, size_t size, 62static inline void *dma_alloc_coherent(struct device *dev, size_t size,
63 dma_addr_t * dma_handle, 63 dma_addr_t * dma_handle,
64 unsigned int __nocast gfp) 64 gfp_t gfp)
65{ 65{
66#ifdef CONFIG_NOT_COHERENT_CACHE 66#ifdef CONFIG_NOT_COHERENT_CACHE
67 return __dma_alloc_coherent(size, dma_handle, gfp); 67 return __dma_alloc_coherent(size, dma_handle, gfp);
diff --git a/include/asm-ppc/futex.h b/include/asm-ppc/futex.h
index 2cac5ecd9d0..9feff4ce142 100644
--- a/include/asm-ppc/futex.h
+++ b/include/asm-ppc/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
14 int cmp = (encoded_op >> 24) & 15; 14 int cmp = (encoded_op >> 24) & 15;
15 int oparg = (encoded_op << 8) >> 20; 15 int oparg = (encoded_op << 8) >> 20;
16 int cmparg = (encoded_op << 20) >> 20; 16 int cmparg = (encoded_op << 20) >> 20;
17 int oldval = 0, ret, tem; 17 int oldval = 0, ret;
18 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) 18 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
19 oparg = 1 << oparg; 19 oparg = 1 << oparg;
20 20
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 7eb7cf6360b..94d83998a75 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -56,7 +56,7 @@ extern unsigned long pci_dram_offset;
56 * is actually performed (i.e. the data has come back) before we start 56 * is actually performed (i.e. the data has come back) before we start
57 * executing any following instructions. 57 * executing any following instructions.
58 */ 58 */
59extern inline int in_8(volatile unsigned char __iomem *addr) 59extern inline int in_8(const volatile unsigned char __iomem *addr)
60{ 60{
61 int ret; 61 int ret;
62 62
@@ -72,7 +72,7 @@ extern inline void out_8(volatile unsigned char __iomem *addr, int val)
72 __asm__ __volatile__("stb%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); 72 __asm__ __volatile__("stb%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val));
73} 73}
74 74
75extern inline int in_le16(volatile unsigned short __iomem *addr) 75extern inline int in_le16(const volatile unsigned short __iomem *addr)
76{ 76{
77 int ret; 77 int ret;
78 78
@@ -83,7 +83,7 @@ extern inline int in_le16(volatile unsigned short __iomem *addr)
83 return ret; 83 return ret;
84} 84}
85 85
86extern inline int in_be16(volatile unsigned short __iomem *addr) 86extern inline int in_be16(const volatile unsigned short __iomem *addr)
87{ 87{
88 int ret; 88 int ret;
89 89
@@ -104,7 +104,7 @@ extern inline void out_be16(volatile unsigned short __iomem *addr, int val)
104 __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); 104 __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val));
105} 105}
106 106
107extern inline unsigned in_le32(volatile unsigned __iomem *addr) 107extern inline unsigned in_le32(const volatile unsigned __iomem *addr)
108{ 108{
109 unsigned ret; 109 unsigned ret;
110 110
@@ -115,7 +115,7 @@ extern inline unsigned in_le32(volatile unsigned __iomem *addr)
115 return ret; 115 return ret;
116} 116}
117 117
118extern inline unsigned in_be32(volatile unsigned __iomem *addr) 118extern inline unsigned in_be32(const volatile unsigned __iomem *addr)
119{ 119{
120 unsigned ret; 120 unsigned ret;
121 121
@@ -139,7 +139,7 @@ extern inline void out_be32(volatile unsigned __iomem *addr, int val)
139#define readb(addr) in_8((volatile u8 *)(addr)) 139#define readb(addr) in_8((volatile u8 *)(addr))
140#define writeb(b,addr) out_8((volatile u8 *)(addr), (b)) 140#define writeb(b,addr) out_8((volatile u8 *)(addr), (b))
141#else 141#else
142static inline __u8 readb(volatile void __iomem *addr) 142static inline __u8 readb(const volatile void __iomem *addr)
143{ 143{
144 return in_8(addr); 144 return in_8(addr);
145} 145}
@@ -150,11 +150,11 @@ static inline void writeb(__u8 b, volatile void __iomem *addr)
150#endif 150#endif
151 151
152#if defined(CONFIG_APUS) 152#if defined(CONFIG_APUS)
153static inline __u16 readw(volatile void __iomem *addr) 153static inline __u16 readw(const volatile void __iomem *addr)
154{ 154{
155 return *(__force volatile __u16 *)(addr); 155 return *(__force volatile __u16 *)(addr);
156} 156}
157static inline __u32 readl(volatile void __iomem *addr) 157static inline __u32 readl(const volatile void __iomem *addr)
158{ 158{
159 return *(__force volatile __u32 *)(addr); 159 return *(__force volatile __u32 *)(addr);
160} 160}
@@ -173,11 +173,11 @@ static inline void writel(__u32 b, volatile void __iomem *addr)
173#define writew(b,addr) out_le16((volatile u16 *)(addr),(b)) 173#define writew(b,addr) out_le16((volatile u16 *)(addr),(b))
174#define writel(b,addr) out_le32((volatile u32 *)(addr),(b)) 174#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
175#else 175#else
176static inline __u16 readw(volatile void __iomem *addr) 176static inline __u16 readw(const volatile void __iomem *addr)
177{ 177{
178 return in_le16(addr); 178 return in_le16(addr);
179} 179}
180static inline __u32 readl(volatile void __iomem *addr) 180static inline __u32 readl(const volatile void __iomem *addr)
181{ 181{
182 return in_le32(addr); 182 return in_le32(addr);
183} 183}
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
index 55752474d0d..bd9674807f0 100644
--- a/include/asm-ppc/irq.h
+++ b/include/asm-ppc/irq.h
@@ -138,6 +138,16 @@ irq_canonicalize(int irq)
138#define SIU_IRQ7 (14) 138#define SIU_IRQ7 (14)
139#define SIU_LEVEL7 (15) 139#define SIU_LEVEL7 (15)
140 140
141#define MPC8xx_INT_FEC1 SIU_LEVEL1
142#define MPC8xx_INT_FEC2 SIU_LEVEL3
143
144#define MPC8xx_INT_SCC1 (CPM_IRQ_OFFSET + CPMVEC_SCC1)
145#define MPC8xx_INT_SCC2 (CPM_IRQ_OFFSET + CPMVEC_SCC2)
146#define MPC8xx_INT_SCC3 (CPM_IRQ_OFFSET + CPMVEC_SCC3)
147#define MPC8xx_INT_SCC4 (CPM_IRQ_OFFSET + CPMVEC_SCC4)
148#define MPC8xx_INT_SMC1 (CPM_IRQ_OFFSET + CPMVEC_SMC1)
149#define MPC8xx_INT_SMC2 (CPM_IRQ_OFFSET + CPMVEC_SMC2)
150
141/* The internal interrupts we can configure as we see fit. 151/* The internal interrupts we can configure as we see fit.
142 * My personal preference is CPM at level 2, which puts it above the 152 * My personal preference is CPM at level 2, which puts it above the
143 * MBX PCI/ISA/IDE interrupts. 153 * MBX PCI/ISA/IDE interrupts.
diff --git a/include/asm-ppc/macio.h b/include/asm-ppc/macio.h
index a481b772d15..b553dd4b139 100644
--- a/include/asm-ppc/macio.h
+++ b/include/asm-ppc/macio.h
@@ -1,7 +1,6 @@
1#ifndef __MACIO_ASIC_H__ 1#ifndef __MACIO_ASIC_H__
2#define __MACIO_ASIC_H__ 2#define __MACIO_ASIC_H__
3 3
4#include <linux/mod_devicetable.h>
5#include <asm/of_device.h> 4#include <asm/of_device.h>
6 5
7extern struct bus_type macio_bus_type; 6extern struct bus_type macio_bus_type;
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h
index dc8e5989605..208a2e11dae 100644
--- a/include/asm-ppc/mpc8xx.h
+++ b/include/asm-ppc/mpc8xx.h
@@ -97,6 +97,22 @@ extern unsigned char __res[];
97 97
98struct pt_regs; 98struct pt_regs;
99 99
100enum ppc_sys_devices {
101 MPC8xx_CPM_FEC1,
102 MPC8xx_CPM_FEC2,
103 MPC8xx_CPM_I2C,
104 MPC8xx_CPM_SCC1,
105 MPC8xx_CPM_SCC2,
106 MPC8xx_CPM_SCC3,
107 MPC8xx_CPM_SCC4,
108 MPC8xx_CPM_SPI,
109 MPC8xx_CPM_MCC1,
110 MPC8xx_CPM_MCC2,
111 MPC8xx_CPM_SMC1,
112 MPC8xx_CPM_SMC2,
113 MPC8xx_CPM_USB,
114};
115
100#endif /* !__ASSEMBLY__ */ 116#endif /* !__ASSEMBLY__ */
101#endif /* CONFIG_8xx */ 117#endif /* CONFIG_8xx */
102#endif /* __CONFIG_8xx_DEFS */ 118#endif /* __CONFIG_8xx_DEFS */
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h
index 75c2ffa26b2..ee2f9188cc6 100644
--- a/include/asm-ppc/mv64x60.h
+++ b/include/asm-ppc/mv64x60.h
@@ -233,7 +233,7 @@ struct mv64x60_chip_info {
233struct mv64x60_handle { 233struct mv64x60_handle {
234 u32 type; /* type of bridge */ 234 u32 type; /* type of bridge */
235 u32 rev; /* revision of bridge */ 235 u32 rev; /* revision of bridge */
236 void *v_base; /* virtual base addr of bridge regs */ 236 void __iomem *v_base;/* virtual base addr of bridge regs */
237 phys_addr_t p_base; /* physical base addr of bridge regs */ 237 phys_addr_t p_base; /* physical base addr of bridge regs */
238 238
239 u32 pci_mode_a; /* pci 0 mode: conventional pci, pci-x*/ 239 u32 pci_mode_a; /* pci 0 mode: conventional pci, pci-x*/
@@ -303,7 +303,7 @@ void mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr,
303 u32 cfg_data, struct pci_controller **hose); 303 u32 cfg_data, struct pci_controller **hose);
304int mv64x60_get_type(struct mv64x60_handle *bh); 304int mv64x60_get_type(struct mv64x60_handle *bh);
305int mv64x60_setup_for_chip(struct mv64x60_handle *bh); 305int mv64x60_setup_for_chip(struct mv64x60_handle *bh);
306void *mv64x60_get_bridge_vbase(void); 306void __iomem *mv64x60_get_bridge_vbase(void);
307u32 mv64x60_get_bridge_type(void); 307u32 mv64x60_get_bridge_type(void);
308u32 mv64x60_get_bridge_rev(void); 308u32 mv64x60_get_bridge_rev(void);
309void mv64x60_get_mem_windows(struct mv64x60_handle *bh, 309void mv64x60_get_mem_windows(struct mv64x60_handle *bh,
diff --git a/include/asm-ppc/of_device.h b/include/asm-ppc/of_device.h
index 4b264cfd399..575bce418f8 100644
--- a/include/asm-ppc/of_device.h
+++ b/include/asm-ppc/of_device.h
@@ -2,6 +2,7 @@
2#define __OF_DEVICE_H__ 2#define __OF_DEVICE_H__
3 3
4#include <linux/device.h> 4#include <linux/device.h>
5#include <linux/mod_devicetable.h>
5#include <asm/prom.h> 6#include <asm/prom.h>
6 7
7/* 8/*
@@ -55,7 +56,9 @@ extern int of_register_driver(struct of_platform_driver *drv);
55extern void of_unregister_driver(struct of_platform_driver *drv); 56extern void of_unregister_driver(struct of_platform_driver *drv);
56extern int of_device_register(struct of_device *ofdev); 57extern int of_device_register(struct of_device *ofdev);
57extern void of_device_unregister(struct of_device *ofdev); 58extern void of_device_unregister(struct of_device *ofdev);
58extern struct of_device *of_platform_device_create(struct device_node *np, const char *bus_id); 59extern struct of_device *of_platform_device_create(struct device_node *np,
60 const char *bus_id,
61 struct device *parent);
59extern void of_release_dev(struct device *dev); 62extern void of_release_dev(struct device *dev);
60 63
61#endif /* __OF_DEVICE_H__ */ 64#endif /* __OF_DEVICE_H__ */
diff --git a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h
index 048f7c8596e..549f44843c5 100644
--- a/include/asm-ppc/ppc_sys.h
+++ b/include/asm-ppc/ppc_sys.h
@@ -27,6 +27,8 @@
27#include <asm/mpc83xx.h> 27#include <asm/mpc83xx.h>
28#elif defined(CONFIG_85xx) 28#elif defined(CONFIG_85xx)
29#include <asm/mpc85xx.h> 29#include <asm/mpc85xx.h>
30#elif defined(CONFIG_8xx)
31#include <asm/mpc8xx.h>
30#elif defined(CONFIG_PPC_MPC52xx) 32#elif defined(CONFIG_PPC_MPC52xx)
31#include <asm/mpc52xx.h> 33#include <asm/mpc52xx.h>
32#elif defined(CONFIG_MPC10X_BRIDGE) 34#elif defined(CONFIG_MPC10X_BRIDGE)