diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:37:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:37:22 -0400 |
commit | 1d3c6ff44ad4b5f113602e153026a338f0f9b3ff (patch) | |
tree | 1e1f2932634fc6d0e4acfe68496c1c727b83a13e /arch/arm/include/asm | |
parent | 7c7cbaf5b82c418cd3b1dcf718f71d0e6057e639 (diff) | |
parent | 717e7c2672e37253a4d3aa70e4716b5b0a658761 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (224 commits)
ARM: remove 'select GENERIC_TIME'
ARM: 6136/1: ARCH_REQUIRE_GPIOLIB selects GENERIC_GPIO
ARM: 6074/1: oprofile: convert from sysdev to platform device
ARM: 6073/1: oprofile: remove old files and update KConfig
ARM: 6072/1: oprofile: use perf-events framework as backend
ARM: 6071/1: perf-events: allow modules to query the number of hardware counters
ARM: 6070/1: perf-events: add support for xscale PMUs
ARM: 6069/1: perf-events: use numeric ID to identify PMU
ARM: 6064/1: pmu: register IRQs at runtime
ARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA
ARM: 6134/1: Handle instruction cache maintenance fault properly
ARM: nwfpe: allow debugging output to be configured at runtime
ARM: rename mach_cpu_disable() to platform_cpu_disable()
ARM: 6132/1: PL330: Add common core driver
ARM: 6094/1: Extend cache-l2x0 to support the 16-way PL310
ARM: Move memory mapping into mmu.c
ARM: Ensure meminfo is sorted prior to sanity_check_meminfo
ARM: Remove useless linux/bootmem.h includes
ARM: convert /proc/cpu/aligment to seq_file
arm: use asm-generic/scatterlist.h
...
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/hardware/arm_timer.h | 39 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/cache-l2x0.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst.h | 59 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst307.h | 38 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/icst525.h | 36 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/pl330.h | 217 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/sp810.h | 59 | ||||
-rw-r--r-- | arch/arm/include/asm/ioctls.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/pci.h | 11 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/time.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/pci.h | 15 | ||||
-rw-r--r-- | arch/arm/include/asm/perf_event.h | 17 | ||||
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/pmu.h | 32 | ||||
-rw-r--r-- | arch/arm/include/asm/scatterlist.h | 20 | ||||
-rw-r--r-- | arch/arm/include/asm/smp.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/system.h | 2 |
17 files changed, 431 insertions, 126 deletions
diff --git a/arch/arm/include/asm/hardware/arm_timer.h b/arch/arm/include/asm/hardware/arm_timer.h index 04be3bdf46b8..c0f4e7bf22de 100644 --- a/arch/arm/include/asm/hardware/arm_timer.h +++ b/arch/arm/include/asm/hardware/arm_timer.h | |||
@@ -1,21 +1,30 @@ | |||
1 | #ifndef __ASM_ARM_HARDWARE_ARM_TIMER_H | 1 | #ifndef __ASM_ARM_HARDWARE_ARM_TIMER_H |
2 | #define __ASM_ARM_HARDWARE_ARM_TIMER_H | 2 | #define __ASM_ARM_HARDWARE_ARM_TIMER_H |
3 | 3 | ||
4 | #define TIMER_LOAD 0x00 | 4 | /* |
5 | #define TIMER_VALUE 0x04 | 5 | * ARM timer implementation, found in Integrator, Versatile and Realview |
6 | #define TIMER_CTRL 0x08 | 6 | * platforms. Not all platforms support all registers and bits in these |
7 | #define TIMER_CTRL_ONESHOT (1 << 0) | 7 | * registers, so we mark them with A for Integrator AP, C for Integrator |
8 | #define TIMER_CTRL_32BIT (1 << 1) | 8 | * CP, V for Versatile and R for Realview. |
9 | #define TIMER_CTRL_DIV1 (0 << 2) | 9 | * |
10 | #define TIMER_CTRL_DIV16 (1 << 2) | 10 | * Integrator AP has 16-bit timers, Integrator CP, Versatile and Realview |
11 | #define TIMER_CTRL_DIV256 (2 << 2) | 11 | * can have 16-bit or 32-bit selectable via a bit in the control register. |
12 | #define TIMER_CTRL_IE (1 << 5) /* Interrupt Enable (versatile only) */ | 12 | */ |
13 | #define TIMER_CTRL_PERIODIC (1 << 6) | 13 | #define TIMER_LOAD 0x00 /* ACVR rw */ |
14 | #define TIMER_CTRL_ENABLE (1 << 7) | 14 | #define TIMER_VALUE 0x04 /* ACVR ro */ |
15 | #define TIMER_CTRL 0x08 /* ACVR rw */ | ||
16 | #define TIMER_CTRL_ONESHOT (1 << 0) /* CVR */ | ||
17 | #define TIMER_CTRL_32BIT (1 << 1) /* CVR */ | ||
18 | #define TIMER_CTRL_DIV1 (0 << 2) /* ACVR */ | ||
19 | #define TIMER_CTRL_DIV16 (1 << 2) /* ACVR */ | ||
20 | #define TIMER_CTRL_DIV256 (2 << 2) /* ACVR */ | ||
21 | #define TIMER_CTRL_IE (1 << 5) /* VR */ | ||
22 | #define TIMER_CTRL_PERIODIC (1 << 6) /* ACVR */ | ||
23 | #define TIMER_CTRL_ENABLE (1 << 7) /* ACVR */ | ||
15 | 24 | ||
16 | #define TIMER_INTCLR 0x0c | 25 | #define TIMER_INTCLR 0x0c /* ACVR wo */ |
17 | #define TIMER_RIS 0x10 | 26 | #define TIMER_RIS 0x10 /* CVR ro */ |
18 | #define TIMER_MIS 0x14 | 27 | #define TIMER_MIS 0x14 /* CVR ro */ |
19 | #define TIMER_BGLOAD 0x18 | 28 | #define TIMER_BGLOAD 0x18 /* CVR rw */ |
20 | 29 | ||
21 | #endif | 30 | #endif |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index cdb9022716fd..6bcba48800fe 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -21,6 +21,9 @@ | |||
21 | #define __ASM_ARM_HARDWARE_L2X0_H | 21 | #define __ASM_ARM_HARDWARE_L2X0_H |
22 | 22 | ||
23 | #define L2X0_CACHE_ID 0x000 | 23 | #define L2X0_CACHE_ID 0x000 |
24 | #define L2X0_CACHE_ID_PART_MASK (0xf << 6) | ||
25 | #define L2X0_CACHE_ID_PART_L210 (1 << 6) | ||
26 | #define L2X0_CACHE_ID_PART_L310 (3 << 6) | ||
24 | #define L2X0_CACHE_TYPE 0x004 | 27 | #define L2X0_CACHE_TYPE 0x004 |
25 | #define L2X0_CTRL 0x100 | 28 | #define L2X0_CTRL 0x100 |
26 | #define L2X0_AUX_CTRL 0x104 | 29 | #define L2X0_AUX_CTRL 0x104 |
diff --git a/arch/arm/include/asm/hardware/icst.h b/arch/arm/include/asm/hardware/icst.h new file mode 100644 index 000000000000..10382a3dcec9 --- /dev/null +++ b/arch/arm/include/asm/hardware/icst.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/icst.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. | ||
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 | * Support functions for calculating clocks/divisors for the ICST | ||
11 | * clock generators. See http://www.icst.com/ for more information | ||
12 | * on these devices. | ||
13 | */ | ||
14 | #ifndef ASMARM_HARDWARE_ICST_H | ||
15 | #define ASMARM_HARDWARE_ICST_H | ||
16 | |||
17 | struct icst_params { | ||
18 | unsigned long ref; | ||
19 | unsigned long vco_max; /* inclusive */ | ||
20 | unsigned long vco_min; /* exclusive */ | ||
21 | unsigned short vd_min; /* inclusive */ | ||
22 | unsigned short vd_max; /* inclusive */ | ||
23 | unsigned char rd_min; /* inclusive */ | ||
24 | unsigned char rd_max; /* inclusive */ | ||
25 | const unsigned char *s2div; /* chip specific s2div array */ | ||
26 | const unsigned char *idx2s; /* chip specific idx2s array */ | ||
27 | }; | ||
28 | |||
29 | struct icst_vco { | ||
30 | unsigned short v; | ||
31 | unsigned char r; | ||
32 | unsigned char s; | ||
33 | }; | ||
34 | |||
35 | unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco); | ||
36 | struct icst_vco icst_hz_to_vco(const struct icst_params *p, unsigned long freq); | ||
37 | |||
38 | /* | ||
39 | * ICST307 VCO frequency must be between 6MHz and 200MHz (3.3 or 5V). | ||
40 | * This frequency is pre-output divider. | ||
41 | */ | ||
42 | #define ICST307_VCO_MIN 6000000 | ||
43 | #define ICST307_VCO_MAX 200000000 | ||
44 | |||
45 | extern const unsigned char icst307_s2div[]; | ||
46 | extern const unsigned char icst307_idx2s[]; | ||
47 | |||
48 | /* | ||
49 | * ICST525 VCO frequency must be between 10MHz and 200MHz (3V) or 320MHz (5V). | ||
50 | * This frequency is pre-output divider. | ||
51 | */ | ||
52 | #define ICST525_VCO_MIN 10000000 | ||
53 | #define ICST525_VCO_MAX_3V 200000000 | ||
54 | #define ICST525_VCO_MAX_5V 320000000 | ||
55 | |||
56 | extern const unsigned char icst525_s2div[]; | ||
57 | extern const unsigned char icst525_idx2s[]; | ||
58 | |||
59 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/icst307.h b/arch/arm/include/asm/hardware/icst307.h deleted file mode 100644 index 554f128a1046..000000000000 --- a/arch/arm/include/asm/hardware/icst307.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/icst307.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. | ||
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 | * Support functions for calculating clocks/divisors for the ICS307 | ||
11 | * clock generators. See http://www.icst.com/ for more information | ||
12 | * on these devices. | ||
13 | * | ||
14 | * This file is similar to the icst525.h file | ||
15 | */ | ||
16 | #ifndef ASMARM_HARDWARE_ICST307_H | ||
17 | #define ASMARM_HARDWARE_ICST307_H | ||
18 | |||
19 | struct icst307_params { | ||
20 | unsigned long ref; | ||
21 | unsigned long vco_max; /* inclusive */ | ||
22 | unsigned short vd_min; /* inclusive */ | ||
23 | unsigned short vd_max; /* inclusive */ | ||
24 | unsigned char rd_min; /* inclusive */ | ||
25 | unsigned char rd_max; /* inclusive */ | ||
26 | }; | ||
27 | |||
28 | struct icst307_vco { | ||
29 | unsigned short v; | ||
30 | unsigned char r; | ||
31 | unsigned char s; | ||
32 | }; | ||
33 | |||
34 | unsigned long icst307_khz(const struct icst307_params *p, struct icst307_vco vco); | ||
35 | struct icst307_vco icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq); | ||
36 | struct icst307_vco icst307_ps_to_vco(const struct icst307_params *p, unsigned long period); | ||
37 | |||
38 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/icst525.h b/arch/arm/include/asm/hardware/icst525.h deleted file mode 100644 index 58f0dc43e2ed..000000000000 --- a/arch/arm/include/asm/hardware/icst525.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/icst525.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. | ||
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 | * Support functions for calculating clocks/divisors for the ICST525 | ||
11 | * clock generators. See http://www.icst.com/ for more information | ||
12 | * on these devices. | ||
13 | */ | ||
14 | #ifndef ASMARM_HARDWARE_ICST525_H | ||
15 | #define ASMARM_HARDWARE_ICST525_H | ||
16 | |||
17 | struct icst525_params { | ||
18 | unsigned long ref; | ||
19 | unsigned long vco_max; /* inclusive */ | ||
20 | unsigned short vd_min; /* inclusive */ | ||
21 | unsigned short vd_max; /* inclusive */ | ||
22 | unsigned char rd_min; /* inclusive */ | ||
23 | unsigned char rd_max; /* inclusive */ | ||
24 | }; | ||
25 | |||
26 | struct icst525_vco { | ||
27 | unsigned short v; | ||
28 | unsigned char r; | ||
29 | unsigned char s; | ||
30 | }; | ||
31 | |||
32 | unsigned long icst525_khz(const struct icst525_params *p, struct icst525_vco vco); | ||
33 | struct icst525_vco icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq); | ||
34 | struct icst525_vco icst525_ps_to_vco(const struct icst525_params *p, unsigned long period); | ||
35 | |||
36 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/pl330.h b/arch/arm/include/asm/hardware/pl330.h new file mode 100644 index 000000000000..575fa8186ca0 --- /dev/null +++ b/arch/arm/include/asm/hardware/pl330.h | |||
@@ -0,0 +1,217 @@ | |||
1 | /* linux/include/asm/hardware/pl330.h | ||
2 | * | ||
3 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __PL330_CORE_H | ||
22 | #define __PL330_CORE_H | ||
23 | |||
24 | #define PL330_MAX_CHAN 8 | ||
25 | #define PL330_MAX_IRQS 32 | ||
26 | #define PL330_MAX_PERI 32 | ||
27 | |||
28 | enum pl330_srccachectrl { | ||
29 | SCCTRL0 = 0, /* Noncacheable and nonbufferable */ | ||
30 | SCCTRL1, /* Bufferable only */ | ||
31 | SCCTRL2, /* Cacheable, but do not allocate */ | ||
32 | SCCTRL3, /* Cacheable and bufferable, but do not allocate */ | ||
33 | SINVALID1, | ||
34 | SINVALID2, | ||
35 | SCCTRL6, /* Cacheable write-through, allocate on reads only */ | ||
36 | SCCTRL7, /* Cacheable write-back, allocate on reads only */ | ||
37 | }; | ||
38 | |||
39 | enum pl330_dstcachectrl { | ||
40 | DCCTRL0 = 0, /* Noncacheable and nonbufferable */ | ||
41 | DCCTRL1, /* Bufferable only */ | ||
42 | DCCTRL2, /* Cacheable, but do not allocate */ | ||
43 | DCCTRL3, /* Cacheable and bufferable, but do not allocate */ | ||
44 | DINVALID1 = 8, | ||
45 | DINVALID2, | ||
46 | DCCTRL6, /* Cacheable write-through, allocate on writes only */ | ||
47 | DCCTRL7, /* Cacheable write-back, allocate on writes only */ | ||
48 | }; | ||
49 | |||
50 | /* Populated by the PL330 core driver for DMA API driver's info */ | ||
51 | struct pl330_config { | ||
52 | u32 periph_id; | ||
53 | u32 pcell_id; | ||
54 | #define DMAC_MODE_NS (1 << 0) | ||
55 | unsigned int mode; | ||
56 | unsigned int data_bus_width:10; /* In number of bits */ | ||
57 | unsigned int data_buf_dep:10; | ||
58 | unsigned int num_chan:4; | ||
59 | unsigned int num_peri:6; | ||
60 | u32 peri_ns; | ||
61 | unsigned int num_events:6; | ||
62 | u32 irq_ns; | ||
63 | }; | ||
64 | |||
65 | /* Handle to the DMAC provided to the PL330 core */ | ||
66 | struct pl330_info { | ||
67 | /* Owning device */ | ||
68 | struct device *dev; | ||
69 | /* Size of MicroCode buffers for each channel. */ | ||
70 | unsigned mcbufsz; | ||
71 | /* ioremap'ed address of PL330 registers. */ | ||
72 | void __iomem *base; | ||
73 | /* Client can freely use it. */ | ||
74 | void *client_data; | ||
75 | /* PL330 core data, Client must not touch it. */ | ||
76 | void *pl330_data; | ||
77 | /* Populated by the PL330 core driver during pl330_add */ | ||
78 | struct pl330_config pcfg; | ||
79 | /* | ||
80 | * If the DMAC has some reset mechanism, then the | ||
81 | * client may want to provide pointer to the method. | ||
82 | */ | ||
83 | void (*dmac_reset)(struct pl330_info *pi); | ||
84 | }; | ||
85 | |||
86 | enum pl330_byteswap { | ||
87 | SWAP_NO = 0, | ||
88 | SWAP_2, | ||
89 | SWAP_4, | ||
90 | SWAP_8, | ||
91 | SWAP_16, | ||
92 | }; | ||
93 | |||
94 | /** | ||
95 | * Request Configuration. | ||
96 | * The PL330 core does not modify this and uses the last | ||
97 | * working configuration if the request doesn't provide any. | ||
98 | * | ||
99 | * The Client may want to provide this info only for the | ||
100 | * first request and a request with new settings. | ||
101 | */ | ||
102 | struct pl330_reqcfg { | ||
103 | /* Address Incrementing */ | ||
104 | unsigned dst_inc:1; | ||
105 | unsigned src_inc:1; | ||
106 | |||
107 | /* | ||
108 | * For now, the SRC & DST protection levels | ||
109 | * and burst size/length are assumed same. | ||
110 | */ | ||
111 | bool nonsecure; | ||
112 | bool privileged; | ||
113 | bool insnaccess; | ||
114 | unsigned brst_len:5; | ||
115 | unsigned brst_size:3; /* in power of 2 */ | ||
116 | |||
117 | enum pl330_dstcachectrl dcctl; | ||
118 | enum pl330_srccachectrl scctl; | ||
119 | enum pl330_byteswap swap; | ||
120 | }; | ||
121 | |||
122 | /* | ||
123 | * One cycle of DMAC operation. | ||
124 | * There may be more than one xfer in a request. | ||
125 | */ | ||
126 | struct pl330_xfer { | ||
127 | u32 src_addr; | ||
128 | u32 dst_addr; | ||
129 | /* Size to xfer */ | ||
130 | u32 bytes; | ||
131 | /* | ||
132 | * Pointer to next xfer in the list. | ||
133 | * The last xfer in the req must point to NULL. | ||
134 | */ | ||
135 | struct pl330_xfer *next; | ||
136 | }; | ||
137 | |||
138 | /* The xfer callbacks are made with one of these arguments. */ | ||
139 | enum pl330_op_err { | ||
140 | /* The all xfers in the request were success. */ | ||
141 | PL330_ERR_NONE, | ||
142 | /* If req aborted due to global error. */ | ||
143 | PL330_ERR_ABORT, | ||
144 | /* If req failed due to problem with Channel. */ | ||
145 | PL330_ERR_FAIL, | ||
146 | }; | ||
147 | |||
148 | enum pl330_reqtype { | ||
149 | MEMTOMEM, | ||
150 | MEMTODEV, | ||
151 | DEVTOMEM, | ||
152 | DEVTODEV, | ||
153 | }; | ||
154 | |||
155 | /* A request defining Scatter-Gather List ending with NULL xfer. */ | ||
156 | struct pl330_req { | ||
157 | enum pl330_reqtype rqtype; | ||
158 | /* Index of peripheral for the xfer. */ | ||
159 | unsigned peri:5; | ||
160 | /* Unique token for this xfer, set by the client. */ | ||
161 | void *token; | ||
162 | /* Callback to be called after xfer. */ | ||
163 | void (*xfer_cb)(void *token, enum pl330_op_err err); | ||
164 | /* If NULL, req will be done at last set parameters. */ | ||
165 | struct pl330_reqcfg *cfg; | ||
166 | /* Pointer to first xfer in the request. */ | ||
167 | struct pl330_xfer *x; | ||
168 | }; | ||
169 | |||
170 | /* | ||
171 | * To know the status of the channel and DMAC, the client | ||
172 | * provides a pointer to this structure. The PL330 core | ||
173 | * fills it with current information. | ||
174 | */ | ||
175 | struct pl330_chanstatus { | ||
176 | /* | ||
177 | * If the DMAC engine halted due to some error, | ||
178 | * the client should remove-add DMAC. | ||
179 | */ | ||
180 | bool dmac_halted; | ||
181 | /* | ||
182 | * If channel is halted due to some error, | ||
183 | * the client should ABORT/FLUSH and START the channel. | ||
184 | */ | ||
185 | bool faulting; | ||
186 | /* Location of last load */ | ||
187 | u32 src_addr; | ||
188 | /* Location of last store */ | ||
189 | u32 dst_addr; | ||
190 | /* | ||
191 | * Pointer to the currently active req, NULL if channel is | ||
192 | * inactive, even though the requests may be present. | ||
193 | */ | ||
194 | struct pl330_req *top_req; | ||
195 | /* Pointer to req waiting second in the queue if any. */ | ||
196 | struct pl330_req *wait_req; | ||
197 | }; | ||
198 | |||
199 | enum pl330_chan_op { | ||
200 | /* Start the channel */ | ||
201 | PL330_OP_START, | ||
202 | /* Abort the active xfer */ | ||
203 | PL330_OP_ABORT, | ||
204 | /* Stop xfer and flush queue */ | ||
205 | PL330_OP_FLUSH, | ||
206 | }; | ||
207 | |||
208 | extern int pl330_add(struct pl330_info *); | ||
209 | extern void pl330_del(struct pl330_info *pi); | ||
210 | extern int pl330_update(const struct pl330_info *pi); | ||
211 | extern void pl330_release_channel(void *ch_id); | ||
212 | extern void *pl330_request_channel(const struct pl330_info *pi); | ||
213 | extern int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus); | ||
214 | extern int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op); | ||
215 | extern int pl330_submit_req(void *ch_id, struct pl330_req *r); | ||
216 | |||
217 | #endif /* __PL330_CORE_H */ | ||
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h new file mode 100644 index 000000000000..a101f10bb5b1 --- /dev/null +++ b/arch/arm/include/asm/hardware/sp810.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/sp810.h | ||
3 | * | ||
4 | * ARM PrimeXsys System Controller SP810 header file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARM_SP810_H | ||
15 | #define __ASM_ARM_SP810_H | ||
16 | |||
17 | #include <linux/io.h> | ||
18 | |||
19 | /* sysctl registers offset */ | ||
20 | #define SCCTRL 0x000 | ||
21 | #define SCSYSSTAT 0x004 | ||
22 | #define SCIMCTRL 0x008 | ||
23 | #define SCIMSTAT 0x00C | ||
24 | #define SCXTALCTRL 0x010 | ||
25 | #define SCPLLCTRL 0x014 | ||
26 | #define SCPLLFCTRL 0x018 | ||
27 | #define SCPERCTRL0 0x01C | ||
28 | #define SCPERCTRL1 0x020 | ||
29 | #define SCPEREN 0x024 | ||
30 | #define SCPERDIS 0x028 | ||
31 | #define SCPERCLKEN 0x02C | ||
32 | #define SCPERSTAT 0x030 | ||
33 | #define SCSYSID0 0xEE0 | ||
34 | #define SCSYSID1 0xEE4 | ||
35 | #define SCSYSID2 0xEE8 | ||
36 | #define SCSYSID3 0xEEC | ||
37 | #define SCITCR 0xF00 | ||
38 | #define SCITIR0 0xF04 | ||
39 | #define SCITIR1 0xF08 | ||
40 | #define SCITOR 0xF0C | ||
41 | #define SCCNTCTRL 0xF10 | ||
42 | #define SCCNTDATA 0xF14 | ||
43 | #define SCCNTSTEP 0xF18 | ||
44 | #define SCPERIPHID0 0xFE0 | ||
45 | #define SCPERIPHID1 0xFE4 | ||
46 | #define SCPERIPHID2 0xFE8 | ||
47 | #define SCPERIPHID3 0xFEC | ||
48 | #define SCPCELLID0 0xFF0 | ||
49 | #define SCPCELLID1 0xFF4 | ||
50 | #define SCPCELLID2 0xFF8 | ||
51 | #define SCPCELLID3 0xFFC | ||
52 | |||
53 | static inline void sysctl_soft_reset(void __iomem *base) | ||
54 | { | ||
55 | /* writing any value to SCSYSSTAT reg will reset system */ | ||
56 | writel(0, base + SCSYSSTAT); | ||
57 | } | ||
58 | |||
59 | #endif /* __ASM_ARM_SP810_H */ | ||
diff --git a/arch/arm/include/asm/ioctls.h b/arch/arm/include/asm/ioctls.h index a91d8a1523cf..7f0b6d13296a 100644 --- a/arch/arm/include/asm/ioctls.h +++ b/arch/arm/include/asm/ioctls.h | |||
@@ -53,6 +53,9 @@ | |||
53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
55 | 55 | ||
56 | #define TIOCGRS485 0x542E | ||
57 | #define TIOCSRS485 0x542F | ||
58 | |||
56 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 59 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
57 | #define FIOCLEX 0x5451 | 60 | #define FIOCLEX 0x5451 |
58 | #define FIOASYNC 0x5452 | 61 | #define FIOASYNC 0x5452 |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index a38bdc7afa34..52f0da1e97df 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -8,10 +8,16 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_MACH_PCI_H | ||
12 | #define __ASM_MACH_PCI_H | ||
13 | |||
11 | struct pci_sys_data; | 14 | struct pci_sys_data; |
12 | struct pci_bus; | 15 | struct pci_bus; |
13 | 16 | ||
14 | struct hw_pci { | 17 | struct hw_pci { |
18 | #ifdef CONFIG_PCI_DOMAINS | ||
19 | int domain; | ||
20 | #endif | ||
15 | struct list_head buses; | 21 | struct list_head buses; |
16 | int nr_controllers; | 22 | int nr_controllers; |
17 | int (*setup)(int nr, struct pci_sys_data *); | 23 | int (*setup)(int nr, struct pci_sys_data *); |
@@ -26,6 +32,9 @@ struct hw_pci { | |||
26 | * Per-controller structure | 32 | * Per-controller structure |
27 | */ | 33 | */ |
28 | struct pci_sys_data { | 34 | struct pci_sys_data { |
35 | #ifdef CONFIG_PCI_DOMAINS | ||
36 | int domain; | ||
37 | #endif | ||
29 | struct list_head node; | 38 | struct list_head node; |
30 | int busnr; /* primary bus number */ | 39 | int busnr; /* primary bus number */ |
31 | u64 mem_offset; /* bus->cpu memory mapping offset */ | 40 | u64 mem_offset; /* bus->cpu memory mapping offset */ |
@@ -70,3 +79,5 @@ extern int pci_v3_setup(int nr, struct pci_sys_data *); | |||
70 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); | 79 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); |
71 | extern void pci_v3_preinit(void); | 80 | extern void pci_v3_preinit(void); |
72 | extern void pci_v3_postinit(void); | 81 | extern void pci_v3_postinit(void); |
82 | |||
83 | #endif /* __ASM_MACH_PCI_H */ | ||
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index 8bffc3ff3acf..35d408f6dccf 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h | |||
@@ -38,7 +38,7 @@ struct sys_timer { | |||
38 | void (*init)(void); | 38 | void (*init)(void); |
39 | void (*suspend)(void); | 39 | void (*suspend)(void); |
40 | void (*resume)(void); | 40 | void (*resume)(void); |
41 | #ifndef CONFIG_GENERIC_TIME | 41 | #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET |
42 | unsigned long (*offset)(void); | 42 | unsigned long (*offset)(void); |
43 | #endif | 43 | #endif |
44 | }; | 44 | }; |
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h index 47980118d0a5..92e2a833693d 100644 --- a/arch/arm/include/asm/pci.h +++ b/arch/arm/include/asm/pci.h | |||
@@ -4,8 +4,23 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #include <asm-generic/pci-dma-compat.h> | 5 | #include <asm-generic/pci-dma-compat.h> |
6 | 6 | ||
7 | #include <asm/mach/pci.h> /* for pci_sys_data */ | ||
7 | #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ | 8 | #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ |
8 | 9 | ||
10 | #ifdef CONFIG_PCI_DOMAINS | ||
11 | static inline int pci_domain_nr(struct pci_bus *bus) | ||
12 | { | ||
13 | struct pci_sys_data *root = bus->sysdata; | ||
14 | |||
15 | return root->domain; | ||
16 | } | ||
17 | |||
18 | static inline int pci_proc_domain(struct pci_bus *bus) | ||
19 | { | ||
20 | return pci_domain_nr(bus); | ||
21 | } | ||
22 | #endif /* CONFIG_PCI_DOMAINS */ | ||
23 | |||
9 | #ifdef CONFIG_PCI_HOST_ITE8152 | 24 | #ifdef CONFIG_PCI_HOST_ITE8152 |
10 | /* ITE bridge requires setting latency timer to avoid early bus access | 25 | /* ITE bridge requires setting latency timer to avoid early bus access |
11 | termination by PIC bus mater devices | 26 | termination by PIC bus mater devices |
diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h index 49e3049aba32..48837e6d8887 100644 --- a/arch/arm/include/asm/perf_event.h +++ b/arch/arm/include/asm/perf_event.h | |||
@@ -28,4 +28,21 @@ set_perf_event_pending(void) | |||
28 | * same indexes here for consistency. */ | 28 | * same indexes here for consistency. */ |
29 | #define PERF_EVENT_INDEX_OFFSET 1 | 29 | #define PERF_EVENT_INDEX_OFFSET 1 |
30 | 30 | ||
31 | /* ARM perf PMU IDs for use by internal perf clients. */ | ||
32 | enum arm_perf_pmu_ids { | ||
33 | ARM_PERF_PMU_ID_XSCALE1 = 0, | ||
34 | ARM_PERF_PMU_ID_XSCALE2, | ||
35 | ARM_PERF_PMU_ID_V6, | ||
36 | ARM_PERF_PMU_ID_V6MP, | ||
37 | ARM_PERF_PMU_ID_CA8, | ||
38 | ARM_PERF_PMU_ID_CA9, | ||
39 | ARM_NUM_PMU_IDS, | ||
40 | }; | ||
41 | |||
42 | extern enum arm_perf_pmu_ids | ||
43 | armpmu_get_pmu_id(void); | ||
44 | |||
45 | extern int | ||
46 | armpmu_get_max_events(void); | ||
47 | |||
31 | #endif /* __ARM_PERF_EVENT_H__ */ | 48 | #endif /* __ARM_PERF_EVENT_H__ */ |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 11397687f42c..ab68cf1ef80f 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -314,7 +314,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | |||
314 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) | 314 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) |
315 | #define pgprot_writecombine(prot) \ | 315 | #define pgprot_writecombine(prot) \ |
316 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) | 316 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) |
317 | #if __LINUX_ARM_ARCH__ >= 7 | 317 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE |
318 | #define pgprot_dmacoherent(prot) \ | 318 | #define pgprot_dmacoherent(prot) \ |
319 | __pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_BUFFERABLE) | 319 | __pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_BUFFERABLE) |
320 | #else | 320 | #else |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 2829b9f981a1..8ccea012722c 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -12,33 +12,33 @@ | |||
12 | #ifndef __ARM_PMU_H__ | 12 | #ifndef __ARM_PMU_H__ |
13 | #define __ARM_PMU_H__ | 13 | #define __ARM_PMU_H__ |
14 | 14 | ||
15 | #ifdef CONFIG_CPU_HAS_PMU | 15 | enum arm_pmu_type { |
16 | 16 | ARM_PMU_DEVICE_CPU = 0, | |
17 | struct pmu_irqs { | 17 | ARM_NUM_PMU_DEVICES, |
18 | const int *irqs; | ||
19 | int num_irqs; | ||
20 | }; | 18 | }; |
21 | 19 | ||
20 | #ifdef CONFIG_CPU_HAS_PMU | ||
21 | |||
22 | /** | 22 | /** |
23 | * reserve_pmu() - reserve the hardware performance counters | 23 | * reserve_pmu() - reserve the hardware performance counters |
24 | * | 24 | * |
25 | * Reserve the hardware performance counters in the system for exclusive use. | 25 | * Reserve the hardware performance counters in the system for exclusive use. |
26 | * The 'struct pmu_irqs' for the system is returned on success, ERR_PTR() | 26 | * The platform_device for the system is returned on success, ERR_PTR() |
27 | * encoded error on failure. | 27 | * encoded error on failure. |
28 | */ | 28 | */ |
29 | extern const struct pmu_irqs * | 29 | extern struct platform_device * |
30 | reserve_pmu(void); | 30 | reserve_pmu(enum arm_pmu_type device); |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * release_pmu() - Relinquish control of the performance counters | 33 | * release_pmu() - Relinquish control of the performance counters |
34 | * | 34 | * |
35 | * Release the performance counters and allow someone else to use them. | 35 | * Release the performance counters and allow someone else to use them. |
36 | * Callers must have disabled the counters and released IRQs before calling | 36 | * Callers must have disabled the counters and released IRQs before calling |
37 | * this. The 'struct pmu_irqs' returned from reserve_pmu() must be passed as | 37 | * this. The platform_device returned from reserve_pmu() must be passed as |
38 | * a cookie. | 38 | * a cookie. |
39 | */ | 39 | */ |
40 | extern int | 40 | extern int |
41 | release_pmu(const struct pmu_irqs *irqs); | 41 | release_pmu(struct platform_device *pdev); |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * init_pmu() - Initialise the PMU. | 44 | * init_pmu() - Initialise the PMU. |
@@ -48,24 +48,26 @@ release_pmu(const struct pmu_irqs *irqs); | |||
48 | * the actual hardware initialisation. | 48 | * the actual hardware initialisation. |
49 | */ | 49 | */ |
50 | extern int | 50 | extern int |
51 | init_pmu(void); | 51 | init_pmu(enum arm_pmu_type device); |
52 | 52 | ||
53 | #else /* CONFIG_CPU_HAS_PMU */ | 53 | #else /* CONFIG_CPU_HAS_PMU */ |
54 | 54 | ||
55 | static inline const struct pmu_irqs * | 55 | #include <linux/err.h> |
56 | reserve_pmu(void) | 56 | |
57 | static inline struct platform_device * | ||
58 | reserve_pmu(enum arm_pmu_type device) | ||
57 | { | 59 | { |
58 | return ERR_PTR(-ENODEV); | 60 | return ERR_PTR(-ENODEV); |
59 | } | 61 | } |
60 | 62 | ||
61 | static inline int | 63 | static inline int |
62 | release_pmu(const struct pmu_irqs *irqs) | 64 | release_pmu(struct platform_device *pdev) |
63 | { | 65 | { |
64 | return -ENODEV; | 66 | return -ENODEV; |
65 | } | 67 | } |
66 | 68 | ||
67 | static inline int | 69 | static inline int |
68 | init_pmu(void) | 70 | init_pmu(enum arm_pmu_type device) |
69 | { | 71 | { |
70 | return -ENODEV; | 72 | return -ENODEV; |
71 | } | 73 | } |
diff --git a/arch/arm/include/asm/scatterlist.h b/arch/arm/include/asm/scatterlist.h index ca0a37d03400..bcda59f39941 100644 --- a/arch/arm/include/asm/scatterlist.h +++ b/arch/arm/include/asm/scatterlist.h | |||
@@ -4,24 +4,8 @@ | |||
4 | #include <asm/memory.h> | 4 | #include <asm/memory.h> |
5 | #include <asm/types.h> | 5 | #include <asm/types.h> |
6 | 6 | ||
7 | struct scatterlist { | 7 | #include <asm-generic/scatterlist.h> |
8 | #ifdef CONFIG_DEBUG_SG | ||
9 | unsigned long sg_magic; | ||
10 | #endif | ||
11 | unsigned long page_link; | ||
12 | unsigned int offset; /* buffer offset */ | ||
13 | dma_addr_t dma_address; /* dma address */ | ||
14 | unsigned int length; /* length */ | ||
15 | }; | ||
16 | 8 | ||
17 | /* | 9 | #undef ARCH_HAS_SG_CHAIN |
18 | * These macros should be used after a pci_map_sg call has been done | ||
19 | * to get bus addresses of each of the SG entries and their lengths. | ||
20 | * You should only work with the number of sg entries pci_map_sg | ||
21 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
22 | * is 0. | ||
23 | */ | ||
24 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
25 | #define sg_dma_len(sg) ((sg)->length) | ||
26 | 10 | ||
27 | #endif /* _ASMARM_SCATTERLIST_H */ | 11 | #endif /* _ASMARM_SCATTERLIST_H */ |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index e0d763be1846..3d05190797cb 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -82,7 +82,7 @@ struct secondary_data { | |||
82 | extern struct secondary_data secondary_data; | 82 | extern struct secondary_data secondary_data; |
83 | 83 | ||
84 | extern int __cpu_disable(void); | 84 | extern int __cpu_disable(void); |
85 | extern int mach_cpu_disable(unsigned int cpu); | 85 | extern int platform_cpu_disable(unsigned int cpu); |
86 | 86 | ||
87 | extern void __cpu_die(unsigned int cpu); | 87 | extern void __cpu_die(unsigned int cpu); |
88 | extern void cpu_die(void); | 88 | extern void cpu_die(void); |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 4ace45ec3ef8..5f4f48002734 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -141,7 +141,7 @@ extern unsigned int user_debug; | |||
141 | 141 | ||
142 | #ifdef CONFIG_ARCH_HAS_BARRIERS | 142 | #ifdef CONFIG_ARCH_HAS_BARRIERS |
143 | #include <mach/barriers.h> | 143 | #include <mach/barriers.h> |
144 | #elif __LINUX_ARM_ARCH__ >= 7 || defined(CONFIG_SMP) | 144 | #elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) |
145 | #define mb() do { dsb(); outer_sync(); } while (0) | 145 | #define mb() do { dsb(); outer_sync(); } while (0) |
146 | #define rmb() dmb() | 146 | #define rmb() dmb() |
147 | #define wmb() mb() | 147 | #define wmb() mb() |