aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-07 13:45:22 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-07 13:45:22 -0500
commit8995b161eb142b843094dd614b80e4cce1d66352 (patch)
treeffd9988879441d5ec45ab96b2e06f4fcb1210158 /include
parentcc918c7ab7da017bfaf9661420bb5c462e057cfb (diff)
parentfe5dd7c73d328b255286b6b65ca19dd34447f709 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-aaec2000/dma.h8
-rw-r--r--include/asm-arm/arch-cl7500/dma.h1
-rw-r--r--include/asm-arm/arch-cl7500/entry-macro.S2
-rw-r--r--include/asm-arm/arch-clps711x/dma.h9
-rw-r--r--include/asm-arm/arch-clps711x/entry-macro.S1
-rw-r--r--include/asm-arm/arch-clps711x/system.h2
-rw-r--r--include/asm-arm/arch-ebsa110/dma.h8
-rw-r--r--include/asm-arm/arch-ebsa285/dma.h5
-rw-r--r--include/asm-arm/arch-ebsa285/entry-macro.S2
-rw-r--r--include/asm-arm/arch-epxa10db/dma.h9
-rw-r--r--include/asm-arm/arch-imx/dma.h4
-rw-r--r--include/asm-arm/arch-imx/entry-macro.S2
-rw-r--r--include/asm-arm/arch-integrator/debug-macro.S2
-rw-r--r--include/asm-arm/arch-integrator/dma.h9
-rw-r--r--include/asm-arm/arch-integrator/entry-macro.S2
-rw-r--r--include/asm-arm/arch-iop3xx/dma.h7
-rw-r--r--include/asm-arm/arch-iop3xx/entry-macro.S1
-rw-r--r--include/asm-arm/arch-ixp2000/dma.h9
-rw-r--r--include/asm-arm/arch-ixp2000/enp2611.h6
-rw-r--r--include/asm-arm/arch-ixp2000/entry-macro.S1
-rw-r--r--include/asm-arm/arch-ixp2000/io.h98
-rw-r--r--include/asm-arm/arch-ixp2000/ixp2000-regs.h8
-rw-r--r--include/asm-arm/arch-ixp4xx/coyote.h5
-rw-r--r--include/asm-arm/arch-ixp4xx/dma.h3
-rw-r--r--include/asm-arm/arch-ixp4xx/entry-macro.S1
-rw-r--r--include/asm-arm/arch-ixp4xx/gtwx5715.h4
-rw-r--r--include/asm-arm/arch-ixp4xx/hardware.h1
-rw-r--r--include/asm-arm/arch-ixp4xx/irqs.h9
-rw-r--r--include/asm-arm/arch-ixp4xx/ixdp425.h3
-rw-r--r--include/asm-arm/arch-ixp4xx/memory.h25
-rw-r--r--include/asm-arm/arch-ixp4xx/nas100d.h72
-rw-r--r--include/asm-arm/arch-ixp4xx/nslu2.h3
-rw-r--r--include/asm-arm/arch-ixp4xx/platform.h24
-rw-r--r--include/asm-arm/arch-l7200/dma.h1
-rw-r--r--include/asm-arm/arch-l7200/system.h2
-rw-r--r--include/asm-arm/arch-lh7a40x/dma.h8
-rw-r--r--include/asm-arm/arch-lh7a40x/entry-macro.S2
-rw-r--r--include/asm-arm/arch-omap/dma.h3
-rw-r--r--include/asm-arm/arch-omap/entry-macro.S2
-rw-r--r--include/asm-arm/arch-omap/system.h3
-rw-r--r--include/asm-arm/arch-pxa/dma.h5
-rw-r--r--include/asm-arm/arch-pxa/entry-macro.S2
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h12
-rw-r--r--include/asm-arm/arch-realview/debug-macro.S2
-rw-r--r--include/asm-arm/arch-realview/dma.h7
-rw-r--r--include/asm-arm/arch-realview/entry-macro.S2
-rw-r--r--include/asm-arm/arch-rpc/entry-macro.S2
-rw-r--r--include/asm-arm/arch-s3c2410/dma.h8
-rw-r--r--include/asm-arm/arch-s3c2410/entry-macro.S2
-rw-r--r--include/asm-arm/arch-sa1100/dma.h14
-rw-r--r--include/asm-arm/arch-versatile/debug-macro.S2
-rw-r--r--include/asm-arm/arch-versatile/dma.h7
-rw-r--r--include/asm-arm/arch-versatile/entry-macro.S4
-rw-r--r--include/asm-arm/byteorder.h16
-rw-r--r--include/asm-arm/cacheflush.h1
-rw-r--r--include/asm-arm/dma.h11
-rw-r--r--include/asm-arm/hardware/sharpsl_pm.h94
-rw-r--r--include/asm-arm/mach/dma.h4
-rw-r--r--include/asm-arm/scatterlist.h1
-rw-r--r--include/linux/amba/bus.h (renamed from include/asm-arm/hardware/amba.h)0
-rw-r--r--include/linux/amba/clcd.h (renamed from include/asm-arm/hardware/amba_clcd.h)0
-rw-r--r--include/linux/amba/kmi.h (renamed from include/asm-arm/hardware/amba_kmi.h)0
-rw-r--r--include/linux/amba/serial.h (renamed from include/asm-arm/hardware/amba_serial.h)0
-rw-r--r--include/linux/clk.h (renamed from include/asm-arm/hardware/clock.h)30
64 files changed, 291 insertions, 302 deletions
diff --git a/include/asm-arm/arch-aaec2000/dma.h b/include/asm-arm/arch-aaec2000/dma.h
index 28c890b4a1d3..e100b1e526fe 100644
--- a/include/asm-arm/arch-aaec2000/dma.h
+++ b/include/asm-arm/arch-aaec2000/dma.h
@@ -7,11 +7,3 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10
11#ifndef __ASM_ARCH_DMA_H
12#define __ASM_ARCH_DMA_H
13
14#define MAX_DMA_ADDRESS 0xffffffff
15#define MAX_DMA_CHANNELS 0
16
17#endif
diff --git a/include/asm-arm/arch-cl7500/dma.h b/include/asm-arm/arch-cl7500/dma.h
index 1d6a8829d327..591ed2551892 100644
--- a/include/asm-arm/arch-cl7500/dma.h
+++ b/include/asm-arm/arch-cl7500/dma.h
@@ -15,7 +15,6 @@
15 * bytes of RAM. 15 * bytes of RAM.
16 */ 16 */
17#define MAX_DMA_ADDRESS 0xd0000000 17#define MAX_DMA_ADDRESS 0xd0000000
18#define MAX_DMA_CHANNELS 0
19 18
20#define DMA_S0 0 19#define DMA_S0 0
21 20
diff --git a/include/asm-arm/arch-cl7500/entry-macro.S b/include/asm-arm/arch-cl7500/entry-macro.S
index 686f413f82d6..c9e5395e5106 100644
--- a/include/asm-arm/arch-cl7500/entry-macro.S
+++ b/include/asm-arm/arch-cl7500/entry-macro.S
@@ -1,3 +1,3 @@
1 1#include <asm/hardware.h>
2#include <asm/hardware/entry-macro-iomd.S> 2#include <asm/hardware/entry-macro-iomd.S>
3 3
diff --git a/include/asm-arm/arch-clps711x/dma.h b/include/asm-arm/arch-clps711x/dma.h
index 3c4c5c843252..610997938423 100644
--- a/include/asm-arm/arch-clps711x/dma.h
+++ b/include/asm-arm/arch-clps711x/dma.h
@@ -17,12 +17,3 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20#ifndef __ASM_ARCH_DMA_H
21#define __ASM_ARCH_DMA_H
22
23#define MAX_DMA_ADDRESS 0xffffffff
24
25#define MAX_DMA_CHANNELS 0
26
27#endif /* _ASM_ARCH_DMA_H */
28
diff --git a/include/asm-arm/arch-clps711x/entry-macro.S b/include/asm-arm/arch-clps711x/entry-macro.S
index b31079a1d4a9..21f6ee485819 100644
--- a/include/asm-arm/arch-clps711x/entry-macro.S
+++ b/include/asm-arm/arch-clps711x/entry-macro.S
@@ -7,6 +7,7 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
10#include <asm/hardware/clps7111.h> 11#include <asm/hardware/clps7111.h>
11 12
12 .macro disable_fiq 13 .macro disable_fiq
diff --git a/include/asm-arm/arch-clps711x/system.h b/include/asm-arm/arch-clps711x/system.h
index 2ab981fee37f..11e1491535a8 100644
--- a/include/asm-arm/arch-clps711x/system.h
+++ b/include/asm-arm/arch-clps711x/system.h
@@ -20,7 +20,9 @@
20#ifndef __ASM_ARCH_SYSTEM_H 20#ifndef __ASM_ARCH_SYSTEM_H
21#define __ASM_ARCH_SYSTEM_H 21#define __ASM_ARCH_SYSTEM_H
22 22
23#include <asm/hardware.h>
23#include <asm/hardware/clps7111.h> 24#include <asm/hardware/clps7111.h>
25#include <asm/io.h>
24 26
25static inline void arch_idle(void) 27static inline void arch_idle(void)
26{ 28{
diff --git a/include/asm-arm/arch-ebsa110/dma.h b/include/asm-arm/arch-ebsa110/dma.h
index d491776ac1cc..c52f9e2ab0bb 100644
--- a/include/asm-arm/arch-ebsa110/dma.h
+++ b/include/asm-arm/arch-ebsa110/dma.h
@@ -9,11 +9,3 @@
9 * 9 *
10 * EBSA110 DMA definitions 10 * EBSA110 DMA definitions
11 */ 11 */
12#ifndef __ASM_ARCH_DMA_H
13#define __ASM_ARCH_DMA_H
14
15#define MAX_DMA_ADDRESS 0xffffffff
16#define MAX_DMA_CHANNELS 0
17
18#endif /* _ASM_ARCH_DMA_H */
19
diff --git a/include/asm-arm/arch-ebsa285/dma.h b/include/asm-arm/arch-ebsa285/dma.h
index c43046eb8bc7..0259ad45d33c 100644
--- a/include/asm-arm/arch-ebsa285/dma.h
+++ b/include/asm-arm/arch-ebsa285/dma.h
@@ -10,11 +10,6 @@
10#define __ASM_ARCH_DMA_H 10#define __ASM_ARCH_DMA_H
11 11
12/* 12/*
13 * This is the maximum DMA address that can be DMAd to.
14 */
15#define MAX_DMA_ADDRESS 0xffffffff
16
17/*
18 * The 21285 has two internal DMA channels; we call these 8 and 9. 13 * The 21285 has two internal DMA channels; we call these 8 and 9.
19 * On CATS hardware we have an additional eight ISA dma channels 14 * On CATS hardware we have an additional eight ISA dma channels
20 * numbered 0..7. 15 * numbered 0..7.
diff --git a/include/asm-arm/arch-ebsa285/entry-macro.S b/include/asm-arm/arch-ebsa285/entry-macro.S
index db5729ff6349..cf10ac96fdde 100644
--- a/include/asm-arm/arch-ebsa285/entry-macro.S
+++ b/include/asm-arm/arch-ebsa285/entry-macro.S
@@ -7,6 +7,8 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
10#include <asm/hardware/dec21285.h> 12#include <asm/hardware/dec21285.h>
11 13
12 .macro disable_fiq 14 .macro disable_fiq
diff --git a/include/asm-arm/arch-epxa10db/dma.h b/include/asm-arm/arch-epxa10db/dma.h
index 5d97734d1077..de20ec8e74b1 100644
--- a/include/asm-arm/arch-epxa10db/dma.h
+++ b/include/asm-arm/arch-epxa10db/dma.h
@@ -17,12 +17,3 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20#ifndef __ASM_ARCH_DMA_H
21#define __ASM_ARCH_DMA_H
22
23#define MAX_DMA_ADDRESS 0xffffffff
24
25#define MAX_DMA_CHANNELS 0
26
27#endif /* _ASM_ARCH_DMA_H */
28
diff --git a/include/asm-arm/arch-imx/dma.h b/include/asm-arm/arch-imx/dma.h
index dbdc01780413..b45fa367d71e 100644
--- a/include/asm-arm/arch-imx/dma.h
+++ b/include/asm-arm/arch-imx/dma.h
@@ -20,10 +20,6 @@
20#ifndef __ASM_ARCH_DMA_H 20#ifndef __ASM_ARCH_DMA_H
21#define __ASM_ARCH_DMA_H 21#define __ASM_ARCH_DMA_H
22 22
23#define MAX_DMA_ADDRESS 0xffffffff
24
25#define MAX_DMA_CHANNELS 0
26
27/* 23/*
28 * DMA registration 24 * DMA registration
29 */ 25 */
diff --git a/include/asm-arm/arch-imx/entry-macro.S b/include/asm-arm/arch-imx/entry-macro.S
index b40ea7cf88ec..3b9ef6914627 100644
--- a/include/asm-arm/arch-imx/entry-macro.S
+++ b/include/asm-arm/arch-imx/entry-macro.S
@@ -7,6 +7,8 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
11
10 .macro disable_fiq 12 .macro disable_fiq
11 .endm 13 .endm
12#define AITC_NIVECSR 0x40 14#define AITC_NIVECSR 0x40
diff --git a/include/asm-arm/arch-integrator/debug-macro.S b/include/asm-arm/arch-integrator/debug-macro.S
index 484a1aa47098..031d30941791 100644
--- a/include/asm-arm/arch-integrator/debug-macro.S
+++ b/include/asm-arm/arch-integrator/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14#include <asm/hardware/amba_serial.h> 14#include <linux/amba/serial.h>
15 15
16 .macro addruart,rx 16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0 17 mrc p15, 0, \rx, c1, c0
diff --git a/include/asm-arm/arch-integrator/dma.h b/include/asm-arm/arch-integrator/dma.h
index 7171792290bd..83fd6bbaf9d3 100644
--- a/include/asm-arm/arch-integrator/dma.h
+++ b/include/asm-arm/arch-integrator/dma.h
@@ -17,12 +17,3 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20#ifndef __ASM_ARCH_DMA_H
21#define __ASM_ARCH_DMA_H
22
23#define MAX_DMA_ADDRESS 0xffffffff
24
25#define MAX_DMA_CHANNELS 0
26
27#endif /* _ASM_ARCH_DMA_H */
28
diff --git a/include/asm-arm/arch-integrator/entry-macro.S b/include/asm-arm/arch-integrator/entry-macro.S
index 44f7ee613194..69838d04f90b 100644
--- a/include/asm-arm/arch-integrator/entry-macro.S
+++ b/include/asm-arm/arch-integrator/entry-macro.S
@@ -7,6 +7,8 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
10 12
11 .macro disable_fiq 13 .macro disable_fiq
12 .endm 14 .endm
diff --git a/include/asm-arm/arch-iop3xx/dma.h b/include/asm-arm/arch-iop3xx/dma.h
index 797f9e6fc745..1e808db8af2a 100644
--- a/include/asm-arm/arch-iop3xx/dma.h
+++ b/include/asm-arm/arch-iop3xx/dma.h
@@ -7,10 +7,3 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10
11#ifndef _IOP3XX_DMA_H_P
12#define _IOP3XX_DMA_H_P
13
14#define MAX_DMA_ADDRESS 0xffffffff
15
16#endif /* _ASM_ARCH_DMA_H_P */
diff --git a/include/asm-arm/arch-iop3xx/entry-macro.S b/include/asm-arm/arch-iop3xx/entry-macro.S
index e2ce7f5467c8..926668c098a5 100644
--- a/include/asm-arm/arch-iop3xx/entry-macro.S
+++ b/include/asm-arm/arch-iop3xx/entry-macro.S
@@ -7,6 +7,7 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/arch/irqs.h>
10 11
11#if defined(CONFIG_ARCH_IOP321) 12#if defined(CONFIG_ARCH_IOP321)
12 .macro disable_fiq 13 .macro disable_fiq
diff --git a/include/asm-arm/arch-ixp2000/dma.h b/include/asm-arm/arch-ixp2000/dma.h
index 0fb3568a98dd..548d8dc507eb 100644
--- a/include/asm-arm/arch-ixp2000/dma.h
+++ b/include/asm-arm/arch-ixp2000/dma.h
@@ -7,12 +7,3 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#ifndef __ASM_ARCH_DMA_H
11#define __ASM_ARCH_DMA_H
12
13#define MAX_DMA_ADDRESS 0xffffffff
14
15/* No DMA */
16#define MAX_DMA_CHANNELS 0
17
18#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-ixp2000/enp2611.h b/include/asm-arm/arch-ixp2000/enp2611.h
index 95128d9f5026..42f3c28dc5c4 100644
--- a/include/asm-arm/arch-ixp2000/enp2611.h
+++ b/include/asm-arm/arch-ixp2000/enp2611.h
@@ -36,5 +36,11 @@
36#define ENP2611_GPIO_SCL 7 36#define ENP2611_GPIO_SCL 7
37#define ENP2611_GPIO_SDA 6 37#define ENP2611_GPIO_SDA 6
38 38
39#define IRQ_ENP2611_THERMAL IRQ_IXP2000_GPIO4
40#define IRQ_ENP2611_OPTION_BOARD IRQ_IXP2000_GPIO3
41#define IRQ_ENP2611_CALEB IRQ_IXP2000_GPIO2
42#define IRQ_ENP2611_PM3386_1 IRQ_IXP2000_GPIO1
43#define IRQ_ENP2611_PM3386_0 IRQ_IXP2000_GPIO0
44
39 45
40#endif 46#endif
diff --git a/include/asm-arm/arch-ixp2000/entry-macro.S b/include/asm-arm/arch-ixp2000/entry-macro.S
index e3a4e4121298..16e1e6124b31 100644
--- a/include/asm-arm/arch-ixp2000/entry-macro.S
+++ b/include/asm-arm/arch-ixp2000/entry-macro.S
@@ -7,6 +7,7 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/arch/irqs.h>
10 11
11 .macro disable_fiq 12 .macro disable_fiq
12 .endm 13 .endm
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h
index 7fbcdf9931ee..c0ff2c6c66e7 100644
--- a/include/asm-arm/arch-ixp2000/io.h
+++ b/include/asm-arm/arch-ixp2000/io.h
@@ -131,102 +131,4 @@
131#endif 131#endif
132 132
133 133
134#ifdef CONFIG_ARCH_IXDP2X01
135/*
136 * This is an ugly hack but the CS8900 on the 2x01's does not sit in any sort
137 * of "I/O space" and is just direct mapped into a 32-bit-only addressable
138 * bus. The address space for this bus is such that we can't really easily
139 * make it contiguous to the PCI I/O address range, and it also does not
140 * need swapping like PCI addresses do (IXDP2x01 is a BE platform).
141 * B/C of this we can't use the standard in/out functions and need to
142 * runtime check if the incoming address is a PCI address or for
143 * the CS89x0.
144 */
145#undef inw
146#undef outw
147#undef insw
148#undef outsw
149
150#include <asm/mach-types.h>
151
152static inline void insw(u32 ptr, void *buf, int length)
153{
154 register volatile u32 *port = (volatile u32 *)ptr;
155
156 /*
157 * Is this cycle meant for the CS8900?
158 */
159 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
160 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
161 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
162 u8 *buf8 = (u8*)buf;
163 register u32 tmp32;
164
165 do {
166 tmp32 = *port;
167 *buf8++ = (u8)tmp32;
168 *buf8++ = (u8)(tmp32 >> 8);
169 } while(--length);
170
171 return;
172 }
173
174 __raw_readsw(alignw(___io(ptr)),buf,length);
175}
176
177static inline void outsw(u32 ptr, void *buf, int length)
178{
179 register volatile u32 *port = (volatile u32 *)ptr;
180
181 /*
182 * Is this cycle meant for the CS8900?
183 */
184 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
185 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
186 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
187 register u32 tmp32;
188 u8 *buf8 = (u8*)buf;
189 do {
190 tmp32 = *buf8++;
191 tmp32 |= (*buf8++) << 8;
192 *port = tmp32;
193 } while(--length);
194 return;
195 }
196
197 __raw_writesw(alignw(___io(ptr)),buf,length);
198}
199
200
201static inline u16 inw(u32 ptr)
202{
203 register volatile u32 *port = (volatile u32 *)ptr;
204
205 /*
206 * Is this cycle meant for the CS8900?
207 */
208 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
209 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
210 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
211 return (u16)(*port);
212 }
213
214 return __raw_readw(alignw(___io(ptr)));
215}
216
217static inline void outw(u16 value, u32 ptr)
218{
219 register volatile u32 *port = (volatile u32 *)ptr;
220
221 if ((machine_is_ixdp2401() || machine_is_ixdp2801()) &&
222 (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
223 ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
224 *port = value;
225 return;
226 }
227
228 __raw_writew((value),alignw(___io(ptr)));
229}
230#endif /* IXDP2x01 */
231
232#endif 134#endif
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
index fc5ac6aec4f2..8cf70ff160af 100644
--- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h
+++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
@@ -156,6 +156,14 @@
156#define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84) 156#define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84)
157#define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88) 157#define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88)
158#define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c) 158#define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c)
159#define IXP2000_IRQ_THD_STATUS_A_0 IXP2000_INTCTL_REG(0xe0)
160#define IXP2000_IRQ_THD_STATUS_A_1 IXP2000_INTCTL_REG(0xe4)
161#define IXP2000_IRQ_THD_STATUS_A_2 IXP2000_INTCTL_REG(0xe8)
162#define IXP2000_IRQ_THD_STATUS_A_3 IXP2000_INTCTL_REG(0xec)
163#define IXP2000_IRQ_THD_STATUS_B_0 IXP2000_INTCTL_REG(0x100)
164#define IXP2000_IRQ_THD_STATUS_B_1 IXP2000_INTCTL_REG(0x104)
165#define IXP2000_IRQ_THD_STATUS_B_2 IXP2000_INTCTL_REG(0x108)
166#define IXP2000_IRQ_THD_STATUS_B_3 IXP2000_INTCTL_REG(0x10c)
159#define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160) 167#define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160)
160#define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164) 168#define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164)
161#define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168) 169#define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168)
diff --git a/include/asm-arm/arch-ixp4xx/coyote.h b/include/asm-arm/arch-ixp4xx/coyote.h
index dd0c2d2d8503..7ac9ba2c035c 100644
--- a/include/asm-arm/arch-ixp4xx/coyote.h
+++ b/include/asm-arm/arch-ixp4xx/coyote.h
@@ -16,9 +16,6 @@
16#error "Do not include this directly, instead #include <asm/hardware.h>" 16#error "Do not include this directly, instead #include <asm/hardware.h>"
17#endif 17#endif
18 18
19#define COYOTE_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
20#define COYOTE_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE * 2
21
22/* PCI controller GPIO to IRQ pin mappings */ 19/* PCI controller GPIO to IRQ pin mappings */
23#define COYOTE_PCI_SLOT0_PIN 6 20#define COYOTE_PCI_SLOT0_PIN 6
24#define COYOTE_PCI_SLOT1_PIN 11 21#define COYOTE_PCI_SLOT1_PIN 11
@@ -26,7 +23,7 @@
26#define COYOTE_PCI_SLOT0_DEVID 14 23#define COYOTE_PCI_SLOT0_DEVID 14
27#define COYOTE_PCI_SLOT1_DEVID 15 24#define COYOTE_PCI_SLOT1_DEVID 15
28 25
29#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_CS3_BASE_PHYS 26#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_BASE(3)
30#define COYOTE_IDE_BASE_VIRT 0xFFFE1000 27#define COYOTE_IDE_BASE_VIRT 0xFFFE1000
31#define COYOTE_IDE_REGION_SIZE 0x1000 28#define COYOTE_IDE_REGION_SIZE 0x1000
32 29
diff --git a/include/asm-arm/arch-ixp4xx/dma.h b/include/asm-arm/arch-ixp4xx/dma.h
index 312065dc0e7a..b1a071ecebc8 100644
--- a/include/asm-arm/arch-ixp4xx/dma.h
+++ b/include/asm-arm/arch-ixp4xx/dma.h
@@ -20,7 +20,4 @@
20 20
21#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M) 21#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
22 22
23/* No DMA */
24#define MAX_DMA_CHANNELS 0
25
26#endif /* _ASM_ARCH_DMA_H */ 23#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S
index 323b0bc4a39c..27e124132e4c 100644
--- a/include/asm-arm/arch-ixp4xx/entry-macro.S
+++ b/include/asm-arm/arch-ixp4xx/entry-macro.S
@@ -7,6 +7,7 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
10 11
11 .macro disable_fiq 12 .macro disable_fiq
12 .endm 13 .endm
diff --git a/include/asm-arm/arch-ixp4xx/gtwx5715.h b/include/asm-arm/arch-ixp4xx/gtwx5715.h
index fc460af70627..c3069d67c00e 100644
--- a/include/asm-arm/arch-ixp4xx/gtwx5715.h
+++ b/include/asm-arm/arch-ixp4xx/gtwx5715.h
@@ -57,10 +57,6 @@
57#define GTWX5715_GPIO13_IRQ IRQ_IXP4XX_SW_INT1 57#define GTWX5715_GPIO13_IRQ IRQ_IXP4XX_SW_INT1
58#define GTWX5715_GPIO14_IRQ IRQ_IXP4XX_SW_INT2 58#define GTWX5715_GPIO14_IRQ IRQ_IXP4XX_SW_INT2
59 59
60
61#define GTWX5715_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
62#define GTWX5715_FLASH_SIZE (0x00800000)
63
64/* PCI controller GPIO to IRQ pin mappings 60/* PCI controller GPIO to IRQ pin mappings
65 61
66 INTA INTB 62 INTA INTB
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h
index cfb413c845f7..6acb69c95ef9 100644
--- a/include/asm-arm/arch-ixp4xx/hardware.h
+++ b/include/asm-arm/arch-ixp4xx/hardware.h
@@ -45,5 +45,6 @@ extern unsigned int processor_id;
45#include "coyote.h" 45#include "coyote.h"
46#include "prpmc1100.h" 46#include "prpmc1100.h"
47#include "nslu2.h" 47#include "nslu2.h"
48#include "nas100d.h"
48 49
49#endif /* _ASM_ARCH_HARDWARE_H */ 50#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-ixp4xx/irqs.h b/include/asm-arm/arch-ixp4xx/irqs.h
index 2cf4930372bc..f24b763ca18e 100644
--- a/include/asm-arm/arch-ixp4xx/irqs.h
+++ b/include/asm-arm/arch-ixp4xx/irqs.h
@@ -100,4 +100,13 @@
100#define IRQ_NSLU2_PCI_INTB IRQ_IXP4XX_GPIO10 100#define IRQ_NSLU2_PCI_INTB IRQ_IXP4XX_GPIO10
101#define IRQ_NSLU2_PCI_INTC IRQ_IXP4XX_GPIO9 101#define IRQ_NSLU2_PCI_INTC IRQ_IXP4XX_GPIO9
102 102
103/*
104 * NAS100D board IRQs
105 */
106#define IRQ_NAS100D_PCI_INTA IRQ_IXP4XX_GPIO11
107#define IRQ_NAS100D_PCI_INTB IRQ_IXP4XX_GPIO10
108#define IRQ_NAS100D_PCI_INTC IRQ_IXP4XX_GPIO9
109#define IRQ_NAS100D_PCI_INTD IRQ_IXP4XX_GPIO8
110#define IRQ_NAS100D_PCI_INTE IRQ_IXP4XX_GPIO7
111
103#endif 112#endif
diff --git a/include/asm-arm/arch-ixp4xx/ixdp425.h b/include/asm-arm/arch-ixp4xx/ixdp425.h
index 7d21bf941379..3d3820d7ba09 100644
--- a/include/asm-arm/arch-ixp4xx/ixdp425.h
+++ b/include/asm-arm/arch-ixp4xx/ixdp425.h
@@ -16,9 +16,6 @@
16#error "Do not include this directly, instead #include <asm/hardware.h>" 16#error "Do not include this directly, instead #include <asm/hardware.h>"
17#endif 17#endif
18 18
19#define IXDP425_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
20#define IXDP425_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
21
22#define IXDP425_SDA_PIN 7 19#define IXDP425_SDA_PIN 7
23#define IXDP425_SCL_PIN 6 20#define IXDP425_SCL_PIN 6
24 21
diff --git a/include/asm-arm/arch-ixp4xx/memory.h b/include/asm-arm/arch-ixp4xx/memory.h
index e024d0a1a669..ee211d28a3ef 100644
--- a/include/asm-arm/arch-ixp4xx/memory.h
+++ b/include/asm-arm/arch-ixp4xx/memory.h
@@ -16,31 +16,10 @@
16 16
17#ifndef __ASSEMBLY__ 17#ifndef __ASSEMBLY__
18 18
19/* 19void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);
20 * Only first 64MB of memory can be accessed via PCI.
21 * We use GFP_DMA to allocate safe buffers to do map/unmap.
22 * This is really ugly and we need a better way of specifying
23 * DMA-capable regions of memory.
24 */
25static inline void __arch_adjust_zones(int node, unsigned long *zone_size,
26 unsigned long *zhole_size)
27{
28 unsigned int sz = SZ_64M >> PAGE_SHIFT;
29
30 /*
31 * Only adjust if > 64M on current system
32 */
33 if (node || (zone_size[0] <= sz))
34 return;
35
36 zone_size[1] = zone_size[0] - sz;
37 zone_size[0] = sz;
38 zhole_size[1] = zhole_size[0];
39 zhole_size[0] = 0;
40}
41 20
42#define arch_adjust_zones(node, size, holes) \ 21#define arch_adjust_zones(node, size, holes) \
43 __arch_adjust_zones(node, size, holes) 22 ixp4xx_adjust_zones(node, size, holes)
44 23
45#define ISA_DMA_THRESHOLD (SZ_64M - 1) 24#define ISA_DMA_THRESHOLD (SZ_64M - 1)
46 25
diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h
new file mode 100644
index 000000000000..51ac0180427c
--- /dev/null
+++ b/include/asm-arm/arch-ixp4xx/nas100d.h
@@ -0,0 +1,72 @@
1/*
2 * include/asm-arm/arch-ixp4xx/nas100d.h
3 *
4 * NAS100D platform specific definitions
5 *
6 * Copyright (c) 2005 Tower Technologies
7 *
8 * Author: Alessandro Zummo <a.zummo@towertech.it>
9 *
10 * based on ixdp425.h:
11 * Copyright 2004 (c) MontaVista, Software, Inc.
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18#ifndef __ASM_ARCH_HARDWARE_H__
19#error "Do not include this directly, instead #include <asm/hardware.h>"
20#endif
21
22#define NAS100D_SDA_PIN 6
23#define NAS100D_SCL_PIN 5
24
25/*
26 * NAS100D PCI IRQs
27 */
28#define NAS100D_PCI_MAX_DEV 3
29#define NAS100D_PCI_IRQ_LINES 3
30
31
32/* PCI controller GPIO to IRQ pin mappings */
33#define NAS100D_PCI_INTA_PIN 11
34#define NAS100D_PCI_INTB_PIN 10
35#define NAS100D_PCI_INTC_PIN 9
36#define NAS100D_PCI_INTD_PIN 8
37#define NAS100D_PCI_INTE_PIN 7
38
39/* GPIO */
40
41#define NAS100D_GPIO0 0
42#define NAS100D_GPIO1 1
43#define NAS100D_GPIO2 2
44#define NAS100D_GPIO3 3
45#define NAS100D_GPIO4 4
46#define NAS100D_GPIO5 5
47#define NAS100D_GPIO6 6
48#define NAS100D_GPIO7 7
49#define NAS100D_GPIO8 8
50#define NAS100D_GPIO9 9
51#define NAS100D_GPIO10 10
52#define NAS100D_GPIO11 11
53#define NAS100D_GPIO12 12
54#define NAS100D_GPIO13 13
55#define NAS100D_GPIO14 14
56#define NAS100D_GPIO15 15
57
58
59/* Buttons */
60
61#define NAS100D_PB_GPIO NAS100D_GPIO14
62#define NAS100D_RB_GPIO NAS100D_GPIO4
63#define NAS100D_PO_GPIO NAS100D_GPIO12 /* power off */
64
65#define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14
66#define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4
67
68/*
69#define NAS100D_PB_BM (1L << NAS100D_PB_GPIO)
70#define NAS100D_PO_BM (1L << NAS100D_PO_GPIO)
71#define NAS100D_RB_BM (1L << NAS100D_RB_GPIO)
72*/
diff --git a/include/asm-arm/arch-ixp4xx/nslu2.h b/include/asm-arm/arch-ixp4xx/nslu2.h
index b8b347a559c7..4281838873ef 100644
--- a/include/asm-arm/arch-ixp4xx/nslu2.h
+++ b/include/asm-arm/arch-ixp4xx/nslu2.h
@@ -18,9 +18,6 @@
18#error "Do not include this directly, instead #include <asm/hardware.h>" 18#error "Do not include this directly, instead #include <asm/hardware.h>"
19#endif 19#endif
20 20
21#define NSLU2_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
22#define NSLU2_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
23
24#define NSLU2_SDA_PIN 7 21#define NSLU2_SDA_PIN 7
25#define NSLU2_SCL_PIN 6 22#define NSLU2_SCL_PIN 6
26 23
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h
index f14ed63590c3..daf9790645ca 100644
--- a/include/asm-arm/arch-ixp4xx/platform.h
+++ b/include/asm-arm/arch-ixp4xx/platform.h
@@ -26,16 +26,17 @@
26 */ 26 */
27#define IXP4XX_EXP_BUS_BASE_PHYS (0x50000000) 27#define IXP4XX_EXP_BUS_BASE_PHYS (0x50000000)
28 28
29#define IXP4XX_EXP_BUS_CSX_REGION_SIZE (0x01000000) 29/*
30 * The expansion bus on the IXP4xx can be configured for either 16 or
31 * 32MB windows and the CS offset for each region changes based on the
32 * current configuration. This means that we cannot simply hardcode
33 * each offset. ixp4xx_sys_init() looks at the expansion bus configuration
34 * as setup by the bootloader to determine our window size.
35 */
36extern unsigned long ixp4xx_exp_bus_size;
30 37
31#define IXP4XX_EXP_BUS_CS0_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x00000000) 38#define IXP4XX_EXP_BUS_BASE(region)\
32#define IXP4XX_EXP_BUS_CS1_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x01000000) 39 (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size))
33#define IXP4XX_EXP_BUS_CS2_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x02000000)
34#define IXP4XX_EXP_BUS_CS3_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x03000000)
35#define IXP4XX_EXP_BUS_CS4_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x04000000)
36#define IXP4XX_EXP_BUS_CS5_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x05000000)
37#define IXP4XX_EXP_BUS_CS6_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x06000000)
38#define IXP4XX_EXP_BUS_CS7_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x07000000)
39 40
40#define IXP4XX_FLASH_WRITABLE (0x2) 41#define IXP4XX_FLASH_WRITABLE (0x2)
41#define IXP4XX_FLASH_DEFAULT (0xbcd23c40) 42#define IXP4XX_FLASH_DEFAULT (0xbcd23c40)
@@ -112,10 +113,5 @@ static inline void gpio_line_set(u8 line, int value)
112 *IXP4XX_GPIO_GPOUTR &= ~(1 << line); 113 *IXP4XX_GPIO_GPOUTR &= ~(1 << line);
113} 114}
114 115
115static inline void gpio_line_isr_clear(u8 line)
116{
117 *IXP4XX_GPIO_GPISR = (1 << line);
118}
119
120#endif // __ASSEMBLY__ 116#endif // __ASSEMBLY__
121 117
diff --git a/include/asm-arm/arch-l7200/dma.h b/include/asm-arm/arch-l7200/dma.h
index 6595b386cfc9..4c7eca63f035 100644
--- a/include/asm-arm/arch-l7200/dma.h
+++ b/include/asm-arm/arch-l7200/dma.h
@@ -17,7 +17,6 @@
17 * bytes of RAM. 17 * bytes of RAM.
18 */ 18 */
19#define MAX_DMA_ADDRESS 0xd0000000 19#define MAX_DMA_ADDRESS 0xd0000000
20#define MAX_DMA_CHANNELS 0
21 20
22#define DMA_S0 0 21#define DMA_S0 0
23 22
diff --git a/include/asm-arm/arch-l7200/system.h b/include/asm-arm/arch-l7200/system.h
index cb4ff29059b8..18825cf071ba 100644
--- a/include/asm-arm/arch-l7200/system.h
+++ b/include/asm-arm/arch-l7200/system.h
@@ -12,6 +12,8 @@
12#ifndef __ASM_ARCH_SYSTEM_H 12#ifndef __ASM_ARCH_SYSTEM_H
13#define __ASM_ARCH_SYSTEM_H 13#define __ASM_ARCH_SYSTEM_H
14 14
15#include <asm/hardware.h>
16
15static inline void arch_idle(void) 17static inline void arch_idle(void)
16{ 18{
17 *(unsigned long *)(IO_BASE + 0x50004) = 1; /* idle mode */ 19 *(unsigned long *)(IO_BASE + 0x50004) = 1; /* idle mode */
diff --git a/include/asm-arm/arch-lh7a40x/dma.h b/include/asm-arm/arch-lh7a40x/dma.h
index 5797f01e1844..15492e3253f6 100644
--- a/include/asm-arm/arch-lh7a40x/dma.h
+++ b/include/asm-arm/arch-lh7a40x/dma.h
@@ -7,11 +7,3 @@
7 * version 2 as published by the Free Software Foundation. 7 * version 2 as published by the Free Software Foundation.
8 * 8 *
9 */ 9 */
10
11#ifndef __ASM_ARCH_DMA_H
12#define __ASM_ARCH_DMA_H
13
14#define MAX_DMA_ADDRESS 0xffffffff
15#define MAX_DMA_CHANNELS 0 /* All DMA is internal to CPU */
16
17#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S
index 865f396aa63c..a2f67c06d9c9 100644
--- a/include/asm-arm/arch-lh7a40x/entry-macro.S
+++ b/include/asm-arm/arch-lh7a40x/entry-macro.S
@@ -7,6 +7,8 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
10 12
11# if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404) 13# if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404)
12# error "LH7A400 and LH7A404 are mutually exclusive" 14# error "LH7A400 and LH7A404 are mutually exclusive"
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
index ccbcb580a5c1..d4e73efcb816 100644
--- a/include/asm-arm/arch-omap/dma.h
+++ b/include/asm-arm/arch-omap/dma.h
@@ -21,9 +21,6 @@
21#ifndef __ASM_ARCH_DMA_H 21#ifndef __ASM_ARCH_DMA_H
22#define __ASM_ARCH_DMA_H 22#define __ASM_ARCH_DMA_H
23 23
24#define MAX_DMA_ADDRESS 0xffffffff
25#define MAX_DMA_CHANNELS 0
26
27/* Hardware registers for omap1 */ 24/* Hardware registers for omap1 */
28#define OMAP_DMA_BASE (0xfffed800) 25#define OMAP_DMA_BASE (0xfffed800)
29#define OMAP_DMA_GCR (OMAP_DMA_BASE + 0x400) 26#define OMAP_DMA_GCR (OMAP_DMA_BASE + 0x400)
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S
index f8814a84910e..0ffb1185f1ac 100644
--- a/include/asm-arm/arch-omap/entry-macro.S
+++ b/include/asm-arm/arch-omap/entry-macro.S
@@ -7,6 +7,8 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
10 12
11#if defined(CONFIG_ARCH_OMAP1) 13#if defined(CONFIG_ARCH_OMAP1)
12 14
diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h
index 9af415d2944a..6724a81bd10b 100644
--- a/include/asm-arm/arch-omap/system.h
+++ b/include/asm-arm/arch-omap/system.h
@@ -5,8 +5,9 @@
5#ifndef __ASM_ARCH_SYSTEM_H 5#ifndef __ASM_ARCH_SYSTEM_H
6#define __ASM_ARCH_SYSTEM_H 6#define __ASM_ARCH_SYSTEM_H
7#include <linux/config.h> 7#include <linux/config.h>
8#include <linux/clk.h>
9
8#include <asm/mach-types.h> 10#include <asm/mach-types.h>
9#include <asm/hardware/clock.h>
10#include <asm/hardware.h> 11#include <asm/hardware.h>
11#include <asm/arch/prcm.h> 12#include <asm/arch/prcm.h>
12 13
diff --git a/include/asm-arm/arch-pxa/dma.h b/include/asm-arm/arch-pxa/dma.h
index 56db3d49bfc8..3e88a2a02a0f 100644
--- a/include/asm-arm/arch-pxa/dma.h
+++ b/include/asm-arm/arch-pxa/dma.h
@@ -12,11 +12,6 @@
12#ifndef __ASM_ARCH_DMA_H 12#ifndef __ASM_ARCH_DMA_H
13#define __ASM_ARCH_DMA_H 13#define __ASM_ARCH_DMA_H
14 14
15#define MAX_DMA_ADDRESS 0xffffffff
16
17/* No DMA as the rest of the world see it */
18#define MAX_DMA_CHANNELS 0
19
20/* 15/*
21 * Descriptor structure for PXA's DMA engine 16 * Descriptor structure for PXA's DMA engine
22 * Note: this structure must always be aligned to a 16-byte boundary. 17 * Note: this structure must always be aligned to a 16-byte boundary.
diff --git a/include/asm-arm/arch-pxa/entry-macro.S b/include/asm-arm/arch-pxa/entry-macro.S
index 2abfc8bb3ee5..4985e33afc12 100644
--- a/include/asm-arm/arch-pxa/entry-macro.S
+++ b/include/asm-arm/arch-pxa/entry-macro.S
@@ -7,6 +7,8 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
10 12
11 .macro disable_fiq 13 .macro disable_fiq
12 .endm 14 .endm
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index a75a2470f4f5..dae138b9cac5 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -2042,6 +2042,18 @@
2042 2042
2043#ifdef CONFIG_PXA27x 2043#ifdef CONFIG_PXA27x
2044 2044
2045#define ARB_CNTRL __REG(0x48000048) /* Arbiter Control Register */
2046
2047#define ARB_DMA_SLV_PARK (1<<31) /* Be parked with DMA slave when idle */
2048#define ARB_CI_PARK (1<<30) /* Be parked with Camera Interface when idle */
2049#define ARB_EX_MEM_PARK (1<<29) /* Be parked with external MEMC when idle */
2050#define ARB_INT_MEM_PARK (1<<28) /* Be parked with internal MEMC when idle */
2051#define ARB_USB_PARK (1<<27) /* Be parked with USB when idle */
2052#define ARB_LCD_PARK (1<<26) /* Be parked with LCD when idle */
2053#define ARB_DMA_PARK (1<<25) /* Be parked with DMA when idle */
2054#define ARB_CORE_PARK (1<<24) /* Be parked with core when idle */
2055#define ARB_LOCK_FLAG (1<<23) /* Only Locking masters gain access to the bus */
2056
2045/* 2057/*
2046 * Keypad 2058 * Keypad
2047 */ 2059 */
diff --git a/include/asm-arm/arch-realview/debug-macro.S b/include/asm-arm/arch-realview/debug-macro.S
index ed28bd012236..017ad996848d 100644
--- a/include/asm-arm/arch-realview/debug-macro.S
+++ b/include/asm-arm/arch-realview/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14#include <asm/hardware/amba_serial.h> 14#include <linux/amba/serial.h>
15 15
16 .macro addruart,rx 16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0 17 mrc p15, 0, \rx, c1, c0
diff --git a/include/asm-arm/arch-realview/dma.h b/include/asm-arm/arch-realview/dma.h
index 744491a74bd9..8342e3f9d6ec 100644
--- a/include/asm-arm/arch-realview/dma.h
+++ b/include/asm-arm/arch-realview/dma.h
@@ -18,10 +18,3 @@
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21#ifndef __ASM_ARCH_DMA_H
22#define __ASM_ARCH_DMA_H
23
24#define MAX_DMA_ADDRESS 0xffffffff
25#define MAX_DMA_CHANNELS 0
26
27#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S
index 6288fad0dc41..1a6eec86bd47 100644
--- a/include/asm-arm/arch-realview/entry-macro.S
+++ b/include/asm-arm/arch-realview/entry-macro.S
@@ -7,7 +7,7 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10 10#include <asm/hardware.h>
11#include <asm/hardware/gic.h> 11#include <asm/hardware/gic.h>
12 12
13 .macro disable_fiq 13 .macro disable_fiq
diff --git a/include/asm-arm/arch-rpc/entry-macro.S b/include/asm-arm/arch-rpc/entry-macro.S
index 686f413f82d6..c9e5395e5106 100644
--- a/include/asm-arm/arch-rpc/entry-macro.S
+++ b/include/asm-arm/arch-rpc/entry-macro.S
@@ -1,3 +1,3 @@
1 1#include <asm/hardware.h>
2#include <asm/hardware/entry-macro-iomd.S> 2#include <asm/hardware/entry-macro-iomd.S>
3 3
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h
index e830a40e573a..b011e14f3bc6 100644
--- a/include/asm-arm/arch-s3c2410/dma.h
+++ b/include/asm-arm/arch-s3c2410/dma.h
@@ -31,14 +31,6 @@
31#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ 31#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
32 32
33 33
34/* according to the samsung port, we cannot use the regular
35 * dma channels... we must therefore provide our own interface
36 * for DMA, and allow our drivers to use that.
37 */
38
39#define MAX_DMA_CHANNELS 0
40
41
42/* we have 4 dma channels */ 34/* we have 4 dma channels */
43#define S3C2410_DMA_CHANNELS (4) 35#define S3C2410_DMA_CHANNELS (4)
44 36
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S
index b7d4d7f4422d..cc06b1bd37b2 100644
--- a/include/asm-arm/arch-s3c2410/entry-macro.S
+++ b/include/asm-arm/arch-s3c2410/entry-macro.S
@@ -10,6 +10,8 @@
10 * Modifications: 10 * Modifications:
11 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA 11 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
12 */ 12 */
13#include <asm/hardware.h>
14#include <asm/arch/irqs.h>
13 15
14 16
15 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 17 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
diff --git a/include/asm-arm/arch-sa1100/dma.h b/include/asm-arm/arch-sa1100/dma.h
index 3d60ed9f8c34..02575d72ac6b 100644
--- a/include/asm-arm/arch-sa1100/dma.h
+++ b/include/asm-arm/arch-sa1100/dma.h
@@ -15,20 +15,6 @@
15 15
16 16
17/* 17/*
18 * This is the maximum DMA address that can be DMAd to.
19 */
20#define MAX_DMA_ADDRESS 0xffffffff
21
22
23/*
24 * The regular generic DMA interface is inappropriate for the
25 * SA1100 DMA model. None of the SA1100 specific drivers using
26 * DMA are portable anyway so it's pointless to try to twist the
27 * regular DMA API to accommodate them.
28 */
29#define MAX_DMA_CHANNELS 0
30
31/*
32 * The SA1100 has six internal DMA channels. 18 * The SA1100 has six internal DMA channels.
33 */ 19 */
34#define SA1100_DMA_CHANNELS 6 20#define SA1100_DMA_CHANNELS 6
diff --git a/include/asm-arm/arch-versatile/debug-macro.S b/include/asm-arm/arch-versatile/debug-macro.S
index 89e38ac1444e..ef6167116dbb 100644
--- a/include/asm-arm/arch-versatile/debug-macro.S
+++ b/include/asm-arm/arch-versatile/debug-macro.S
@@ -11,7 +11,7 @@
11 * 11 *
12*/ 12*/
13 13
14#include <asm/hardware/amba_serial.h> 14#include <linux/amba/serial.h>
15 15
16 .macro addruart,rx 16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0 17 mrc p15, 0, \rx, c1, c0
diff --git a/include/asm-arm/arch-versatile/dma.h b/include/asm-arm/arch-versatile/dma.h
index dcc8ac26eac0..642577348623 100644
--- a/include/asm-arm/arch-versatile/dma.h
+++ b/include/asm-arm/arch-versatile/dma.h
@@ -18,10 +18,3 @@
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21#ifndef __ASM_ARCH_DMA_H
22#define __ASM_ARCH_DMA_H
23
24#define MAX_DMA_ADDRESS 0xffffffff
25#define MAX_DMA_CHANNELS 0
26
27#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-versatile/entry-macro.S b/include/asm-arm/arch-versatile/entry-macro.S
index 90e4e970d253..58f0d71759f6 100644
--- a/include/asm-arm/arch-versatile/entry-macro.S
+++ b/include/asm-arm/arch-versatile/entry-macro.S
@@ -7,7 +7,9 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10 .macro disable_fiq 10#include <asm/hardware.h>
11
12 .macro disable_fiq
11 .endm 13 .endm
12 14
13 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 15 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
diff --git a/include/asm-arm/byteorder.h b/include/asm-arm/byteorder.h
index d648a1915c33..741f5bc5d016 100644
--- a/include/asm-arm/byteorder.h
+++ b/include/asm-arm/byteorder.h
@@ -15,9 +15,23 @@
15#ifndef __ASM_ARM_BYTEORDER_H 15#ifndef __ASM_ARM_BYTEORDER_H
16#define __ASM_ARM_BYTEORDER_H 16#define __ASM_ARM_BYTEORDER_H
17 17
18 18#include <linux/compiler.h>
19#include <asm/types.h> 19#include <asm/types.h>
20 20
21static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
22{
23 __u32 t;
24
25 t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */
26 x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */
27 t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */
28 x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */
29
30 return x;
31}
32
33#define __arch__swab32(x) ___arch__swab32(x)
34
21#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 35#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
22# define __BYTEORDER_HAS_U64__ 36# define __BYTEORDER_HAS_U64__
23# define __SWAB_64_THRU_32__ 37# define __SWAB_64_THRU_32__
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index e81baff4f54b..09e19a783a51 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -14,7 +14,6 @@
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
16 16
17#include <asm/mman.h>
18#include <asm/glue.h> 17#include <asm/glue.h>
19#include <asm/shmparam.h> 18#include <asm/shmparam.h>
20 19
diff --git a/include/asm-arm/dma.h b/include/asm-arm/dma.h
index ef41df43a584..49c01e2bf7c8 100644
--- a/include/asm-arm/dma.h
+++ b/include/asm-arm/dma.h
@@ -10,6 +10,13 @@ typedef unsigned int dmach_t;
10#include <asm/arch/dma.h> 10#include <asm/arch/dma.h>
11 11
12/* 12/*
13 * This is the maximum virtual address which can be DMA'd from.
14 */
15#ifndef MAX_DMA_ADDRESS
16#define MAX_DMA_ADDRESS 0xffffffff
17#endif
18
19/*
13 * DMA modes 20 * DMA modes
14 */ 21 */
15typedef unsigned int dmamode_t; 22typedef unsigned int dmamode_t;
@@ -91,7 +98,9 @@ extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg);
91 * especially since some DMA architectures don't update the 98 * especially since some DMA architectures don't update the
92 * DMA address immediately, but defer it to the enable_dma(). 99 * DMA address immediately, but defer it to the enable_dma().
93 */ 100 */
94extern void set_dma_addr(dmach_t channel, unsigned long physaddr); 101extern void __set_dma_addr(dmach_t channel, void *addr);
102#define set_dma_addr(channel, addr) \
103 __set_dma_addr(channel, bus_to_virt(addr))
95 104
96/* Set the DMA byte count for this channel 105/* Set the DMA byte count for this channel
97 * 106 *
diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/include/asm-arm/hardware/sharpsl_pm.h
new file mode 100644
index 000000000000..36983e5f3665
--- /dev/null
+++ b/include/asm-arm/hardware/sharpsl_pm.h
@@ -0,0 +1,94 @@
1/*
2 * SharpSL Battery/PM Driver
3 *
4 * Copyright (c) 2004-2005 Richard Purdie
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#include <linux/interrupt.h>
13
14struct sharpsl_charger_machinfo {
15 void (*init)(void);
16 void (*exit)(void);
17 int gpio_acin;
18 int gpio_batfull;
19 int gpio_batlock;
20 int gpio_fatal;
21 void (*discharge)(int);
22 void (*discharge1)(int);
23 void (*charge)(int);
24 void (*measure_temp)(int);
25 void (*presuspend)(void);
26 void (*postsuspend)(void);
27 unsigned long (*read_devdata)(int);
28#define SHARPSL_BATT_VOLT 1
29#define SHARPSL_BATT_TEMP 2
30#define SHARPSL_ACIN_VOLT 3
31#define SHARPSL_STATUS_ACIN 4
32#define SHARPSL_STATUS_LOCK 5
33#define SHARPSL_STATUS_CHRGFULL 6
34#define SHARPSL_STATUS_FATAL 7
35 unsigned long (*charger_wakeup)(void);
36 int (*should_wakeup)(unsigned int resume_on_alarm);
37 int bat_levels;
38 struct battery_thresh *bat_levels_noac;
39 struct battery_thresh *bat_levels_acin;
40 int status_high_acin;
41 int status_low_acin;
42 int status_high_noac;
43 int status_low_noac;
44};
45
46struct battery_thresh {
47 int voltage;
48 int percentage;
49};
50
51struct battery_stat {
52 int ac_status; /* APM AC Present/Not Present */
53 int mainbat_status; /* APM Main Battery Status */
54 int mainbat_percent; /* Main Battery Percentage Charge */
55 int mainbat_voltage; /* Main Battery Voltage */
56};
57
58struct sharpsl_pm_status {
59 struct device *dev;
60 struct timer_list ac_timer;
61 struct timer_list chrg_full_timer;
62
63 int charge_mode;
64#define CHRG_ERROR (-1)
65#define CHRG_OFF (0)
66#define CHRG_ON (1)
67#define CHRG_DONE (2)
68
69 unsigned int flags;
70#define SHARPSL_SUSPENDED (1 << 0) /* Device is Suspended */
71#define SHARPSL_ALARM_ACTIVE (1 << 1) /* Alarm is for charging event (not user) */
72#define SHARPSL_BL_LIMIT (1 << 2) /* Backlight Intensity Limited */
73#define SHARPSL_APM_QUEUED (1 << 3) /* APM Event Queued */
74#define SHARPSL_DO_OFFLINE_CHRG (1 << 4) /* Trigger the offline charger */
75
76 int full_count;
77 unsigned long charge_start_time;
78 struct sharpsl_charger_machinfo *machinfo;
79 struct battery_stat battstat;
80};
81
82extern struct sharpsl_pm_status sharpsl_pm;
83
84
85#define SHARPSL_LED_ERROR 2
86#define SHARPSL_LED_ON 1
87#define SHARPSL_LED_OFF 0
88
89void sharpsl_battery_kick(void);
90void sharpsl_pm_led(int val);
91irqreturn_t sharpsl_ac_isr(int irq, void *dev_id, struct pt_regs *fp);
92irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp);
93irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id, struct pt_regs *fp);
94
diff --git a/include/asm-arm/mach/dma.h b/include/asm-arm/mach/dma.h
index 31bf716106ee..e7c4a20aad53 100644
--- a/include/asm-arm/mach/dma.h
+++ b/include/asm-arm/mach/dma.h
@@ -25,13 +25,15 @@ struct dma_ops {
25}; 25};
26 26
27struct dma_struct { 27struct dma_struct {
28 void *addr; /* single DMA address */
29 unsigned long count; /* single DMA size */
28 struct scatterlist buf; /* single DMA */ 30 struct scatterlist buf; /* single DMA */
29 int sgcount; /* number of DMA SG */ 31 int sgcount; /* number of DMA SG */
30 struct scatterlist *sg; /* DMA Scatter-Gather List */ 32 struct scatterlist *sg; /* DMA Scatter-Gather List */
31 33
32 unsigned int active:1; /* Transfer active */ 34 unsigned int active:1; /* Transfer active */
33 unsigned int invalid:1; /* Address/Count changed */ 35 unsigned int invalid:1; /* Address/Count changed */
34 unsigned int using_sg:1; /* using scatter list? */ 36
35 dmamode_t dma_mode; /* DMA mode */ 37 dmamode_t dma_mode; /* DMA mode */
36 int speed; /* DMA speed */ 38 int speed; /* DMA speed */
37 39
diff --git a/include/asm-arm/scatterlist.h b/include/asm-arm/scatterlist.h
index 83b876fb04cc..de2f65eb42ed 100644
--- a/include/asm-arm/scatterlist.h
+++ b/include/asm-arm/scatterlist.h
@@ -9,7 +9,6 @@ struct scatterlist {
9 unsigned int offset; /* buffer offset */ 9 unsigned int offset; /* buffer offset */
10 dma_addr_t dma_address; /* dma address */ 10 dma_addr_t dma_address; /* dma address */
11 unsigned int length; /* length */ 11 unsigned int length; /* length */
12 char *__address; /* for set_dma_addr */
13}; 12};
14 13
15/* 14/*
diff --git a/include/asm-arm/hardware/amba.h b/include/linux/amba/bus.h
index 51e6e54b2aa1..51e6e54b2aa1 100644
--- a/include/asm-arm/hardware/amba.h
+++ b/include/linux/amba/bus.h
diff --git a/include/asm-arm/hardware/amba_clcd.h b/include/linux/amba/clcd.h
index 6b8d73dc1ab0..6b8d73dc1ab0 100644
--- a/include/asm-arm/hardware/amba_clcd.h
+++ b/include/linux/amba/clcd.h
diff --git a/include/asm-arm/hardware/amba_kmi.h b/include/linux/amba/kmi.h
index a39e5be751b3..a39e5be751b3 100644
--- a/include/asm-arm/hardware/amba_kmi.h
+++ b/include/linux/amba/kmi.h
diff --git a/include/asm-arm/hardware/amba_serial.h b/include/linux/amba/serial.h
index dc726ffccebd..dc726ffccebd 100644
--- a/include/asm-arm/hardware/amba_serial.h
+++ b/include/linux/amba/serial.h
diff --git a/include/asm-arm/hardware/clock.h b/include/linux/clk.h
index 19da861e523d..12848f81bb37 100644
--- a/include/asm-arm/hardware/clock.h
+++ b/include/linux/clk.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/asm-arm/hardware/clock.h 2 * linux/include/linux/clk.h
3 * 3 *
4 * Copyright (C) 2004 ARM Limited. 4 * Copyright (C) 2004 ARM Limited.
5 * Written by Deep Blue Solutions Limited. 5 * Written by Deep Blue Solutions Limited.
@@ -33,6 +33,8 @@ struct clk;
33 * uses @dev and @id to determine the clock consumer, and thereby 33 * uses @dev and @id to determine the clock consumer, and thereby
34 * the clock producer. (IOW, @id may be identical strings, but 34 * the clock producer. (IOW, @id may be identical strings, but
35 * clk_get may return different clock producers depending on @dev.) 35 * clk_get may return different clock producers depending on @dev.)
36 *
37 * Drivers must assume that the clock source is not enabled.
36 */ 38 */
37struct clk *clk_get(struct device *dev, const char *id); 39struct clk *clk_get(struct device *dev, const char *id);
38 40
@@ -49,22 +51,16 @@ int clk_enable(struct clk *clk);
49/** 51/**
50 * clk_disable - inform the system when the clock source is no longer required. 52 * clk_disable - inform the system when the clock source is no longer required.
51 * @clk: clock source 53 * @clk: clock source
52 */
53void clk_disable(struct clk *clk);
54
55/**
56 * clk_use - increment the use count
57 * @clk: clock source
58 * 54 *
59 * Returns success (0) or negative errno. 55 * Inform the system that a clock source is no longer required by
60 */ 56 * a driver and may be shut down.
61int clk_use(struct clk *clk); 57 *
62 58 * Implementation detail: if the clock source is shared between
63/** 59 * multiple drivers, clk_enable() calls must be balanced by the
64 * clk_unuse - decrement the use count 60 * same number of clk_disable() calls for the clock source to be
65 * @clk: clock source 61 * disabled.
66 */ 62 */
67void clk_unuse(struct clk *clk); 63void clk_disable(struct clk *clk);
68 64
69/** 65/**
70 * clk_get_rate - obtain the current clock rate (in Hz) for a clock source. 66 * clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
@@ -76,6 +72,10 @@ unsigned long clk_get_rate(struct clk *clk);
76/** 72/**
77 * clk_put - "free" the clock source 73 * clk_put - "free" the clock source
78 * @clk: clock source 74 * @clk: clock source
75 *
76 * Note: drivers must ensure that all clk_enable calls made on this
77 * clock source are balanced by clk_disable calls prior to calling
78 * this function.
79 */ 79 */
80void clk_put(struct clk *clk); 80void clk_put(struct clk *clk);
81 81